/* =========================================================
   Design tokens — edit these to reskin the whole site fast.
   ========================================================= */
:root {
  /* Color */
  --color-bg: #f6f4f1;
  --color-surface: #ffffff;
  --color-text: #14130f;
  --color-text-muted: #6b6863;
  --color-accent: #0688f0;
  --color-accent-text: #ffffff;
  --color-border: #e4e0d8;

  /* Type */
  --font-body: 'Mori', -apple-system, 'system-ui', 'Segoe UI', sans-serif;
  --font-serif: 'PT Serif', Georgia, 'Times New Roman', serif;

  --fs-nav: 0.95rem;
  --fs-body: 1.0625rem;
  --fs-small: 0.9rem;
  --fs-h1: clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem);
  --fs-h2: clamp(1.25rem, 1.05rem + 0.8vw, 1.625rem);
  --fs-h3: clamp(1.1rem, 1rem + 0.4vw, 1.3rem);
  --fs-display: clamp(2rem, 1.3rem + 3vw, 3.5rem);
  --lh-body: 1.6;
  --lh-tight: 1.25;

  /* Space */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;
  --space-7: 9rem;

  /* Shape */
  --radius-pill: 100px;
  --radius-md: 14px;
  --radius-sm: 8px;

  /* Layout */
  --max-width: 1180px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

/* =========================================================
   Reset
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; }

/* =========================================================
   Fonts — self-hosted, Free-for-Personal-Use license (PP Mori)
   ========================================================= */
@font-face {
  font-family: 'Mori';
  src: url('../fonts/PPMori-Extralight.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Mori';
  src: url('../fonts/PPMori-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Mori';
  src: url('../fonts/PPMori-Italic.otf') format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Mori';
  src: url('../fonts/PPMori-Semibold.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Mori';
  src: url('../fonts/PPMori-Black.otf') format('opentype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* =========================================================
   Layout helpers
   ========================================================= */
.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* =========================================================
   Header / nav
   ========================================================= */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
}
.site-header .wordmark {
  font-weight: 600;
  font-size: 1.05rem;
}
.site-nav {
  display: flex;
  gap: var(--space-3);
}
.site-nav a {
  font-size: var(--fs-nav);
  color: var(--color-text);
  opacity: 0.75;
  transition: opacity 0.15s ease;
}
.site-nav a:hover { opacity: 1; }

/* =========================================================
   Hero / intro
   ========================================================= */
.hero {
  padding-top: var(--space-6);
  padding-bottom: var(--space-6);
  max-width: 640px;
}
.hero h1 {
  font-size: var(--fs-h1);
  font-weight: 600;
  line-height: var(--lh-tight);
  margin-bottom: var(--space-3);
}
.hero p {
  color: var(--color-text);
  margin-bottom: var(--space-2);
}
.hero a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* =========================================================
   Project / case-study cards
   ========================================================= */
.work {
  padding-bottom: var(--space-6);
}
.project {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  align-items: center;
  padding-top: var(--space-6);
  padding-bottom: var(--space-6);
  border-top: 1px solid var(--color-border);
}
.project:first-child { border-top: none; }

.project__body { max-width: 420px; }
.project__eyebrow {
  font-size: var(--fs-small);
  color: var(--color-text-muted);
  margin-bottom: var(--space-1);
}
.project__title {
  font-size: var(--fs-h2);
  font-weight: 600;
  line-height: var(--lh-tight);
  margin-bottom: var(--space-2);
}
.project__desc {
  color: var(--color-text);
  margin-bottom: var(--space-3);
}

.project__media {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}
.project__media img { width: 100%; height: auto; }
.project__media--empty {
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: var(--fs-small);
  background: repeating-linear-gradient(
    45deg, var(--color-surface), var(--color-surface) 10px,
    #eeebe4 10px, #eeebe4 20px
  );
}

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  background: var(--color-accent);
  color: var(--color-accent-text);
  font-size: var(--fs-small);
  font-weight: 500;
  padding: 0.7em 1.4em;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.1s ease;
}
.btn:hover { opacity: 0.88; }
.btn:active { transform: scale(0.98); }
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

/* =========================================================
   Additional work
   ========================================================= */
.more-work {
  padding-top: var(--space-5);
  padding-bottom: var(--space-6);
  border-top: 1px solid var(--color-border);
}
.more-work__intro { max-width: 480px; margin-bottom: var(--space-4); }
.more-work__intro h2 {
  font-size: var(--fs-h2);
  font-weight: 600;
  margin-bottom: var(--space-1);
}
.more-work__intro p { color: var(--color-text-muted); }

.more-work__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
.more-work__item h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--space-2);
}
.more-work__item .project__media { aspect-ratio: 16 / 10; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  padding-top: var(--space-4);
  padding-bottom: var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--color-border);
}
.site-footer .wordmark { font-weight: 600; }
.social-links { display: flex; gap: var(--space-2); }
.social-links a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  opacity: 0.8;
  transition: opacity 0.15s ease, background 0.15s ease;
}
.social-links a:hover { opacity: 1; background: var(--color-surface); }
.social-links svg { width: 16px; height: 16px; }

/* =========================================================
   Case study page
   ========================================================= */
.case-hero {
  margin-top: var(--space-3);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
}
.case-hero img { width: 100%; height: auto; }

.case-intro {
  padding-top: var(--space-5);
  padding-bottom: var(--space-5);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}
.case-intro__title h1 {
  font-size: var(--fs-display);
  font-weight: 600;
  line-height: var(--lh-tight);
  margin-bottom: var(--space-1);
}
.case-intro__title h2 {
  font-size: var(--fs-h2);
  font-weight: 400;
  color: var(--color-text-muted);
}
.case-intro__body p { margin-bottom: var(--space-2); }

.case-meta { display: grid; grid-template-columns: 1fr; gap: var(--space-3); }
.case-meta dt {
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.25em;
}
.case-meta dd { margin: 0; }

.case-section {
  padding-top: var(--space-6);
  padding-bottom: var(--space-6);
  max-width: 760px;
}
.case-section h3 {
  font-size: var(--fs-h2);
  font-weight: 600;
  margin-bottom: var(--space-3);
}
.case-section h4 {
  font-size: var(--fs-h3);
  font-weight: 600;
  margin-top: var(--space-4);
  margin-bottom: var(--space-2);
}
.case-section p { margin-bottom: var(--space-2); }

.pull-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--fs-h3);
  line-height: 1.5;
  border-left: 3px solid var(--color-accent);
  padding-left: var(--space-3);
  margin: var(--space-4) 0;
}
.pull-quote cite {
  display: block;
  font-family: var(--font-body);
  font-style: normal;
  font-size: var(--fs-small);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

.insight {
  margin-bottom: var(--space-3);
}
.insight h4 { margin-top: 0; margin-bottom: var(--space-1); }

.skills-list { display: flex; flex-wrap: wrap; gap: 0.5em; }
.skills-list span {
  font-size: var(--fs-small);
  padding: 0.3em 0.8em;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
}

/* =========================================================
   Breakpoints
   ========================================================= */
@media (min-width: 640px) {
  .more-work__grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 860px) {
  .project {
    grid-template-columns: 380px 1fr;
    gap: var(--space-5);
  }
  .project__body { max-width: 380px; }

  .case-intro { grid-template-columns: 2fr 1fr; gap: var(--space-6); }
}

@media (min-width: 1024px) {
  .hero { padding-top: var(--space-7); padding-bottom: var(--space-7); }
}
