/* ─────────────────────────────────────────────
   Palette : ~/.dotfiles/.config/hypr/scifi.conf
   ───────────────────────────────────────────── */
:root {
  --primary: #7dcfff;
  --accent1: #ff7b9c;
  --accent2: #ffb86c;
  --accent3: #89dceb;
  --overlay0: #6c7086;
  --text: #e6f4ff;
  --muted: #9aa6b8;
  --bg: #05070a;
  --glass: rgba(0, 0, 0, 0.55);
  --glass-strong: rgba(0, 0, 0, 0.72);
  --line: rgba(125, 207, 255, 0.28);

  --rounding: 4px;            /* decoration:rounding */
  --gap: 6px;                 /* gaps, un peu plus généreux que 2 */
  --blur: 12px;

  --mono: "Fira Mono", "FiraMono Nerd Font", ui-monospace, monospace;
  --display: "Syne", system-ui, sans-serif;
  --bar-h: 44px;
}

@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-h) + 12px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* wallpaper fixe, flouté et assombri, comme derrière des fenêtres */
body::before {
  content: "";
  position: fixed; inset: -40px;
  z-index: -2;
  background: url("assets/wallpaper.webp") center / cover no-repeat;
  filter: blur(18px) saturate(1.15) brightness(0.22);
}
body::after {
  content: "";
  position: fixed; inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.025) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at 50% 120%, rgba(125,207,255,0.08), transparent 60%);
}
::selection { background: var(--accent1); color: #000; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--display); margin: 0; line-height: 1.02; letter-spacing: -0.02em; }
em { font-style: italic; color: var(--primary); }
p { margin: 0; }

.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }

.label {
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 18px;
}
.label b { color: var(--accent1); font-weight: 400; }

/* ─────────────── WAYBAR ─────────────── */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--bar-h);
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px;
  padding: 0 12px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  font-size: 13px; font-weight: 700;
  color: var(--overlay0);
}
.ws { display: flex; height: 100%; }
.ws a {
  display: flex; align-items: center; gap: 6px;
  padding: 0 10px; height: 100%;
  border-top: 2px solid transparent;
  transition: color .15s, border-color .15s, background .15s;
}
.ws a em { font-style: normal; color: inherit; font-weight: 500; }
.ws a:hover, .ws a.active {
  color: var(--primary);
  border-top-color: var(--primary);
  background: rgba(0, 0, 0, 0.3);
}
.bar-title { text-align: center; color: var(--muted); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-right { display: flex; gap: 6px; }
.mod {
  border: 1px solid var(--primary); border-radius: var(--rounding);
  padding: 2px 10px; color: var(--primary); background: rgba(0,0,0,.7);
  font-variant-numeric: tabular-nums;
}
.status { display: inline-flex; align-items: center; gap: 8px; color: var(--accent3); border-color: var(--accent3); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent3); box-shadow: 0 0 8px var(--accent3); animation: blink 1.6s steps(2) infinite; }
@keyframes blink { 50% { opacity: .25; } }
.bar-progress {
  position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  transform-origin: left; transform: scaleX(0);
  background: linear-gradient(90deg, var(--primary), var(--accent1));
}

/* ─────────────── FENÊTRES ─────────────── */
.win {
  position: relative;
  background: var(--glass);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid var(--line);
  border-radius: var(--rounding);
  transition: border-color .2s, transform .25s, box-shadow .25s;
}
/* bordure animée : col.active_border = $primary $accent1 90deg + borderangle loop */
.win::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 2px;
  background: conic-gradient(from var(--angle), var(--primary), var(--accent1), var(--primary));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .25s;
  animation: spin 6s linear infinite;
  pointer-events: none;
}
.win.focus::before, .win:hover::before { opacity: 1; }
.win:hover { border-color: transparent; box-shadow: 0 0 40px -12px rgba(255,123,156,.35); }
@keyframes spin { to { --angle: 360deg; } }

.win-head {
  display: flex; justify-content: space-between;
  padding: 8px 14px;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--overlay0);
  border-bottom: 1px solid rgba(125,207,255,.12);
}
.win-head span:first-child { color: var(--primary); }
.win-body { padding: 22px; }

.tiles { display: grid; gap: var(--gap); list-style: none; padding: 0; margin: 0; }

/* ─────────────── HERO ─────────────── */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--bar-h) + 40px) 0 90px;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(5,7,10,.94) 0%, rgba(5,7,10,.72) 45%, rgba(5,7,10,.45) 100%),
    linear-gradient(to bottom, rgba(5,7,10,.55), transparent 40%),
    linear-gradient(to top, var(--bg) 0%, transparent 35%),
    url("assets/wallpaper.webp") center 40% / cover no-repeat;
  animation: drift 30s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: scale(1.06) translate(-1%, 1%); } }

