/* ─────────────────────────────────────────────────────────────
   style.css — Taylor Mudd Portfolio
   ───────────────────────────────────────────────────────────── */

/* ── RESET & TOKENS ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Palette */
  --bg:          #0d0d0f;
  --bg-2:        #131316;
  --bg-card:     #1a1a1f;
  --border:      #2a2a32;
  --accent:      #c8a96e;                    /* warm brass — deliberate, editorial */
  --accent-dim:  rgba(200, 169, 110, 0.12);
  --text:        #e8e8ef;
  --text-muted:  #8888a0;
  --text-faint:  #7a7a96;                    /* was #4a4a60 — fixed WCAG AA failure */

  /* Type */
  --font-sans:   'IBM Plex Sans', system-ui, sans-serif;  /* was Inter */
  --font-serif:  'Cormorant Garamond', Georgia, serif;

  /* Spacing rhythm */
  --section-py:  clamp(5rem, 10vw, 9rem);
  --container:   min(1100px, 100% - 3rem);

  /* Motion */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  font-weight: 300;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── UTILITIES ──────────────────────────────────────────────── */
.container {
  width: var(--container);
  margin-inline: auto;
}

.section-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.section-heading {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 4.5vw, 3.25rem);
  font-weight: 300;
  color: var(--text);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
}

/* Fade-in animation */
.trait-card,
.skill-group,
.about-text,
.contact-inner,
.coming-soon-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

/* Stagger delays for entrance animation */
.trait-card:nth-child(2) { transition-delay: 0.08s; }
.trait-card:nth-child(3) { transition-delay: 0.16s; }
.trait-card:nth-child(4) { transition-delay: 0.24s; }

.skill-group:nth-child(2) { transition-delay: 0.1s; }

.visible {
  opacity: 1;
  transform: none;
}

/* After entrance: reset delay so hover has no lag (fixes nth-child specificity bug) */
.trait-card.visible,
.skill-group.visible {
  transition-delay: 0s;
}

/* ── SKIP LINK ──────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--accent);
  color: #0d0d0f;
  padding: 0.5rem 1rem;
  border-radius: 0 0 6px 6px;
  font-weight: 600;
  text-decoration: none;
  z-index: 999;
}

.skip-link:focus {
  top: 0;
}

/* ── BUTTONS ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s, border-color 0.2s, color 0.2s;
  border: 1px solid transparent;
}

.btn-primary {
  /* Tinted brass glass — lighter at top where light catches, deeper beneath */
  background: linear-gradient(
    180deg,
    rgba(224, 194, 118, 0.95) 0%,
    rgba(178, 143, 76, 0.9)   100%
  );
  color: #0d0d0f;
  border-color: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px) saturate(160%);
  -webkit-backdrop-filter: blur(8px) saturate(160%);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.45),
    0 4px 20px -2px rgba(200, 169, 110, 0.4),
    0 1px 4px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(
    180deg,
    rgba(236, 210, 140, 0.98) 0%,
    rgba(198, 163, 96, 0.95)  100%
  );
  transform: translateY(-2px);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.55),
    0 8px 28px -2px rgba(200, 169, 110, 0.55),
    0 2px 8px rgba(0, 0, 0, 0.35);
}

.btn-ghost {
  /* Clear glass — very translucent with blur showing through */
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.02) 100%
  );
  color: var(--text-muted);
  border-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.18),
    0 4px 16px -4px rgba(0, 0, 0, 0.4);
}

.btn-ghost:hover {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.13) 0%,
    rgba(255, 255, 255, 0.05) 100%
  );
  border-color: rgba(200, 169, 110, 0.45);
  color: var(--text);
  transform: translateY(-2px);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.28),
    0 8px 24px -4px rgba(0, 0, 0, 0.5),
    0 0 16px -4px rgba(200, 169, 110, 0.15);
}

.btn-lg {
  padding: 1rem 2.25rem;
  font-size: 1rem;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

/* ── HEADER / NAV ───────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 100;
  transition: background 0.4s, border-color 0.4s, box-shadow 0.4s;
  border-bottom: 1px solid transparent;
}

/* Iridescent shimmer layer — diagonal brass-to-cool-blue tint */
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    108deg,
    transparent 20%,
    rgba(200, 169, 110, 0.08) 45%,
    rgba(160, 190, 255, 0.05) 65%,
    transparent 82%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s;
  z-index: 0;
}

.site-header.scrolled {
  /* Gradient: light catches the top of the glass, dark underneath */
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.09) 0%,
    rgba(13, 13, 15, 0.5) 100%
  );
  backdrop-filter: blur(28px) saturate(200%) brightness(1.05);
  -webkit-backdrop-filter: blur(28px) saturate(200%) brightness(1.05);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow:
    /* Specular highlight — top edge where light hits the glass */
    inset 0 1.5px 0 rgba(255, 255, 255, 0.28),
    /* Side-edge refractions */
    inset 1px 0 0 rgba(255, 255, 255, 0.05),
    inset -1px 0 0 rgba(255, 255, 255, 0.05),
    /* Depth shadow beneath — makes the bar float */
    0 8px 40px -4px rgba(0, 0, 0, 0.55),
    0 2px 10px rgba(0, 0, 0, 0.25);
}

.site-header.scrolled::before {
  opacity: 1;
}

