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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

/* ============================================================
   DESIGN TOKENS — ACADEMIC PASTEL CYAN / GREEN / YELLOW
   ============================================================ */
:root {
    /* Core palette */
    --cream:        #edf7f5;
    --warm-white:   #f4fbf9;
    --forest:       #1b3048;

    /* Teal-green */
    --sage:         #3a8c80;
    --sage-light:   #7abfb8;
    --sage-pale:    #c8e8e4;
    --sage-dark:    #246858;
    --mint:         #a8e0d8;

    /* Muted academic yellow */
    --gold:         #9e9030;
    --gold-light:   #c4b850;
    --gold-pale:    #eeebb0;

    /* Cyan */
    --sky:          #3aa8c0;
    --sky-light:    #80ccd8;
    --sky-pale:     #cceef5;

    /* Neutral teal (replaces rose) */
    --rose:         #7ab8cc;
    --rose-pale:    #cce8f0;

    /* Text */
    --text-dark:    #1b3048;
    --text-mid:     #2e5068;
    --text-light:   #4a7888;
    --text-muted:   #7aaabb;

    /* Spacing scale */
    --sp-xs:  0.5rem;
    --sp-sm:  1rem;
    --sp-md:  2rem;
    --sp-lg:  4rem;
    --sp-xl:  6rem;
    --sp-2xl: 8rem;

    /* Type */
    --font-display: 'Space Grotesk', system-ui, sans-serif;
    --font-body:    'Inter', system-ui, -apple-system, sans-serif;
    --font-mono:    'JetBrains Mono', 'Courier New', monospace;

    /* Radii — tighter for engineering feel */
    --r-sm:   4px;
    --r-md:   8px;
    --r-lg:   12px;
    --r-xl:   16px;
    --r-pill: 100px;

    /* Shadows */
    --shadow-sm: 0 2px 8px  rgba(27,48,72,0.08);
    --shadow-md: 0 8px 24px rgba(27,48,72,0.12);
    --shadow-lg: 0 16px 48px rgba(27,48,72,0.16);

    /* Transitions */
    --ease: 0.3s ease;
}

body {
    font-family: var(--font-body);
    background-color: var(--cream);
    color: var(--text-dark);
    line-height: 1.7;
    overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a  { color: inherit; }
ul { list-style: none; }

/* ============================================================
   TYPOGRAPHY HELPERS
   ============================================================ */
h1, h2, h3 {
    font-family: var(--font-display);
    line-height: 1.15;
}

.section-header {
    text-align: center;
    margin-bottom: var(--sp-lg);
}

.section-label {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: lowercase;
    color: var(--sky);
    margin-bottom: 0.5rem;
}

.section-label::before {
    content: '// ';
    opacity: 0.65;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--text-dark);
    letter-spacing: -0.02em;
}

.section-title em {
    color: var(--sky);
    font-style: normal;
    font-weight: 400;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--sp-md);
}

/* ============================================================
   LANGUAGE SWITCHER
   ============================================================ */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-left: auto;
    padding-left: 1rem;
    border-left: 1px solid rgba(58,140,128,0.22);
    flex-shrink: 0;
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    flex-shrink: 0;
}

.lang-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px; height: 30px;
    font-size: 1.05rem;
    text-decoration: none;
    border-radius: var(--r-sm);
    transition: all var(--ease);
    opacity: 0.4;
    filter: grayscale(0.5);
    line-height: 1;
    border: 1.5px solid transparent;
}

.lang-btn:hover {
    opacity: 0.85;
    filter: grayscale(0);
    transform: scale(1.12);
    background: rgba(58,140,128,0.08);
}

.lang-btn.lang-active {
    opacity: 1;
    filter: grayscale(0);
    background: rgba(58,168,192,0.1);
    border-color: rgba(58,168,192,0.35);
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: rgba(237,247,245,0.92);
    border-bottom: 1px solid rgba(58,140,128,0.18);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--sp-md);
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.02em;
}

.logo-icon {
    width: 26px;
    height: 26px;
    color: var(--sage);
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--sp-md);
}

.nav-links a {
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-mid);
    transition: color var(--ease);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -3px; left: 0;
    width: 0; height: 2px;
    background: var(--sky);
    border-radius: 2px;
    transition: width var(--ease);
}

.nav-links a:hover { color: var(--sage-dark); }
.nav-links a:hover::after { width: 100%; }

