/* Simone Menestrina — Ouija portfolio
   Shared stylesheet for every language version. */

:root {
  --bg: #1C2230;
  --bg-raised: #222A3A;
  --bg-feature: #262F41;
  --text: #F3EFE6;
  --text-muted: #B4B6BC;   /* ~8:1 on --bg */
  --text-faint: #8C92A0;   /* ~5:1 on --bg, small labels */
  --accent: #E0533F;       /* large text, borders, marks, icons */
  --accent-text: #F07562;  /* accent for small text, ~5.6:1 on --bg */
  --line: rgba(243, 239, 230, 0.14);
  --line-strong: rgba(243, 239, 230, 0.28);

  --font-display: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 64px;
  --radius: 6px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 0.25s;

  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.02em;
}

p { margin: 0; }

a {
  color: var(--text);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover { color: var(--accent-text); }

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

::selection { background: var(--accent); color: var(--text); }

.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;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--text);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  text-decoration: none;
  border-radius: var(--radius);
}

.skip-link:focus { top: 12px; color: var(--bg); }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- Icons ---------- */

.icon {
  width: 22px;
  height: 22px;
  flex: none;
  display: block;
  transition: transform var(--t-fast) var(--ease-out), color var(--t-fast) ease;
}

.icon-lg { width: 30px; height: 30px; color: var(--accent); }
.icon-xs { width: 14px; height: 14px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  margin-right: auto;
}

/* The brand dot is a tiny planchette window */
.brand-mark {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  flex: none;
  transition: transform var(--t-fast) var(--ease-out);
}

.brand:hover .brand-mark { transform: scale(1.25); }

.site-nav ul {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  position: relative;
  display: block;
  padding: 8px 10px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius);
  transition: color var(--t-fast) ease;
}

/* Active section underline: slides in instead of jumping */
.site-nav a::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 3px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}

.site-nav a:hover,
.site-nav a[aria-current="true"] { color: var(--text); }

.site-nav a[aria-current="true"]::after { transform: scaleX(1); }

.lang-switch {
  display: flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.lang-switch ul {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lang-switch li + li::before {
  content: "·";
  color: var(--text-faint);
  padding: 0 2px;
}

.lang-switch a {
  display: inline-block;
  padding: 8px 6px;
  color: var(--text-muted);
  text-decoration: none;
}

.lang-switch a:hover { color: var(--text); }

.lang-switch a[aria-current="page"] {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 0.45em;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font: inherit;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  cursor: pointer;
}

.nav-toggle-icon,
.nav-toggle-icon::before {
  display: block;
  width: 14px;
  height: 2px;
  background: currentColor;
  position: relative;
}

.nav-toggle-icon::before {
  content: "";
  position: absolute;
  top: 5px;
}

.nav-toggle-icon { transform: translateY(-2.5px); }

@media (max-width: 960px) {
  .header-inner { gap: 12px; }

  .js .nav-toggle { display: inline-flex; order: 3; }

  .js .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }

  .js .site-nav.is-open { display: block; }

  .js .site-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 8px var(--gutter) 16px;
  }

  .js .site-nav a {
    padding: 12px 0;
    font-size: 0.9375rem;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }

  .js .site-nav a::after { left: 0; right: auto; width: 32px; bottom: -1px; height: 2px; }

  /* Without JS the nav simply wraps below the brand */
  html:not(.js) .header-inner { flex-wrap: wrap; padding: 8px 0; }
  html:not(.js) .site-nav { order: 3; width: 100%; overflow-x: auto; }
}

/* ---------- Sections ---------- */

main > section {
  scroll-margin-top: var(--header-h);
}

.section {
  padding: clamp(72px, 10vw, 128px) 0;
  border-top: 1px solid var(--line);
}

.section-head {
  display: grid;
  gap: 14px;
  margin-bottom: clamp(36px, 5vw, 56px);
  max-width: 760px;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--accent-text);
}

.section-label::after {
  content: "";
  width: 40px;
  height: 1px;
  background: var(--accent);
  transform-origin: left;
}

.section-title {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 700;
}

