@font-face { font-family: 'Bricolage Grotesque'; src: url('/fonts/bricolage.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'Geist'; src: url('/fonts/geist.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('/fonts/geist-mono.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Caveat'; src: url('/fonts/caveat.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }

:root {
  --ground: #F1F2EC; --surface: #FFFFFF; --ink: #11130F; --text: #2E322B; --muted: #4A4F45;
  --line: #D5D8CE; --line-strong: #B9BDB1; --soft: #E6E8E0;
  --green: #3DDC84; --green-text: #0A7A3E; --violet: #6A4CFF; --violet-text: #5638E8; --violet-soft: #B7B9F7;
  --dark-text: #D6D8CF; --dark-muted: #B9BDB1; --dark-line: #3A3E36;
  --display: 'Bricolage Grotesque', system-ui, sans-serif; --body: 'Geist', system-ui, sans-serif; --mono: 'Geist Mono', ui-monospace, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 17px/1.55 var(--body); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); }
a:hover { color: var(--violet-text); }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; margin: 0; letter-spacing: -0.03em; }
h2 { font-size: clamp(34px, 4.6vw, 56px); line-height: 1.02; }
p { margin: 0; }
strong { color: var(--ink); font-weight: 600; }
.wrap { max-width: 1360px; margin: 0 auto; padding-inline: 24px; }
.section { padding-block: 88px; display: flex; flex-direction: column; gap: 32px; }
.mono { font-family: var(--mono); font-size: 13px; }
.muted { color: var(--muted); }
.lede { font-size: 19px; color: var(--text); max-width: 760px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--ground); padding: 10px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* Logo */
.logo { width: 36px; height: 36px; border-radius: 10px; background: var(--ink); color: var(--ground); display: inline-flex; align-items: center; justify-content: center; font: 500 14px var(--mono); flex: none; }
.logo .cursor { color: var(--green); animation: blink 1.1s steps(1) infinite; }
.logo-sm { width: 28px; height: 28px; border-radius: 8px; font-size: 11px; }
@keyframes blink { 50% { opacity: 0; } }

/* Buttons, chips, links */
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 12px 22px; border-radius: 999px; font: 500 16px var(--body); text-decoration: none; border: 1.5px solid transparent; cursor: pointer; }
.btn-sm { min-height: 44px; padding: 10px 18px; font-size: 15px; }
.btn-dark { background: var(--ink); color: var(--ground); }
.btn-dark:hover { color: var(--ground); background: #2A2E26; }
.btn-green { background: var(--green); color: var(--ink); }
.btn-green:hover { color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ground); border-color: var(--ground); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { align-self: flex-start; font: 13px var(--mono); letter-spacing: .04em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; }
.chip-green { background: var(--green); color: var(--ink); }
.chip-violet { background: var(--violet); color: #FFFFFF; }
.chip-outline { border: 1px solid var(--line-strong); color: var(--muted); padding: 5px 12px; text-transform: none; letter-spacing: 0; }
.pill { font: 12px var(--mono); background: var(--soft); color: var(--ink); padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.uline { text-decoration: none; font-weight: 500; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; background: linear-gradient(var(--violet-text), var(--violet-text)) 0 calc(100% - 8px) / 100% 2px no-repeat; transition: background-size .3s ease; }
.uline:hover { background-size: 0 2px; background-position: 100% calc(100% - 8px); }
.dot { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--ink); flex: none; display: inline-block; }
.dot-green { background: var(--green); }
.dot-violet { background: var(--violet); }

/* Hand-drawn highlight */
.mark { position: relative; isolation: isolate; padding: 0 .22em; }
.mark::before { content: ""; position: absolute; inset: .28em 0 .2em; background: var(--green); opacity: .9; transform: rotate(-2.5deg) skewX(-10deg); border-radius: .25em .7em .3em .8em / .7em .25em .8em .3em; z-index: -1; }

/* Section rhythm */
.band { border-top: 1px solid var(--line); }
.band-soft { background: var(--soft); border-color: var(--line-strong); }
.band-soft .row:hover { background: rgba(255, 255, 255, .55); }
.band-soft .row { border-color: var(--line-strong); }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 13px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: -16px; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.nav { padding-block: 18px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 600 19px var(--display); }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 24px; font-size: 15px; }
.nav-links > a:not(.btn) { text-decoration: none; }
.lang { font: 13px var(--mono); color: var(--muted); }
.lang a { color: var(--muted); }
.lang a[aria-current] { color: var(--ink); text-decoration: none; }

/* Hero */
.hero { padding-block: 48px 64px; display: flex; flex-wrap: wrap; gap: 64px; align-items: center; }
.hero-copy { flex: 999 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.hero h1 { font-size: clamp(44px, 5.4vw, 84px); line-height: .98; letter-spacing: -0.035em; }
.hero h1 .accent { color: var(--violet-text); }
.rotator { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; font: 600 clamp(22px, 2.4vw, 32px) var(--display); letter-spacing: -0.01em; }
.rotator-window { display: inline-block; height: 1.5em; overflow: hidden; vertical-align: bottom; margin-bottom: -.18em; }
.rotator-words { display: flex; flex-direction: column; line-height: 1.5em; animation: words 7.5s cubic-bezier(.7, 0, .3, 1) infinite; }
.rotator-words .mark { align-self: flex-start; }
@keyframes words { 0%, 22% { transform: translateY(0); } 33%, 55% { transform: translateY(-1.5em); } 66%, 88% { transform: translateY(-3em); } 100% { transform: translateY(-4.5em); } }
.intro { max-width: 600px; display: flex; flex-direction: column; gap: 18px; font-size: 19px; color: var(--text); }
.intro p { display: grid; grid-template-columns: 14px 1fr; gap: 14px; align-items: baseline; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* Portrait stack */
.stack { flex: 1 1 300px; min-width: 0; max-width: 360px; margin: 88px 0 0; position: relative; }
.stack-back { position: absolute; inset: 0; border-radius: 28px; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.stack-violet { background: var(--violet); transform: rotate(5deg) translate(10px, 8px); }
.stack-green { background: var(--green); opacity: .9; transform: rotate(-3deg) translate(-8px, 6px); }
.photo { position: relative; border-radius: 28px; overflow: hidden; border: 4px solid var(--ink); transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.stack:hover .photo { transform: rotate(-1.5deg) translateY(-6px); }
.stack:hover .stack-violet { transform: rotate(8deg) translate(14px, 12px); }
.zoom { transition: transform .5s ease; }
.zoomwrap:hover .zoom { transform: scale(1.03); }
.hello { position: absolute; right: calc(50% + 50px); top: -74px; z-index: 3; transform: rotate(-5deg); transform-origin: right center; }
.hand { display: inline-block; font: 700 30px/1 'Caveat', cursive; color: var(--ink); white-space: nowrap; animation: write 1.4s cubic-bezier(.45, .05, .55, .95) .3s both; }
.smile { display: inline-block; color: var(--violet-text); animation: wink .7s ease-in-out 2s both; }
.doodle { position: absolute; left: calc(50% - 46px); top: -66px; z-index: 3; overflow: visible; }
.doodle path { fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 120; animation: draw 2.2s ease-out 1.5s both; }
@keyframes write { from { clip-path: inset(-20% 100% -20% 0); } to { clip-path: inset(-20% -5% -20% 0); } }
@keyframes wink { 0%, 100% { transform: rotate(0) scale(1); } 40% { transform: rotate(-14deg) scale(1.25); } 70% { transform: rotate(8deg) scale(1.1); } }
@keyframes draw { from { stroke-dashoffset: 120; } to { stroke-dashoffset: 0; } }
.photo-chip { position: absolute; border-radius: 14px; padding: 10px 14px; font: 13px var(--mono); display: flex; align-items: center; gap: 8px; z-index: 2; }
.photo-chip .dot { width: 10px; height: 10px; border: 0; }
.chip-a { left: -22px; bottom: 30px; background: var(--surface); border: 1.5px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); animation: floatA 5s ease-in-out infinite; }
.chip-b { right: -18px; top: 36px; background: var(--ink); color: var(--ground); animation: floatB 6s ease-in-out infinite; }
@keyframes floatA { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-8px) rotate(-1deg); } }
@keyframes floatB { 0%, 100% { transform: translateY(0) rotate(4deg); } 50% { transform: translateY(7px) rotate(2deg); } }

/* Facts with rolling digits */
.facts { background: var(--surface); border-block: 1px solid var(--line); }
.facts-grid { padding-block: 44px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 32px; }
.fact { border-top: 2px solid var(--ink); padding-top: 14px; }
.fact-num { font: 800 56px/1 var(--display); letter-spacing: -0.03em; display: flex; align-items: flex-start; }
.fact p { margin-top: 8px; color: var(--muted); }
/* The roller is as wide as its final digit; clip-path hides the other digits vertically only. */
.roller { position: relative; display: inline-block; height: 1em; clip-path: inset(0 -40% 0 -40%); }
.roll-size { visibility: hidden; }
.strip { position: absolute; left: 50%; top: 0; display: flex; flex-direction: column; align-items: center; transform: translate(-50%, calc(var(--n) * -1em)); }
.strip > span { height: 1em; line-height: 1em; }
.is-rolling .strip { animation: roll 1.6s cubic-bezier(.25, 1.25, .4, 1) var(--delay) both; }
@keyframes roll { from { transform: translate(-50%, 0); } to { transform: translate(-50%, calc(var(--n) * -1em)); } }

/* Desktop: hero + facts fill the first screen so the facts strip sits at its bottom edge.
   69px = header height (nav padding 12px × 2 + 44px button + 1px border). */
@media (min-width: 900px) {
  .nav { padding-block: 12px; }
  .first-screen { min-height: calc(100svh - 69px); display: flex; flex-direction: column; }
  .first-screen .hero { flex: 1 0 auto; align-content: center; padding-block: clamp(16px, 2vh, 48px) clamp(20px, 2.4vh, 64px); }
  .hero-copy { gap: clamp(12px, 1.6vh, 24px); }
  .intro { gap: clamp(10px, 1.2vh, 18px); }
  .facts-grid { padding-block: clamp(16px, 2vh, 44px) 44px; }
  .fact { padding-top: clamp(10px, 1vh, 14px); }
}
/* Short desktop windows (typical laptops): step the hero type down, by media query rather than vh units, so text still grows with browser zoom. */
@media (min-width: 900px) and (max-height: 900px) {
  .hero h1 { font-size: clamp(40px, 4vw, 60px); }
  .intro { font-size: 17px; }
}

/* Cards */
.two-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 36px; display: flex; flex-direction: column; gap: 18px; color: var(--text); }
.card h3 { font-size: 34px; line-height: 1.05; color: var(--ink); }
.card-dark { background: var(--ink); border-color: var(--ink); color: var(--dark-text); }
.card-dark h3 { color: var(--ground); }
.card-dark .mono { color: var(--dark-muted); }

/* Project explorer */
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; }
.section-head p { max-width: 440px; }
.explorer { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.explorer-list { flex: 1 1 340px; min-width: 0; border-top: 1px solid var(--ink); display: flex; flex-direction: column; }
.row { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 12px; min-height: 72px; padding: 18px 12px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: background .2s ease; }
.row:hover { background: var(--soft); color: var(--ink); }
.row[aria-selected="true"] { background: var(--surface); }
.row-dot { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--ink); }
.row[aria-selected="true"] .row-dot { background: var(--green); }
.row-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.row-name { font: 800 26px/1.1 var(--display); letter-spacing: -0.02em; }
.row-kind { font-size: 14px; color: var(--muted); }
.row-tag { font: 12px var(--mono); padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line-strong); white-space: nowrap; }
.row-tag.is-live { background: var(--green); border-color: var(--green); }
/* Projects are built with agents, so their accents use the AI violet. */
.projects-section .eyebrow::before { background: var(--violet); }
.projects-section .row[aria-selected="true"] .row-dot { background: var(--violet); }
/* Live tags are tinted; only the selected row's one is filled, so they never compete. */
.projects-section .row-tag.is-live { background: color-mix(in srgb, var(--violet) 12%, transparent); border-color: transparent; color: var(--violet-text); transition: background .2s ease, color .2s ease; }
.projects-section .row[aria-selected="true"] .row-tag.is-live { background: var(--violet); color: #FFFFFF; }
.projects-section .before-ai .uline { background-image: linear-gradient(var(--green-text), var(--green-text)); }
.explorer-panels { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 32px; display: flex; flex-direction: column; gap: 22px; color: var(--text); }
.js .panel:not(.is-active) { display: none; }
.panel h3 { font-size: 44px; line-height: 1; color: var(--ink); }
.panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.panel-facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 16px; font-size: 15px; border-top: 1px solid var(--line); padding-top: 18px; }
.panel-facts dt { font: 12px var(--mono); color: var(--muted); text-transform: uppercase; }
.panel-facts dd { margin: 4px 0 0; }
.web-stage {
  --bg: #111813; --dots: rgba(226, 182, 107, .16); --glow-a: rgba(226, 182, 107, .32); --glow-b: rgba(64, 104, 78, .45); --pair: #EDE6D3;
  --frame: #0D120E; --frame-line: #34433A; --bar-a: #18201A; --bar-b: #121914; --light: #3A4A3F; --url-bg: #1E2821; --url: #D8D3C2; --drop: rgba(0, 0, 0, .7);
  position: relative; isolation: isolate; height: 480px; border-radius: 18px; overflow: hidden; background: var(--bg); perspective: 1600px; transition: background .6s ease;
}
.web-stage[data-appearance="light"] {
  --bg: #EEE7D6; --dots: rgba(120, 88, 30, .2); --glow-a: rgba(226, 182, 107, .55); --glow-b: rgba(255, 252, 244, .9); --pair: #1F2B23;
  --frame: #FBF8F0; --frame-line: #D9CFB8; --bar-a: #F8F3E7; --bar-b: #EFE8D7; --light: #D6CCB4; --url-bg: #E6DECB; --url: #3D3A30; --drop: rgba(90, 64, 20, .35);
}
.web-atmos, .web-glow, .web-pairs { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.web-atmos { background-image: radial-gradient(circle, var(--dots) 1.6px, transparent 2px); background-size: 26px 26px; animation: drift-web 40s linear infinite; mask-image: radial-gradient(closest-side at 50% 60%, #000 40%, transparent); }
.web-glow { background: radial-gradient(50% 55% at 50% 72%, var(--glow-a), transparent 70%), radial-gradient(70% 60% at 20% 10%, var(--glow-b), transparent 70%); transition: background .6s ease; }
.web-pairs i { position: absolute; width: 34px; height: 12px; animation: float 6s ease-in-out infinite; }
.web-pairs i::before, .web-pairs i::after { content: ""; position: absolute; top: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--pair); transition: background .6s ease; }
.web-pairs i::before { left: 0; box-shadow: 11px 0 0 -3px #E2B66B; }
.web-pairs i::after { right: 0; }
.web-pairs i:nth-child(1) { top: 9%; left: 6%; rotate: -14deg; }
.web-pairs i:nth-child(2) { top: 26%; right: 4%; rotate: 70deg; scale: .8; animation-delay: -2s; opacity: .7; }
.web-pairs i:nth-child(3) { bottom: 12%; left: 4%; rotate: 20deg; scale: .7; animation-delay: -4s; opacity: .55; }
.web-window { position: absolute; left: 50%; top: 60px; width: 72%; translate: -50% 0; transform: rotateX(calc(var(--lean, 9deg) + var(--tilt-y, 0deg))) rotateY(var(--tilt-x, 0deg)); transform-origin: 50% 0; transition: transform .6s ease-out; }
.web-stage:hover .web-window { --lean: 3deg; }
.web-browser { border-radius: 14px; background: var(--frame); border: 1px solid var(--frame-line); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 40px 80px -24px var(--drop), 0 0 90px -30px rgba(226, 182, 107, .5); overflow: hidden; transition: background .6s ease, border-color .6s ease, box-shadow .6s ease; }
.web-bar { position: relative; height: 34px; display: flex; align-items: center; justify-content: center; padding: 0 14px; background: linear-gradient(var(--bar-a), var(--bar-b)); border-bottom: 1px solid var(--frame-line); }
.web-lights { position: absolute; left: 14px; display: flex; gap: 7px; }
.web-lights span { width: 10px; height: 10px; border-radius: 50%; background: var(--light); }
.web-lights span:first-child { background: #E2B66B; }
.web-url { display: inline-flex; align-items: center; gap: 7px; padding: 4px 16px; border-radius: 999px; background: var(--url-bg); font: 12px var(--mono); color: var(--url); }
.web-url svg { color: #C9963F; }
.web-shots { display: grid; }
.web-shot { grid-area: 1 / 1; transition: opacity .5s ease; }
.web-shot img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.web-stage[data-appearance="dark"] .web-shot[data-shot="light"], .web-stage[data-appearance="light"] .web-shot[data-shot="dark"] { opacity: 0; }
.no-js .web-shot[data-shot="light"], .no-js .web-modes { display: none; }
.web-chip { position: absolute; top: 14px; right: 24px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 15px; border-radius: 999px; background: #E2B66B; color: #151C17; font: 500 12px var(--mono); white-space: nowrap; box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .55); animation: floatB 6s ease-in-out infinite; }
.web-chip-dots { position: relative; width: 18px; height: 8px; }
.web-chip-dots::before, .web-chip-dots::after { content: ""; position: absolute; top: 0; width: 8px; height: 8px; border-radius: 50%; background: #151C17; }
.web-chip-dots::before { left: 0; } .web-chip-dots::after { right: 0; }
.web-modes { align-self: flex-start; }
.web-stage[data-in-view="false"] *, .web-stage[data-in-view="false"] { animation-play-state: paused; }
@keyframes drift-web { to { background-position: 26px 26px; } }
.panel-title { display: flex; flex-direction: column; gap: 10px; }
.web-status { display: inline-flex; align-items: center; gap: 8px; font: 12px var(--mono); color: var(--muted); text-transform: uppercase; }
.web-rules { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 12px; }
.web-rules li { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: var(--ground); font-size: 14px; line-height: 1.35; color: var(--ink); }
.web-rules svg { flex: none; }
/* Puntokus iOS showcase: each theme gets its own atmosphere, phones cross over physically */
.panel-ios { padding: 0; overflow: hidden; gap: 0; }
.panel-ios > :not(.ios-stage) { margin-inline: 32px; }
.panel-ios > .ios-controls { margin-top: 24px; }
.panel-ios > .panel-head { margin-top: 26px; }
.panel-ios > p { margin-top: 14px; margin-bottom: 20px; }
.press { margin-bottom: 32px; }
.press .label { display: block; margin-bottom: 10px; }
.press-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.press-list li { border-bottom: 1px solid var(--line); }
.press-link { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 12px; min-height: 48px; padding: 9px 0; color: var(--ink); text-decoration: none; }
.press-link svg { flex: none; }
.press-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.press-source { font-size: 15px; font-weight: 600; line-height: 1.35; }
.press-note { font-size: 14px; line-height: 1.35; }
@media (min-width: 640px) {
  .press-text { display: grid; grid-template-columns: 170px minmax(0, 1fr); column-gap: 16px; align-items: baseline; }
}
.ios-stage {
  --bg: #F4E4CF; --glow: #FFD6A0; --pattern: rgba(200, 55, 45, .16); --orbit: #C8372D; --shadow: rgba(90, 40, 20, .35);
  position: relative; height: 540px; overflow: hidden; isolation: isolate; perspective: 1400px;
  background: var(--bg); transition: background-color .6s ease;
}
.ios-stage[data-appearance="dark"] { --bg: #3A0F14; --glow: #7A2229; --pattern: rgba(255, 210, 120, .12); --orbit: #E0A040; --shadow: rgba(20, 0, 4, .6); }
.ios-stage[data-theme="mesa"] { --bg: #2C5A46; --glow: #4C8A6C; --pattern: rgba(233, 214, 160, .35); --orbit: #D6B46A; --shadow: rgba(6, 26, 18, .55); }
.ios-stage[data-theme="mesa"][data-appearance="dark"] { --bg: #16302A; --glow: #2E5A49; }
.ios-stage[data-theme="tinta"] { --bg: #EFE6D4; --glow: #FFF6E4; --pattern: rgba(60, 40, 30, .1); --orbit: #B5452F; --shadow: rgba(60, 40, 20, .35); }
.ios-stage[data-theme="tinta"][data-appearance="dark"] { --bg: #221D28; --glow: #3D3044; --pattern: rgba(230, 200, 150, .09); --orbit: #C9A15F; --shadow: rgba(0, 0, 0, .6); }
.ios-atmos, .ios-glow { position: absolute; inset: 0; z-index: -2; pointer-events: none; }
.ios-glow { background: radial-gradient(closest-side at 50% 52%, var(--glow), transparent); opacity: .85; transform: scale(1.3); transition: background .6s ease; }
/* Sevilla: lunares (polka dots) drifting slowly */
.ios-atmos {
  background-image: radial-gradient(circle, var(--pattern) 5px, transparent 5.5px), radial-gradient(circle, var(--pattern) 5px, transparent 5.5px);
  background-size: 44px 44px; background-position: 0 0, 22px 22px; animation: lunares 40s linear infinite;
}
/* Classic: the Puntokus dot grid on felt */
.ios-stage[data-theme="mesa"] .ios-atmos { background-image: radial-gradient(circle, var(--pattern) 2px, transparent 2.5px); background-size: 34px 34px; background-position: 0 0; animation: drift 30s linear infinite; }
/* Ink: ruled paper */
.ios-stage[data-theme="tinta"] .ios-atmos { background-image: repeating-linear-gradient(-8deg, var(--pattern) 0 1px, transparent 1px 22px); background-size: auto; background-position: 0 0; animation: none; }
.ios-orbit { position: absolute; inset: 14% 10% 16%; z-index: -1; border: 1.5px solid var(--orbit); border-radius: 50%; opacity: .55; transform: rotate(-18deg); animation: orbit 16s ease-in-out infinite alternate; transition: border-color .6s ease; }
.ios-orbit span { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--orbit); top: 9%; left: 18%; transition: background .6s ease; }
.ios-orbit span + span { top: auto; left: auto; bottom: 6%; right: 21%; width: 7px; height: 7px; }
/* Flat (no preserve-3d) so z-index decides both painting and which phone receives the click. */
.ios-phones { position: absolute; inset: 0; display: grid; place-items: center; transform: perspective(1400px) rotateX(var(--tilt-y, 0deg)) rotateY(var(--tilt-x, 0deg)); transition: transform .6s ease-out; }
.ios-phone {
  grid-area: 1 / 1; width: clamp(150px, 27%, 214px); padding: 0; border: 0; background: none; cursor: pointer; line-height: 0;
  transition: transform .75s cubic-bezier(.34, 1.3, .5, 1), filter .6s ease, z-index 0s .28s;
  -webkit-tap-highlight-color: transparent;
}
.ios-phone:hover .ios-shell { box-shadow: 0 2px 0 #3A3E45, 0 36px 60px -14px var(--shadow), 0 12px 24px -10px var(--shadow); }
.ios-phone[data-pos="front"] { z-index: 2; transform: translateX(-34%) rotate(-6deg); }
.ios-phone[data-pos="back"] { z-index: 1; transform: translateX(42%) translateY(4%) rotate(8deg) scale(.86); filter: brightness(.9) saturate(.9); }
.ios-phone[data-pos="back"]:hover { filter: none; }
.ios-phone.is-rising { animation: rise .75s cubic-bezier(.3, .8, .3, 1); }
.ios-phone.is-sinking { animation: sink .75s cubic-bezier(.3, .8, .3, 1); }
.ios-shell {
  position: relative; display: block; padding: 7px; border-radius: 40px; background: #0E0F12; border: 1px solid #6E727A;
  box-shadow: 0 2px 0 #3A3E45, 0 30px 50px -14px var(--shadow), 0 10px 20px -10px var(--shadow);
  animation: float 7s ease-in-out infinite;
}
.ios-phone[data-phone="today"] .ios-shell { animation-delay: -3.5s; }
.ios-shell img { width: 100%; height: auto; border-radius: 33px; transition: opacity .3s ease; }
.ios-shell img.is-swapping { opacity: 0; }
.ios-phone:focus-visible { outline: none; }
.ios-phone:focus-visible .ios-shell { outline: 3px solid var(--violet); outline-offset: 4px; }
/* Names the theme on each phone when a pill shows two (Sevilla and Sevilla 92). */
.ios-tag { position: absolute; left: 50%; bottom: -14px; translate: -50% 0; padding: 5px 11px; border-radius: 999px; font: 500 12px/1.2 var(--mono); white-space: nowrap; box-shadow: 0 6px 14px -8px var(--shadow); }
.ios-tag[hidden] { display: none; }
.ios-phone[data-pos="back"] .ios-tag { left: 70%; }
.ios-tag-a { background: #C8372D; color: #FFFFFF; }
.ios-tag-b { background: #1B2A6B; color: #FFD23A; }
.ios-toggles { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }

.ios-caption { font-size: 13px; }
@keyframes lunares { to { background-position: 44px 44px, 66px 66px; } }
@keyframes drift { to { background-position: 34px 34px; } }
@keyframes orbit { from { transform: rotate(-18deg) scale(.97); } to { transform: rotate(-8deg) scale(1.04); } }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes rise { 40% { translate: 0 -34px; } }
@keyframes sink { 40% { translate: 0 18px; } }
.ios-stage[data-in-view="false"] * { animation-play-state: paused; }
.ios-controls { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-btn { min-height: 44px; padding: 8px 16px; border-radius: 999px; font: 500 15px var(--body); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: transparent; color: var(--ink); }
.pill-btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--ground); }
.swatch { width: 10px; height: 10px; border-radius: 50%; }
.swatch-sevilla { background: linear-gradient(135deg, #C8372D 50%, #FFD23A 50%); } .swatch-mesa { background: #B98A3C; } .swatch-tinta { background: #C8372D; }
/* The Sevilla pill is a special edition, badged in its own colours. */
.pill-special { padding: 2px 8px; border-radius: 999px; background: #1B2A6B; color: #FFD23A; font: 500 11px/1.4 var(--mono); letter-spacing: .02em; }
.pill-btn[aria-pressed="true"] .pill-special { background: #FFD23A; color: #1B2A6B; }
.segmented { display: inline-flex; padding: 4px; border-radius: 999px; border: 1px solid var(--line); gap: 4px; }
.segmented button { min-height: 38px; padding: 6px 14px; border: 0; border-radius: 999px; font: 500 15px var(--body); cursor: pointer; background: transparent; color: var(--ink); }
.segmented button[aria-pressed="true"] { background: var(--ink); color: var(--ground); }
/* QuestLog: its own dark purple-to-green world, phones fanned out */
.quest-stage { position: relative; height: 440px; border-radius: 18px; overflow: hidden; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(closest-side at 30% 40%, rgba(168, 85, 247, .35), transparent), radial-gradient(closest-side at 75% 70%, rgba(132, 225, 63, .22), transparent), #0D0F1A; }
.quest-shot { position: absolute; width: clamp(120px, 24%, 160px); height: auto; aspect-ratio: 540 / 1200; object-fit: cover; border-radius: 22px; border: 5px solid #05060B; box-shadow: 0 24px 40px -12px rgba(0, 0, 0, .7); transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.quest-shot-0 { transform: translateX(-78%) rotate(-8deg) scale(.88); }
.quest-shot-1 { position: relative; z-index: 2; width: clamp(140px, 28%, 184px); }
.quest-shot-2 { transform: translateX(78%) rotate(8deg) scale(.88); }
.quest-stage:hover .quest-shot-0 { transform: translateX(-88%) rotate(-11deg) scale(.88); }
.quest-stage:hover .quest-shot-2 { transform: translateX(88%) rotate(11deg) scale(.88); }

/* Career */
.career-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px 48px; }
.career-head > div { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.career-stats { flex: 1 1 460px; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.career-stats div { border-top: 2px solid var(--ink); padding-top: 12px; }
.career-stats dt { font: 800 48px/1 var(--display); letter-spacing: -0.03em; }
.career-stats dd { margin: 8px 0 0; font-size: 15px; color: var(--muted); }
.timebar { display: flex; flex-direction: column; gap: 10px; }
.timebar-track { display: flex; gap: 6px; height: 56px; }
.seg { flex-basis: 0; min-width: 0; border: 1.5px solid var(--ink); display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 clamp(8px, 1.4vw, 16px); font: 800 clamp(13px, 1.6vw, 18px) var(--display); overflow: hidden; white-space: nowrap; }
.seg-alten { background: var(--soft); border-radius: 14px 6px 6px 14px; }
.seg-babel { background: var(--surface); border-radius: 6px; }
.seg-plexus { background: var(--green); border-radius: 6px 14px 14px 6px; }
.seg-now { font: 500 12px var(--mono); display: inline-flex; align-items: center; gap: 6px; }
.cursor-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); animation: blink 1.1s steps(1) infinite; }
.timebar-axis { display: flex; justify-content: space-between; font: 12px var(--mono); color: var(--muted); }
.career-grid { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; margin-top: 12px; }
.timeline { flex: 999 1 600px; min-width: 0; margin: 0; padding: 0; list-style: none; position: relative; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 14px; bottom: 14px; border-left: 2px dashed var(--line-strong); }
.tl-item { position: relative; display: grid; grid-template-columns: 24px 1fr; gap: 24px; padding-bottom: 28px; }
.tl-dot { position: relative; z-index: 1; width: 24px; height: 24px; border-radius: 50%; background: var(--surface); border: 2px solid var(--ink); margin-top: 16px; }
.tl-dot.is-now { background: var(--green); }
.tl-dot.is-origin { border: 3px solid var(--green-text); }
.tl-card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 28px; display: flex; flex-direction: column; gap: 12px; color: var(--text); }
.tl-card.is-featured { border: 1.5px solid var(--ink); box-shadow: 6px 6px 0 var(--green); gap: 14px; }
.tl-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 16px; }
.tl-head h3 { font-size: 34px; line-height: 1; color: var(--ink); }
.is-featured .tl-head h3 { font-size: 40px; }
.tl-dates { font: 13px var(--mono); border: 1px solid var(--line-strong); color: var(--muted); padding: 5px 12px; border-radius: 999px; }
.tl-dates.is-now { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.tl-role { color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tl-lead { font: 600 19px/1.3 var(--display); color: var(--ink); }
.is-featured .tl-lead { font-size: 21px; }
.tl-points { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.tl-origin { padding-bottom: 0; }
.origin-card { border: 1.5px dashed var(--green-text); background: var(--surface); scroll-margin-top: 24px; }
.before-ai { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 16px; color: var(--muted); margin-top: -8px; }
.before-ai > span:first-child { font-family: var(--mono); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.before-ai a { color: var(--ink); }
.before-ai .sep { font-family: var(--body); text-transform: none; color: var(--line-strong); }
.origin-body { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-end; }
.origin-text { flex: 999 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.origin-shots { flex: 1 1 180px; display: flex; gap: 8px; justify-content: center; align-items: flex-end; }
.origin-shots img { width: 62px; aspect-ratio: 102 / 227; object-fit: cover; border-radius: 10px; border: 3px solid var(--ink); }
.origin-shots img:first-child { transform: rotate(-5deg); } .origin-shots img:last-child { transform: rotate(5deg); }
.career-side { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 24px 28px; display: flex; flex-direction: column; gap: 12px; }
.side-dark { background: var(--ink); border-color: var(--ink); color: var(--ground); gap: 18px; }
.side-dark div { display: flex; flex-direction: column; gap: 4px; }
.side-dark strong { color: var(--ground); font: 800 20px/1.2 var(--display); }
.side-dark span:not(.label) { font-size: 15px; color: var(--dark-muted); }
.label { font: 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.side-dark .label { color: var(--dark-muted); }
.side-card .label + .label, .how + .label { margin-top: 8px; }
.how { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.how li { display: grid; grid-template-columns: 8px 1fr; gap: 10px; align-items: baseline; }
.how li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; font: 12px var(--mono); }
.tag { border: 1px solid var(--line-strong); padding: 4px 9px; border-radius: 8px; }
.tag-ai { background: var(--violet); border-color: var(--violet); color: #FFFFFF; }
.lift { transition: transform .25s ease; }
.lift:hover { transform: translateY(-4px); }

/* Quote band */
.quote-band { background: var(--ink); color: var(--ground); }
.quote-band .wrap { padding-block: 104px; display: flex; flex-direction: column; gap: 28px; }
.quote-logo { background: transparent; color: var(--green); width: auto; height: auto; justify-content: flex-start; font-size: 15px; }
.quote-band blockquote { margin: 0; font: 800 clamp(32px, 4.8vw, 64px)/1.05 var(--display); letter-spacing: -0.03em; max-width: 1040px; }
.quote-band blockquote span:last-child { color: var(--violet-soft); }
.quote-band .mono { color: var(--dark-muted); font-size: 14px; }

/* Contact */
.contact { padding-top: 112px; padding-bottom: 40px; gap: 56px; }
.contact-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; }
@media (min-width: 900px) { .contact-head { flex-wrap: nowrap; } .status { flex: none; margin-bottom: 12px; } }
.contact-title { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.contact-title h2 { font-size: clamp(48px, 7vw, 112px); line-height: .95; letter-spacing: -0.04em; }
.avatar { position: relative; width: 88px; height: 88px; flex: none; }
.avatar img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; object-position: 50% 25%; border: 3px solid var(--ink); }
.pulse-dot { position: absolute; right: 2px; bottom: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--green); border: 3px solid var(--ground); animation: pulse 2.2s ease-in-out infinite; }
.pulse-dot.small { position: static; width: 8px; height: 8px; border: 0; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, .7); } 50% { box-shadow: 0 0 0 7px rgba(61, 220, 132, 0); } }
.status { display: inline-flex; align-items: center; gap: 10px; font: 14px var(--mono); border: 1px solid var(--line-strong); border-radius: 999px; padding: 8px 14px; }
.contact-grid { display: flex; flex-wrap: wrap; gap: 24px; align-items: stretch; }
.contact-copy { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.contact-copy .lede { font-size: 21px; line-height: 1.45; }
.contact-copy .mono { margin-top: auto; font-size: 14px; }
.reasons { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; font-size: 18px; }
.reasons li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: baseline; }
.reasons [class^="arrow-"] { font-family: var(--mono); }
.arrow-0 { color: var(--green-text); } .arrow-1 { color: var(--violet-text); } .arrow-2 { color: var(--ink); }
.contact-actions { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.email-card { background: var(--ink); color: var(--ground); border-radius: 28px; padding: 36px; display: flex; flex-direction: column; gap: 22px; box-shadow: 8px 8px 0 var(--violet); }
.email-card .label { color: var(--dark-muted); }
.email { align-self: flex-start; color: var(--ground); text-decoration: none; font: 800 clamp(24px, 3.4vw, 44px)/1.1 var(--display); letter-spacing: -0.03em; overflow-wrap: anywhere; background: linear-gradient(var(--green), var(--green)) 0 100% / 100% 2px no-repeat; transition: background-size .3s ease; }
.email:hover { color: var(--ground); background-size: 0 2px; background-position: 100% 100%; }
.email-domain { white-space: nowrap; }
.email-domain > span { color: var(--green); }
.btn-ghost .check-icon, .btn-ghost.is-copied .copy-icon { display: none; }
.btn-ghost.is-copied .check-icon { display: inline-flex; }
.btn-ghost span { display: inline-flex; }
.link-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 12px; }
.link-card { background: var(--surface); border: 1.5px solid var(--ink); border-radius: 20px; padding: 20px; text-decoration: none; display: flex; flex-direction: column; gap: 18px; min-height: 120px; }
.link-card { --accent: var(--soft); --on-accent: var(--ink); transition: transform .25s ease, box-shadow .25s ease; }
.link-card:hover { color: var(--ink); box-shadow: 6px 6px 0 var(--accent); }
.link-linkedin { --accent: #0A66C2; --on-accent: #FFFFFF; }
.link-cv-es { --accent: var(--green); }
.link-cv-en { --accent: #FFB547; }
.link-card .badge { background: var(--accent); color: var(--on-accent); }
.link-card strong { font: 800 20px var(--display); display: block; }
.link-sub { display: block; font-size: 14px; color: var(--muted); }
.link-top { display: flex; justify-content: space-between; align-items: center; }
.badge { width: 36px; height: 36px; border-radius: 10px; background: var(--soft); color: var(--ink); display: flex; align-items: center; justify-content: center; font: 500 13px var(--mono); }
.footer-thanks { font: 700 24px/1 'Caveat', cursive; color: var(--ink); }
.footer-thanks span { color: var(--violet-text); }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; }
.not-found { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 24px; }

@media (max-width: 600px) {
  .nav-links > a:not(.btn) { display: none; }
  .nav-links { gap: 12px; }
  .brand span:last-child { font-size: 17px; }
  .hero { padding-block: 48px; }
  .stack { margin: 96px 16px 0; }
  .hand { font-size: 22px; }
  .seg-now { display: none; }
  .timebar-axis span:nth-child(even) { visibility: hidden; }
  .tl-item { gap: 14px; }
  .tl-card { padding: 20px; }
  .panel { padding: 20px; }
  .web-stage { height: auto; display: grid; justify-items: center; padding: 68px 0 28px; }
  .web-window { position: relative; left: auto; top: auto; translate: none; width: min(66%, 240px); transform: none; }
  .web-shot img { aspect-ratio: 390 / 844; }
  .web-bar { height: 28px; }
  .web-lights { display: none; }
  .web-url { font-size: 10px; padding: 2px 10px; }
  .web-browser { border-radius: 22px; }
  .web-chip { top: 18px; right: 50%; translate: 50% 0; font-size: 11px; padding: 6px 12px; }
  .web-pairs i:nth-child(2) { top: 40%; }
  .web-pairs i:nth-child(3) { bottom: auto; top: 58%; }
  .web-pairs i:nth-child(1) { top: auto; bottom: 7%; left: 10%; }
  .ios-stage { height: 420px; }
  .panel.panel-ios { padding: 0; }
  .quest-stage { height: 360px; }
  .ios-phone { width: 40%; }
  .ios-shell { padding: 5px; border-radius: 28px; }
  .ios-shell img { border-radius: 23px; }
  .panel-ios > :not(.ios-stage) { margin-inline: 20px; }
      .email-card { padding: 24px; }
  .email { font-size: clamp(23px, 7.2vw, 24px); }
  .row-tag { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rotator-words { transform: none; }
}
