/* ==========================================================================
   Nathan Specht — Site Personnel
   Direction artistique : Observatoire nocturne, aurore boréale & lumière dorée
   Palette extraite de ses propres photos (Plainevaux, Dolomites, Pontmain)
   ========================================================================== */

:root {
  /* Surfaces */
  --bg: #08090e;
  --bg-alt: #0c0e16;
  --surface: #121521;
  --surface-hover: #181c2c;
  --surface-glass: rgba(16, 19, 31, 0.72);

  /* Borders */
  --border: rgba(240, 236, 226, 0.08);
  --border-strong: rgba(240, 236, 226, 0.16);
  --border-gold: rgba(230, 169, 107, 0.34);

  /* Ink */
  --text: #f0ece2;
  --text-soft: #cfd5e3;
  --text-muted: #939db4;

  /* Accents (sampled from aurora, alpenglow, stained glass) */
  --gold: #e6a96b;
  --gold-soft: rgba(230, 169, 107, 0.14);
  --aurora: #b975b8;
  --aurora-soft: rgba(185, 117, 184, 0.15);
  --cobalt: #72a9db;
  --cobalt-soft: rgba(114, 169, 219, 0.14);
  --ok: #79c99e;

  /* Typography */
  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Radii & Shadows */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.55);
  --shadow-glow: 0 0 60px rgba(185, 117, 184, 0.12);

  /* Layout */
  --container: 1140px;
  --nav-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ==================== RESET & BASE ==================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 18px);
  background: var(--bg);
  color: var(--text);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-soft);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 0.12em 0.42em;
  border-radius: 6px;
  background: rgba(240, 236, 226, 0.06);
  border: 1px solid var(--border);
  color: var(--text);
}

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

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

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--gold);
  color: #090a0f;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
}

.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

.mono {
  font-family: var(--font-mono);
}

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

/* ==================== HEADER / NAV ==================== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(8, 9, 14, 0.35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), height 0.35s var(--ease);
}

.site-header.is-scrolled {
  background: rgba(8, 9, 14, 0.84);
  border-bottom-color: var(--border);
  height: 64px;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.brand-glyph {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--gold);
  background: rgba(230, 169, 107, 0.1);
  border: 1px solid var(--border-gold);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link {
  padding: 0.48rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--text);
  background: rgba(240, 236, 226, 0.06);
}

.nav-link.is-active {
  color: var(--gold);
}

.nav-cta {
  margin-left: 0.35rem;
  color: var(--text);
  border: 1px solid var(--border-strong);
  background: rgba(240, 236, 226, 0.04);
}

.nav-cta:hover,
.nav-cta.is-active {
  border-color: var(--border-gold);
  background: var(--gold-soft);
  color: var(--gold);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: rgba(18, 21, 33, 0.7);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.25s var(--ease), opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(3.75px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-3.75px) rotate(-45deg);
}

/* ==================== HERO ==================== */
.hero {
  position: relative;
  min-height: min(94vh, 880px);
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 4.5rem) 0 5.5rem;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  filter: saturate(1.06) brightness(0.76);
  transform: scale(1.03);
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.75;
}

.hero-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 75% 65% at 24% 46%, rgba(8, 9, 14, 0.72) 0%, rgba(8, 9, 14, 0.34) 55%, rgba(8, 9, 14, 0.65) 100%),
    linear-gradient(180deg, rgba(8, 9, 14, 0.58) 0%, rgba(8, 9, 14, 0.18) 38%, rgba(8, 9, 14, 0.72) 82%, var(--bg) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
}

.eyebrow {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0 0 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.5;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  margin-top: 0.4em;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px var(--gold);
  animation: pulse 2.8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.82); }
}

.hero-title {
  margin: 0 0 1.35rem;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2.9rem, 6.4vw, 5.1rem);
  line-height: 1.03;
  letter-spacing: -0.025em;
  color: var(--text);
}

.hero-subtitle-serif {
  display: block;
  margin-top: 0.35rem;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.55rem, 3.2vw, 2.55rem);
  color: var(--gold);
  opacity: 0.94;
}

.hero-lead {
  margin: 0 0 2rem;
  max-width: 60ch;
  font-size: clamp(1.02rem, 1.5vw, 1.15rem);
  line-height: 1.75;
  color: #e2dfd8;
}

.hero-triad {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 2.2rem;
}

