/* ── Theme C: Warm Executive — Earthy Professional ─── */

:root {
  --color-bg: #f7f4f0;
  --color-surface: #faf8f5;
  --color-surface-strong: #ede8e2;
  --color-surface-soft: rgba(44, 24, 16, 0.04);
  --color-text: #2c1810;
  --color-text-muted: #6b5445;
  --color-accent: #c45d3e;
  --color-accent-bright: #d4704f;
  --color-accent-subtle: rgba(196, 93, 62, 0.08);
  --color-border: rgba(44, 24, 16, 0.10);
  --color-shadow: rgba(44, 24, 16, 0.1);
  --font-body: "Outfit", sans-serif;
  --font-display: "Source Serif 4", serif;
  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-pill: 999px;
  --glass-bg: rgba(250, 248, 245, 0.82);
  --glass-border: 1px solid rgba(44, 24, 16, 0.07);
  --glass-shadow: 0 4px 20px rgba(44, 24, 16, 0.06);
}

/* ── Global overrides ─────────────────────── */

body {
  background:
    radial-gradient(ellipse at 15% 8%, rgba(196, 93, 62, 0.06), transparent 40%),
    radial-gradient(ellipse at 80% 20%, rgba(196, 93, 62, 0.04), transparent 35%),
    linear-gradient(180deg, #f9f6f2 0%, var(--color-bg) 30%, #f3efe9 100%);
  font-weight: 400;
}

::selection {
  background: rgba(196, 93, 62, 0.18);
  color: #2c1810;
}

.text-gradient {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-bright));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ── Subtle warm grain texture ────────────── */

.site-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.032;
  background:
    radial-gradient(circle at center, rgba(44, 24, 16, 0.15) 0.0625rem, transparent 0.08rem),
    repeating-linear-gradient(
      0deg,
      rgba(44, 24, 16, 0.015) 0,
      rgba(44, 24, 16, 0.015) 1px,
      transparent 1px,
      transparent 3px
    );
  background-size: 0.35rem 0.35rem, 100% 100%;
  filter: url(#noise-filter);
  pointer-events: none;
}

/* ── Cards: warm with glassmorphism ────────── */

.glass-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--glass-bg);
  box-shadow:
    0 1px 3px rgba(44, 24, 16, 0.04),
    0 4px 16px rgba(44, 24, 16, 0.03);
}

.glass-card::before {
  content: "";
  position: absolute;
  inset: -40% auto auto -10%;
  width: 10rem;
  height: 10rem;
  background: radial-gradient(circle, rgba(196, 93, 62, 0.06), transparent 65%);
  pointer-events: none;
}

@supports (backdrop-filter: blur(10px)) {
  .glass-card {
    backdrop-filter: blur(8px) saturate(140%);
  }

  .site-header.is-scrolled .site-header__inner {
    backdrop-filter: blur(12px) saturate(160%);
  }
}

@supports not (backdrop-filter: blur(10px)) {
  .glass-card,
  .site-header.is-scrolled .site-header__inner,
  .site-nav {
    background: rgba(250, 248, 245, 0.96);
  }
}

/* ── Header ───────────────────────────────── */

.site-header.is-scrolled .site-header__inner {
  border: 1px solid var(--color-border);
  background: rgba(247, 244, 240, 0.88);
  box-shadow:
    0 1px 2px rgba(44, 24, 16, 0.04),
    0 4px 16px rgba(44, 24, 16, 0.06);
}

/* ── Navigation ───────────────────────────── */

.site-nav {
  background: rgba(250, 248, 245, 0.97);
  border: 1px solid var(--color-border);
  box-shadow: 0 8px 32px rgba(44, 24, 16, 0.1);
}

.site-nav__link.is-active {
  color: var(--color-accent);
}

.nav-toggle {
  border-color: var(--color-border);
  background: rgba(44, 24, 16, 0.03);
}

.nav-toggle span {
  background: var(--color-text);
}

/* ── Hero ──────────────────────────────────── */

.hero {
  background:
    radial-gradient(ellipse at 20% 30%, rgba(196, 93, 62, 0.07), transparent 40%),
    radial-gradient(ellipse at 75% 25%, rgba(196, 93, 62, 0.05), transparent 35%);
  background-size: 100% 100%;
  animation: none;
}

.hero::before,
.about::before,
.experience::before,
.education::before,
.contact::before,
.case-study::before {
  border-color: transparent;
}

.hero__portrait-frame {
  border-color: rgba(196, 93, 62, 0.15);
  box-shadow:
    0 4px 16px rgba(44, 24, 16, 0.08),
    0 16px 48px rgba(44, 24, 16, 0.1);
}

/* ── Typography refinements ──────────────── */

h1, h2, h3 {
  color: var(--color-text);
}

h1 {
  font-weight: 700;
  letter-spacing: -0.025em;
}

