* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #fcfcfb;
    --surface: #ffffff;
    --surface-subtle: #f5f5f3;
    --text: #171716;
    --muted: #6d6c68;
    --line: #e7e6e2;
    --accent: #155eef;
    --accent-strong: #004eeb;
    --accent-soft: #eaf0ff;
    --status-bg: #fff5d8;
    --status-text: #9b6200;
    --shadow: 0 18px 45px rgba(24, 24, 22, 0.08);
    --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --sidebar-width: 17.5rem;
}

html[data-theme="dark"] {
    --bg: #101110;
    --surface: #171817;
    --surface-subtle: #20211f;
    --text: #f4f4f0;
    --muted: #aaa9a3;
    --line: #2c2d2a;
    --accent: #7ca4ff;
    --accent-strong: #a8c1ff;
    --accent-soft: #1d2b4a;
    --status-bg: #372b12;
    --status-text: #ffd270;
    --shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
}

html {
    background: var(--bg);
    color: var(--text);
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin-left: var(--sidebar-width);
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    letter-spacing: -0.01em;
    transition: background-color 180ms ease, color 180ms ease;
}

a,
button,
input,
textarea {
    -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent);
    outline-offset: 3px;
}

nav {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 10;
    width: var(--sidebar-width);
    padding: 2rem;
    background: var(--bg);
    border-right: 1px solid var(--line);
}

nav .container {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-width: none;
    padding: 0;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    width: fit-content;
    margin-bottom: 3.5rem;
    color: var(--text);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.035em;
    text-decoration: none;
}

.logo img {
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.35rem;
    list-style: none;
}

.nav-links a {
    display: block;
    padding: 0.6rem 0.75rem;
    border-radius: 0.55rem;
    color: var(--muted);
    font-size: 0.94rem;
    font-weight: 540;
    text-decoration: none;
    transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-links a:hover {
    color: var(--text);
    background: var(--surface-subtle);
}

.nav-links a.active {
    color: var(--accent);
    background: var(--accent-soft);
}

/* Menu toggle button — hidden on desktop, shown on smaller screens */
.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.6rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: 0.55rem;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 650;
    cursor: pointer;
    transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.nav-toggle-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.nav-toggle-close {
    display: none;
}

.nav-toggle.nav-open .nav-toggle-open {
    display: none;
}

.nav-toggle.nav-open .nav-toggle-close {
    display: block;
}

.nav-toggle-label {
    line-height: 1;
}

.container {
    width: min(100%, 70rem);
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 4vw, 3.5rem);
}

.page-content {
    position: relative;
    z-index: 1;
    display: none;
    min-height: calc(100vh - 8.5rem);
    padding: clamp(4rem, 8vw, 7rem) 0;
    animation: page-in 280ms ease both;
}

.page-content.active {
    display: block;
}

