/* UniPicto · styles.css · fonts are self-hosted (Bricolage Grotesque, IBM Plex: OFL 1.1)
   Dark only: the particle field is additive light and needs a near-black ground.
   Radius rule: interactive controls are pills, surfaces are 14px.
   Layers: field 0 · content 1 · header 10 · notice 11 · lens picker 12 · skip link 30 */

@font-face{font-family:"Bricolage Grotesque";font-style:normal;font-display:swap;font-weight:200 800;src:url(/fonts/bricolage-grotesque-latin-opsz-normal.woff2) format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Bricolage Grotesque";font-style:normal;font-display:swap;font-weight:200 800;src:url(/fonts/bricolage-grotesque-latin-ext-opsz-normal.woff2) format("woff2-variations");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"IBM Plex Sans";font-style:normal;font-display:swap;font-weight:400;src:url(/fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"IBM Plex Sans";font-style:normal;font-display:swap;font-weight:400;src:url(/fonts/ibm-plex-sans-latin-ext-400-normal.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"IBM Plex Sans";font-style:normal;font-display:swap;font-weight:500;src:url(/fonts/ibm-plex-sans-latin-500-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"IBM Plex Sans";font-style:normal;font-display:swap;font-weight:500;src:url(/fonts/ibm-plex-sans-latin-ext-500-normal.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"IBM Plex Mono";font-style:normal;font-display:swap;font-weight:400;src:url(/fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"IBM Plex Mono";font-style:normal;font-display:swap;font-weight:400;src:url(/fonts/ibm-plex-mono-latin-ext-400-normal.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}

/* Registered so lens changes fade instead of jumping. */
@property --accent{syntax:"<color>";inherits:true;initial-value:#7CC4FF}
@property --tile{syntax:"<color>";inherits:true;initial-value:#7CC4FF}

/* ============ tokens ============ */
:root{
  color-scheme:dark;
  --ink:#07090D;
  --surface:#0D1218;
  --surface-2:#131A22;
  --line:#1E2833;
  --line-strong:#2C3A47;
  --text:#EAF0F5;
  --dim:#A6B4C0;
  --faint:#8395A3;
  --error:#FF8A80;
  --brand-sky:#7CC4FF;
  --brand-deep:#3D7FEA;
  --accent:#7CC4FF;          /* set per lens by app.js */
  --on-accent:#07090D;
  --glass:rgb(13 18 24 / .82);
  --hdr:64px;
  --gutter:clamp(16px,4vw,40px);
  --r:14px;
  --pill:999px;
  --ease:cubic-bezier(.16,1,.3,1);
  --fd:"Bricolage Grotesque",ui-sans-serif,"Trebuchet MS",sans-serif;
  --fb:"IBM Plex Sans",ui-sans-serif,system-ui,"Segoe UI",sans-serif;
  --fm:"IBM Plex Mono",ui-monospace,"SFMono-Regular",Menlo,monospace;
  transition:--accent .6s var(--ease);
}

/* ============ base ============ */
*,*::before,*::after{box-sizing:border-box}
html{overflow-x:clip;scroll-padding-top:var(--hdr);-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{
  margin:0;background:var(--ink);color:var(--text);
  font-family:var(--fb);font-size:16px;line-height:1.6;
  -webkit-font-smoothing:antialiased;overflow-x:hidden;
}
img,svg{display:block}
a{color:inherit}
h1,h2,h3{font-family:var(--fd);margin:0;text-wrap:balance}
p{margin:0}
ul{list-style:none;margin:0;padding:0}
::selection{background:color-mix(in srgb,var(--accent) 38%,transparent);color:var(--text)}
:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:6px}
.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.wrap{width:100%;max-width:1240px;margin:0 auto;padding:0 var(--gutter)}
.ico{width:18px;height:18px;flex:none}

.skip{
  position:fixed;left:16px;top:-64px;z-index:30;
  background:var(--accent);color:var(--on-accent);
  padding:10px 18px;border-radius:var(--pill);font-weight:500;text-decoration:none;
  transition:top .2s var(--ease);
}
.skip:focus{top:12px}

.scroll-sentinel{position:absolute;top:0;left:0;width:1px;height:48px;pointer-events:none}

/* ============ particle field ============ */
.field{
  position:fixed;top:0;left:0;right:0;z-index:0;
  width:100%;height:100vh;height:100lvh;display:block;
  pointer-events:none;opacity:0;transition:opacity 1.4s ease;
}
.field.is-ready{opacity:1}
.field-still{
  position:fixed;inset:0;z-index:0;pointer-events:none;display:none;
  background:var(--ink) url(/images/field-still.webp) 60% 50%/cover no-repeat;
}
.no-field .field{display:none}
.no-field .field-still{display:block}
main,.foot{position:relative;z-index:1}

/* ============ header ============ */
.bar{
  position:fixed;inset:0 0 auto 0;height:var(--hdr);z-index:10;
  border-bottom:1px solid transparent;
  transition:background-color .3s ease,border-color .3s ease;
}
.bar.is-scrolled{
  background:rgb(7 9 13 / .74);border-bottom-color:var(--line);
  -webkit-backdrop-filter:blur(14px) saturate(140%);backdrop-filter:blur(14px) saturate(140%);
}
.bar-in{height:100%;display:flex;align-items:center;gap:clamp(8px,2vw,24px)}

.brand{display:flex;align-items:center;gap:10px;min-height:44px;margin-right:auto;text-decoration:none;border-radius:var(--pill)}
.mark{width:36px;height:36px;fill:none;stroke-width:6.5;stroke-linecap:round;stroke-linejoin:round}
.mark-u{stroke:var(--brand-sky)}
.mark-p{stroke:var(--brand-deep)}
.wordmark{font:700 21px/1 var(--fd);letter-spacing:-.01em}
.wm-cap{color:var(--brand-sky)}

.nav{display:flex;gap:2px}
.nav a{
  display:inline-flex;align-items:center;min-height:44px;padding:0 12px;
  border-radius:var(--pill);color:var(--dim);text-decoration:none;font-size:14.5px;
  transition:color .2s ease,background-color .2s ease;
}
.nav a:hover{color:var(--text);background:rgb(255 255 255 / .05)}
.nav a[aria-current]{color:var(--accent)}

.lang{display:flex;padding:3px;border:1px solid var(--line-strong);border-radius:var(--pill)}
.lang button{
  min-width:40px;height:36px;padding:0 10px;border:0;border-radius:var(--pill);
  background:none;color:var(--dim);font:400 12.5px/1 var(--fm);letter-spacing:.04em;cursor:pointer;
  transition:background-color .2s ease,color .2s ease;
}
.lang button:hover{color:var(--text)}
.lang button[aria-pressed="true"]{background:var(--text);color:var(--ink)}

/* ============ not-found notice ============ */
.notice{
  position:fixed;top:calc(var(--hdr) + 12px);left:50%;z-index:11;transform:translateX(-50%);
  display:flex;align-items:center;gap:8px;max-width:calc(100vw - 32px);
  padding:4px 4px 4px 18px;border:1px solid var(--line-strong);border-radius:var(--pill);
  background:var(--glass);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);font-size:14.5px;
}
.notice[hidden]{display:none}
.notice a{color:var(--accent)}
.icon-btn{
  display:grid;place-items:center;width:40px;height:40px;flex:none;
  border:0;border-radius:var(--pill);background:none;color:var(--dim);cursor:pointer;
}
.icon-btn:hover{color:var(--text);background:rgb(255 255 255 / .06)}

/* ============ buttons ============ */
.btn{
  display:inline-flex;align-items:center;gap:10px;height:48px;padding:0 24px;
  border:0;border-radius:var(--pill);background:var(--accent);color:var(--on-accent);
  font:500 16px/1 var(--fb);text-decoration:none;white-space:nowrap;cursor:pointer;
  transition:transform .25s var(--ease);
}
.btn:hover{transform:translateY(-2px)}
.btn:active{transform:scale(.98)}
.btn-ghost{
  height:44px;padding:0 18px;background:transparent;color:var(--text);
  border:1px solid var(--line-strong);font-size:15px;
  transition:transform .25s var(--ease),border-color .2s ease,color .2s ease;
}
.btn-ghost:hover{border-color:var(--accent)}
.btn-ghost.is-done{border-color:var(--accent);color:var(--accent)}

/* ============ hero ============ */
/* overflow clip: the ink pool behind the copy must not widen the page on phones. */
.hero{
  min-height:100vh;min-height:100svh;display:flex;align-items:center;overflow:clip;
  padding:calc(var(--hdr) + 24px) 0 72px;
}
.hero-copy{position:relative;max-width:760px}
/* Soft ink pool behind the copy, so the field never competes with the headline. */
.hero-copy::before{
  content:"";position:absolute;inset:-14% -22% -14% -40%;z-index:-1;pointer-events:none;
  background:radial-gradient(closest-side,rgb(7 9 13 / .8),rgb(7 9 13 / 0));
}
.hero h1{font-weight:800;font-size:clamp(2.4rem,1.4rem + 2.7vw,3.9rem);line-height:1.04;letter-spacing:-.025em}
.hero-sub{margin-top:22px;max-width:44ch;color:var(--dim);font-size:clamp(1.05rem,1rem + .3vw,1.2rem)}
.hero .btn{margin-top:36px}

/* ============ sections ============ */
.section{padding:clamp(64px,10vh,120px) 0;min-height:100vh;min-height:100svh}
/* The stage is where the particles spell the section title. Without the field the h2 shows here. */
.stage{display:flex;align-items:flex-end;height:clamp(110px,24vh,260px);margin-bottom:clamp(28px,5vh,56px)}
.stage-title{font-weight:800;font-size:clamp(2.2rem,1.4rem + 3vw,4rem);line-height:1;letter-spacing:-.02em;text-transform:uppercase}
.stage-title:focus{outline:none}
.has-field .stage-title{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* live projects: asymmetric pair */
.live{display:grid;grid-template-columns:1fr;gap:clamp(20px,3vw,32px)}
.card{
  display:flex;flex-direction:column;height:100%;overflow:hidden;
  border:1px solid var(--line);border-radius:var(--r);background:rgb(13 18 24 / .9);
  text-decoration:none;transition:border-color .3s ease,transform .45s var(--ease);
}
.card:hover{border-color:var(--accent);transform:translateY(-3px)}
.card:active{transform:scale(.99)}
/* Only the bottom strip of each preview (the waves, the timeline): the title is already in the card. */
.card-media{display:block;aspect-ratio:6/1;overflow:hidden;background:var(--surface-2);border-bottom:1px solid var(--line)}
.card-media img{width:100%;height:100%;object-fit:cover;object-position:center bottom;transition:transform .8s var(--ease)}
.card:hover .card-media img{transform:scale(1.03)}
.card-body{display:flex;flex-direction:column;gap:8px;padding:22px 24px 24px}
.card-title{font:700 1.55rem/1.15 var(--fd);letter-spacing:-.01em}
.card-desc{max-width:52ch;color:var(--dim)}
.card-domain{display:inline-flex;align-items:center;gap:6px;margin-top:8px;color:var(--accent);font:400 13px/1.4 var(--fm)}
.card-domain .ico{width:15px;height:15px;transition:transform .3s var(--ease)}
.card:hover .card-domain .ico{transform:translate(2px,-2px)}

/* in development: bento that adapts to 4 to 8 tiles */
.bento{display:grid;grid-template-columns:1fr;gap:16px}
.tile{
  display:flex;flex-direction:column;gap:6px;min-height:210px;padding:24px;overflow:hidden;
  border:1px solid var(--line);border-radius:var(--r);
  background:
    radial-gradient(120% 100% at 100% 0%,color-mix(in srgb,var(--tile) 24%,transparent),transparent 62%),
    linear-gradient(180deg,color-mix(in srgb,var(--tile) 6%,var(--surface)),var(--surface));
  transition:--tile .6s var(--ease);
}
.tile-icon{width:40px;height:40px;color:var(--tile)}
.tile-name{padding-top:36px;font:700 1.3rem/1.2 var(--fd);letter-spacing:-.01em}
.tile-desc{max-width:40ch;color:var(--dim);font-size:15px}

/* about */
.about{min-height:85vh;min-height:85svh}
.statement{
  max-width:60ch;margin-left:clamp(0px,9vw,150px);
  font:500 clamp(1.1rem,.9rem + 1.2vw,1.6rem)/1.20 var(--fd);letter-spacing:-.012em; /* (1.45rem,1rem + 1.6vw,2.3rem)/1.32 */
}

/* contact */
.contact-sub{max-width:44ch;color:var(--dim);font-size:1.15rem}
.email{display:flex;flex-wrap:wrap;align-items:center;gap:16px 22px;margin-top:28px}
.email-link{
  padding-bottom:4px;overflow-wrap:anywhere;text-decoration:none;
  font:700 clamp(1.6rem,1rem + 2.6vw,3.2rem)/1.1 var(--fd);letter-spacing:-.02em;
  background:linear-gradient(var(--accent),var(--accent)) 0 100%/0 2px no-repeat;
  transition:background-size .5s var(--ease);
}
.email-link:hover,.email-link:focus-visible{background-size:100% 2px}
.copy-status{margin-top:14px;font-size:14.5px}
.copy-status:not(.is-error){position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.copy-status.is-error{color:var(--error)}

/* footer */
.foot{border-top:1px solid var(--line);padding:26px 0 calc(88px + env(safe-area-inset-bottom));background:rgb(7 9 13 / .6);color:var(--faint);font-size:14px}

/* ============ lens picker ============ */
.lens{
  position:fixed;z-index:12;
  left:max(16px,env(safe-area-inset-left));bottom:max(16px,env(safe-area-inset-bottom));
  display:flex;flex-direction:column;align-items:flex-start;gap:10px;
}
.lens-toggle{
  display:inline-flex;align-items:center;gap:10px;height:44px;padding:0 16px 0 14px;
  border:1px solid var(--line-strong);border-radius:var(--pill);background:var(--glass);color:var(--text);
  -webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);font:400 13px/1 var(--fm);cursor:pointer;
  transition:border-color .2s ease;
}
.lens-toggle:hover,.lens-toggle[aria-expanded="true"]{border-color:var(--accent)}
.lens-swatch{display:block;width:28px;height:10px;border-radius:var(--pill);background:var(--swatch,var(--accent))}
.lens-panel{
  width:252px;padding:12px;border:1px solid var(--line-strong);border-radius:var(--r);
  background:rgb(13 18 24 / .95);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);
  box-shadow:0 22px 50px rgb(2 4 8 / .55);
}
.lens-panel[hidden]{display:none}
.lens-panel fieldset{min-width:0;margin:0;padding:0;border:0}
.lens-panel legend{padding:2px 10px 8px;color:var(--faint);font:400 12.5px/1.2 var(--fm)}
.lens-options{display:flex;flex-direction:column;gap:2px}
.lens-option{
  position:relative;display:flex;align-items:center;gap:12px;min-height:44px;padding:0 12px;
  border-radius:var(--pill);color:var(--dim);font-size:15px;cursor:pointer;
  transition:background-color .2s ease,color .2s ease;
}
.lens-option:hover{color:var(--text);background:rgb(255 255 255 / .05)}
.lens-option:has(input:checked){color:var(--text);background:rgb(255 255 255 / .08)}
.lens-option:has(input:focus-visible){outline:2px solid var(--accent);outline-offset:-2px}
.lens-option input{position:absolute;opacity:0;width:1px;height:1px;margin:0;pointer-events:none}
.lens-option .lens-swatch{width:40px;height:12px}
.lens-hint{margin-top:8px;padding:10px 10px 2px;border-top:1px solid var(--line);color:var(--faint);font-size:12.5px;line-height:1.45}

/* ============ motion ============ */
@media (prefers-reduced-motion:no-preference){
  html{scroll-behavior:smooth}
  .rise{animation:rise 1s var(--ease) both}
  .r1{animation-delay:.2s}
  .r2{animation-delay:.36s}
  .r3{animation-delay:.52s}
  .js .reveal{transition:opacity .8s var(--ease),transform .8s var(--ease);transition-delay:calc(var(--i,0) * 70ms)}
  .js .reveal:not(.is-in){opacity:0;transform:translateY(24px)}
}
@keyframes rise{from{opacity:0;transform:translateY(18px)}}

/* ============ responsive ============ */
@media (min-width:860px){
  .live{grid-template-columns:7fr 5fr;align-items:start}
  .live>li:nth-child(2){margin-top:clamp(48px,9vh,104px)}
  .foot .wrap{display:flex;justify-content:flex-end}
  .foot{padding-bottom:calc(26px + env(safe-area-inset-bottom))}
}
@media (min-width:760px){
  .bento{grid-template-columns:repeat(6,1fr)}
  .tile{grid-column:span 2}
  .bento:has(>:nth-child(4):last-child)>.tile{grid-column:span 3}
  .bento:has(>:nth-child(5):last-child)>.tile:nth-child(-n+2){grid-column:span 3;min-height:250px}
  .bento:has(>:nth-child(7):last-child)>.tile:nth-child(n+4){grid-column:span 3}
  .bento:has(>:nth-child(8):last-child)>.tile:nth-child(n+7){grid-column:span 3}
}
/* Portrait: the field sits at the top, so the hero copy moves to the lower half. */
@media (max-aspect-ratio:1/1){
  .hero{align-items:flex-end;padding-bottom:max(96px,12svh)}
  .hero-copy::before{inset:-18% -12%}
  .stage{height:clamp(96px,20vh,200px)}
}
@media (max-width:520px){
  .wordmark{display:none}
  .bar-in{gap:4px}
  .nav{gap:0}
  .nav a{padding:0 7px;font-size:14px}
  .lang{padding:2px}
  .lang button{min-width:32px;height:38px;padding:0 6px;font-size:12px}
  .mark{width:32px;height:32px}
  .statement{margin-left:0}
}
