/* =========================================================
   Andy Tsiory · Portfolio
   Editorial light · cream / ink / terracotta
   ========================================================= */

:root {
  /* Palette merina · lamba mena, terre rouge, or laterite */
  --cream:        #F1E7CE;   /* papier de riz / lamba blanc */
  --cream-2:      #E5D6B0;   /* laterite claire */
  --cream-3:      #D4BE8B;   /* laterite séchée */
  --ink:          #1B140C;   /* bois sombre */
  --ink-2:        #2C2417;   /* charbon chaud */
  --mute:         #75664A;   /* bois patiné */
  --mute-2:       #A6957A;   /* sable */
  --rust:         #9B2A14;   /* lamba mena */
  --rust-2:       #7A1F0C;   /* terre cuite profonde */
  --gold:         #B07A2A;   /* or laterite */
  --gold-2:       #8B5E1E;   /* miel sombre */
  --olive:        #5A5325;
  --line:         rgba(27, 20, 12, 0.14);
  --line-strong:  rgba(27, 20, 12, 0.34);

  --serif: "Fraunces", "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --radius:   2px;
  --max:      1440px;
  --gutter:   clamp(20px, 4vw, 56px);
  --section-y: clamp(80px, 12vw, 160px);

  --ease:    cubic-bezier(0.22, 1, 0.36, 1);
  --ease-2:  cubic-bezier(0.65, 0, 0.35, 1);

  /* Lamba mena · bandes tissées */
  --lamba: linear-gradient(
    to bottom,
    var(--cream) 0,
    var(--cream) 4px,
    var(--rust) 4px,
    var(--rust) 6px,
    var(--cream) 6px,
    var(--cream) 8px,
    var(--ink) 8px,
    var(--ink) 9px,
    var(--cream) 9px,
    var(--cream) 12px,
    var(--rust) 12px,
    var(--rust) 16px,
    var(--cream) 16px,
    var(--cream) 19px,
    var(--ink) 19px,
    var(--ink) 20px,
    var(--cream) 20px,
    var(--cream) 22px,
    var(--rust) 22px,
    var(--rust) 24px,
    var(--cream) 24px,
    var(--cream) 28px
  );
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; background: none; border: 0; cursor: pointer; color: inherit; }
em { font-style: italic; }
strong { font-weight: 600; }

::selection { background: var(--rust); color: var(--cream); }

/* ---------- Skip link ---------- */
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--cream);
  padding: 12px 16px; z-index: 1000;
}
.skip:focus { left: 16px; top: 16px; }

/* ---------- Grain ---------- */
.grain {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 200;
  opacity: 0.06;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.7 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0;
  height: 2px; width: 0%;
  background: var(--rust);
  z-index: 300;
  transition: width 0.08s linear;
}

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  padding: 20px var(--gutter);
  background: rgba(244, 239, 229, 0.78);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), padding 0.3s var(--ease);
}
.nav.is-scrolled {
  border-bottom-color: var(--line);
  padding-top: 14px;
  padding-bottom: 14px;
}

.nav__brand {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.01em;
}
.nav__mark {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--serif);
  font-weight: 500;
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0;
  border-radius: 50%;
  position: relative;
}
.nav__mark-dot {
  display: inline-block;
  color: var(--rust);
  transform: translateY(-2px);
}
.nav__name {
  font-size: 15px;
  letter-spacing: -0.01em;
}

.nav__links {
  justify-self: center;
  display: flex; gap: 28px;
  font-size: 13.5px;
  letter-spacing: 0.02em;
  color: var(--ink-2);
}
.nav__links a {
  position: relative;
  padding: 4px 0;
}
.nav__links a::after {
  content: ""; position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}
.nav__links a:hover::after,
.nav__links a:focus-visible::after,
.nav__links a.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}
.nav__links a.is-active { color: var(--ink); }

.nav__cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px 10px 18px;
  background: var(--ink);
  color: var(--cream);
  font-size: 13px;
  letter-spacing: 0.02em;
  border-radius: 999px;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}
.nav__cta:hover { background: var(--rust); transform: translateY(-1px); }
.nav__cta-arrow {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--cream);
  color: var(--ink);
  font-size: 11px;
  transition: transform 0.4s var(--ease);
}
.nav__cta:hover .nav__cta-arrow { transform: rotate(45deg); }