@keyframes page-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.eyebrow {
    margin: 0;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 750;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ==========================================================================
   Global ambient background system
   ========================================================================== */
.site-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.site-orb,
.site-geo {
    position: absolute;
    will-change: transform;
    transform: translateZ(0);
}

.site-orb {
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.5;
}

.site-orb-a {
    top: -6rem;
    right: -8rem;
    width: 26rem;
    height: 26rem;
    background: color-mix(in srgb, var(--accent) 22%, transparent);
    animation: site-orb-a 26s ease-in-out infinite alternate;
}

.site-orb-b {
    top: 34rem;
    left: -10rem;
    width: 22rem;
    height: 22rem;
    background: color-mix(in srgb, #c084fc 16%, transparent);
    animation: site-orb-b 32s ease-in-out infinite alternate;
}

.site-geo {
    border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
    background: color-mix(in srgb, var(--accent) 7%, transparent);
    opacity: 0.55;
}

.site-geo-a {
    top: 16rem;
    left: 32%;
    width: 7rem;
    height: 7rem;
    transform: rotate(14deg);
    animation: site-geo-a 38s ease-in-out infinite alternate;
}

.site-geo-b {
    top: 46rem;
    right: 6%;
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 2rem 2rem 2rem 0.4rem;
    transform: rotate(-18deg);
    animation: site-geo-b 30s ease-in-out infinite alternate;
}

@keyframes site-geo-a {
    from {
        transform: translate3d(0, 0, 0) rotate(14deg);
    }

    to {
        transform: translate3d(2rem, -2.5rem, 0) rotate(24deg);
    }
}

@keyframes site-geo-b {
    from {
        transform: translate3d(0, 0, 0) rotate(-18deg);
    }

    to {
        transform: translate3d(-2rem, 2rem, 0) rotate(-28deg);
    }
}

@keyframes site-orb-a {
    from {
        transform: translate3d(0, 0, 0) scale(1);
    }

    to {
        transform: translate3d(-1.5rem, 2rem, 0) scale(1.08);
    }
}

@keyframes site-orb-b {
    from {
        transform: translate3d(0, 0, 0) scale(1);
    }

    to {
        transform: translate3d(1.5rem, -1.5rem, 0) scale(1.05);
    }
}

/* ==========================================================================
   Home — hero
   ========================================================================== */
.hero {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(20rem, 0.95fr);
    gap: clamp(2rem, 6vw, 5rem);
    align-items: center;
    min-height: min(46rem, calc(100vh - 6rem));
    padding: 3rem 0 5.5rem;
}

.hero-copy {
    max-width: 40rem;
}

.hero-title {
    display: block;
    margin: 1.1rem 0 1.4rem;
    color: var(--text);
    font-size: clamp(2.9rem, 6vw, 5.6rem);
    font-weight: 700;
    letter-spacing: -0.055em;
    line-height: 0.98;
}

.hero-line {
    display: block;
}

.hero-intro {
    max-width: 32rem;
    margin: 0 0 2rem;
    color: var(--muted);
    font-size: clamp(1.05rem, 1.5vw, 1.22rem);
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: center;
}

.cta-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.75rem 1.15rem;
    border: 1px solid var(--line);
    border-radius: 0.6rem;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 0.92rem;
    font-weight: 650;
    text-decoration: none;
    transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.cta-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
    transform: translateY(-2px);
}

/* Layered, asymmetric hero visual — Group 1 (victory + botx) */
.hero-visual {
    position: relative;
    width: min(100%, 30rem);
    height: clamp(24rem, 44vw, 33rem);
    justify-self: end;
}

.hero-img {
    position: absolute;
    overflow: hidden;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    background: var(--surface-subtle);
    backface-visibility: hidden;
}

.hero-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 600ms cubic-bezier(0.2, 0.6, 0.2, 1);
}

.hero-img:hover img {
    transform: scale(1.04);
}

.hero-img-main {
    top: 0;
    left: 0;
    width: 74%;
    height: 82%;
}

.hero-img-chip {
    right: 0;
    bottom: 0;
    width: 42%;
    height: 46%;
    border: 0.4rem solid var(--surface);
    z-index: 2;
    box-shadow: var(--shadow);
}

/* ==========================================================================
   Home — journey section (Group 2: first stay + presentation)
   ========================================================================== */
.journey {
    position: relative;
    z-index: 1;
    padding: clamp(4rem, 8vw, 7rem) 0;
    border-top: 1px solid var(--line);
}

.journey-head {
    max-width: 40rem;
    margin-bottom: 3.5rem;
}

.journey-head h2 {
    margin: 0.6rem 0 0.9rem;
    color: var(--text);
    font-size: clamp(2.2rem, 4vw, 3.4rem);
    font-weight: 700;
    letter-spacing: -0.05em;
    line-height: 1.02;
}

.journey-intro {
    margin: 0;
    color: var(--muted);
    font-size: 1.02rem;
    line-height: 1.7;
}

.journey-duo {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(13rem, 0.8fr) minmax(0, 1fr);
    gap: clamp(1.25rem, 4vw, 2.5rem);
    align-items: center;
}

.duo-img {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    background: var(--surface-subtle);
}

.duo-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 700ms cubic-bezier(0.2, 0.6, 0.2, 1);
}

