/* TRAO : feuille de style du portfolio.
   Thème clair = carnet papier, encre noire, accent orange.
   Thème sombre = nuit mauve, accent mauve. */

/* ---------- Polices (auto-hébergées) ---------- */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/archivo-latin-wght-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: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/archivo-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Reenie Beanie";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/reenie-beanie-latin-400-normal.woff2") format("woff2");
}

/* ---------- Thèmes ---------- */
:root {
  --paper: #EFECE6;
  --ink: #141414;
  --muted: #5C5953;
  --accent: #FF4D1A;
  --on-accent: #141414;
  --line: rgba(20, 20, 20, .14);
  --ghost: rgba(20, 20, 20, .06);
  --grid: rgba(20, 20, 20, .05);
  --sep: rgba(20, 20, 20, .22);
  --surface: #141414;
  --on-surface: #EFECE6;
  --surface-line: rgba(239, 236, 230, .18);
  --console: #141414;
  --console-text: #A8A49C;
  --console-strong: #EFECE6;
  --console-line: rgba(239, 236, 230, .18);
  --tape: rgba(233, 228, 218, .9);
  --nav-bg: rgba(239, 236, 230, .86);
  --grain: .05;

  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --hand: "Reenie Beanie", "Comic Sans MS", cursive;

  --pad: clamp(24px, 4.45vw, 64px);
  --gutter: max(var(--pad), calc((100% - 1312px) / 2));
  --spring: cubic-bezier(.34, 1.45, .64, 1);
  --out: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}

[data-theme="dark"] {
  --paper: #17121D;
  --ink: #EEE7F4;
  --muted: #A99CB6;
  --accent: #C69CFF;
  --on-accent: #17121D;
  --line: rgba(238, 231, 244, .14);
  --ghost: rgba(238, 231, 244, .08);
  --grid: rgba(198, 156, 255, .07);
  --sep: rgba(238, 231, 244, .25);
  --surface: #2A1F37;
  --on-surface: #F3ECF8;
  --surface-line: rgba(243, 236, 248, .16);
  --console: #0E0A13;
  --console-text: #9F92AE;
  --console-strong: #EEE7F4;
  --console-line: rgba(238, 231, 244, .14);
  --tape: rgba(198, 156, 255, .32);
  --nav-bg: rgba(23, 18, 29, .86);
  --grain: .09;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 84px;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background-color: var(--paper);
  /* papier petits carreaux */
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .4s ease, color .4s ease;
}

/* grain d'impression */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
[data-theme="dark"] body::after { filter: invert(1); }

a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
img, svg { display: block; }
button { font: inherit; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 300;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}
.skip:focus { top: 12px; }

.page { position: relative; overflow-x: clip; }

/* marge de cahier */
.page::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: max(12px, calc(var(--gutter) - 24px));
  width: 1.5px;
  background: var(--accent);
  opacity: .5;
  pointer-events: none;
}
.nav, main, .footer { position: relative; z-index: 1; }

.hand {
  font-family: var(--hand);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  color: var(--accent);
}

.label {
  display: inline-block;
  margin-bottom: 14px;
  font-size: clamp(40px, 3.4vw, 50px);
  transform: rotate(-3deg);
  transform-origin: left center;
}

.i {
  width: 16px;
  height: 16px;
  flex: none;
  transition: transform .25s var(--out);
}

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px var(--gutter);
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  transition: background-color .4s ease;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: .04em;
  text-decoration: none;
}
.logo-bloc {
  width: 12px;
  height: 12px;
  background: var(--accent);
  transition: transform .45s var(--spring);
}
.logo:hover .logo-bloc { transform: translateY(3px) rotate(-18deg); }

.nav-links { display: flex; gap: 40px; }
.nav-links a {
  position: relative;
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--out);
}
.nav-links a:hover::after,
.nav-links a.is-current::after { transform: scaleX(1); }

.nav-actions { display: flex; align-items: center; gap: 18px; }

.nav-gh {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
}
.nav-gh:hover .i { transform: translate(2px, -2px); }

.theme-toggle {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
}
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .half { transform-origin: 10px 10px; transition: transform .5s var(--spring); }
[data-theme="dark"] .theme-toggle .half { transform: rotate(180deg); }
.theme-toggle:hover .half { fill: var(--accent); }