.nav-cta {
    padding: 0.45rem 1.1rem;
    background: var(--forest);
    color: var(--cream) !important;
    border-radius: var(--r-sm);
    transition: background var(--ease) !important;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 500;
}

.nav-cta::after { display: none; }
.nav-cta:hover { background: var(--sage-dark) !important; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
    min-height: 100vh;
    padding-top: 68px;
    background: linear-gradient(145deg, var(--cream) 0%, var(--sage-pale) 55%, var(--sky-pale) 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(58,140,128,0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(58,140,128,0.055) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
    z-index: 0;
}

/* Background glow blobs */
.hero-bg-shapes { position: absolute; inset: 0; pointer-events: none; }

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(72px);
    opacity: 0.28;
}

.shape-1 {
    width: 560px; height: 560px;
    background: var(--sage-light);
    top: -140px; right: -140px;
    animation: blobPulse 9s ease-in-out infinite;
}

.shape-2 {
    width: 420px; height: 420px;
    background: var(--gold-pale);
    bottom: -80px; left: -80px;
    animation: blobPulse 11s ease-in-out infinite reverse;
}

.shape-3 {
    width: 320px; height: 320px;
    background: var(--sky-light);
    top: 50%; left: 42%;
    animation: blobPulse 14s ease-in-out infinite 3s;
}

/* Botanical decorations */
.botanical-deco { position: absolute; inset: 0; pointer-events: none; }

.leaf { position: absolute; }

.leaf-1 { top: 12%; right: 4%;  width: 78px;  animation: sway 7s ease-in-out infinite;          transform-origin: bottom center; }
.leaf-2 { bottom: 18%; right: 8%;  width: 55px;  animation: sway 9s ease-in-out infinite reverse; transform-origin: bottom center; }
.leaf-3 { top: 58%; left: 3%;  width: 105px; animation: sway 8s ease-in-out infinite 1.5s;     transform-origin: left center; }
.leaf-4 { top: 8%;  left: 8%;  width: 58px;  animation: sway 10s ease-in-out infinite 0.5s;    transform-origin: bottom center; }

/* Hero grid */
.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--sp-lg) var(--sp-md);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-xl);
    align-items: center;
    position: relative;
    z-index: 1;
}

/* Eyebrow */
.hero-eyebrow {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    margin-bottom: var(--sp-sm);
}

.eyebrow-line {
    display: inline-block;
    width: 6px; height: 6px;
    background: var(--sky);
    border-radius: 50%;
    flex-shrink: 0;
    animation: blinkDot 1.4s step-end infinite;
}

.hero-eyebrow span:last-child {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: none;
    color: var(--sage-dark);
}

.hero-eyebrow span:last-child::before {
    content: '→ ';
    color: var(--sky);
    font-weight: 400;
}

/* Name */
.hero-name {
    font-size: clamp(3rem, 5.5vw, 5rem);
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.05;
    margin-bottom: var(--sp-md);
    letter-spacing: -0.025em;
}

.hero-name em {
    font-style: normal;
    font-weight: 400;
    color: var(--sky);
}

/* Tagline */
.hero-tagline {
    font-size: 1.08rem;
    color: var(--text-mid);
    max-width: 440px;
    margin-bottom: var(--sp-md);
    line-height: 1.85;
}

/* Tags */
.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: var(--sp-md);
}

.htag {
    display: inline-block;
    padding: 0.28rem 0.85rem;
    background: var(--sky-pale);
    color: var(--sage-dark);
    border-radius: var(--r-sm);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    border: 1px solid var(--sky-light);
    letter-spacing: 0.01em;
}

/* CTA buttons */
.hero-cta {
    display: flex;
    gap: var(--sp-sm);
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.78rem 1.8rem;
    border-radius: var(--r-md);
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--ease);
    border: 2px solid transparent;
    letter-spacing: 0.02em;
}

.btn-primary {
    background: var(--forest);
    color: var(--cream);
    border-color: var(--forest);
}

.btn-primary:hover {
    background: var(--sage-dark);
    border-color: var(--sage-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: transparent;
    color: var(--text-dark);
    border-color: var(--sky);
}

.btn-secondary:hover {
    background: var(--sky-pale);
    border-color: var(--sky);
    transform: translateY(-3px);
}

/* Profile visual */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 420px;
}

.profile-frame {
    position: relative;
    width: 350px;
    height: 350px;
}

