/* ═══════════════════════════════════════════════════════════════════════════
   ARNAB DEB — PORTFOLIO  v3
   Clean editorial dark system · scroll-reactive background · accordion work
   Palette: #071952 (navy) · #0B666A (deep teal) · #35A29F (teal) · #97FEED (mint)
   Fonts:   Syne (display) · Space Grotesk (body)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Tokens ────────────────────────────────────────────────────────────────── */
:root {
    /* Palette */
    --bg-0:        #03082b;
    --bg-1:        #071952;
    --teal-700:    #0B666A;
    --teal-500:    #35A29F;
    --mint:        #97FEED;

    /* Text */
    --text:        #eafaf6;
    --text-dim:    rgba(234, 250, 246, .60);
    --text-faint:  rgba(234, 250, 246, .38);

    /* Lines & surfaces */
    --line:        rgba(151, 254, 237, .14);
    --line-strong: rgba(151, 254, 237, .32);
    --glass:       rgba(7, 25, 82, .42);

    /* Gradients */
    --grad-accent: linear-gradient(100deg, #35A29F 0%, #97FEED 100%);

    /* Type */
    --font-display: 'Syne', sans-serif;
    --font-body:    'Space Grotesk', sans-serif;

    /* Motion */
    --ease-out:  cubic-bezier(.22, 1, .36, 1);
    --ease-snap: cubic-bezier(.65, 0, .35, 1);

    /* Layout */
    --pad-x:     clamp(1.25rem, 4vw, 2.5rem);
    --section-y: clamp(6rem, 14vh, 10rem);

    /* Scroll progress (set by bg.js, drives the aurora) */
    --sp: 0;

    /* Legacy aliases (used by project data placeholders on project.php) */
    --color-ink:        var(--mint);
    --color-ink-light:  var(--text-dim);
    --color-terra-pale: rgba(53, 162, 159, .35);
    --color-cream-dark: rgba(151, 254, 237, .18);
    --color-cream-deep: transparent;
    --color-sage-pale:  transparent;
}

/* ── Skip link (keyboard accessibility) ────────────────────────────────────── */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    padding: .5rem 1.2rem;
    background: var(--mint);
    color: var(--bg-0);
    font-weight: 700;
    font-size: .9rem;
    border-radius: 0 0 4px 4px;
    z-index: 9999;
    transition: top .2s;
}
.skip-link:focus { top: 0; }

/* ── Reset / base ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5.5rem;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg-0);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul[role="list"] { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

::selection { background: var(--mint); color: var(--bg-1); }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb { background: var(--teal-700); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--teal-500); }

.container {
    width: 100%;
    max-width: 1240px;
    margin-inline: auto;
    padding-inline: var(--pad-x);
}

/* ── Background layers (scroll-reactive) ───────────────────────────────────── */
#bg-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* The two aurora blobs move, scale and shift hue as you scroll (--sp 0→1) */
.bg-aurora {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.bg-aurora::before,
.bg-aurora::after {
    content: '';
    position: absolute;
    width: 62vmax;
    height: 62vmax;
    border-radius: 50%;
    opacity: .38;
    will-change: transform, filter;
}
.bg-aurora::before {
    background: radial-gradient(circle, rgba(11, 102, 106, .85), transparent 65%);
    top: -26vmax;
    left: -16vmax;
    filter: blur(110px);
    transform: translate3d(calc(var(--sp) * 16vmax), calc(var(--sp) * 34vmax), 0)
               scale(calc(1 + var(--sp) * .35));
}
.bg-aurora::after {
    background: radial-gradient(circle, rgba(53, 162, 159, .55), transparent 65%);
    bottom: -30vmax;
    right: -16vmax;
    filter: blur(110px);
    transform: translate3d(calc(var(--sp) * -14vmax), calc(var(--sp) * -36vmax), 0)
               scale(calc(1.1 - var(--sp) * .2));
}

.grain-overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    pointer-events: none;
    opacity: .05;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

main, .site-footer, .site-header { position: relative; z-index: 1; }

/* ── Scroll progress bar ───────────────────────────────────────────────────── */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0;
    background: var(--grad-accent);
    z-index: 1001;
    box-shadow: 0 0 12px rgba(151, 254, 237, .6);
}

