/* =========================================================
   Chandler Higgins — Portfolio
   ========================================================= */

:root {
  --bg: #06070a;
  --bg-elevated: #0d0f16;
  --bg-card: #12141d;
  --border: #1d212c;
  --border-soft: #191c26;

  --text-primary: #f4f6fb;
  --text-secondary: #a7adbd;
  --text-muted: #6b7182;

  --accent: #2f7dff;
  --accent-bright: #5b9bff;
  --accent-soft: rgba(47, 125, 255, 0.12);
  --accent-border: rgba(47, 125, 255, 0.35);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --shadow-md: 0 16px 40px -20px rgba(0, 0, 0, 0.65);
  --shadow-lg: 0 30px 60px -25px rgba(0, 0, 0, 0.75);

  --container: 1100px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

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

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 2000;
  transition: top 0.2s ease;
}

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

:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 40px);
}

/* ---------------------------------------------------------
   Navbar
   --------------------------------------------------------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 40px);
  transition: background-color 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

.navbar.is-scrolled {
  background-color: rgba(6, 7, 10, 0.85);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border-soft);
}

.brand {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand .brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent-bright);
  font-size: 0.85rem;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  width: 42px;
  height: 42px;
  font-size: 1.1rem;
  cursor: pointer;
}

.nav-links {
  display: flex;
  gap: 4px;
}

.nav-links a {
  display: block;
  padding: 8px 16px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.nav-links a.active {
  color: var(--accent-bright);
}

@media (max-width: 780px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(280px, 80vw);
    flex-direction: column;
    background: var(--bg-elevated);
    border-left: 1px solid var(--border);
    padding: 90px 24px 24px;
    gap: 4px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }

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

  .nav-links a {
    padding: 14px 16px;
    font-size: 1rem;
  }
}

/* ---------------------------------------------------------
   Hero
   --------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 90px;
  background:
    radial-gradient(60% 55% at 82% 12%, rgba(47, 125, 255, 0.22), transparent 60%),
    radial-gradient(45% 40% at 8% 90%, rgba(47, 125, 255, 0.12), transparent 65%),
    var(--bg);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 30%, black 40%, transparent 100%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
  width: 100%;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent-bright);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 22px;
}

.hero-eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 0 3px rgba(91, 155, 255, 0.25);
}

.hero-title {
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.05;
  color: var(--text-primary);
}

.hero-title .accent {
  background: linear-gradient(90deg, var(--accent-bright), #8fc0ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  margin-top: 18px;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--text-secondary);
  max-width: 46ch;
}

.hero-actions {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

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

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 24px -10px rgba(47, 125, 255, 0.55);
}

.btn-primary:hover {
  background: var(--accent-bright);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-primary);
}

.btn-ghost:hover {
  border-color: var(--accent-border);
  color: var(--accent-bright);
}

.hero-social {
  margin-top: 34px;
  display: flex;
  gap: 12px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 1.1rem;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.social-link:hover {
  color: var(--accent-bright);
  border-color: var(--accent-border);
  transform: translateY(-2px);
}

.hero-photo-wrap {
  position: relative;
  justify-self: center;
}

.hero-photo-wrap::before {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: calc(var(--radius-lg) + 14px);
  background: linear-gradient(160deg, rgba(47, 125, 255, 0.5), transparent 60%);
  filter: blur(2px);
  z-index: 0;
}

.hero-photo {
  position: relative;
  width: clamp(220px, 26vw, 300px);
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  z-index: 1;
}

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: opacity 0.3s ease;
}

.scroll-cue i {
  animation: bob 1.8s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

@media (max-width: 860px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-photo-wrap {
    order: -1;
  }

  .hero-subtitle {
    max-width: none;
    margin-inline: auto;
  }

  .hero-actions,
  .hero-social {
    justify-content: center;
  }
}

/* ---------------------------------------------------------
   Sections (shared)
   --------------------------------------------------------- */

.section {
  padding: clamp(70px, 10vw, 120px) 0;
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto clamp(40px, 6vw, 64px);
}

.section-kicker {
  display: block;
  color: var(--accent-bright);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  color: var(--text-primary);
}

.section-subtitle {
  margin-top: 14px;
  color: var(--text-secondary);
  font-size: 1.02rem;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ---------------------------------------------------------
   About
   --------------------------------------------------------- */

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  align-items: stretch;
}

.about-copy {
  grid-column: span 3;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 40px);
  color: var(--text-secondary);
  font-size: 1.08rem;
}

.about-copy strong {
  color: var(--text-primary);
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-bright);
}

.stat-card .stat-label {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

@media (max-width: 780px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-copy {
    grid-column: span 1;
  }
}

/* ---------------------------------------------------------
   Skills
   --------------------------------------------------------- */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}

.skills-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 32px);
}

.skills-card h3 {
  font-size: 1.05rem;
  color: var(--text-primary);
  margin-bottom: 18px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.pill:hover {
  color: var(--accent-bright);
  border-color: var(--accent-border);
  transform: translateY(-2px);
}

/* ---------------------------------------------------------
   Projects
   --------------------------------------------------------- */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-border);
  box-shadow: var(--shadow-md);
}

.project-card h3 {
  font-size: 1.15rem;
  color: var(--text-primary);
}

.project-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  flex: 1;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.tag {
  padding: 5px 11px;
  border-radius: 6px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent-bright);
  font-size: 0.76rem;
  font-weight: 600;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  margin-top: 4px;
  color: var(--accent-bright);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease, gap 0.2s ease;
}

.project-link:hover {
  color: var(--text-primary);
  gap: 11px;
}

/* ---------------------------------------------------------
   Experience
   --------------------------------------------------------- */

.experience-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.experience-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 24px clamp(20px, 3vw, 30px);
}

.experience-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
}

.experience-role {
  font-size: 1.08rem;
  color: var(--text-primary);
}

.experience-meta {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.experience-company {
  margin-top: 4px;
  color: var(--accent-bright);
  font-size: 0.92rem;
  font-weight: 600;
}

.experience-company i {
  margin-right: 4px;
}

.experience-details {
  margin-top: 14px;
  padding-left: 20px;
  list-style: disc;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.experience-details li {
  margin-bottom: 8px;
  line-height: 1.55;
}

.experience-details li:last-child {
  margin-bottom: 0;
}

/* ---------------------------------------------------------
   Education
   --------------------------------------------------------- */

.timeline {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding-left: 28px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--border);
}

.timeline-entry {
  position: relative;
  padding-bottom: 34px;
}

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

.timeline-entry::before {
  content: "";
  position: absolute;
  left: -28px;
  top: 4px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent-bright);
}

.timeline-date {
  color: var(--accent-bright);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.timeline-content h3 {
  font-size: 1.08rem;
  color: var(--text-primary);
}

.timeline-content p {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ---------------------------------------------------------
   Contact
   --------------------------------------------------------- */

.contact-card {
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(32px, 5vw, 48px);
}

.contact-card p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.contact-email {
  display: inline-flex;
  margin-top: 22px;
}

.contact-social {
  margin-top: 26px;
  display: flex;
  justify-content: center;
  gap: 12px;
}

/* ---------------------------------------------------------
   Footer
   --------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-inner a:hover {
  color: var(--accent-bright);
}