.duo-img:hover img {
    transform: scale(1.03);
}

.duo-img-a {
    aspect-ratio: 5 / 7;
}

.duo-img-b {
    aspect-ratio: 4 / 3;
    margin-top: 4rem;
}

.duo-copy {
    padding: 0.5rem 0;
}

.duo-copy h3 {
    margin: 0 0 0.8rem;
    color: var(--text);
    font-size: 1.5rem;
    letter-spacing: -0.03em;
}

.duo-copy p {
    margin: 0;
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 1.7;
    max-width: 19rem;
}

/* ==========================================================================
   Home — finale (meetups, alone at the end)
   ========================================================================== */
.finale {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(18rem, 1.1fr);
    gap: clamp(2rem, 6vw, 4rem);
    align-items: center;
    padding: clamp(4rem, 8vw, 6rem) 0;
    border-top: 1px solid var(--line);
}

.finale-copy h2 {
    margin: 0.6rem 0 0.9rem;
    color: var(--text);
    font-size: clamp(2rem, 3.4vw, 2.9rem);
    font-weight: 700;
    letter-spacing: -0.05em;
    line-height: 1.02;
}

.finale-copy p {
    margin: 0;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.7;
    max-width: 26rem;
}

.finale-img {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 11;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    background: var(--surface-subtle);
}

.finale-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 700ms cubic-bezier(0.2, 0.6, 0.2, 1);
}

.finale-img:hover img {
    transform: scale(1.03);
}

/* CTA strip */
.home-cta-strip {
    position: relative;
    z-index: 1;
    display: flex;
    max-width: 44rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
    padding: clamp(3rem, 7vw, 5.5rem) 0;
    border-top: 1px solid var(--line);
}

.home-cta-strip h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(1.9rem, 3.6vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.05em;
    line-height: 1.02;
}

.home-cta-strip p {
    margin: 0 0 0.5rem;
    color: var(--muted);
    font-size: 1rem;
}

/* Scroll reveal states */
[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 700ms cubic-bezier(0.2, 0.6, 0.2, 1), transform 700ms cubic-bezier(0.2, 0.6, 0.2, 1);
    will-change: opacity, transform;
}

[data-reveal].is-revealed {
    opacity: 1;
    transform: none;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 3rem;
    padding: 0.75rem 1.15rem;
    border: 1px solid var(--accent);
    border-radius: 0.6rem;
    background: var(--accent);
    box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 22%, transparent);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 650;
    text-decoration: none;
    transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.cta-button:hover {
    background: var(--accent-strong);
    box-shadow: 0 12px 25px color-mix(in srgb, var(--accent) 30%, transparent);
    transform: translateY(-2px);
}

.page-content h2 {
    margin-bottom: 0.7rem;
    font-size: clamp(2.45rem, 4vw, 3.6rem);
    line-height: 1.05;
}

.page-content h3 {
    margin: 2.7rem 0 0.8rem;
    color: var(--text);
    font-size: 1.15rem;
    letter-spacing: -0.025em;
}

.page-content p {
    max-width: 45rem;
    margin-bottom: 1.1rem;
    color: var(--muted);
    line-height: 1.75;
}

.page-intro {
    margin-bottom: 3.5rem !important;
    font-size: 1.1rem;
}

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

.project-card {
    display: flex;
    min-height: 17rem;
    flex-direction: column;
    padding: 1.65rem;
    border: 1px solid var(--line);
    border-radius: 0.85rem;
    background: var(--surface);
    color: inherit;
    text-decoration: none;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.project-card:hover {
    border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
    box-shadow: var(--shadow);
    transform: translateY(-4px);
}

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

.project-card>p:not(.project-version) {
    flex: 1;
    font-size: 0.94rem;
    line-height: 1.7;
}

.project-version {
    margin: -0.35rem 0 0.85rem !important;
    color: var(--accent) !important;
    font-size: 0.78rem !important;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.project-tag {
    display: inline-block;
    margin: 0.3rem 0.25rem 0 0;
    padding: 0.24rem 0.55rem;
    border-radius: 999px;
    background: var(--surface-subtle);
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 600;
}

.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 1.35rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.project-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.36rem 0.48rem;
    border-radius: 0.45rem;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 160ms ease, color 160ms ease;
}

.project-links a:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

.project-links svg {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
}

.project-link-sep {
    align-self: center;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1;
    opacity: 0.55;
    user-select: none;
}

.project-links :nth-child(n + 4) svg {
    width: 1.25rem;
    height: 1.25rem;
}

.icon-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.work-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.7rem 0;
    border-bottom: 1px solid var(--line);
}

