/* Cambrian-style dark biotech theme — must load AFTER custom-theme.css */

:root,
html,
html[data-theme="dark"] {
    --bg-primary: #0a1f2e;
    --bg-secondary: #0f2c40;
    --bg-tertiary: #15384f;
    --bg-card: #123347;
    --bg-hover: #1a425c;
    --bg-nav: #0a1f2e;

    --text-primary: #ffffff;
    --text-secondary: #c5d4e0;
    --text-tertiary: #8fa6b8;
    --text-inverse: #0a1f2e;

    --accent-primary: #2ec4a0;
    --accent-secondary: #5eb3ff;
    --accent-hover: #25a888;
    --accent-light: rgba(46, 196, 160, 0.14);
    --accent-gradient: linear-gradient(100deg, #2ec4a0 0%, #3b82f6 100%);

    --border-color: rgba(148, 180, 210, 0.2);
    --border-hover: rgba(148, 180, 210, 0.4);

    --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, serif;
    --font-body: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
    --font-mono: "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, monospace;
}

html[data-theme="light"] {
    --bg-primary: #f4f8fb;
    --bg-secondary: #e8f0f7;
    --bg-tertiary: #d7e5f1;
    --bg-card: #ffffff;
    --bg-hover: #dce8f2;
    --bg-nav: transparent;

    --text-primary: #0a1f2e;
    --text-secondary: #3d556a;
    --text-tertiary: #5f758a;
    --text-inverse: #f4f8fb;

    --accent-primary: #178f76;
    --accent-secondary: #1d6fd8;
    --accent-hover: #127362;
    --accent-light: rgba(23, 143, 118, 0.12);
    --accent-gradient: linear-gradient(100deg, #178f76 0%, #1d6fd8 100%);

    --border-color: rgba(10, 31, 46, 0.12);
    --border-hover: rgba(10, 31, 46, 0.22);
}

html {
    background-color: var(--bg-primary) !important;
}

html, body {
    font-family: var(--font-body) !important;
    background: var(--bg-primary) !important;
    background-attachment: scroll !important;
    color: var(--text-primary) !important;
    letter-spacing: 0.01em;
}

/* Soft atmosphere on a full-viewport layer so it never clips into a banner box */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 70% 55% at 18% 18%, rgba(46, 196, 160, 0.1), transparent 58%),
        radial-gradient(ellipse 65% 50% at 82% 22%, rgba(59, 130, 246, 0.11), transparent 55%);
}

html[data-theme="light"] body::before {
    background:
        radial-gradient(ellipse 70% 55% at 18% 18%, rgba(23, 143, 118, 0.08), transparent 58%),
        radial-gradient(ellipse 65% 50% at 82% 22%, rgba(29, 111, 216, 0.08), transparent 55%);
}

h1, h2, h3, h4, h5, h6,
.hero-title,
.nav-title,
.about-heading,
.post-title,
.greeting-text,
.custom-navbar .nav-title {
    font-family: var(--font-display) !important;
    font-weight: 500 !important;
    letter-spacing: -0.02em !important;
    image-rendering: auto !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background: none !important;
}

.nav-link,
.btn,
.lead,
.hero-subtitle,
.post-excerpt,
.post-meta,
.about-card p,
.custom-footer,
body p,
li {
    font-family: var(--font-body) !important;
}

/* ---------- Full-width single-line header ---------- */
.custom-navbar,
.custom-navbar.custom-navbar {
    position: relative !important;
    top: auto !important;
    width: 100% !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    border: none !important;
    border-bottom: none !important;
    padding: 1.15rem 0 !important;
    z-index: 20;
}

.custom-navbar::after {
    display: none !important;
}

.nav-container {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 clamp(1.25rem, 3.5vw, 3rem) !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: clamp(1rem, 2vw, 2.5rem) !important;
}

.nav-brand {
    flex: 0 0 auto;
    white-space: nowrap;
}

.nav-title,
.custom-navbar .nav-title,
html[data-theme="light"] .custom-navbar .nav-title,
html[data-theme="dark"] .custom-navbar .nav-title {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-size: 1.25rem !important;
    font-weight: 560 !important;
    letter-spacing: -0.03em !important;
    font-family: var(--font-display) !important;
    white-space: nowrap !important;
}

.nav-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    filter: drop-shadow(0 0 10px rgba(46, 196, 160, 0.4));
}

.nav-menu {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-wrap: nowrap !important;
    justify-content: space-evenly !important;
    align-items: center !important;
    gap: 0.5rem !important;
    margin: 0 !important;
    padding: 0 clamp(0.5rem, 2vw, 2rem) !important;
    list-style: none !important;
    min-width: 0;
}

.nav-item {
    flex: 0 0 auto;
    white-space: nowrap;
}

.nav-link,
.custom-navbar .nav-link,
html[data-theme="light"] .custom-navbar .nav-link {
    color: #c5d4e0 !important;
    font-size: clamp(0.82rem, 1.05vw, 0.95rem) !important;
    font-weight: 450 !important;
    letter-spacing: 0.04em !important;
    text-transform: none !important;
    text-decoration: none !important;
    padding: 0.4rem 0.15rem !important;
    border-radius: 0 !important;
    border-bottom: 1px solid transparent !important;
    background: transparent !important;
    font-family: var(--font-body) !important;
    white-space: nowrap !important;
    transition: color 0.25s ease, border-color 0.25s ease;
}

