/* joelpaul.me — hand-rolled, no framework.
   Aesthetic: warm paper, ink, and transit-map line colors. */

:root {
  --paper: #f6f1e7;
  --paper-raised: #fffdf7;
  --ink: #1c1a17;
  --muted: #6b6459;
  --rule: #ddd5c6;
  --line-red: #d1462f;    /* the red line */
  --line-green: #2c6e49;  /* the green line */
  --line-blue: #2b5d8a;   /* the blue line */
  --line-yellow: #e0a428; /* the yellow line */
  --serif: "Charter", "Georgia", "Iowan Old Style", serif;
  --sans: ui-sans-serif, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.06rem;
  line-height: 1.65;
}

.wrap { max-width: 880px; margin: 0 auto; padding: 0 1.25rem; }

a { color: var(--line-blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--line-red); }

/* ---------- header / nav ---------- */

header.site {
  border-bottom: 3px solid var(--ink);
  background: var(--paper);
}
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-top: 1rem; padding-bottom: .75rem; flex-wrap: wrap;
}
.logo img { height: 58px; width: auto; display: block; }
nav.main { display: flex; gap: 1.4rem; font-family: var(--sans); font-size: .86rem;
  text-transform: uppercase; letter-spacing: .09em; }
nav.main a { color: var(--ink); text-decoration: none; padding-bottom: 2px; border-bottom: 3px solid transparent; }
nav.main a:hover { border-bottom-color: var(--line-red); color: var(--ink); }
nav.main a[aria-current="page"] { border-bottom-color: var(--ink); }

/* the metro strip — four line colors, like a network map legend */
.metro-strip { display: flex; height: 6px; }
.metro-strip span { flex: 1; }
.metro-strip span:nth-child(1) { background: var(--line-red); }
.metro-strip span:nth-child(2) { background: var(--line-blue); }
.metro-strip span:nth-child(3) { background: var(--line-green); }
.metro-strip span:nth-child(4) { background: var(--line-yellow); }

/* ---------- type ---------- */

h1, h2, h3 { font-family: var(--sans); line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; }
h2 { font-size: 1.5rem; font-weight: 750; margin-bottom: .6rem; }
h3 { font-size: 1.1rem; font-weight: 700; }
p + p { margin-top: .9rem; }

.kicker {
  font-family: var(--sans); font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .14em; color: var(--muted);
  display: flex; align-items: center; gap: .55rem; margin-bottom: .5rem;
}
/* station dot before kickers, colored per line */
.kicker::before {
  content: ""; width: 11px; height: 11px; border-radius: 50%;
  background: var(--paper); border: 3px solid var(--kicker-color, var(--ink));
  flex-shrink: 0;
}
.k-red { --kicker-color: var(--line-red); }
.k-green { --kicker-color: var(--line-green); }
.k-blue { --kicker-color: var(--line-blue); }
.k-yellow { --kicker-color: var(--line-yellow); }

section { padding: 2.6rem 0; }
section + section { border-top: 1px solid var(--rule); }

.muted { color: var(--muted); }
.small { font-size: .9rem; }

/* placeholder text awaiting real info */
.placeholder {
  background: repeating-linear-gradient(-45deg, #efe8d8, #efe8d8 8px, #f6f1e7 8px, #f6f1e7 16px);
  border: 1px dashed var(--muted); border-radius: 6px;
  padding: .8rem 1rem; font-family: var(--sans); font-size: .92rem; color: var(--muted);
}

/* ---------- hero ---------- */

.hero {
  padding: 3rem 0 2.4rem;
  display: grid;
  grid-template-columns: 11fr 9fr;
  align-items: center;
}
.hero p.lede { font-size: 1.22rem; max-width: 40rem; }
.hero p.lede + p.lede { margin-top: 1rem; }
.hero-text { position: relative; z-index: 1; }
/* the photo fades out of the paper — gradient mask on its leading edge */
.hero-img { margin-left: -7rem; }
.hero-img img {
  width: 100%; display: block;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 55%);
  mask-image: linear-gradient(to right, transparent 0%, #000 55%);
}
@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; }
  .hero-img { margin-left: 0; margin-top: -1rem; }
  .hero-img img {
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 35%);
    mask-image: linear-gradient(to bottom, transparent 0%, #000 35%);
  }
}

/* ---------- cards ---------- */

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.1rem; margin-top: 1.4rem; }
.card {
  background: var(--paper-raised); border: 1px solid var(--rule); border-radius: 8px;
  padding: 1.1rem 1.2rem 1.2rem; display: block; color: inherit; text-decoration: none;
  border-top: 5px solid var(--card-line, var(--ink));
  transition: transform .12s ease, box-shadow .12s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(28,26,23,.08); color: inherit; }
