:root {
  --bg: #0B1526;
  --bg-deep: #07111F;
  --bg-panel: #0E1B2B;
  --bg-panel-soft: #122238;
  --blue-muted: #6582AA;
  --blue-slate: #4B6387;
  --blue-deep: #334663;
  --cream: #F2EADC;
  --cream-soft: #E7D8C6;
  --cream-muted: rgba(242, 234, 220, 0.70);
  --cream-faint: rgba(242, 234, 220, 0.42);
  --line: rgba(242, 234, 220, 0.12);
  --line-strong: rgba(242, 234, 220, 0.20);
  --accent: #C6A15B;
  --accent-bright: #D99A56;
  --accent-rust: #A35139;
  --ink: #050A11;

  --content: min(1320px, calc(100% - 120px));
  --nav-h: 78px;
  --radius: 5px;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.40);

  /* Section heading rhythm: boundary → label → rule → content */
  --section-pad-top: 32px;
  --section-label-rule-gap: 14px;
  --section-heading-content-gap: 52px;

  /* Motion tokens: the site's entire timing vocabulary */
  --t-feedback: 180ms;
  --t-hover: 260ms;
  --t-enter: 600ms;
  --t-draw: 900ms;
  --stagger: 90ms;
  --ease-overshoot: cubic-bezier(0.34, 1.3, 0.4, 1);
}

/* Keyboard parity with hover feedback */
:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
  border-radius: 2px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 6px);
  background: var(--bg-deep);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at 70% 18%, rgba(75, 99, 135, 0.18), transparent 28%),
    linear-gradient(180deg, #08131F 0%, #07111F 42%, #050A11 100%);
  color: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

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

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ==============================
   SHARED ELEMENTS
   ============================== */

.btn {
  height: 46px;
  min-width: 154px;
  padding: 0 25px;
  border-radius: 4px;
  border: 1px solid var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 11px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--primary {
  background: linear-gradient(180deg, var(--blue-muted), var(--blue-slate));
  border-color: rgba(101, 130, 170, 0.72);
  color: var(--cream);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

.btn--outline {
  background: transparent;
  border-color: rgba(217, 154, 86, 0.72);
  color: var(--cream);
}
.btn--outline:hover {
  border-color: var(--accent-bright);
  background: rgba(217, 154, 86, 0.08);
}

.btn--dark {
  background: rgba(7, 17, 31, 0.72);
  border-color: rgba(242, 234, 220, 0.32);
  color: var(--cream);
}

/* Inactive button (e.g. resume placeholder until PDF is uploaded) */
.btn.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  user-select: none;
}

.btn.is-disabled:hover {
  transform: none;
}

.section-label {
  color: var(--accent-bright);
  font-size: 11px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ==============================
   SHARED SECTION HEADING
   label → gold/gray rule → content
   ============================== */

.section-heading {
  width: var(--content);
  margin: 0 auto var(--section-heading-content-gap);
  display: grid;
  gap: var(--section-label-rule-gap);
}

.section-heading__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.section-rule {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-rule::before,
.section-rule::after {
  content: "";
  display: block;
  height: 1px;
  flex: 0 0 auto;
}

.section-rule::before {
  width: 24px;
  background: var(--accent-bright);
}

.section-rule::after {
  width: 58px;
  background: rgba(135, 130, 135, 0.58);
}

/* --- Divider draw-in (active only when JS is present) --- */

html.js [data-reveal] .section-rule::before,
html.js [data-reveal] .section-rule::after {
  transform: scaleX(0);
  transform-origin: left center;
}

html.js [data-reveal].in-view .section-rule::before {
  transform: scaleX(1);
  transition: transform var(--t-enter) ease;
}

html.js [data-reveal].in-view .section-rule::after {
  transform: scaleX(1);
  transition: transform var(--t-enter) ease calc(var(--t-enter) / 2);
}

@media (prefers-reduced-motion: reduce) {
  html.js [data-reveal] .section-rule::before,
  html.js [data-reveal] .section-rule::after {
    transform: none;
    transition: none;
  }
}


/* ==============================
   SHARED MOTION
   Scroll reveals + animated dividers.
   Hidden states apply only when JS is present (html.js);
   main.js adds .in-view once per [data-reveal] section.
   ============================== */

html.js [data-reveal] .reveal-item {
  opacity: 0;
  transform: translateY(14px);
}

html.js [data-reveal].in-view .reveal-item {
  opacity: 1;
  transform: none;
  transition: opacity var(--t-enter) ease, transform var(--t-enter) ease;
  transition-delay: calc(var(--i, 0) * var(--stagger));
}

/* Dividers extend from the left: gold leads, gray follows */
html.js [data-reveal] .section-rule::before,
html.js [data-reveal] .section-rule::after {
  transform: scaleX(0);
  transform-origin: left center;
}

html.js [data-reveal].in-view .section-rule::before {
  transform: scaleX(1);
  transition: transform var(--t-enter) ease;
}

html.js [data-reveal].in-view .section-rule::after {
  transform: scaleX(1);
  transition: transform var(--t-enter) ease 150ms;
}

@media (prefers-reduced-motion: reduce) {
  html.js [data-reveal] .reveal-item,
  html.js [data-reveal].in-view .reveal-item {
    opacity: 1;
    transform: none;
    transition: none;
  }

  html.js [data-reveal] .section-rule::before,
  html.js [data-reveal] .section-rule::after,
  html.js [data-reveal].in-view .section-rule::before,
  html.js [data-reveal].in-view .section-rule::after {
    transform: none;
    transition: none;
  }
}
