/* ==========================================
   MAIN STYLES - CYBERSECURITY PROJECT
   ========================================== */

:root {
    --primary-dark: #0a0e27;
    --secondary-dark: #1a1f3a;
    --accent-green: #00ff88;
    --accent-cyan: #00d4ff;
    --accent-red: #ff0055;
    --text-light: #e0e0e0;
    --border-color: rgba(0, 255, 136, 0.2);
    --terminal-bg: #0d1117;
    --terminal-border: #30363d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--primary-dark);
    color: var(--text-light);
    line-height: 1.6;
}

html {
    scroll-behavior: smooth;
}

/* ==========================================
   ABOUT SECTION - TERMINAL STYLE
   ========================================== */

.about {
    min-height: 100vh;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-dark) 100%);
    position: relative;
    overflow: hidden;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(0, 255, 136, 0.05), transparent);
    pointer-events: none;
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* ==========================================
   TERMINAL COMPONENT
   ========================================== */

.terminal {
    background-color: var(--terminal-bg);
    border: 2px solid var(--terminal-border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 0 rgba(0, 255, 136, 0.2), 
                inset 0 0 0 rgba(0, 255, 136, 0.05);
    animation: terminalEntry 1.2s cubic-bezier(0.34, 1.56, 0.64, 1),
                terminalGlow 3s ease-in-out infinite;
    animation-play-state: paused;
    position: relative;
}

.terminal.active {
    animation-play-state: running;
}

.terminal::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 255, 136, 0.03) 0px,
        rgba(0, 255, 136, 0.03) 2px,
        transparent 2px,
        transparent 4px
    );
    pointer-events: none;
    animation: scanlines 8s linear infinite;
    animation-play-state: paused;
    z-index: 2;
}

.terminal.active::after {
    animation-play-state: running;
}

@keyframes terminalEntry {
    0% {
        opacity: 0;
        transform: scale(0.95) translateY(30px);
        box-shadow: 0 0 0 rgba(0, 255, 136, 0.2),
                    inset 0 0 0 rgba(0, 255, 136, 0.05);
    }
    50% {
        box-shadow: 0 0 50px rgba(0, 255, 136, 0.4),
                    inset 0 0 30px rgba(0, 255, 136, 0.1);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
        box-shadow: 0 0 30px rgba(0, 255, 136, 0.2), 
                    inset 0 0 20px rgba(0, 255, 136, 0.05);
    }
}

@keyframes terminalGlow {
    0%, 100% {
        box-shadow: 0 0 30px rgba(0, 255, 136, 0.2),
                    inset 0 0 20px rgba(0, 255, 136, 0.05);
    }
    50% {
        box-shadow: 0 0 50px rgba(0, 255, 136, 0.4),
                    inset 0 0 30px rgba(0, 255, 136, 0.15),
                    0 0 80px rgba(0, 212, 255, 0.2);
    }
}

@keyframes scanlines {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(10px);
    }
}

/* Terminal Header */
.terminal-header {
    background-color: #1c2128;
    padding: 1rem;
    border-bottom: 1px solid var(--terminal-border);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.terminal-buttons {
    display: flex;
    gap: 0.75rem;
    animation: buttonGlow 2s ease-in-out infinite;
}

.btn-circle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 8px currentColor;
    animation: buttonPulse 2s ease-in-out infinite;
}

.btn-circle:hover {
    transform: scale(1.4);
    box-shadow: 0 0 20px currentColor;
}

@keyframes buttonGlow {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.2);
    }
}

@keyframes buttonPulse {
    0%, 100% {
        box-shadow: 0 0 8px currentColor;
    }
    50% {
        box-shadow: 0 0 15px currentColor;
    }
}

.btn-red {
    background-color: #f85149;
}

.btn-yellow {
    background-color: #d29922;
}

.btn-green {
    background-color: #3fb950;
}

.terminal-title {
    font-family: 'Courier New', monospace;
    color: var(--text-light);
    font-size: 0.9rem;
    flex-grow: 1;
    text-align: center;
    animation: titleFlicker 3s ease-in-out infinite;
}

@keyframes titleFlicker {
    0%, 100% {
        opacity: 1;
        text-shadow: 0 0 0 rgba(0, 255, 136, 0);
    }
    50% {
        text-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
    }
}

/* Terminal Body */
.terminal-body {
    padding: 2rem;
    font-family: 'Courier New', 'Consolas', monospace;
    color: var(--accent-green);
    font-size: 0.95rem;
    line-height: 1.8;
    background-color: var(--terminal-bg);
    min-height: 600px;
    position: relative;
    z-index: 1;
}

/* Terminal Lines */
.terminal-line {
    margin-bottom: 1rem;
    animation: typeCommand 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation-play-state: paused;
}

.terminal-line.active {
    animation-play-state: running;
}

.prompt {
    color: var(--accent-green);
    font-weight: bold;
}

.command {
    color: var(--text-light);
    margin-left: 0.25rem;
}

/* Terminal Output */
.terminal-output {
    margin-top: 2rem;
    margin-left: 0.5rem;
}

.output-item {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    animation: slideInTerminal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
                pulseText 2s ease-in-out forwards;
    animation-play-state: paused;
    opacity: 0;
}

