/* =========================================
   TOKENS
   ========================================= */
:root {
    --bg: #F5F6F8;
    --surface: #FFFFFF;
    --ink: #14171C;
    --muted: #5B6270;
    --border: #E4E7EC;

    --indigo: #5B5FEF;
    --indigo-soft: #EEEEFD;
    --green: #16A34A;
    --green-soft: #E8F8EE;
    --amber: #F59E0B;
    --rose: #F43F5E;

    --chrome-bar: #1F2430;
    --chrome-text: #A6ADBB;

    --font-display: 'Space Grotesk', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* =========================================
   RESET & BASE STYLES
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-body);
}

html, body {
    height: 100%;
    width: 100%;
    background-color: var(--bg);
    color: var(--ink);
    scroll-behavior: smooth;
}

#main {
    position: relative;
    overflow: hidden;
}

/* =========================================
   NAVIGATION (Glassmorphism Effect)
   ========================================= */
#nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 10vh;
    width: 100%;
    position: fixed;
    top: 0;
    z-index: 99;
    padding: 0px 5%;
    background: rgba(245, 246, 248, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

#nav > h3 {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 22px;
    letter-spacing: -0.5px;
}

#nav > button {
    padding: 10px 26px;
    border-radius: 50px;
    background-color: var(--ink);
    color: #fff;
    border: 1px solid var(--ink);
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    font-family: var(--font-mono);
    transition: all 0.3s cubic-bezier(.25,.8,.25,1);
}

#nav > button:hover {
    background-color: var(--indigo);
    border-color: var(--indigo);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(91, 95, 239, 0.3);
}

/* =========================================
   SECTION FUNDAMENTALS
   ========================================= */
.section {
    position: relative;
    min-height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 5%;
}

.section-inner {
    width: 100%;
    max-width: 1100px;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.section-head h1 {
    font-family: var(--font-display);
    font-size: clamp(34px, 4.5vw, 52px);
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -1px;
    margin-top: 12px;
}

.eyebrow {
    display: inline-block;
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--indigo);
    letter-spacing: 1.5px;
    font-size: 13px;
    text-transform: uppercase;
}

.eyebrow.light { color: #9BA3F5; }

/* =========================================
   AMBIENT BACKGROUND GLOW (replaces canvas)
   ========================================= */
.bg-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    z-index: 0;
    opacity: 0.35;
    pointer-events: none;
}

.glow-a {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, var(--indigo) 0%, transparent 70%);
    top: 8%;
    left: 8%;
    animation: drift 14s ease-in-out infinite;
}

.glow-b {
    width: 360px;
    height: 360px;
    background: radial-gradient(circle, var(--green) 0%, transparent 70%);
    bottom: 6%;
    right: 8%;
    animation: drift 16s ease-in-out infinite reverse;
}

@keyframes drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -25px) scale(1.08); }
}

/* =========================================
   IMAGES
   ========================================= */
.circular-img {
    width: 260px;
    height: 260px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 15px 35px rgba(20, 23, 28, 0.12);
    z-index: 10;
    position: relative;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.circular-img:hover {
    transform: scale(1.04) rotate(-1deg);
    box-shadow: 0 20px 45px rgba(91, 95, 239, 0.25);
}

/* =========================================
   HOME PAGE LAYOUT
   ========================================= */
.flex-center {
    flex-direction: column;
}

.hero-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
    position: relative;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--border);
    border-radius: 32px;
    padding: 60px 70px;
    box-shadow: 0 25px 60px rgba(20, 23, 28, 0.08);
    max-width: 780px;
    margin: 0 auto;
}

.text-center-box {
    text-align: center;
    z-index: 10;
    margin-top: 30px;
    max-width: 700px;
}

.text-center-box h1 {
    font-family: var(--font-display);
    font-size: 60px;
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -1px;
    margin-top: 14px;
}

.text-center-box h1 b {
    font-weight: 700;
}

.text-center-box h2 {
    font-size: 20px;
    font-weight: 500;
    margin-top: 14px;
    color: var(--muted);
}

.text-center-box p {
    color: var(--muted);
    margin-top: 20px;
    font-size: 17px;
    line-height: 1.7;
}

#page > h4 {
    position: absolute;
    bottom: 5%;
    font-family: var(--font-mono);
    font-weight: 600;
    z-index: 10;
    letter-spacing: 3px;
    font-size: 12px;
    color: #9098A8;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* =========================================
   CARDS — "code window" system
   ========================================= */
.card {
    position: relative;
    z-index: 10;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(20, 23, 28, 0.05);
    transition: transform 0.45s cubic-bezier(.2,.8,.2,1), box-shadow 0.45s ease, border-color 0.45s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 50px rgba(20, 23, 28, 0.12);
    border-color: rgba(91, 95, 239, 0.35);
}

.window-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    background: var(--chrome-bar);
}

.dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    display: inline-block;
    transition: transform 0.3s ease;
}

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

.card:hover .dot {
    transform: scale(1.15);
}

