/* gevorg.fr, v2
   Layout: floating pill nav, left-aligned sections, content grouped in rounded tiles (bento for projects).
   One orchestrated load moment (hero), quiet scroll reveals, small hover responses. */

/* Archivo (SIL Open Font License), self-hosted */
@font-face {
  font-family: "Archivo"; font-style: normal; font-display: swap;
  font-weight: 100 900; font-stretch: 62% 125%;
  src: url("../fonts/archivo-latin-wdth-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: "Archivo"; font-style: normal; font-display: swap;
  font-weight: 100 900; font-stretch: 62% 125%;
  src: url("../fonts/archivo-latin-ext-wdth-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;
}

:root {
  /* color */
  --bg: #f2f3f0;
  --surface: #ffffff;
  --surface-2: #e8eae5;
  --ink: #121417;
  --muted: #545b63;
  --line: rgba(18, 20, 23, .09);
  --accent: #1f47c4;
  --accent-ink: #ffffff;
  --accent-soft: rgba(31, 71, 196, .09);
  --panel: #070809;
  --ok: #17734a;
  --err: #b42318;
  --grid-line: rgba(18, 20, 23, .055);
  --shadow: 0 1px 2px rgba(16, 18, 20, .04), 0 10px 30px -14px rgba(16, 18, 20, .16);
  --shadow-lift: 0 2px 4px rgba(16, 18, 20, .05), 0 24px 48px -20px rgba(16, 18, 20, .24);
  --nav-bg: rgba(255, 255, 255, .72);

  /* type */
  --font: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* shape and motion */
  --r-xl: 32px;
  --r-lg: 24px;
  --r-md: 16px;
  --r-sm: 12px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --wrap: 72rem;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111214;
    --surface: #1a1b1f;
    --surface-2: #24262a;
    --ink: #eceef0;
    --muted: #a4a9b1;
    --line: rgba(255, 255, 255, .09);
    --accent: #93adff;
    --accent-ink: #0d1324;
    --accent-soft: rgba(147, 173, 255, .12);
    --panel: #050506;
    --ok: #5fcf93;
    --err: #ff8f85;
    --grid-line: rgba(255, 255, 255, .045);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .6);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, .3), 0 24px 48px -20px rgba(0, 0, 0, .8);
    --nav-bg: rgba(30, 31, 35, .72);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111214;
  --surface: #1a1b1f;
  --surface-2: #24262a;
  --ink: #eceef0;
  --muted: #a4a9b1;
  --line: rgba(255, 255, 255, .09);
  --accent: #93adff;
  --accent-ink: #0d1324;
  --accent-soft: rgba(147, 173, 255, .12);
  --panel: #050506;
  --ok: #5fcf93;
  --err: #ff8f85;
  --grid-line: rgba(255, 255, 255, .045);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .6);
  --shadow-lift: 0 2px 4px rgba(0, 0, 0, .3), 0 24px 48px -20px rgba(0, 0, 0, .8);
  --nav-bg: rgba(30, 31, 35, .72);
  color-scheme: dark;
}