.section-note { color: var(--text-faint); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: clamp(40px, 7vw, 88px) 0 clamp(40px, 6vw, 72px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
}

.hero-kicker {
  color: var(--text-faint);
  margin-bottom: 20px;
}

.hero-name {
  font-size: clamp(2.75rem, 8vw, 5.75rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.95;
}

.hero-role {
  margin-top: 22px;
  font-size: clamp(1.125rem, 2.2vw, 1.5rem);
  font-weight: 500;
  color: var(--text);
  max-width: 30ch;
  line-height: 1.3;
}

.hero-role::before {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  background: var(--accent);
  margin-bottom: 18px;
}

.hero-bridge {
  margin-top: 22px;
  max-width: 46ch;
  color: var(--text-muted);
  font-size: 1.0625rem;
}

.hero-bridge strong { color: var(--text); font-weight: 600; }

/* Planchette window around the mascot */
.mascot {
  position: relative;
  justify-self: center;
  width: min(100%, 360px);
  aspect-ratio: 1;
  margin: 0;
  display: grid;
  place-items: center;
}

.mascot::before,
.mascot::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.mascot::before {
  inset: 0;
  background: var(--bg-raised);
  border: 1px solid var(--line-strong);
  transition: border-color 0.4s ease;
}

.mascot::after {
  inset: 14px;
  border: 1px dashed var(--line-strong);
  transition: transform 1.2s var(--ease-out);
}

.mascot-float {
  position: relative;
  z-index: 1;
  width: 62%;
  display: block;
}

.mascot img {
  width: 100%;
  filter: drop-shadow(0 10px 0 rgba(0, 0, 0, 0.18));
  transition: transform 0.45s var(--ease-out);
}

.mascot:hover::before { border-color: var(--accent); }
.mascot:hover::after { transform: rotate(45deg); }
.mascot:hover img { transform: rotate(-4deg) scale(1.04); }

.mascot figcaption {
  position: absolute;
  z-index: 1;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 12px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ---------- The board ---------- */

.board {
  max-width: 760px;
  margin: clamp(48px, 7vw, 88px) auto 0;
}

.board-svg {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-select: none;
}

.bd-face { fill: var(--bg-raised); stroke: var(--line-strong); stroke-width: 1.5; }
.bd-inner { fill: none; stroke: var(--line); stroke-width: 1; }

.bd-ornament {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.85;
}

.glyph text {
  font-family: var(--font-display);
  font-weight: 600;
  text-anchor: middle;
  dominant-baseline: central;
  letter-spacing: 0.02em;
}

.glyph[data-ch="YES"] text,
.glyph[data-ch="NO"] text { letter-spacing: 0.14em; font-weight: 700; }
.glyph[data-ch="GOODBYE"] text { letter-spacing: 0.32em; font-weight: 600; }

.g-base { fill: var(--text-faint); }

/* The lit copy sits on top and only ever fades: opacity is all that animates */
.g-lit {
  fill: var(--accent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.glyph.keep .g-lit,
.glyph.on .g-lit { opacity: 1; }
.glyph.near .g-lit { opacity: 0.75; }

/* While an answer is on the board, OUIJA steps aside: only touched letters glow */
.board-svg.answering .glyph.keep:not(.on) .g-lit { opacity: 0; }

/* Planchette */
.pl-shape {
  fill: var(--bg-feature);
  fill-opacity: 0.92;
  stroke: var(--text);
  stroke-opacity: 0.55;
  stroke-width: 1.5;
  stroke-linejoin: round;
}

.pl-tip { fill: var(--accent); }
.pl-deco { fill: none; stroke: var(--line-strong); stroke-width: 1.25; stroke-linecap: round; }
.pl-glass { fill: var(--bg-raised); }
.pl-ring { fill: none; stroke: var(--accent); stroke-width: 1.75; }
.pl-trail circle { fill: var(--accent); opacity: 0; }

/* Ask the board */
.ask {
  display: none;
  margin-top: clamp(20px, 3vw, 28px);
}

.js .ask { display: grid; gap: 10px; }

.ask-label { color: var(--text-muted); }

.ask-row {
  display: flex;
  gap: 10px;
}

.ask-input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  background: var(--bg-raised);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font: inherit;
  font-size: 1rem;
  transition: border-color var(--t-fast) ease;
}

.ask-input:hover { border-color: rgba(243, 239, 230, 0.45); }
.ask-input:focus-visible { outline-offset: 2px; border-color: var(--accent); }

.ask-button {
  flex: none;
  padding: 12px 20px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color var(--t-fast) ease;
}

.ask-button:hover { background: var(--bg-feature); }
.ask-button:active { transform: translateY(1px); }

.ask-answer {
  min-height: 3.2em;
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 1.0625rem;
  line-height: 1.5;
}

.ask-prefix {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.ask-answer strong { color: var(--text); font-weight: 500; }

.ask-guided { display: grid; gap: 10px; margin-top: 8px; }
.ask-guided-label { color: var(--text-faint); }

.ask-guided ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ask-chip {
  padding: 8px 14px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font: inherit;
  font-size: 0.9375rem;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  transition: color var(--t-fast) ease, border-color var(--t-fast) ease, background-color var(--t-fast) ease;
}

.ask-chip:hover { color: var(--text); border-color: var(--accent); background: var(--bg-raised); }
.ask-chip:active { transform: translateY(1px); }

@media (max-width: 760px) {
  .hero-grid { grid-template-columns: 1fr; }
  .mascot { width: min(72%, 280px); order: -1; }
}

@media (max-width: 420px) {
  .ask-button { padding: 12px 14px; }
}

/* ---------- About ---------- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}

.lead {
  font-size: clamp(1.25rem, 2.4vw, 1.625rem);
  line-height: 1.45;
  font-weight: 400;
}

.lead strong { font-weight: 600; }

.facts {
  margin: 0;
  display: grid;
  border-top: 1px solid var(--line);
}

.facts div {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.facts dt { color: var(--text-faint); padding-top: 2px; }
.facts dd { margin: 0; }

@media (max-width: 760px) {
  .about-grid { grid-template-columns: 1fr; }
}

/* ---------- Services ---------- */

.services {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.service {
  position: relative;
  padding: 28px 28px 32px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  align-content: start;
}

.service:nth-child(2n) {
  padding-left: 28px;
  padding-right: 0;
  border-left: 1px solid var(--line);
}

/* Accent rule that draws in on hover */
.service::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 56px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}

.service:nth-child(2n)::before { left: 28px; }

.service-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.service-num { color: var(--accent-text); }

.service h3 {
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  font-weight: 650;
}

.service p { color: var(--text-muted); max-width: 46ch; }

.service:hover::before { transform: scaleX(1); }
.service:hover .icon { transform: translateY(-3px) rotate(-6deg); }

@media (max-width: 760px) {
  .services { grid-template-columns: 1fr; }
  .service,
  .service:nth-child(2n) { padding: 24px 0; border-left: 0; }
  .service:nth-child(2n)::before { left: 0; }
}

/* ---------- Lanterna ---------- */

.feature {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  gap: clamp(28px, 5vw, 64px);
  padding: clamp(28px, 5vw, 56px);
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  transition: border-color var(--t-fast) ease;
}

.feature:hover { border-color: var(--line-strong) var(--line-strong) var(--line-strong) var(--accent); }

.feature-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.feature-sub {
  margin-top: 10px;
  font-size: 1.25rem;
  color: var(--text-muted);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text);
}

.status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.feature-list {
  margin: 0;
  display: grid;
}

.feature-list div {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 4px;
}

.feature-list div:first-child { padding-top: 0; }
.feature-list div:last-child { border-bottom: 0; padding-bottom: 0; }
.feature-list dt { color: var(--text-faint); }
.feature-list dd { margin: 0; }

@media (max-width: 760px) {
  .feature { grid-template-columns: 1fr; }
}

/* ---------- Case studies ---------- */

.cases {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.case {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: clamp(22px, 3vw, 32px);
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform var(--t-fast) var(--ease-out), border-color var(--t-fast) ease;
}

.case:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.case-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.case-head > div { display: grid; gap: 8px; min-width: 0; }

.case-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--accent);
  transition: border-color var(--t-fast) ease;
}

.case:hover .case-icon { border-color: var(--accent); }
.case:hover .case-icon .icon { transform: scale(1.12) rotate(-6deg); }

.case-sector { color: var(--accent-text); }

.case h3 {
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  font-weight: 650;
  line-height: 1.2;
}

.case dl {
  margin: 0;
  display: grid;
  gap: 16px;
}

.case dl > div {
  display: grid;
  gap: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.case dt {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-faint);
}

.case dt .icon { color: var(--accent); }
.case dd { margin: 0; color: var(--text); }

.case dd ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.case dd li {
  position: relative;
  padding-left: 20px;
}

.case dd li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 10px;
  height: 1px;
  background: var(--accent);
}

/* The flagship project: full width, a touch more presence */
.case--featured {
  grid-column: 1 / -1;
  gap: 28px;
  padding: clamp(24px, 4.5vw, 48px);
  background: var(--bg-feature);
  border-color: var(--line-strong);
  border-left: 3px solid var(--accent);
}

.case--featured:hover { border-color: var(--accent); }

.case--featured .case-icon { width: 52px; height: 52px; }
.case--featured .case-icon .icon { width: 26px; height: 26px; }

.case--featured h3 { font-size: clamp(1.5rem, 3.2vw, 2.125rem); }

.case--featured dl {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  grid-template-areas:
    "problem built"
    "result  built";
  align-items: start;
  column-gap: clamp(28px, 5vw, 56px);
  row-gap: 24px;
}

.case--featured .f-problem { grid-area: problem; }
.case--featured .f-built { grid-area: built; }
.case--featured .f-result { grid-area: result; }

@media (max-width: 760px) {
  .cases { grid-template-columns: 1fr; }
  .case--featured dl {
    grid-template-columns: 1fr;
    grid-template-areas: "problem" "built" "result";
  }
}

/* ---------- Stack ---------- */

.stack {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.stack li {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 150px;
  padding: 18px 20px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background-color var(--t-fast) ease;
}

.stack li::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}

.stack .icon { color: var(--text-faint); }

.stack-name {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  font-weight: 600;
  line-height: 1.2;
}

.stack li .mono { margin-top: auto; color: var(--text-faint); }

.stack li:hover { background: var(--bg-raised); }
.stack li:hover::before { transform: scaleX(1); }
.stack li:hover .icon { color: var(--accent); transform: translateY(-2px) scale(1.08); }

@media (max-width: 860px) {
  .stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 420px) {
  .stack li { min-height: 132px; padding: 16px; }
}

/* ---------- Experience ---------- */

.exp-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px);
}

