/* === Variables === */
:root {
    --bg-primary: #0a0a0b;
    --bg-secondary: #111113;
    --bg-tertiary: #1a1a1d;
    --text-primary: #e4e4e7;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.3);
    --red: #ef4444;
    --yellow: #eab308;
    --green: #22c55e;
    --border: #27272a;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* === Reset & Base === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-hover);
}

/* === Navigation === */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 2rem;
    background: rgba(10, 10, 11, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
}

/* === Hero === */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6rem 2rem 2rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 15% 25%, rgba(99, 102, 241, 0.04) 0%, transparent 25%),
        radial-gradient(circle at 85% 75%, rgba(99, 102, 241, 0.03) 0%, transparent 25%),
        radial-gradient(circle at 50% 10%, rgba(99, 102, 241, 0.02) 0%, transparent 20%),
        radial-gradient(circle at 70% 40%, rgba(99, 102, 241, 0.025) 0%, transparent 20%),
        radial-gradient(circle at 25% 70%, rgba(99, 102, 241, 0.02) 0%, transparent 18%);
    pointer-events: none;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-greeting {
    font-size: 1rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 0.5rem;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.hero-name {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.1s forwards;
}

.hero-title {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.2s forwards;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.3s forwards;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.4s forwards;
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--accent-glow);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-muted);
    color: var(--text-primary);
}

/* === Terminal === */
.hero-visual {
    opacity: 0;
    animation: fadeIn 0.8s ease 0.5s forwards;
}

.terminal {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border);
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-dot.red { background: var(--red); }
.terminal-dot.yellow { background: var(--yellow); }
.terminal-dot.green { background: var(--green); }

.terminal-title {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.terminal-body {
    padding: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    min-height: 200px;
}

.terminal-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.prompt {
    color: var(--green);
}

.command {
    color: var(--text-primary);
}

.cursor {
    color: var(--accent);
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* === Scroll Indicator === */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    opacity: 0;
    animation: fadeIn 0.6s ease 1s forwards;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: rotate(45deg);
    animation: bounce 2s ease infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: rotate(45deg) translateY(0); }
    40% { transform: rotate(45deg) translateY(5px); }
    60% { transform: rotate(45deg) translateY(3px); }
}

/* === Sections === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
}

.contact .section-title::after {
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
}

/* === About === */
.about {
    padding: 4rem 2rem;
    background: var(--bg-secondary);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

.about-text .section-title {
    margin-bottom: 2.5rem;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.about-text em {
    color: var(--accent);
    font-style: normal;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.stat {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-tertiary);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--accent);
    font-family: var(--font-mono);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* === Projects === */
.projects {
    padding: 4rem 2rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.project-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.project-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.project-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.project-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-tags span {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 100px;
    color: var(--text-muted);
}

/* === Contact === */
.contact {
    padding: 4rem 2rem;
    background: var(--bg-secondary);
    text-align: center;
}

.contact-intro {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 3rem;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.contact-link:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.contact-icon {
    font-size: 1.25rem;
}

/* === Footer === */
.footer {
    padding: 3rem 2rem;
    text-align: center;
    border-top: 1px solid var(--border);
}

.footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-note {
    margin-top: 0.5rem;
}

.easter-egg {
    cursor: pointer;
    transition: transform 0.2s ease;
    display: inline-block;
}

.easter-egg:hover {
    transform: scale(1.2);
}

/* === Terminal Overlay (Easter Egg) === */
.terminal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.terminal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.terminal-full {
    width: 90%;
    max-width: 800px;
    height: 500px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.terminal-overlay.active .terminal-full {
    transform: scale(1);
}

.terminal-body-full {
    height: calc(100% - 44px);
    padding: 1rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.terminal-output {
    flex: 1;
    white-space: pre-wrap;
    word-break: break-word;
}

.terminal-output .response {
    color: var(--text-secondary);
}

.terminal-output .user-cmd {
    color: var(--green);
}

.terminal-input-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    outline: none;
    caret-color: var(--accent);
}

.terminal-input:focus {
    outline: none;
}

.terminal-body-full:focus-within {
    outline: none;
}

/* === Animations === */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Responsive === */
@media (max-width: 900px) {
    .hero {
        padding-top: 4rem;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-name {
        margin-bottom: 0.25rem;
    }

    .hero-title {
        margin-bottom: 1rem;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 1.5rem;
        font-size: 1rem;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-visual {
        display: none;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .about-stats {
        flex-direction: row;
        justify-content: center;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 600px) {
    .nav-links {
        gap: 1rem;
    }

    .about-stats {
        flex-direction: column;
    }

    .stat {
        width: 100%;
    }
}
