/* JM — Cosmic portfolio. Public pages only; no build step required. */
:root {
    color-scheme: dark;
    --night: #060b18; --surface: #0c1425; --surface-light: #111d30;
    --white: #edf4f5; --muted: #99acbb; --cyan: #63e8ff; --amber: #ffbe78;
    --line: rgba(171, 206, 228, .16); --header-height: 94px;
    --ease: cubic-bezier(.22, 1, .36, 1);
    --font: 'Avenir Next', Avenir, 'Segoe UI', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; background: var(--night); }
body { margin: 0; color: var(--white); background: var(--night); font-family: var(--font); font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
::selection { background: var(--cyan); color: var(--night); }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .4; }
img { max-width: 100%; display: block; }
figure, p, h1, h2, h3 { margin: 0; }
h1, h2, h3 { line-height: 1.12; font-weight: 500; letter-spacing: -.045em; }
h2 { font-size: clamp(36px, 4.2vw, 64px); }
h3 { font-size: 26px; }
em { font-family: Georgia, 'Times New Roman', serif; font-weight: 400; color: var(--cyan); letter-spacing: -.045em; }
button, input, textarea, a { touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 6px; }
[hidden] { display: none !important; }
.portfolio-container { width: min(1280px, calc(100% - 96px)); margin-inline: auto; }
.portfolio-page { position: relative; isolation: isolate; min-height: 60vh; }
#main-content:focus { outline: none; }
[id] { scroll-margin-top: 110px; }
.accent { color: var(--cyan); }
.ambient-light { pointer-events: none; position: fixed; z-index: -1; inset: 0; background: radial-gradient(ellipse at 85% 15%, #15354835, transparent 55%); }
.skip-link { position: fixed; left: 20px; top: -100px; z-index: 500; padding: 12px 20px; background: var(--cyan); color: var(--night); border-radius: 8px; }
.skip-link:focus { top: 15px; }
/* Header and full-screen navigation */
.site-header { position: fixed; top: 0; inset-inline: 0; z-index: 80; transition: background .3s, border-color .3s; border-bottom: 1px solid transparent; }
.site-header.is-scrolled { background: rgba(6,11,24,.9); backdrop-filter: blur(18px); border-color: var(--line); }
.header-inner { height: var(--header-height); display: flex; align-items: center; gap: 36px; }
.brand-mark { display: block; flex: 0 0 auto; width: 76px; }
.brand-mark img { width: 76px; height: 76px; object-fit: contain; }
.header-signature { font-size: 9px; letter-spacing: .19em; color: var(--muted); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 42px; }
.header-contact { font-size: 12px; display: flex; gap: 24px; align-items: center; }
.header-contact span { font-size: 22px; color: var(--cyan); }
.menu-toggle { display: none; border: 1px solid var(--line); background: transparent; padding: 11px 18px; border-radius: 40px; align-items: center; gap: 25px; font-size: 12px; }
html.has-menu .menu-toggle { display: flex; }
.menu-symbol { display: grid; gap: 5px; }
.menu-symbol i { width: 19px; height: 1px; background: var(--white); transition: transform .3s; }
.menu-toggle:hover .menu-symbol i:first-child { transform: translateX(3px); }
.menu-panel { position: relative; background: var(--night); padding: 110px 0 40px; }
html.has-menu .menu-panel { position: fixed; inset: 0; z-index: 120; padding: 0; visibility: hidden; opacity: 0; overflow-y: auto; overscroll-behavior: contain; transition: opacity .4s, visibility .4s; background: #091122; }
html.has-menu .menu-panel.is-open { opacity: 1; visibility: visible; }
.menu-inner { min-height: 100%; display: flex; flex-direction: column; position: relative; padding-block: 30px; }
.menu-top, .menu-bottom { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.menu-top { min-height: 60px; }
.menu-top .section-kicker { margin: 0; }
.menu-top button { display: none; }
.has-menu .menu-top button { display: flex; }
.menu-links { margin: auto 0; padding: 24px 0; }
.menu-links a { display: flex; align-items: center; gap: 28px; padding: 10px 0; border-bottom: 1px solid var(--line); transition: color .3s, padding .4s var(--ease), opacity .5s, transform .5s var(--ease); }
.menu-link-title { font-size: clamp(42px, 6.4vw, 88px); line-height: 1.15; letter-spacing: -.055em; }
.menu-index { font-size: 11px; color: var(--amber); align-self: flex-start; margin-top: 20px; }
.menu-link-caption { margin-left: auto; color: var(--muted); font-size: 13px; }
.menu-link-arrow { font-size: 40px; width: 70px; text-align: right; font-weight: 300; }
.menu-links a:hover, .menu-links a[aria-current] { color: var(--cyan); padding-inline: 16px; }
.has-menu .menu-panel:not(.is-open) .menu-links a { transform: translateY(25px); opacity: 0; }
.menu-panel.is-open .menu-links a:nth-child(2) { transition-delay: .04s; }
.menu-panel.is-open .menu-links a:nth-child(3) { transition-delay: .08s; }
.menu-panel.is-open .menu-links a:nth-child(4) { transition-delay: .12s; }
.menu-panel.is-open .menu-links a:nth-child(5) { transition-delay: .16s; }
.menu-bottom { padding-top: 22px; font-size: 11px; letter-spacing: .1em; color: var(--muted); }
.menu-orbit { position: absolute; pointer-events: none; width: 70vw; height: 70vw; right: -25vw; top: -15vw; border: 1px solid #63e8ff24; border-radius: 50%; box-shadow: 0 0 150px #63e8ff0a, inset 0 0 150px #63e8ff09; }
.menu-panel { overflow: clip; }
/* First scene */
.hero-section { position: relative; padding-top: 145px; min-height: 880px; min-height: max(820px, 100svh); overflow: clip; background: radial-gradient(ellipse at 70% 42%, #17354766, transparent 45%), radial-gradient(ellipse at 95% 90%, #b17d3c13, transparent 40%), var(--night); }
.hero-section::before { content: ''; position: absolute; left: 4%; right: 4%; top: 94px; height: 1px; background: var(--line); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 30px; position: relative; z-index: 1; }
.hero-copy { position: relative; z-index: 3; padding-block: 26px; }
.hero-eyebrow { color: var(--muted); font-size: 10px; letter-spacing: .11em; text-transform: uppercase; display: flex; align-items: center; gap: 10px; margin-bottom: 27px; }
.status-light { display: inline-block; flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 14px #63e8ff88; }
.hero-title { font-size: clamp(68px, 8.8vw, 132px); line-height: .96; letter-spacing: -.065em; font-weight: 500; margin-left: -5px; }
.hero-title > span { display: block; }
.outline-text { color: transparent; -webkit-text-stroke: 1px #b6c9d3; }
.name-period { color: var(--amber); -webkit-text-stroke: 0; }
.hero-statement { margin-top: 26px; font-size: clamp(22px, 2.8vw, 38px); line-height: 1.25; letter-spacing: -.035em; }
.hero-lead { color: var(--muted); max-width: 470px; font-size: 13px; line-height: 1.85; margin-top: 20px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-top: 30px; }
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 24px; position: relative; isolation: isolate; border-radius: 100px; padding: 17px 24px; font-size: 12px; font-weight: 600; line-height: 1.3; border: 1px solid transparent; overflow: hidden; transform: translate(var(--magnetic-x, 0px), var(--magnetic-y, 0px)); transition: transform .35s var(--ease), box-shadow .3s, border-color .3s; }
.btn span { font-size: 21px; font-weight: 400; transition: transform .3s; }
.btn::before { content: ''; position: absolute; z-index: -1; inset: 0; border-radius: inherit; background: var(--white); transform: translateY(105%); transition: transform .5s var(--ease); }
.btn:hover::before { transform: translateY(0); }
.btn:hover span { transform: translate(2px, -2px); }
.btn-primary { background: var(--cyan); color: var(--night); }
.btn-primary:hover { box-shadow: 0 0 32px #63e8ff28; }
.btn-outline { border-color: #a7c5d149; background: transparent; }
.btn-outline::before { background: #63e8ff19; }
.hero-contact-link { font-size: 11px; color: var(--white); padding-block: 12px; border-bottom: 1px solid var(--line); }
.hero-contact-link span { color: var(--amber); margin-left: 7px; }
.hero-portrait-scene { position: relative; width: 100%; max-width: 530px; justify-self: end; margin-top: 0; }
.hero-portrait { position: relative; width: 85%; margin: 0 auto; aspect-ratio: .81; border-radius: 45% 45% 24% 24% / 35% 35% 19% 19%; overflow: hidden; background: linear-gradient(160deg, #263f50, #111a28); border: 1px solid #8dd1e24d; box-shadow: 0 0 70px #63e8ff09; }
.hero-portrait::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, #081120 2%, #08112033 22%, transparent 45%); pointer-events: none; }
.hero-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; mix-blend-mode: luminosity; opacity: .93; }
.portrait-halo { position: absolute; inset: -14%; border-radius: 50%; background: radial-gradient(ellipse, #63e8ff0e 20%, transparent 63%); }
.portrait-orbit { position: absolute; inset: 24% -8%; border: 1px solid #63e8ff38; border-radius: 50%; transform: rotate(-32deg); z-index: 2; pointer-events: none; }
.portrait-orbit::after { content: ''; width: 7px; height: 7px; position: absolute; top: 26%; right: 4%; background: var(--amber); border-radius: 50%; box-shadow: 0 0 20px #ffbe78aa; }
.portrait-label { position: absolute; z-index: 3; border: 1px solid #8cadc333; background: #0c1724d9; backdrop-filter: blur(12px); border-radius: 6px; font-size: 9px; letter-spacing: .12em; }
.portrait-label-top { top: 10%; right: -2%; padding: 14px 17px; transform: rotate(7deg); }
.portrait-label-top > span { color: var(--amber); font-size: 20px; margin-right: 9px; vertical-align: middle; }
.portrait-label-bottom { display: flex; align-items: center; gap: 15px; bottom: 10%; left: -3%; padding: 16px 21px; transform: rotate(-5deg); color: var(--muted); }
.portrait-label-bottom strong { color: var(--white); font-weight: 500; }
.code-symbol { color: var(--cyan); font-size: 32px; letter-spacing: -.12em; }
.portrait-caption { display: block; margin-top: 24px; text-align: center; font-size: 9px; text-transform: uppercase; letter-spacing: .15em; color: var(--muted); }
.hero-cosmos { position: absolute; inset: 0; pointer-events: none; transform: translateY(var(--parallax-y, 0px)); }
.cosmos-orbit { position: absolute; width: 1000px; height: 640px; border: 1px solid #a2c4d410; border-radius: 50%; right: -8%; top: 7%; transform: rotate(-33deg); }
.orbit-two { width: 1150px; height: 820px; top: -2%; right: -15%; }
.cosmos-star { position: absolute; font-size: 37px; font-weight: 300; color: var(--amber); }
.star-one { left: 49%; top: 18%; }
.star-two { right: 9%; bottom: 17%; color: var(--cyan); font-size: 45px; }
.cosmos-coordinate { position: absolute; right: 30px; top: 50%; writing-mode: vertical-rl; font-size: 9px; color: #a8c4d35c; letter-spacing: .13em; }
.hero-bottom { display: flex; justify-content: space-between; align-items: center; gap: 25px; padding-block: 44px 55px; position: relative; z-index: 1; }
.scroll-cue { display: flex; align-items: center; gap: 15px; font-size: 9px; letter-spacing: .14em; color: var(--muted); }
.scroll-cue-icon { height: 45px; width: 30px; border: 1px solid var(--line); border-radius: 30px; display: grid; place-items: center; color: var(--cyan); font-size: 18px; }
.scroll-cue:hover .scroll-cue-icon { border-color: var(--cyan); }
.hero-stats { display: flex; gap: 45px; }
.hero-stats > div { display: flex; align-items: center; gap: 14px; }
.hero-stats strong { font-size: 31px; line-height: 1; font-weight: 400; letter-spacing: -.05em; }
.hero-stats strong span { color: var(--amber); font-size: 21px; margin-left: 3px; }
.hero-stats > div > span { font-size: 10px; color: var(--muted); }
/* Chapters and project showcases */
.portfolio-section { position: relative; padding-block: 115px; }
.sculpted-section { border-radius: 80px 80px 0 0; }
.projects-section { background: #0b1424; border-top: 1px solid #9abac326; }
.section-kicker { font-size: 10px; letter-spacing: .18em; font-weight: 500; color: var(--cyan); margin-bottom: 25px; text-transform: uppercase; }
.section-kicker > span { color: var(--muted); margin-right: 13px; }
.section-heading { margin-bottom: 60px; }
.section-heading-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; }
.section-heading-aside { color: var(--muted); max-width: 310px; font-size: 13px; line-height: 1.9; padding-bottom: 8px; }
.section-heading-aside .text-link { margin-top: 24px; }
.text-link { display: inline-flex; align-items: center; gap: 24px; font-size: 12px; color: var(--white); border-bottom: 1px solid #9fc0cc45; padding-bottom: 9px; transition: color .3s, border-color .3s; }
.text-link span { color: var(--cyan); font-size: 23px; transition: transform .3s; }
.text-link:hover { color: var(--cyan); border-color: var(--cyan); }
.text-link:hover span { transform: translate(3px,-3px); }
.project-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 55px 32px; align-items: start; }
.project-card { min-width: 0; position: relative; transform: perspective(1000px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)); transition: transform .4s var(--ease); }
.project-card:not(.project-card-featured):nth-child(odd) { margin-top: 80px; }
.project-card-featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1.4fr 1fr; align-items: center; border: 1px solid var(--line); border-radius: 24px; background: #101d30; overflow: hidden; margin-bottom: 15px; }
.project-visual { display: block; position: relative; padding: 32px; background: linear-gradient(135deg, #223a47, #152638 75%); border-radius: 16px; overflow: hidden; aspect-ratio: 1.5; }
.project-card:nth-child(3n + 2) .project-visual { background: linear-gradient(145deg, #273039, #2c2825); }
.project-card:nth-child(3n) .project-visual { background: linear-gradient(145deg, #1c3245, #192333); }
.project-visual::before, .service-card::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(350px circle at var(--pointer-x,50%) var(--pointer-y,50%), #63e8ff17, transparent 80%); opacity: 0; transition: opacity .4s; z-index: 1; }
.project-card:hover .project-visual::before, .service-card:hover::before { opacity: 1; }
.project-visual img { width: 100%; height: 100%; object-fit: contain; border-radius: 5px; box-shadow: 0 20px 35px #02061255; transition: transform .8s var(--ease); }
.project-card:hover .project-visual img { transform: scale(1.035) translateY(-3px); }
.project-card-featured .project-visual { border-radius: 0; aspect-ratio: 1.3; padding: 38px; }
.project-visual-arrow { position: absolute; right: 18px; bottom: 18px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: var(--night); background: var(--white); font-size: 20px; z-index: 2; transition: background .3s, transform .3s; }
.project-card:hover .project-visual-arrow { background: var(--cyan); transform: rotate(45deg); }
.project-content { padding: 25px 0 0; min-width: 0; }
.project-card-featured .project-content { padding: 35px; }
.project-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--cyan); text-transform: uppercase; font-size: 9px; letter-spacing: .1em; margin-bottom: 16px; }
.project-meta strong { font-size: 8px; font-weight: 400; color: var(--amber); }
.project-number { color: var(--muted); font-size: 11px; }
.project-content h2, .project-content h3 { font-size: clamp(25px, 2.4vw, 35px); margin-bottom: 14px; }
.project-content > p { font-size: 12px; color: var(--muted); line-height: 1.85; }
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 19px; }
.project-tags span { font-size: 9px; color: #bdd0db; padding: 4px 9px; border: 1px solid var(--line); border-radius: 20px; }
.project-content .project-role { margin-top: 16px; font-size: 11px; }
.project-content .text-link { margin-top: 20px; }
.project-placeholder { height: 100%; width: 100%; position: relative; display: grid; place-items: center; background: #0c1725; border: 1px solid var(--line); border-radius: 5px; color: var(--cyan); font-size: 32px; text-align: center; }
.project-placeholder-orbit { position: absolute; inset: 15% 25%; border: 1px solid #63e8ff44; border-radius: 50%; transform: rotate(-25deg); }
.section-end { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 64px; padding-top: 30px; border-top: 1px solid var(--line); }
.section-end > span { font-size: 11px; color: var(--muted); }
.empty-state { grid-column: 1/-1; border: 1px solid var(--line); border-radius: 20px; padding: 50px; }
.empty-state > span { font-size: 40px; color: var(--cyan); }
.empty-state p { margin-top: 14px; color: var(--muted); }
.empty-state .text-link { margin-top: 22px; }
/* About, services and stack */
.about-section { background: radial-gradient(ellipse at 15% 50%, #16485521, transparent 55%); }
.about-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 70px; align-items: center; }
.about-emblem { aspect-ratio: 1; position: relative; display: grid; place-items: center; }
.emblem-star { font-size: clamp(150px, 19vw, 280px); line-height: 1; color: var(--cyan); text-shadow: 0 0 85px #63e8ff26; }
.emblem-orbit { position: absolute; inset: 18% -2%; border: 1px solid #63e8ff40; border-radius: 50%; transform: rotate(-32deg); }
.emblem-orbit::after { content: ''; width: 11px; height: 11px; position: absolute; top: 16%; right: 10%; background: var(--amber); border-radius: 50%; box-shadow: 0 0 25px #ffbe7844; }
.emblem-caption { position: absolute; bottom: 8%; font-size: 9px; letter-spacing: .16em; color: var(--muted); }
.about-copy > p:not(.section-kicker) { margin-top: 30px; max-width: 540px; color: var(--muted); font-size: 14px; line-height: 1.95; }
.about-copy .text-link { margin-top: 30px; }
.services-section { background: #0d1929; border-top: 1px solid var(--line); border-radius: 0 100px 0 0; }
.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.service-card { position: relative; padding: 30px 24px 64px; border: 1px solid var(--line); border-radius: 35px 8px 35px 8px; background: #0b1423; transform: perspective(1000px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)); transition: transform .4s var(--ease), border-color .3s; }
.service-card:nth-child(even) { margin-top: 35px; margin-bottom: -35px; border-radius: 8px 35px 8px 35px; }
.service-card:hover { border-color: #63e8ff70; }
.service-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 45px; }
.service-card-top i { color: var(--cyan); font-size: 32px; }
.service-card-top > span { color: var(--muted); font-size: 10px; }
.service-card h3 { font-size: 23px; letter-spacing: -.04em; }
.service-card p { color: var(--muted); font-size: 12px; margin-top: 18px; line-height: 1.85; }
.service-tags { display: block; margin-top: 26px; color: #8eacba; font-size: 8px; text-transform: uppercase; letter-spacing: .04em; }
.service-arrow { position: absolute; bottom: 18px; right: 24px; font-size: 24px; color: var(--amber); }
.skills-section { padding-top: 145px; }
.skills-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 95px; }
.section-description { color: var(--muted); font-size: 13px; margin-top: 28px; }
.stack-decoration { display: block; margin-top: 55px; color: #455465; font-size: 95px; font-weight: 200; letter-spacing: .05em; }
.stack-decoration span { color: var(--amber); font-size: 60px; vertical-align: middle; }
.skill-group { padding-block: 24px; border-top: 1px solid var(--line); }
.skill-group-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.skill-group-heading h3 { font-size: 22px; }
.skill-group-heading > span { color: var(--amber); font-size: 10px; }
.skill-list { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-pill { display: inline-flex; align-items: center; gap: 12px; border: 1px solid var(--line); padding: 6px 11px; border-radius: 30px; color: #c1cfd8; font-size: 11px; }
.skill-level { color: #8ca5b5; font-size: 9px; }
.journey-section { background: linear-gradient(130deg, #111c2c, #091322); border-radius: 90px 0 0 0; }
.timeline-list { position: relative; }
.timeline-card { display: grid; grid-template-columns: 190px 1fr 35px; gap: 38px; padding: 36px 0; border-top: 1px solid var(--line); position: relative; }
.timeline-date { color: var(--cyan); font-size: 38px; line-height: 1.1; letter-spacing: -.04em; }
.timeline-date > span { display: block; font-size: 11px; color: var(--muted); margin-top: 13px; letter-spacing: 0; }
.timeline-content { padding-left: 28px; border-left: 1px solid #63e8ff30; position: relative; }
.timeline-content::before { content: ''; position: absolute; left: -4px; top: 7px; width: 7px; height: 7px; background: var(--cyan); border-radius: 50%; box-shadow: 0 0 15px #63e8ff55; }
.timeline-org { color: var(--amber); font-size: 10px; letter-spacing: .06em; margin-bottom: 12px; text-transform: uppercase; }
.timeline-org span { color: var(--muted); }
.timeline-content h2, .timeline-content h3 { font-size: 29px; margin-bottom: 18px; }
.timeline-content > p:last-child { color: var(--muted); max-width: 720px; font-size: 13px; line-height: 1.9; }
.timeline-marker { font-size: 28px; color: var(--muted); }
.timeline-end { margin-top: 35px; color: var(--muted); font-size: 12px; }
/* Personal gallery and contact */
.photo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.photo-card { position: relative; display: block; border: 0; padding: 0; border-radius: 80px 8px 8px 8px; overflow: hidden; background: var(--surface); }
.photo-card:nth-child(even) { margin-top: 45px; border-radius: 8px 8px 80px 8px; }
.photo-card img { aspect-ratio: .85; object-fit: cover; width: 100%; filter: saturate(.75); transition: transform .6s var(--ease), filter .5s; }
.photo-card:hover img { transform: scale(1.035); filter: saturate(1); }
.photo-card > span { position: absolute; bottom: 14px; right: 18px; font-size: 23px; }
.contact-section { border-radius: 90px 90px 0 0; background: radial-gradient(ellipse at 5% 60%, #15495740, transparent 55%), #0c1928; border-top: 1px solid #63e8ff27; overflow: clip; }
.contact-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 80px; position: relative; z-index: 1; }
.contact-copy h2 { font-size: clamp(40px, 4.8vw, 72px); position: relative; }
.contact-star { color: var(--amber); display: inline-block; font-size: 60px; margin-left: 20px; }
.contact-copy > p:not(.section-kicker) { color: var(--muted); font-size: 13px; max-width: 370px; margin-top: 26px; }
.contact-list { margin-top: 40px; display: flex; align-items: flex-start; flex-direction: column; gap: 15px; }
.contact-list a { display: flex; justify-content: space-between; gap: 25px; font-size: 14px; max-width: 100%; overflow-wrap: anywhere; }
.contact-list a:hover { color: var(--cyan); }
.contact-list a span { color: var(--cyan); }
.contact-orbit { position: absolute; width: 850px; height: 460px; border: 1px solid #63e8ff13; border-radius: 50%; left: -25%; bottom: -130px; transform: rotate(-30deg); }
.contact-card { border: 1px solid var(--line); border-radius: 22px; padding: 36px; background: #091321b3; }
.form-heading { font-size: 9px; letter-spacing: .15em; color: var(--muted); display: flex; align-items: center; gap: 10px; margin-bottom: 30px; }
.form-field { margin-top: 23px; }
.form-field label { display: block; font-size: 11px; color: var(--white); margin-bottom: 5px; }
.form-field label > span { color: var(--cyan); }
.form-field label small { font-size: 10px; color: var(--muted); }
.form-field input, .form-field textarea { border: 0; border-bottom: 1px solid #abc8d32b; border-radius: 0; padding: 9px 0 12px; width: 100%; background: transparent; color: var(--white); font-size: 13px; resize: vertical; }
.form-field input::placeholder, .form-field textarea::placeholder { color: #7f95a7; }
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--cyan); }
.form-field [aria-invalid=true] { border-color: #ffb49c; }
.contact-card .btn { margin-top: 25px; width: 100%; justify-content: space-between; }
.form-note { margin-top: 15px; font-size: 9px; color: var(--muted); }
.field-error, .form-errors { font-size: 12px; color: #ffb49c; }
.form-errors { border-left: 2px solid #ffb49c; padding: 12px; background: #ffb49c0b; }
.form-errors ul { padding-left: 18px; }
.site-alert { position: relative; z-index: 10; margin: 115px auto -90px; width: min(720px, calc(100% - 40px)); padding: 18px 25px; background: #153c3d; border: 1px solid var(--cyan); border-radius: 12px; font-size: 14px; }
/* Footer */
.site-footer { position: relative; background: var(--night); padding-block: 55px 25px; }
.footer-top, .footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 28px; }
.footer-top { padding-bottom: 45px; }
.footer-brand { display: flex; align-items: center; gap: 22px; }
.footer-brand img { width: 65px; height: 65px; }
.footer-brand > span { font-size: 17px; line-height: 1.3; letter-spacing: -.02em; }
.back-to-top { font-size: 11px; display: flex; align-items: center; gap: 23px; }
.back-to-top span { width: 45px; height: 45px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--cyan); font-size: 20px; }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 23px; font-size: 9px; color: var(--muted); }
.whatsapp-float { position: fixed; right: 25px; bottom: 24px; width: 46px; height: 46px; border: 1px solid #8baeba54; background: #0b1d2eeb; border-radius: 50%; z-index: 60; display: grid; place-items: center; color: var(--cyan); box-shadow: 0 4px 30px #0003; transform: translate(var(--magnetic-x, 0px), var(--magnetic-y, 0px)); }
.whatsapp-float i { font-size: 25px; }
/* Inner pages */
.page-hero { padding: 170px 0 75px; position: relative; overflow: clip; background: radial-gradient(ellipse at 90% 60%, #1e4b6033, transparent 60%); }
.display-title { font-size: clamp(54px, 7.5vw, 106px); max-width: 980px; letter-spacing: -.065em; }
.page-lead { margin-top: 28px; max-width: 660px; font-size: 16px; color: var(--muted); line-height: 1.85; }
.page-hero-row { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 50px; }
.hero-caption { color: var(--muted); font-size: 11px; white-space: nowrap; }
.hero-orbit { position: absolute; right: -15%; top: 30%; width: 650px; height: 320px; border: 1px solid #63e8ff20; border-radius: 50%; transform: rotate(-35deg); pointer-events: none; }
.page-hero + .portfolio-section { padding-top: 55px; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 20px; border-top: 1px solid var(--line); padding-top: 30px; margin-top: 70px; font-size: 12px; }
.pagination > span { color: var(--muted); }
.pagination .disabled { opacity: .4; }
.pagination a { border: 1px solid var(--line); border-radius: 30px; padding: 10px 20px; }
.pagination a:hover { border-color: var(--cyan); }
.detail-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 65px; align-items: end; position: relative; }
.project-copy > .text-link { margin-bottom: 40px; }
.project-copy .display-title { font-size: clamp(48px, 6vw, 88px); }
.detail-actions { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 30px; }
.detail-card { border-top: 1px solid var(--line); }
.detail-card dl, .project-facts dl { margin: 0; }
.detail-card dl > div, .project-facts dl > div { display: grid; grid-template-columns: 100px 1fr; gap: 25px; padding-block: 15px; border-bottom: 1px solid var(--line); font-size: 12px; }
.detail-card dt, .project-facts dt { color: var(--muted); }
.detail-card dd, .project-facts dd { margin: 0; }
.project-gallery { min-width: 0; }
.gallery-stage { padding: 40px; background: linear-gradient(130deg, #1b3545, #142132); border: 1px solid var(--line); border-radius: 24px; }
.gallery-stage > button, .gallery-stage > a, button.gallery-stage { display: block; border: 0; width: 100%; background: transparent; padding: 0; }
.gallery-stage img { display: block; width: 100%; height: auto; max-height: 75vh; object-fit: contain; border-radius: 8px; }
.gallery-controls { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 20px; }
.gallery-arrow { width: 44px; height: 44px; background: transparent; border: 1px solid var(--line); border-radius: 50%; font-size: 22px; }
.gallery-arrow:hover { border-color: var(--cyan); color: var(--cyan); }
.gallery-controls [data-gallery-count] { color: var(--muted); font-size: 12px; }
.gallery-thumbs { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.gallery-thumb { padding: 4px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); width: 110px; }
.gallery-thumb img { width: 100%; height: 65px; object-fit: contain; border-radius: 3px; }
.gallery-thumb.is-active, .gallery-thumb[aria-current=true] { border-color: var(--cyan); }
.gallery-caption { margin-top: 16px; color: var(--muted); font-size: 11px; }
.project-story { display: grid; grid-template-columns: 1.4fr 1fr; gap: 90px; margin-top: 85px; padding-top: 65px; border-top: 1px solid var(--line); }
.project-story h2 { font-size: 44px; margin-bottom: 27px; }
.project-story h3 { font-size: 23px; margin-bottom: 20px; }
.project-story-copy p, .story-text { color: var(--muted); font-size: 15px; line-height: 1.95; white-space: pre-line; overflow-wrap: anywhere; }
.project-facts > div { margin-bottom: 32px; }
.project-facts p { color: var(--muted); font-size: 13px; }
.project-cta { display: flex; align-items: center; justify-content: space-between; gap: 35px; margin-top: 80px; padding: 40px; border-radius: 35px 5px; border: 1px solid var(--line); background: #132838; }
.project-cta h2 { font-size: 35px; }
.project-cta p { color: var(--muted); margin-top: 12px; font-size: 13px; }
/* Native dialog stays above every navigation layer. */
.lightbox { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; padding: 24px 38px; margin: 0; background: #050b15f5; color: var(--white); border: 0; }
.lightbox[open] { display: flex; flex-direction: column; }
.lightbox::backdrop { background: #02050bed; backdrop-filter: blur(10px); }
.lightbox-toolbar { display: flex; justify-content: space-between; align-items: center; flex: 0 0 auto; font-size: 12px; }
.lightbox-stage { flex: 1; min-height: 0; display: grid; place-items: center; padding-block: 20px; }
.lightbox-stage img { max-height: 100%; max-width: 100%; width: auto; height: auto; object-fit: contain; }
.lightbox-controls { display: flex; justify-content: center; align-items: center; gap: 25px; font-size: 11px; color: var(--muted); }
.icon-button { border: 1px solid var(--line); border-radius: 40px; padding: 9px 17px; background: transparent; display: inline-flex; align-items: center; gap: 20px; font-size: 12px; }
.icon-button span { font-size: 25px; line-height: 1; }
.icon-button:hover { border-color: var(--cyan); color: var(--cyan); }
/* Loader: content is visible by default and the overlay fails open in CSS. */
.page-loader { position: fixed; inset: 0; display: grid; place-items: center; background: #060b18; z-index: 300; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .3s, visibility .3s; }
.js-intro .page-loader { opacity: 1; visibility: visible; animation: loader-fail-open 1.2s forwards; }
.is-leaving .page-loader { opacity: 1; visibility: visible; }
.loader-universe { position: relative; display: grid; place-items: center; width: 320px; height: 320px; }
.loader-logo { width: 200px; height: 200px; filter: drop-shadow(0 0 30px #63e8ff30); }
.js-intro .loader-logo { animation: logo-reveal .7s var(--ease) both; }
.loader-orbit { position: absolute; inset: 55px -15px; border: 1px solid #63e8ff55; border-radius: 50%; transform: rotate(-32deg); }
.loader-orbit::after { content: ''; position: absolute; width: 7px; height: 7px; right: 23px; top: 20%; border-radius: 50%; background: var(--amber); box-shadow: 0 0 20px #ffbe78aa; }
.loader-orbit-two { inset: 20px 60px; transform: rotate(-32deg); border-color: #63e8ff22; }
.loader-caption { position: absolute; bottom: 10px; letter-spacing: .25em; font-size: 9px; color: var(--muted); }
@keyframes logo-reveal { from { clip-path: inset(100% 0 0); transform: translateY(20px); opacity: 0; } to { clip-path: inset(0); transform: translateY(0); opacity: 1; } }
@keyframes loader-fail-open { 0%, 65% { opacity: 1; visibility: visible; } 100% { opacity: 0; visibility: hidden; } }
/* Motion is progressive enhancement, never a prerequisite to read content. */
.has-reveal [data-reveal] { transition: opacity .8s var(--ease), translate .9s var(--ease); }
.has-reveal [data-reveal]:not(.is-visible) { opacity: 0; translate: 0 24px; }
.has-reveal [data-reveal].is-visible { opacity: 1; translate: 0 0; }
.cursor-ring, .cursor-dot { display: none; position: fixed; top: 0; left: 0; pointer-events: none; z-index: 400; border-radius: 50%; opacity: 0; }
.has-custom-cursor .cursor-ring { display: grid; place-items: center; width: 40px; height: 40px; margin: -20px; border: 1px solid #63e8ff99; transition: width .25s, height .25s, margin .25s, background .25s, opacity .2s; }
.has-custom-cursor .cursor-dot { display: block; width: 5px; height: 5px; margin: -2.5px; background: var(--amber); transition: opacity .2s; }
.cursor-visible .cursor-ring, .cursor-visible .cursor-dot { opacity: 1; }
.cursor-active .cursor-ring { width: 78px; height: 78px; margin: -39px; background: #63e8ffdf; border-color: var(--cyan); color: var(--night); }
.cursor-active .cursor-dot, .cursor-native .cursor-ring, .cursor-native .cursor-dot { opacity: 0; }
.cursor-ring span { font-size: 10px; font-weight: 600; letter-spacing: .04em; }
@media (hover: hover) and (pointer: fine) {
    .has-custom-cursor.cursor-visible:not(.cursor-native), .has-custom-cursor.cursor-visible:not(.cursor-native) a, .has-custom-cursor.cursor-visible:not(.cursor-native) button { cursor: none; }
    .has-custom-cursor input, .has-custom-cursor textarea { cursor: text; }
}
/* Responsive compositions */
@media (min-width: 1600px) { .hero-section { padding-top: 180px; } .hero-bottom { padding-top: 80px; } }
@media (max-width: 1100px) {
    .portfolio-container { width: calc(100% - 64px); }
    .header-signature { display: none; }
    .hero-section { min-height: auto; padding-top: 135px; }
    .hero-title { font-size: clamp(70px, 9vw, 100px); }
    .hero-eyebrow { max-width: 300px; }
    .hero-portrait-scene { width: 100%; }
    .hero-contact-link { font-size: 10px; }
    .hero-actions { gap: 16px; }
    .portrait-label-top { right: -1%; font-size: 8px; }
    .portrait-label-bottom { left: -3%; font-size: 8px; padding: 12px; }
    .portrait-caption { font-size: 8px; }
    .service-grid { grid-template-columns: 1fr 1fr; gap: 22px; }
    .service-card:nth-child(even) { margin: 0; }
    .service-card { padding-bottom: 55px; }
    .service-card-top { margin-bottom: 30px; }
    .service-card p { max-width: 340px; }
    .skills-layout { gap: 50px; }
    .contact-grid { gap: 40px; }
    .contact-card { padding: 27px; }
    .project-card-featured .project-content { padding: 25px; }
    .project-card-featured .project-visual { padding: 23px; aspect-ratio: 1.05; }
    .project-visual { padding: 24px; }
    .detail-grid { gap: 35px; }
    .project-story { gap: 45px; }
    .timeline-card { grid-template-columns: 145px 1fr 25px; gap: 25px; }
}
@media (max-width: 767px) {
    :root { --header-height: 78px; }
    .portfolio-container { width: calc(100% - 40px); }
    .header-inner { gap: 18px; }
    .brand-mark, .brand-mark img { width: 62px; height: 62px; }
    .header-actions { gap: 18px; }
    .header-contact { font-size: 10px; gap: 8px; }
    .header-contact span { font-size: 18px; }
    .menu-toggle { padding: 9px 12px; gap: 12px; font-size: 10px; }
    .hero-section { padding-top: 113px; }
    .hero-section::before { top: 78px; left: 20px; right: 20px; }
    .hero-grid { grid-template-columns: 1fr; gap: 36px; }
    .hero-copy { padding-block: 0; }
    .hero-eyebrow { font-size: 8px; max-width: none; margin-bottom: 22px; letter-spacing: .075em; }
    .hero-title { font-size: clamp(74px, 16.8vw, 120px); }
    .hero-statement { font-size: 30px; margin-top: 22px; }
    .hero-lead { max-width: 480px; font-size: 12px; margin-top: 17px; }
    .hero-actions { gap: 18px; margin-top: 25px; }
    .btn { padding: 15px 19px; font-size: 11px; gap: 17px; }
    .hero-contact-link { font-size: 10px; }
    .hero-portrait-scene { max-width: 360px; justify-self: center; margin-block: 15px 0; }
    .hero-portrait { aspect-ratio: .95; width: 82%; }
    .portrait-label-top { right: 0; top: 7%; }
    .portrait-label-bottom { left: 0; bottom: 13%; }
    .portrait-orbit { inset: 20% 0; }
    .portrait-caption { margin-top: 19px; font-size: 7px; }
    .hero-bottom { padding-block: 40px 48px; align-items: flex-end; }
    .hero-stats { gap: 22px; }
    .hero-stats > div { display: block; }
    .hero-stats strong { display: block; font-size: 26px; margin-bottom: 8px; }
    .hero-stats > div > span { font-size: 8px; }
    .scroll-cue { gap: 9px; font-size: 7px; max-width: 110px; }
    .scroll-cue-icon { flex: 0 0 26px; }
    .star-one { top: 12%; left: auto; right: 9%; font-size: 22px; }
    .star-two { bottom: 17%; right: 6%; font-size: 30px; }
    .cosmos-coordinate { display: none; }
    .portfolio-section { padding-block: 70px; }
    .sculpted-section { border-radius: 40px 40px 0 0; }
    .section-kicker { font-size: 8px; letter-spacing: .13em; margin-bottom: 20px; }
    .section-heading { margin-bottom: 35px; }
    .section-heading-row { flex-direction: column; align-items: flex-start; gap: 25px; }
    .section-heading-aside { max-width: 100%; font-size: 12px; }
    .section-heading-aside .text-link { margin-top: 15px; }
    h2 { font-size: clamp(34px, 7.8vw, 48px); }
    .project-grid { grid-template-columns: 1fr; gap: 36px; }
    .project-card-featured { display: block; border-radius: 18px; margin: 0; }
    .project-card-featured .project-visual { aspect-ratio: 1.45; padding: 25px; }
    .project-card-featured .project-content { padding: 25px; }
    .project-card:not(.project-card-featured):nth-child(odd) { margin-top: 0; }
    .project-visual { aspect-ratio: 1.4; padding: 25px; }
    .project-content { padding-top: 22px; }
    .project-content h2, .project-content h3 { font-size: 28px; }
    .section-end { margin-top: 35px; flex-direction: column; align-items: flex-start; }
    .about-grid { grid-template-columns: 1fr; gap: 20px; }
    .about-emblem { width: 220px; justify-self: center; }
    .emblem-star { font-size: 150px; }
    .emblem-caption { font-size: 6px; }
    .about-copy > p:not(.section-kicker) { font-size: 13px; }
    .service-grid { gap: 14px; }
    .service-card { padding: 24px 18px 55px; }
    .service-card h3 { font-size: 23px; }
    .service-card p { font-size: 11px; }
    .service-tags { font-size: 7px; }
    .skills-layout { grid-template-columns: 1fr; gap: 0; }
    .stack-decoration { display: none; }
    .timeline-card { grid-template-columns: 1fr; gap: 22px; padding-block: 30px; }
    .timeline-date { display: flex; align-items: center; gap: 12px; font-size: 30px; }
    .timeline-date > span { margin: 0; }
    .timeline-content { padding-left: 22px; }
    .timeline-content h2, .timeline-content h3 { font-size: 26px; }
    .timeline-marker { display: none; }
    .timeline-content > p:last-child { font-size: 12px; }
    .photo-grid { grid-template-columns: 1fr 1fr; gap: 15px; }
    .photo-card { border-radius: 45px 6px 6px 6px; }
    .photo-card:nth-child(even) { margin-top: 28px; border-radius: 6px 6px 45px 6px; }
    .contact-grid { grid-template-columns: 1fr; gap: 40px; }
    .contact-copy h2 { font-size: 45px; }
    .contact-star { font-size: 40px; }
    .contact-card { padding: 25px; }
    .footer-brand { gap: 15px; }
    .footer-brand img { width: 50px; height: 50px; }
    .footer-brand > span { font-size: 14px; }
    .footer-top { align-items: flex-start; }
    .back-to-top { font-size: 9px; gap: 10px; }
    .back-to-top span { width: 35px; height: 35px; }
    .footer-bottom { flex-direction: column; align-items: flex-start; gap: 10px; font-size: 8px; }
    .whatsapp-float { width: 42px; height: 42px; right: 16px; bottom: 16px; }
    .menu-inner { padding-block: 20px; }
    .menu-link-title { font-size: clamp(40px, 11vw, 70px); }
    .menu-link-caption { display: none; }
    .menu-index { font-size: 9px; margin-top: 13px; }
    .menu-links a { padding-block: 18px; gap: 18px; }
    .menu-link-arrow { margin-left: auto; width: auto; font-size: 30px; }
    .menu-bottom { font-size: 8px; flex-wrap: wrap; }
    .page-hero { padding: 132px 0 50px; }
    .display-title { font-size: clamp(46px, 11vw, 75px); }
    .page-lead { font-size: 14px; }
    .page-hero-row { flex-direction: column; align-items: flex-start; gap: 25px; }
    .detail-grid { grid-template-columns: 1fr; gap: 40px; }
    .project-copy .display-title { font-size: clamp(44px, 10vw, 70px); overflow-wrap: anywhere; }
    .project-copy > .text-link { margin-bottom: 28px; }
    .gallery-stage { padding: 14px; border-radius: 14px; }
    .gallery-thumb { width: 78px; }
    .gallery-thumb img { height: 47px; }
    .project-story { grid-template-columns: 1fr; gap: 30px; margin-top: 45px; padding-top: 40px; }
    .project-story h2 { font-size: 35px; }
    .project-story-copy p, .story-text { font-size: 14px; }
    .project-cta { flex-direction: column; align-items: flex-start; padding: 26px; margin-top: 40px; }
    .project-cta h2 { font-size: 30px; }
    .pagination { gap: 10px; font-size: 10px; margin-top: 40px; }
    .pagination a { padding: 9px 13px; }
    .lightbox { padding: 18px; }
    .empty-state { padding: 28px; }
}
@media (max-width: 390px) {
    .header-contact { max-width: 110px; line-height: 1.3; }
    .header-actions { gap: 12px; }
    .hero-title { font-size: 72px; }
    .hero-actions { gap: 12px; }
    .hero-contact-link { font-size: 9px; }
    .hero-actions .btn { padding-inline: 15px; font-size: 10px; gap: 12px; }
    .service-grid { grid-template-columns: 1fr; }
    .service-card { padding: 28px 25px 50px; }
    .service-card-top { margin-bottom: 22px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    html { scroll-behavior: auto; }
    .page-loader, .cursor-ring, .cursor-dot { display: none !important; }
    .has-reveal [data-reveal] { opacity: 1 !important; translate: none !important; }
    [data-tilt], [data-magnetic], [data-parallax] { transform: none !important; }
}
@media print {
    .site-header, .menu-panel, .page-loader, .cursor-ring, .cursor-dot, .whatsapp-float, .ambient-light { display: none !important; }
    body { background: white; color: black; }
    .portfolio-section, .hero-section, .page-hero { background: none; padding-block: 25px; }
    [data-reveal] { opacity: 1 !important; translate: none !important; }
}
/* Shared Blade components and accessible labels. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.project-tags { padding: 0; list-style: none; margin-bottom: 0; }
.project-tags li { font-size: 9px; color: #bdd0db; padding: 4px 9px; border: 1px solid var(--line); border-radius: 20px; }
.btn > span:not([aria-hidden]):not(.sr-only), .text-link > span:not([aria-hidden]):not(.sr-only) { font-size: inherit; color: inherit; }
.btn:hover > span:not([aria-hidden]), .text-link:hover > span:not([aria-hidden]) { transform: none; }
.project-placeholder > span > span { display: block; color: var(--muted); font-size: 8px; letter-spacing: .18em; margin-top: 15px; }
.project-placeholder-detail { min-height: 380px; display: flex; flex-direction: column; justify-content: center; gap: 40px; }
.project-placeholder-detail p { font-size: 13px; color: var(--muted); }
.project-detail-hero .back-link { margin-bottom: 32px; }
.gallery-stage { display: block; position: relative; }
.gallery-expand { display: grid; place-items: center; position: absolute; right: 20px; bottom: 20px; width: 40px; height: 40px; border-radius: 50%; color: var(--night); background: var(--cyan); font-size: 23px; }
.gallery-navigation { display: flex; align-items: center; gap: 20px; flex-shrink: 0; }
.gallery-fallback { font-size: 12px; color: var(--cyan); }
.project-showcase + .portfolio-section { padding-top: 0; }
.project-story { margin-top: 0; }
.project-cta.portfolio-section { margin-top: 0; border-radius: 65px 65px 0 0; padding: 70px 0; display: block; }
.project-cta .portfolio-container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 30px; }
.project-cta .section-kicker { width: 100%; margin: 0; }
.project-cta .section-heading { margin: 0; }
.display-title > span { color: var(--cyan); font-family: Georgia, serif; font-style: italic; }
.pagination .is-disabled { opacity: .45; }
.timeline-end { margin-top: 70px; padding-top: 40px; border-top: 1px solid var(--line); }
.timeline-end .section-heading { margin-bottom: 30px; }
.timeline-date > time ~ time { display: block; font-size: 14px; letter-spacing: 0; margin-top: 10px; color: var(--muted); }
.menu-panel::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(600px circle at var(--pointer-x,75%) var(--pointer-y,40%), #63e8ff12, transparent 75%); }
@media (max-width: 767px) {
    .gallery-controls { flex-direction: column; align-items: flex-start; gap: 16px; }
    .gallery-navigation { align-self: flex-end; }
    .gallery-caption { margin-top: 0; }
    .gallery-caption span { display: block; }
    .project-cta.portfolio-section { border-radius: 35px 35px 0 0; padding: 50px 0; }
    .timeline-date > time ~ time { margin: 0; }
}
/* Prevent the enhanced menu from flashing during a deferred script load. */
.js-nav-pending:not(.has-menu) .menu-panel { display: none; }
/* Light follows the chapter; only the visible opening scene breathes. */
.hero-portrait-scene .portrait-halo, .hero-cosmos .cosmos-star { animation-play-state: paused; }
body[data-scene="accueil"] .portrait-halo { animation: halo-breathe 9s ease-in-out infinite; }
body[data-scene="accueil"] .cosmos-star { animation: star-breathe 6s ease-in-out infinite; }
body[data-scene="accueil"] .star-two { animation-delay: -3s; }
@keyframes halo-breathe { 0%, 100% { opacity: .6; scale: .96; } 50% { opacity: 1; scale: 1.08; } }
@keyframes star-breathe { 0%, 100% { opacity: .6; rotate: -8deg; } 50% { opacity: 1; rotate: 8deg; } }
.projects-section::before { content: ''; position: absolute; top: 0; left: 13%; right: 13%; height: 1px; background: linear-gradient(90deg, transparent, #63e8ff77, transparent); }
.services-section::after { content: ''; position: absolute; pointer-events: none; bottom: -1px; left: 0; width: 100%; height: 42px; background: var(--night); clip-path: ellipse(58% 100% at 12% 100%); }
.skills-section::before { content: ''; position: absolute; pointer-events: none; inset: 0; background: radial-gradient(ellipse at 90% 50%, #1b425922, transparent 58%); }
.journey-section::after { content: ''; position: absolute; pointer-events: none; left: 0; bottom: -1px; width: 100%; height: 45px; background: var(--night); clip-path: ellipse(60% 100% at 90% 100%); }
@media (prefers-reduced-motion: reduce) { body[data-scene="accueil"] .portrait-halo, body[data-scene="accueil"] .cosmos-star { animation: none; } }
html { scroll-padding-top: 0; }
.cursor-active .cursor-ring:has([data-cursor-label]:empty) { width: 54px; height: 54px; margin: -27px; background: #63e8ff12; }
@media (max-width: 767px) { .form-field input, .form-field textarea { font-size: 16px; } }
/* Visibility switches immediately on opening so the close control can receive focus. */
html.has-menu .menu-panel { transition: opacity .4s, visibility 0s .4s; }
html.has-menu .menu-panel.is-open { transition: opacity .4s, visibility 0s; }
@media (prefers-reduced-motion: reduce) { html.has-menu .menu-panel { transition: none; } }