@media (max-width: 920px) {
  .nav { grid-template-columns: auto auto; gap: 16px; }
  .nav__links { display: none; }
}

/* =========================================================
   SECTION HEAD
   ========================================================= */
.section-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: end;
  gap: clamp(16px, 3vw, 48px);
  padding-bottom: 28px;
  margin-bottom: 56px;
  border-bottom: 1px solid var(--line);
}
.section-head__num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--mute);
  align-self: end;
  padding-bottom: 6px;
}
.section-head__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(40px, 7vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.025em;
  font-variation-settings: "opsz" 144, "SOFT" 50;
}
.section-head__year {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--mute);
  text-transform: uppercase;
  align-self: end;
  padding-bottom: 10px;
  text-align: right;
}
@media (max-width: 700px) {
  .section-head { grid-template-columns: 1fr; align-items: start; gap: 12px; }
  .section-head__year { text-align: left; padding-bottom: 0; }
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 130px var(--gutter) 60px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 60px;
}

.hero__meta {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--mute);
  text-transform: uppercase;
}
.hero__tag {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink-2);
}
.dot {
  width: 8px; height: 8px;
  background: var(--rust);
  border-radius: 50%;
  box-shadow: 0 0 0 0 var(--rust);
  animation: pulse 2.4s var(--ease-2) infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(166, 67, 43, 0.5); }
  60%  { box-shadow: 0 0 0 14px rgba(166, 67, 43, 0); }
  100% { box-shadow: 0 0 0 0 rgba(166, 67, 43, 0); }
}
.hero__index {
  display: flex; gap: 24px;
}
@media (max-width: 700px) {
  .hero__meta { flex-direction: column; align-items: flex-start; gap: 12px; }
  .hero__index { gap: 12px; flex-wrap: wrap; }
}

.hero__body {
  align-self: center;
}
.hero__kicker {
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.5;
  max-width: 56ch;
  color: var(--ink-2);
  margin-bottom: 28px;
}
.hero__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(60px, 13.5vw, 220px);
  line-height: 0.86;
  letter-spacing: -0.04em;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  display: flex;
  flex-direction: column;
}
.hero__title .line {
  display: flex;
  align-items: baseline;
  gap: clamp(8px, 1.5vw, 22px);
}
.hero__title .word { display: inline-block; }
.hero__title .ital {
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
  color: var(--rust);
}
.hero__title .period { color: var(--rust); }
.hero__sep {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.18em;
  align-self: center;
  color: var(--mute-2);
  transform: translateY(-0.6em);
  letter-spacing: 0;
}
@media (max-width: 760px) {
  .hero__title .line { flex-wrap: wrap; gap: 4px; }
  .hero__sep { display: none; }
}

.hero__foot {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: clamp(20px, 4vw, 56px);
  align-items: end;
}
.hero__role {
  font-size: 14px;
  line-height: 1.5;
}
.hero__role p {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
  margin-top: 8px;
  letter-spacing: -0.01em;
}
.hero__lede {
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 52ch;
}
.hero__proof {
  display: flex; flex-wrap: wrap; gap: 6px;
  justify-self: end;
  align-self: end;
  max-width: 280px;
}
.hero__proof span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.4);
}
@media (max-width: 980px) {
  .hero__foot { grid-template-columns: 1fr; gap: 32px; }
  .hero__proof { justify-self: start; }
}

.eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--mute);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.scroll-hint {
  position: absolute;
  bottom: 32px; right: var(--gutter);
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.scroll-hint__line {
  display: inline-block;
  width: 56px; height: 1px;
  background: var(--ink-2);
  position: relative; overflow: hidden;
}
.scroll-hint__line::after {
  content: ""; position: absolute;
  inset: 0;
  background: var(--cream);
  transform: translateX(-100%);
  animation: sweep 2.4s var(--ease) infinite;
}
@keyframes sweep {
  0%   { transform: translateX(-100%); }
  60%  { transform: translateX(100%); }
  100% { transform: translateX(100%); }
}

/* =========================================================
   MARQUEE
   ========================================================= */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
  overflow: hidden;
  background: var(--cream-2);
}
.marquee__track {
  display: flex;
  gap: 36px;
  white-space: nowrap;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(28px, 4vw, 56px);
  letter-spacing: -0.02em;
  color: var(--ink);
  animation: scroll 38s linear infinite;
  width: max-content;
}
.marquee__track .star {
  color: var(--rust);
  font-style: normal;
  font-family: var(--sans);
  font-size: 0.6em;
  align-self: center;
}
@keyframes scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* =========================================================
   ABOUT
   ========================================================= */