.menu-btn {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-weight: 500;
  font-size: 15px;
  cursor: pointer;
}
.burger {
  position: relative;
  width: 20px;
  height: 9px;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transition: transform .3s var(--out);
}
.nav.is-open .burger { transform: scaleX(.6); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 24px;
  border: 1.5px solid var(--ink);
  border-radius: 0;
  background: none;
  color: var(--ink);
  font: 600 16px/1.2 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, gap .3s var(--out);
}
.btn:hover { gap: 22px; }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover .i-down { transform: translateY(2px); }
.btn-secondary:hover { background: var(--ink); color: var(--paper); }
.btn-inverse { border-color: var(--on-surface); color: var(--on-surface); }
.btn-inverse:hover { background: var(--on-surface); color: var(--surface); }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 80px;
  padding: 112px var(--gutter) 96px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 18px;
  font-size: clamp(36px, 3.2vw, 46px);
  transform: rotate(-2deg);
  transform-origin: left center;
}

.h1 {
  margin-bottom: 36px;
  font-weight: 600;
  font-size: clamp(44px, 6.4vw, 92px);
  line-height: .98;
  letter-spacing: -.033em;
}
.h1 .line {
  display: block;
  overflow: hidden;
  padding-bottom: .1em;
  margin-bottom: -.1em;
}
.h1 .line > span {
  display: inline-block;
  transition: transform .85s var(--out), opacity .6s ease;
}

.lead {
  max-width: 560px;
  margin-bottom: 36px;
  font-size: 20px;
  line-height: 1.5;
  color: var(--muted);
}

.cta { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-art { position: relative; padding-bottom: 104px; }

/* Logo pixel */
.pixel-trao {
  --cell: 30px;
  --gap: 4px;
  --step: calc(var(--cell) + var(--gap));
  position: relative;
  display: inline-grid;
  grid-template-columns: repeat(2, auto);
  gap: var(--step);
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.pixel-trao:not(.is-built) { font: 800 120px/1 var(--sans); letter-spacing: -.04em; }
.pixel-trao:focus-visible { outline: 2px solid var(--accent); outline-offset: 10px; }

.px-letter {
  display: grid;
  grid-template-columns: repeat(5, var(--cell));
  grid-auto-rows: var(--cell);
  gap: var(--gap);
}
.px {
  background: var(--ghost);
  transition: opacity .5s ease, background-color .4s ease;
}
.px.on {
  background: var(--ink);
  transition:
    transform .55s var(--spring) var(--d, 0ms),
    opacity .2s linear var(--d, 0ms),
    background-color .4s ease;
}
.px.hole {
  background: none;
  outline: 1.5px dashed var(--accent);
  outline-offset: -1.5px;
}
.px-drop {
  position: absolute;
  width: var(--cell);
  height: var(--cell);
  background: var(--accent);
  transform: translate(calc(var(--step) * 1.1), calc(var(--step) * 1.7)) rotate(-18deg);
  transition: transform .75s var(--spring), background-color .4s ease;
  pointer-events: none;
  will-change: transform;
}
.pixel-trao.is-placed .px-drop { transform: none; }
.pixel-trao.drop-top .px-drop {
  transform: translate(0, var(--ty, -120px));
  transition: transform .55s cubic-bezier(.65, 0, .35, 1);
}
.pixel-trao.drop-center .px-drop { transform: translate(var(--cx, 0), var(--cy, 0)); }
.pixel-trao.no-anim .px,
.pixel-trao.no-anim .px-drop { transition: none !important; }

/* Note "il en manque toujours un" (position calée sur le bloc par le JS) */
.hero-note {
  position: absolute;
  left: calc(var(--bx, 300px) - 420px);
  top: calc(var(--by, 530px) + 72px);
  white-space: nowrap;
}
.hero-note .hand {
  display: inline-block;
  font-size: 46px;
  transform: rotate(-4deg);
}
.note-arrow-d {
  position: absolute;
  left: calc(100% - 4px);
  top: -46px;
  width: 56px;
  height: 64px;
}
.note-arrow-m { display: none; }
.no-js .hero-note { display: none; }

/* traits manuscrits */
.scribble { overflow: visible; }
.scribble path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.scribble.to-draw path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.scribble.drawn path { stroke-dashoffset: 0; transition: stroke-dashoffset .8s cubic-bezier(.6, 0, .2, 1); }
.scribble.drawn path + path { transition-delay: .65s; transition-duration: .25s; }

/* ---------- Intro (uniquement avec JS et sans mouvement réduit) ---------- */
.intro .pixel-trao:not(.is-built) { visibility: hidden; }
.intro .pixel-trao:not(.grid-in) .px:not(.on) { opacity: 0; }
.intro .px-letter:not(.in) .px.on {
  opacity: 0;
  transform: translateY(calc(var(--drop, 5) * var(--step) * -1));
}
.intro .h1 .line:not(.in) > span { transform: translateY(108%); }
.intro .intro-item:not(.in) { opacity: 0; transform: translateY(14px); }
.intro-item { transition: opacity .6s ease, transform .7s var(--out); }

/* ---------- Bandeau infos ---------- */
.infos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-inline: var(--gutter);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.infos > div { padding: 22px 24px 26px; border-left: 1px solid var(--line); }
.infos > div:first-child { padding-left: 0; border-left: 0; }
.infos dt { margin-bottom: 8px; font-size: 14px; color: var(--muted); }
.infos dd { font-size: 18px; font-weight: 500; }

/* ---------- Sections ---------- */
.section { padding: clamp(80px, 11vw, 160px) var(--gutter); }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 64px;
  margin-bottom: 72px;
}
.title {
  font-weight: 600;
  font-size: clamp(40px, 4.45vw, 64px);
  line-height: 1;
  letter-spacing: -.03em;
}
.aside { max-width: 340px; font-size: 17px; color: var(--muted); }
.sq {
  display: inline-block;
  width: .62em;
  height: .62em;
  background: var(--accent);
  vertical-align: -.02em;
}

/* Profil */
.profil {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 64px;
}
.margin-note {
  margin-top: 28px;
  font-size: 40px;
  line-height: .92;
  color: var(--muted);
  transform: rotate(-3deg);
  transform-origin: left top;
}
.statement {
  margin-bottom: 96px;
  font-size: clamp(24px, 2.65vw, 38px);
  line-height: 1.28;
  letter-spacing: -.012em;
}
.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding: 0;
  list-style: none;
}
.principles li { padding-top: 14px; border-top: 2px solid var(--ink); }
.principles .num { display: block; font-size: 46px; line-height: .9; }
.principles h3 { margin: 8px 0 10px; font-size: 22px; font-weight: 600; }
.principles p { color: var(--muted); }

