/* ===========================================================
   JR Oakes — personal site
   Brand font: Roboto. Palette: Cobalt & Slate (see STYLE.md).
   =========================================================== */

:root {
  /* Cobalt & Slate — see STYLE.md (Visual Identity) */
  --forest: #1F2937;        /* brand slate — headings, dark surfaces */
  --forest-deep: #111827;   /* deeper slate — footer */
  --emerald: #2563EB;       /* cobalt — primary accent */
  --emerald-deep: #1D4ED8;  /* cobalt hover / links */
  --sage: #64748B;          /* muted slate — eyebrows, dates */
  --beige: #DBEAFE;         /* pale blue — underlines, on-dark text */
  --clay: #2563EB;          /* cobalt — section kickers */
  --slate-blue: #60A5FA;    /* light blue — secondary accent */

  --paper: #FAFAFA;
  --paper-warm: #F1F4F9;
  --ink: #1F2937;
  --ink-soft: #4B5563;
  --line: #E5E7EB;

  --serif: "Roboto", Arial, sans-serif;
  --sans: "Roboto", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --maxw: 1080px;
  --radius: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--forest); text-decoration: none; }
a:hover { color: var(--emerald-deep); }

.prose a, .writing-list a h3, .hero-lede a, .section-sub a, .work-body a {
  text-decoration: underline;
  text-decoration-color: var(--beige);
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  transition: text-decoration-color .2s var(--ease);
}
.prose a:hover, .hero-lede a:hover, .section-sub a:hover, .work-body a:hover {
  text-decoration-color: var(--emerald);
}

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

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--forest); color: var(--paper); padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--line); }

.nav {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--maxw); margin: 0 auto; padding: 14px 28px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--forest); }
.brand-mark { display: block; width: 38px; height: 38px; flex: 0 0 38px; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 19px; }

.nav-links { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  font-size: 15px; color: var(--ink-soft); font-weight: 500;
  position: relative; padding-bottom: 2px;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 1.5px;
  background: var(--emerald); transition: width .25s var(--ease);
}
.nav-links a:hover { color: var(--forest); }
.nav-links a:hover::after { width: 100%; }

/* ---------- Hero ---------- */
.hero { padding: 104px 0 84px; }
.eyebrow {
  font-family: var(--mono); font-size: 13px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--sage); margin: 0 0 26px;
}
.hero-title {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(2.6rem, 6.2vw, 4.6rem);
  line-height: 1.06; letter-spacing: -0.02em;
  margin: 0 0 30px; color: var(--forest);
}
.hero-title em { font-style: italic; color: var(--emerald-deep); }
.hero-lede {
  max-width: 660px; font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.72; color: var(--ink-soft); margin: 0 0 34px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px;
  font-weight: 500; font-size: 15.5px; letter-spacing: .01em;
  transition: transform .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
}
.btn-primary { background: var(--forest); color: var(--paper); }
.btn-primary:hover { background: var(--forest-deep); color: var(--paper); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(31,41,55,.22); }
.btn-ghost { background: transparent; color: var(--forest); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--sage); color: var(--forest); transform: translateY(-2px); }

/* ---------- Section scaffolding ---------- */
.section { padding: 78px 0; border-top: 1px solid var(--line); }
.section-alt { background: var(--paper-warm); }

.section-head { margin-bottom: 44px; }
.section-head.center { text-align: center; max-width: 640px; margin-left: auto; margin-right: auto; }
.kicker {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--clay); margin: 0 0 14px;
}
.section-head h2 {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(1.9rem, 3.6vw, 2.8rem); line-height: 1.12;
  letter-spacing: -0.01em; margin: 0; color: var(--forest);
}
.section-sub { margin: 16px 0 0; color: var(--ink-soft); font-size: 1.02rem; max-width: 620px; }
.section-head.center .section-sub { margin-left: auto; margin-right: auto; }

.grid-2 { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 48px; align-items: start; }
.grid-2 .section-head { margin-bottom: 0; }

.prose p { margin: 0 0 18px; color: var(--ink); }
.prose p:last-child { margin-bottom: 0; }

