/* =====================================================================
   Kyle Andrew Ryan — professional site
   Theme: culturally grounded + academic (warm earth palette)
   Shared stylesheet for all pages
   ===================================================================== */

:root {
  /* Surfaces */
  --bg:        #F7F1E7;   /* warm paper */
  --bg-alt:    #F1E7D7;   /* alternating section */
  --surface:   #FFFCF6;   /* cards */
  --hero-1:    #241C14;   /* deep earth */
  --hero-2:    #3A2A1B;   /* warm brown */

  /* Ink */
  --ink:       #201A14;   /* headings */
  --body:      #3D352C;   /* body text */
  --muted:     #6B5F51;   /* meta / secondary */

  /* Accents (earth) */
  --ochre:     #B4632C;   /* terracotta / ochre */
  --ochre-dk:  #8A4420;
  --clay:      #97371F;   /* deep clay red (links, emphasis) */
  --gum:       #3C4A38;   /* eucalyptus green */
  --gold:      #C98A3C;   /* warm gold */

  /* Lines & shadow */
  --line:      rgba(32, 26, 20, 0.12);
  --line-2:    rgba(32, 26, 20, 0.20);
  --shadow:    0 1px 2px rgba(32,26,20,.05), 0 8px 30px rgba(32,26,20,.07);
  --shadow-sm: 0 1px 2px rgba(32,26,20,.06), 0 4px 14px rgba(32,26,20,.06);

  --maxw: 1080px;
  --radius: 14px;
  --radius-sm: 9px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--clay); text-decoration-color: rgba(151,55,31,.35); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--clay); }

h1, h2, h3, h4 {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  color: var(--ink);
  line-height: 1.12;
  font-weight: 600;
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p  { margin: 0 0 1rem; }

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

.eyebrow {
  font-family: "Inter", sans-serif;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .74rem;
  font-weight: 600;
  color: var(--ochre-dk);
  margin: 0 0 .9rem;
}

.lead { font-size: 1.18rem; color: var(--body); max-width: 60ch; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 241, 231, 0.88);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand .monogram {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--ochre), var(--clay));
  color: #fff; font-family: "Fraunces", serif; font-weight: 600; font-size: .95rem;
  letter-spacing: .02em; box-shadow: var(--shadow-sm);
}
.brand .brand-name { font-family: "Fraunces", serif; font-weight: 600; color: var(--ink); font-size: 1.08rem; }
.brand .brand-name span { display: block; font-family: "Inter", sans-serif; font-weight: 500; font-size: .72rem; color: var(--muted); letter-spacing: .02em; }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: var(--body); text-decoration: none; font-weight: 500; font-size: .95rem;
  padding: 8px 14px; border-radius: 999px; transition: background .18s, color .18s;
}
.nav-links a:hover { background: rgba(180,99,44,.10); color: var(--ink); }
.nav-links a.active { color: var(--clay); background: rgba(151,55,31,.09); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line-2);
  border-radius: 9px; width: 42px; height: 40px; cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 20px; height: 2px; background: var(--ink); position: relative; transition: .2s;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after  { position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after  { top: 0; transform: rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: .96rem; text-decoration: none;
  padding: 12px 22px; border-radius: 999px; cursor: pointer;
  border: 1px solid transparent; transition: transform .12s ease, box-shadow .18s, background .18s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(135deg, var(--ochre), var(--clay)); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { box-shadow: 0 6px 22px rgba(151,55,31,.28); color:#fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ochre); color: var(--clay); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(120% 140% at 85% -10%, #4a3520 0%, transparent 55%),
              linear-gradient(150deg, var(--hero-1), var(--hero-2));
  color: #F3E9DB;
}
.hero::after {
  content:""; position:absolute; right:-120px; top:-120px; width:420px; height:420px;
  background: radial-gradient(circle, rgba(201,138,60,.35), transparent 62%);
  border-radius: 50%; pointer-events: none;
}
.hero::before {
  content:""; position:absolute; left:-140px; bottom:-160px; width:420px; height:420px;
  background: radial-gradient(circle, rgba(151,55,31,.30), transparent 62%);
  border-radius: 50%; pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; padding: 92px 0 84px; }
.hero .eyebrow { color: var(--gold); }
.hero h1 { color: #FBF4E9; max-width: 16ch; }
.hero .hero-sub { font-size: 1.22rem; color: #E7DAC7; max-width: 58ch; margin-top: .6rem; }
.hero .hero-meta { margin-top: 1.4rem; display: flex; flex-wrap: wrap; gap: 10px 20px; font-size: .95rem; color: #D8C9B4; }
.hero .hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); display:inline-block; }
.hero .btn-row { margin-top: 2rem; }

/* ---------- Sections ---------- */
.section { padding: 78px 0; }
.section--alt { background: var(--bg-alt); }
.section--tight { padding: 56px 0; }
.section-head { max-width: 62ch; margin-bottom: 2.2rem; }
.section-head.center { margin-left: auto; margin-right: auto; }

/* ---------- Stat strip ---------- */
.stat-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.stat { background: var(--surface); padding: 22px 20px; }
.stat .num { font-family: "Fraunces", serif; font-size: 1.7rem; color: var(--clay); line-height: 1; }
.stat .lbl { font-size: .88rem; color: var(--muted); margin-top: 6px; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: .35rem; }
.card .card-meta { font-size: .85rem; color: var(--ochre-dk); font-weight: 600; letter-spacing: .02em; margin-bottom: .6rem; }
.card p:last-child { margin-bottom: 0; }
.card--accent { border-top: 4px solid var(--ochre); }

/* icon chip for strands */
.chip-list { display: grid; gap: 14px; }
.chip {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 18px 20px;
}
.chip .k {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 9px;
  background: rgba(180,99,44,.14); color: var(--ochre-dk);
  display: grid; place-items: center; font-family: "Fraunces", serif; font-weight: 600;
}
.chip .t strong { color: var(--ink); display:block; margin-bottom: 2px; }
.chip .t span { color: var(--muted); font-size: .95rem; }

/* ---------- Timeline ---------- */
.timeline { position: relative; margin-top: 1rem; }
.timeline::before {
  content:""; position:absolute; left: 12px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(var(--ochre), var(--gum)); opacity: .35;
}
.tl-item { position: relative; padding: 0 0 34px 46px; }
.tl-item::before {
  content:""; position:absolute; left: 5px; top: 4px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--ochre); box-shadow: 0 0 0 4px rgba(180,99,44,.10);
}
.tl-item:last-child { padding-bottom: 0; }
.tl-year { font-family: "Inter", sans-serif; font-weight: 600; font-size: .8rem; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ochre-dk); margin-bottom: 4px; }
.tl-role { font-family: "Fraunces", serif; font-size: 1.16rem; color: var(--ink); margin: 0 0 2px; }
.tl-org { font-weight: 600; color: var(--gum); font-size: .98rem; margin-bottom: .5rem; }
.tl-item p { margin: 0 0 .5rem; }
.tl-item ul { margin: .3rem 0 0; padding-left: 1.1rem; }
.tl-item li { margin-bottom: .35rem; }

/* ---------- Pills / tags ---------- */
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: .5rem; }
.pill {
  font-size: .82rem; font-weight: 500; color: var(--gum);
  background: rgba(60,74,56,.09); border: 1px solid rgba(60,74,56,.18);
  padding: 5px 12px; border-radius: 999px;
}