.triad-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  background: rgba(12, 14, 22, 0.62);
  border: 1px solid rgba(240, 236, 226, 0.14);
  backdrop-filter: blur(10px);
  font-size: 0.87rem;
  color: var(--text-soft);
  transition: transform 0.25s var(--ease), border-color 0.25s ease, background 0.25s ease;
}

.triad-pill:hover {
  transform: translateY(-2px);
  border-color: var(--border-gold);
  background: rgba(18, 21, 33, 0.85);
}

.triad-index {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--gold);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.82rem 1.45rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: transform 0.25s var(--ease), box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--gold);
  color: #0a0b10;
  box-shadow: 0 10px 30px rgba(230, 169, 107, 0.22);
}

.btn-primary:hover {
  background: #efb87e;
  box-shadow: 0 14px 36px rgba(230, 169, 107, 0.34);
}

.btn-ghost {
  background: rgba(18, 21, 33, 0.55);
  border: 1px solid var(--border-strong);
  color: var(--text);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  border-color: var(--border-gold);
  background: rgba(230, 169, 107, 0.1);
}

.hero-photo-note {
  position: absolute;
  right: 1.6rem;
  bottom: 1.4rem;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: rgba(240, 236, 226, 0.52);
  letter-spacing: 0.04em;
}

/* ==================== WAVE-PACKET DIVIDER ==================== */
.wave-divider {
  width: 100%;
  height: 44px;
  background: var(--bg);
  overflow: hidden;
  border-top: 1px solid rgba(240, 236, 226, 0.04);
  border-bottom: 1px solid rgba(240, 236, 226, 0.04);
}

.wave-divider canvas {
  display: block;
  width: 100%;
  height: 44px;
}

/* ==================== SECTIONS ==================== */
.section {
  padding: clamp(4.5rem, 8vw, 7rem) 0;
  position: relative;
}

.section-alt {
  background:
    radial-gradient(ellipse 65% 40% at 85% 10%, rgba(185, 117, 184, 0.055), transparent 65%),
    radial-gradient(ellipse 55% 40% at 10% 88%, rgba(114, 169, 219, 0.05), transparent 65%),
    var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(2.5rem, 5vw, 3.6rem);
}

.section-title {
  margin: 0 0 0.85rem;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--text);
}

.section-intro {
  margin: 0;
  font-size: 1.04rem;
  color: var(--text-muted);
  max-width: 62ch;
}

/* ==================== ABOUT / PARCOURS ==================== */
.about-grid {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: clamp(2rem, 4vw, 3.4rem);
  align-items: start;
}

.portrait-column {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: sticky;
  top: calc(var(--nav-h) + 20px);
}

.portrait-frame {
  margin: 0;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.portrait-frame img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 22%;
  cursor: zoom-in;
  transition: transform 0.6s var(--ease);
}

.portrait-frame:hover img {
  transform: scale(1.03);
}

.portrait-badge {
  position: absolute;
  inset: auto 12px 12px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
  background: rgba(8, 9, 14, 0.78);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(240, 236, 226, 0.12);
  font-size: 0.78rem;
  color: var(--text-soft);
}

.portrait-badge .mono {
  color: var(--gold);
  font-size: 0.72rem;
}

.facts-card {
  margin: 0;
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.fact-row {
  display: grid;
  gap: 0.15rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}

.fact-row:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.fact-row dt {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
}

.fact-row dd {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-soft);
}

.story-column {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.story-card {
  padding: clamp(1.5rem, 3vw, 2.2rem);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}

.story-card h3 {
  margin: 0 0 1rem;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.55rem;
  color: var(--text);
}

.story-card p {
  margin: 0 0 1rem;
}

.story-card p:last-child {
  margin-bottom: 0;
}

.code-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  position: relative;
}

.code-timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: linear-gradient(180deg, var(--gold), rgba(114, 169, 219, 0.35), transparent);
}

.code-timeline li {
  position: relative;
  padding-left: 1.9rem;
  display: grid;
  gap: 0.25rem;
}

.code-timeline li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 7px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--gold);
}

.tl-tag {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--cobalt);
  letter-spacing: 0.04em;
}

.code-timeline strong {
  display: block;
  font-size: 0.98rem;
  margin-bottom: 0.15rem;
}

.code-timeline p {
  margin: 0;
  font-size: 0.93rem;
  color: var(--text-muted);
}