/* ── Custom cursor ─────────────────────────────────────────────────────────── */
#cur, #cur-o {
    position: fixed;
    top: 0;
    left: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 2000;
    transform: translate(-50%, -50%);
}
#cur {
    width: 8px;
    height: 8px;
    background: var(--mint);
    box-shadow: 0 0 10px rgba(151, 254, 237, .8);
}
#cur-o {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(151, 254, 237, .5);
    transition: width .3s var(--ease-out), height .3s var(--ease-out),
                border-color .3s, background-color .3s;
}
#cur-o.cur-hover {
    width: 60px;
    height: 60px;
    border-color: var(--mint);
    background: rgba(151, 254, 237, .08);
}
#cur.cur-down { scale: .6; }   /* `scale` property — doesn't clash with the JS transform */

@media (hover: none), (pointer: coarse) {
    #cur, #cur-o { display: none; }
}
@media (hover: hover) and (pointer: fine) {
    body { cursor: none; }
    a, button, input, select, textarea, label { cursor: none; }
}

/* ── Sketch line decorations ───────────────────────────────────────────────── */
/* Hand-drawn style line work behind each section. Lines "draw" themselves in
   when the section scrolls into view (stroke-dashoffset transition). */
.sketch {
    position: absolute;
    pointer-events: none;
    z-index: 0;
    color: var(--mint);
    opacity: .3;
}
.sketch :where(path, circle, ellipse, line, rect) {
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}
.sketch .sk-draw {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    transition: stroke-dashoffset 1.1s var(--ease-out) .15s;
}
.sketch.is-visible .sk-draw { stroke-dashoffset: 0; }
.sketch .sk-dash {
    stroke-dasharray: 6 7;
    opacity: .65;
}

.sketch--work {
    top: clamp(3rem, 8vw, 6rem);
    right: 3vw;
    width: clamp(220px, 30vw, 420px);
}
.sketch--services {
    left: 0;
    top: clamp(3rem, 8vw, 6rem);
    width: clamp(170px, 24vw, 300px);
}
.sketch--lab {
    top: clamp(4rem, 9vw, 7rem);
    right: 4vw;
    width: clamp(150px, 18vw, 240px);
}
.sketch--about {
    top: clamp(4rem, 9vw, 7rem);
    right: 4vw;
    width: clamp(200px, 26vw, 360px);
}
.sketch--testimonials {
    left: 2vw;
    top: clamp(3rem, 8vw, 6rem);
    width: clamp(130px, 16vw, 220px);
}
.sketch--contact {
    top: clamp(3rem, 8vw, 6rem);
    right: 6vw;
    width: clamp(220px, 30vw, 400px);
}

/* ── Section base ──────────────────────────────────────────────────────────── */
section {
    position: relative;
    padding-block: var(--section-y);
}
section > .container { position: relative; z-index: 1; }

.sec-head { margin-bottom: clamp(3rem, 7vw, 4.5rem); }

.sec-head__meta {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    margin-bottom: 1.4rem;
}
.sec-head__index {
    font-family: var(--font-display);
    font-size: .85rem;
    font-weight: 700;
    letter-spacing: .12em;
    color: var(--mint);
}
.sec-head__label {
    font-size: .76rem;
    font-weight: 500;
    letter-spacing: .35em;
    text-transform: uppercase;
    color: var(--teal-500);
    display: flex;
    align-items: center;
    gap: 1.1rem;
}
.sec-head__label::after {
    content: '';
    width: 4rem;
    height: 1px;
    background: var(--grad-accent);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.6rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -.02em;
    max-width: 18ch;
}
.section-title em {
    font-style: normal;
    background: var(--grad-accent);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    padding: .95rem 2.1rem;
    font-size: .9rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    border-radius: 100px;
    transition: transform .35s var(--ease-out), box-shadow .35s, color .35s,
                border-color .35s, background-color .35s;
    will-change: transform;
}
.btn span { position: relative; z-index: 1; }

.btn--fill {
    background: var(--grad-accent);
    color: var(--bg-1);
}
.btn--fill:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 36px rgba(151, 254, 237, .28);
}

.btn--out {
    border: 1px solid var(--line-strong);
    color: var(--mint);
}
.btn--out:hover {
    transform: translateY(-3px);
    border-color: var(--mint);
    background: rgba(151, 254, 237, .07);
}

.btn--block { width: 100%; }