.profile-glow {
    position: absolute;
    width: 340px; height: 340px;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, var(--sky-pale) 0%, transparent 70%);
    filter: blur(22px);
    z-index: 0;
}

.profile-img {
    width: 310px; height: 310px;
    object-fit: cover;
    border-radius: 50%;
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    border: 4px solid var(--warm-white);
    box-shadow: var(--shadow-lg);
    z-index: 1;
}

.profile-ring {
    position: absolute;
    border-radius: 50%;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation: spin 22s linear infinite;
    z-index: 0;
}

.ring-1 {
    width: 354px; height: 354px;
    border: 1.5px dashed rgba(58,168,192,0.32);
}

.ring-2 {
    width: 392px; height: 392px;
    border: 1px solid rgba(58,168,192,0.15);
    animation-direction: reverse;
    animation-duration: 34s;
}

/* Floating interest badges */
.hero-badges { position: absolute; inset: 0; pointer-events: none; }

.badge {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.88rem;
    background: var(--warm-white);
    border-radius: var(--r-sm);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(58,140,128,0.22);
    border-left: 2px solid var(--sky);
    color: var(--text-mid);
    white-space: nowrap;
}

.badge-1 { top: 4%;    left: -8%;  animation: floatBadge 4.2s ease-in-out infinite 0s;   }
.badge-2 { bottom: 12%; left: -12%; animation: floatBadge 5s   ease-in-out infinite 1.1s; }
.badge-3 { top: 8%;    right: -8%; animation: floatBadge 4.6s ease-in-out infinite 0.6s; }
.badge-4 { bottom: 8%; right: -4%; animation: floatBadge 5.4s ease-in-out infinite 1.8s; }

.badge-icon { font-size: 1rem; }

/* Scroll hint */
.hero-scroll-hint {
    position: absolute;
    bottom: var(--sp-md);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: lowercase;
    z-index: 1;
}

.scroll-line {
    width: 1px; height: 42px;
    background: linear-gradient(to bottom, var(--text-muted), transparent);
    animation: scrollPulse 2.2s ease-in-out infinite;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about {
    padding: var(--sp-2xl) 0;
    background: var(--warm-white);
    position: relative;
    overflow: hidden;
}

.section-deco-left {
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 115px;
    opacity: 0.75;
    pointer-events: none;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-xl);
    align-items: start;
}

.about-lead {
    font-family: var(--font-display);
    font-size: 1.18rem;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.65;
    margin-bottom: var(--sp-sm);
}

.about-text p {
    color: var(--text-mid);
    margin-bottom: var(--sp-sm);
    font-size: 0.97rem;
}

.about-stats {
    display: flex;
    gap: var(--sp-md);
    margin-top: var(--sp-md);
    padding-top: var(--sp-md);
    border-top: 1px solid var(--sage-pale);
}

.stat { display: flex; flex-direction: column; gap: 0.25rem; }

.stat-num {
    font-family: var(--font-display);
    font-size: 2.6rem;
    font-weight: 700;
    color: var(--sky);
    line-height: 1;
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.interests-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: var(--sp-md);
    letter-spacing: -0.01em;
}

.interests-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-sm);
}

.interest-card {
    padding: var(--sp-md);
    background: var(--cream);
    border-radius: var(--r-lg);
    border: 1px solid rgba(58,140,128,0.16);
    transition: all var(--ease);
}

.interest-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--sage-light);
}

.interest-icon { font-size: 2rem; margin-bottom: 0.75rem; }

.interest-card h4 {
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.45rem;
    letter-spacing: 0.01em;
}

.interest-card p {
    font-size: 0.83rem;
    color: var(--text-light);
    line-height: 1.65;
}

/* ============================================================
   SKILLS
   ============================================================ */
.skills {
    padding: var(--sp-2xl) 0;
    background: var(--cream);
    position: relative;
    overflow: hidden;
}

.skills-blob {
    position: absolute;
    top: -220px; right: -220px;
    width: 640px; height: 640px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--sky-pale) 0%, transparent 70%);
    opacity: 0.55;
    pointer-events: none;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-md);
}

.skill-category {
    background: var(--warm-white);
    border-radius: var(--r-xl);
    padding: var(--sp-md);
    border: 1px solid rgba(58,140,128,0.15);
    transition: all var(--ease);
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--sage-light);
}