.nav-link:hover,
.nav-link.active,
.custom-navbar .nav-link:hover,
.custom-navbar .nav-link.active,
html[data-theme="light"] .custom-navbar .nav-link.active {
    color: #ffffff !important;
    background: transparent !important;
    border-bottom-color: rgba(46, 196, 160, 0.75) !important;
}

.nav-social {
    display: flex !important;
    flex: 0 0 auto !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 0.75rem !important;
    white-space: nowrap;
}

.social-link,
.custom-navbar .social-link {
    color: #c5d4e0 !important;
}

.social-link:hover {
    color: #ffffff !important;
}

.theme-toggle,
html[data-theme="light"] .theme-toggle {
    color: #c5d4e0 !important;
    border: 1px solid rgba(148, 180, 210, 0.25) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border-radius: 999px !important;
    width: 2.2rem;
    height: 2.2rem;
}

.nav-cv-btn {
    font-family: var(--font-body) !important;
    font-size: 0.9rem !important;
    font-weight: 560 !important;
    letter-spacing: 0.02em !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    background: linear-gradient(100deg, #2ec4a0 0%, #3b82f6 100%) !important;
    border: none !important;
    border-radius: 999px !important;
    padding: 0.55rem 1.2rem !important;
    box-shadow: 0 8px 22px rgba(46, 196, 160, 0.22);
}

.nav-cv-btn:hover,
.nav-cv-btn.active {
    color: #fff !important;
    filter: brightness(1.06);
}

/* ---------- Buttons ---------- */
.btn,
.btn-primary {
    font-family: var(--font-body) !important;
    font-weight: 560 !important;
    border-radius: 999px !important;
    border: none !important;
    background: linear-gradient(100deg, #2ec4a0 0%, #3b82f6 100%) !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    padding: 0.7rem 1.35rem !important;
    box-shadow: 0 10px 24px rgba(46, 196, 160, 0.2);
}

.btn:hover,
.btn-primary:hover {
    color: #fff !important;
    filter: brightness(1.05);
    text-decoration: none;
}

.btn-ghost {
    background: transparent !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border: 1px solid rgba(148, 180, 210, 0.35) !important;
    box-shadow: none !important;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #ffffff !important;
}

/* ---------- Home hero (borderless, full-bleed) ---------- */
.main-content,
.main-content:has(.hero-mesh) {
    max-width: none !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.hero-container,
.hero-container.hero-mesh,
.hero-background,
.hero-container.hero-mesh .hero-background,
.hero-content,
.hero-visual {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.hero-container.hero-mesh {
    display: grid !important;
    grid-template-columns: minmax(280px, 0.85fr) minmax(340px, 1.15fr) !important;
    grid-template-rows: 1fr !important;
    grid-template-areas: "visual copy" !important;
    align-items: center !important;
    gap: clamp(2rem, 6vw, 6rem);
    min-height: calc(100vh - 5rem) !important;
    height: auto !important;
    max-height: none !important;
    width: 100% !important;
    max-width: none !important;
    padding: clamp(2rem, 6vh, 4.5rem) clamp(1.5rem, 5vw, 4.5rem) !important;
    overflow: visible !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* Remove clipped banner layer entirely — page glow lives on body::before */
.hero-background,
.hero-container.hero-mesh .hero-background {
    display: none !important;
    background: none !important;
    border: none !important;
}

.hero-visual {
    grid-area: visual;
    position: relative;
    z-index: 2;
    width: min(480px, 100%);
    aspect-ratio: 1;
    justify-self: center;
    animation: heroFloatIn 0.9s ease-out both;
}

.hero-orbit {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid rgba(160, 190, 180, 0.28);
    box-shadow:
        inset 0 0 40px rgba(46, 196, 160, 0.08),
        0 0 48px rgba(46, 196, 160, 0.12);
    background:
        radial-gradient(circle at 50% 50%, rgba(20, 40, 38, 0.28) 0%, rgba(10, 24, 28, 0.92) 62%, transparent 70%),
        conic-gradient(from 210deg, rgba(46, 196, 160, 0.16), transparent 40%, rgba(120, 170, 150, 0.12), transparent 72%, rgba(46, 196, 160, 0.12));
    animation: orbitPulse 7s ease-in-out infinite;
}

.hero-orbit::before,
.hero-orbit::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(160, 190, 180, 0.2);
    inset: 12%;
}

.hero-orbit::after {
    inset: 24%;
    border-color: rgba(46, 196, 160, 0.3);
}

.hero-orbit-track {
    --phase: 0deg;
    --spin: 20s;
    --dir: 1;
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: heroOrbitSpin var(--spin) linear infinite;
}

.hero-orbit-track--outer {
    inset: 0;
}

.hero-orbit-track--mid {
    inset: 12%;
}

.hero-orbit-track--inner {
    inset: 24%;
}

.hero-orbit-ball {
    position: absolute;
    top: 0;
    left: 50%;
    width: 0.55rem;
    height: 0.55rem;
    margin: -0.275rem 0 0 -0.275rem;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #b8ffe8 0%, #2ec4a0 55%, #178f76 100%);
    box-shadow:
        0 0 10px rgba(46, 196, 160, 0.75),
        0 0 18px rgba(46, 196, 160, 0.35);
}

.hero-orbit-ball--soft {
    width: 0.4rem;
    height: 0.4rem;
    margin: -0.2rem 0 0 -0.2rem;
    opacity: 0.72;
    box-shadow:
        0 0 8px rgba(94, 179, 255, 0.45),
        0 0 14px rgba(46, 196, 160, 0.25);
    background: radial-gradient(circle at 35% 30%, #d7ecff 0%, #5eb3ff 50%, #2ec4a0 100%);
}

.hero-orbit-ball--bright {
    width: 0.62rem;
    height: 0.62rem;
    margin: -0.31rem 0 0 -0.31rem;
    box-shadow:
        0 0 12px rgba(46, 196, 160, 0.9),
        0 0 22px rgba(46, 196, 160, 0.4);
}

.hero-orbit-core {
    position: absolute;
    inset: 32%;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 40% 35%, rgba(120, 210, 180, 0.28), transparent 45%),
        radial-gradient(circle at 60% 65%, rgba(46, 196, 160, 0.32), transparent 50%),
        rgba(10, 28, 30, 0.95);
    box-shadow: 0 0 36px rgba(46, 196, 160, 0.28);
}

.hero-orbit-core img {
    width: 58%;
    height: auto;
    filter: drop-shadow(0 0 10px rgba(46, 196, 160, 0.4));
}

.hero-container.hero-mesh .hero-content {
    grid-area: copy !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    z-index: 3;
    width: auto !important;
    max-width: min(44rem, 100%) !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    animation: heroCopyIn 0.85s ease-out 0.12s both;
}

.hero-brand {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-title,
.hero-container.hero-mesh .hero-title,
h1.hero-title {
    color: var(--text-primary) !important;
    -webkit-text-fill-color: var(--text-primary) !important;
    background: none !important;
    font-family: var(--font-display) !important;
    font-size: clamp(2.4rem, 5.2vw, 4.2rem) !important;
    font-weight: 500 !important;
    line-height: 1.12 !important;
    letter-spacing: -0.03em !important;
    margin: 0 0 1rem 0 !important;
    text-shadow: none !important;
}

.hero-subtitle,
.hero-container.hero-mesh .hero-subtitle {
    color: var(--text-secondary) !important;
    font-size: clamp(1.05rem, 1.6vw, 1.2rem) !important;
    line-height: 1.65;
    max-width: 34ch;
    margin: 0;
}

.hero-container.hero-mesh .cta-row {
    margin-top: 1.75rem;
}

.hero-container.hero-mesh .hero-logo,
.hero-container.hero-mesh .typewriter-container {
    display: none !important;
}

.home-code-band {
    width: 100% !important;
    max-width: none !important;
    margin: 0 0 4.5rem !important;
    padding: 0 clamp(1.5rem, 6vw, 5rem) !important;
    background: transparent !important;
    border: none !important;
}

.home-code-band .typewriter-container {
    position: relative !important;
    opacity: 1 !important;
    pointer-events: auto;
    width: 100% !important;
    max-width: none !important;
}

.home-code-band .typewriter-code,
.home-code-band .typewriter-code code,
.home-code-band .typewriter-code * {
    font-family: var(--font-mono) !important;
    font-size: clamp(0.88rem, 1.15vw, 1.05rem) !important;
    color: #9fe8d2 !important;
    -webkit-text-fill-color: #9fe8d2 !important;
}

.home-code-band .typewriter-code {
    width: 100% !important;
    max-width: none !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    padding: 1.25rem 0 0.5rem !important;
    opacity: 0.88 !important;
}

.home-code-band .glow-text {
    color: #7dd3fc !important;
    -webkit-text-fill-color: #7dd3fc !important;
    text-shadow: 0 0 18px rgba(125, 211, 252, 0.55);
}

@keyframes heroFloatIn {
    from { opacity: 0; transform: translateY(18px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

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

@keyframes orbitPulse {
    0%, 100% { transform: scale(1); filter: saturate(1); }
    50% { transform: scale(1.025); filter: saturate(1.12); }
}

@keyframes heroOrbitSpin {
    from { transform: rotate(var(--phase, 0deg)); }
    to { transform: rotate(calc(var(--phase, 0deg) + (360deg * var(--dir, 1)))); }
}

@media (prefers-reduced-motion: reduce) {
    .hero-orbit-track {
        animation: none;
        transform: rotate(var(--phase, 0deg));
    }
}

/* ---------- Content pages ---------- */
.main-content {
    min-height: 60vh;
    max-width: none !important;
    width: 100% !important;
    background: transparent !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: none !important;
}

.content-container {
    max-width: min(1480px, 94vw) !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: clamp(1.25rem, 3vw, 2.5rem) !important;
    padding-right: clamp(1.25rem, 3vw, 2.5rem) !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.content-container > h1,
.about-heading,
.post-header .post-title,
.content-container h1,
.content-container h2,
.content-container h3 {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-family: var(--font-display) !important;
}

.content-container > h1,
.about-heading,
.post-header .post-title {
    font-size: clamp(2.2rem, 4vw, 3.2rem) !important;
}

.lead,
.post-excerpt,
.post-content,
.about-card p,
.about-portfolio-item p {
    color: #c5d4e0 !important;
}

.main-content strong,
.main-content b,
.post-card strong,
.post-card b,
strong, b {
    color: #2ec4a0 !important;
    -webkit-text-fill-color: #2ec4a0 !important;
}

.post-card,
.about-card,
.about-portfolio-item {
    background: linear-gradient(180deg, rgba(18, 48, 73, 0.85), rgba(10, 34, 52, 0.95)) !important;
    border: 1px solid rgba(148, 180, 210, 0.2) !important;
    border-radius: 14px !important;
    box-shadow: 0 8px 24px rgba(2, 12, 24, 0.28);
}

.post-card {
    padding: 1.5rem 1.6rem;
    margin-bottom: 1.25rem;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.post-card:hover {
    transform: translateY(-3px);
    border-color: rgba(148, 180, 210, 0.4) !important;
}

.post-card .post-title,
.post-card .post-title a {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    text-decoration: none;
}

.post-card .post-title a:hover {
    color: #2ec4a0 !important;
    -webkit-text-fill-color: #2ec4a0 !important;
}

.about-card h3,
.about-portfolio-type,
.post-date,
.post-category,
.tag-pill {
    color: #2ec4a0 !important;
    -webkit-text-fill-color: #2ec4a0 !important;
}

.tag-pill {
    background: rgba(46, 196, 160, 0.12) !important;
    border: 1px solid rgba(46, 196, 160, 0.28);
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
    font-size: 0.8rem;
}

.research-immersive-wrap.is-active {
    background: #040408;
}

/* ---------- Footer ---------- */
.custom-footer {
    margin-top: 3rem;
    padding: 2.5rem 0 2rem;
    border-top: 1px solid rgba(148, 180, 210, 0.14);
    background: #0a1f2e !important;
}

.footer-content {
    max-width: none;
    width: 100%;
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 3.5vw, 3rem);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: baseline;
}

.custom-footer p {
    color: #8fa6b8 !important;
    font-size: 0.9rem;
    margin: 0;
}

.custom-footer p:first-child {
    color: #c5d4e0 !important;
    font-weight: 550;
}

mjx-container,
mjx-container[jax="CHTML"] {
    color: #5eb3ff !important;
}

@media (max-width: 900px) {
    .hero-container.hero-mesh {
        grid-template-columns: 1fr !important;
        grid-template-areas:
            "visual"
            "copy" !important;
        min-height: auto !important;
        padding-top: 1.5rem !important;
        padding-bottom: 2.5rem !important;
        text-align: center;
    }

    .hero-visual {
        width: min(300px, 78vw);
    }

    .hero-container.hero-mesh .hero-content {
        justify-self: center;
        max-width: 36rem;
    }

    .hero-container.hero-mesh .hero-subtitle {
        max-width: none;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-container.hero-mesh .cta-row {
        justify-content: center;
    }

    .nav-container {
        flex-wrap: nowrap !important;
        gap: 0.65rem !important;
        padding: 0 1rem !important;
    }

    .nav-title {
        font-size: 1.05rem !important;
    }

    .nav-menu {
        flex: 1 1 auto !important;
        justify-content: space-evenly !important;
        flex-wrap: nowrap !important;
        gap: 0.2rem !important;
        padding: 0 0.25rem !important;
        order: 0 !important;
        width: auto !important;
    }

    .nav-link {
        font-size: 0.72rem !important;
        letter-spacing: 0.01em !important;
        padding: 0.25rem 0 !important;
    }

    .nav-social .social-link {
        display: none;
    }

    .footer-content {
        flex-direction: column;
        gap: 0.35rem;
    }
}

/* ---------- About page (Cambrian dark) ---------- */
.about-landing {
    max-width: min(1480px, 94vw) !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0 clamp(0.5rem, 1vw, 1rem) 2.5rem !important;
}

.main-content:has(.about-landing) {
    padding-top: 0.5rem !important;
}

.main-content:has(.about-landing) .about-hero::before {
    display: none !important;
    content: none !important;
}

.about-hero {
    position: relative;
    margin: 0 auto 3.5rem !important;
    padding: clamp(2rem, 5vh, 3.25rem) 0 clamp(2.5rem, 5vh, 3.5rem) !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.about-hero-inner {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: clamp(1.75rem, 4vw, 3.25rem) !important;
    max-width: min(920px, 100%) !important;
    margin: 0 auto !important;
    text-align: left;
}

.about-hero-photo {
    width: clamp(168px, 18vw, 220px) !important;
    height: clamp(168px, 18vw, 220px) !important;
    border-radius: 50% !important;
    object-fit: cover;
    object-position: center top;
    border: 2px solid rgba(94, 179, 255, 0.45) !important;
    box-shadow:
        0 0 0 8px rgba(46, 196, 160, 0.1),
        0 0 40px rgba(59, 130, 246, 0.18),
        0 18px 36px rgba(2, 12, 24, 0.35) !important;
    flex-shrink: 0 !important;
    order: 0 !important;
}

.about-hero-text {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: 34rem !important;
    text-align: left !important;
}

.about-hero-name,
.about-hero-name.greeting-text {
    font-family: var(--font-display) !important;
    font-size: clamp(2.2rem, 4.2vw, 3.15rem) !important;
    font-weight: 520 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    line-height: 1.08 !important;
    letter-spacing: -0.03em !important;
    margin: 0 0 0.55rem 0 !important;
}

.about-hero-role {
    font-family: var(--font-body) !important;
    font-size: clamp(1rem, 1.4vw, 1.15rem) !important;
    font-weight: 600 !important;
    color: #2ec4a0 !important;
    -webkit-text-fill-color: #2ec4a0 !important;
    margin: 0 0 0.45rem 0 !important;
    letter-spacing: 0.01em;
}

.about-hero-tagline {
    font-family: var(--font-body) !important;
    font-size: 0.95rem !important;
    font-style: normal !important;
    font-weight: 450 !important;
    color: #8fa6b8 !important;
    letter-spacing: 0.03em;
    margin: 0 0 1.15rem 0 !important;
    padding-bottom: 1.1rem !important;
    border-bottom: 1px solid rgba(148, 180, 210, 0.18);
}

.about-hero-lead {
    color: #c5d4e0 !important;
    font-size: 1.05rem !important;
    line-height: 1.72 !important;
    max-width: 42ch;
    margin: 0 0 1.35rem 0 !important;
}

.about-hero-cta {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.7rem !important;
    justify-content: flex-start !important;
}

.about-heading {
    font-family: var(--font-display) !important;
    font-size: clamp(1.85rem, 3.4vw, 2.55rem) !important;
    font-weight: 500 !important;
    letter-spacing: -0.02em !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    text-align: left !important;
    border: none !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
    margin: 0 0 0.85rem 0 !important;
    line-height: 1.15 !important;
}

.about-block {
    margin-bottom: 3rem !important;
    scroll-margin-top: 1.5rem;
}

.about-intro,
.about-prose p,
.about-contact p {
    color: #c5d4e0 !important;
    font-size: 1.02rem !important;
    line-height: 1.7 !important;
}

.about-prose a,
.about-intro a,
.about-more a,
.about-portfolio-item a,
.about-landing a:not(.btn) {
    color: #5eb3ff !important;
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
}

.about-stat {
    background: linear-gradient(180deg, rgba(18, 48, 73, 0.9), rgba(10, 34, 52, 0.98)) !important;
    border: 1px solid rgba(148, 180, 210, 0.22) !important;
    border-radius: 14px !important;
    box-shadow: none !important;
    padding: 1.2rem 0.9rem !important;
    text-align: center;
}

.about-stat-value {
    display: block;
    font-family: var(--font-display) !important;
    font-size: 2.1rem !important;
    font-weight: 560 !important;
    color: #2ec4a0 !important;
    -webkit-text-fill-color: #2ec4a0 !important;
    background: none !important;
    border: none !important;
    margin-bottom: 0.35rem;
}

.about-stat-label {
    color: #ffffff !important;
    font-size: 0.92rem !important;
    font-weight: 600 !important;
}

.about-stat-note {
    color: #8fa6b8 !important;
    font-size: 0.78rem !important;
}

.about-cards,
.about-steps {
    gap: 0.9rem;
}

.about-card,
.about-step,
.about-portfolio-item,
.cv-beyond-item,
.about-faq details,
.about-skills.cv-expertise details,
.cv-expertise details {
    background: linear-gradient(180deg, rgba(18, 48, 73, 0.88), rgba(10, 34, 52, 0.96)) !important;
    border: 1px solid rgba(148, 180, 210, 0.2) !important;
    border-radius: 14px !important;
    box-shadow: none !important;
    color: #c5d4e0 !important;
}

.about-card {
    padding: 1.2rem 1.25rem !important;
}

.about-card h3,
.about-step h3,
.about-portfolio-item h3 {
    font-family: var(--font-display) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-size: 1.15rem !important;
    font-weight: 550 !important;
    margin: 0 0 0.45rem 0 !important;
}

.about-card p,
.about-step p,
.about-portfolio-item p,
.cv-beyond-item,
.cv-detail-body,
.cv-detail-body p,
.cv-detail-body li {
    color: #c5d4e0 !important;
    line-height: 1.6;
}

.about-portfolio-type {
    color: #2ec4a0 !important;
    -webkit-text-fill-color: #2ec4a0 !important;
    font-weight: 600 !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.78rem !important;
}

.about-portfolio-item {
    padding: 1.35rem 1.4rem !important;
}

.about-portfolio-item strong {
    color: #9fe8d2 !important;
    -webkit-text-fill-color: #9fe8d2 !important;
}

.about-step-num {
    background: rgba(46, 196, 160, 0.16) !important;
    color: #2ec4a0 !important;
    border: 1px solid rgba(46, 196, 160, 0.3);
}

.cv-beyond {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem !important;
}

.cv-beyond-item {
    padding: 1.15rem 1.2rem !important;
    line-height: 1.55 !important;
}

.cv-beyond-item i {
    color: #5eb3ff !important;
    margin-right: 0.45rem;
}

.cv-beyond-item strong {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

.about-faq details,
.about-skills.cv-expertise details,
.cv-expertise details {
    margin-bottom: 0.75rem;
    padding: 0.15rem 0.15rem;
}

.cv-expertise summary {
    color: #ffffff !important;
    font-family: var(--font-body) !important;
    font-weight: 560 !important;
    padding: 0.95rem 1.1rem;
    cursor: pointer;
    list-style: none;
}

.cv-expertise summary::-webkit-details-marker {
    display: none;
}

.cv-detail-body {
    padding: 0 1.1rem 1.05rem;
}

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

/* Footer — always match dark navy */
.custom-footer,
.post-footer,
[data-theme="dark"] .custom-footer,
[data-theme="light"] .custom-footer {
    background: #0a1f2e !important;
    border-top: 1px solid rgba(148, 180, 210, 0.14) !important;
    color: #8fa6b8 !important;
    padding: 2rem 0 !important;
    margin-top: 2.5rem !important;
}

.custom-footer p,
.custom-footer a,
[data-theme="dark"] .custom-footer .footer-content p,
[data-theme="dark"] .custom-footer .footer-content a,
[data-theme="light"] .custom-footer .footer-content p {
    color: #8fa6b8 !important;
    font-weight: 450 !important;
}

.custom-footer p:first-child {
    color: #c5d4e0 !important;
}

@media (max-width: 900px) {
    .about-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cv-beyond {
        grid-template-columns: 1fr;
    }

    .about-hero-inner {
        flex-direction: column !important;
        text-align: center !important;
        gap: 1.5rem !important;
    }

    .about-hero-text {
        text-align: center !important;
        max-width: 36rem !important;
    }

    .about-hero-tagline {
        border-bottom-color: rgba(148, 180, 210, 0.14);
    }

    .about-hero-lead {
        max-width: none;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .about-hero-cta {
        justify-content: center !important;
    }
}

@media (max-width: 520px) {
    .about-stats {
        grid-template-columns: 1fr;
    }
}

/* ---------- CV page (document layout, no heavy boxes) ---------- */
.content-container.cv-page,
.cv-page {
    max-width: min(1100px, 94vw) !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 1.5rem clamp(1rem, 3vw, 2rem) 3rem !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.cv-page .cv-header,
.cv-page .about-profile-section.cv-header {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: clamp(1.5rem, 3.5vw, 2.75rem) !important;
    margin: 0 auto 3rem !important;
    max-width: min(920px, 100%) !important;
}

.cv-page .profile-image-wrapper {
    margin-top: 0 !important;
    flex-shrink: 0 !important;
}

.cv-page .profile-image-wrapper img,
.cv-page .cv-header img {
    width: clamp(140px, 16vw, 190px) !important;
    height: clamp(140px, 16vw, 190px) !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    object-position: center top !important;
    border: 2px solid rgba(94, 179, 255, 0.45) !important;
    box-shadow:
        0 0 0 8px rgba(46, 196, 160, 0.1),
        0 0 36px rgba(59, 130, 246, 0.16) !important;
}

.cv-page .profile-text {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: 34rem !important;
}

.cv-page .cv-name,
.cv-page .cv-name.greeting-text {
    font-family: var(--font-display) !important;
    font-size: clamp(2rem, 4vw, 2.85rem) !important;
    font-weight: 520 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    letter-spacing: -0.03em !important;
    line-height: 1.1 !important;
    margin: 0 0 0.55rem 0 !important;
}

.cv-page .cv-tagline {
    font-family: var(--font-body) !important;
    font-size: 1.02rem !important;
    color: #2ec4a0 !important;
    -webkit-text-fill-color: #2ec4a0 !important;
    margin: 0 0 0.85rem 0 !important;
    line-height: 1.45 !important;
}

.cv-page .cv-contact {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.85rem 1.25rem !important;
}

.cv-page .cv-contact a {
    color: #5eb3ff !important;
    text-decoration: none !important;
    border-bottom: 1px solid rgba(94, 179, 255, 0.35);
    padding-bottom: 0.1rem;
}

.cv-page .cv-contact a:hover {
    color: #9fe8d2 !important;
    border-bottom-color: rgba(46, 196, 160, 0.55);
}

.cv-page .cv-section {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 0 2rem 0 !important;
    margin: 0 0 2rem 0 !important;
    border-bottom: 1px solid rgba(148, 180, 210, 0.14) !important;
}

.cv-page .cv-section:last-of-type {
    border-bottom: none !important;
    margin-bottom: 0 !important;
}

.cv-page .cv-section h2 {
    font-family: var(--font-display) !important;
    font-size: clamp(1.55rem, 2.8vw, 2rem) !important;
    font-weight: 500 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    text-align: left !important;
    margin: 0 0 1.1rem 0 !important;
    padding: 0 0 0.65rem 0 !important;
    border-bottom: 1px solid rgba(148, 180, 210, 0.18) !important;
    letter-spacing: -0.02em !important;
}

.cv-page .cv-section p,
.cv-page .cv-section li {
    color: #c5d4e0 !important;
    line-height: 1.7 !important;
}

.cv-page .cv-section a {
    color: #5eb3ff !important;
}

.cv-page .cv-expertise details {
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid rgba(148, 180, 210, 0.12) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.cv-page .cv-expertise details:last-child {
    border-bottom: none !important;
}

.cv-page .cv-expertise summary {
    color: #ffffff !important;
    font-weight: 560 !important;
    padding: 0.95rem 0 !important;
    background: transparent !important;
}

.cv-page .cv-expertise .cv-detail-body {
    color: #c5d4e0 !important;
    padding: 0 0 1rem 0 !important;
    background: transparent !important;
}

.cv-page .cv-role {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 0 1.75rem 0 !important;
    padding: 0 0 1.5rem 0 !important;
    border-bottom: 1px solid rgba(148, 180, 210, 0.12) !important;
}

.cv-page .cv-role:last-child {
    border-bottom: none !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.cv-page .cv-role h3 {
    font-family: var(--font-display) !important;
    font-size: 1.2rem !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-weight: 550 !important;
    margin: 0 0 0.35rem 0 !important;
}

.cv-page .cv-role-meta {
    color: #2ec4a0 !important;
    -webkit-text-fill-color: #2ec4a0 !important;
    font-size: 0.95rem !important;
    margin-bottom: 0.7rem !important;
}

.cv-page .cv-role-meta strong {
    color: #9fe8d2 !important;
    -webkit-text-fill-color: #9fe8d2 !important;
}

.cv-page .cv-tech {
    color: #8fa6b8 !important;
    margin-top: 0.85rem !important;
}

.cv-page .cv-tech strong {
    color: #2ec4a0 !important;
    -webkit-text-fill-color: #2ec4a0 !important;
}

.cv-page .cv-event,
.cv-page .cv-education-item {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.cv-page .cv-skill-tag {
    background: rgba(46, 196, 160, 0.1) !important;
    border: 1px solid rgba(46, 196, 160, 0.25) !important;
    color: #2ec4a0 !important;
    border-radius: 999px !important;
}

@media (max-width: 760px) {
    .cv-page .cv-header,
    .cv-page .about-profile-section.cv-header {
        flex-direction: column !important;
        text-align: center !important;
    }

    .cv-page .profile-text {
        max-width: 36rem !important;
    }

    .cv-page .cv-contact {
        justify-content: center !important;
    }
}

/* ---------- Light mode: navy ↔ white swap ---------- */
html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] h4,
html[data-theme="light"] .hero-title,
html[data-theme="light"] .hero-container.hero-mesh .hero-title,
html[data-theme="light"] h1.hero-title,
html[data-theme="light"] .nav-title,
html[data-theme="light"] .about-heading,
html[data-theme="light"] .post-title,
html[data-theme="light"] .greeting-text,
html[data-theme="light"] .custom-navbar .nav-title,
html[data-theme="light"] .about-hero-name,
html[data-theme="light"] .about-hero-name.greeting-text,
html[data-theme="light"] .cv-page .cv-name,
html[data-theme="light"] .cv-page .cv-name.greeting-text,
html[data-theme="light"] .cv-page .cv-section h2,
html[data-theme="light"] .cv-page .cv-role h3,
html[data-theme="light"] .cv-page .cv-expertise summary,
html[data-theme="light"] .content-container > h1,
html[data-theme="light"] .content-container h1,
html[data-theme="light"] .content-container h2,
html[data-theme="light"] .content-container h3,
html[data-theme="light"] .post-card .post-title,
html[data-theme="light"] .post-card .post-title a,
html[data-theme="light"] .about-card h3,
html[data-theme="light"] .about-step h3,
html[data-theme="light"] .about-portfolio-item h3,
html[data-theme="light"] .hero-brand,
html[data-theme="light"] .hero-container.hero-mesh .hero-brand {
    color: #0a1f2e !important;
    -webkit-text-fill-color: #0a1f2e !important;
}

/* Light mode: softer, less-blue orbit */
html[data-theme="light"] .hero-orbit {
    border-color: rgba(10, 31, 46, 0.14) !important;
    box-shadow:
        inset 0 0 28px rgba(23, 143, 118, 0.06),
        0 0 28px rgba(10, 31, 46, 0.08) !important;
    background:
        radial-gradient(circle at 50% 50%, rgba(232, 240, 247, 0.85) 0%, rgba(244, 248, 251, 0.95) 58%, transparent 72%),
        conic-gradient(from 210deg, rgba(23, 143, 118, 0.14), transparent 42%, rgba(10, 31, 46, 0.06), transparent 74%, rgba(23, 143, 118, 0.1)) !important;
}

html[data-theme="light"] .hero-orbit::before,
html[data-theme="light"] .hero-orbit::after {
    border-color: rgba(10, 31, 46, 0.12) !important;
}

html[data-theme="light"] .hero-orbit::after {
    border-color: rgba(23, 143, 118, 0.28) !important;
}

html[data-theme="light"] .hero-orbit-core {
    background:
        radial-gradient(circle at 40% 35%, rgba(23, 143, 118, 0.18), transparent 45%),
        radial-gradient(circle at 60% 65%, rgba(23, 143, 118, 0.2), transparent 50%),
        #e8f0f7 !important;
    box-shadow: 0 0 24px rgba(23, 143, 118, 0.16) !important;
}

html[data-theme="light"] .hero-orbit-core img {
    filter: drop-shadow(0 0 8px rgba(23, 143, 118, 0.25)) !important;
}

html[data-theme="light"] .hero-orbit-ball {
    background: radial-gradient(circle at 35% 30%, #e8fff6 0%, #178f76 55%, #0a5c4c 100%);
    box-shadow:
        0 0 8px rgba(23, 143, 118, 0.55),
        0 0 14px rgba(23, 143, 118, 0.28);
}

html[data-theme="light"] .hero-orbit-ball--soft {
    background: radial-gradient(circle at 35% 30%, #eef6ff 0%, #5a9fd4 50%, #178f76 100%);
    box-shadow:
        0 0 6px rgba(90, 159, 212, 0.4),
        0 0 10px rgba(23, 143, 118, 0.2);
}

html[data-theme="light"] .nav-link,
html[data-theme="light"] .custom-navbar .nav-link,
html[data-theme="light"] .social-link,
html[data-theme="light"] .custom-navbar .social-link,
html[data-theme="light"] .theme-toggle,
html[data-theme="light"] .hero-subtitle,
html[data-theme="light"] .about-hero-tagline,
html[data-theme="light"] .about-hero-lead,
html[data-theme="light"] .about-intro,
html[data-theme="light"] .about-prose p,
html[data-theme="light"] .about-contact p,
html[data-theme="light"] .about-card p,
html[data-theme="light"] .about-step p,
html[data-theme="light"] .about-portfolio-item p,
html[data-theme="light"] .cv-beyond-item,
html[data-theme="light"] .cv-detail-body,
html[data-theme="light"] .cv-page .cv-section p,
html[data-theme="light"] .cv-page .cv-section li,
html[data-theme="light"] .cv-page .cv-expertise .cv-detail-body,
html[data-theme="light"] .cv-page .cv-tech,
html[data-theme="light"] .lead,
html[data-theme="light"] .post-excerpt,
html[data-theme="light"] .custom-footer p {
    color: var(--text-secondary) !important;
    -webkit-text-fill-color: var(--text-secondary) !important;
}

html[data-theme="light"] .nav-link:hover,
html[data-theme="light"] .nav-link.active,
html[data-theme="light"] .custom-navbar .nav-link:hover,
html[data-theme="light"] .custom-navbar .nav-link.active,
html[data-theme="light"] .social-link:hover,
html[data-theme="light"] .custom-footer p:first-child,
html[data-theme="light"] .about-stat-label,
html[data-theme="light"] .cv-beyond-item strong {
    color: var(--text-primary) !important;
    -webkit-text-fill-color: var(--text-primary) !important;
}

html[data-theme="light"] .about-hero-role,
html[data-theme="light"] .about-stat-value,
html[data-theme="light"] .about-card h3,
html[data-theme="light"] .about-portfolio-type,
html[data-theme="light"] .cv-page .cv-tagline,
html[data-theme="light"] .cv-page .cv-role-meta,
html[data-theme="light"] .cv-page .cv-tech strong,
html[data-theme="light"] .tag-pill,
html[data-theme="light"] .post-date {
    color: var(--accent-primary) !important;
    -webkit-text-fill-color: var(--accent-primary) !important;
}

html[data-theme="light"] .theme-toggle {
    border-color: var(--border-color) !important;
    background: rgba(10, 31, 46, 0.04) !important;
}

html[data-theme="light"] .btn-ghost {
    color: var(--text-primary) !important;
    -webkit-text-fill-color: var(--text-primary) !important;
    border-color: var(--border-hover) !important;
    background: transparent !important;
}

html[data-theme="light"] .btn-ghost:hover {
    background: rgba(10, 31, 46, 0.05) !important;
}

html[data-theme="light"] .custom-footer,
html[data-theme="light"] .post-footer,
html[data-theme="light"][data-theme="light"] .custom-footer {
    background: var(--bg-primary) !important;
    border-top-color: var(--border-color) !important;
}

html[data-theme="light"] .post-card,
html[data-theme="light"] .about-card,
html[data-theme="light"] .about-portfolio-item,
html[data-theme="light"] .about-stat,
html[data-theme="light"] .about-step,
html[data-theme="light"] .cv-beyond-item {
    background: #ffffff !important;
    border-color: var(--border-color) !important;
    box-shadow: var(--shadow-sm) !important;
}

html[data-theme="light"] .home-code-band .typewriter-code,
html[data-theme="light"] .home-code-band .typewriter-code code,
html[data-theme="light"] .home-code-band .typewriter-code * {
    color: #0f6b58 !important;
    -webkit-text-fill-color: #0f6b58 !important;
}

html[data-theme="light"] .home-code-band .glow-text {
    color: #1d6fd8 !important;
    -webkit-text-fill-color: #1d6fd8 !important;
}

html[data-theme="light"] .main-content strong,
html[data-theme="light"] .main-content b,
html[data-theme="light"] strong,
html[data-theme="light"] b {
    color: var(--accent-primary) !important;
    -webkit-text-fill-color: var(--accent-primary) !important;
}

html[data-theme="light"] .about-prose a,
html[data-theme="light"] .about-intro a,
html[data-theme="light"] .about-more a,
html[data-theme="light"] .about-portfolio-item a,
html[data-theme="light"] .cv-page .cv-section a,
html[data-theme="light"] .cv-page .cv-contact a {
    color: var(--accent-secondary) !important;
}