.work-item:first-of-type {
    border-top: 1px solid var(--line);
}

.work-content h3 {
    margin: 0 0 0.3rem;
}

.work-content p:last-child {
    margin-bottom: 0;
}

.work-meta {
    margin-bottom: 0.8rem !important;
    color: var(--muted);
    font-size: 0.85rem;
}

/* Active Builds / Working Page Layout */
.active-builds-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.active-build-panel {
    padding: 1.85rem clamp(1.25rem, 3vw, 2.25rem);
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: var(--surface);
    transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}

.active-build-panel:hover {
    border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--line);
}

.panel-title-area h3 {
    margin: 0 0 0.25rem;
    font-size: 1.6rem;
    letter-spacing: -0.03em;
}

.panel-meta {
    margin: 0 !important;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 550;
}

.panel-body {
    padding-top: 1.25rem;
}

.panel-desc {
    font-size: 0.96rem;
    line-height: 1.7;
    margin-bottom: 1.25rem !important;
}

.current-focus-block {
    padding: 1rem 1.25rem;
    border-radius: 0.65rem;
    background: var(--surface-subtle);
    border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}

.focus-title {
    display: block;
    margin-bottom: 0.6rem;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.focus-bullets {
    list-style: none;
    display: grid;
    gap: 0.45rem;
}

.focus-bullets li {
    position: relative;
    padding-left: 1.2rem;
    color: var(--text);
    font-size: 0.88rem;
    line-height: 1.5;
}

.focus-bullets li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
}

.eye-progress-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    width: fit-content;
    padding: 0.35rem 0.4rem;
    background: transparent;
    border: none;
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
    transition: color 160ms ease, transform 160ms ease;
}

.eye-progress-link:hover,
.eye-progress-link:focus-visible {
    color: var(--accent-strong);
    transform: translateX(2px);
}

.eye-progress-link svg {
    width: 1.3rem;
    height: 1.3rem;
    fill: currentColor;
    flex-shrink: 0;
}

.eye-label {
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: opacity 180ms ease, max-width 220ms ease;
}

.eye-progress-link:hover .eye-label,
.eye-progress-link:focus-visible .eye-label {
    opacity: 1;
    max-width: 4rem;
}

.timeline-kicker {
    margin: 0 !important;
    color: var(--accent) !important;
    font-size: 0.76rem !important;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ==========================================================================
   Achievements
   ========================================================================== */
.achievements-list {
    display: flex;
    flex-direction: column;
}

.achievement-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--line);
}

.achievement-item:first-child {
    border-top: 1px solid var(--line);
}

.achievement-copy {
    min-width: 0;
}

