/* =============================================================
   Theme tokens — warm neutral ("paper") palette, light + professional
   Change --accent / --accent-hover to shift the single pop of color.
   ============================================================= */
:root {
  color-scheme: light;
  --bg: #f4eee4;              /* warm beige page */
  --bg-alt: #ece4d6;          /* slightly deeper band for alt sections */
  --surface: #faf6ef;         /* cards / raised surfaces */
  --border: #ddd0bd;          /* warm hairline */
  --text: #2e2620;            /* warm near-black-brown */
  --text-muted: #6a5d50;      /* warm taupe */
  --accent: #b0502a;          /* terracotta — the pop of color */
  --accent-hover: #8f3f1f;
  --accent-soft: #f2e0d3;     /* tinted fill for badges/ghost hover */
  --shadow: 0 1px 2px rgba(60, 40, 20, .06), 0 10px 28px rgba(60, 40, 20, .08);
  --glow: 0 0 0 1px rgba(176, 80, 42, .35), 0 12px 32px rgba(176, 80, 42, .18);
  --radius: 14px;
  --maxw: 1120px;
  --measure: 68ch;            /* comfortable line length for paragraphs */
  --font: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background .25s ease, color .25s ease;
}

h1, h2, h3 { line-height: 1.2; margin: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

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

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

/* =============================================================
   Buttons
   ============================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, background .2s ease, border-color .2s ease, color .2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary {
  background: var(--accent);
  color: var(--surface);
  box-shadow: 0 6px 18px rgba(176, 80, 42, .22);
}
.btn--primary:hover { background: var(--accent-hover); color: var(--surface); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent-hover); background: var(--accent-soft); }

/* =============================================================
   Nav
   ============================================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav__brand {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: .5px;
  color: var(--surface);
  background: var(--accent);
  border-radius: 10px;
  padding: 4px 11px;
}
.nav__brand:hover { text-decoration: none; color: var(--surface); background: var(--accent-hover); }
.nav__links { display: flex; gap: 28px; }
.nav__links a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: .95rem;
}
.nav__links a:hover { color: var(--text); text-decoration: none; }
.nav__actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
  font-size: 1.1rem;
  transition: background .2s ease, border-color .2s ease;
}
.icon-btn:hover { background: var(--surface); border-color: var(--accent); }

/* Burger */
.nav__burger { display: none; flex-direction: column; gap: 4px; }
.nav__burger span {
  width: 18px; height: 2px; background: var(--text); border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav__mobile {
  display: none;
  flex-direction: column;
  padding: 8px 24px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.nav__mobile a {
  padding: 12px 4px;
  color: var(--text);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}
.nav__mobile a:last-child { border-bottom: none; }
.nav__mobile.is-open { display: flex; }

/* =============================================================
   Hero
   ============================================================= */
.hero {
  padding: 112px 0 88px;
  background:
    radial-gradient(50% 80% at 90% 0%, rgba(176, 80, 42, .10) 0%, transparent 70%),
    radial-gradient(40% 60% at 0% 100%, rgba(196, 160, 110, .18) 0%, transparent 70%);
}
.hero__eyebrow {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 1.2px;
  margin: 0 0 16px;
  text-transform: uppercase;
  font-size: .8rem;
}
.hero__title {
  font-size: clamp(2.8rem, 7vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -2px;
  margin-bottom: 22px;
  color: var(--text);
}
.hero__lede {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin: 0 0 32px;
  max-width: var(--measure);
}
.hero__lede strong { color: var(--text); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 28px; }
.hero__social {
  display: flex; flex-wrap: wrap; gap: 24px;
  list-style: none; padding: 0; margin: 0;
}
.hero__social a {
  color: var(--text-muted);
  font-weight: 500;
  position: relative;
}
.hero__social a:hover { color: var(--accent); text-decoration: none; }

/* =============================================================
   Sections
   ============================================================= */
.section { padding: 80px 0; }
.section--alt { background: var(--bg-alt); }
.section__title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -.5px;
  margin-bottom: 36px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.section__num {
  font-size: 1rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}
.section__intro { color: var(--text-muted); max-width: var(--measure); margin: -16px 0 32px; }

/* About */
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
  gap: 56px;
  align-items: stretch;
}
.about__body p { margin: 0 0 16px; color: var(--text-muted); }
.about__body p:last-child { margin-bottom: 0; }
.about__body .about__lede {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 20px;
}
.about__facts {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  display: flex;
}
/* Facts spread evenly over the card so it matches the text column's height */
.about__facts dl {
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
}
.about__facts dl > div + div { border-top: 1px solid var(--border); padding-top: 16px; }
.about__facts dt {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.about__facts dd { margin: 0; font-weight: 600; }

/* Skill tags (used on project cards) */
.tags { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 500;
}

/* Skills section */
.skills {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}
@media (min-width: 900px) {
  .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.skills__group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.skills__group--wide { grid-column: 1 / -1; }
.skills__cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 4px 32px;
}
.skills__title { font-size: 1.1rem; font-weight: 700; margin-bottom: 14px; }
.skills__sub {
  font-size: .74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--text-muted);
  margin: 0 0 8px;
}
.skills .tags { margin-bottom: 16px; }
.coursework__title { margin-top: 18px; }

/* Timeline / experience */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.timeline__item {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 24px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
}
.timeline__item:first-child { border-top: none; }
.timeline__date { color: var(--text-muted); font-weight: 600; font-size: .92rem; }
.timeline__role { font-size: 1.15rem; font-weight: 700; }
.timeline__company { color: var(--accent); font-weight: 600; margin: 2px 0 12px; }
.timeline__titles { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 4px; }
.timeline__titles li {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px;
  font-weight: 600; color: var(--text);
}
.timeline__titles li span:last-child { color: var(--text-muted); font-weight: 500; font-size: .9rem; }
.timeline__points { margin: 0; padding-left: 18px; color: var(--text-muted); display: grid; gap: 6px; }
.timeline__points li { color: var(--text-muted); }

/* Projects */
.projects__heading {
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--text-muted);
  margin: 0 0 16px;
}
.projects + .projects__heading { margin-top: 44px; }
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}
/* Professional projects: one full-width card each; content splits into
   two columns on wide screens so cards are wide and short, not narrow and tall */
.projects--featured { grid-template-columns: 1fr; }
@media (min-width: 900px) {
  .card.card--featured {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
      "head   head"
      "desc   points"
      "tags   points";
    column-gap: 36px;
  }
  .card--featured .card__head   { grid-area: head; margin-bottom: 16px; }
  .card--featured .card__desc   { grid-area: desc; margin-bottom: 16px; }
  .card--featured .card__points { grid-area: points; margin: 0; align-self: start; }
  .card--featured .tags         { grid-area: tags; margin-bottom: 0; }
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform .15s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--glow); }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card__title { font-size: 1.1rem; font-weight: 700; word-break: break-word; }
.card__badge {
  font-size: .72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
  background: var(--accent-soft);
  color: var(--accent-hover);
  border: 1px solid rgba(176, 80, 42, .25);
}
.card__impact {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
/* Featured header: title left, impact tags right; wraps on narrow screens */
.card--featured .card__head { flex-wrap: wrap; row-gap: 10px; }
@media (max-width: 640px) {
  .card--featured .card__impact { justify-content: flex-start; }
}
.card__impact li {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .3px;
  color: var(--accent-hover);
  background: var(--accent-soft);
  padding: 3px 10px;
  border-radius: 6px;
}
.card__desc { color: var(--text-muted); margin: 0 0 18px; flex: 1; }
.card__desc:has(+ .card__points) { flex: 0; margin-bottom: 12px; }
.card__points {
  margin: 0 0 18px;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: var(--text-muted);
  font-size: .94rem;
  flex: 1;
}
.card__points strong { color: var(--text); font-weight: 600; }
.card__links { display: flex; gap: 16px; }
.card__links a { font-weight: 600; font-size: .92rem; }
.projects__more { margin-top: 32px; text-align: center; }

/* Contact */
.contact__lede { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 28px; max-width: var(--measure); }
.contact__links { display: flex; flex-wrap: wrap; gap: 14px; }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 28px 0; background: var(--bg); }
.footer__inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.footer p { margin: 0; color: var(--text-muted); font-size: .9rem; }

/* =============================================================
   Placeholder highlighting — anything still unedited gets a
   subtle dashed outline so you can spot it. Remove the block or
   set data-placeholder attributes to nothing when done, or just
   delete .is-placeholder toggling in script.js.
   ============================================================= */
body.show-placeholders [data-placeholder] {
  outline: 2px dashed #e8a33d;
  outline-offset: 2px;
  border-radius: 4px;
}

/* =============================================================
   Responsive
   ============================================================= */
@media (max-width: 820px) {
  .nav__links { display: none; }
  .nav__burger { display: inline-flex; }
  .about__grid { grid-template-columns: 1fr; gap: 28px; }
  .timeline__item { grid-template-columns: 1fr; gap: 6px; }
  .card { padding: 20px; }
  .hero { padding: 72px 0 56px; }
  .section { padding: 60px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
