/* ==========================================================================
   Jacob Dolph Resume — theme styles
   Clean corporate/tech: navy bookends, light body sections, cyan accent.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Navy (dark surfaces) */
  --navy-950: #081120;
  --navy-900: #0b1f3a;
  --navy-800: #13294b;
  --navy-700: #1e3a5f;

  /* Slate (light sections) */
  --slate-900: #0f172a;
  --slate-700: #334155;
  --slate-500: #64748b;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50:  #f8fafc;
  --white:     #ffffff;

  /* Accent — cyan. 600 on light backgrounds, 400 on navy. */
  --accent-600: #0e7490;
  --accent-500: #0891b2;
  --accent-400: #22d3ee;

  /* Typography */
  --font-heading: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Geist', 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', Consolas, monospace;

  /* Spacing scale */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-8: 3rem;
  --sp-10: 4rem;
  --sp-12: 6rem;
  --sp-16: 7rem;

  /* Layout */
  --max-w: 1100px;
  --pad: clamp(1.25rem, 4vw, 2rem);

  /* Radius — one system: interactive elements (buttons, chips, tags) are
     full pills; containers (cards) are 16px; small accents 6px. */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-full: 999px;

  /* Shadows — soft, diffused, tinted to the slate hue. */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 6px 20px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 2px 4px rgba(15, 23, 42, 0.04), 0 14px 36px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 4px 8px rgba(15, 23, 42, 0.05), 0 24px 56px rgba(15, 23, 42, 0.12);

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur-fast: 180ms;
  --dur: 400ms;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px; /* keep anchored sections clear of the floating nav */
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--slate-700);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--slate-900);
  line-height: 1.2;
  margin: 0 0 var(--sp-4);
}

p {
  margin: 0 0 var(--sp-4);
}

ul {
  margin: 0;
  padding: 0;
}

a {
  color: var(--accent-600);
  text-decoration: none;
}

img, svg {
  vertical-align: middle;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

.skip-link {
  position: absolute;
  top: -48px;
  left: var(--sp-4);
  z-index: 200;
  padding: var(--sp-2) var(--sp-4);
  background: var(--accent-600);
  color: var(--white);
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  transition: top var(--dur-fast) var(--ease);
}

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

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.7rem 1.6rem;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--r-full);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn--primary {
  background: var(--accent-500);
  color: var(--navy-950);
}

.btn--primary:hover {
  background: var(--accent-400);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(8, 145, 178, 0.35);
}

.btn--ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.35);
}

.btn--ghost:hover {
  border-color: var(--accent-400);
  color: var(--accent-400);
  transform: translateY(-2px);
}

.btn--outline {
  background: transparent;
  color: var(--accent-400);
  border-color: var(--accent-400);
}

.btn--outline:hover {
  background: rgba(34, 211, 238, 0.12);
}

.btn--sm {
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
}

/* --------------------------------------------------------------------------
   Eyebrow labels
   -------------------------------------------------------------------------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-400);
  margin-bottom: var(--sp-3);
}

/* --------------------------------------------------------------------------
   Sticky nav
   -------------------------------------------------------------------------- */
/* Floating glass pill, detached from the viewport edge. */
.site-nav {
  position: fixed;
  top: 0.75rem;
  left: 0;
  right: 0;
  margin-inline: auto;
  width: min(calc(100% - 1.5rem), var(--max-w));
  z-index: 100;
  background: rgba(11, 31, 58, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--r-full);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
  transition: width var(--dur) var(--ease),
              box-shadow var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease);
}

.site-nav.is-scrolled {
  background: rgba(11, 31, 58, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06),
              0 12px 32px rgba(8, 17, 32, 0.45);
}

.site-nav-inner {
  padding: 0.65rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}

.site-nav-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  color: var(--white);
}

.site-nav-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--r-full);
  background: var(--navy-800);
  border: 1px solid var(--navy-700);
  color: var(--accent-400);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
}

.site-nav-brand-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.05rem;
}

.site-nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
}

.site-nav-links > a:not(.btn) {
  color: var(--slate-300);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--dur-fast) var(--ease);
}

.site-nav-links > a:not(.btn):hover {
  color: var(--accent-400);
}

/* Dock toggle — the compact "JD" button the pill collapses into on scroll.
   Hidden until the nav is docked (desktop only). */
.site-nav-dock-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--r-full);
  background: var(--navy-800);
  border: 1px solid var(--navy-700);
  color: var(--accent-400);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease);
}

.site-nav-dock-toggle:hover {
  border-color: var(--accent-400);
  color: var(--white);
}