/* ---------- Definition rows (contact / quick facts) ---------- */
.rows { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.row { display: grid; grid-template-columns: 190px 1fr; gap: 16px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row .rk { color: var(--muted); font-weight: 600; font-size: .9rem; }
.row .rv a { font-weight: 500; }

/* ---------- Callout ---------- */
.callout {
  border-left: 4px solid var(--gum); background: rgba(60,74,56,.06);
  padding: 18px 22px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--body); font-size: .98rem;
}

/* ---------- Portrait / placeholder ---------- */
.portrait {
  aspect-ratio: 4/5; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(160deg, var(--hero-2), var(--hero-1));
  display: grid; place-items: center; color: #E7D6BE; text-align: center; padding: 24px;
  border: 1px solid var(--line);
}
.portrait .ph-mono { font-family: "Fraunces", serif; font-size: 3.2rem; opacity: .9; }
.portrait small { display:block; margin-top: 8px; font-size: .8rem; color: #C9B79B; letter-spacing:.04em; }

/* ---------- Footer ---------- */
.site-footer { background: var(--hero-1); color: #D9CBB6; margin-top: 0; }
.footer-inner { padding: 54px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 34px; }
.site-footer h4 { color: #F3E7D4; font-size: 1.05rem; margin-bottom: .6rem; }
.site-footer a { color: #E7D6BE; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .95rem; }
.acknowledgement {
  font-size: .92rem; color: #C6B69C; line-height: 1.7; max-width: 46ch;
  border-left: 3px solid var(--gold); padding-left: 16px;
}
.footer-bottom {
  margin-top: 34px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  font-size: .85rem; color: #B7A78D;
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .row { grid-template-columns: 1fr; gap: 2px; padding: 14px 18px; }

  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 12px 16px 18px; box-shadow: var(--shadow);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; border-radius: 10px; }
}
@media (max-width: 460px) {
  body { font-size: 16px; }
  .stat-strip { grid-template-columns: 1fr 1fr; }
  .brand .brand-name span { display: none; }
  .hero-inner { padding: 66px 0 60px; }
}

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