/* ========================================
   Trent Gundersen — Personal Site
   ======================================== */

:root {
  --color-bg: #0f172a;
  --color-bg-alt: #1e293b;
  --color-bg-card: #1e293b;
  --color-surface: #334155;
  --color-accent: #38bdf8;
  --color-accent-dim: rgba(56, 189, 248, 0.15);
  --color-text: #f1f5f9;
  --color-text-muted: #94a3b8;
  --color-text-dim: #64748b;
  --color-border: #334155;
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --max-width: 1200px;
  --nav-height: 72px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--color-accent); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.8; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ── Navigation ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
  z-index: 1000;
  transition: background 0.3s, box-shadow 0.3s;
}
.nav.scrolled {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--color-border);
}
.nav__logo {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
}
.nav__links { display: flex; gap: 2rem; }
.nav__links a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav__links a:hover { color: var(--color-text); opacity: 1; }
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: transform 0.3s, opacity 0.3s;
}
.nav__hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__hamburger.active span:nth-child(2) { opacity: 0; }
.nav__hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Sections (shared) ── */
section { padding: 6rem clamp(1.5rem, 4vw, 3rem); }
.section-inner { max-width: var(--max-width); margin: 0 auto; }
.section-label {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}
.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 1rem;
}
.section-subtitle {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin-bottom: 3rem;
}

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: var(--nav-height);
  position: relative;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.2;
  filter: saturate(0.4);
}
.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,23,42,0.4) 0%, var(--color-bg) 100%);
}
.hero__content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 2rem;
}
.hero__tagline {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 1.25rem;
}
.hero__name {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}
.hero__title {
  font-size: clamp(1rem, 2vw, 1.35rem);
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  font-weight: 400;
}
.hero__desc {
  font-size: 1.05rem;
  color: var(--color-text-dim);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}
.hero__ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  border: none;
}
.btn:hover { transform: translateY(-1px); opacity: 1; }
.btn--primary {
  background: var(--color-accent);
  color: var(--color-bg);
}
.btn--primary:hover { box-shadow: 0 4px 20px rgba(56,189,248,0.35); }
.btn--secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn--secondary:hover { border-color: var(--color-accent); color: var(--color-accent); }

/* ── About ── */
.about { background: var(--color-bg-alt); }
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: center;
}
.about__images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.about__images img {
  border-radius: 8px;
  aspect-ratio: 4/3;
  object-fit: cover;
  width: 100%;
}
.about__images img:first-child {
  grid-column: 1 / -1;
  aspect-ratio: 16/9;
}
.about__text p {
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
  font-size: 1rem;
  line-height: 1.75;
}
.about__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}
.stat__number {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-accent);
}
.stat__label {
  font-size: 0.85rem;
  color: var(--color-text-dim);
  margin-top: 0.25rem;
}

/* ── Expertise ── */
.expertise__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.expertise__card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 2rem;
  transition: transform 0.25s, border-color 0.25s;
}
.expertise__card:hover {
  transform: translateY(-4px);
  border-color: var(--color-accent);
}
.expertise__icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--color-accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.4rem;
}
.expertise__card h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.expertise__card p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ── Career Timeline ── */
.career { background: var(--color-bg-alt); }
.timeline {
  position: relative;
  padding-left: 2rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-border);
}
.timeline__item {
  position: relative;
  padding-bottom: 3rem;
}
.timeline__item:last-child { padding-bottom: 0; }
.timeline__dot {
  position: absolute;
  left: -2rem;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-bg-alt);
  border: 3px solid var(--color-accent);
  transform: translateX(-6px);
}
.timeline__item--current .timeline__dot {
  background: var(--color-accent);
  box-shadow: 0 0 12px rgba(56,189,248,0.5);
}
.timeline__date {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-accent);
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}
.timeline__role {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}
.timeline__company {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}
.timeline__desc {
  color: var(--color-text-dim);
  font-size: 0.9rem;
  line-height: 1.65;
  max-width: 600px;
}

/* ── Education ── */
.education__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.education__card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 2rem;
}
.education__degree {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.education__school {
  color: var(--color-accent);
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}
.education__date {
  color: var(--color-text-dim);
  font-size: 0.85rem;
}

/* ── Adventures ── */
.adventures { background: var(--color-bg-alt); }
.adventures__gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.adventures__item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 4/3;
}
.adventures__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.adventures__item:hover img { transform: scale(1.05); }
.adventures__caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1.5rem 1rem 1rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  font-size: 0.9rem;
  font-weight: 500;
}

/* ── Contact ── */
.contact__inner {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}
.contact__inner .section-subtitle { margin: 0 auto 2.5rem; }
.contact__links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}
.contact__link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text);
  font-size: 0.9rem;
  font-weight: 500;
  transition: border-color 0.2s, transform 0.2s;
}
.contact__link:hover {
  border-color: var(--color-accent);
  transform: translateY(-2px);
  opacity: 1;
}
.contact__link svg { flex-shrink: 0; }

/* ── Footer ── */
.footer {
  padding: 2rem clamp(1.5rem, 4vw, 3rem);
  text-align: center;
  color: var(--color-text-dim);
  font-size: 0.8rem;
  border-top: 1px solid var(--color-border);
}

/* ── Scroll Animations ── */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .nav__links {
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0; bottom: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    background: rgba(15,23,42,0.98);
    backdrop-filter: blur(12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
  }
  .nav__links.open {
    opacity: 1;
    pointer-events: all;
  }
  .nav__links a { font-size: 1.25rem; }
  .nav__hamburger { display: flex; }

  .about__grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .about__stats { grid-template-columns: repeat(3, 1fr); }
  .expertise__grid { grid-template-columns: 1fr; }
  .education__grid { grid-template-columns: 1fr; }
  .adventures__gallery { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  section { padding: 4rem 1.25rem; }
  .about__stats { grid-template-columns: 1fr; text-align: center; }
  .hero__ctas { flex-direction: column; align-items: center; }
}