.exp-col h3.mono {
  color: var(--text-faint);
  font-weight: 400;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.entry {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 6px;
}

.entry h4 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 650;
  line-height: 1.25;
}

.entry .meta { color: var(--accent-text); }
.entry p { color: var(--text-muted); }

.entry ul {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  color: var(--text-muted);
}

.entry li {
  position: relative;
  padding-left: 20px;
}

.entry li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 10px;
  height: 1px;
  background: var(--accent);
}

.langs {
  margin: 0;
  display: grid;
}

.langs div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.langs dt { font-weight: 600; }
.langs dd { margin: 0; color: var(--text-muted); }

.exp-sub { margin-top: 40px; }

@media (max-width: 760px) {
  .exp-grid { grid-template-columns: 1fr; }
}

/* ---------- Contact ---------- */

.contact-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.contact-list li { border-bottom: 1px solid var(--line); }

.contact-list a {
  display: grid;
  grid-template-columns: 10rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 22px 0;
  text-decoration: none;
}

.contact-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-faint);
}

.contact-label .icon { color: var(--accent); }

.contact-value {
  font-size: clamp(1.125rem, 3vw, 2rem);
  font-weight: 600;
  line-height: 1.2;
  overflow-wrap: anywhere;
  transition: color var(--t-fast) ease;
}