@media (min-width: 721px) {
  .site-nav.is-docked {
    left: 0.75rem;
    margin-inline: 0;
    width: 56px;
  }

  .site-nav.is-docked .site-nav-inner {
    padding-inline: 0;
    justify-content: center;
  }

  .site-nav.is-docked .site-nav-brand,
  .site-nav.is-docked .site-nav-links {
    display: none;
  }

  .site-nav.is-docked .site-nav-dock-toggle {
    display: inline-flex;
  }
}

.site-nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--sp-2);
  background: none;
  border: none;
  cursor: pointer;
}

.site-nav-toggle-bar {
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: var(--r-full);
}

/* Mobile drawer */
.mobile-overlay {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(8, 17, 32, 0.6);
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease);
}

.mobile-overlay.is-open {
  opacity: 1;
}

.mobile-nav {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 120;
  width: min(320px, 85vw);
  padding: var(--sp-10) var(--sp-6) var(--sp-6);
  background: var(--navy-900);
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  transform: translateX(100%);
  transition: transform 250ms var(--ease);
}

.mobile-nav.is-open {
  transform: translateX(0);
}

/* Author display values would otherwise override the UA's [hidden] rule */
.mobile-nav[hidden],
.mobile-overlay[hidden] {
  display: none;
}

.mobile-nav > a:not(.btn) {
  color: var(--slate-300);
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 500;
}

.mobile-nav > a:not(.btn):hover {
  color: var(--accent-400);
}

.mobile-nav-close {
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-4);
  background: none;
  border: none;
  color: var(--slate-300);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--navy-950) 0%, var(--navy-900) 100%);
  padding: calc(72px + var(--sp-16)) 0 var(--sp-16);
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse 600px 400px at 78% 30%, rgba(34, 211, 238, 0.08), transparent 70%),
    repeating-linear-gradient(0deg, rgba(148, 163, 184, 0.05) 0, rgba(148, 163, 184, 0.05) 1px, transparent 1px, transparent 48px),
    repeating-linear-gradient(90deg, rgba(148, 163, 184, 0.05) 0, rgba(148, 163, 184, 0.05) 1px, transparent 1px, transparent 48px);
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.hero-title {
  color: var(--white);
  font-size: clamp(2.4rem, 5vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-4);
}

.hero-sub {
  max-width: 640px;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--slate-300);
  margin-bottom: var(--sp-6);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-4);
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section {
  padding: var(--sp-12) 0;
}

.section--white {
  background: var(--white);
}

.section--tint {
  background: var(--slate-100);
}

.section--compact {
  padding: var(--sp-8) 0;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: var(--sp-8);
}

.section-title--sm {
  font-size: clamp(1.3rem, 2.2vw, 1.6rem);
  margin-bottom: var(--sp-5);
}

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: var(--sp-8);
  align-items: start;
}

.about-text {
  font-size: 1.05rem;
  margin: 0;
}

.about-chips {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  list-style: none;
}

.about-chip {
  padding: var(--sp-3) var(--sp-4);
  background: var(--slate-50);
  border: 1px solid var(--slate-300);
  border-left: 3px solid var(--accent-500);
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--slate-900);
}

/* --------------------------------------------------------------------------
   Skills
   -------------------------------------------------------------------------- */
/* Flat groups instead of boxed cards: an accent top rule carries the
   hierarchy. Asymmetric 3 + 2 rhythm on desktop (5 groups, 6 tracks). */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--sp-8) var(--sp-6);
}

.skill-card {
  grid-column: span 2;
  padding-top: var(--sp-4);
  border-top: 2px solid var(--accent-500);
}

.skill-card:nth-child(4),
.skill-card:nth-child(5) {
  grid-column: span 3;
}

.skill-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: var(--sp-3);
}

.skill-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.skill-card li {
  position: relative;
  padding-left: var(--sp-4);
  font-size: 0.95rem;
}

.skill-card li::before {
  content: '\203A';
  position: absolute;
  left: 0;
  color: var(--accent-600);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Experience timeline
   -------------------------------------------------------------------------- */
.timeline {
  display: flex;
  flex-direction: column;
  gap: var(--sp-8);
}

.timeline-company-head {
  margin-bottom: var(--sp-5);
}

.timeline-company-name {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: var(--sp-1);
}

.timeline-company-meta {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--slate-500);
  margin: 0;
}

.timeline-role {
  position: relative;
  display: flex;
  gap: var(--sp-5);
  padding-left: var(--sp-2);
}