.window-title {
    margin-left: 8px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--chrome-text);
    letter-spacing: 0.3px;
}

.window-body {
    padding: 36px 40px;
}

.window-body p {
    color: var(--muted);
    font-size: 17px;
    line-height: 1.85;
}

.window-body p + p {
    margin-top: 18px;
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px 40px;
}

.skill-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skill-label {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--indigo);
    letter-spacing: 0.5px;
}

.skill-label::before {
    content: "const ";
    color: var(--muted);
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.chip {
    font-family: var(--font-mono);
    font-size: 13.5px;
    padding: 8px 14px;
    border-radius: 8px;
    background: var(--indigo-soft);
    color: var(--indigo);
    border: 1px solid transparent;
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.chip.small {
    font-size: 12.5px;
    padding: 6px 11px;
    background: var(--green-soft);
    color: var(--green);
}

.chip:hover {
    transform: translateY(-3px);
    border-color: currentColor;
}

/* Badges (experience) */
.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.badge {
    font-family: var(--font-mono);
    font-size: 12.5px;
    padding: 7px 14px;
    border-radius: 50px;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--ink);
    font-weight: 600;
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.project-img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    display: block;
}

.project-title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 14px;
}

.project-card .window-body {
    padding: 28px 30px;
}

.project-card .chip-row {
    margin-top: 20px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 600;
    color: var(--indigo);
    text-decoration: none;
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
    transition: border-color 0.25s ease, gap 0.25s ease;
}

.project-link:hover {
    border-color: var(--indigo);
    gap: 10px;
}

/* =========================================
   FOOTER SECTION
   ========================================= */
#footer {
    min-height: 55vh;
    background-color: var(--ink);
    color: #fff;
    text-align: center;
    padding: 100px 5%;
    position: relative;
    overflow: hidden;
}

#footer::before {
    content: "";
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--indigo) 0%, transparent 70%);
    opacity: 0.25;
    filter: blur(90px);
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
}

.footer-inner {
    position: relative;
    z-index: 2;
}

#footer h3 {
    font-family: var(--font-display);
    font-size: 42px;
    font-weight: 700;
    margin-top: 16px;
    margin-bottom: 44px;
    letter-spacing: -1px;
}

.social-links {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 50px;
}

.social-links a {
    color: #fff;
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 15px;
    font-weight: 500;
    padding: 12px 26px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: all 0.3s cubic-bezier(.25,.8,.25,1);
}

.social-links a:hover {
    background: var(--indigo);
    border-color: var(--indigo);
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(91, 95, 239, 0.35);
}

.copyright {
    color: #6b7280;
    font-size: 13px;
    font-family: var(--font-mono);
}

/* =========================================
   SCROLL REVEAL ANIMATION
   ========================================= */
.reveal {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity 0.8s cubic-bezier(.2,.8,.2,1), transform 0.8s cubic-bezier(.2,.8,.2,1);
}

.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

.projects-grid .reveal:nth-child(2) {
    transition-delay: 0.12s;
}

.skills-grid .skill-group {
    opacity: 0;
    animation: none;
}

.window-card.in-view .skill-group {
    animation: fade-up 0.6s ease forwards;
}

.window-card.in-view .skill-group:nth-child(1) { animation-delay: 0.1s; }
.window-card.in-view .skill-group:nth-child(2) { animation-delay: 0.2s; }
.window-card.in-view .skill-group:nth-child(3) { animation-delay: 0.3s; }
.window-card.in-view .skill-group:nth-child(4) { animation-delay: 0.4s; }

@keyframes fade-up {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .reveal, .bg-glow, .dot, .card, .chip, .circular-img {
        animation: none !important;
        transition: none !important;
    }
    .reveal { opacity: 1; transform: none; }
}

/* =========================================
   MOBILE RESPONSIVENESS
   ========================================= */
@media (max-width: 768px) {
    .bg-glow {
        opacity: 0.18;
        filter: blur(50px);
    }

    #nav {
        padding: 0px 20px;
    }

    #nav > h3 {
        font-size: 19px;
    }

    #nav > button {
        padding: 8px 18px;
        font-size: 13px;
    }

    .section {
        padding: 120px 20px 60px 20px;
        min-height: auto;
    }

    .hero-card {
        padding: 40px 28px;
    }

    .circular-img {
        width: 200px;
        height: 200px;
    }

    .text-center-box h1 {
        font-size: 38px;
    }
    .text-center-box h2 {
        font-size: 17px;
    }
    .text-center-box p {
        font-size: 15px;
    }

    .section-inner {
        gap: 32px;
    }

    .section-head h1 {
        font-size: 32px;
    }

    .window-body {
        padding: 26px 22px;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 26px;
    }

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

    #page > h4 {
        position: relative;
        bottom: 0;
        margin-top: 40px;
    }

    #footer {
        padding: 80px 20px;
    }

    #footer h3 {
        font-size: 30px;
    }

    .social-links a {
        padding: 10px 20px;
        font-size: 14px;
    }
}