/* ── Header / Nav ──────────────────────────────────────────────────────────── */
/* NOTE: no backdrop-filter on .site-header — a filtered ancestor becomes the
   containing block for position:fixed and breaks the fullscreen mobile menu. */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid transparent;
    transition: background-color .4s, border-color .4s;
}
.site-header.is-scrolled {
    background: rgba(3, 8, 43, .92);
    border-bottom-color: var(--line);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1240px;
    margin-inline: auto;
    padding: 1.3rem var(--pad-x);
    transition: padding .4s var(--ease-out);
}
.site-header.is-scrolled .nav { padding-block: .85rem; }

.nav__brand {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -.01em;
    position: relative;
    z-index: 1002;
}
.brand-dot {
    background: var(--grad-accent);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav__menu {
    display: flex;
    align-items: center;
    gap: 2.2rem;
    list-style: none;
}

.nav__link {
    position: relative;
    font-size: .86rem;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-dim);
    padding: .3rem 0;
    transition: color .3s;
}
.nav__link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: var(--grad-accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .4s var(--ease-out);
}
.nav__link:hover, .nav__link--active { color: var(--mint); }
.nav__link:hover::after, .nav__link--active::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav__cta {
    padding: .55rem 1.4rem;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--mint);
    border: 1px solid var(--line-strong);
    border-radius: 100px;
    transition: background-color .3s, color .3s, border-color .3s, box-shadow .3s;
}
.nav__cta:hover {
    background: var(--mint);
    color: var(--bg-1);
    border-color: var(--mint);
    box-shadow: 0 0 24px rgba(151, 254, 237, .35);
}

/* Hamburger */
.nav__toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: .6rem;
    position: relative;
    z-index: 1002;
}
.nav__toggle-bar {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--mint);
    border-radius: 2px;
    transition: transform .35s var(--ease-snap), opacity .25s;
}
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ── Hero ──────────────────────────────────────────────────────────────────── */
#hero {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100svh;
    padding: 0;
}

.hero__inner {
    flex: 1;
    display: grid;
    grid-template-columns: .78fr 1.22fr;
    gap: 2rem;
    align-items: center;
    padding-top: 6.5rem;
}

.hero__tag {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    font-size: .76rem;
    font-weight: 500;
    letter-spacing: .28em;
    text-transform: uppercase;
    color: var(--teal-500);
    border: 1px solid var(--line);
    border-radius: 100px;
    padding: .5rem 1.3rem;
    margin-bottom: 2.2rem;
}
.hero__tag::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--mint);
    box-shadow: 0 0 10px var(--mint);
    animation: pulse-dot 2s ease-in-out infinite;
}

.hero__name {
    font-family: var(--font-display);
    font-size: clamp(3.2rem, 8.5vw, 6.6rem);
    font-weight: 800;
    line-height: .98;
    letter-spacing: -.03em;
    margin-bottom: 1.6rem;
}
.hero__name-line { display: block; }
.hero__name-line--stroke {
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(151, 254, 237, .65);
}
.hero__name-line--fill {
    background: var(--grad-accent);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 28px rgba(53, 162, 159, .45));
}

.hero__role {
    font-size: clamp(1.05rem, 2.2vw, 1.4rem);
    font-weight: 500;
    margin-bottom: 1.4rem;
    min-height: 1.7em;
}
.hero__role .type-text { color: var(--mint); }
.hero__role .type-caret {
    display: inline-block;
    width: 2px;
    height: 1.1em;
    margin-left: 3px;
    vertical-align: text-bottom;
    background: var(--mint);
    animation: caret-blink .9s steps(1) infinite;
}
@keyframes caret-blink { 50% { opacity: 0; } }

.hero__desc {
    max-width: 32rem;
    font-size: 1rem;
    color: var(--text-dim);
    margin-bottom: 2.4rem;
}

.hero__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2.4rem;
}

.hero__avail {
    display: flex;
    align-items: center;
    gap: .8rem;
    font-size: .9rem;
    color: var(--text-dim);
}
.hero__avail strong { color: var(--mint); font-weight: 600; }

.dot-pulse {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--mint);
    animation: pulse-dot 2s ease-out infinite;
}
@keyframes pulse-dot {
    0%   { box-shadow: 0 0 0 0 rgba(151, 254, 237, .55); }
    70%  { box-shadow: 0 0 0 12px rgba(151, 254, 237, 0); }
    100% { box-shadow: 0 0 0 0 rgba(151, 254, 237, 0); }
}