.editorial-quote {
  margin: 0;
  padding: 1.5rem 1.8rem;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(230, 169, 107, 0.08), rgba(185, 117, 184, 0.04));
  border: 1px solid var(--border-gold);
}

.editorial-quote p {
  margin: 0 0 0.45rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.22rem, 2vw, 1.48rem);
  line-height: 1.45;
  color: var(--text);
}

.editorial-quote footer {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--gold);
}

/* ==================== PROJECTS ==================== */
.project-showcase {
  padding: clamp(1.6rem, 3.2vw, 2.6rem);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  margin-bottom: 2.4rem;
}

.project-header {
  margin-bottom: 1.8rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--border);
}

.project-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.75rem;
}

.project-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-right: 0.25rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.68rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  border: 1px solid transparent;
}

.tag-gold {
  background: var(--gold-soft);
  color: var(--gold);
  border-color: rgba(230, 169, 107, 0.26);
}

.tag-cobalt {
  background: var(--cobalt-soft);
  color: var(--cobalt);
  border-color: rgba(114, 169, 219, 0.28);
}

.tag-aurora {
  background: var(--aurora-soft);
  color: #ddb0dc;
  border-color: rgba(185, 117, 184, 0.3);
}

.project-title {
  margin: 0 0 0.55rem;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  color: var(--text);
  line-height: 1.18;
}

.project-subtitle {
  margin: 0;
  max-width: 68ch;
  color: var(--text-muted);
  font-size: 0.99rem;
}

.project-body {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: clamp(1.6rem, 3.2vw, 2.5rem);
  align-items: start;
}

.project-showcase--reverse .project-media {
  order: 2;
}

.project-showcase--reverse .project-details {
  order: 1;
}

/* Interactive Media Stage */
.stage-frame {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: radial-gradient(circle at 50% 45%, #191d2d 0%, #090b11 100%);
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
}

.stage-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: zoom-in;
  transition: opacity 0.22s ease, transform 0.45s var(--ease);
}

/* Keyboard photos are all 4:3 landscape, so full-bleed cover looks extra crisp */
[data-switcher="keyboard"] .stage-img {
  object-fit: cover;
}

.stage-img.is-swapping {
  opacity: 0.15;
}

.stage-expand {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(240, 236, 226, 0.2);
  background: rgba(8, 9, 14, 0.72);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--text);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.stage-expand:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: #08090e;
  transform: scale(1.06);
}

.stage-caption {
  margin: 0.75rem 0 0.9rem;
  font-size: 0.86rem;
  color: var(--text-muted);
  min-height: 2.6em;
}

.thumb-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

[data-switcher="keyboard"] .thumb-strip {
  grid-template-columns: repeat(5, 1fr);
}

.thumb {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg);
  cursor: pointer;
  aspect-ratio: 4 / 3;
  opacity: 0.62;
  transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.2s var(--ease);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.thumb.is-active {
  opacity: 1;
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(230, 169, 107, 0.22);
}

/* Specs & Prose */
.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  margin-bottom: 1.4rem;
}

.spec-item {
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: rgba(8, 9, 14, 0.55);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.spec-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.spec-val {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text);
}

.spec-ok {
  color: var(--ok);
}

.project-prose h4 {
  margin: 0 0 0.4rem;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
}

.project-prose p {
  margin: 0 0 1.15rem;
  font-size: 0.94rem;
  color: var(--text-soft);
}

.pill-list {
  list-style: none;
  margin: 0 0 1.35rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.pill-list li {
  padding: 0.26rem 0.68rem;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-soft);
  background: rgba(240, 236, 226, 0.05);
  border: 1px solid var(--border);
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.link-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text);
  background: rgba(240, 236, 226, 0.04);
  border: 1px solid var(--border-strong);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.link-chip:hover {
  border-color: var(--border-gold);
  background: var(--gold-soft);
  color: var(--gold);
}

/* Compact Explorations Grid */
.explorations-block {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}

.explorations-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.explorations-title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  color: var(--text);
}

.link-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gold);
  border-bottom: 1px solid rgba(230, 169, 107, 0.35);
  padding-bottom: 2px;
  transition: border-color 0.2s ease;
}