/* language switching: only the active language is shown */
html[data-lang="en"] body [lang="fr"],
html[data-lang="fr"] body [lang="en"] { display: none !important; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.theme-fade, html.theme-fade * { transition: background-color .35s ease, color .35s ease, border-color .35s ease !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: .2em; text-decoration-thickness: 1px; transition: text-decoration-color .2s; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { margin: 0; font-weight: 620; letter-spacing: -0.015em; line-height: 1.08; text-wrap: balance; }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); font-variation-settings: "wdth" 112; letter-spacing: -0.025em; }
h3 { font-size: 1.15rem; font-variation-settings: "wdth" 106; line-height: 1.25; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
.muted { color: var(--muted); }
.wrap { max-width: calc(var(--wrap) + 2 * 16px); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.skip { position: absolute; left: -9999px; top: 1rem; z-index: 200; background: var(--surface); padding: .6rem 1rem; border-radius: 999px; }
.skip:focus { left: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- floating pill nav ---------- */
.nav-shell {
  position: fixed; z-index: 60; left: 0; right: 0;
  top: calc(env(safe-area-inset-top, 0px) + 14px);
  display: flex; justify-content: center; pointer-events: none;
  padding-left: var(--gutter); padding-right: var(--gutter-r);
}
.nav {
  pointer-events: auto;
  display: flex; align-items: center; gap: .25rem;
  padding: .35rem; border-radius: 999px;
  background: var(--nav-bg);
  backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  max-width: 100%;
}
.nav .mono {
  display: grid; place-items: center; width: 2.15rem; height: 2.15rem; border-radius: 50%;
  background: var(--ink); color: var(--bg); font-weight: 700; font-size: .95rem; text-decoration: none;
  font-variation-settings: "wdth" 120; flex: none;
}
.nav-links { position: relative; display: flex; gap: .1rem; margin: 0 .25rem; }
.nav-links a {
  position: relative; z-index: 1; text-decoration: none; color: var(--muted);
  font-size: .9rem; font-weight: 500; padding: .45rem .8rem; border-radius: 999px; white-space: nowrap;
  transition: color .25s var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-indicator {
  position: absolute; z-index: 0; top: 0; bottom: 0; left: 0; width: 0; border-radius: 999px;
  background: var(--surface-2); opacity: 0;
  transition: transform .45s var(--ease), width .45s var(--ease), opacity .3s;
}
.nav-tools { display: flex; align-items: center; gap: .3rem; }

.lang-switch { position: relative; display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface-2); }
.lang-switch button {
  position: relative; z-index: 1; appearance: none; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: .78rem; font-weight: 650; padding: .3rem .55rem; border-radius: 999px; color: var(--muted);
  transition: color .3s var(--ease);
}
.lang-switch button[aria-pressed="true"] { color: var(--ink); }
.lang-switch .thumb {
  position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px);
  border-radius: 999px; background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.12);
  transition: transform .4s var(--ease);
}
html[data-lang="fr"] .lang-switch .thumb { transform: translateX(100%); }

.icon-btn {
  appearance: none; display: grid; place-items: center; width: 2.15rem; height: 2.15rem; border-radius: 50%;
  border: 0; background: var(--surface-2); color: var(--ink); cursor: pointer; flex: none;
  transition: transform .3s var(--ease);
}
.icon-btn:active { transform: scale(.92); }
.icon-btn svg { width: 1rem; height: 1rem; transition: transform .6s var(--ease), opacity .3s; }
.icon-btn .i-sun { display: none; }
:root[data-theme="dark"] .icon-btn .i-sun { display: block; }
:root[data-theme="dark"] .icon-btn .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-btn .i-sun { display: block; }
  :root:not([data-theme="light"]) .icon-btn .i-moon { display: none; }
}
.icon-btn.spin svg { transform: rotate(180deg); }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav { width: 100%; justify-content: space-between; }
}

/* ---------- the one CTA ---------- */
.cta {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .7rem 1.25rem; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--ink); color: var(--bg); font: inherit; font-weight: 600; font-size: .97rem; text-decoration: none;
  transition: transform .35s var(--ease), background-color .25s, box-shadow .35s var(--ease);
}
.cta:hover { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 24px -10px var(--accent); }
.cta:active { transform: scale(.97); }
.cta.small { padding: .5rem .95rem; font-size: .88rem; }
.cta[disabled] { opacity: .6; cursor: progress; }

/* quieter actions: text links and soft buttons, never competing with the CTA */
.text-link { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; color: var(--ink); text-decoration: none; }
.text-link svg { width: .95rem; height: .95rem; transition: transform .35s var(--ease); }
.text-link:hover svg { transform: translateY(2px); }
.soft-btn {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .62rem 1.05rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2);
  color: var(--ink); font: inherit; font-size: .93rem; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: transform .3s var(--ease), background-color .25s;
}
.soft-btn:hover { background: color-mix(in srgb, var(--surface-2) 70%, var(--ink) 8%); }
.soft-btn:active { transform: scale(.97); }