.skill-cat-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: var(--sp-sm);
    padding-bottom: var(--sp-sm);
    border-bottom: 1px solid var(--sage-pale);
}

.skill-cat-icon { font-size: 1.4rem; }

.skill-cat-header h3 {
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-dark);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.42rem;
}

.skill-tag {
    display: inline-block;
    padding: 0.28rem 0.72rem;
    border-radius: var(--r-sm);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 400;
    background: var(--cream);
    color: var(--text-mid);
    border: 1px solid var(--sage-pale);
    transition: all var(--ease);
    cursor: default;
}

.skill-tag:hover {
    background: var(--sky-pale);
    border-color: var(--sky-light);
    color: var(--sage-dark);
}

.skill-tag.featured {
    background: var(--sky-pale);
    border-color: var(--sky-light);
    color: var(--sage-dark);
    font-weight: 500;
}

/* ============================================================
   EXPERIENCE
   ============================================================ */
.experience {
    padding: var(--sp-2xl) 0;
    background: var(--warm-white);
}

.timeline {
    position: relative;
    max-width: 820px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 130px;
    top: 0; bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--sky-light), var(--sky-pale), transparent);
}

.timeline-item {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: var(--sp-md);
    margin-bottom: var(--sp-lg);
    position: relative;
}

.timeline-dot {
    position: absolute;
    left: 123px; top: 28px;
    width: 16px; height: 16px;
    background: var(--warm-white);
    border: 3px solid var(--sky);
    border-radius: 50%;
    box-shadow: 0 0 0 5px var(--sky-pale);
    z-index: 1;
}

.timeline-dot-edu {
    border-color: var(--gold-light);
    box-shadow: 0 0 0 5px var(--gold-pale);
}

.timeline-meta {
    padding-top: var(--sp-sm);
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.timeline-type {
    font-family: var(--font-mono);
    font-size: 0.64rem;
    font-weight: 500;
    color: var(--sky);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.timeline-card {
    background: var(--cream);
    border-radius: 0 var(--r-lg) var(--r-lg) 0;
    padding: var(--sp-md);
    border: 1px solid rgba(58,140,128,0.15);
    border-left: 3px solid var(--sky-light);
    margin-left: var(--sp-md);
    transition: all var(--ease);
}

.timeline-card:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
    border-left-color: var(--sky);
}

.timeline-card-edu {
    border-left-color: var(--gold-light);
    border-color: rgba(196,184,80,0.2);
    border-left: 3px solid var(--gold-light);
}

.timeline-card-edu:hover { border-left-color: var(--gold); }

.tcard-header { margin-bottom: 0.75rem; }

.tcard-header h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-dark);
    letter-spacing: -0.01em;
}

.company-name {
    display: block;
    font-size: 0.84rem;
    color: var(--sky);
    font-weight: 500;
    margin-top: 0.2rem;
    font-style: italic;
}

.timeline-card p {
    font-size: 0.9rem;
    color: var(--text-mid);
    line-height: 1.75;
    margin-bottom: var(--sp-sm);
}

.tcard-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tcard-tags span {
    display: inline-block;
    padding: 0.18rem 0.62rem;
    background: var(--sky-pale);
    color: var(--sage-dark);
    border-radius: var(--r-sm);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 400;
}

/* ============================================================
   PROJECTS
   ============================================================ */
.projects {
    padding: var(--sp-2xl) 0;
    background: var(--cream);
    position: relative;
    overflow: hidden;
}

.projects-blob {
    position: absolute;
    bottom: -260px; left: -200px;
    width: 600px; height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--sage-pale) 0%, transparent 70%);
    opacity: 0.55;
    pointer-events: none;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-md);
}

.project-card {
    background: var(--warm-white);
    border-radius: var(--r-xl);
    overflow: hidden;
    border: 1px solid rgba(58,140,128,0.13);
    transition: all var(--ease);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--sky-light);
}

.project-accent-bar { height: 5px; }

.card-featured .project-accent-bar {
    background: linear-gradient(90deg, var(--sage), var(--sky), var(--gold-light));
    height: 6px;
}

.project-card:nth-child(2) .project-accent-bar {
    background: linear-gradient(90deg, var(--gold-light), var(--mint));
}

.project-card:nth-child(3) .project-accent-bar {
    background: linear-gradient(90deg, var(--sky-light), var(--sage-pale));
}