/* En ce moment (KAHO) */
.kaho {
  padding-block: 128px;
  background: var(--surface);
  color: var(--on-surface);
  transition: background-color .4s ease, color .4s ease;
}
.kaho-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 64px;
  margin-bottom: 96px;
}
.kaho-word {
  display: flex;
  align-items: flex-start;
  gap: .05em;
  margin-top: 4px;
  font-weight: 800;
  font-size: clamp(112px, 16.7vw, 240px);
  line-height: .85;
  letter-spacing: -.05em;
}
.kaho-bloc {
  flex: none;
  width: .18em;
  height: .18em;
  margin-top: .02em;
  background: var(--accent);
}
.kaho-desc { max-width: 440px; padding-bottom: 24px; }
.kaho-desc p { margin-bottom: 32px; font-size: 22px; line-height: 1.45; }
.missions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 32px;
  padding: 0;
  list-style: none;
}
.missions li {
  padding: 22px 0 34px;
  border-top: 1px solid var(--surface-line);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.3;
}

/* impression riso décalée */
.riso { text-shadow: .035em .026em 0 var(--accent); }
.contact-title.riso { text-shadow: .045em .035em 0 var(--accent); }

/* Projets */
.project {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  border: 1px solid var(--line);
}
.tape {
  position: absolute;
  z-index: 2;
  width: 140px;
  height: 34px;
  background: var(--tape);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .1);
}
.tape-l { left: -40px; top: -14px; transform: rotate(-9deg); }
.tape-r { right: -26px; top: -8px; transform: rotate(8deg); }

.console {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-height: 560px;
  padding: 32px 40px 40px;
  background: var(--console);
  color: var(--console-text);
  transition: background-color .4s ease;
}
.console-bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--console-line);
  font: 500 12px var(--mono);
}
.status { display: inline-flex; align-items: center; gap: 8px; color: var(--console-strong); }
.status i { width: 8px; height: 8px; background: var(--accent); animation: blink 2.4s steps(1) infinite; }