/* Portrait — transparent cutout anchored to the bottom of the hero viewport.
   A line sweeps in from the right edge of the screen at half the image
   height, passes the image, turns down its left side and stops at the
   image bottom (a half frame) — then the portrait reveals. */
.hero__visual {
    position: relative;
    align-self: end;
    display: flex;
    justify-content: center;
}

.hero__frame-wrap {
    position: relative;
    width: min(75vh, 100%);
}

.hero-frame {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 50%;          /* line sits at half the image height */
    overflow: visible;     /* lets the lead-in line extend off-screen right */
    color: var(--mint);
    opacity: .75;
    z-index: 0;
    pointer-events: none;
    filter: drop-shadow(0 0 6px rgba(151, 254, 237, .6));
}
.hero-frame__path {
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    fill: none;
    vector-effect: non-scaling-stroke;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: frame-draw 1s var(--ease-out) .3s forwards;
}
@keyframes frame-draw { to { stroke-dashoffset: 0; } }

.hero__photo {
    position: relative;
    z-index: 1;
    width: 100%;
    height: auto;
    user-select: none;
    /* Teal rim-light treatment over the cutout — no backdrop shape */
    filter: saturate(.95) contrast(1.04)
            drop-shadow(0 24px 50px rgba(3, 8, 43, .65))
            drop-shadow(0 0 34px rgba(53, 162, 159, .18));
    /* Reveal starts as the frame line finishes its run */
    animation: photo-reveal 0.4s var(--ease-out) 0.8s both;

}
/* Bottom-up wipe reveal */
@keyframes photo-reveal {
    from {
        opacity: 0;
        clip-path: inset(100% 0 0 0);
        transform: translateY(70px) scale(.96);
    }
    60% {
        opacity: 1;
    }
    to {
        opacity: 1;
        clip-path: inset(-20% 0 0 0);
        transform: translateY(0) scale(1);
    }
}

/* Stars + crosshair layer covering the whole visual */
.sketch--hero {
    inset: 0;
    width: 100%;
    opacity: .5;
}
.sketch .sk-star {
    stroke: none;
    fill: currentColor;
    transform-box: fill-box;
    transform-origin: center;
    animation: star-twinkle 3.2s ease-in-out infinite;
}
@keyframes star-twinkle {
    0%, 100% { opacity: .15; transform: scale(.6); }
    50%      { opacity: .9;  transform: scale(1); }
}

/* Stats strip at the bottom edge of the hero */
.hero__meta {
    border-top: 1px solid var(--line);
}
.hero__meta-inner {
    display: flex;
    align-items: center;
    gap: clamp(1.5rem, 5vw, 4.5rem);
    padding-block: 1.4rem;
}
.hero__stat {
    display: flex;
    align-items: baseline;
    gap: .6rem;
}
.hero__stat-num {
    font-family: var(--font-display);
    font-size: 1.55rem;
    font-weight: 800;
    background: var(--grad-accent);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero__stat-label {
    font-size: .72rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.hero__scroll-cue {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: .9rem;
    font-size: .68rem;
    letter-spacing: .35em;
    text-transform: uppercase;
    color: var(--text-faint);
}
.hero__scroll-track {
    position: relative;
    width: 4rem;
    height: 1px;
    background: var(--line);
    overflow: hidden;
}
.hero__scroll-track::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--grad-accent);
    transform: translateX(-100%);
    animation: scroll-slide 2.2s var(--ease-snap) infinite;
}
@keyframes scroll-slide {
    0%   { transform: translateX(-100%); }
    60%  { transform: translateX(100%); }
    100% { transform: translateX(100%); }
}

/* ── Marquee ───────────────────────────────────────────────────────────────── */
.marquee {
    position: relative;
    z-index: 1;
    overflow: hidden;
    padding: 1.3rem 0;
    border-bottom: 1px solid var(--line);
    background: rgba(7, 25, 82, .35);
}
.marquee__track {
    display: flex;
    width: max-content;
    gap: 3rem;
    animation: marquee 28s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

.marquee__item {
    display: flex;
    align-items: center;
    gap: 3rem;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--text-dim);
    white-space: nowrap;
}
.marquee__item::after {
    content: '✦';
    color: var(--mint);
    font-size: .85rem;
}