.about,
.experience,
.stack,
.education,
.projects {
  padding: var(--section-y) var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
}

.about__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
  margin-bottom: 96px;
}
@media (max-width: 880px) {
  .about__grid { grid-template-columns: 1fr; gap: 48px; }
}

.about__statement p {
  font-family: var(--serif);
  font-size: clamp(22px, 2.6vw, 36px);
  line-height: 1.25;
  letter-spacing: -0.015em;
  font-weight: 300;
}
.about__statement em {
  color: var(--rust);
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 100;
}
.about__statement-secondary {
  font-family: var(--sans) !important;
  font-size: 16px !important;
  line-height: 1.65 !important;
  color: var(--ink-2);
  margin-top: 28px !important;
  letter-spacing: 0 !important;
  font-weight: 400 !important;
  max-width: 56ch;
}

.about__card {
  background: var(--cream-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  position: sticky;
  top: 100px;
}
.about__card-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.about__card-row:last-of-type { border-bottom: 0; }
.about__card-row span {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mute);
}
.about__card-row strong {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 16px;
  text-align: right;
  letter-spacing: -0.01em;
}
.about__card-mail {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 18px;
  padding: 14px 16px;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--mono);
  font-size: 12px;
  border-radius: 999px;
  transition: background 0.3s var(--ease);
}
.about__card-mail:hover { background: var(--rust); }
.about__card-mail .arrow { transition: transform 0.4s var(--ease); }
.about__card-mail:hover .arrow { transform: rotate(45deg); }

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.metric {
  padding: 32px 24px;
  border-right: 1px solid var(--line);
}
.metric:last-child { border-right: 0; }
.metric__num {
  display: block;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(48px, 6vw, 88px);
  line-height: 0.9;
  letter-spacing: -0.03em;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  color: var(--ink);
  margin-bottom: 16px;
}
.metric p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--mute);
  letter-spacing: 0.01em;
}
@media (max-width: 880px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .metric:nth-child(2n) { border-right: 0; }
  .metric:nth-last-child(-n+2) { border-bottom: 0; }
}
@media (max-width: 480px) {
  .metrics { grid-template-columns: 1fr; }
  .metric { border-right: 0; border-bottom: 1px solid var(--line); }
  .metric:last-child { border-bottom: 0; }
}

/* =========================================================
   TIMELINE / EXPERIENCE
   ========================================================= */
.timeline {
  list-style: none;
  position: relative;
  padding-left: 0;
}
.timeline::before {
  content: ""; position: absolute;
  top: 12px; bottom: 12px;
  left: 11px;
  width: 1px;
  background: var(--line);
}
@media (min-width: 901px) {
  .timeline::before { left: 11px; }
}

.timeline__item {
  position: relative;
  padding: 0 0 64px 56px;
}
.timeline__item:last-child { padding-bottom: 0; }
.timeline__dot {
  position: absolute;
  top: 8px; left: 4px;
  width: 14px; height: 14px;
  background: var(--cream);
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  z-index: 2;
  transition: background 0.4s var(--ease), transform 0.4s var(--ease);
}
.timeline__item:hover .timeline__dot {
  background: var(--rust);
  border-color: var(--rust);
  transform: scale(1.2);
}

.timeline__head {
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: 16px;
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--mute);
  text-transform: uppercase;
}
.timeline__num {
  color: var(--rust);
  font-weight: 500;
}
.timeline__date strong { color: var(--ink); font-weight: 500; }
.timeline__location::before {
  content: "·  ";
  color: var(--mute-2);
}