.ygg-console { font: 400 16px/1.8 var(--mono); }
.ygg-console .line { display: block; min-height: 1.8em; white-space: pre; }
.ygg-console .cmd,
.ygg-console .ok-text { color: var(--console-strong); }
.ygg-console .ok { color: var(--accent); }
.ygg-cursor {
  display: inline-block;
  width: .6em;
  height: 1.1em;
  margin-left: .15em;
  vertical-align: -.2em;
  background: var(--accent);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.capture {
  position: relative;
  display: flex;
  align-items: flex-end;
  flex: 1;
  min-height: 170px;
  padding: 20px;
  border: 1px dashed var(--console-line);
}
.capture-label { font: 500 11px var(--mono); letter-spacing: .02em; }
.capture-annot {
  position: absolute;
  right: 22px;
  top: 18px;
  display: flex;
  align-items: flex-start;
  gap: 4px;
}
.capture-note { font-size: 46px; white-space: nowrap; transform: rotate(-3deg); }
.capture-arrow { flex: none; width: 90px; height: 70px; margin-top: 18px; }

.project-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  padding: 44px 48px 48px;
}
.kicker { font-size: 14px; color: var(--muted); }
.project-title {
  font-weight: 800;
  font-size: clamp(48px, 5.6vw, 80px);
  line-height: .95;
  letter-spacing: -.045em;
}
.project-desc { font-size: 18px; color: var(--muted); }
.specs { width: 100%; }
.specs div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.specs dt { font-size: 14px; color: var(--muted); }
.specs dd { font-size: 16px; font-weight: 500; }

.project-row {
  display: grid;
  grid-template-columns: 440px minmax(0, 1fr) auto;
  align-items: center;
  gap: 40px;
  padding: 36px 0;
  border-bottom: 1px solid var(--line);
}
.project-row h3 { font-size: 34px; font-weight: 600; letter-spacing: -.03em; }
.project-row p { font-size: 17px; color: var(--muted); }
.tag { font-size: 14px; color: var(--muted); }

/* Outils */
.outils { padding-top: 40px; }
.stack { border-bottom: 1px solid var(--line); }
.stack-row {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 64px;
  padding: 28px 0 32px;
  border-top: 1px solid var(--line);
}
.stack-row h3 { margin-top: 10px; font-size: 15px; font-weight: 400; color: var(--muted); }
.stack-items {
  display: flex;
  flex-wrap: wrap;
  padding: 0;
  list-style: none;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -.01em;
}
.stack-items li + li::before { content: "/"; margin: 0 .45em; font-weight: 400; color: var(--sep); }
.daily:first-child::before {
  content: "";
  display: inline-block;
  width: .55em;
  height: .55em;
  margin-right: .3em;
  background: var(--accent);
  vertical-align: .04em;
}
.java { position: relative; }
.java-circle {
  position: absolute;
  left: -18px;
  top: -10px;
  width: calc(100% + 36px);
  height: 58px;
  pointer-events: none;
}
.java-note {
  position: absolute;
  left: calc(100% + 26px);
  bottom: calc(100% + 2px);
  font-size: 48px;
  white-space: nowrap;
  transform: rotate(-6deg);
}

/* Contact */
.contact { padding-top: 140px; padding-bottom: 120px; border-top: 1px solid var(--line); }
.contact-title {
  margin: 10px 0 64px;
  font-weight: 800;
  font-size: clamp(52px, 9.2vw, 132px);
  line-height: .92;
  letter-spacing: -.05em;
}
.contact-list { padding: 0; list-style: none; border-bottom: 1px solid var(--ink); }
.contact-row {
  display: flex;
  align-items: center;
  gap: 24px;
  width: 100%;
  padding: 26px 0;
  border: 0;
  border-top: 1px solid var(--ink);
  background: none;
  color: var(--ink);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.c-name {
  font-size: clamp(28px, 3.3vw, 48px);
  font-weight: 600;
  letter-spacing: -.04em;
  transition: transform .35s var(--out);
}
.contact-row:hover .c-name { transform: translateX(10px); }
.c-meta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
  font-size: 16px;
  color: var(--muted);
}
.c-meta .i { width: 20px; height: 20px; color: var(--ink); }
.contact-row:hover .c-meta .i { color: var(--accent); transform: translate(2px, -2px); }
.contact-note { display: inline-flex; align-items: center; gap: 10px; }
.contact-note svg { width: 70px; height: 30px; }
.contact-note .hand { font-size: 46px; transform: rotate(-2deg); }