.link-inline:hover {
  border-bottom-color: var(--gold);
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.mini-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius-md);
  background: rgba(18, 21, 33, 0.72);
  border: 1px solid var(--border);
  transition: transform 0.25s var(--ease), border-color 0.25s ease, background 0.25s ease;
}

a.mini-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-gold);
  background: var(--surface-hover);
}

.mini-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--cobalt);
  letter-spacing: 0.04em;
}

.mini-card h4 {
  margin: 0;
  font-size: 1.02rem;
  color: var(--text);
}

.mini-card p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-muted);
}

/* ==================== FOI & TÉMOIGNAGE ==================== */
.faith-section {
  background:
    radial-gradient(ellipse 55% 65% at 22% 50%, rgba(230, 169, 107, 0.08), transparent 65%),
    radial-gradient(ellipse 50% 60% at 85% 30%, rgba(114, 169, 219, 0.06), transparent 65%),
    var(--bg);
}

.faith-grid {
  display: grid;
  grid-template-columns: minmax(260px, 390px) 1fr;
  gap: clamp(2.2rem, 5vw, 4.2rem);
  align-items: center;
}

.faith-frame {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(230, 169, 107, 0.24);
  background: #06070a;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.65), 0 0 70px rgba(230, 169, 107, 0.08);
}

.faith-frame img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  cursor: zoom-in;
  transition: transform 0.6s var(--ease);
}

.faith-frame:hover img {
  transform: scale(1.03);
}

.faith-caption {
  margin: 0.75rem 0 0;
  text-align: center;
  text-wrap: balance;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
}

.faith-prose {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-bottom: 1.8rem;
}

.faith-lead {
  font-family: var(--font-serif);
  font-size: clamp(1.18rem, 1.8vw, 1.38rem);
  line-height: 1.62;
  color: var(--text);
  margin: 0;
}

.faith-prose p:not(.faith-lead) {
  margin: 0;
  color: var(--text-soft);
}

.editorial-quote--warm {
  background: linear-gradient(135deg, rgba(230, 169, 107, 0.1), rgba(114, 169, 219, 0.04));
}

/* ==================== PASSIONS & GALERIE ==================== */
.passions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2.8rem;
}

.passion-card {
  padding: 1.45rem;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.passion-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--gold);
  background: var(--gold-soft);
  border: 1px solid rgba(230, 169, 107, 0.24);
}

.passion-card h3 {
  margin: 0;
  font-size: 1.04rem;
  color: var(--text);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem;
}

.passion-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--gold);
}

.passion-card p {
  margin: 0;
  font-size: 0.89rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* Gallery Controls */
.gallery-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.filter-btn {
  padding: 0.48rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(18, 21, 33, 0.65);
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.filter-btn:hover {
  color: var(--text);
  border-color: var(--border-gold);
}

.filter-btn.is-active {
  background: var(--gold);
  border-color: var(--gold);
  color: #08090e;
  font-weight: 600;
}

/* Bento Photo Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 255px;
  grid-auto-flow: dense;
  gap: 1rem;
}

.gallery-grid.is-filtered .gallery-item--wide,
.gallery-grid.is-filtered .gallery-item--tall {
  grid-column: span 1;
  grid-row: span 1;
}

.gallery-item {
  margin: 0;
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: zoom-in;
}

.gallery-item.is-hidden {
  display: none;
}

.gallery-item--wide {
  grid-column: span 2;
}

.gallery-item--tall {
  grid-row: span 2;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease), filter 0.35s ease;
}

.gallery-item:hover img {
  transform: scale(1.045);
}

.gallery-item figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 3.1rem 1.1rem 1rem;
  background: linear-gradient(180deg, transparent 0%, rgba(8, 9, 14, 0.62) 48%, rgba(8, 9, 14, 0.94) 100%);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.72);
}

.gal-cat {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #f0bc82;
}

.gal-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

/* ==================== OUTILS (/USES) ==================== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.tool-card {
  padding: 1.65rem;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.tool-index {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
}

.tool-card h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.4rem;
  color: var(--text);
}

.tool-card ul {
  margin: 0;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.93rem;
  color: var(--text-soft);
}

.tool-card li::marker {
  color: var(--gold);
}

/* ==================== CONTACT ==================== */
.section-contact {
  padding-top: clamp(2rem, 5vw, 3.5rem);
}

.contact-box {
  padding: clamp(2rem, 4.5vw, 3.4rem);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse 65% 80% at 92% 12%, rgba(185, 117, 184, 0.12), transparent 62%),
    radial-gradient(ellipse 55% 75% at 8% 92%, rgba(230, 169, 107, 0.12), transparent 62%),
    var(--surface);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}

.contact-copy p:last-child {
  margin: 0;
  color: var(--text-soft);
  max-width: 46ch;
}

.contact-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}

