/* Eric Manno portfolio
   Surface: listing + long-form project notes.
   Type: Source Serif 4 + IBM Plex Sans. Accent from the original site cyan.
   Layout/type hierarchy: restrained cues from Vercel (tight display tracking,
   shadow-as-border) and Cal.com (grayscale confidence, generous section space). */

:root {
  --bg: #f4f1ea;
  --paper: #fffcf7;
  --ink: #1b1a17;
  --muted: #5c594f;
  --faint: #8a867a;
  --line: #dcd6c8;
  --accent: #0a6f87;
  --accent-ink: #085a6e;
  --header-h: 4rem;
  --max: 68rem;
  --prose: 40.5rem;
  --sans: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --serif: "Source Serif 4", "Iowan Old Style", Palatino, Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --radius: 3px;
}

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

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-ink);
}

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

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 0.75rem;
  z-index: 20;
}

.skip:focus {
  top: 0.75rem;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  box-shadow: 0 0 0 1px rgba(27, 26, 23, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}

.brand:hover {
  color: var(--ink);
}

.nav {
  display: flex;
  gap: 1.5rem;
}

.nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.5rem 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--accent-ink);
}

.nav a[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--accent);
}

/* Layout */

.wrap {
  width: min(var(--max), calc(100% - 3rem));
  margin: 0 auto;
}

.prose-wrap {
  width: min(var(--prose), calc(100% - 3rem));
  margin: 0 auto;
}

main {
  min-height: calc(100vh - var(--header-h) - 5.5rem);
}

/* Hero */

.hero {
  padding: 5.5rem 0 3.75rem;
  border-bottom: 1px solid var(--line);
}

.kicker {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.85rem;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.6rem, 6vw, 4.25rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
  margin: 0 0 1.15rem;
  font-variation-settings: "opsz" 52;
  text-wrap: pretty;
}

.lede {
  max-width: 38rem;
  font-size: 1.1875rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
  text-wrap: pretty;
}

.lede.intro {
  max-width: 40rem;
}

/* Work list */

.section {
  padding: 4rem 0 5.5rem;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-head h2 {
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.015em;
}

.section-head a {
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.category-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 2.75rem 0 0.75rem;
}

.work-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.work-item a {
  display: grid;
  grid-template-columns: 13.5rem 1fr;
  gap: 1.6rem;
  align-items: center;
  padding: 1.25rem 0.75rem 1.25rem 0;
  margin: 0 -0.75rem 0 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  border-radius: 6px;
  transition: background-color 0.18s ease;
}

.work-item a:hover {
  background: color-mix(in srgb, var(--paper) 70%, transparent);
}

.work-item a:hover .work-title {
  color: var(--accent-ink);
}

.work-item a:hover .thumb img {
  transform: scale(1.03);
}

.thumb {
  width: 13.5rem;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e7e2d6;
  border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(27, 26, 23, 0.08);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.work-meta {
  min-width: 0;
}

.work-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  margin: 0 0 0.35rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.flag-progress {
  color: var(--accent);
}

.work-title {
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}

.work-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.5;
  max-width: 40rem;
}

/* Article */

.article {
  padding: 3rem 0 4.5rem;
}

.article-header {
  margin-bottom: 2.25rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.article-header h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.4vw, 2.85rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0;
  text-wrap: pretty;
}

.article-header .lede {
  margin-top: 1rem;
}

.project-date {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--faint);
  margin: 0;
}

.article-header .project-date {
  margin-top: 0.5rem;
}

.work-meta .project-date {
  margin: 0 0 0.4rem;
}

.article .prose h2 {
  font-family: var(--serif);
  font-size: 1.3125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 2rem 0 0.55rem;
}

.article .prose figure + h2 {
  margin-top: 0.35rem;
}

.article .prose p {
  margin: 0 0 1.15rem;
  text-wrap: pretty;
}

.article .prose a {
  font-weight: 500;
}

figure {
  margin: 1.5rem 0 1.85rem;
}

figure img {
  width: 100%;
  background: #ece7db;
  border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(27, 26, 23, 0.08);
}

figcaption {
  margin-top: 0.55rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--faint);
  text-align: center;
}

.pair .pair-imgs,
.gallery {
  display: grid;
  gap: 0.5rem;
}

.pair .pair-imgs {
  grid-template-columns: 1fr 1fr;
}

.gallery.five {
  grid-template-columns: repeat(5, 1fr);
}

.gallery.three {
  grid-template-columns: repeat(3, 1fr);
}

.gallery.two {
  grid-template-columns: repeat(2, 1fr);
  justify-content: center;
}

.gallery img,
.pair img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

.gallery figcaption,
.pair figcaption {
  grid-column: 1 / -1;
}

figure.wide {
  width: min(58rem, calc(100vw - 3rem));
  margin-left: 50%;
  transform: translateX(-50%);
}

figure.wide img {
  object-fit: contain;
  background: var(--paper);
}

figure.contain img {
  object-fit: contain;
  background: var(--paper);
  aspect-ratio: auto;
  height: auto;
}

figure.contain .pair-imgs,
figure.contain.gallery {
  align-items: center;
  justify-items: center;
}

.article-footer {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.article-footer a {
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.gallery img {
  background: #ece7db;
  border-radius: var(--radius);
}

/* About */

.about {
  padding: 3.5rem 0 5rem;
}

.about h1 {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 4vw, 2.8rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 1.5rem;
}

.about p {
  margin: 0 0 1.15rem;
}

.about .note {
  margin-top: 2rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--faint);
  font-size: 0.8125rem;
  font-family: var(--mono);
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent-ink);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.15rem;
  align-items: center;
}

.status-note {
  margin: 0 0 1.35rem;
  padding: 0.7rem 0.85rem;
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--paper) 85%, var(--line));
  color: var(--muted);
  font-size: 0.95rem;
}

.flag-hold {
  color: var(--muted);
}

/* Responsive */

@media (max-width: 720px) {
  .wrap,
  .prose-wrap {
    width: calc(100% - 2rem);
  }

  .hero {
    padding: 2.75rem 0 2rem;
  }

  .work-item a {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding: 1.25rem 0;
  }

  .thumb {
    width: 100%;
  }

  .pair .pair-imgs,
  .gallery.five,
  .gallery.three {
    grid-template-columns: 1fr 1fr;
  }

  figure.wide {
    width: 100%;
    margin-left: 0;
    transform: none;
  }
}

@media (max-width: 420px) {
  .nav {
    gap: 1rem;
  }

  .gallery.five,
  .gallery.three,
  .pair .pair-imgs {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .thumb img,
  .work-item a {
    transition: none;
  }

  .work-item a:hover .thumb img {
    transform: none;
  }
}