/* ── 01 Work — interactive accordion ───────────────────────────────────────── */
.work-acc { border-top: 1px solid var(--line); }

.acc-item { border-bottom: 1px solid var(--line); }

.acc-head {
    width: 100%;
    display: grid;
    grid-template-columns: 3rem 1fr auto 2.6rem;
    align-items: center;
    gap: clamp(1rem, 3vw, 2rem);
    padding: 1.7rem .2rem;
    text-align: left;
    transition: padding-left .4s var(--ease-out);
}
.acc-head:hover { padding-left: 1rem; }

.acc-head__num {
    font-family: var(--font-display);
    font-size: .9rem;
    font-weight: 700;
    color: var(--teal-500);
}
.acc-head__name {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 3.2vw, 1.9rem);
    font-weight: 700;
    line-height: 1.2;
    transition: color .3s;
}
.acc-head:hover .acc-head__name,
.acc-item.is-open .acc-head__name { color: var(--mint); }

.acc-head__cat {
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--text-faint);
    white-space: nowrap;
}

/* Plus icon → ✕ when open */
.acc-head__icon {
    position: relative;
    width: 2.6rem;
    height: 2.6rem;
    border: 1px solid var(--line);
    border-radius: 50%;
    transition: border-color .3s, background-color .3s, transform .45s var(--ease-snap);
}
.acc-head__icon::before,
.acc-head__icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    background: var(--mint);
    transition: background-color .3s;
}
.acc-head__icon::before {
    width: 14px;
    height: 1.5px;
    transform: translate(-50%, -50%);
}
.acc-head__icon::after {
    width: 1.5px;
    height: 14px;
    transform: translate(-50%, -50%);
}
.acc-head:hover .acc-head__icon { border-color: var(--mint); }
.acc-item.is-open .acc-head__icon {
    transform: rotate(45deg);
    background: rgba(151, 254, 237, .08);
    border-color: var(--mint);
}

/* Animated expand/collapse via grid-template-rows */
.acc-panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .65s var(--ease-snap);
}
.acc-item.is-open .acc-panel { grid-template-rows: 1fr; }

.acc-panel__inner {
    overflow: hidden;
    min-height: 0;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
}
.acc-item.is-open .acc-panel__inner { padding: .8rem .2rem 2.6rem; }

/* Content fades and rises once the panel opens */
.acc-panel__media,
.acc-panel__info {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .45s ease, transform .45s var(--ease-out);
}
.acc-item.is-open .acc-panel__media {
    opacity: 1;
    transform: translateY(0);
    transition-delay: .2s;
}
.acc-item.is-open .acc-panel__info {
    opacity: 1;
    transform: translateY(0);
    transition-delay: .32s;
}

.acc-panel__media img {
    width: 100%;
    border-radius: 14px;
    border: 1px solid var(--line);
}
.acc-panel__ph {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    aspect-ratio: 16 / 9;
    padding: 1.5rem 2rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(11, 102, 106, .25), rgba(7, 25, 82, .6));
}
.acc-panel__ph-mark {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    background: var(--grad-accent);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.acc-panel__ph-sub {
    font-size: .72rem;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.acc-panel__tagline {
    font-family: var(--font-display);
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 1.6rem;
}

.acc-panel__meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.1rem 2rem;
    margin-bottom: 1.8rem;
}
.acc-panel__meta dt {
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .25em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: .15rem;
}
.acc-panel__meta dd { font-size: .92rem; font-weight: 500; }

.acc-panel__cta {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--mint);
    padding-bottom: .35rem;
    border-bottom: 1px solid var(--line-strong);
    transition: gap .3s var(--ease-out), border-color .3s;
}
.acc-panel__cta:hover { gap: 1rem; border-color: var(--mint); }

/* ── 02 Services ───────────────────────────────────────────────────────────── */
.services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2.5rem, 5vw, 3.5rem) clamp(2.5rem, 6vw, 5rem);
}

.service-item {
    border-top: 1px solid var(--line);
    padding-top: 1.7rem;
    transition: border-color .4s;
}
.service-item:hover { border-top-color: var(--mint); }

