/* ---- self-hosted fonts (variable, latin subset) ---- */

@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url('fonts/newsreader-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 300 500;
  font-display: swap;
  src: url('fonts/newsreader-italic.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/ibm-plex-mono-normal.woff2') format('woff2');
}

/* ---- base ---- */

:root {
  --bg: #f7f4ed;
  --ink: #2b2823;
  --muted: #8b8478;
  --faint: #b0a795;
  --hairline: #e2ddd2;
  --dot: #c8c1b3;
  --accent: #8a5a33;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Newsreader', Georgia, serif;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

/* ---- layout ---- */

.page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 96px 48px 96px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr 400px;
  column-gap: 64px;
  align-items: start;
}

/* ---- intro ---- */

h1 {
  margin: 0;
  font-size: 35px;
  font-weight: 400;
  letter-spacing: .01em;
}

.role {
  margin: 10px 0 0;
  font-size: 16px;
  font-style: italic;
  color: var(--muted);
}

.lede {
  margin: 44px 0 0;
  font-size: 18px;
  line-height: 1.72;
  font-weight: 300;
  max-width: 480px;
}

/* ---- now indicator ---- */

.now {
  margin: 26px 0 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 16px;
  font-style: italic;
  line-height: 1.6;
  color: var(--muted);
  max-width: 480px;
}

.now-dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7d8f69;
  transform: translateY(-1px);
  animation: now-pulse 3.5s ease-in-out infinite;
}

@keyframes now-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}

@media (prefers-reduced-motion: reduce) {
  .now-dot { animation: none; }
}

/* ---- sections ---- */

.block {
  margin: 40px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* block bottom aligns with the "winter birds" caption bottom (the right column's true visual edge) */
.intro .block {
  margin-top: 101px;
}

.block h2 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 500;
  font-style: italic;
  color: var(--muted);
}

.block p {
  margin: 0;
  font-size: 17px;
  line-height: 1.7;
  font-weight: 300;
  max-width: 480px;
}

/* ---- portrait ---- */

.portrait {
  margin: 6px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.portrait img {
  display: block;
  width: 100%;
  height: 550px; /* caption bottom lands level with the Roots paragraph's last line */
  object-fit: cover;
  object-position: 62% top;
}

.portrait figcaption {
  font-size: 14px;
  font-style: italic;
  color: var(--faint);
  text-align: right;
}

/* ---- selected work ---- */

.work {
  margin-top: 64px;
  max-width: 560px;
}

.work-list {
  display: flex;
  flex-direction: column;
}

.work-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 0;
  border-bottom: 1px solid var(--hairline);
}

.work-title {
  font-size: 17px;
  font-weight: 500;
}

.work-title a {
  color: inherit;
}

.work-title a:hover {
  color: var(--accent);
  text-decoration: none;
}

.work-note {
  font-size: 15px;
  font-style: italic;
  color: var(--muted);
}

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

.contact {
  /* whitespace above (155) : whitespace below (96, page bottom padding) = phi */
  margin-top: 155px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
}

.email {
  margin: 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  color: var(--muted);
}

.links {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: 15.5px;
  font-weight: 300;
}

.links .dot {
  color: var(--dot);
}

/* ---- responsive ---- */

/* wide laptops/desktops: widen the image column so the plate fills the window;
   the text column stays 440px so every tuned alignment holds */
@media (min-width: 1440px) {
  .page {
    max-width: 1224px;
  }

  .hero {
    grid-template-columns: 1fr 600px;
    column-gap: 88px;
  }
}

/* large screens (designed at 1728x963): type scales up one step and the plate
   is centered with golden margins - at 1728x963 the page exactly fills the
   window (963px tall): side whitespace (165px) = phi x vertical padding
   (102px), and footer whitespace above (165px) = phi x below (102px) */
@media (min-width: 1700px) {
  body {
    display: flex;
    min-height: 100vh;
  }

  .page {
    margin: auto;
    width: 100%;
    max-width: 1398px;
    padding: 102px 48px;
  }

  .hero {
    grid-template-columns: 1fr 694px;
    column-gap: 88px;
  }

  h1 {
    font-size: 40px;
  }

  .role {
    font-size: 18px;
  }

  .lede {
    margin-top: 50px;
    font-size: 20px;
    max-width: none;
  }

  .now {
    margin-top: 30px;
    font-size: 18px;
    max-width: none;
  }

  .block h2 {
    font-size: 17px;
  }

  .block p {
    font-size: 19px;
    max-width: none;
  }

  .intro .block {
    margin-top: 72px;
  }

  .portrait img {
    height: 545px;
  }

  .contact {
    margin-top: 165px;
  }

  .email {
    font-size: 14px;
  }

  .links {
    font-size: 17px;
  }
}

@media (max-width: 860px) {
  /* golden padding chain: 40 side, 64 top (40xphi), 104 bottom (64xphi) */
  .page {
    padding: 64px 40px 104px;
  }

  .hero {
    grid-template-columns: 1fr;
    row-gap: 48px;
  }

  /* no image to align to in one column: use the plain rhythm gaps */
  .intro .block {
    margin-top: 48px;
  }

  .contact {
    margin-top: 84px;
    flex-direction: column;
    gap: 10px;
  }

  .portrait {
    margin-top: 0;
    max-width: 480px;
  }

  .portrait img {
    height: auto;
    max-height: 520px;
  }
}

@media (max-width: 480px) {
  /* same golden chain, one size down: 32 -> 52 -> 84 */
  .page {
    padding: 52px 32px 84px;
  }

  h1 {
    font-size: 30px;
  }
}