.contact-email-group {
  grid-column: 1 / -1;
  display: flex;
  gap: 0.6rem;
}

.contact-card {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.95rem 1.15rem;
  border-radius: var(--radius-md);
  background: rgba(8, 9, 14, 0.62);
  border: 1px solid var(--border);
  transition: transform 0.22s var(--ease), border-color 0.22s ease, background 0.22s ease;
}

a.contact-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-gold);
  background: rgba(18, 21, 33, 0.95);
}

.contact-card--primary {
  border-color: var(--border-gold);
  background: rgba(230, 169, 107, 0.08);
}

.contact-card--static {
  background: rgba(8, 9, 14, 0.42);
}

.contact-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--gold);
  background: rgba(230, 169, 107, 0.12);
}

.contact-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.contact-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.contact-value {
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0 1.05rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: rgba(8, 9, 14, 0.65);
  color: var(--text-soft);
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.copy-btn:hover {
  border-color: var(--border-gold);
  color: var(--gold);
  background: var(--gold-soft);
}

/* ==================== FOOTER ==================== */
.site-footer {
  padding: 2.2rem 0 2.8rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem 1.5rem;
}

.footer-inner p {
  margin: 0;
}

.footer-note {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  opacity: 0.85;
}

.back-top {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--gold);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border-gold);
  transition: background 0.2s ease;
}

.back-top:hover {
  background: var(--gold-soft);
}

/* ==================== LIGHTBOX ==================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 6, 10, 0.92);
  backdrop-filter: blur(12px);
}

.lightbox-figure {
  position: relative;
  z-index: 2;
  margin: 0;
  max-width: min(92vw, 1180px);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}

.lightbox-figure img {
  max-width: 100%;
  max-height: calc(86vh - 4rem);
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid rgba(240, 236, 226, 0.14);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.75);
}

.lightbox-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  width: 100%;
  max-width: 820px;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.lightbox-counter {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--gold);
  white-space: nowrap;
}

.lightbox-btn {
  position: fixed;
  z-index: 3;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(240, 236, 226, 0.18);
  background: rgba(12, 14, 22, 0.8);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.lightbox-btn:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: #08090e;
}

.lightbox-close {
  top: 20px;
  right: 20px;
}

.lightbox-prev {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

/* ==================== TOAST ==================== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 400;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  background: var(--gold);
  color: #08090e;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

/* ==================== REVEAL ANIMATION ==================== */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
  .about-grid,
  .project-body,
  .faith-grid,
  .contact-box {
    grid-template-columns: 1fr;
  }

  .portrait-column {
    position: static;
    display: grid;
    grid-template-columns: 280px 1fr;
    align-items: start;
  }

  .project-showcase--reverse .project-media,
  .project-showcase--reverse .project-details {
    order: initial;
  }

  .passions-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .mini-grid,
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 240px;
  }

  .faith-visual {
    max-width: 420px;
    margin-inline: auto;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    inset: var(--nav-h) 1rem auto 1rem;
    flex-direction: column;
    align-items: stretch;
    padding: 0.9rem;
    border-radius: var(--radius-md);
    background: rgba(12, 14, 22, 0.96);
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(18px);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.25s ease, transform 0.25s var(--ease);
  }

  .site-nav.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-cta {
    margin-left: 0;
    text-align: center;
  }

  .portrait-column,
  .passions-grid,
  .mini-grid,
  .tools-grid,
  .contact-links {
    grid-template-columns: 1fr;
  }

  .contact-email-group {
    flex-direction: column;
  }

  .copy-btn {
    justify-content: center;
    padding: 0.75rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 260px;
  }

  .gallery-item--wide,
  .gallery-item--tall {
    grid-column: span 1;
    grid-row: span 1;
  }

  .spec-grid {
    grid-template-columns: 1fr;
  }

  .hero-photo-note {
    display: none;
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .pulse-dot {
    animation: none;
  }

  *, *::before, *::after {
    transition-duration: 0.01ms !important;
  }
}