.service-item__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.1rem;
}
.service-item__num {
    font-family: var(--font-display);
    font-size: .9rem;
    font-weight: 700;
    color: var(--teal-500);
}
.service-item__arrow {
    font-size: 1.4rem;
    color: var(--text-faint);
    transition: color .3s, transform .4s var(--ease-out);
}
.service-item:hover .service-item__arrow {
    color: var(--mint);
    transform: translate(4px, -4px);
}

.service-item__name {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 2.4vw, 1.45rem);
    font-weight: 700;
    margin-bottom: .6rem;
    transition: color .3s;
}
.service-item:hover .service-item__name { color: var(--mint); }

.service-item__desc {
    font-size: .93rem;
    color: var(--text-dim);
    margin-bottom: 1.1rem;
}

.service-item__tags {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}
.service-tag {
    padding: .28rem .85rem;
    font-size: .72rem;
    font-weight: 500;
    letter-spacing: .05em;
    color: var(--teal-500);
    border: 1px solid rgba(53, 162, 159, .35);
    border-radius: 100px;
}

/* ── 03 Lab — personal products ────────────────────────────────────────────── */
.lab-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(1.4rem, 3vw, 2.2rem);
}

.lab-card {
    display: flex;
    flex-direction: column;
    padding: clamp(1.6rem, 3vw, 2.1rem);
    background: var(--glass);
    border: 1px solid var(--line);
    border-radius: 14px;
    transition: border-color .4s, transform .4s var(--ease-out);
}
.lab-card:hover {
    border-color: var(--line-strong);
    transform: translateY(-6px);
}

.lab-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.1rem;
}
.lab-card__type {
    font-size: .72rem;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--teal-500);
}
.lab-card__arrow {
    font-size: 1.4rem;
    color: var(--text-faint);
    transition: color .3s, transform .4s var(--ease-out);
}
.lab-card:hover .lab-card__arrow {
    color: var(--mint);
    transform: translate(4px, -4px);
}

.lab-card__name {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 2.4vw, 1.45rem);
    font-weight: 700;
    margin-bottom: .6rem;
    transition: color .3s;
}
.lab-card:hover .lab-card__name { color: var(--mint); }

.lab-card__desc {
    font-size: .93rem;
    color: var(--text-dim);
    margin-bottom: 1.1rem;
}

.lab-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin-bottom: 1.5rem;
}

.lab-card__cta {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    align-self: flex-start;
    font-family: var(--font-display);
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--text);
    padding-bottom: .3rem;
    border-bottom: 1px solid var(--line-strong);
    transition: border-color .3s, color .3s;
}
.lab-card:hover .lab-card__cta {
    color: var(--mint);
    border-bottom-color: var(--mint);
}

/* ── 04 About ──────────────────────────────────────────────────────────────── */
.about__grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: clamp(2.5rem, 6vw, 5.5rem);
}

.about__story p {
    font-size: .98rem;
    color: var(--text-dim);
    margin-bottom: 1.2rem;
}
.about__story strong { color: var(--text); font-weight: 600; }
.about__story a {
    color: var(--mint);
    border-bottom: 1px solid rgba(151, 254, 237, .4);
    transition: border-color .3s;
}
.about__story a:hover { border-bottom-color: var(--mint); }

.group-label {
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--teal-500);
    margin-bottom: 1.3rem;
}
.about__group {
    margin-top: 3rem;
    border-top: 1px solid var(--line);
    padding-top: 1.8rem;
}
.about__group--first {
    margin-top: 0;
    border-top: 0;
    padding-top: 0;
}

/* Education */
.edu-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
    transition: padding-left .35s var(--ease-out);
}
.edu-item:last-of-type { border-bottom: 0; }
.edu-item:hover { padding-left: .6rem; }
.edu-item__degree { font-weight: 600; font-size: .95rem; }
.edu-item__uni { font-size: .85rem; color: var(--text-dim); }
.edu-item__year {
    font-family: var(--font-display);
    font-size: .85rem;
    font-weight: 700;
    color: var(--teal-500);
    white-space: nowrap;
}

/* Languages */
.lang-row {
    display: flex;
    justify-content: space-between;
    padding: .75rem 0;
    border-bottom: 1px solid var(--line);
}
.lang-row:last-of-type { border-bottom: 0; }
.lang-row__name { font-weight: 600; font-size: .92rem; }
.lang-row__level { font-size: .85rem; color: var(--teal-500); }

