/* Eric Calcagnino portfolio · style.css
   Tokens first, then base, then components. No frameworks. */

@font-face {
  font-family: "Newsreader";
  src: url("fonts/Newsreader.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("fonts/Newsreader-Italic.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("fonts/Archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #F7F6F2;
  --ink: #16191F;
  --navy: #1F3A5F;
  --amber: #9C6A2A;
  --rule: #D8D3C8;
  --muted: #6B6A66;

  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(20px, 4vw, 56px);
  --col-gap: clamp(14px, 1.6vw, 24px);
  --measure: 62ch;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--navy); outline-offset: 4px; }
h1, h2, h3 { margin: 0; font-weight: 400; }

/* ---------- masthead ---------- */
.masthead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 28px var(--gutter) 0;
}
.wordmark {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.masthead nav { display: flex; gap: 28px; }
.masthead nav a {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}
.masthead nav a:hover { border-bottom-color: var(--ink); }

/* ---------- hero ---------- */
.hero {
  padding: clamp(64px, 12vh, 140px) var(--gutter) clamp(56px, 9vh, 110px);
  max-width: 1180px;
}
.eyebrow {
  margin: 0 0 28px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow .dot { color: var(--amber); margin: 0 6px; }
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(42px, 6.4vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  font-weight: 400;
  font-variation-settings: "opsz" 72;
  max-width: 14ch;
  text-wrap: balance;
}
.hero h1 em {
  font-style: italic;
  font-weight: 300;
  color: var(--navy);
}
.lede {
  margin: 36px 0 0;
  max-width: 48ch;
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.5;
  color: var(--ink);
}

/* ---------- section heads ---------- */
.section-head {
  display: flex;
  align-items: baseline;
  gap: 24px;
  padding: 22px 0 26px;
  margin: 0 var(--gutter);
  border-top: 1px solid var(--rule);
}
.section-head h2 {
  font-family: var(--serif);
  font-size: 28px;
  font-variation-settings: "opsz" 28;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.section-head p {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}

/* ---------- work grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--col-gap);
  padding: 0 var(--gutter) 40px;
  align-items: start;
}
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-8 { grid-column: span 8; }

.tile figure { margin: 0; }
.tile img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: #E9E6DF;
}
.featured img { aspect-ratio: 8 / 5; }
.tile figcaption {
  display: grid;
  gap: 2px;
  padding: 12px 0 6px;
  border-top: 1px solid var(--rule);
  margin-top: 12px;
}
.kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
}
.tile .title {
  font-family: var(--serif);
  font-size: 20px;
  font-variation-settings: "opsz" 20;
  line-height: 1.2;
}
.tile .meta {
  font-size: 13px;
  color: var(--muted);
}
.tile:hover .title { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.featured .title { font-size: 26px; font-variation-settings: "opsz" 26; }

/* ---------- category list ---------- */
.cat-list {
  list-style: none;
  margin: 0 var(--gutter) 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}
.cat-list li { border-bottom: 1px solid var(--rule); }
.cat-list a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 18px 0;
}
.cat-list .cat {
  font-family: var(--serif);
  font-size: clamp(22px, 2.4vw, 32px);
  font-variation-settings: "opsz" 32;
  letter-spacing: -0.01em;
}
.cat-list .count {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
.cat-list a:hover .cat { color: var(--navy); }

/* ---------- about teaser ---------- */
.about-teaser {
  display: grid;
  grid-template-columns: 4fr 7fr;
  gap: clamp(28px, 5vw, 80px);
  align-items: start;
  padding: clamp(64px, 9vh, 120px) var(--gutter);
  max-width: 1180px;
}
.portrait {
  aspect-ratio: 4 / 5;
  background: #E9E6DF;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.about-copy h2 {
  font-family: var(--serif);
  font-size: clamp(32px, 3.6vw, 48px);
  font-variation-settings: "opsz" 48;
  letter-spacing: -0.015em;
  margin-bottom: 20px;
}
.about-copy p {
  margin: 0 0 18px;
  max-width: var(--measure);
  font-size: 18px;
  line-height: 1.55;
}
.text-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 15px;
  font-weight: 500;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
}
.text-link:hover { color: var(--navy); border-bottom-color: var(--navy); }

/* ---------- footer ---------- */
.colophon {
  margin: 0 var(--gutter);
  padding: 28px 0 40px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 14px;
  color: var(--muted);
}
.colophon div { display: flex; gap: 24px; }
.colophon div a { color: var(--ink); border-bottom: 1px solid var(--rule); }
.colophon div a:hover { border-bottom-color: var(--ink); }
.colophon p { margin: 0; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .grid { grid-template-columns: repeat(6, 1fr); }
  .span-8 { grid-column: span 6; }
  .span-5, .span-4, .span-3 { grid-column: span 3; }
  .about-teaser { grid-template-columns: 1fr; max-width: 560px; }
  .portrait { max-width: 320px; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .masthead { flex-direction: column; gap: 14px; align-items: flex-start; }
  .grid { grid-template-columns: 1fr 1fr; }
  .span-8, .span-5 { grid-column: span 2; }
  .span-4, .span-3 { grid-column: span 1; }
  .section-head { flex-direction: column; gap: 6px; }
  .cat-list a { flex-direction: column; gap: 4px; align-items: flex-start; }
}

@media (prefers-reduced-motion: no-preference) {
  .tile img { transition: opacity 160ms ease; }
  .tile:hover img { opacity: 0.92; }
}