.project-content {
    padding: var(--sp-md);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-tags-row {
    display: flex;
    gap: 0.42rem;
    margin-bottom: var(--sp-sm);
    flex-wrap: wrap;
}

.ptag {
    padding: 0.2rem 0.62rem;
    border-radius: var(--r-sm);
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 500;
    text-transform: lowercase;
    letter-spacing: 0.03em;
}

.ptag-green { background: var(--mint);       color: var(--sage-dark); }
.ptag-blue  { background: var(--sky-pale);   color: var(--sage-dark); }
.ptag-gold  { background: var(--gold-pale);  color: #5a4808; }
.ptag-rose  { background: var(--rose-pale);  color: var(--sage-dark); }

.project-card h3 {
    font-family: var(--font-display);
    font-size: 1.12rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.project-card p {
    font-size: 0.87rem;
    color: var(--text-mid);
    line-height: 1.75;
    margin-bottom: var(--sp-sm);
    flex: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.32rem;
    margin-bottom: var(--sp-sm);
}

.project-tech span {
    display: inline-block;
    padding: 0.18rem 0.56rem;
    background: var(--cream);
    color: var(--text-light);
    border-radius: var(--r-sm);
    font-size: 0.68rem;
    font-family: var(--font-mono);
    border: 1px solid var(--sage-pale);
}

.project-links {
    display: flex;
    gap: var(--sp-sm);
    padding-top: var(--sp-sm);
    border-top: 1px solid var(--sage-pale);
    margin-top: auto;
}

.plink {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--sky);
    text-decoration: none;
    transition: color var(--ease);
}

.plink:hover { color: var(--forest); }

.plink-alt {
    color: var(--text-light);
}

.plink-alt:hover { color: var(--text-dark); }

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
    position: relative;
    background: var(--cream);
}

.wave-divider {
    position: relative;
    height: 130px;
    overflow: hidden;
}

.wave-divider svg {
    position: absolute;
    bottom: 0;
    width: 100%; height: 100%;
}

.contact-inner {
    background: var(--forest);
}

.contact-inner .container {
    padding-top: var(--sp-xl);
    padding-bottom: var(--sp-xl);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--sp-xl);
    align-items: center;
}

.contact-botanical {
    opacity: 0.45;
}

.contact-botanical svg {
    width: 100%;
    max-width: 260px;
}

.contact-inner .section-label { color: var(--gold-light); }