.timeline__role {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 2.6vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 6px;
}
.timeline__role .ital {
  font-style: italic;
  color: var(--rust);
  font-variation-settings: "opsz" 144, "SOFT" 100;
}
.timeline__company {
  font-size: 14px;
  color: var(--ink-2);
  margin-bottom: 16px;
  letter-spacing: 0;
}
.timeline__lede {
  font-size: 16px;
  line-height: 1.65;
  max-width: 64ch;
  color: var(--ink-2);
  margin-bottom: 18px;
}
.timeline__bullets {
  list-style: none;
  padding-left: 0;
  margin-bottom: 22px;
  display: grid;
  gap: 8px;
}
.timeline__bullets li {
  position: relative;
  padding-left: 22px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 64ch;
}
.timeline__bullets li::before {
  content: "→";
  position: absolute;
  left: 0; top: 0;
  color: var(--rust);
  font-family: var(--mono);
  font-size: 13px;
}

.tech {
  list-style: none;
  display: flex; flex-wrap: wrap;
  gap: 6px;
}
.tech li {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink-2);
  background: var(--cream-2);
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.timeline__item:hover .tech li,
.diploma:hover .tech li {
  border-color: var(--line-strong);
}

.timeline__item--small .timeline__role {
  font-size: clamp(20px, 2vw, 26px);
}

@media (max-width: 700px) {
  .timeline__item { padding-left: 36px; }
  .timeline__dot { left: 0; }
  .timeline::before { left: 7px; }
}

/* =========================================================
   STACK
   ========================================================= */
.stack__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.stack__col {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 32px 28px;
}
.stack__col header {
  display: flex; align-items: baseline; gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.stack__index {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--rust);
  letter-spacing: 0.1em;
}
.stack__col h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.015em;
}
.stack__col ul {
  list-style: none;
  display: grid; gap: 10px;
}
.stack__col li {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-bottom: 10px;
  border-bottom: 1px dotted var(--line);
  font-size: 14px;
}
.stack__col li:last-child { border-bottom: 0; padding-bottom: 0; }
.stack__col li span {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 16px;
}
.stack__col li em {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--mute);
  font-style: normal;
}
@media (max-width: 980px) {
  .stack__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .stack__grid { grid-template-columns: 1fr; }
}

.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 80px;
  border-top: 1px solid var(--line);
}
.principle {
  padding: 32px 28px;
  border-right: 1px solid var(--line);
}
.principle:last-child { border-right: 0; }
.principle span {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--rust);
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}
.principle h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 26px;
  letter-spacing: -0.015em;
  margin-bottom: 12px;
}
.principle p {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-2);
}
@media (max-width: 880px) {
  .principles { grid-template-columns: 1fr; }
  .principle { border-right: 0; border-bottom: 1px solid var(--line); }
  .principle:last-child { border-bottom: 0; }
}

/* =========================================================
   EDUCATION
   ========================================================= */
.education__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 880px) {
  .education__grid { grid-template-columns: 1fr; }
}

.diploma {
  background: var(--cream-2);
  border: 1px solid var(--line);
  padding: 36px 32px;
  border-radius: var(--radius);
  display: flex; flex-direction: column;
  gap: 16px;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease);
  position: relative;
  overflow: hidden;
}
.diploma::after {
  content: ""; position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(166, 67, 43, 0.07));
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}
.diploma:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.diploma:hover::after { opacity: 1; }
.diploma header {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
}
.diploma__year { color: var(--ink); font-weight: 500; }
.diploma__level {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--cream);
}
.diploma h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1;
  letter-spacing: -0.025em;
  font-variation-settings: "opsz" 144, "SOFT" 50;
}
.diploma__sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--rust);
  font-variation-settings: "opsz" 144, "SOFT" 100;
}
.diploma__school {
  font-size: 14px;
  color: var(--ink-2);
}

/* =========================================================
   PROJECTS
   ========================================================= */
.projects__list {
  list-style: none;
  border-top: 1px solid var(--line);
}
.project {
  display: grid;
  grid-template-columns: 60px 1fr auto auto;
  gap: 24px;
  align-items: baseline;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(22px, 2.6vw, 32px);
  letter-spacing: -0.02em;
  color: var(--ink);
  transition: padding-left 0.4s var(--ease), color 0.4s var(--ease);
  cursor: default;
}
.project:hover {
  padding-left: 12px;
  color: var(--rust);
}
.project__num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--mute);
  font-weight: 400;
}
.project:hover .project__num { color: var(--rust); }
.project__name {
  font-family: var(--serif);
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px;
}
.project__tag {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 400;
  color: var(--mute);
  letter-spacing: 0;
}
.project__cat {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
  white-space: nowrap;
}
.project__year {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  white-space: nowrap;
}
@media (max-width: 880px) {
  .project {
    grid-template-columns: 40px 1fr;
    gap: 12px 16px;
    font-size: 20px;
  }
  .project__cat,
  .project__year {
    grid-column: 2;
    font-size: 11px;
  }
}

