/* colinbaker.net — reset + tokens */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --text: #1c1917;
  --muted: #78716c;
  --accent: #0f766e;
  --accent-soft: #ccfbf1;
  --border: #e7e5e4;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.05);
  --radius: 12px;
  --max-w: 1040px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0a09;
    --surface: #1c1917;
    --text: #f5f5f4;
    --muted: #a8a29e;
    --accent: #2dd4bf;
    --accent-soft: #134e4a;
    --border: #292524;
    --shadow: 0 1px 3px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.3);
  }
}

html { scroll-behavior: smooth; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 17px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: 2.2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }
.muted { color: var(--muted); }
main { flex: 1; }
.container { width: min(var(--max-w), 100% - 3rem); margin-inline: auto; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 1rem; }
.brand { font-weight: 700; font-size: 1.15rem; color: var(--text); letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand-dot { color: var(--accent); }
.site-nav { display: flex; gap: 1.4rem; }
.site-nav a { color: var(--muted); font-weight: 500; font-size: .95rem; padding: .25rem 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--text); text-decoration: none; }
.site-nav a.active { color: var(--text); border-bottom-color: var(--accent); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--border); border-radius: 8px;
  font-size: 1.2rem; color: var(--text); width: 40px; height: 40px; cursor: pointer;
}
@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none; position: absolute; top: 60px; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--surface);
    border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: .9rem 1.5rem; border-bottom: 1px solid var(--border); }
  .site-nav a:last-child { border-bottom: none; }
  .site-nav a.active { border-bottom: 1px solid var(--border); }
  h1 { font-size: 1.7rem; }
}

/* hero / page heads */
.hero { text-align: center; padding: 4.5rem 0 3rem; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); margin-bottom: .5rem; }
.hero .tagline { color: var(--accent); font-weight: 600; font-size: 1.05rem; margin-bottom: .75rem; }
.hero p:last-child { color: var(--muted); max-width: 34em; margin-inline: auto; }

.page-head { padding: 2.5rem 0 1.5rem; }
.page-head h1 { margin-bottom: .5rem; }
.page-head .lede { color: var(--muted); max-width: 42em; font-size: 1.05rem; }
.back { display: inline-block; font-size: .9rem; margin-bottom: 1rem; }

/* sections */
.section { padding: 2rem 0 2.5rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1.25rem; }
.more { font-size: .9rem; font-weight: 500; }

/* cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: block; color: var(--text);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-3px); text-decoration: none; box-shadow: 0 6px 24px rgba(0,0,0,.10); }
.card img { aspect-ratio: 3/2; object-fit: cover; width: 100%; }
.card-body { padding: 1rem 1.1rem 1.1rem; }
.card h3 { margin-bottom: .2rem; }
.card .muted { font-size: .85rem; }
.card-text { display: flex; flex-direction: column; justify-content: center; }

.row-grid { display: grid; gap: 1rem; padding-bottom: 3rem; }
.row-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.1rem 1.3rem; color: var(--text); display: block;
}
.row-card:hover { text-decoration: none; border-color: var(--accent); }
.row-card h3 { margin: .15rem 0 .3rem; }
.row-card .muted { font-size: .9rem; }

/* photo grid */
.photo-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .75rem; padding-bottom: 3rem;
}
.tile {
  display: block; border-radius: 10px; overflow: hidden; background: var(--surface);
  border: 1px solid var(--border); cursor: zoom-in;
}
.tile img { aspect-ratio: 1; object-fit: cover; width: 100%; transition: transform .25s ease; }
.tile:hover { text-decoration: none; }
.tile:hover img { transform: scale(1.04); }

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.94);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.lightbox[hidden] { display: none; }
.lb-img { max-width: 94vw; max-height: 84vh; object-fit: contain; border-radius: 4px; }
.lb-cap { color: #d6d3d1; font-size: .9rem; margin-top: .9rem; max-width: 80vw; text-align: center; padding: 0 1rem; }
.lb-close, .lb-prev, .lb-next {
  position: absolute; background: none; border: none; color: #e7e5e4;
  font-size: 2.6rem; line-height: 1; cursor: pointer; padding: .5rem 1rem;
  opacity: .75; transition: opacity .15s ease;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { opacity: 1; }
.lb-close { top: .5rem; right: .75rem; font-size: 2.2rem; }
.lb-prev { left: .5rem; top: 50%; transform: translateY(-50%); font-size: 3rem; }
.lb-next { right: .5rem; top: 50%; transform: translateY(-50%); font-size: 3rem; }
@media (max-width: 640px) {
  .lb-prev { left: -.5rem; }
  .lb-next { right: -.5rem; }
}

/* social icons */
.social-row { display: flex; gap: .6rem; flex-wrap: wrap; }
.social-row.big { gap: .9rem; }
.social-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--muted);
  transition: color .15s ease, border-color .15s ease, transform .15s ease;
}
.social-link:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); text-decoration: none; }
.social-row.big .social-link { width: 48px; height: 48px; }
.social-link svg { width: 22px; height: 20px; fill: currentColor; }

/* footer */
.site-footer { border-top: 1px solid var(--border); margin-top: 2rem; padding: 1.5rem 0 2rem; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.site-footer p { color: var(--muted); font-size: .9rem; }

/* prose (articles & about) */
.prose { max-width: 42em; padding-bottom: 3rem; }
.prose > * + * { margin-top: 1.1rem; }
.prose h2 { margin-top: 2rem; }
.prose h3 { margin-top: 1.5rem; }
.prose h4 { margin-top: 1.5rem; }
.prose img { border-radius: 10px; }
.prose blockquote {
  border-left: 3px solid var(--accent); padding: .25rem 0 .25rem 1.1rem;
  color: var(--muted); font-style: italic;
}
.prose ul { padding-left: 1.4rem; }
.prose li { margin-top: .3rem; }
.prose hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }
.prose strong { font-weight: 650; }

.article-hero { max-height: 420px; object-fit: cover; border-radius: var(--radius); margin: 1rem 0 1.75rem; }

.btn {
  display: inline-block; background: var(--accent); color: #fff; font-weight: 600;
  padding: .6rem 1.3rem; border-radius: 999px;
}
.btn:hover { text-decoration: none; filter: brightness(1.08); }