/* ---------- Focus cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(31,41,55,.08); border-color: var(--beige); }
.card h3 {
  font-family: var(--serif); font-weight: 700; font-size: 1.3rem;
  margin: 0 0 10px; color: var(--forest); position: relative; padding-left: 16px;
}
.card h3::before {
  content: ""; position: absolute; left: 0; top: 8px; width: 7px; height: 7px;
  border-radius: 2px; background: var(--emerald);
}
.card p { margin: 0; font-size: 0.97rem; line-height: 1.6; color: var(--ink-soft); }

/* ---------- Toolkit ---------- */
.toolkit { margin-top: 48px; padding-top: 36px; border-top: 1px solid var(--line); }
.toolkit-head { font-family: var(--serif); font-weight: 700; font-size: 1.4rem; color: var(--forest); margin: 0 0 26px; text-align: center; }
.tool-group { margin-bottom: 18px; }
.tool-label { display: block; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--clay); margin: 0 0 9px; }
.tool-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tool-tags span {
  font-family: var(--mono); font-size: 12.5px; color: var(--ink-soft);
  background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.tool-tags span:hover { border-color: var(--slate-blue); color: var(--forest); }

/* ---------- Work list ---------- */
.work-list { list-style: none; margin: 0; padding: 0; }
.work-list li {
  display: grid; grid-template-columns: 140px 1fr; gap: 28px; align-items: baseline;
  padding: 26px 0; border-top: 1px solid var(--line);
}
.work-list li:first-child { border-top: none; }
.work-meta { padding-top: 4px; }
.tag {
  display: inline-block; font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em;
  text-transform: uppercase; color: var(--sage);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; background: var(--paper);
}
.work-body h3 { font-family: var(--serif); font-weight: 700; font-size: 1.35rem; margin: 0 0 7px; }
.work-body h3 a { color: var(--forest); }
.work-body h3 a:hover { color: var(--emerald-deep); }
.work-body p { margin: 0; color: var(--ink-soft); font-size: 1rem; line-height: 1.62; }

/* ---------- Writing list ---------- */
.writing-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.writing-list li { border-top: 1px solid var(--line); }
.writing-list li:first-child { border-top: none; }
.writing-list a {
  display: block; padding: 26px 22px; border-radius: var(--radius);
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.writing-list a:hover { background: var(--paper); transform: translateX(4px); }
.writing-list h3 {
  font-family: var(--serif); font-weight: 700; font-size: 1.3rem; margin: 0 0 7px; color: var(--forest);
}
.writing-list p { margin: 0; color: var(--ink-soft); font-size: 0.99rem; }

/* ---------- Contact ---------- */
.contact { background: var(--forest); color: var(--paper); border-top: none; }
.contact .kicker { color: var(--beige); }
.contact-title { font-family: var(--serif); font-weight: 700; font-size: clamp(2.2rem, 5vw, 3.4rem); margin: 0 0 16px; color: var(--paper); }
.contact-lede { max-width: 560px; margin: 0 auto 30px; color: color-mix(in srgb, var(--beige) 92%, white); font-size: 1.08rem; }
.email-wrap { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }
.email-btn {
  display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
  font-family: var(--sans); font-size: 1.02rem; font-weight: 500; letter-spacing: .01em;
  color: var(--paper); background: var(--emerald);
  border: none; border-radius: 999px; padding: 14px 28px;
  transition: transform .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
}
.email-btn:hover { background: var(--emerald-deep); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(37,99,235,.4); }
.email-btn .ti-mail { font-style: normal; font-size: 1.1rem; line-height: 1; }
.social { list-style: none; display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; margin: 38px 0 0; padding: 0; }
.social a { font-family: var(--mono); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--beige); }
.social a:hover { color: var(--paper); }

/* ---------- Footer ---------- */
.site-footer { background: var(--forest-deep); color: color-mix(in srgb, var(--beige) 80%, transparent); padding: 26px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 14px; }
.footer-note { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; }
.back-top { color: var(--beige); font-size: 13px; }
.back-top:hover { color: var(--paper); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .grid-2 { grid-template-columns: 1fr; gap: 24px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .hero { padding: 64px 0 56px; }
  .cards { grid-template-columns: 1fr; }
  .work-list li { grid-template-columns: 1fr; gap: 10px; }
  .footer-inner { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