.contact-arrow { color: var(--accent); }

.contact-list a:hover .contact-value { color: var(--accent-text); }
.contact-list a:hover .contact-label .icon { transform: rotate(-8deg) scale(1.1); }
.contact-list a:hover .contact-arrow { transform: translate(3px, -3px); }

@media (max-width: 560px) {
  .contact-list a { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; }
  .contact-label { grid-column: 1 / -1; }
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 48px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  color: var(--text-faint);
}

.goodbye {
  letter-spacing: 0.3em;
  color: var(--text-muted);
}

/* ---------- Motion ----------
   Everything below needs html.motion, which is only set by JS when the
   visitor has not asked for reduced motion. No JS = everything visible. */

@media (prefers-reduced-motion: no-preference) {
  .mascot-float { animation: float 6s ease-in-out infinite; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Reveal on scroll: uses the `translate` property so it never fights
   the hover `transform` on the same card. */
.motion [data-reveal] {
  opacity: 0;
  translate: 0 18px;
  transition-property: opacity, translate, transform, border-color, background-color;
  transition-duration: 0.7s, 0.7s, var(--t-fast), var(--t-fast), var(--t-fast);
  transition-timing-function: ease, var(--ease-out), var(--ease-out), ease, ease;
  transition-delay: var(--d, 0ms), var(--d, 0ms), 0s, 0s, 0s;
}

.motion [data-reveal].is-in {
  opacity: 1;
  translate: none;
}

/* Section number: the rule after "01 / About" draws itself in */
.motion .section-label[data-reveal]::after {
  transform: scaleX(0);
  transition: transform 0.8s var(--ease-out) 0.25s;
}

.motion .section-label[data-reveal].is-in::after { transform: scaleX(1); }

/* Board: O-U-I-J-A stays dark until the planchette spells it */
.motion .board-svg:not(.spelled) .glyph.keep:not(.on) .g-lit { opacity: 0; }

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

  [data-reveal] { opacity: 1 !important; translate: none !important; }
  .pl-trail { display: none; }
}