/* Skills */
.skill-row { margin-bottom: 1.35rem; }
.skill-row:last-child { margin-bottom: 0; }
.skill-row__meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: .5rem;
    font-size: .9rem;
}
.skill-row__label { font-weight: 500; }
.skill-row__value {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--mint);
}
.skill-row__track {
    height: 5px;
    border-radius: 3px;
    background: rgba(151, 254, 237, .09);
    overflow: hidden;
}
.skill-row__bar {
    height: 100%;
    width: 0;
    border-radius: 3px;
    background: var(--grad-accent);
    box-shadow: 0 0 12px rgba(151, 254, 237, .5);
    transition: width 1.3s var(--ease-snap);
}

/* Tools */
.tools-grid {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}
.tool-chip {
    padding: .42rem 1.1rem;
    font-size: .82rem;
    font-weight: 600;
    color: var(--mint);
    background: rgba(151, 254, 237, .08);
    border: 1px solid rgba(151, 254, 237, .28);
    border-radius: 100px;
    transition: background .3s, border-color .3s, transform .3s var(--ease-out);
}
.tool-chip:hover {
    background: rgba(151, 254, 237, .18);
    border-color: var(--mint);
    transform: translateY(-3px);
}

/* ── 04 Testimonials ───────────────────────────────────────────────────────── */
.testi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.testi-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 2.2rem 1.8rem 1.8rem;
    background: rgba(151, 254, 237, .03);
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
    transition: border-color .3s, background .3s;
}
.testi-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--grad-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .45s var(--ease-out);
}
.testi-card:hover {
    border-color: rgba(151, 254, 237, .28);
    background: rgba(151, 254, 237, .06);
}
.testi-card:hover::after { transform: scaleX(1); }

.testi-card__mark {
    display: block;
    font-family: var(--font-display);
    font-size: 4.5rem;
    line-height: .75;
    color: var(--mint);
    opacity: .22;
    margin-bottom: .9rem;
    user-select: none;
}
.testi-card__text {
    font-size: .95rem;
    line-height: 1.8;
    color: var(--text);
    flex: 1;
    margin-bottom: 1.8rem;
}
.testi-card__footer {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--line);
}
.testi-card__name {
    font-style: normal;
    font-weight: 700;
    font-size: .88rem;
    color: var(--mint);
    display: block;
}
.testi-card__role { font-size: .78rem; color: var(--text-dim); }

/* ── 05 Contact ────────────────────────────────────────────────────────────── */
.contact__grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: clamp(2.5rem, 7vw, 6rem);
}

.contact__desc {
    color: var(--text-dim);
    margin-bottom: 2.4rem;
    max-width: 30rem;
}

.contact__details { font-style: normal; }
.contact-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1.5rem;
    padding: 1.05rem 0;
    border-bottom: 1px solid var(--line);
}
.contact-row__label {
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .25em;
    text-transform: uppercase;
    color: var(--text-faint);
    flex-shrink: 0;
}
.contact-row__value {
    font-size: .95rem;
    font-weight: 500;
    text-align: right;
    transition: color .3s;
}
a.contact-row__value:hover { color: var(--mint); }

/* Form — minimal underline fields */
.form-group { margin-bottom: 1.7rem; }
.form-group__label {
    display: block;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: .3rem;
}
.form-group__input,
.form-group__select,
.form-group__textarea {
    width: 100%;
    padding: .75rem 0;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text);
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    outline: none;
    transition: border-color .3s;
    -webkit-appearance: none;
    appearance: none;
}
.form-group__textarea { resize: vertical; min-height: 96px; }
.form-group__select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2397FEED' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .2rem center;
}
.form-group__select option { background: var(--bg-1); color: var(--text); }

.form-group__input:focus,
.form-group__select:focus,
.form-group__textarea:focus {
    border-bottom-color: var(--mint);
}
.form-group [aria-invalid="true"] { border-bottom-color: #e0566b; }

.form-status {
    display: none;
    padding: .85rem 1.2rem;
    border-radius: 10px;
    font-size: .9rem;
    margin-bottom: 1.2rem;
}
.form-status--success {
    background: rgba(53, 162, 159, .15);
    border: 1px solid rgba(151, 254, 237, .4);
    color: var(--mint);
}
.form-status--error {
    background: rgba(224, 86, 107, .12);
    border: 1px solid rgba(224, 86, 107, .45);
    color: #ff8fa0;
}

/* ── Footer ────────────────────────────────────────────────────────────────── */
.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(3, 8, 43, .6);
}

