/* Public Portfolio styles. Server-rendered Blade, no build pipeline (ADR-0009);
   referenced from portfolio.blade.php via asset(). Layout v2: dark glass language,
   1px gradient borders (padding:1px wrapper + inner radius), indigo -> fuchsia
   gradients, cyan highlights. Content and the hexagon "MS" mark are unchanged. */

/* ==========================================================================
   1. Theme tokens
   Theme is Owner-chosen and fixed for Visitors (ADR-0011); the accent palette
   is selected server-side from data-theme. Every accent below flows through
   these variables — neon/mono only shift hues, never the layout.
   ========================================================================== */
:root, html[data-theme="aurora"] {
    /* accents */
    --accent: #e879f9;          /* light fuchsia — glyphs, accent text, glows */
    --accent-rgb: 232,121,249;
    --accent2: #d946ef;         /* deep fuchsia — borders, rules, gradients */
    --accent2-rgb: 217,70,239;
    --accent3: #22d3ee;         /* cyan — status, education, "now" */
    --accent3-rgb: 34,211,238;
    --accent3-light: #67e8f9;
    --accentMid: #6366f1;       /* indigo — gradient start, timeline nodes */
    --accentMid-rgb: 99,102,241;
    --accentMid-light: #818cf8;
    --accentMid-soft: #a5b4fc;
    --accentMid-pale: #c7d2fe;
    --accent-pale: #f5d0fe;
    --violet-rgb: 139,92,246;
    --violet-soft: #c4b5fd;
    --violet-border: rgba(167,139,250,.3);
    /* surfaces */
    --bg: #03020A;
    --panel: rgba(10,10,26,.9);
    --panel-deep: rgba(9,8,24,.8);
    --panel-contact: rgba(10,10,26,.92);
    --panel-solid: #0A0A1A;
    --hair: rgba(255,255,255,.05);
    --hair-soft: rgba(255,255,255,.08);
    --line: rgba(255,255,255,.1);
    /* type */
    --text: #ffffff;
    --bright: #d1d5db;
    --muted: #9ca3af;
    --dim: #8b93a1;
    --faint: #7b8290;
    /* backdrop blobs */
    --blob1: #1A0B40;
    --blob2: #0F1E5C;
    /* per-card rotating accent (overridden by :nth-child below) */
    --acc: var(--accent);
    --acc-rgb: var(--accent2-rgb);
}
html[data-theme="neon"] {
    --accent: #38bdf8;
    --accent-rgb: 56,189,248;
    --accent2: #0ea5e9;
    --accent2-rgb: 14,165,233;
    --accent3: #22d3ee;
    --accent3-rgb: 34,211,238;
    --accent3-light: #a5f3fc;
    --accentMid: #6366f1;
    --accentMid-rgb: 99,102,241;
    --accentMid-light: #818cf8;
    --accentMid-soft: #a5b4fc;
    --accentMid-pale: #c7d2fe;
    --accent-pale: #bae6fd;
    --violet-rgb: 56,189,248;
    --violet-soft: #bae6fd;
    --violet-border: rgba(56,189,248,.3);
    --bg: #02060F;
    --blob1: #0A1140;
    --blob2: #062B4A;
}
html[data-theme="mono"] {
    --accent: #c4b5fd;
    --accent-rgb: 196,181,253;
    --accent2: #a78bfa;
    --accent2-rgb: 167,139,250;
    --accent3: #cbd5e1;
    --accent3-rgb: 203,213,225;
    --accent3-light: #e2e8f0;
    --accentMid: #8b5cf6;
    --accentMid-rgb: 139,92,246;
    --accentMid-light: #a78bfa;
    --accentMid-soft: #c4b5fd;
    --accentMid-pale: #ddd6fe;
    --accent-pale: #ede9fe;
    --violet-rgb: 139,92,246;
    --violet-soft: #c4b5fd;
    --violet-border: rgba(167,139,250,.3);
    --bg: #05050B;
    --blob1: #151233;
    --blob2: #0E1024;
}

/* ==========================================================================
   2. Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; color-scheme: dark; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Manrope', -apple-system, sans-serif;
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}
::selection { background: var(--accent2); color: #fff; }
::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #241d33; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #3b2f52; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* Locale: both Locales are in the DOM; CSS shows the active one (ADR-0004/0009). */
html[data-locale="pt"] .t[data-locale="en"], html[data-locale="en"] .t[data-locale="pt"] { display: none; }

/* ==========================================================================
   3. Fixed background stack (canvas / grain / blobs)
   ========================================================================== */
#webgl-bg {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: -20; pointer-events: none; display: block;
}
.bg { position: fixed; inset: 0; z-index: -10; pointer-events: none; overflow: hidden; }
.bg-noise {
    position: fixed; inset: 0; z-index: -10; pointer-events: none;
    mix-blend-mode: overlay; opacity: .3;
    background-image:
        radial-gradient(circle at center, transparent 0%, #000 100%),
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,.05) 2px, rgba(255,255,255,.05) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(255,255,255,.05) 2px, rgba(255,255,255,.05) 4px);
}
.blob { position: absolute; border-radius: 50%; }
.blob.a { top: -20%; left: -10%; width: 50vw; height: 50vw; background: var(--blob1); filter: blur(120px); opacity: .6; }
.blob.b { bottom: -10%; right: -10%; width: 60vw; height: 60vw; background: var(--blob2); filter: blur(150px); opacity: .5; }