.achievement-result {
    margin: 0;
    color: var(--text);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.achievement-event {
    margin: 0.55rem 0 0.25rem;
    color: var(--text);
    font-size: 1rem;
    font-weight: 650;
    letter-spacing: -0.01em;
}

.achievement-detail {
    margin: 0 0 0.5rem;
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 650;
}

.achievement-desc {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.6;
}

/* Tactile row hover — distinct and polished */
.achievement-item:hover .achievement-result {
    color: var(--accent-strong);
}

/* Certificate eye action */
.cert-eye {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    margin-top: 0.1rem;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
    transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.cert-eye:hover,
.cert-eye:focus-visible {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
    transform: translateY(-1px);
}

.cert-eye svg {
    width: 1.2rem;
    height: 1.2rem;
    fill: currentColor;
}

.achievements-more {
    max-width: 42rem;
    margin: 2.5rem auto 0 !important;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.7;
    text-align: center;
}

/* Certificate Lightbox */
.cert-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: color-mix(in srgb, var(--bg) 55%, transparent);
    backdrop-filter: blur(6px);
}

.cert-modal[hidden] {
    display: none;
}

.cert-modal-body {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.cert-modal-body img {
    display: block;
    max-width: 100%;
    max-height: 78vh;
    width: auto;
    height: auto;
    border-radius: 0.6rem;
    box-shadow: var(--shadow);
    background: var(--surface);
}

.cert-modal-caption {
    color: var(--text);
    font-size: 0.9rem;
    text-align: center;
}

.cert-modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.cert-modal-close:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: scale(1.05);
}

.timeline {
    max-width: 47rem;
    border-top: 1px solid var(--line);
}

.timeline-item {
    position: relative;
    padding: 1.6rem 0 1.6rem 1.5rem;
    border-bottom: 1px solid var(--line);
}

.timeline-item::before {
    position: absolute;
    top: 1.95rem;
    left: 0;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--accent);
    content: "";
}

.timeline-item h3 {
    margin: 0.45rem 0 0.55rem;
}

.timeline-item p:last-child {
    margin: 0;
}

.timeline-item p strong {
    color: var(--text);
    font-weight: 700;
}

.timeline-description {
    margin-top: 0.45rem !important;
    color: var(--muted);
    font-size: 0.92rem;
}

/* ==========================================================================
   CV — Coming Soon
   ========================================================================== */
#cv.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

#cv.active>.container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cv-coming-soon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    max-width: 34rem;
    margin: 0 auto;
}

.cv-coming-soon h2 {
    margin: 0.6rem 0 0.8rem;
}

.cv-coming-soon-text {
    margin: 0;
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 1.7;
}

/* Buffering loader — a row of staggered bars */
.cv-loader {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: 3rem;
    margin-bottom: 2.25rem;
}

.cv-loader-bar {
    display: block;
    width: 0.32rem;
    height: 1.1rem;
    border-radius: 999px;
    background: var(--accent);
    animation: cv-loader-bounce 1.2s ease-in-out infinite;
}

.cv-loader-bar:nth-child(2) {
    animation-delay: 0.15s;
}

.cv-loader-bar:nth-child(3) {
    animation-delay: 0.3s;
}

.cv-loader-bar:nth-child(4) {
    animation-delay: 0.45s;
}

@keyframes cv-loader-bounce {

    0%,
    100% {
        transform: scaleY(0.45);
        opacity: 0.45;
    }

    50% {
        transform: scaleY(1);
        opacity: 1;
    }
}

/* ==========================================================================
   About Page — editorial layout
   ========================================================================== */
.about-intro {
    max-width: 45rem;
    margin: 1.5rem 0 3.5rem;
}

.about-intro p {
    color: var(--text);
    font-size: clamp(1.15rem, 2vw, 1.4rem);
    font-weight: 540;
    line-height: 1.6;
    letter-spacing: -0.02em;
}

.about-section {
    padding: 2.25rem 0;
    border-top: 1px solid var(--line);
    max-width: 52rem;
}

.about-section h3 {
    margin: 0 0 1.1rem;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
}

.about-section>p {
    max-width: 45rem;
    margin: 0;
    font-size: 0.98rem;
    color: var(--muted);
    line-height: 1.75;
}

/* Tech stack — clean grouped text lists in a two-column editorial layout */
.about-tech {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem 2.5rem;
}

.about-tech-group {
    min-width: 0;
}

.about-tech-title {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--accent);
    font-size: 0.76rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.about-tech-group p {
    margin: 0;
    color: var(--text);
    font-size: 1rem;
    font-weight: 540;
    letter-spacing: -0.01em;
    line-height: 1.55;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    margin-bottom: 1.25rem;
}

.social-links a {
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
}

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

.social-links-top {
    margin: 2rem 0 0;
}