/* =========================================================
   FOOTER / CONTACT
   ========================================================= */
.footer {
  padding: var(--section-y) var(--gutter) 32px;
  background: var(--ink);
  color: var(--cream);
  position: relative;
  overflow: hidden;
}
.footer__top {
  display: flex; justify-content: space-between; align-items: end;
  gap: 32px;
  flex-wrap: wrap;
  padding-bottom: 80px;
  border-bottom: 1px solid rgba(244, 239, 229, 0.18);
}
.footer__label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute-2);
  display: block;
  margin-bottom: 14px;
}
.footer__lede {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  max-width: 18ch;
}
.footer__lede em {
  font-style: italic;
  color: var(--cream-3);
  font-variation-settings: "opsz" 144, "SOFT" 100;
}
.footer__mail {
  display: inline-flex; align-items: center; gap: 18px;
  padding: 18px 28px;
  border: 1px solid rgba(244, 239, 229, 0.3);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.02em;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.footer__mail:hover {
  background: var(--cream);
  color: var(--ink);
  border-color: var(--cream);
}

.footer__big {
  margin: 80px 0;
  pointer-events: none;
  user-select: none;
  text-align: center;
  overflow: hidden;
}
.footer__big-text {
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
  font-size: clamp(60px, 16vw, 260px);
  line-height: 0.86;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(244, 239, 229, 0.5);
  display: inline-block;
  white-space: nowrap;
}

.footer__bottom {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding: 60px 0 40px;
  border-top: 1px solid rgba(244, 239, 229, 0.18);
}
.footer__col p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--cream);
}
.footer__col a {
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
  color: var(--cream);
}
.footer__col a:hover { border-color: var(--cream); color: var(--cream-3); }
@media (max-width: 880px) {
  .footer__bottom { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .footer__bottom { grid-template-columns: 1fr; }
}

.footer__rule {
  display: flex; justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 32px;
  border-top: 1px solid rgba(244, 239, 229, 0.18);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute-2);
}

/* =========================================================
   REVEAL
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   FOCUS
   ========================================================= */
:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 4px;
  border-radius: 2px;
}

/* =========================================================
   MERINA · ÉLÉMENTS CULTURELS
   ========================================================= */

/* --- Lamba mena · bande tissée traditionnelle --- */
.lamba-band {
  height: 28px;
  background-image: var(--lamba);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.lamba-band::before,
.lamba-band::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 32px;
  z-index: 1;
}
.lamba-band::before {
  left: 0;
  background: linear-gradient(to right, var(--cream), transparent);
}
.lamba-band::after {
  right: 0;
  background: linear-gradient(to left, var(--cream), transparent);
}

/* --- Trano gasy · toits / chevrons --- */
.tranogasy-row {
  height: 14px;
  background-image:
    linear-gradient(135deg, var(--rust) 25%, transparent 25%),
    linear-gradient(225deg, var(--rust) 25%, transparent 25%);
  background-size: 16px 14px;
  background-position: 0 0;
  background-repeat: repeat-x;
  opacity: 0.9;
}

