/* ---------- Tokens ---------- */
:root {
  --cobalt: #1f3fd1;
  --cobalt-deep: #1a34ad;
  --paper: #f4f5f8;
  --ink: #12172b;
  --ink-soft: #4a5170;
  --rule: #c8cddd;
  --on-cobalt: #f3f5fc;

  --font-display: "Times New Roman", Times, serif;
  --font-body: "Times New Roman", Times, serif;

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --measure: 62ch;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.1875rem;
  line-height: 1.55;
}

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--cobalt);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ---------- Hero ---------- */
.hero {
  background: var(--cobalt);
  color: var(--on-cobalt);
  padding: clamp(3rem, 9vw, 7rem) 0 clamp(2rem, 4vw, 3rem);
}

.hero :focus-visible { outline-color: var(--on-cobalt); }

.hero-name {
  margin: 0 0 clamp(1rem, 2vw, 1.5rem);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.75rem, 15vw, 11rem);
  line-height: 0.88;
  letter-spacing: -0.02em;
}

.hero-line {
  margin: 0;
  max-width: 28ch;
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  line-height: 1.3;
}

.hero-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  margin-top: clamp(2rem, 5vw, 3.5rem);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.05rem;
}

.hero-nav a {
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}

.hero-nav a:hover { border-bottom-color: var(--on-cobalt); }

/* ---------- Sections ---------- */
section { padding-top: clamp(3rem, 7vw, 5rem); }

.section-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.section-note {
  margin: 0 0 1.75rem;
  color: var(--ink-soft);
}

.about-text {
  margin: 0.75rem 0 0;
  max-width: var(--measure);
  font-size: 1.3rem;
  line-height: 1.5;
}

/* ---------- Rows (articles and profiles) ---------- */
.list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 2px solid var(--ink);
}

.list li { border-bottom: 1px solid var(--rule); }
.list li:last-child { border-bottom-color: var(--ink); border-bottom-width: 2px; }

.row {
  display: grid;
  gap: 0.4rem 2rem;
  align-items: baseline;
  padding: 1.35rem 0.75rem;
  margin: 0 -0.75rem;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.row.profile { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) auto; }
.row.article { grid-template-columns: minmax(0, 1fr) auto; }

.row-main { display: grid; gap: 0.25rem; }

.row-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.row-sub { color: var(--ink-soft); max-width: var(--measure); }

.row-meta {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink-soft);
  white-space: nowrap;
}

.row:hover,
.row:focus-visible {
  background: var(--cobalt);
  color: var(--on-cobalt);
}

.row:hover .row-sub,
.row:hover .row-meta,
.row:focus-visible .row-sub,
.row:focus-visible .row-meta { color: var(--on-cobalt); }

.row:focus-visible { outline-offset: -3px; outline-color: var(--ink); }

/* ---------- Footer ---------- */
.footer {
  margin-top: clamp(4rem, 9vw, 7rem);
  padding: clamp(2.5rem, 6vw, 4rem) 0 2.5rem;
  background: var(--cobalt);
  color: var(--on-cobalt);
}

.footer :focus-visible { outline-color: var(--on-cobalt); }

.footer-mail {
  margin: 0.5rem 0 2.5rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.6rem, 5vw, 3rem);
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.footer-mail a { text-decoration-thickness: 2px; text-underline-offset: 6px; }
.footer-small { margin: 0; font-size: 0.95rem; opacity: 0.85; }

/* ---------- Photos page ---------- */
.hero-page { padding-bottom: clamp(2rem, 4vw, 3rem); }
.hero-page .hero-name { font-size: clamp(3rem, 13vw, 8rem); }

.hero-nav a[aria-current="page"] { border-bottom-color: var(--on-cobalt); }

.footer-small a { text-underline-offset: 3px; }

.gallery-wrap { padding-top: clamp(2rem, 5vw, 3.5rem); }

.gallery {
  columns: 3 280px;
  column-gap: 1.25rem;
}

.gallery figure {
  margin: 0 0 1.25rem;
  break-inside: avoid;
}

.gallery a { display: block; }

.gallery img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--rule);
}

.gallery figcaption {
  margin-top: 0.4rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* ---------- Small screens ---------- */
@media (max-width: 720px) {
  body { font-size: 1.125rem; }
  .row.profile,
  .row.article { grid-template-columns: 1fr; }
  .row-meta { white-space: normal; }
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .row { transition: none; }
}