.contact-form-section {
    max-width: 36rem;
    margin-top: 3.5rem;
    padding-top: 0.25rem;
}

.contact-form-section h3 {
    margin-top: 0;
}

.form-group {
    margin-top: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 650;
}

.form-group input,
.form-group textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 0.55rem;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    line-height: 1.5;
    padding: 0.75rem 0.85rem;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.form-group textarea {
    min-height: 9rem;
    resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: color-mix(in srgb, var(--muted) 70%, transparent);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent);
    outline: none;
}

form .cta-button {
    margin-top: 1.5rem;
}

.cta-button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.form-status {
    min-height: 1.5rem;
    margin: 0.85rem 0 0 !important;
    color: var(--accent) !important;
    font-size: 0.9rem;
    font-weight: 600;
}

.form-status.is-success {
    color: #059669 !important;
}

.form-status.is-error {
    color: #dc2626 !important;
}

html[data-theme="dark"] .form-status.is-success {
    color: #34d399 !important;
}

html[data-theme="dark"] .form-status.is-error {
    color: #f87171 !important;
}

footer {
    padding: 2rem 0 2.5rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.85rem;
}

footer .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

footer .social-links {
    margin: 0;
}

/* ==========================================================================
   Theme Toggle
   ========================================================================== */
.top-right-actions {
    position: fixed;
    top: 0.4rem !important;
    right: 0.85rem !important;
    z-index: 99999;
    display: flex;
    align-items: center;
}

.theme-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    min-height: unset;
    padding: 0;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--text);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease, color 180ms ease;
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: scale(1.06);
}

.theme-icon {
    width: 1.25rem;
    height: 1.25rem;
}

html[data-theme="dark"] .sun-icon {
    display: block;
}

html[data-theme="dark"] .moon-icon {
    display: none;
}

html:not([data-theme="dark"]) .sun-icon {
    display: none;
}

html:not([data-theme="dark"]) .moon-icon {
    display: block;
}

/* ==========================================================================
   Tablet & Mobile Navigation (1024px and below)
   ========================================================================== */
