/* =========================================================
   Gerald Ashby — Product Manager
   Design system: dark, warm-accent, editorial/minimal
   ========================================================= */

:root {
  --bg: #0b0b0d;
  --bg-soft: #131316;
  --bg-card: #16161a;
  --bg-card-hover: #1c1c21;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #ece9e4;
  --text-muted: #a3a0a8;
  --text-dim: #6f6d75;
  --accent: #d99a4e;
  --accent-strong: #e8b56e;
  --accent-soft: rgba(217, 154, 78, 0.12);
  --accent-soft-strong: rgba(217, 154, 78, 0.22);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1080px;
  --font-head: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* subtle ambient background glow, echoes the reference sites */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 900px 500px at 12% -8%, rgba(217, 154, 78, 0.10), transparent 60%),
    radial-gradient(ellipse 700px 500px at 100% 10%, rgba(120, 140, 200, 0.06), transparent 55%);
  pointer-events: none;
}

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

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
  color: var(--text-muted);
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Eyebrow / small labels ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--accent);
  display: inline-block;
}

/* ---------- Nav ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 11, 13, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
}

.brand {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand .mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), #a9672a);
  color: #14100a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s ease;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -22px;
  height: 2px;
  background: var(--accent);
}

.nav-cta {
  padding: 9px 18px !important;
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  color: var(--text) !important;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 14.5px;
  padding: 13px 24px;
  border-radius: 100px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #191207;
}

.btn-primary:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

.btn-ghost {
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.btn-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------- Hero ---------- */

.hero {
  padding: 100px 0 90px;
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 60px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(38px, 5.4vw, 62px);
  margin-bottom: 20px;
}

.hero h1 .accent {
  color: var(--accent);
}

.hero .lede {
  font-size: 19px;
  max-width: 46ch;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.avatar-wrap {
  justify-self: center;
}

.avatar {
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--accent-soft-strong), rgba(255,255,255,0.02));
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 72px;
  font-weight: 700;
  color: var(--accent-strong);
  position: relative;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.avatar::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1px dashed var(--border-strong);
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 28px;
  font-size: 14px;
  color: var(--text-dim);
}

.meta-line span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

/* ---------- Section shell ---------- */

section {
  padding: 92px 0;
}

section.tight {
  padding: 60px 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 46px;
  flex-wrap: wrap;
}

.section-head h2 {
  font-size: clamp(26px, 3.4vw, 36px);
  margin: 0;
}

.section-head .desc {
  max-width: 50ch;
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ---------- Cards ---------- */

.grid {
  display: grid;
  gap: 24px;
}

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

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.card:hover {
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
}

.card .icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 20px;
}

.card h3 {
  font-size: 19px;
  margin-bottom: 10px;
}

.card p:last-child {
  margin-bottom: 0;
}

/* project / work cards */

.project-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.project-card .thumb {
  height: 160px;
  background: linear-gradient(135deg, var(--accent-soft-strong), rgba(255,255,255,0.02));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
  border-bottom: 1px solid var(--border);
}

.project-card .body {
  padding: 26px 28px 28px;
}

.tag-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.tag {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  padding: 4px 11px;
}

.project-card h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.metric-row {
  display: flex;
  gap: 28px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.metric {
  display: flex;
  flex-direction: column;
}

.metric .num {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 22px;
  color: var(--accent-strong);
}

.metric .label {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* post / writing cards */

.post-card {
  display: block;
  padding: 30px 0;
  border-bottom: 1px solid var(--border);
  transition: opacity 0.2s ease;
}

.post-card:first-child {
  padding-top: 0;
}

.post-card:hover h3 {
  color: var(--accent-strong);
}

.post-card .post-meta {
  font-size: 13px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.post-card h3 {
  font-size: 24px;
  margin-bottom: 10px;
  transition: color 0.2s ease;
}

.post-card p {
  max-width: 68ch;
  margin-bottom: 0;
}

.post-list {
  max-width: 720px;
}

/* ---------- Callout / quote ---------- */

.callout {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 28px 32px;
  margin: 36px 0;
}

.callout p {
  color: var(--text);
  font-size: 18px;
  font-family: var(--font-head);
  margin: 0;
}

/* ---------- CTA band ---------- */

.cta-band {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 60px;
  text-align: center;
}

.cta-band h2 {
  font-size: clamp(24px, 3vw, 32px);
}

.cta-band .btn-row {
  justify-content: center;
  margin-top: 28px;
}

/* ---------- Article ---------- */

.article-hero {
  padding: 70px 0 50px;
  border-bottom: 1px solid var(--border);
}

.article-hero h1 {
  font-size: clamp(30px, 4.6vw, 46px);
  max-width: 20ch;
}

.article-body {
  max-width: 700px;
  margin: 0 auto;
  padding: 60px 28px;
}

.article-body h2 {
  font-size: 26px;
  margin-top: 1.6em;
}

.article-body p,
.article-body li {
  font-size: 18px;
  color: var(--text-muted);
}

.article-body strong {
  color: var(--text);
}

.article-body ul,
.article-body ol {
  color: var(--text-muted);
  padding-left: 1.3em;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 26px;
}

.back-link:hover {
  color: var(--accent-strong);
}

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 40px;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 26px;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--accent-strong);
}

.footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--text-dim);
}