.card h3 { margin-bottom: .35rem; }
.card p { font-size: .95rem; color: var(--muted); }
.card .status { font-family: var(--sans); font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em; color: var(--card-line, var(--ink)); }
.c-red { --card-line: var(--line-red); }
.c-green { --card-line: var(--line-green); }
.c-blue { --card-line: var(--line-blue); }
.c-yellow { --card-line: var(--line-yellow); }

/* ---------- project shelf (the million random projects) ---------- */

.shelf { list-style: none; margin-top: 1rem; }
.shelf li { padding: 1.1rem 0; border-bottom: 1px dashed var(--rule); }
.shelf h3 { display: inline; }
.shelf .when { font-family: var(--sans); font-size: .78rem; color: var(--muted); margin-left: .5rem; }
.shelf p { margin-top: .3rem; }
.shelf img { max-width: min(340px, 100%); border-radius: 6px; margin-top: .7rem; display: block; }

/* ---------- galleries ---------- */

.gallery {
  column-count: 3; column-gap: 1rem; margin-top: 1.5rem;
}
@media (max-width: 800px) { .gallery { column-count: 2; } }
@media (max-width: 480px) { .gallery { column-count: 1; } }
.gallery figure {
  break-inside: avoid; margin-bottom: 1rem; background: var(--paper-raised);
  border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; cursor: zoom-in;
}
.gallery img { width: 100%; display: block; }
.gallery figcaption { font-family: var(--sans); font-size: .85rem; padding: .55rem .75rem .65rem; }

dialog.lightbox { border: none; background: rgba(20, 18, 15, .94); max-width: 100vw; max-height: 100vh;
  width: 100vw; height: 100vh; padding: 2rem; display: none; }
dialog.lightbox[open] { display: grid; place-items: center; }
dialog.lightbox img { max-width: 92vw; max-height: 82vh; border-radius: 4px; }
dialog.lightbox figcaption { color: #f6f1e7; font-family: var(--sans); text-align: center; margin-top: .8rem; }
dialog.lightbox::backdrop { background: transparent; }

/* ---------- carousels ---------- */

.carousel { position: relative; margin-top: 1.2rem; }
.carousel .track {
  display: flex; gap: .9rem; overflow-x: auto; align-items: center;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
  padding: 1.1rem calc(50% - 130px) 1.1rem; /* lets the first/last slide reach center stage */
}
.carousel .track::-webkit-scrollbar { display: none; }
.carousel .slide {
  flex: 0 0 auto; display: block;
  width: 260px; text-decoration: none; color: inherit;
  background: var(--paper-raised); border: 1px solid var(--rule);
  border-radius: 8px; overflow: hidden;
  transform: scale(.84); opacity: .55;
  transition: transform .35s ease, opacity .35s ease, box-shadow .35s ease;
}
.carousel .slide.active {
  transform: scale(1.06); opacity: 1; z-index: 1;
  box-shadow: 0 10px 26px rgba(28,26,23,.18);
}
.carousel .slide img { width: 100%; height: 195px; object-fit: cover; display: block; }
.carousel .slide-cap {
  display: block; font-family: var(--sans); font-size: .82rem;
  padding: .5rem .7rem .6rem; line-height: 1.35;
}
.car-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--rule); background: var(--paper-raised); color: var(--ink);
  font-size: 1rem; cursor: pointer; box-shadow: 0 2px 8px rgba(28,26,23,.15);
  z-index: 2;
}
.car-btn:hover { background: var(--ink); color: var(--paper); }
.car-btn.prev { left: -14px; }
.car-btn.next { right: -14px; }

/* ---------- video embed ---------- */

.video { position: relative; aspect-ratio: 16 / 9; margin-top: 1.2rem; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--rule); background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- article pages ---------- */

article.page { padding: 2.8rem 0 1rem; }
article.page > * + * { margin-top: 1rem; }
article.page h1 { margin-bottom: .2rem; }
article.page h2 { margin-top: 2.2rem; }
article.page img.inline { max-width: 100%; border-radius: 8px; border: 1px solid var(--rule); }
.backlink { font-family: var(--sans); font-size: .85rem; }

/* ---------- footer ---------- */

footer.site { margin-top: 3rem; border-top: 3px solid var(--ink); }
footer.site .wrap { padding: 1.6rem 1.25rem 2.2rem; }
footer.site .motto { font-family: var(--sans); font-weight: 800; font-size: 1.05rem; letter-spacing: .02em; }
footer.site p { font-size: .88rem; color: var(--muted); margin-top: .5rem; }