@media (max-width: 1024px) {
    body {
        margin-left: 0;
        padding-top: 5rem;
    }

    nav {
        top: 0;
        left: 0;
        right: auto;
        bottom: auto;
        width: 100%;
        height: auto;
        padding: 0;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    nav .container {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 0.75rem;
        padding: 0.7rem 1.5rem;
    }

    .logo {
        margin: 0;
        font-size: 1rem;
    }

    .logo img {
        width: 1.6rem;
        height: 1.6rem;
    }

    .nav-toggle {
        display: inline-flex;
        flex-shrink: 0;
        margin-left: auto;
        z-index: 1;
    }

    .top-right-actions {
        position: static;
        flex-shrink: 0;
    }

    .nav-links {
        position: fixed;
        top: 4.6rem;
        right: 0;
        left: 0;
        display: flex;
        flex-direction: column;
        gap: 0.15rem;
        max-height: calc(100vh - 4.6rem);
        margin: 0;
        padding: 0.9rem 1.25rem 1.35rem;
        overflow-y: auto;
        list-style: none;
        background: var(--bg);
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow);
        backdrop-filter: blur(16px);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        pointer-events: none;
        transition: opacity 220ms ease, transform 220ms ease, visibility 220ms ease;
    }

    .nav-links.nav-open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
        z-index: 5;
    }

    .nav-links a {
        flex: 0 0 auto;
        padding: 0.65rem 0.75rem;
        font-size: 0.95rem;
    }

    .page-content {
        min-height: calc(100vh - 12rem);
        padding: clamp(3rem, 6vw, 5rem) 0;
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 3.5rem;
        min-height: auto;
        padding: 2rem 0 3rem;
    }

    .hero-copy {
        max-width: 100%;
    }

    .hero-copy .eyebrow {
        line-height: 1;
        margin-bottom: 0;
    }

    .hero-title {
        font-size: clamp(2.8rem, 5vw, 4.5rem);
        margin-top: 0.15rem;
    }

    .hero-visual {
        justify-self: start;
        width: 100%;
        height: clamp(22rem, 56vw, 30rem);
    }

    .journey-duo {
        grid-template-columns: 1fr 1fr;
        row-gap: 2.5rem;
    }

    .duo-img-b {
        margin-top: 0;
    }

    .duo-copy {
        grid-column: 1 / -1;
    }

    .duo-copy p {
        max-width: 34rem;
    }

    .finale {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .finale-copy p {
        max-width: 34rem;
    }

    .about-tech {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* ==========================================================================
   Mobile Breakpoint (760px and below)
   ========================================================================== */
@media (max-width: 760px) {
    .project-grid {
        grid-template-columns: 1fr;
    }

    .achievement-item {
        padding: 1.25rem 0;
    }

    .work-item {
        flex-direction: column;
        gap: 0.75rem;
    }

    .hero {
        padding-top: 0;
        margin-top: -1rem;
        gap: 1.5rem;
    }

    .page-content {
        padding-top: 1.5rem;
    }

    .hero-copy .eyebrow {
        line-height: 1;
        margin-bottom: 0;
    }

    .hero-title {
        font-size: clamp(2.5rem, 11vw, 3.5rem);
        margin-top: -1.2rem;
    }

    .hero-visual {
        height: clamp(20rem, 70vw, 26rem);
    }

    /* Mobile: move the action buttons directly below the hero photos */
    .hero-copy {
        display: contents;
    }

    .hero-copy .eyebrow {
        order: 1;
    }

    .hero-copy .hero-title {
        order: 2;
    }

    .hero-copy .hero-intro {
        order: 3;
        max-width: 100%;
    }

    .hero-visual {
        order: 4;
    }

    .hero-actions {
        order: 5;
        margin-top: 1.5rem;
    }

    .site-orb-a {
        width: 18rem;
        height: 18rem;
        right: -6rem;
    }

    .site-orb-b {
        width: 15rem;
        height: 15rem;
    }

    .journey-duo {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .duo-copy {
        grid-column: auto;
    }

    .duo-img-b {
        width: 78%;
        margin-left: auto;
    }

    .finale-img {
        aspect-ratio: 4 / 3;
    }

    .project-card {
        min-height: 14rem;
    }

    .panel-title-area h3 {
        font-size: 1.3rem;
    }

    footer .container {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* ==========================================================================
   Small Mobile Breakpoint (480px and below)
   ========================================================================== */
@media (max-width: 480px) {
    body {
        font-size: 15px;
        padding-top: 4.6rem;
    }

    nav .container {
        padding: 0.6rem 1rem;
    }

    .nav-toggle {
        min-height: 2.4rem;
        padding: 0.45rem 0.6rem;
    }

    .nav-toggle-label {
        display: none;
    }

    .nav-links {
        top: 4.2rem;
        max-height: calc(100vh - 4.2rem);
    }

    .nav-links a {
        padding: 0.6rem 0.7rem;
        font-size: 0.92rem;
    }

    .container {
        padding: 0 1rem;
    }

    .hero {
        padding: 0 0 2.5rem;
    }

    .eyebrow {
        margin-bottom: 0.3rem;
    }

    .hero-title {
        font-size: clamp(2.2rem, 10vw, 3rem);
        line-height: 1.02;
        margin: -1.2rem 0 0.6rem;
    }

    .hero-intro {
        font-size: 1rem;
        margin: 0 0 1.2rem;
    }

    .page-content h2 {
        font-size: clamp(2rem, 7vw, 2.8rem);
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-actions .cta-button,
    .hero-actions .cta-ghost {
        width: 100%;
    }

    .project-card {
        padding: 1rem;
        min-height: auto;
    }

    .contact-form-section {
        margin-top: 1.8rem;
    }

    .theme-toggle {
        width: 2.5rem;
        height: 2.5rem;
    }

    .active-build-panel {
        padding: 1.1rem 0.8rem;
    }

    .panel-title-area h3 {
        font-size: 1.2rem;
    }
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }

    [data-reveal] {
        opacity: 1;
        transform: none;
    }
}