h2 {
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* ── Buttons ──────────────────────────────── */

.button {
  background: var(--color-accent);
  color: #ffffff;
  box-shadow:
    0 2px 4px rgba(196, 93, 62, 0.2),
    0 8px 24px rgba(196, 93, 62, 0.15);
}

.button::after {
  content: "";
  position: absolute;
  inset: -35% 12%;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(circle, rgba(196, 93, 62, 0.25), transparent 68%);
  opacity: 0;
  transition: opacity 300ms ease;
  pointer-events: none;
}

.button:hover::after,
.button:focus-visible::after {
  opacity: 1;
}

.button-secondary {
  border-color: var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
}

.button-secondary::after {
  display: none;
}

.button-secondary:hover,
.button-secondary:focus-visible {
  border-color: rgba(196, 93, 62, 0.3);
  background: rgba(196, 93, 62, 0.04);
}

/* ── Underlines ───────────────────────────── */

.link-underline::after,
.site-nav__link::after,
.site-footer__meta a::after {
  background: var(--color-accent);
}

.eyebrow::before {
  background: linear-gradient(90deg, var(--color-accent), rgba(196, 93, 62, 0.3));
}

/* ── Tags & pills ─────────────────────────── */

.tag {
  border-color: var(--color-border);
  background: var(--color-accent-subtle);
  color: var(--color-text);
  font-weight: 500;
}

.stat-pill,
.about-attribute,
.about-skill,
.double-diamond__phase,
.concept-flow__node {
  border-color: var(--color-border);
  background: var(--color-surface);
  box-shadow: 0 1px 3px rgba(44, 24, 16, 0.03);
}

/* ── Timeline: left accent borders ────────── */

.timeline::before {
  background: linear-gradient(180deg, transparent, var(--color-accent), transparent);
}

.timeline-item::before {
  border-color: var(--color-accent);
  background: var(--color-bg);
  box-shadow: 0 0 0 0.4rem rgba(196, 93, 62, 0.06);
}

.timeline-item {
  border-left: 2px solid rgba(196, 93, 62, 0.2);
  padding-left: calc(3rem - 2px);
}

.timeline-subrole {
  border-color: rgba(44, 24, 16, 0.08);
}

/* Fix timeline left border at desktop breakpoint */
@media (min-width: 64rem) {
  .timeline-item {
    border-left: none;
  }

  .timeline-item:nth-child(odd) {
    border-right: 2px solid rgba(196, 93, 62, 0.2);
    padding-right: calc(3.5rem - 2px);
  }

  .timeline-item:nth-child(even) {
    border-left: 2px solid rgba(196, 93, 62, 0.2);
    padding-left: calc(3.5rem - 2px);
  }
}

/* ── Media ────────────────────────────────── */

.media-frame {
  box-shadow:
    0 2px 8px rgba(44, 24, 16, 0.06),
    0 8px 24px rgba(44, 24, 16, 0.08);
}

.gold-glow {
  box-shadow:
    0 4px 16px rgba(44, 24, 16, 0.08),
    0 16px 48px rgba(44, 24, 16, 0.1);
}

.gold-glow::after {
  content: "";
  position: absolute;
  inset: -2%;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 100%, rgba(196, 93, 62, 0.1), transparent 52%);
  filter: blur(1.5rem);
  opacity: 0.5;
  pointer-events: none;
}

/* ── Surface hover ────────────────────────── */

.surface-hover:hover,
.surface-hover:focus-within {
  box-shadow:
    0 4px 12px rgba(44, 24, 16, 0.06),
    0 16px 40px rgba(44, 24, 16, 0.1);
  border-color: rgba(196, 93, 62, 0.18);
}

.surface-hover::after {
  content: "";
  position: absolute;
  inset: auto 10% -18% 10%;
  z-index: -1;
  height: 40%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 93, 62, 0.12), transparent 68%);
  opacity: 0;
  transition: opacity 300ms ease;
  pointer-events: none;
}

.surface-hover:hover::after,
.surface-hover:focus-within::after {
  opacity: 1;
}

/* ── Footer ───────────────────────────────── */

.site-footer__inner {
  border-color: var(--color-border);
  background: var(--color-surface);
  box-shadow: 0 -1px 3px rgba(44, 24, 16, 0.02);
}

/* ── Forms ─────────────────────────────────── */

.form-field input,
.form-field textarea {
  border-color: var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: rgba(44, 24, 16, 0.32);
}

.form-field input:focus-visible,
.form-field textarea:focus-visible {
  border-color: rgba(196, 93, 62, 0.5);
  box-shadow: 0 0 0 0.25rem rgba(196, 93, 62, 0.08);
  background: #ffffff;
}

.form-field__error {
  color: #c62828;
}

.contact-form__status.is-error {
  color: #c62828;
}

.contact-form__status.is-success {
  color: var(--color-accent);
}

/* ── Case study details ───────────────────── */

.case-study-details {
  border-color: rgba(44, 24, 16, 0.08);
}

/* ── Skip link ────────────────────────────── */

.skip-link {
  background: var(--color-accent);
  color: #ffffff;
}

/* ── Focus ────────────────────────────────── */

:focus-visible {
  outline-color: var(--color-accent);
}

/* ── Theme picker ─────────────────────────── */

.theme-picker {
  background: var(--color-surface);
  border-color: var(--color-border);
  box-shadow:
    0 2px 8px rgba(44, 24, 16, 0.06),
    0 8px 24px rgba(44, 24, 16, 0.08);
}

.theme-picker__swatch.is-active {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px var(--color-bg), 0 0 0 4px var(--color-accent);
}

/* ── Stat pills: varied sizing ───────────── */

.stat-pill__value {
  color: var(--color-accent);
}

/* ── Eyebrow: warm styling ───────────────── */

.eyebrow {
  color: var(--color-accent);
}

/* ── Headshot portrait: warm glow ────────── */

.hero__portrait-frame img {
  filter: saturate(1.05) contrast(1.02);
}

/* ── Experience gallery: warm overlay ─────── */

.experience-gallery__item {
  position: relative;
}

.experience-gallery__item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(44, 24, 16, 0.08));
  pointer-events: none;
  border-radius: inherit;
}