/* Footer */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 28px var(--gutter) 32px;
  font-size: 14px;
  color: var(--muted);
}
.footer a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}
.footer a:hover .i { transform: translateY(-2px); }
.blocs { display: flex; gap: 4px; }
.blocs i { width: 10px; height: 10px; background: var(--ink); }
.blocs i:last-child { background: var(--accent); }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 200;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  background: var(--ink);
  color: var(--paper);
  font: 500 14px var(--sans);
  opacity: 0;
  transform: translate(-50%, 16px);
  transition: opacity .3s ease, transform .3s var(--out);
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .hero { gap: 48px; }
  .project-row { grid-template-columns: 1fr; gap: 8px; }
  .capture-arrow { display: none; }
}

@media (max-width: 900px) {
  .nav { padding-block: 16px; }
  .nav-gh { display: none; }
  .menu-btn { display: inline-flex; }
  .nav-links { display: none; }
  .nav.is-open .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: calc(100dvh - 64px);
    padding: 32px var(--gutter);
    background: var(--paper);
    border-top: 1px solid var(--line);
  }
  .nav.is-open .nav-links a { font-size: 40px; font-weight: 600; letter-spacing: -.03em; }
  .nav.is-open .nav-links a::after { display: none; }

  .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 40px; padding-bottom: 48px; }
  .hero-art { order: -1; padding-bottom: 32px; }
  .pixel-trao { --cell: 12px; --gap: 2px; grid-template-columns: repeat(4, auto); }
  .hero-note { left: calc(var(--bx) - 240px); top: calc(var(--by) - 4px); }
  .hero-note .hand { font-size: 34px; }
  .hero-note .long { display: none; }
  .note-arrow-d { display: none; }
  .note-arrow-m { display: block; position: absolute; left: calc(100% + 4px); top: 0; width: 46px; height: 26px; }

  .h1 .line { display: inline; overflow: visible; padding: 0; margin: 0; }
  .h1 .line > span { display: inline; }
  .intro .h1 .line:not(.in) > span { transform: none; opacity: 0; }

  .cta { flex-direction: column; }
  .cta .btn, .kaho .btn, .project-body .btn { width: 100%; }

  .infos { grid-template-columns: 1fr 1fr; }
  .infos > div { padding: 16px 0 18px 16px; }
  .infos > div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .infos > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .infos dd { font-size: 15px; }
  .infos dt { font-size: 13px; }

  .profil { grid-template-columns: 1fr; gap: 24px; }
  .margin-note { display: none; }
  .statement { margin-bottom: 48px; }
  .principles { grid-template-columns: 1fr; gap: 24px; }

  .kaho { padding-block: 72px; }
  .kaho-top { flex-direction: column; align-items: flex-start; gap: 28px; margin-bottom: 40px; }
  .kaho-desc { padding-bottom: 0; }
  .kaho-desc p { font-size: 17px; }
  .missions { grid-template-columns: 1fr; }
  .missions li { padding: 14px 0; font-size: 16px; }

  .section-head { flex-direction: column; align-items: flex-start; gap: 16px; margin-bottom: 32px; }

  .project { grid-template-columns: 1fr; }
  .console { min-height: 0; padding: 20px; gap: 16px; }
  .ygg-console { font-size: 12px; }
  .capture { display: none; }
  .project-body { padding: 24px 20px; gap: 18px; }
  .tape-r { display: none; }
  .tape-l { left: -20px; top: -10px; width: 92px; height: 26px; }

  .stack-row { grid-template-columns: 1fr; gap: 8px; padding: 16px 0 20px; }
  .stack-row h3 { margin: 0; font-size: 13px; }
  .stack-items { font-size: 20px; }
  .java-circle { left: -12px; top: -9px; width: calc(100% + 24px); height: 44px; }
  .java-note { font-size: 34px; left: calc(100% + 16px); }

  .contact { padding-top: 72px; padding-bottom: 64px; }
  .contact-title { margin-bottom: 32px; }
  .contact-row { gap: 12px; padding: 18px 0; }
  .c-meta { font-size: 0; gap: 0; }
  .contact-note svg { width: 38px; height: 22px; }
  .contact-note .hand { font-size: 32px; }
  .contact-note .long { display: none; }

  .footer { padding-block: 20px 32px; font-size: 13px; }
  .blocs { display: none; }
}

@media (min-width: 600px) and (max-width: 900px) {
  .pixel-trao { --cell: 20px; --gap: 3px; }
}

@media (max-width: 380px) {
  .contact-note { display: none; }
}

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