/* ---------- hero ---------- */
.hero { position: relative; padding: calc(7.5rem + env(safe-area-inset-top, 0px)) 0 3.5rem; overflow: hidden; }
.hero::before {
  /* faint column lines, like a reticle over a die */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(to right, var(--grid-line) 1px, transparent 1px);
  background-size: calc((min(100vw, 72rem + 32px)) / 6) 100%;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 30%, #000 30%, transparent 80%);
          mask-image: radial-gradient(ellipse 70% 80% at 50% 30%, #000 30%, transparent 80%);
}
.hero .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(13rem, 21rem); gap: clamp(2rem, 5vw, 4.5rem); align-items: end; }
.hero h1 {
  font-size: clamp(3.1rem, 9.5vw, 7rem); font-weight: 640; font-variation-settings: "wdth" 122;
  line-height: .9; letter-spacing: -0.035em; margin-bottom: 1.6rem;
}
.hero h1 .w { display: inline-block; }
.hero h1 .line { display: block; }
.hero .role { font-size: clamp(1.15rem, 2.1vw, 1.45rem); font-weight: 540; line-height: 1.32; max-width: 34ch; margin-bottom: 1rem; font-variation-settings: "wdth" 106; }
.hero .lede { color: var(--muted); max-width: 56ch; margin-bottom: 1.8rem; }
.hero .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-bottom: 1.6rem; }
.status {
  display: inline-flex; align-items: center; gap: .6rem; padding: .4rem .85rem .4rem .7rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); font-size: .9rem; box-shadow: var(--shadow);
}
.status .dot { position: relative; width: .5rem; height: .5rem; border-radius: 50%; background: var(--ok); flex: none; }
.status .dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--ok); opacity: 0; animation: ping 2.4s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(.6); opacity: .7; } 80%, 100% { transform: scale(1.6); opacity: 0; } }
.portrait { margin: 0; border-radius: var(--r-xl); overflow: hidden; background: var(--panel); aspect-ratio: 4 / 5; box-shadow: var(--shadow-lift); }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }

.worked {
  position: relative; margin-top: clamp(2.5rem, 6vw, 4rem); display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 2.5rem;
  color: var(--muted); font-size: .95rem;
}
.worked strong { color: var(--ink); font-weight: 600; font-variation-settings: "wdth" 112; font-size: 1.05rem; }

@media (max-width: 760px) {
  .hero { padding-top: calc(6rem + env(safe-area-inset-top, 0px)); }
  .hero .wrap { grid-template-columns: 1fr; }
  .portrait { order: -1; width: 8.5rem; aspect-ratio: 1; border-radius: 50%; }
  .worked { gap: .5rem 1.5rem; }
}

/* ---------- sections ---------- */
.section { padding: clamp(4rem, 9vw, 7rem) 0 0; }
.section:last-of-type { padding-bottom: clamp(4rem, 9vw, 7rem); }
.section-head { display: grid; gap: .9rem; margin-bottom: clamp(1.75rem, 4vw, 2.75rem); max-width: 46rem; }
.section-head p { color: var(--muted); font-size: 1.08rem; max-width: 52ch; }

.tile {
  background: var(--surface); border-radius: var(--r-lg); border: 1px solid var(--line);
  padding: clamp(1.25rem, 3vw, 2rem); box-shadow: var(--shadow); min-width: 0;
}