/* ---------- Reveal-on-scroll ----------
   Elements are visible by default (no JS / JS-disabled = fully visible
   content). JS adds .pre-reveal right before observing, so the hidden
   state only ever exists once we know we can also reveal it again. */

.reveal.pre-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.pre-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero .lede {
    max-width: none;
    margin-left: auto;
    margin-right: auto;
  }
  .btn-row {
    justify-content: center;
  }
  .meta-line {
    justify-content: center;
  }
  .avatar-wrap {
    order: -1;
  }
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .nav-links {
    position: fixed;
    top: 74px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 28px 32px;
    gap: 20px;
    transform: translateY(-140%);
    transition: transform 0.25s ease;
  }
  .nav-links.open {
    transform: translateY(0);
  }
  .nav-toggle {
    display: block;
  }
  .cta-band {
    padding: 40px 24px;
  }
  .footer-grid {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  section {
    padding: 64px 0;
  }
  .hero {
    padding: 70px 0 60px;
  }
}

/* =========================================================
   Work page — case studies & career timeline
   ========================================================= */

.case-index {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.case-index a {
  font-family: var(--font-head);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  padding: 9px 18px;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.case-index a:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.case-org {
  font-family: var(--font-head);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 12px;
}

.case-head h2 {
  font-size: clamp(26px, 3.6vw, 38px);
  max-width: 20ch;
  margin-bottom: 16px;
}

.case-summary {
  font-size: 18px;
  max-width: 46ch;
  margin-bottom: 0;
}

.fact-panel {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 28px;
}

.fact {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}

.fact:first-child { padding-top: 0; }

.fact:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.fact .k {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.fact .v {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
}

.case-body {
  max-width: 720px;
  margin-top: 40px;
}

.case-body h3 {
  font-size: 20px;
  margin-top: 1.9em;
  margin-bottom: 0.6em;
}

.case-body h3:first-child { margin-top: 0; }

.case-body strong { color: var(--text); }

.pull {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 26px 30px;
  margin: 32px 0;
}

.pull .pull-label {
  font-family: var(--font-head);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.pull p:last-child { margin-bottom: 0; }

.timeline {
  max-width: 760px;
  border-left: 1px solid var(--border);
  padding-left: 30px;
  margin-left: 5px;
}

.tl-item {
  position: relative;
  padding-bottom: 34px;
}

.tl-item:last-child { padding-bottom: 0; }

.tl-item::before {
  content: "";
  position: absolute;
  left: -35px;
  top: 7px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--bg);
}

.tl-when {
  font-family: var(--font-head);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.tl-item h3 {
  font-size: 19px;
  margin: 7px 0 9px;
}

.tl-item h3 .org { color: var(--accent-strong); }

.tl-item p {
  margin-bottom: 0;
  max-width: 66ch;
}

.tl-link {
  color: var(--accent-strong);
  white-space: nowrap;
}

.tl-link:hover { text-decoration: underline; }

@media (max-width: 860px) {
  .case-head h2,
  .case-summary { max-width: none; }
  .case-body { margin-top: 28px; }
  .timeline {
    padding-left: 22px;
    margin-left: 4px;
  }
  .tl-item::before { left: -27px; }
}

@media (max-width: 560px) {
  .fact-panel { padding: 22px 22px; }
  .pull { padding: 22px 22px; }
  .case-index a { font-size: 12.5px; padding: 8px 14px; }
}

/* ---------- Home — organizations strip ---------- */

.orgs-strip {
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.012);
  padding: 24px 0;
}

.orgs-strip .container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 32px;
}

.orgs-label {
  font-family: var(--font-head);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.org-name {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-muted);
}

@media (max-width: 560px) {
  .orgs-strip .container { gap: 10px 20px; }
  .org-name { font-size: 14.5px; }
}

/* keep the pull-quote from stretching to match the prose column */
.grid-2 > .callout {
  align-self: start;
  margin-top: 0;
}