.contact-title {
    font-size: clamp(2rem, 4vw, 3rem);
    color: #eef8f6;
    margin: 0.6rem 0 1.4rem;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.contact-title em { color: #60d0e8; font-style: normal; font-weight: 400; }

.contact-text > p {
    color: #96c4c0;
    max-width: 500px;
    margin-bottom: var(--sp-md);
    line-height: 1.85;
    font-size: 0.97rem;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 0.88rem;
    align-items: flex-start;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.72rem 1.4rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(58,140,128,0.3);
    border-radius: var(--r-sm);
    border-left: 2px solid var(--sky);
    color: #aad8d4;
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 400;
    transition: all var(--ease);
    letter-spacing: 0.01em;
}

.contact-btn:hover {
    background: rgba(58,140,128,0.18);
    border-color: var(--sage-light);
    border-left-color: var(--sky-light);
    color: #ddf4f2;
    transform: translateX(6px);
}

.cicon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px; height: 22px;
    flex-shrink: 0;
}

.cicon svg { width: 100%; height: 100%; }

/* Footer */
.footer-bottom {
    text-align: center;
    padding: var(--sp-md);
    border-top: 1px solid rgba(58,140,128,0.2);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.76rem;
    letter-spacing: 0.01em;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes blobPulse {
    0%, 100% { transform: scale(1);    opacity: 0.28; }
    50%       { transform: scale(1.12); opacity: 0.18; }
}

@keyframes blinkDot {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

@keyframes sway {
    0%, 100% { transform: rotate(-6deg); }
    50%       { transform: rotate(6deg);  }
}

@keyframes morphBlob {
    0%,100% { border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%; }
    25%     { border-radius: 58% 42% 30% 70% / 55% 35% 65% 45%; }
    50%     { border-radius: 30% 70% 55% 45% / 65% 45% 55% 35%; }
    75%     { border-radius: 70% 30% 45% 55% / 35% 65% 35% 65%; }
}

@keyframes spin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to   { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes floatBadge {
    0%, 100% { transform: translateY(0px);   }
    50%       { transform: translateY(-10px); }
}

@keyframes scrollPulse {
    0%, 100% { opacity: 1;   transform: scaleY(1);   }
    50%       { opacity: 0.3; transform: scaleY(0.55); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet */
@media (max-width: 1024px) {
    .skills-grid   { grid-template-columns: repeat(2, 1fr); }
    .projects-grid { grid-template-columns: repeat(2, 1fr); }

    .hero-container { gap: var(--sp-lg); }

    .badge-1 { left: -4%; }
    .badge-2 { left: -6%; }
    .badge-3 { right: -4%; }
    .badge-4 { right: -2%; }
}

/* Mobile large */
@media (max-width: 768px) {
    .nav-links li:not(:last-child) { display: none; }
    .nav-actions { padding-left: 0.5rem; }
    .hero-scroll-hint { display: none; }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--sp-lg);
        padding-top: var(--sp-md);
    }

    .hero-text  { order: 2; }
    .hero-visual { order: 1; }

    .hero-eyebrow  { justify-content: center; }
    .hero-tags     { justify-content: center; }
    .hero-cta      { justify-content: center; }
    .hero-tagline  { margin: 0 auto var(--sp-md); }

    .profile-frame { width: 280px; height: 280px; }
    .profile-img   { width: 245px; height: 245px; }
    .ring-1 { width: 280px; height: 280px; }
    .ring-2 { width: 316px; height: 316px; }

    .badge-1 { left: 0; top: 2%;    }
    .badge-2 { left: 0; bottom: 8%; }
    .badge-3 { right: 0; top: 2%;  }
    .badge-4 { right: 0; bottom: 8%; }

    .about-grid    { grid-template-columns: 1fr; gap: var(--sp-lg); }
    .interests-grid { grid-template-columns: 1fr 1fr; }

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

    .timeline::before { left: 18px; }

    .timeline-item {
        grid-template-columns: 1fr;
        padding-left: 48px;
    }

    .timeline-dot { left: 11px; }

    .timeline-meta { text-align: left; padding-top: 0; }

    .timeline-card { margin-left: 0; }

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

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

    .contact-botanical { display: none; }

    .about-stats { flex-wrap: wrap; gap: var(--sp-sm); }
}

/* Mobile small */
@media (max-width: 480px) {
    :root {
        --sp-md: 1.5rem;
        --sp-lg: 3rem;
        --sp-xl: 4.5rem;
        --sp-2xl: 6rem;
    }

    .interests-grid { grid-template-columns: 1fr; }
    .skills-grid    { grid-template-columns: 1fr; }

    .profile-frame  { width: 240px; height: 240px; }
    .profile-img    { width: 210px; height: 210px; }
    .ring-1 { width: 240px; height: 240px; }
    .ring-2 { width: 272px; height: 272px; }

    .hero-name { font-size: 2.8rem; }

    .badge { font-size: 0.7rem; padding: 0.38rem 0.7rem; }

    .dark-mode-btn { margin-left: 0.2rem; }
}

/* ============================================================
   DARK MODE TOGGLE BUTTON
   ============================================================ */
.dark-mode-input {
    position: fixed;
    opacity: 0;
    width: 0; height: 0;
    pointer-events: none;
}

.dark-mode-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    border-radius: var(--r-sm);
    cursor: pointer;
    color: var(--text-mid);
    border: 1.5px solid rgba(58,140,128,0.22);
    transition: all var(--ease);
    flex-shrink: 0;
    background: transparent;
}

.dark-mode-btn:hover {
    background: rgba(58,168,192,0.1);
    border-color: rgba(58,168,192,0.4);
    color: var(--sky);
    transform: scale(1.08);
}

.dm-icon { width: 15px; height: 15px; flex-shrink: 0; }
.dm-moon { display: none; }
.dm-sun  { display: block; }

/* ============================================================
   DARK MODE — CSS Variable overrides via :has()
   ============================================================ */
body:has(#dark-mode-toggle:checked) {
    --cream:       #0c1a26;
    --warm-white:  #0f2234;
    --forest:      #05101a;

    --sage:        #3aaa9a;
    --sage-light:  #2a8a7a;
    --sage-pale:   #0d2a28;
    --sage-dark:   #6ad8cc;
    --mint:        #0d2a28;

    --gold:        #c8b840;
    --gold-light:  #dece40;
    --gold-pale:   #1c1c04;

    --sky:         #30d0f0;
    --sky-light:   #28a8c8;
    --sky-pale:    #061e30;

    --rose:        #40b8d0;
    --rose-pale:   #061820;

    --text-dark:   #d8f0ec;
    --text-mid:    #8ec8c4;
    --text-light:  #5a9898;
    --text-muted:  #2e7878;

    --shadow-sm:   0 2px 8px  rgba(0,0,0,0.4);
    --shadow-md:   0 8px 24px rgba(0,0,0,0.5);
    --shadow-lg:   0 16px 48px rgba(0,0,0,0.6);
}

/* Navbar background */
body:has(#dark-mode-toggle:checked) .navbar {
    background: rgba(8,16,28,0.97);
    border-bottom-color: rgba(58,168,192,0.2);
}

/* Hero grid more visible on dark bg (blueprint feel) */
body:has(#dark-mode-toggle:checked) .hero::before {
    background-image:
        linear-gradient(rgba(58,168,192,0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(58,168,192,0.07) 1px, transparent 1px);
}

/* Profile: subtle cyan glow instead of pale circle */
body:has(#dark-mode-toggle:checked) .profile-img {
    border-color: rgba(48,208,240,0.22);
}
body:has(#dark-mode-toggle:checked) .profile-glow {
    background: radial-gradient(circle, rgba(48,208,240,0.1) 0%, transparent 70%);
}

/* Card borders — more visible on dark surfaces */
body:has(#dark-mode-toggle:checked) .skill-category,
body:has(#dark-mode-toggle:checked) .project-card,
body:has(#dark-mode-toggle:checked) .interest-card {
    border-color: rgba(58,168,192,0.16);
}
body:has(#dark-mode-toggle:checked) .skill-category:hover,
body:has(#dark-mode-toggle:checked) .project-card:hover,
body:has(#dark-mode-toggle:checked) .interest-card:hover {
    border-color: rgba(58,168,192,0.42);
}

/* Timeline */
body:has(#dark-mode-toggle:checked) .timeline-card {
    border-color: rgba(58,168,192,0.16);
}

/* Badge */
body:has(#dark-mode-toggle:checked) .badge {
    border-color: rgba(58,168,192,0.24);
    border-left-color: var(--sky);
}

/* Wave divider — match dark forest bg */
body:has(#dark-mode-toggle:checked) .wave-divider path {
    fill: #05101a;
}

/* Contact botanical slightly more visible */
body:has(#dark-mode-toggle:checked) .contact-botanical {
    opacity: 0.55;
}

/* Contact section text — brighter in dark mode (bg is near-black) */
body:has(#dark-mode-toggle:checked) .contact-title       { color: #d8f4f0; }
body:has(#dark-mode-toggle:checked) .contact-title em    { color: #50d8f0; }
body:has(#dark-mode-toggle:checked) .contact-text > p    { color: #82b8b4; }
body:has(#dark-mode-toggle:checked) .contact-btn         { color: #90ccc8; }
body:has(#dark-mode-toggle:checked) .contact-btn:hover   { color: #cceeed; }

/* Nav actions border in dark mode */
body:has(#dark-mode-toggle:checked) .nav-actions {
    border-left-color: rgba(58,168,192,0.2);
}

/* Dark mode button itself in dark mode */
body:has(#dark-mode-toggle:checked) .dark-mode-btn {
    border-color: rgba(58,168,192,0.3);
    color: var(--sky);
}

/* btn-primary: forest bg + cream text both go dark → use teal instead */
body:has(#dark-mode-toggle:checked) .btn-primary {
    background: var(--sage);
    border-color: var(--sage);
    color: #081420;
}
body:has(#dark-mode-toggle:checked) .btn-primary:hover {
    background: var(--sky);
    border-color: var(--sky);
    color: #081420;
}

/* nav-cta in dark mode */
body:has(#dark-mode-toggle:checked) .nav-cta {
    background: var(--sage) !important;
    color: #081420 !important;
}
body:has(#dark-mode-toggle:checked) .nav-cta:hover {
    background: var(--sky) !important;
}

/* Icon swap: sun ↔ moon */
body:has(#dark-mode-toggle:checked) .dm-sun  { display: none; }
body:has(#dark-mode-toggle:checked) .dm-moon { display: block; }

