/* ─────────────────────────────────────────────────────────────────
   Tiffany-Chantal Faultier — personal site
   Dark default · warm amber accent · Inter body · Fraunces headings
   ───────────────────────────────────────────────────────────────── */

:root {
  /* Type */
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-serif: 'Fraunces', ui-serif, Georgia, 'Times New Roman', serif;
  --font-mono: ui-monospace, SFMono-Regular, 'JetBrains Mono', Menlo, Consolas, monospace;

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;

  /* Sizing */
  --wrap-max: 64rem;
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 18px;
}

/* Dark theme — default */
:root,
[data-theme='dark'] {
  --bg: #0e1116;
  --bg-elev: #161a22;
  --bg-soft: #1d222c;
  --fg: #e9e6df;
  --fg-soft: #b6b1a6;
  --fg-mute: #807a6e;
  --border: #2a2f3a;
  --accent: #e8a75d;        /* warm amber */
  --accent-soft: #f0c08c;
  --accent-contrast: #1a0f00;
  --link: var(--accent);
  --link-hover: var(--accent-soft);
  --focus: #f0c08c;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.02), 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* Light theme */
[data-theme='light'] {
  --bg: #f7f4ee;
  --bg-elev: #ffffff;
  --bg-soft: #efeae0;
  --fg: #1a1a1a;
  --fg-soft: #45433f;
  --fg-mute: #6e6a62;
  --border: #ddd6c8;
  --accent: #b67426;
  --accent-soft: #cf8a35;
  --accent-contrast: #fff8ec;
  --link: var(--accent);
  --link-hover: #8d5a1c;
  --focus: #b67426;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.02), 0 8px 24px rgba(40, 30, 10, 0.08);
}

/* Site defaults to dark per the brief. OS-level light preference is ignored
   unless the user explicitly toggles the theme (stored in localStorage). */

/* Reset-ish */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { max-width: 100%; display: block; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* A11y: skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  z-index: 100;
  font-weight: 600;
}
.skip-link:focus { top: 0.75rem; }

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

.wrap {
  width: 100%;
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding: 0 var(--space-5);
}

/* ───── Header ───── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--fg);
  text-decoration: none;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.brand-mark {
  color: var(--accent);
  display: inline-flex;
}
.site-nav {
  display: none;
  gap: var(--space-5);
}
.site-nav a {
  color: var(--fg-soft);
  text-decoration: none;
  font-size: 0.92rem;
  padding: 0.25rem 0;
  border-bottom: 1px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--fg);
  border-bottom-color: var(--accent);
}
.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg-soft);
  width: 36px;
  height: 36px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color .15s, border-color .15s, background .15s;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }

@media (min-width: 720px) {
  .site-nav { display: inline-flex; }
}

/* ───── Hero ───── */
.hero {
  padding: var(--space-9) 0 var(--space-8);
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(80% 60% at 20% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%),
    var(--bg);
}
.hero-inner { display: grid; gap: var(--space-4); }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
}
.hero-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--fg);
  /* Push the line break to the natural space on phones, but on wider viewports
     the <br> in the markup is hidden so the title stays on one line. */
}
.hero-title .given::after {
  content: ' ';
  display: inline;
}
/* On phones the space alone still allows the line to wrap in the middle of
   "Tiffany-Chantal" because the hyphen is a soft break point. Hide the
   space on phones so the two spans must sit on separate lines, breaking
   cleanly at the gap rather than at the hyphen. */
@media (max-width: 640px) {
  .hero-title .given::after { content: ''; }
  .hero-title .surname { display: block; }
}
.hero-tag {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  color: var(--fg-soft);
  max-width: 36ch;
}
.hero-sub {
  color: var(--fg-soft);
  max-width: 52ch;
  font-size: 1.05rem;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.1rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
  will-change: transform;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-soft); border-color: var(--accent-soft); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }

/* ───── Sections ───── */
.section {
  padding: var(--space-8) 0;
  border-bottom: 1px solid var(--border);
}
.section:last-of-type { border-bottom: none; }
.section-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: -0.01em;
  margin-bottom: var(--space-3);
  color: var(--fg);
}
.section-lead {
  color: var(--fg-soft);
  margin-bottom: var(--space-6);
  max-width: 52ch;
}
.prose p { margin-bottom: var(--space-4); max-width: 60ch; color: var(--fg); }
.prose p:last-child { margin-bottom: 0; }
.aside {
  color: var(--fg-mute);
  font-style: italic;
  margin-top: var(--space-4);
}

/* ───── Capabilities ───── */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-5);
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
  will-change: transform;
}
.card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--border));
}
.card-icon {
  color: var(--accent);
  margin-bottom: var(--space-3);
}
.card h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.15rem;
  margin-bottom: var(--space-2);
}
.card p {
  color: var(--fg-soft);
  font-size: 0.96rem;
}

@media (min-width: 600px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
}

/* ───── How I work (loop) ───── */
.loop {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
}
.step {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-5);
  position: relative;
}
.step-num {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--accent);
  display: inline-block;
  margin-bottom: var(--space-2);
}
.step h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: var(--space-2);
}
.step p {
  color: var(--fg-soft);
  font-size: 0.95rem;
}

@media (min-width: 720px) {
  .loop { grid-template-columns: repeat(5, 1fr); }
  .step { padding: var(--space-4); }
}

/* ───── Selected work ───── */
.cases {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
}
.case {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-5);
  position: relative;
}
.case h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.15rem;
  margin: 0 0 var(--space-2);
}
.case p {
  color: var(--fg-soft);
  font-size: 0.96rem;
}
.badge {
  display: inline-block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: var(--space-3);
  font-weight: 600;
}

@media (min-width: 720px) {
  .cases { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .cases { grid-template-columns: repeat(3, 1fr); }
}

/* ───── Contact ───── */
.section-contact { background: var(--bg-soft); }
.contact-list {
  display: grid;
  gap: var(--space-3);
}
.contact-list li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: var(--space-4);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.contact-key {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--fg-mute);
  font-weight: 600;
}
.contact-list a {
  color: var(--link);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.05rem;
  word-break: break-word;
}
.contact-list a:hover { color: var(--link-hover); text-decoration: underline; text-underline-offset: 3px; }

@media (min-width: 720px) {
  .contact-list { grid-template-columns: repeat(2, 1fr); }
}

/* ───── Footer ───── */
.site-footer {
  margin-top: auto;
  padding: var(--space-6) 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg-mute);
  font-size: 0.88rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.signature {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--accent);
}

/* ───── Motion preferences ───── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation-duration: 0s !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

/* ───── Reveal on load (subtle) ───── */
.hero-inner > *,
.section > .wrap > * {
  opacity: 0;
  transform: translateY(8px);
  animation: fadeUp .55s ease-out forwards;
}
.section > .wrap > *:nth-child(2) { animation-delay: .05s; }
.section > .wrap > *:nth-child(3) { animation-delay: .1s; }
.section > .wrap > *:nth-child(4) { animation-delay: .15s; }
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-inner > *, .section > .wrap > * { opacity: 1; transform: none; animation: none; }
}