/* ---------- tokens ---------- */
:root{
  --paper: #EDEBE4;
  --paper-raised: #F5F3ED;
  --ink: #1B1D22;
  --ink-soft: #55575E;
  --line: #D8D5CB;
  --brand: #2A2E63;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;

  --measure: 62ch;
  --gap: clamp(1.25rem, 2vw, 2rem);
  --edge: clamp(1.5rem, 5vw, 5rem);
}

*, *::before, *::after{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body{
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3{
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.08;
  margin: 0;
  letter-spacing: -0.01em;
}

em{ font-style: italic; }

p{ margin: 0 0 1em; max-width: var(--measure); }

a{ color: inherit; }

a:focus-visible, button:focus-visible{
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.skip-link{
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75em 1.25em;
  z-index: 100;
}
.skip-link:focus{ left: var(--edge); }

/* ---------- header ---------- */
.site-header{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.75rem var(--edge);
}
.site-header .mark{
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
}
.say-hello{
  font-size: 0.95rem;
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  transition: opacity 0.15s ease;
}
.say-hello:hover{ opacity: 0.6; }

/* ---------- hero ---------- */
.hero{
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: var(--gap);
  align-items: center;
  padding: clamp(2rem, 6vw, 5rem) var(--edge) clamp(3rem, 8vw, 7rem);
}
.hero__headline{
  font-size: clamp(2.5rem, 5.4vw, 4.6rem);
}
.hero__headline .line{
  display: block;
  overflow: hidden;
}
.hero__headline .line span,
.hero__headline .line{
  transform: translateY(0);
}
.hero__headline.reveal .line{
  animation: rise 0.7s cubic-bezier(.2,.8,.2,1) both;
}
.hero__headline.reveal .line:nth-child(1){ animation-delay: 0.02s; }
.hero__headline.reveal .line:nth-child(2){ animation-delay: 0.12s; }
.hero__headline.reveal .line:nth-child(3){ animation-delay: 0.22s; }

@keyframes rise{
  from{ transform: translateY(100%); }
  to{ transform: translateY(0); }
}

.hero__tagline{
  margin-top: 1.5rem;
  max-width: 40ch;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.hero__motif{ width: 100%; height: auto; justify-self: center; }
.motif-frame{ fill: none; stroke: var(--ink); stroke-width: 1.4; opacity: 0.5; }
.motif-frame--2{ opacity: 0.28; }
.motif-line{ stroke: var(--ink); stroke-width: 3; stroke-linecap: round; opacity: 0.55; }
.motif-line--2{ opacity: 0.3; }
.motif-dot--1{ fill: #E8572E; }
.motif-dot--2{ fill: #2F5FE0; }
.motif-dot--3{ fill: #1F6F54; }

/* ---------- section shells ---------- */
section{ padding: clamp(3rem, 6vw, 5rem) var(--edge); }

.work{ border-top: 1px solid var(--line); }
.work__intro{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
  align-items: end;
}
.work__intro h2{ font-size: clamp(1.8rem, 3vw, 2.4rem); }
.work__intro p{ color: var(--ink-soft); margin: 0; }

/* ---------- case studies ---------- */
.case{
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  padding: clamp(2rem, 4vw, 3rem) 0;
  border-top: 1px solid var(--line);
  transition: background 0.25s ease;
}
.case:last-of-type{ border-bottom: 1px solid var(--line); }
.case:hover, .case:focus-within{
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}
.case--reverse .case__figure{ order: 2; }
.case--reverse .case__body{ order: 1; }

.case__figure svg{ width: 100%; height: auto; display: block; }
.fig-frame{ fill: var(--paper-raised); stroke: var(--line); stroke-width: 1.5; }
.fig-pill{ fill: #E3E0D6; }
.fig-pill--accent{ fill: var(--accent); }
.fig-rule{ stroke: #D2CFC4; stroke-width: 3; stroke-linecap: round; }
.fig-path{ fill: none; stroke: var(--ink-soft); stroke-width: 3; stroke-linecap: round; }
.fig-dot{ fill: var(--paper-raised); stroke: var(--ink-soft); stroke-width: 2.5; }
.fig-dot--accent{ fill: var(--accent); stroke: var(--accent); }

.case__index{
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 1rem;
  margin: 0 0 0.4em;
}
.case__body h3{
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  margin-bottom: 0.2em;
}
.case__role{
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-bottom: 1.1em;
}
.case__outcome{ margin-bottom: 0; }
.case__outcome strong{ color: var(--accent); }

/* ---------- about ---------- */
.about{ border-top: 1px solid var(--line); }
.about h2{ font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: 1.5rem; }
.about__grid{
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--gap);
}
.about__bio{ color: var(--ink-soft); }
.about__points{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.about__points li{
  padding-left: 1.4em;
  position: relative;
}
.about__points li::before{
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
}

/* ---------- footer ---------- */
.site-footer{
  border-top: 1px solid var(--line);
  padding: clamp(3rem, 8vw, 6rem) var(--edge) 3rem;
}
.site-footer h2{
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  max-width: 16ch;
  margin-bottom: 1rem;
}
.footer__email{
  display: inline-block;
  font-size: 1.15rem;
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  margin-bottom: 2.5rem;
}
.footer__email:hover{ opacity: 0.6; }
.footer__meta{
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}
.footer__meta a{ color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; }
.footer__copy{ color: var(--ink-soft); font-size: 0.85rem; margin: 0; }

/* ---------- responsive ---------- */
@media (max-width: 860px){
  .hero{ grid-template-columns: 1fr; }
  .hero__motif{ max-width: 280px; order: -1; }
  .work__intro{ grid-template-columns: 1fr; align-items: start; }
  .case{ grid-template-columns: 1fr; }
  .case--reverse .case__figure,
  .case--reverse .case__body{ order: initial; }
  .case__figure{ max-width: 340px; }
  .about__grid{ grid-template-columns: 1fr; }
}