/* Connecting line between roles inside a company block */
.timeline-role:not(:last-child)::before {
  content: '';
  position: absolute;
  left: calc(var(--sp-2) + 6px);
  top: 20px;
  bottom: -6px;
  width: 2px;
  background: var(--slate-300);
}

.timeline-dot {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin-top: 6px;
  border-radius: var(--r-full);
  background: var(--accent-500);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--accent-500);
  position: relative;
  z-index: 1;
}

.timeline-role-body {
  padding-bottom: var(--sp-6);
}

.timeline-role:last-child .timeline-role-body {
  padding-bottom: 0;
}

.timeline-role-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: var(--sp-1);
}

.timeline-role-dates {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--slate-500);
  margin-bottom: var(--sp-3);
}

.timeline-role-body ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.timeline-role-body li {
  position: relative;
  padding-left: var(--sp-4);
  font-size: 0.97rem;
}

.timeline-role-body li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 6px;
  height: 6px;
  border-radius: var(--r-full);
  background: var(--slate-300);
}

/* --------------------------------------------------------------------------
   Projects
   -------------------------------------------------------------------------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-5);
}

.project-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease);
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.project-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: var(--sp-3);
}

.project-card p {
  font-size: 0.97rem;
  margin-bottom: var(--sp-4);
}

.project-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: auto;
}

.project-tags li {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--r-full);
  background: var(--slate-100);
  border: 1px solid var(--slate-300);
  color: var(--slate-700);
}

/* --------------------------------------------------------------------------
   Tools chip cloud
   -------------------------------------------------------------------------- */
.tool-cloud {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

.tool-chip {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--r-full);
  background: var(--slate-50);
  border: 1px solid var(--slate-300);
  color: var(--slate-700);
  transition: border-color var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease);
}

.tool-chip:hover {
  border-color: var(--accent-500);
  color: var(--accent-600);
}

/* --------------------------------------------------------------------------
   Education
   -------------------------------------------------------------------------- */
.edu-card {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  box-shadow: var(--shadow-sm);
}

.edu-icon {
  flex-shrink: 0;
  color: var(--accent-600);
}

.edu-degree {
  font-size: 1.1rem;
  margin-bottom: var(--sp-1);
}

.edu-meta {
  font-size: 0.92rem;
  color: var(--slate-500);
  margin: 0;
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
.contact {
  background: linear-gradient(180deg, var(--navy-900) 0%, var(--navy-950) 100%);
  padding: var(--sp-16) 0;
}

.contact-inner {
  text-align: center;
}

.contact-title {
  color: var(--white);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  margin-bottom: var(--sp-3);
}

.contact-sub {
  max-width: 480px;
  margin: 0 auto var(--sp-6);
  color: var(--slate-300);
}

.contact-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-4);
}

.contact-noscript {
  margin-top: var(--sp-5);
  font-family: var(--font-mono);
  color: var(--slate-300);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--navy-950);
  border-top: 1px solid var(--navy-800);
  padding: var(--sp-5) 0;
}

.site-footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-footer-copy {
  margin: 0;
  font-size: 0.88rem;
  color: var(--slate-500);
}

.site-footer-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.88rem;
  color: var(--slate-500);
  transition: color var(--dur-fast) var(--ease);
}

.site-footer-link:hover {
  color: var(--accent-400);
}

/* --------------------------------------------------------------------------
   Fallback page (index.php)
   -------------------------------------------------------------------------- */
.fallback-main {
  padding: calc(72px + var(--sp-12)) 0 var(--sp-12);
  text-align: center;
}

/* --------------------------------------------------------------------------
   Scroll reveal
   .reveal is only ever hidden when the user allows motion — a JS failure
   can never strand the page at opacity 0 for reduced-motion users, and the
   JS bails into "all visible" when IntersectionObserver is unavailable.
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  }

  .reveal.visible {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn,
  .project-card,
  .site-nav {
    transition: none;
  }

  .btn:hover,
  .btn:active,
  .project-card:hover {
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .skill-card,
  .skill-card:nth-child(4) {
    grid-column: auto;
  }

  .skill-card:nth-child(5) {
    grid-column: 1 / -1;
  }

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

  .about-chips {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

@media (max-width: 720px) {
  .site-nav-links {
    display: none;
  }

  .site-nav-toggle {
    display: flex;
  }

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

  .hero {
    padding-top: calc(64px + var(--sp-10));
    padding-bottom: var(--sp-10);
  }

  .section {
    padding: var(--sp-10) 0;
  }
}