/* --- Ohabolana · proverbe merina --- */
.ohabolana {
  position: relative;
  padding: clamp(60px, 9vw, 120px) var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
  text-align: center;
  display: grid;
  gap: 18px;
  justify-items: center;
}
.ohabolana::before,
.ohabolana::after {
  content: "";
  position: absolute;
  left: var(--gutter); right: var(--gutter);
  height: 1px;
  background: var(--line);
}
.ohabolana::before { top: 0; }
.ohabolana::after  { bottom: 0; }
.ohabolana__label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rust);
  display: inline-flex; align-items: center; gap: 14px;
}
.ohabolana__label::before,
.ohabolana__label::after {
  content: "";
  width: 28px; height: 1px;
  background: var(--rust);
  opacity: 0.5;
}
.ohabolana__mg {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(28px, 4vw, 56px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
  color: var(--ink);
  max-width: 22ch;
}
.ohabolana__mg::before,
.ohabolana__mg::after {
  font-family: var(--serif);
  color: var(--rust);
  font-style: normal;
  font-variation-settings: "opsz" 144, "SOFT" 100;
  font-weight: 400;
}
.ohabolana__mg::before { content: "« "; margin-right: 0.05em; }
.ohabolana__mg::after  { content: " »"; margin-left: 0.05em; }
.ohabolana__fr {
  font-family: var(--sans);
  font-size: 14.5px;
  letter-spacing: 0.01em;
  color: var(--mute);
  max-width: 38ch;
}
.ohabolana__source {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 4px;
}

/* --- Labels bilingues fr/mg sur les section heads --- */
.section-head__title-mg {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
  font-size: 0.34em;
  letter-spacing: -0.01em;
  color: var(--gold);
  font-weight: 300;
  margin-top: 6px;
  line-height: 1;
}

/* --- Greeting malgache dans le hero --- */
.hero__greet {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--serif);
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
  font-size: clamp(15px, 1.4vw, 17px);
  color: var(--rust);
  margin-bottom: 16px;
}
.hero__greet::before {
  content: "";
  width: 24px; height: 1px;
  background: var(--rust);
}
.hero__greet em {
  color: var(--gold);
  font-style: italic;
  font-size: 0.78em;
  letter-spacing: 0.04em;
  font-family: var(--mono);
  font-variation-settings: normal;
  font-style: normal;
  text-transform: uppercase;
}

/* --- Drapeau couleurs · accent gold sur l'italique --- */
.hero__title .ital,
.timeline__role .ital,
.about__statement em {
  color: var(--rust);
}

/* --- Texture rizière / hautes terres en arrière-plan --- */
.hero {
  background:
    radial-gradient(ellipse 80% 60% at 70% 0%, rgba(176, 122, 42, 0.08), transparent 70%),
    radial-gradient(ellipse 60% 50% at 10% 100%, rgba(155, 42, 20, 0.06), transparent 70%),
    var(--cream);
}

/* --- Footer · accent doré sur les liens --- */
.footer__col a:hover { color: var(--cream-3); border-color: var(--gold); }

/* --- Lamba inversé (footer) --- */
.lamba-band--inverted {
  background-image: linear-gradient(
    to bottom,
    var(--ink) 0,
    var(--ink) 4px,
    var(--rust) 4px,
    var(--rust) 6px,
    var(--ink) 6px,
    var(--ink) 8px,
    var(--cream-3) 8px,
    var(--cream-3) 9px,
    var(--ink) 9px,
    var(--ink) 12px,
    var(--rust) 12px,
    var(--rust) 16px,
    var(--ink) 16px,
    var(--ink) 19px,
    var(--cream-3) 19px,
    var(--cream-3) 20px,
    var(--ink) 20px,
    var(--ink) 22px,
    var(--rust) 22px,
    var(--rust) 24px,
    var(--ink) 24px,
    var(--ink) 28px
  );
  border-color: rgba(244, 239, 229, 0.15);
}
.lamba-band--inverted::before {
  background: linear-gradient(to right, var(--ink), transparent);
}
.lamba-band--inverted::after {
  background: linear-gradient(to left, var(--ink), transparent);
}

/* --- Heure double (Joinville / Tana) --- */
.hero__index time + time { margin-left: 0; }
.hero__clocks {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  text-align: right;
  font-size: 11px;
  line-height: 1.4;
}
.hero__clocks span { display: inline-flex; gap: 8px; justify-content: flex-end; }
.hero__clocks .city {
  color: var(--gold);
  font-weight: 500;
}

/* --- Card hover: subtle red border --- */
.diploma:hover { border-color: var(--rust); }

/* --- Marquee · accent doré --- */
.marquee__track .star { color: var(--gold); }
.marquee {
  background: var(--cream-2);
  border-color: var(--line);
}

/* --- About card: trano gasy roof accent --- */
.about__card {
  position: relative;
}
.about__card::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px; right: -1px;
  height: 6px;
  background-image:
    linear-gradient(135deg, var(--rust) 25%, transparent 25%),
    linear-gradient(225deg, var(--rust) 25%, transparent 25%);
  background-size: 12px 6px;
  background-position: 0 0;
  background-repeat: repeat-x;
}

@media (max-width: 880px) {
  .about__card { position: static; }
}

