:root {
  --paper: #f2f4ef;
  --ink: #1f2622;
  --muted: #56615a;
  --green: #00843d;  /* MBTA Green Line */
  --seven: #b933ad;  /* NYC 7 train */
  --card: #ffffff;
  --night: #000000;
  --measure: 40rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #151917;
    --ink: #e9ede8;
    --muted: #a3ada6;
    --green: #2fb36a;
    --seven: #d164c7;
    --card: #1f2522;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-size: 1.125rem;
  line-height: 1.55;
  font-optical-sizing: auto;
}

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

h1, h2 {
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 700; }

p { margin: 0 0 1rem; }

a { color: var(--green); }

a:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Hero: the car is the one loud thing on the page. */
.hero {
  background: var(--night);
  color: #fff;
  display: grid;
  grid-template-columns: 1fr minmax(0, 1.1fr);
  align-items: center;
  gap: var(--gutter);
  padding: var(--gutter);
  min-height: min(90vh, 52rem);
  overflow: hidden;
}

.hero h1 {
  font-size: clamp(4.5rem, 14vw, 11rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  margin: 0;
}

.hero p {
  font-size: clamp(1.15rem, 2.4vw, 1.6rem);
  color: #cfd6d1;
  margin: 0.5rem 0 0;
}

.hero-text { padding-left: clamp(0rem, 4vw, 4rem); }

.hero-car img {
  width: 100%;
  max-width: 44rem;
  animation: drive-in 1.1s cubic-bezier(0.2, 0.9, 0.25, 1.15) both;
}

@keyframes drive-in {
  from { transform: translateX(70vw) rotate(-2deg); }
  to { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-car img { animation: none; }
}

main {
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Intro */
.hello {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1.5rem;
  align-items: start;
  padding: clamp(3rem, 8vw, 5rem) 0 3rem;
}

.headshot {
  width: 9rem;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
}

/* Route map: Queens on the 7, transfer to the Green Line at Northeastern. */
.route {
  list-style: none;
  margin: 0;
  padding: 0 0 0 2.75rem;
}

.stop {
  position: relative;
  padding-bottom: 3.5rem;
}

.stop::before {           /* track to the next stop */
  content: "";
  position: absolute;
  left: -2.05rem;
  top: 0.6rem;
  bottom: -0.6rem;
  width: 0.55rem;
  background: var(--line);
  border-radius: 1rem;
}

.stop::after {            /* station dot */
  content: "";
  position: absolute;
  left: -2.45rem;
  top: 0.25rem;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: var(--paper);
  border: 0.3rem solid var(--line);
}

.stop.transfer::after {   /* transfer station: both lines meet */
  left: -2.65rem;
  width: 1.75rem;
  height: 1.75rem;
  border-color: var(--ink);
  box-shadow: inset 0 0 0 0.3rem var(--seven), inset 0 0 0 0.6rem var(--green);
}

.stop.last { padding-bottom: 2rem; }
.stop.last::before { bottom: auto; height: 1rem; }

.stop img,
.stop figure {
  border-radius: 0.75rem;
  margin: 0.5rem 0 1.5rem;
}

.stop figure img { margin: 0; }

figcaption {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 0.4rem;
}

.stop figcaption {
  font-size: 1.25rem;
  color: var(--ink);
  font-weight: 600;
}

/* Things I like: wider than the text column so the photos get room. */
.gallery {
  columns: 3 14rem;
  column-gap: 1rem;
  width: min(72rem, 100vw - 2 * var(--gutter));
  margin: 0 0 0 50%;
  transform: translateX(-50%);
  padding-bottom: 4rem;
}

.gallery figure {
  break-inside: avoid;
  margin: 0 0 1rem;
  background: var(--card);
  padding: 0.5rem 0.5rem 0.6rem;
  border-radius: 0.6rem;
}

.gallery img { border-radius: 0.35rem; }

.gallery figure:nth-child(odd) { transform: rotate(-0.6deg); }
.gallery figure:nth-child(3n) { transform: rotate(0.8deg); }

/* Footer */
.say-hi {
  background: var(--green);
  color: #fff;
  text-align: center;
  padding: clamp(3rem, 8vw, 5rem) var(--gutter);
}

.say-hi h2 { font-size: clamp(2.5rem, 7vw, 4.5rem); font-weight: 800; }

.say-hi p { max-width: 32rem; margin: 0 auto 1.5rem; }

.email {
  display: inline-block;
  color: var(--green);
  background: #fff;
  font-weight: 700;
  font-size: clamp(1.05rem, 3vw, 1.35rem);
  text-decoration: none;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  overflow-wrap: anywhere;
}

.email:hover { text-decoration: underline; }
.say-hi .email:focus-visible { outline-color: #fff; }

@media (prefers-color-scheme: dark) {
  .say-hi { background: #0f5c31; }
  .email { color: #0f5c31; }
}

@media (max-width: 40rem) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 3rem;
  }
  .hero-text { padding-left: 0; }
  .hero-car img { margin: -2.5rem auto -3rem; }
  .hello { grid-template-columns: 1fr; }
  .headshot { width: 7rem; }
  .gallery { columns: 2; column-gap: 0.6rem; }
  .gallery figure { padding: 0.35rem; margin-bottom: 0.6rem; }
}