/* about */
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, 22rem); gap: 1rem; }
.about-grid .prose p { max-width: 62ch; font-size: 1.08rem; }
.facts { display: grid; gap: 0; align-content: start; margin: 0; }
.facts div { display: grid; gap: .1rem; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.facts div:first-child { padding-top: 0; }
.facts div:last-child { border-bottom: 0; padding-bottom: 0; }
.facts dt { color: var(--muted); font-size: .88rem; }
.facts dd { margin: 0; font-weight: 550; }
.facts a { text-decoration: none; }
.facts a:hover { text-decoration: underline; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }

/* experience */
.timeline { list-style: none; margin: 0; padding: .5rem clamp(1.25rem, 3vw, 2rem); }
.timeline > li { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: .25rem 1.75rem; padding: 1.6rem 0; border-bottom: 1px solid var(--line); }
.timeline > li:last-child { border-bottom: 0; }
.timeline .when { color: var(--muted); font-size: .92rem; font-variant-numeric: tabular-nums; padding-top: .2rem; }
.timeline h3 { margin-bottom: .2rem; }
.timeline .org { font-weight: 560; margin-bottom: .7rem; }
.timeline .org .place { color: var(--muted); font-weight: 400; }
.timeline ul { margin: 0; padding-left: 1.1rem; max-width: 66ch; }
.timeline ul li { margin-bottom: .35rem; }
.timeline ul li::marker { color: var(--muted); }
@media (max-width: 640px) { .timeline > li { grid-template-columns: 1fr; } }

/* projects bento */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1rem; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 1rem; text-decoration: none; color: inherit;
  grid-column: span 3;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.card.wide { grid-column: span 6; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: center; gap: clamp(1rem, 3vw, 2.5rem); }
.card.third { grid-column: span 2; }
a.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.media {
  border-radius: var(--r-md); overflow: hidden; background: var(--panel); aspect-ratio: 16 / 10;
  display: grid; place-items: center;
}
.media img { width: 100%; height: 100%; object-fit: contain; padding: .6rem; transition: transform .8s var(--ease); }
.media.cover img { object-fit: cover; padding: 0; }
a.card:hover .media img { transform: scale(1.035); }
.card h3 { font-size: 1.25rem; margin-bottom: .4rem; padding-right: 2.5rem; }
.card p { color: var(--muted); margin-bottom: .9rem; }
.go {
  position: absolute; top: clamp(1.25rem, 3vw, 2rem); right: clamp(1.25rem, 3vw, 2rem); z-index: 2;
  width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: transform .45s var(--ease), background-color .25s, color .25s;
}
.go svg { width: 1rem; height: 1rem; }
a.card:hover .go { transform: rotate(45deg); background: var(--ink); color: var(--bg); }
.card.wide .go, .card .media + div .go { top: auto; }
.card-body { position: relative; }
.card-body .go { top: 0; right: 0; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 0; }
.tags li { font-size: .82rem; padding: .25rem .65rem; border-radius: 999px; background: var(--surface-2); color: var(--ink); }
.result { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; margin: 0 0 1rem; font-variant-numeric: tabular-nums; }
.result b { font-size: 1.5rem; font-weight: 620; font-variation-settings: "wdth" 110; letter-spacing: -0.01em; }
.result span { color: var(--muted); font-size: .9rem; }
.paper {
  border-radius: var(--r-md); aspect-ratio: 16 / 10; padding: clamp(1.1rem, 3vw, 1.6rem);
  background: var(--accent-soft); display: flex; flex-direction: column; justify-content: space-between;
}
.paper .venue { font-size: .85rem; font-weight: 650; color: var(--accent); }
.paper .ptitle { font-size: clamp(1.2rem, 2.3vw, 1.6rem); line-height: 1.15; font-weight: 600; font-variation-settings: "wdth" 110; max-width: 22ch; }
.diagram svg { width: 92%; height: auto; }

.minis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 1rem; }
.mini { padding: 1.25rem 1.4rem; text-decoration: none; color: inherit; transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
a.mini:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.mini .name { font-weight: 620; display: flex; justify-content: space-between; gap: .5rem; align-items: baseline; }
.mini .name svg { width: .9rem; height: .9rem; flex: none; color: var(--muted); transition: transform .4s var(--ease); }
a.mini:hover .name svg { transform: translate(2px, -2px); color: var(--ink); }
.mini p { color: var(--muted); font-size: .95rem; margin: .3rem 0 0; }
@media (max-width: 900px) {
  .card, .card.third { grid-column: span 6; }
  .card.wide { grid-template-columns: 1fr; }
  .minis { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) { .minis { grid-template-columns: 1fr; } }

/* skills */
.skills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.skills h3 { margin-bottom: .9rem; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; padding: 0; margin: 0; }
.chips li { padding: .38rem .8rem; border-radius: 999px; background: var(--surface-2); font-size: .93rem; }
.langs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 1rem; }
.langs div { display: grid; gap: .1rem; }
.langs strong { font-weight: 620; }
.langs div > span { color: var(--muted); font-size: .92rem; }
.span-2 { grid-column: 1 / -1; }
.working p { max-width: 70ch; margin-top: .6rem; }
@media (max-width: 760px) {
  .skills { grid-template-columns: 1fr; }
  .langs { grid-template-columns: 1fr 1fr; }
}

/* credentials */
.creds { list-style: none; margin: 0; padding: .25rem clamp(1.25rem, 3vw, 2rem); }
.creds li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .2rem 1.5rem; padding: 1.15rem 0; border-bottom: 1px solid var(--line); }
.creds li:last-child { border-bottom: 0; }
.creds .what { font-weight: 620; }
.creds .detail { color: var(--muted); font-size: .95rem; grid-column: 1; }
.creds .soft-btn { grid-row: 1 / span 2; grid-column: 2; padding: .45rem .9rem; font-size: .86rem; }
@media (max-width: 560px) { .creds .soft-btn { grid-row: auto; grid-column: 1; justify-self: start; margin-top: .4rem; } }

