/* ==========================================================================
   Guillaume Goder — UX Portfolio
   Design system: Nocturne (adapted) — quiet, compact, mono-hue dark theme
   with a light companion derived from the same hue/accent.
   Ground hue 230°, single accent #9184d9 (blurple), Inter throughout,
   headings never bolder than 500, 8px radius, compact spacing, outline buttons.
   ========================================================================== */

:root {
  /* Light mode — derived from Nocturne's hue 230 + shared accent */
  --bg: #F4F5FA;
  --surface: #FFFFFF;
  --text: #1C1E2C;
  --text-muted: #6B6F84;
  --text-muted-2: #6B6F84;
  --accent: #7A6BC7;       /* accent-600, darker for contrast on light bg */
  --accent-1: #7A6BC7;
  --accent-2: #7A6BC7;
  --accent-soft: color-mix(in srgb, #7A6BC7 12%, transparent);
  --border: #DEE0EA;

  --font-head: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

  --radius: 8px;
  --max-width: 1120px;
  --transition: 160ms ease;

  /* Compact spacing scale, density 0.7x */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
}

html[data-theme="dark"] {
  --bg: #0A0A0A;          /* true black ground, per Guillaume's request */
  --surface: #141414;     /* neutral dark gray, one step lighter than ground */
  --text: #E9E9ED;        /* Nocturne text */
  --text-muted: #9A9CAC;
  --text-muted-2: #9A9CAC;
  --accent: #9184D9;      /* Nocturne accent, hand-pinned blurple — unchanged */
  --accent-1: #9184D9;
  --accent-2: #9184D9;
  --accent-soft: color-mix(in srgb, #9184D9 16%, transparent);
  --border: #262626;      /* neutral dark gray border */
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  transition: background var(--transition), color var(--transition);
  -webkit-font-smoothing: antialiased;
}

/* Nocturne rule: hierarchy is size + space, never weight past 500 */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--text);
  letter-spacing: -0.01em;
  text-align: left;
}

h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); font-weight: 500; }
h2 { font-size: clamp(1.4rem, 2.8vw, 1.9rem); }
h3 { font-size: 1.15rem; font-weight: 500; }

p { margin: 0 0 1em; color: var(--text); }
p.lede { font-size: 1.05rem; color: var(--text-muted); }

a { color: inherit; }

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

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

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------- Header / Nav (flush-left, no center) ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.brand {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.nav-links a:hover { color: var(--accent); }

.theme-toggle {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: var(--radius);
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.theme-toggle:hover { border-color: var(--accent); background: var(--accent-soft); }
.theme-toggle svg { width: 16px; height: 16px; }
html[data-theme="dark"] .icon-sun { display: none; }
html[data-theme="light"] .icon-moon { display: none; }

.lang-toggle {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: var(--radius);
  height: 36px;
  padding: 0 12px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}

.lang-toggle:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  background: transparent;
  border-radius: var(--radius);
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ---------------- Hero — left-aligned, asymmetric ---------------- */

.hero {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 40px;
  align-items: end;
}

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 12px;
}

.hero h1 { margin-bottom: 0.35em; }

.hero .positioning {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 44ch;
  margin-bottom: 1.5em;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Nocturne: don't flood large areas with accent — restrained line treatment only */
.hero-visual {
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-visual svg { width: 62%; height: 62%; opacity: 0.9; }

/* ---------------- Buttons — outlined, never filled ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.btn-primary {
  border-color: var(--accent);
  color: var(--accent);
  background: transparent;
}
.btn-primary:hover { background: var(--accent-soft); }

.btn-secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ---------------- Case study cards ---------------- */

.section { padding: 56px 0; }

.section-head { max-width: 60ch; margin-bottom: 32px; }
.section-head .eyebrow { margin-bottom: 8px; }

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color var(--transition), background var(--transition);
}

.card:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--surface) 92%, var(--accent) 8%);
}

.card-icon { width: 36px; height: 36px; color: var(--accent); }
.card-icon svg { width: 100%; height: 100%; }

/* Nocturne tag: small label tinted from the accent ramp */
.card-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 3px 10px;
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card h3 { margin-bottom: 2px; }

.card .card-status {
  margin-top: auto;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 500;
}

/* ---------------- How I work strip ---------------- */

.how-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 32px 0;
}

.how-item { display: flex; flex-direction: column; gap: 8px; }

.how-item .num {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 1.2rem;
  color: var(--accent);
}

.how-item h4 { margin: 0; font-size: 0.95rem; font-family: var(--font-body); font-weight: 500; }
.how-item p { font-size: 0.88rem; color: var(--text-muted); margin: 0; }

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

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
}

.about-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* ---------------- Case study page ---------------- */

.cs-header { padding: 48px 0 32px; border-bottom: 1px solid var(--border); }

.cs-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.cs-meta-item .label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.cs-meta-item .value { font-weight: 500; }

.cs-body { padding: 40px 0; }

.cs-block { max-width: 72ch; margin: 0 0 48px; }
.cs-block:last-child { margin-bottom: 0; }

.cs-block h2 {
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 20px;
}

.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 20px 0;
}

.callout .label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 6px;
}

.status-banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 32px;
}

.status-banner .label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 6px;
}

.rejected-direction {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 12px 0;
  background: var(--surface);
}

.rejected-direction .label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

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

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

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.site-footer p { margin: 0; color: var(--text-muted); font-size: 0.85rem; }

/* ---------------- Responsive ---------------- */

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; aspect-ratio: 16/9; }
  .cards { grid-template-columns: 1fr; }
  .how-strip { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-header.nav-open .nav-links {
    display: flex;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 24px 24px;
    gap: 16px;
  }
  .how-strip { grid-template-columns: 1fr; }
  .cs-meta { gap: 14px; }
}
