/* edebost.com — carte de visite plein écran sur fond three.js. Polices système, aucune dépendance CSS. */
:root {
  --bg: #0a0b0d;
  --fg: #f3f4f6;
  --muted: #9aa1ab;
  --veil: 10, 11, 13;
  --glow-a: #0e2a2a;
  --glow-b: #12163a;
  --scheme: dark;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
/* Thème clair : préférence système sans choix explicite, ou choix explicite */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) { --bg: #eceef1; --fg: #121418; --muted: #5a616b; --veil: 236, 238, 241; --glow-a: #dfe9e6; --glow-b: #e3e4ee; --scheme: light; }
}
:root[data-theme="light"] { --bg: #eceef1; --fg: #121418; --muted: #5a616b; --veil: 236, 238, 241; --glow-a: #dfe9e6; --glow-b: #e3e4ee; --scheme: light; }
* { box-sizing: border-box; }
html { height: 100%; color-scheme: var(--scheme); }
body {
  margin: 0; min-height: 100%;
  color: var(--fg); font-family: var(--sans); -webkit-font-smoothing: antialiased;
  background: var(--bg) radial-gradient(120% 90% at 20% 10%, var(--glow-a) 0%, var(--bg) 45%, var(--glow-b) 100%) fixed;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:focus-visible { outline: 1px solid var(--muted); outline-offset: 4px; }

#bg { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; opacity: 0; transition: opacity .8s ease-out; }
#bg.ready { opacity: 1; }
.no-webgl #bg { display: none; }

.content {
  position: relative; z-index: 1;
  min-height: 100svh;
  max-width: 120rem; margin-inline: auto;
  display: grid; grid-template-rows: auto 1fr auto; gap: 2rem;
  padding: clamp(1.5rem, 5vw, 4rem);
  padding-top: max(1rem, env(safe-area-inset-top));
}
.content::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(100deg, rgba(var(--veil), .45) 0%, rgba(var(--veil), .1) 55%, rgba(var(--veil), 0) 100%);
}

.top { display: flex; justify-content: flex-end; }
.theme { display: flex; gap: 1.1rem; font-size: .9rem; color: var(--muted); }
.theme button {
  all: unset; cursor: pointer; color: inherit; display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; padding: .25rem .125rem; border-bottom: 1px solid transparent;
}
.theme button:hover { color: var(--fg); }
.theme button[aria-pressed="true"] { color: var(--fg); border-bottom-color: var(--fg); }
.theme button:focus-visible { outline: 1px solid var(--muted); outline-offset: 4px; }

.hero { align-self: center; will-change: transform; transition: opacity .8s ease; }
.hero.is-dimmed { opacity: .06; }
h1 { margin: 0; font-size: clamp(3rem, min(11vw, 24vh), 13rem); font-weight: 700; letter-spacing: -.045em; line-height: .92; }
h1 span { display: block; }
.role { margin: 1.5rem 0 0; font-size: clamp(1.05rem, 1.6vw, 1.75rem); }
.thesis { margin: .3rem 0 0; font-size: clamp(1.05rem, 1.6vw, 1.75rem); color: var(--muted); }

.links { display: flex; flex-wrap: wrap; gap: .75rem 1.75rem; list-style: none; margin: 0; padding: 0; font-size: clamp(1.05rem, 1.2vw, 1.35rem); }

/* Page d'erreur */
.error .code { margin: 0; font-size: clamp(4rem, 14vw, 9rem); font-weight: 700; letter-spacing: -.05em; line-height: 1; }
.error h1 { font-size: clamp(1.5rem, 3vw, 2.25rem); letter-spacing: -.02em; line-height: 1.15; margin-top: 1rem; }

/* Mobile : les liens deviennent des surfaces tactiles pleine largeur */
@media (max-width: 40rem) {
  .links { display: grid; gap: .6rem; }
  .links a {
    display: flex; align-items: center; min-height: 3.25rem; padding: 0 1.1rem;
    border: 1px solid color-mix(in srgb, var(--fg) 25%, transparent); border-radius: .75rem;
    background: rgba(var(--veil), .4); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    overflow-wrap: anywhere;
  }
  .links a:hover, .links a:focus-visible { text-decoration: none; }
  .links a:active { background: color-mix(in srgb, var(--fg) 12%, transparent); }
}