/* references */
.quotes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.quote { margin: 0; display: flex; flex-direction: column; gap: 1.25rem; }
.quote blockquote { margin: 0; }
.quote blockquote p { margin-bottom: .8em; }
.quote.lead { grid-column: 1 / -1; }
.quote.lead blockquote { max-width: 68ch; font-size: clamp(1.1rem, 1.8vw, 1.3rem); line-height: 1.5; font-variation-settings: "wdth" 102; }
.quote figcaption { display: flex; align-items: center; gap: .85rem; margin-top: auto; }
.quote figcaption img { width: 2.8rem; height: 2.8rem; border-radius: 50%; }
.quote .who { font-weight: 620; line-height: 1.3; }
.quote .who span { display: block; font-weight: 400; color: var(--muted); font-size: .9rem; }
.note { color: var(--muted); font-size: .92rem; }
@media (max-width: 760px) { .quotes { grid-template-columns: 1fr; } }

/* contact */
.contact-tile { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(1.5rem, 4vw, 3rem); padding: clamp(1.5rem, 4vw, 3rem); border-radius: var(--r-xl); }
.email-big { display: inline-block; font-size: clamp(1.45rem, 3.4vw, 2.3rem); font-weight: 620; font-variation-settings: "wdth" 112; letter-spacing: -0.02em; text-decoration-thickness: 2px; word-break: break-word; margin: .25rem 0 1.5rem; }
.channels { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.channels li { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.channels li:first-child { border-top: 1px solid var(--line); }
.channels li > span:first-child { color: var(--muted); }
.phone { border-radius: var(--r-md); background: var(--surface-2); padding: 1.1rem 1.2rem; }
.phone h3 { font-size: 1rem; margin-bottom: .25rem; }
.phone > p { color: var(--muted); font-size: .92rem; margin-bottom: .85rem; }
.phone-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.phone-row .field { flex: 1 1 9rem; }
.phone .field input { background: var(--surface); }
.phone-out { display: none; align-items: center; gap: 1rem; flex-wrap: wrap; }
.phone-out.on { display: flex; animation: rise .6s var(--ease) both; }
.phone-out .num { font-size: 1.4rem; font-weight: 620; font-variant-numeric: tabular-nums; text-decoration: none; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

form.contact { display: grid; gap: 1rem; align-content: start; }
.field { display: grid; gap: .35rem; }
.field label { font-size: .9rem; font-weight: 580; }
.field input, .field textarea {
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--surface-2);
  border: 1px solid transparent; border-radius: var(--r-sm); padding: .72rem .9rem; width: 100%;
  transition: border-color .25s, background-color .25s, box-shadow .3s var(--ease);
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: 1; }
.field input:focus, .field textarea:focus { outline: none; background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field textarea { min-height: 9rem; resize: vertical; }
.field [aria-invalid="true"] { border-color: var(--err); }
.field .err { color: var(--err); font-size: .86rem; min-height: 0; display: none; }
.field .err.on { display: block; animation: rise .35s var(--ease) both; }
.form-foot { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.form-status { font-size: .95rem; margin: 0; }
.form-status.ok { color: var(--ok); }
.form-status.err { color: var(--err); }
.consent-note { font-size: .84rem; color: var(--muted); }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 860px) { .contact-tile { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.site-footer { padding: 2.5rem 0 calc(2.5rem + env(safe-area-inset-bottom, 0px)); color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); }
main.wrap { padding-bottom: clamp(3rem, 7vw, 5rem); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.site-footer button { appearance: none; border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: .2em; }
.site-footer a:hover, .site-footer button:hover { color: var(--ink); }

/* ---------- cookie banner ---------- */
.consent {
  position: fixed; z-index: 80; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  width: min(34rem, calc(100% - 32px)); transform: translate(-50%, 0);
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lift); padding: 1.15rem 1.25rem;
  animation: up .7s var(--ease) both;
}
.consent[hidden] { display: none !important; }
.consent p { font-size: .93rem; margin-bottom: .9rem; }
.consent .row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.consent .row .soft-btn { flex: 1 1 8rem; }
.consent .row a { font-size: .88rem; margin-left: auto; }
@keyframes up { from { opacity: 0; transform: translate(-50%, 20px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- project + legal pages ---------- */
.page-top { padding: calc(7rem + env(safe-area-inset-top, 0px)) 0 2rem; }
.crumbs { margin-bottom: 1.5rem; }
.crumbs a { display: inline-flex; align-items: center; gap: .4rem; text-decoration: none; color: var(--muted); font-size: .95rem; }
.crumbs a:hover { color: var(--ink); }
.crumbs svg { width: .9rem; height: .9rem; transition: transform .35s var(--ease); }
.crumbs a:hover svg { transform: translateX(-3px); }
.page-top h1 { font-size: clamp(2.3rem, 6.5vw, 4.6rem); font-variation-settings: "wdth" 118; font-weight: 630; line-height: .96; letter-spacing: -0.03em; max-width: 18ch; margin-bottom: 1.2rem; }
.page-top .intro { font-size: 1.15rem; max-width: 62ch; color: var(--muted); margin-bottom: 1.75rem; }
.meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1rem 2rem; margin: 0; }
.meta dt { color: var(--muted); font-size: .86rem; }
.meta dd { margin: .15rem 0 0; font-weight: 550; }
.p-sections { display: grid; gap: 1rem; padding-bottom: 1rem; }
.p-sec { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 1rem clamp(1.5rem, 4vw, 3rem); }
.p-sec > h2 { font-size: 1.35rem; font-variation-settings: "wdth" 110; letter-spacing: -0.01em; }
.p-sec .content { min-width: 0; max-width: 68ch; }
.p-sec .content > * + * { margin-top: 1rem; }
.p-sec ol, .p-sec ul { padding-left: 1.2rem; margin: 0; }
.p-sec li { margin-bottom: .5rem; }
.p-sec li::marker { color: var(--muted); }
.figs { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: none !important; }
.figs.one { grid-template-columns: 1fr; }
.fig { margin: 0; }
.fig .media { aspect-ratio: auto; margin-bottom: .55rem; }
.fig .media img { height: auto; max-height: 34rem; width: auto; max-width: 100%; }
.fig figcaption { font-size: .9rem; color: var(--muted); }
.fig.span { grid-column: 1 / -1; }
.compare { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: .2rem 2.25rem; font-variant-numeric: tabular-nums; }
.compare .k { color: var(--muted); font-size: .88rem; }
.compare .v { font-size: 1.7rem; font-weight: 620; font-variation-settings: "wdth" 110; }
.next-proj { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1.5rem 0 0; }
@media (max-width: 900px) { .p-sec { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .figs { grid-template-columns: 1fr; } .compare { gap: .2rem 1.25rem; } .compare .v { font-size: 1.3rem; } }

.legal { max-width: 46rem; }
.legal h2 { font-size: 1.35rem; font-variation-settings: "wdth" 108; letter-spacing: -0.01em; margin: 2rem 0 .7rem; }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal li { color: var(--ink); }
.legal ul { padding-left: 1.2rem; }
.legal li { margin-bottom: .4rem; }
.legal .updated { color: var(--muted); font-size: .9rem; }

.notfound { min-height: 70vh; display: grid; align-content: center; gap: 1.2rem; padding-block: 8rem 4rem; }
.notfound .code { font-size: clamp(5rem, 18vw, 11rem); font-weight: 680; font-variation-settings: "wdth" 125; line-height: .85; letter-spacing: -0.04em; color: var(--surface-2); -webkit-text-stroke: 1px var(--line); }
.notfound h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-variation-settings: "wdth" 115; }
.notfound .actions { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }

/* ---------- motion (only when the visitor allows it) ---------- */
html.motion [data-reveal] {
  opacity: 0; transform: translateY(18px); filter: blur(8px);
  transition: opacity .9s var(--ease), transform .9s var(--ease), filter .9s var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}
html.motion [data-reveal].in { opacity: 1; transform: none; filter: none; }
html.motion a.card[data-reveal].in, html.motion a.mini[data-reveal].in { transition: opacity .9s var(--ease), transform .5s var(--ease), filter .9s var(--ease), box-shadow .5s var(--ease); transition-delay: 0s; }
html.motion .hero h1 .w { opacity: 0; transform: translateY(.35em); filter: blur(10px); animation: word 1.1s var(--ease) forwards; animation-delay: calc(120ms + var(--i, 0) * 90ms); }
@keyframes word { to { opacity: 1; transform: none; filter: none; } }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* translated recommendations and the spec table */
.tr-note { color: var(--muted); font-size: .85rem; margin-top: .4rem; }
.table-wrap { overflow-x: auto; max-width: none !important; border-radius: var(--r-md); border: 1px solid var(--line); }
.spec-table { width: 100%; border-collapse: collapse; font-size: .93rem; font-variant-numeric: tabular-nums; }
.spec-table th, .spec-table td { padding: .6rem .85rem; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.spec-table td:nth-child(2) { white-space: normal; min-width: 12rem; }
.spec-table th { background: var(--surface-2); font-weight: 620; font-size: .86rem; }
.spec-table tbody tr:last-child td { border-bottom: 0; }
.spec-table td:nth-child(n+3), .spec-table th:nth-child(n+3) { text-align: right; }

/* company and school logos: one colour, follows the theme */
.logo { display: inline-block; flex: none; background-color: currentColor; color: var(--muted);
  -webkit-mask: var(--src) center / contain no-repeat; mask: var(--src) center / contain no-repeat;
  transition: color .3s var(--ease); }
.logo-infineon { --src: url("../img/logos/infineon.svg"); aspect-ratio: 1016 / 448; height: 2.1rem; }
.logo-microchip { --src: url("../img/logos/microchip.svg"); aspect-ratio: 171 / 92; height: 2.3rem; }
.logo-kontron { --src: url("../img/logos/kontron.svg"); aspect-ratio: 1241 / 230; height: 1.15rem; }
.logo-mines { --src: url("../img/logos/mines.svg"); aspect-ratio: 365 / 310; height: 2.6rem; }
.worked { gap: 1rem 2.75rem; }
.worked .logo:hover { color: var(--ink); }
.timeline .when { display: flex; flex-direction: column; align-items: flex-start; gap: .9rem; }
.timeline .when .logo { height: 1.6rem; }
.timeline .when .logo-kontron { height: .95rem; }
.timeline .when .logo-microchip { height: 1.9rem; }
.timeline .when .logo-mines { height: 2.4rem; }
.timeline > li:hover .when .logo { color: var(--ink); }
@media (max-width: 640px) { .timeline .when { flex-direction: row; align-items: center; justify-content: space-between; } }

/* about: photo above the facts */
.about-side { display: grid; gap: 1rem; align-content: start; min-width: 0; }
.photo { margin: 0; padding: 0; overflow: hidden; }
.photo { position: relative; min-height: 20rem; aspect-ratio: 3 / 4; }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; }
.photo figcaption { position: absolute; left: .75rem; bottom: .75rem; padding: .35rem .75rem; border-radius: 999px;
  background: rgba(10, 11, 13, .55); color: #f2f3f0; font-size: .82rem; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.about-grid .facts { grid-column: 1 / -1; align-items: start; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem 1.5rem; }
.about-grid .facts div, .about-grid .facts div:first-child, .about-grid .facts div:last-child { padding: 0; border: 0; }
@media (max-width: 860px) { .about-grid .facts { grid-template-columns: 1fr 1fr; } .photo { min-height: 0; aspect-ratio: 4 / 5; max-height: 34rem; } }