.nav {
  position: relative;   /* sits above ::before shimmer layer */
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.08em;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

/* Hamburger toggle — hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--text-muted);
  transition: background 0.2s;
}

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

/* ── HERO ───────────────────────────────────────────────────── */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 80px;
  position: relative;
}

/* subtle grid background */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.22;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 30%, transparent 100%);
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
  max-width: 700px;
  padding-block: var(--section-py);
}

.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-headline {
  font-family: var(--font-serif);
  font-size: clamp(3.5rem, 8.5vw, 7rem);
  font-weight: 300;
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: var(--text);
}

.hero-headline em {
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 480px;
  line-height: 1.75;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.scroll-line {
  display: block;
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--text-faint));
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50%       { opacity: 1;   transform: scaleY(1.1); }
}

/* ── ABOUT ──────────────────────────────────────────────────── */
.about {
  padding-block: var(--section-py);
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.traits-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.trait-card {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.065) 0%,
    rgba(20, 20, 26, 0.72)    100%
  );
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.13),
    0 4px 24px -4px rgba(0, 0, 0, 0.45),
    0 1px 4px rgba(0, 0, 0, 0.2);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s,
              opacity 0.6s var(--ease-out);
}

.trait-card:hover {
  border-color: rgba(200, 169, 110, 0.38);
  transform: translateY(-3px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 16px 48px -8px rgba(0, 0, 0, 0.6),
    0 4px 12px rgba(0, 0, 0, 0.25),
    0 0 24px -6px rgba(200, 169, 110, 0.12);
}

/* override: hover transform should still work after visible class applied */
.trait-card.visible:hover {
  transform: translateY(-3px);
}

.trait-icon {
  font-size: 1.4rem;
  display: block;
  margin-bottom: 0.75rem;
}

.trait-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.trait-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ── WORK / SKILLS ──────────────────────────────────────────── */
.work {
  padding-block: var(--section-py);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.skill-group {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.065) 0%,
    rgba(20, 20, 26, 0.72)    100%
  );
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 2rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.13),
    0 4px 24px -4px rgba(0, 0, 0, 0.45),
    0 1px 4px rgba(0, 0, 0, 0.2);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s,
              opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.skill-group:hover {
  border-color: rgba(200, 169, 110, 0.38);
  transform: translateY(-3px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 16px 48px -8px rgba(0, 0, 0, 0.6),
    0 4px 12px rgba(0, 0, 0, 0.25),
    0 0 24px -6px rgba(200, 169, 110, 0.12);
}

.skill-group h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 300;
  letter-spacing: 0.02em;
  color: var(--text);
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.skill-group ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.skill-group li {
  font-size: 0.875rem;
  color: var(--text-muted);
  padding-left: 1rem;
  position: relative;
}

.skill-group li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

/* ── CERT BADGE ─────────────────────────────────────────────── */
.cert-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-faint);
  letter-spacing: 0.02em;
}

.cert-icon {
  flex-shrink: 0;
  width: 13px;
  height: 13px;
  color: var(--accent);
  opacity: 0.85;
}

/* ── WRITING ────────────────────────────────────────────────── */
.writing {
  padding-block: var(--section-py);
  border-top: 1px solid var(--border);
}

.coming-soon-card {
  margin-top: 2.5rem;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.065) 0%,
    rgba(20, 20, 26, 0.72)    100%
  );
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.13),
    0 4px 24px -4px rgba(0, 0, 0, 0.45);
}

.coming-soon-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.07) 0%,
    rgba(255, 255, 255, 0.02) 100%
  );
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 0.3rem 0.65rem;
  width: fit-content;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.coming-soon-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ── CONTACT ────────────────────────────────────────────────── */
.contact {
  padding-block: var(--section-py);
  background: var(--bg-2);
  border-top: 1px solid var(--border);
}

.contact-inner {
  text-align: center;
  max-width: 560px;
  margin-inline: auto;
}

.contact-body {
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  font-size: 1.05rem;
}

/* ── FOOTER ─────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 2rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-logo {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-faint);
}

.footer-social {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.footer-social a {
  font-size: 0.8rem;
  color: var(--text-faint);
  text-decoration: none;
  transition: color 0.2s;
  letter-spacing: 0.02em;
}

.footer-social a:hover {
  color: var(--text-muted);
}

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  :root { --section-py: 4rem; }

  .nav-links {
    gap: 1.5rem;
  }

  .hero-inner {
    gap: 1.25rem;
  }

  .traits-list {
    grid-template-columns: 1fr;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── MOBILE NAV (hamburger) ─────────────────────────────────── */
@media (max-width: 480px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: fixed;
    inset: 64px 0 0 0;
    background: var(--bg);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    z-index: 99;
    border-top: 1px solid var(--border);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    font-size: 1.1rem;
    color: var(--text-muted);
  }

  .nav-links a:hover {
    color: var(--text);
  }
}

/* ── REDUCED MOTION ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration:        0.01ms !important;
    animation-iteration-count: 1      !important;
    transition-duration:       0.01ms !important;
  }

  /* Ensure fade-in elements are immediately visible */
  .trait-card,
  .skill-group,
  .about-text,
  .contact-inner,
  .coming-soon-card {
    opacity: 1;
    transform: none;
  }
}

/* ── SELECTION ──────────────────────────────────────────────── */
::selection {
  background: var(--accent-dim);
  color: var(--text);
}