.hero-grid {
  width: min(1200px, 100% - 32px); margin-inline: auto;
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 48px; align-items: center;
}
.hero h1 { font-size: clamp(30px, 5.2vw, 72px); font-weight: 800; margin-bottom: 28px; }
.hero h1 em { color: var(--primary); text-shadow: 0 0 30px rgba(125,207,255,.45); }
.lead { max-width: 52ch; color: #c9d6e6; font-size: 16px; margin-bottom: 32px; }
.lead strong { color: var(--text); }

.cta { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 20px; border-radius: var(--rounding);
  font-weight: 700; font-size: 14px;
  border: 1px solid var(--primary);
  transition: background .2s, color .2s, transform .2s, box-shadow .2s;
}
.btn span { transition: transform .2s; }
.btn:hover span { transform: translate(2px, -2px); }
.btn.primary { background: var(--primary); color: #00121c; }
.btn.primary:hover { box-shadow: 0 0 28px rgba(125,207,255,.55); }
.btn.ghost { color: var(--primary); background: rgba(0,0,0,.4); backdrop-filter: blur(6px); }
.btn.ghost:hover { background: rgba(125,207,255,.12); }

.coords { display: flex; flex-wrap: wrap; gap: 28px; margin: 44px 0 0; font-size: 12px; }
.coords dt { color: var(--overlay0); letter-spacing: .16em; }
.coords dd { margin: 0; color: var(--accent2); }

.term { font-size: 13.5px; }
.cmd { margin-bottom: 18px; }
.p { color: var(--primary); font-weight: 700; }
.c { color: var(--accent1); }
.g { color: var(--accent3); }
.caret { display: inline-block; width: 8px; height: 1.05em; vertical-align: -2px; background: var(--primary); animation: blink 1s steps(2) infinite; margin-left: 2px; }
.fetch { display: flex; gap: 22px; opacity: 0; transform: translateY(6px); transition: opacity .5s, transform .5s; }
.fetch.on { opacity: 1; transform: none; }
.ascii { margin: 0; color: var(--primary); line-height: 1.15; text-shadow: 0 0 12px rgba(125,207,255,.5); }
.fetch ul { list-style: none; margin: 0; padding: 0; }
.fetch li { white-space: nowrap; }
.fetch li b { color: var(--primary); }
.fetch .k { display: inline-block; min-width: 6.5ch; color: var(--accent1); font-weight: 700; }
.fetch .rule { color: var(--overlay0); }
.swatch { display: flex; gap: 0; margin-top: 10px; }
.swatch i { width: 22px; height: 14px; }
.swatch i:nth-child(1) { background: #000; }
.swatch i:nth-child(2) { background: var(--accent1); }
.swatch i:nth-child(3) { background: var(--accent2); }
.swatch i:nth-child(4) { background: var(--accent3); }
.swatch i:nth-child(5) { background: var(--primary); }
.swatch i:nth-child(6) { background: var(--overlay0); }

.scroll-hint {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  font-size: 11px; letter-spacing: .24em; color: var(--overlay0);
}
.scroll-hint span { display: inline-block; animation: bob 1.6s ease-in-out infinite; color: var(--primary); }
@keyframes bob { 50% { transform: translateY(4px); } }

/* ─────────────── SECTIONS ─────────────── */
.chapter { padding: 120px 0; }
.sec-head { margin-bottom: 48px; max-width: 760px; }
.sec-head h2, .contact h2 { font-size: clamp(36px, 5.4vw, 72px); font-weight: 700; }
.sub { margin-top: 22px; color: var(--muted); max-width: 58ch; }

.win h3 { font-size: 26px; font-weight: 700; margin-bottom: 12px; }
.win-body > p:not(.meta):not(.tag) { color: #c3cedc; }
.meta { margin-top: 18px; font-size: 12px; color: var(--accent2); letter-spacing: .06em; }
.tag { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--acc, var(--accent1)); margin-bottom: 10px; }

.steps { grid-template-columns: repeat(3, 1fr); counter-reset: s; }
.steps .win-body { min-height: 230px; display: flex; flex-direction: column; }
.steps .meta { margin-top: auto; padding-top: 18px; }

.formats { grid-template-columns: repeat(3, 1fr); }
.card { border-top: 2px solid var(--acc); }
.card .win-head span:first-child { color: var(--acc); }
.card h3 { font-size: 30px; }
.chips { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li {
  font-size: 12px; padding: 3px 9px; border-radius: var(--rounding);
  border: 1px solid color-mix(in srgb, var(--acc) 50%, transparent);
  color: var(--acc); background: rgba(0,0,0,.35);
}

/* marquee */
.marquee {
  overflow: hidden; border-block: 1px solid var(--line);
  background: rgba(0,0,0,.6); backdrop-filter: blur(var(--blur));
  padding: 18px 0;
}
.track { display: flex; gap: 28px; width: max-content; animation: marquee 40s linear infinite; }
.track span { font-family: var(--display); font-size: clamp(26px, 3.4vw, 44px); font-weight: 700; white-space: nowrap; }
.track span:nth-of-type(3n+2) { color: transparent; -webkit-text-stroke: 1px var(--primary); }
.track i { font-style: normal; color: var(--accent1); align-self: center; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* dwindle : tuiles façon Hyprland */
.dwindle {
  display: grid; gap: var(--gap);
  grid-template-columns: repeat(4, 1fr);
  grid-template-areas:
    "a a b b"
    "c c d d"
    "e f g h";
}
.dwindle > :nth-child(1) { grid-area: a; }
.dwindle > :nth-child(2) { grid-area: b; }
.dwindle > :nth-child(3) { grid-area: c; }
.dwindle > :nth-child(4) { grid-area: d; }
.dwindle > :nth-child(5) { grid-area: e; }
.dwindle > :nth-child(6) { grid-area: f; }
.dwindle > :nth-child(7) { grid-area: g; }
.dwindle > :nth-child(8) { grid-area: h; }
.proj .win-body { height: calc(100% - 35px); display: flex; flex-direction: column; }
.proj .meta { margin-top: auto; padding-top: 18px; }
.proj.big h3 { font-size: clamp(32px, 3.6vw, 48px); }
.proj.big { background: linear-gradient(160deg, rgba(125,207,255,.12), rgba(0,0,0,.6) 55%); }
.feats { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 6px; font-size: 14px; color: #c3cedc; }
.feats li { padding-left: 18px; position: relative; }
.feats li::before { content: "❯"; position: absolute; left: 0; color: var(--accent1); }
.proj .role { margin-top: auto; padding-top: 18px; font-size: 12px; color: var(--muted); }
.proj .role + .meta { margin-top: 6px; padding-top: 0; }
.proj-link { margin-top: 14px; align-self: flex-start; font-size: 13px; font-weight: 700; color: var(--primary); border-bottom: 1px solid currentColor; }
.proj-link span { display: inline-block; transition: transform .2s; }
.proj-link:hover span { transform: translate(2px, -2px); }

/* timeline */
.log { max-width: 860px; }
.log .timeline { padding: 0; margin: 0; }
.degree {
  display: flex; flex-wrap: wrap; gap: 6px 14px;
  margin-top: 26px; padding-top: 18px; border-top: 1px dashed rgba(125,207,255,.2);
  font-size: 14px; color: var(--muted);
}
.degree .k { color: var(--accent1); }
.degree b { color: var(--text); font-weight: 500; }
.degree i { font-style: normal; color: var(--overlay0); margin: 0 4px; }
.timeline { list-style: none; margin: 0; }
.timeline li { position: relative; padding: 0 0 26px 24px; border-left: 1px solid rgba(125,207,255,.25); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -5px; top: 6px;
  width: 9px; height: 9px; border-radius: 1px; background: var(--bg); border: 1px solid var(--primary);
}
.timeline li.now::before { background: var(--accent1); border-color: var(--accent1); box-shadow: 0 0 12px var(--accent1); }
.timeline time { font-size: 12px; color: var(--accent2); letter-spacing: .06em; }
.timeline h3 { font-size: 19px; margin: 4px 0 4px; line-height: 1.2; }
.timeline p { color: var(--muted); font-size: 14px; }

/* about */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.about-grid .sec-head { margin-bottom: 0; }
.kv p { display: grid; grid-template-columns: 13ch 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px dashed rgba(125,207,255,.15); color: #c3cedc; }
.kv p:last-child { border-bottom: 0; }
.kv .k { color: var(--accent1); }

/* contact */
.contact { padding: 140px 0 120px; text-align: center; position: relative; }
.contact::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(ellipse at 50% 60%, rgba(255,123,156,.14), transparent 60%);
}
.contact .label { margin-inline: auto; }
.contact .cta { justify-content: center; }
.mail {
  display: inline-block; margin: 36px 0 34px;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(22px, 4.6vw, 58px);
  background: linear-gradient(90deg, var(--primary), var(--accent1), var(--accent2), var(--primary));
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: flow 8s linear infinite;
  word-break: break-all;
}
@keyframes flow { to { background-position: 300% 0; } }

.foot {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding: 18px max(16px, calc((100% - 1200px) / 2));
  border-top: 1px solid var(--line);
  background: rgba(0,0,0,.7);
  font-size: 12px; color: var(--overlay0);
}
.foot a:hover { color: var(--primary); }

/* reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

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

/* ─────────────── RESPONSIVE ─────────────── */
@media (max-width: 1200px) { .fetch li { white-space: normal; } }
@media (max-width: 1000px) {
  .bar-title { display: none; }
  .bar { grid-template-columns: 1fr auto; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { font-size: clamp(30px, 8.4vw, 78px); }
  .steps, .formats { grid-template-columns: 1fr; }
  .steps .win-body { min-height: 0; }
  .dwindle { grid-template-columns: 1fr 1fr; grid-template-areas: "a a" "b b" "c c" "d d" "e f" "g h"; }
  .about-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .ws a em { display: none; }
  .ws a { padding: 0 9px; }
  .mod.clock, .status { display: none; }
  .dwindle { grid-template-columns: 1fr; grid-template-areas: "a" "b" "c" "d" "e" "f" "g" "h"; }
  .chapter { padding: 80px 0; }
  .win-body { padding: 18px; }
  .fetch { flex-direction: column; gap: 10px; }
  .ascii { display: none; }
  .fetch li { white-space: normal; }
  .kv p { grid-template-columns: 1fr; gap: 2px; }
  .coords { gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal, .fetch { opacity: 1; transform: none; }
}