.footer__cta {
    position: relative;
    overflow: hidden;      /* clips the frame line's off-screen lead-in */
    text-align: center;
    padding: clamp(4rem, 10vh, 6rem) var(--pad-x);
    border-bottom: 1px solid var(--line);
}
.footer__cta-title,
.footer__cta .btn {
    position: relative;
    z-index: 1;
}

/* Hero-style frame line — drawn on scroll by scroll.js (.sketch.is-visible) */
.cta-frame {
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    opacity: .75;
    filter: drop-shadow(0 0 6px rgba(151, 254, 237, .6));
}
.cta-frame .sk-draw {
    stroke-width: 2;
    stroke-linecap: round;
    /* longer run than the section sketches — it crosses the whole screen */
    transition-duration: 2s;
}

.cta-stars {
    left: clamp(1rem, 9vw, 12rem);
    top: 18%;
    width: clamp(36px, 4.5vw, 56px);
    opacity: .8;
}
.footer__cta-title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 6vw, 4.4rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -.02em;
    margin-bottom: 2.2rem;
}
.footer__cta-title em {
    font-style: normal;
    background: var(--grad-accent);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    max-width: 1240px;
    margin-inline: auto;
    padding: 2rem var(--pad-x);
}
.footer__brand {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 800;
}
.footer__nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 1.8rem;
    list-style: none;
}
.footer__nav a {
    font-size: .8rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-dim);
    transition: color .3s;
}
.footer__nav a:hover { color: var(--mint); }
.footer__copy { font-size: .8rem; color: var(--text-faint); }

/* ── Reveal animations ─────────────────────────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Reduced motion ────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001s !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001s !important;
    }
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; }
}

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .hero__inner {
        grid-template-columns: 1fr;
        gap: 0;
        padding-top: 6rem;
        text-align: left;
    }
    .hero__content { padding-bottom: 2.5rem; }
    .hero__visual { justify-self: center; }
    .hero__frame-wrap { width: min(360px, 82vw); }

    /* On single-column layouts the sketches leave the background (they'd sit
       behind the text) and become small centred motif icons that draw in
       above each section's heading. */
    .sketch:not(.sketch--hero):not(.sketch--frame) {
        position: static;
        display: block;
        margin: 0 auto 2.4rem;
        width: 150px;
        height: auto;
        opacity: .5;
    }
    .sketch--about { width: 190px; }      /* the pencil is a wide motif */
    .sketch--hero { opacity: .42; }

    .about__grid,
    .contact__grid,
    .testi-grid,
    .lab-grid,
    .services-grid { grid-template-columns: 1fr; }

    .acc-panel__inner { grid-template-columns: 1fr; align-items: start; }
}

@media (max-width: 768px) {
    .nav__toggle { display: flex; }
    .nav__cta { display: none; }

    .nav__menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        background: rgba(3, 8, 43, .98);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity .35s, visibility .35s;
        z-index: 1001;
    }
    .nav__menu.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    .nav__link { font-size: 1.35rem; letter-spacing: .12em; }

    .hero__meta-inner {
        flex-wrap: wrap;
        gap: 1rem 2rem;
        justify-content: space-between;
    }
    .hero__scroll-cue { display: none; }
    .hero__stat { flex-direction: column; gap: 0; align-items: flex-start; }
    .hero__stat-num { font-size: 1.35rem; }
    .hero__stat-label { font-size: .64rem; }

    .acc-head { grid-template-columns: 2.2rem 1fr 2.4rem; }
    .acc-head__cat { display: none; }
    .acc-head__icon { width: 2.2rem; height: 2.2rem; }
    .acc-panel__meta { grid-template-columns: 1fr 1fr; gap: .9rem 1.2rem; }
}

@media (max-width: 480px) {
    :root { --section-y: clamp(4.5rem, 12vh, 6rem); }

    .hero__buttons .btn { width: 100%; }
    .hero__frame-wrap { width: min(310px, 86vw); }
    .hero__meta-inner { justify-content: flex-start; }

    .contact-row {
        flex-direction: column;
        align-items: flex-start;
        gap: .15rem;
    }
    .contact-row__value { text-align: left; }
}