.output-item.active {
    animation-play-state: running;
}

.output-item.delay-1 { animation-delay: 0.15s; }
.output-item.delay-2 { animation-delay: 0.3s; }
.output-item.delay-3 { animation-delay: 0.45s; }
.output-item.delay-4 { animation-delay: 0.6s; }
.output-item.delay-5 { animation-delay: 0.75s; }
.output-item.delay-6 { animation-delay: 0.9s; }
.output-item.delay-7 { animation-delay: 1.05s; }
.output-item.delay-8 { animation-delay: 1.2s; }
.output-item.delay-9 { animation-delay: 1.35s; }
.output-item.delay-10 { animation-delay: 1.5s; }
.output-item.delay-11 { animation-delay: 1.65s; }
.output-item.delay-12 { animation-delay: 1.8s; }
.output-item.delay-13 { animation-delay: 1.95s; }
.output-item.delay-14 { animation-delay: 2.1s; }
.output-item.delay-15 { animation-delay: 2.25s; }

@keyframes slideInTerminal {
    from {
        opacity: 0;
        transform: translateX(-30px);
        filter: blur(5px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
        filter: blur(0);
    }
}

@keyframes pulseText {
    0%, 100% {
        text-shadow: 0 0 5px rgba(0, 255, 136, 0);
    }
    50% {
        text-shadow: 0 0 15px rgba(0, 255, 136, 0.5);
    }
}

@keyframes typeCommand {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.output-prompt {
    color: var(--accent-cyan);
    font-weight: bold;
    min-width: 2rem;
    animation: promptFlash 2.5s ease-in-out infinite;
}

@keyframes promptFlash {
    0%, 100% {
        color: var(--accent-cyan);
        text-shadow: 0 0 5px rgba(0, 212, 255, 0.3);
    }
    50% {
        color: var(--accent-green);
        text-shadow: 0 0 15px rgba(0, 255, 136, 0.6);
    }
}

.output-text {
    color: var(--text-light);
    flex-grow: 1;
}

.output-text strong {
    color: var(--accent-green);
    font-weight: 600;
    animation: textGlow 2s ease-in-out infinite;
}

@keyframes textGlow {
    0%, 100% {
        text-shadow: 0 0 5px rgba(0, 255, 136, 0.3);
    }
    50% {
        text-shadow: 0 0 15px rgba(0, 255, 136, 0.8);
    }
}

/* Cursor Animation */
.cursor {
    display: inline-block;
    width: 8px;
    height: 1rem;
    background-color: var(--accent-green);
    margin-left: 0.2rem;
    animation: blinkCursor 0.7s steps(1) infinite,
                cursorGlow 1.5s ease-in-out infinite;
    box-shadow: 0 0 10px var(--accent-green);
}

@keyframes blinkCursor {
    0%, 49% {
        background-color: var(--accent-green);
        opacity: 1;
    }
    50%, 100% {
        background-color: var(--accent-green);
        opacity: 0.2;
    }
}

@keyframes cursorGlow {
    0%, 100% {
        box-shadow: 0 0 10px var(--accent-green),
                    0 0 20px rgba(0, 255, 136, 0.5);
    }
    50% {
        box-shadow: 0 0 20px var(--accent-green),
                    0 0 40px rgba(0, 255, 136, 0.8);
    }
}

/* ==========================================
   INTERACTIVE EFFECTS
   ========================================== */

.output-prompt:hover {
    color: var(--accent-red);
    text-shadow: 0 0 20px rgba(255, 0, 85, 0.8),
                 0 0 40px rgba(255, 0, 85, 0.4);
    transform: scale(1.1);
    transition: all 0.3s ease;
}

.output-text strong:hover {
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.8),
                 0 0 40px rgba(0, 255, 136, 0.5);
    transform: scale(1.05);
    transition: all 0.3s ease;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

@media (max-width: 768px) {
    .about {
        padding: 2rem 1rem;
        min-height: auto;
    }

    .terminal {
        border-radius: 6px;
    }

    .terminal-header {
        padding: 0.75rem;
    }

    .terminal-title {
        font-size: 0.8rem;
    }

    .terminal-body {
        padding: 1.5rem;
        min-height: auto;
        font-size: 0.85rem;
    }

    .output-item {
        margin-bottom: 0.6rem;
    }
}

@media (max-width: 480px) {
    .about {
        padding: 1.5rem 1rem;
    }

    .terminal-header {
        padding: 0.5rem;
    }

    .terminal-title {
        font-size: 0.7rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .terminal-body {
        padding: 1rem;
        min-height: auto;
        font-size: 0.75rem;
        line-height: 1.6;
    }

    .output-item {
        margin-bottom: 0.4rem;
        gap: 0.3rem;
    }

    .output-prompt {
        min-width: 1.5rem;
    }

    .btn-circle {
        width: 10px;
        height: 10px;
    }
}

/* ==========================================
   ACCESSIBILITY
   ========================================== */

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }

    .cursor {
        background-color: var(--accent-green);
    }
}

/* ==========================================
   PRINT STYLES
   ========================================== */

@media print {
    .about {
        background-color: white;
        color: black;
    }

    .terminal {
        border-color: black;
        background-color: white;
    }

    .terminal-body,
    .output-prompt {
        color: black;
    }
}