/* ==========================================================================
   4. Keyframes
   float-anim uses the `translate` property (not `transform`) so the JS mouse
   parallax can set `transform` on the same element without clobbering it.
   ========================================================================== */
@keyframes float-phone { 0%,100% { transform: translateY(-20px) rotateX(8deg) rotateY(-5deg); } 50% { transform: translateY(0) rotateX(4deg) rotateY(-2deg); } }
@keyframes float-anim  { 0%,100% { translate: 0 -15px; } 50% { translate: 0 0; } }
@keyframes float-tilt  { 0%,100% { translate: 0 -10px; rotate: -2deg; } 50% { translate: 0 10px; rotate: 2deg; } }
@keyframes fade-in-up  { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
/* translate-based twin: lets the JS mouse parallax own `transform` on .hero-art */
@keyframes fade-in-up-t { from { opacity: 0; translate: 0 30px; } to { opacity: 1; translate: 0 0; } }
@keyframes pulse-glow  { 0%,100% { filter: drop-shadow(0 0 6px rgba(var(--violet-rgb),.5)); } 50% { filter: drop-shadow(0 0 14px rgba(var(--violet-rgb),.85)); } }
@keyframes marquee     { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes softpulse   { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* ==========================================================================
   6. Shell — the bordered content column
   ========================================================================== */
.shell {
    position: relative; width: 100%; max-width: 1280px; margin: 0 auto;
    padding: 0 48px;
    border-left: 1px solid var(--hair);
    border-right: 1px solid var(--hair);
    min-height: 100vh; display: flex; flex-direction: column;
}
/* closing rule under the footer */
.shell::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 1px;
    background: rgba(255,255,255,.2); pointer-events: none;
}
.shell-tick { position: absolute; top: 0; width: 16px; height: 16px; pointer-events: none; }
.shell-tick.tl { left: 0; border-top: 1px solid rgba(255,255,255,.2); border-left: 1px solid rgba(255,255,255,.2); }
.shell-tick.tr { right: 0; border-top: 1px solid rgba(255,255,255,.2); border-right: 1px solid rgba(255,255,255,.2); }
.shell-guide {
    position: absolute; top: 0; width: 1px; height: 100%;
    background: rgba(255,255,255,.02); z-index: -1; pointer-events: none;
}
.shell-guide.g1 { left: 25%; }
.shell-guide.g2 { left: 50%; }
.shell-guide.g3 { left: 75%; }

/* ==========================================================================
   7. Nav — sticky inside the shell, blurs once scrolled (.is-stuck via JS)
   ========================================================================== */
.nav {
    position: sticky; top: 0; z-index: 50;
    display: flex; align-items: center; justify-content: space-between;
    margin: 0 -16px; padding: 24px 16px;
    border-radius: 0 0 24px 24px;
    border-bottom: 1px solid transparent;
    background: transparent;
    transition: background .5s, backdrop-filter .5s, border-color .5s;
}
.nav.is-stuck {
    background: rgba(3,2,10,.72);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border-bottom-color: rgba(255,255,255,.07);
}
/* Without JS `.is-stuck` never lands, so the nav would stay transparent while the
   content scrolls under it. Give the no-JS path the backdrop up front; `html.js`
   and `html:not(.js)` are mutually exclusive, so the JS design is untouched. */
html:not(.js) .nav {
    background: rgba(3,2,10,.72);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border-bottom-color: rgba(255,255,255,.07);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
/* Hexagon mark (ADR-0007: pure CSS, no image asset). clip-path clips box-shadow,
   so the pulse is expressed as a drop-shadow filter on the 32px slot. */
.logo {
    display: grid; place-items: center; width: 30px; height: 34px; flex: none;
    background: linear-gradient(135deg, var(--accentMid), var(--accent2));
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    animation: pulse-glow 3s ease-in-out infinite;
}
.logo-mark {
    display: grid; place-items: center; width: 25px; height: 28px; background: var(--bg);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 12px;
    letter-spacing: -.05em; color: var(--text);
}
.brand-name {
    font-family: 'Space Grotesk', sans-serif; font-weight: 500;
    font-size: 17px; letter-spacing: .14em; color: var(--text);
}
.nav-right { display: flex; align-items: center; gap: 12px; }
.nav-links { display: none; align-items: center; gap: 32px; }
.nav-link {
    font-size: 13px; font-weight: 400; letter-spacing: .06em; color: var(--muted);
    transition: color .2s;
}
.nav-link:hover { color: var(--text); }
.locale-switch {
    display: flex; align-items: center; padding: 3px; border-radius: 999px;
    background: rgba(255,255,255,.05); border: 1px solid var(--line);
}
.locale-switch button {
    font-family: 'JetBrains Mono', monospace; font-size: 11.5px; font-weight: 600;
    letter-spacing: .06em; padding: 5px 11px; border-radius: 999px; border: none;
    cursor: pointer; line-height: 1; background: transparent; color: var(--muted);
    transition: background .2s, color .2s;
}
html[data-locale="pt"] .locale-switch [data-locale-switch="pt"],
html[data-locale="en"] .locale-switch [data-locale-switch="en"] { background: #fff; color: #03020A; }
.nav-cta {
    display: none; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 500; color: var(--text);
    padding: 10px 20px; border-radius: 999px;
    background: rgba(255,255,255,.05);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border: 1px solid var(--line);
    transition: background .3s, transform .3s;
}
.nav-cta:hover { background: rgba(255,255,255,.12); transform: translateY(-1px); }
.nav-cta .icon { width: 14px; height: 14px; }

/* ==========================================================================
   8. Main rhythm — one 120px flex gap between every section
   ========================================================================== */
.main {
    flex: 1; width: 100%; display: flex; flex-direction: column;
    gap: 120px; padding-bottom: 64px;
}
.main > section { padding: 0; scroll-margin-top: 96px; }

/* ==========================================================================
   9. Hero
   ========================================================================== */
.hero {
    position: relative; padding: 64px 0; display: flex; align-items: center;
    gap: 48px; border-bottom: 1px solid var(--hair);
}
.hero-copy { flex: 1; min-width: 0; position: relative; z-index: 10; }
html.js .hero-copy > * { opacity: 0; animation: fade-in-up 1s cubic-bezier(.16,1,.3,1) forwards; }
html.js .hero-art { opacity: 0; animation: fade-in-up-t 1s cubic-bezier(.16,1,.3,1) forwards; }
html.js .hero-eyebrow { animation-delay: .1s; }
html.js .hero-headline { animation-delay: .2s; }
html.js .hero-sub { animation-delay: .3s; }
html.js .hero-ctas { animation-delay: .4s; }
html.js .hero-stats { animation-delay: .5s; }
html.js .hero-art { animation-delay: .6s; }

.hero-eyebrow { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.hero-eyebrow .dash { width: 32px; height: 1px; flex: none; background: var(--accent2); }
.hero-eyebrow span:not(.dash), .hero-eyebrow .t {
    font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 500;
    letter-spacing: .18em; text-transform: uppercase; color: var(--accent);
}
.hero-headline {
    margin: 0 0 28px; font-family: 'Space Grotesk', sans-serif; font-weight: 600;
    font-size: clamp(38px, 5.2vw, 68px); letter-spacing: -.03em; line-height: 1.08;
    text-wrap: balance; color: var(--text);
    background-image: linear-gradient(to bottom, #fff, var(--muted));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-sub {
    margin: 0 0 32px; max-width: 52ch; font-size: 15px; font-weight: 300;
    line-height: 1.75; color: var(--muted);
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 44px; }
.btn {
    position: relative; display: inline-flex; align-items: center; gap: 9px; overflow: hidden;
    font-family: 'Manrope', sans-serif; font-size: 14px; font-weight: 500; color: var(--text);
    padding: 14px 26px; border-radius: 999px;
    transition: transform .3s, box-shadow .3s, background .3s;
}
.btn .icon { width: 15px; height: 15px; flex: none; }
.btn-primary {
    background: linear-gradient(100deg, var(--accentMid), var(--accent2));
    border: 1px solid rgba(255,255,255,.14);
    box-shadow: 0 10px 30px rgba(var(--violet-rgb),.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 44px rgba(var(--accent2-rgb),.4); }
.btn-ghost {
    background: rgba(255,255,255,.05);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border: 1px solid var(--line);
}
.btn-ghost:hover { background: rgba(255,255,255,.11); transform: translateY(-2px); }

.hero-stats { display: flex; flex-wrap: wrap; gap: 36px; }
.stat { display: flex; flex-direction: column; }
.stat-k {
    font-family: 'Space Grotesk', sans-serif; font-weight: 600;
    font-size: clamp(26px, 3vw, 36px); letter-spacing: -.02em; line-height: 1.1; color: var(--text);
    background-image: linear-gradient(to right, #fff, var(--accentMid-pale));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.stat-v { margin-top: 4px; font-size: 12px; font-weight: 300; color: var(--dim); max-width: 18ch; line-height: 1.5; }

/* --- hero art column ---------------------------------------------------- */
.hero-art {
    flex: 1; min-width: 0; position: relative;
    display: flex; justify-content: flex-end; perspective: 1000px;
}
.hero-art::before, .hero-art::after { content: ''; position: absolute; border-radius: 50%; pointer-events: none; z-index: 0; }
.hero-art::before {
    top: 50%; left: 50%; transform: translate(-50%,-50%); width: 300px; height: 300px;
    background: rgba(var(--accentMid-rgb),.4); filter: blur(80px);
}
.hero-art::after {
    top: 22%; right: 22%; width: 200px; height: 200px;
    background: rgba(var(--accent2-rgb),.3); filter: blur(60px);
}
.art-card {
    position: relative; z-index: 10; width: 330px; height: 520px; flex: none;
    border-radius: 34px; padding: 1px; overflow: hidden;
    background: linear-gradient(to bottom, rgba(255,255,255,.3), rgba(255,255,255,.05), rgba(255,255,255,.1));
    box-shadow: 0 30px 60px rgba(0,0,0,.6), 0 0 100px rgba(var(--violet-rgb),.15);
    animation: float-phone 5s ease-in-out infinite;
}
/* inner "screen" of the device card */
.art-card::before {
    content: ''; position: absolute; inset: 1px; border-radius: 33px;
    background: var(--panel-solid); z-index: 0;
}
/* Full-bleed artwork: the art is a finished composition, not a texture strip,
   so it fills the whole card instead of the reference's top 56% band. */
.art-media {
    position: absolute; inset: 1px;
    overflow: hidden; border-radius: 33px; z-index: 1;
}
.art-media img {
    width: 100%; height: 100%; object-fit: cover; object-position: center;
    opacity: .85; mix-blend-mode: screen; display: block;
}
/* Bottom fade keeps .art-body readable over the artwork. */
.art-media::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to top, var(--panel-solid) 20%, rgba(10,10,26,.82) 46%, transparent 74%);
}
.art-body {
    position: relative; z-index: 10; height: 100%; padding: 24px;
    display: flex; flex-direction: column; justify-content: flex-end;
}
.art-name { margin: 0 0 6px; font-family: 'Space Grotesk', sans-serif; font-size: 22px; font-weight: 600; letter-spacing: -.02em; color: var(--text); }
.art-role { margin: 0 0 20px; font-size: 12.5px; font-weight: 300; color: var(--accentMid-soft); }
.art-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; list-style: none; padding: 0; margin: 0; }
.art-chips > * {
    font-size: 10.5px; font-weight: 400; color: var(--bright);
    background: rgba(255,255,255,.05); border: 1px solid var(--line);
    padding: 7px 4px; border-radius: 9px; text-align: center;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* status pill — reused in the hero art card */
.badge-status {
    display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
    font-family: 'JetBrains Mono', monospace; font-size: 10.5px; font-weight: 500;
    letter-spacing: .1em; text-transform: uppercase; color: var(--accent3-light);
    background: rgba(var(--accent3-rgb),.1); border: 1px solid rgba(var(--accent3-rgb),.25);
    padding: 5px 11px; border-radius: 999px; margin-bottom: 18px;
}
.badge-status::before {
    content: ''; width: 5px; height: 5px; border-radius: 50%; flex: none;
    background: var(--accent3); animation: softpulse 2s ease-in-out infinite;
}
/* floating satellites — float-anim lives on `translate` so JS parallax can own `transform` */
.art-sat {
    position: absolute; z-index: 30; padding: 1px; overflow: hidden;
    background: linear-gradient(to bottom, rgba(255,255,255,.2), rgba(255,255,255,.05));
    box-shadow: 0 20px 40px rgba(0,0,0,.5);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.art-sat.s1 { left: 2%; top: 16%; width: 118px; height: 118px; border-radius: 26px; animation: float-anim 3s ease-in-out infinite; }
.art-sat.s2 { left: 12%; bottom: 8%; width: 96px; height: 96px; border-radius: 20px; animation: float-anim 3.5s ease-in-out 1.5s infinite; }
.art-sat::before {
    content: ''; position: absolute; inset: 1px; z-index: 1;
    background: linear-gradient(to top, rgba(0,0,0,.8), transparent); pointer-events: none;
}
.art-sat.s1::before { border-radius: 25px; }
.art-sat.s2::before { border-radius: 19px; }
.art-sat img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    mix-blend-mode: screen; border-radius: 25px; background: var(--panel);
}
.art-sat.s1 img { opacity: .75; }
.art-sat.s2 img { opacity: .7; border-radius: 19px; }
.art-sat-label {
    position: absolute; bottom: 10px; left: 0; width: 100%; z-index: 2; text-align: center;
    font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 500;
    letter-spacing: .14em; text-transform: uppercase; color: #fff;
}
.art-sat.s2 .art-sat-label { bottom: 8px; font-size: 9.5px; }

/* ==========================================================================
   10. Marquee — pulled up into the 120px main gap
   ========================================================================== */
.marquee {
    position: relative; overflow: hidden; margin-top: -70px; padding: 20px 0;
    border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track { display: flex; gap: 44px; width: max-content; animation: marquee 34s linear infinite; }
.marquee-track > * {
    font-family: 'JetBrains Mono', monospace; font-size: 12.5px; font-weight: 400;
    letter-spacing: .16em; text-transform: uppercase; color: var(--faint); white-space: nowrap;
}

/* ==========================================================================
   11. Section heads
   The kicker rule sits before or after the text depending on the section —
   that order lives in the markup; this only styles the pieces.
   ========================================================================== */
.sec-head { text-align: center; margin-bottom: 52px; }
.kicker {
    display: inline-flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 24px;
    vertical-align: middle;
    font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 500;
    letter-spacing: .18em; text-transform: uppercase; color: var(--accent);
}
/* .rule is an inline sibling of .kicker in the markup, so it needs inline-block:
   a non-replaced inline element ignores width/height and the bar would never paint. */
.rule {
    display: inline-block; vertical-align: middle; width: 32px; height: 1px; flex: none;
    background: var(--accent2);
    /* `vertical-align: middle` aligns MARGIN boxes: the rule must carry the same
       bottom margin as the kicker it sits next to, or it renders ~12px low. */
    margin-bottom: 24px;
}
.kicker + .rule { margin-left: 12px; }
.rule + .kicker { margin-left: 12px; }
.section-title {
    margin: 0 0 20px; font-family: 'Space Grotesk', sans-serif; font-weight: 600;
    font-size: clamp(28px, 3.6vw, 46px); letter-spacing: -.025em; line-height: 1.15;
    text-wrap: balance; color: var(--text);
}
.section-sub {
    margin: 0 auto; max-width: 56ch; font-size: 14px; font-weight: 300;
    line-height: 1.7; color: var(--muted);
}
/* ==========================================================================
   12. About
   ========================================================================== */
#about { display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; }
#about::before {
    content: ''; position: absolute; top: -64px; left: 50%; width: 1px; height: 64px;
    background: linear-gradient(to bottom, var(--accent2), transparent); pointer-events: none;
}
#about .sec-head { max-width: 720px; margin-bottom: 0; }
#about .kicker { color: var(--accentMid-light); }
#about .rule { background: var(--accentMid); }
#about .section-title { margin: 0 0 28px; }

.about-quote {
    width: 100%; max-width: 720px; margin-bottom: 56px;
    display: flex; align-items: flex-start; gap: 16px; text-align: left;
    background: rgba(255,255,255,.05); padding: 18px; border-radius: 18px;
    border: 1px solid var(--line);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    transition: background .5s;
}
.about-quote:hover { background: rgba(255,255,255,.09); }
.about-quote .icon { width: 22px; height: 22px; flex: none; margin-top: 2px; color: var(--accent); }
.about-quote p { margin: 0; font-size: 14px; font-weight: 300; line-height: 1.8; color: var(--bright); }

.about-panel {
    position: relative; overflow: hidden; text-align: left;
    width: 100%; max-width: 900px; border-radius: 22px; padding: 32px;
    background: var(--panel-deep);
    -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
    border: 1px solid var(--line);
    box-shadow: 0 30px 60px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.1);
}
.about-panel::before {
    content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 75%; height: 50%; background: rgba(var(--accentMid-rgb),.1);
    filter: blur(50px); pointer-events: none;
}
.about-panel p { position: relative; margin: 0 0 28px; font-size: 14px; font-weight: 300; line-height: 1.8; color: var(--muted); }
.principles {
    position: relative; display: flex; flex-wrap: wrap; gap: 10px;
    list-style: none; padding: 0; margin: 0 0 28px;
}
.principles li {
    display: flex; align-items: center; gap: 9px;
    font-size: 12.5px; font-weight: 400; color: var(--bright);
    background: rgba(255,255,255,.05); border: 1px solid var(--line);
    padding: 9px 15px; border-radius: 999px;
}
.principles li::before {
    content: ''; width: 5px; height: 5px; border-radius: 50%; flex: none;
    background: linear-gradient(135deg, var(--accentMid), var(--accent2));
}
.edu-card {
    position: relative; display: flex; align-items: center; gap: 16px;
    padding-top: 24px; border-top: 1px solid var(--hair-soft);
}
.edu-icon {
    display: grid; place-items: center; width: 46px; height: 46px; flex: none;
    border-radius: 14px; background: rgba(var(--accent3-rgb),.1);
    border: 1px solid rgba(var(--accent3-rgb),.2); color: var(--accent3);
}
.edu-icon .icon { width: 21px; height: 21px; }
.edu-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 3px; }
.edu-meta .kicker {
    display: inline-flex; margin: 0; font-size: 10.5px; letter-spacing: .16em;
    color: var(--accent3-light);
}
.edu-status {
    font-size: 10px; font-weight: 500; color: var(--accent3);
    background: rgba(var(--accent3-rgb),.1); padding: 2px 9px; border-radius: 999px;
}
.edu-degree { margin: 0; font-family: 'Space Grotesk', sans-serif; font-size: 15px; font-weight: 500; letter-spacing: -.01em; color: var(--text); }
.edu-school { margin: 3px 0 0; font-size: 12.5px; font-weight: 300; color: var(--dim); }

/* ==========================================================================
   13. Experience timeline
   ========================================================================== */
#experience .kicker { color: var(--accent); }
#experience .rule { background: var(--accent2); }
#experience .sec-head { margin-bottom: 56px; }
.timeline { position: relative; max-width: 820px; margin: 0 auto; padding-left: 34px; }
.timeline::before {
    content: ''; position: absolute; left: 5px; top: 8px; bottom: 40px; width: 1px;
    background: linear-gradient(to bottom, var(--accentMid), var(--accent2), rgba(var(--accent3-rgb),.4), transparent);
}
.job { position: relative; padding-bottom: 32px; }
.job::before {
    content: ''; position: absolute; left: -34px; top: 6px; width: 11px; height: 11px;
    border-radius: 50%; background: var(--bg); border: 2px solid var(--accentMid);
    box-shadow: 0 0 0 4px rgba(var(--accentMid-rgb),.12);
}
/* 1px gradient border on a single element (mask ring); falls back to a flat hairline */
.job-card {
    position: relative; border-radius: 20px; padding: 25px;
    background: var(--panel);
    -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
    border: 1px solid var(--line);
}
@supports ((-webkit-mask-composite: xor) or (mask-composite: exclude)) {
    .job-card { border-color: transparent; background-clip: padding-box; }
    .job-card::before {
        content: ''; position: absolute; inset: -1px; border-radius: 20px; padding: 1px;
        background: linear-gradient(to bottom, rgba(255,255,255,.14), rgba(255,255,255,.04));
        -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
        -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
        mask-composite: exclude; pointer-events: none; transition: background .4s;
    }
    .job-card:hover::before { background: linear-gradient(to bottom, rgba(var(--accent2-rgb),.4), rgba(255,255,255,.05)); }
}
/* flat-hairline fallback only: with the mask ring available, recolouring the
   border too would paint a doubled edge on hover. */
@supports not ((-webkit-mask-composite: xor) or (mask-composite: exclude)) {
    .job-card { transition: border-color .4s; }
    .job-card:hover { border-color: rgba(var(--accent2-rgb),.4); }
}
.job-top { position: relative; display: flex; align-items: center; gap: 11px; flex-wrap: wrap; margin-bottom: 8px; }
.job-period {
    font-family: 'JetBrains Mono', monospace; font-size: 11.5px; font-weight: 500;
    letter-spacing: .1em; text-transform: uppercase; color: var(--accentMid-soft);
}
.now-badge {
    font-family: 'JetBrains Mono', monospace; font-size: 9.5px; font-weight: 600;
    letter-spacing: .1em; color: var(--accent3);
    background: rgba(var(--accent3-rgb),.1); border: 1px solid rgba(var(--accent3-rgb),.25);
    padding: 2px 9px; border-radius: 999px;
}
.job-role { position: relative; margin: 0 0 4px; font-family: 'Space Grotesk', sans-serif; font-size: 19px; font-weight: 600; letter-spacing: -.02em; color: var(--text); }
.job-company {
    position: relative; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin: 0 0 14px; font-size: 13.5px; font-weight: 500; color: var(--accent);
}
.job-company span { font-size: 12px; font-weight: 300; color: var(--dim); }
.job-desc { position: relative; margin: 0 0 16px; font-size: 13.5px; font-weight: 300; line-height: 1.75; color: var(--muted); }
.tags { position: relative; display: flex; flex-wrap: wrap; gap: 7px; list-style: none; padding: 0; margin: 0; }
.tags li {
    font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 400;
    letter-spacing: .04em; color: var(--muted);
    background: rgba(255,255,255,.04); border: 1px solid var(--hair-soft);
    padding: 4px 10px; border-radius: 7px;
}

/* ==========================================================================
   14. Cards — projects + personal lab
   Accent rotates cyan -> fuchsia -> indigo across the grid.
   ========================================================================== */
#projects .kicker { color: var(--accent3-light); }
#projects .rule { background: var(--accent3); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.cards > .card:nth-child(3n+1) { --acc: var(--accent3); --acc-rgb: var(--accent3-rgb); }
.cards > .card:nth-child(3n+2) { --acc: var(--accent); --acc-rgb: var(--accent2-rgb); }
.cards > .card:nth-child(3n+3) { --acc: var(--accentMid-light); --acc-rgb: var(--accentMid-rgb); }
.card {
    position: relative; height: 100%; border-radius: 24px; padding: 1px; overflow: hidden;
    background: linear-gradient(to bottom, rgba(var(--acc-rgb),.3), rgba(255,255,255,.05));
    transition: transform .3s;
}
.card.is-featured { background: linear-gradient(to bottom, rgba(var(--acc-rgb),.55), rgba(255,255,255,.06)); }
/* spotlight glow — JS writes --mx/--my on pointermove over the card */
.card-glow {
    position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0;
    transition: opacity .5s;
    background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--acc-rgb),.22), transparent 70%);
}
@media (hover: hover) and (pointer: fine) {
    .card:hover .card-glow { opacity: 1; }
}
.card-inner {
    position: relative; z-index: 10; height: 100%; border-radius: 23px;
    background: var(--panel);
    -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
    padding: 28px; display: flex; flex-direction: column;
}
.card-icon {
    display: grid; place-items: center; width: 46px; height: 46px; flex: none;
    border-radius: 14px; background: rgba(var(--acc-rgb),.1);
    border: 1px solid rgba(var(--acc-rgb),.2); color: var(--acc); margin-bottom: 22px;
}
.card-icon .icon { width: 22px; height: 22px; }
.card-company {
    display: block; font-family: 'JetBrains Mono', monospace; font-size: 10.5px; font-weight: 500;
    letter-spacing: .16em; text-transform: uppercase; color: var(--dim); margin-bottom: 8px;
}
.card-title { margin: 0 0 12px; font-family: 'Space Grotesk', sans-serif; font-size: 18px; font-weight: 600; letter-spacing: -.02em; line-height: 1.3; color: var(--text); }
.card-desc { margin: 0 0 20px; font-size: 13.5px; font-weight: 300; line-height: 1.75; color: var(--muted); }
.card-stack { display: flex; flex-wrap: wrap; gap: 7px; list-style: none; padding: 0; margin: auto 0 0; }
.card-stack li {
    font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 400; color: var(--muted);
    background: rgba(255,255,255,.04); border: 1px solid var(--hair-soft);
    padding: 4px 10px; border-radius: 7px;
}
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.card-link {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 500; letter-spacing: .04em; color: var(--accent);
    white-space: nowrap; transition: color .2s;
}
.card-link:hover { color: var(--accent-pale); }
.card-link .icon { width: 13px; height: 13px; }

/* personal lab cards — media strip header, tighter radius */
.sub-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 24px; flex-wrap: wrap; text-align: left;
    margin: 72px 0 32px; padding-top: 48px; border-top: 1px solid var(--hair);
}
.sub-head .kicker { justify-content: flex-start; margin-bottom: 16px; color: var(--accentMid-soft); }
.sub-head .rule { background: var(--accentMid-light); margin-bottom: 16px; }
.sub-head .section-title { margin: 0; font-size: clamp(24px, 3vw, 34px); }
.sub-head .section-sub { margin: 0; max-width: 38ch; font-size: 13.5px; color: var(--dim); }
.sub-head + .cards { grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); gap: 20px; }
.card.is-personal { border-radius: 20px; }
.card.is-personal .card-inner { border-radius: 19px; padding: 20px; overflow: hidden; }
.card.is-personal .card-title { font-size: 16.5px; margin: 0 0 9px; }
.card.is-personal .card-desc { font-size: 12.5px; margin: 0 0 16px; line-height: 1.7; }
.card.is-personal .card-stack { gap: 6px; }
.card.is-personal .card-stack li { font-size: 10.5px; padding: 3px 9px; border-radius: 6px; }
.card-media {
    position: relative; height: 96px; flex: none; overflow: hidden;
    margin: -20px -20px 18px; border-radius: 19px 19px 0 0;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; opacity: .45; mix-blend-mode: screen; display: block; }
.card-media::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to top, var(--panel-solid), rgba(10,10,26,.4));
}
.badge-personal {
    display: inline-flex; align-items: center; gap: 6px;
    font-family: 'JetBrains Mono', monospace; font-size: 9.5px; font-weight: 500;
    letter-spacing: .12em; text-transform: uppercase; color: var(--violet-soft);
    background: rgba(var(--violet-rgb),.18); border: 1px solid var(--violet-border);
    padding: 3px 9px; border-radius: 999px;
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.card-media .badge-personal { position: absolute; z-index: 2; top: 12px; right: 12px; }

/* ==========================================================================
   15. Stack
   ========================================================================== */
#stack .kicker { color: var(--accentMid-light); }
#stack .rule { background: var(--accentMid); }
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.skills > .skill-card:nth-child(3n+1) { --acc: var(--accent3); --acc-rgb: var(--accent3-rgb); }
.skills > .skill-card:nth-child(3n+2) { --acc: var(--accent); --acc-rgb: var(--accent2-rgb); }
.skills > .skill-card:nth-child(3n+3) { --acc: var(--accentMid-light); --acc-rgb: var(--accentMid-rgb); }
.skill-card {
    position: relative; height: 100%; border-radius: 24px; padding: 1px; overflow: hidden;
    background: linear-gradient(to bottom, rgba(var(--acc-rgb),.3), rgba(255,255,255,.05));
}
.skill-card > * { position: relative; z-index: 10; }
.skill-card::after {
    content: ''; position: absolute; inset: 1px; border-radius: 23px; z-index: 1;
    background: var(--panel);
    -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}
/* 46px accent tile, matching the project cards' .card-icon. The per-group colour
   arrives inline as `color`; the rgba() pair is the fallback for engines without
   color-mix(). */
.skill-icon {
    display: grid; place-items: center; width: 46px; height: 46px; flex: none;
    border-radius: 14px; margin: 28px 28px 22px; color: var(--acc);
    background: rgba(var(--acc-rgb),.1);
    border: 1px solid rgba(var(--acc-rgb),.2);
}
@supports (background: color-mix(in srgb, currentColor 10%, transparent)) {
    .skill-icon {
        background: color-mix(in srgb, currentColor 10%, transparent);
        border-color: color-mix(in srgb, currentColor 22%, transparent);
    }
}
.skill-icon .icon { width: 22px; height: 22px; stroke-width: 1.6; }
.skill-name { margin: 0 28px 18px; font-family: 'Space Grotesk', sans-serif; font-size: 17px; font-weight: 600; letter-spacing: -.02em; color: var(--text); }
.skill-items { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 28px 28px; }
.skill-items li {
    font-size: 12px; font-weight: 400; color: var(--bright);
    background: rgba(255,255,255,.05); border: 1px solid var(--line);
    padding: 6px 12px; border-radius: 8px; transition: transform .15s, border-color .2s;
}
.skill-items li:hover { transform: translateY(-2px); border-color: rgba(var(--acc-rgb),.45); }
.lang-bar {
    display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
    margin-top: 28px; padding: 20px 26px; border-radius: 16px;
    background: rgba(255,255,255,.025); border: 1px solid var(--hair-soft);
}
.lang-label {
    font-family: 'JetBrains Mono', monospace; font-size: 10.5px; font-weight: 500;
    letter-spacing: .18em; text-transform: uppercase; color: var(--faint);
}
.lang { font-size: 13px; font-weight: 300; color: var(--muted); }
.lang strong { font-weight: 500; color: var(--text); }

/* ==========================================================================
   16. Contact — the section itself is the 1px gradient border
   ========================================================================== */
.contact-card {
    position: relative; border-radius: 28px; padding: 1px; overflow: hidden;
    background: linear-gradient(to bottom, rgba(var(--accent2-rgb),.4), rgba(var(--accentMid-rgb),.2), rgba(255,255,255,.05));
}
.contact-inner {
    position: relative; overflow: hidden; border-radius: 27px;
    background: var(--panel-contact);
    -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
    padding: clamp(36px, 6vw, 72px);
}
.contact-inner::before {
    content: ''; position: absolute; top: -40%; right: -10%; width: 50%; height: 160%;
    background: radial-gradient(circle, rgba(var(--accent2-rgb),.18), transparent 70%);
    filter: blur(40px); pointer-events: none; animation: float-anim 14s ease-in-out infinite;
}
.contact-card .kicker { justify-content: flex-start; position: relative; z-index: 10; }
.contact-title {
    position: relative; z-index: 10;
    margin: 0 0 20px; font-family: 'Space Grotesk', sans-serif; font-weight: 600;
    font-size: clamp(30px, 4.4vw, 54px); letter-spacing: -.03em; line-height: 1.1;
    text-wrap: balance; max-width: 17ch; color: var(--text);
    background-image: linear-gradient(to bottom, #fff, var(--muted));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.contact-sub {
    position: relative; z-index: 10;
    margin: 0 0 36px; max-width: 48ch; font-size: 15px; font-weight: 300;
    line-height: 1.75; color: var(--muted);
}
.contact-actions { position: relative; z-index: 10; display: flex; flex-wrap: wrap; gap: 14px; }
.contact-btn {
    display: inline-flex; align-items: center; gap: 10px;
    font-family: 'Manrope', sans-serif; font-size: 14px; font-weight: 500; color: var(--text);
    padding: 14px 26px; border-radius: 999px;
    transition: transform .3s, box-shadow .3s, background .3s;
}
.contact-btn .icon { width: 16px; height: 16px; flex: none; }
.contact-btn.solid {
    background: linear-gradient(100deg, var(--accentMid), var(--accent2));
    border: 1px solid rgba(255,255,255,.14);
    box-shadow: 0 10px 30px rgba(var(--violet-rgb),.35);
}
.contact-btn.solid:hover { transform: translateY(-2px); box-shadow: 0 18px 44px rgba(var(--accent2-rgb),.4); }
.contact-btn.ghost {
    background: rgba(255,255,255,.05);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border: 1px solid var(--line);
}
.contact-btn.ghost:hover { background: rgba(255,255,255,.11); transform: translateY(-2px); }
.contact-btn.ghost .icon { width: 14px; height: 14px; }

/* ==========================================================================
   17. Footer
   ========================================================================== */
footer {
    position: relative; z-index: 10;
    display: flex; justify-content: space-between; align-items: center;
    gap: 24px; flex-wrap: wrap; padding: 40px 0; border-top: 1px solid var(--hair);
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
/* the hexagon mark scaled into the footer's 24px slot (ADR-0007) */
.footer-brand .logo { width: 22px; height: 25px; animation: none; }
.footer-brand .logo-mark { width: 18px; height: 21px; font-size: 9px; }
.footer-brand .brand-name { font-family: 'Space Grotesk', sans-serif; font-size: 13px; font-weight: 400; letter-spacing: .1em; color: var(--muted); }
.footer-note { font-family: 'JetBrains Mono', monospace; font-size: 11.5px; font-weight: 300; letter-spacing: .08em; color: var(--faint); }
footer span { font-family: 'JetBrains Mono', monospace; font-size: 11.5px; font-weight: 300; color: var(--faint); }

/* ==========================================================================
   18. Reveal-on-scroll — progressive enhancement; without JS everything is
   visible. [data-delay] is applied by the reveal JS, not by CSS.
   ========================================================================== */
html.js .reveal {
    opacity: 0; transform: translateY(40px);
    transition: opacity 1s cubic-bezier(.16,1,.3,1), transform 1s cubic-bezier(.16,1,.3,1);
}
html.js .reveal.seen { opacity: 1; transform: none; }

/* ==========================================================================
   19. Responsive
   ========================================================================== */
@media (min-width: 561px) { .nav-cta { display: inline-flex; } }
@media (min-width: 880px) { .nav-links { display: flex; } }

@media (max-width: 1024px) {
    .hero { flex-direction: column; align-items: stretch; padding-top: 32px; }
    .hero-art { justify-content: center; margin-top: 48px; }
    /* .art-sat left offsets are % of .hero-art, which is now the full shell width —
       re-anchor them to the centred 330px card (half-width 165px). */
    .art-sat.s1 { left: calc(50% - 266px); }
    .art-sat.s2 { left: calc(50% - 208px); }
    .main { gap: 96px; }
}
@media (max-width: 980px) {
    .art-card { transform-origin: top center; scale: .88; }
    /* card scaled to .88 → visual half-width 145px */
    .art-sat.s1 { left: calc(50% - 246px); }
    .art-sat.s2 { left: calc(50% - 188px); }
    .hero-art { margin-top: 24px; }
}
@media (max-width: 767px) {
    .shell { padding: 0 18px; }
    .nav { margin: 0 -10px; padding: 20px 10px; }
    .main { gap: 80px; }
    .about-panel { padding: 24px; }
    .timeline { padding-left: 26px; }
    .job::before { left: -26px; }
    .hero-stats { gap: 24px; }
    .lang-bar { gap: 16px; padding: 18px 20px; }
}
@media (max-width: 600px) {
    /* hero_pre / name / role / chips render ONLY inside .art-card, so hiding the whole
       column would drop that content on phones. Strip the decoration, keep the content. */
    .hero-art { display: flex; justify-content: center; margin-top: 32px; }
    .hero-art::before, .hero-art::after { display: none; }
    .art-sat { display: none; }
    .art-card {
        width: 100%; max-width: 340px; height: auto; scale: 1;
        border-radius: 24px; animation: none;
    }
    .art-card::before { border-radius: 23px; }
    .art-media { display: none; }
    .art-body { height: auto; padding: 22px; }
    .cards, .sub-head + .cards, .skills { grid-template-columns: 1fr; }
    .card-inner { padding: 22px; }
    .sub-head { margin-top: 56px; padding-top: 36px; }
}
@media (max-width: 380px) {
    .shell { padding: 0 14px; }
    .skill-icon { margin: 22px 22px 16px; }
    .skill-name { margin: 0 22px 16px; }
    .skill-items { margin: 0 22px 22px; }
}

/* ==========================================================================
   20. Reduced motion — kill every animation, parallax and reveal transition
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
    html.js .hero-copy > *, html.js .hero-art { opacity: 1; }
    html.js .reveal { opacity: 1; transform: none; }
    /* webgl-bg.js bails out before creating a context under reduced motion; this
       stays as belt-and-braces for the matchMedia-throws path and for a preference
       flipped mid-session, since `animation: none` cannot reach a canvas loop. */
    #webgl-bg { display: none; }
}
