/* ============================================================
   Design System — andrewkarnowski.com
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300;1,9..40,400&display=swap');

/* ── Variables ────────────────────────────────────────────── */
:root {
  --green-900: #0d2b1f;
  --green-800: #1b4332;
  --green-700: #2d6a4f;
  --green-600: #40916c;
  --green-400: #74c69d;
  --green-100: #d8f3dc;
  --green-50:  #f0faf4;

  --blue-900:  #0f2044;
  --blue-800:  #1a3a6b;
  --blue-700:  #2b4eae;
  --blue-500:  #4169e1;
  --blue-300:  #7fa3f4;
  --blue-100:  #dbe9ff;
  --blue-50:   #f0f5ff;

  --neutral-950: #0a0a0a;
  --neutral-900: #111827;
  --neutral-800: #1f2937;
  --neutral-700: #374151;
  --neutral-600: #4b5563;
  --neutral-500: #6b7280;
  --neutral-400: #9ca3af;
  --neutral-300: #d1d5db;
  --neutral-200: #e5e7eb;
  --neutral-100: #f3f4f6;
  --neutral-50:  #f9fafb;
  --white:       #ffffff;

  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, -apple-system, sans-serif;

  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  20px;

  --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md:  0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg:  0 12px 32px rgba(0,0,0,.10), 0 4px 8px rgba(0,0,0,.06);

  --max-w:      1160px;
  --nav-h:      68px;
  --transition: 200ms ease;
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--neutral-800);
  background: var(--white);
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--blue-700); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--blue-500); }

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4, h5 { font-family: var(--font-display); font-weight: 400; line-height: 1.2; color: var(--neutral-900); }
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.1rem; font-family: var(--font-body); font-weight: 600; letter-spacing: .02em; }
p  { color: var(--neutral-600); }
.lead { font-size: 1.15rem; color: var(--neutral-700); line-height: 1.75; }

.eyebrow {
  font-family: var(--font-body);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--green-700);
}

/* ── Layout ───────────────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; }
.section-sm { padding: 56px 0; }
.section-lg { padding: 120px 0; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center  { display: flex; justify-content: center; align-items: center; }
.gap-8  { gap: 8px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }

/* ── Navigation ───────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--neutral-200);
  z-index: 100;
  transition: box-shadow var(--transition);
}
.nav.scrolled { box-shadow: var(--shadow-sm); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--neutral-900);
  letter-spacing: .01em;
}
.nav-logo span { color: var(--green-700); }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-links a {
  font-size: .875rem;
  font-weight: 500;
  color: var(--neutral-600);
  padding: 6px 14px;
  border-radius: var(--radius-md);
  transition: all var(--transition);
}
.nav-links a:hover, .nav-links a.active {
  color: var(--neutral-900);
  background: var(--neutral-100);
}
.nav-links .nav-dropdown { position: relative; }
.nav-links .nav-dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition);
  list-style: none;
}
.dropdown-menu a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: .875rem;
}
.dropdown-menu a:hover { background: var(--neutral-50); color: var(--neutral-900); }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--neutral-700);
  margin: 4px 0;
  transition: all var(--transition);
  border-radius: 2px;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px;
  font-family: var(--font-body);
  font-size: .875rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--green-700);
  color: var(--white);
  border-color: var(--green-700);
}
.btn-primary:hover { background: var(--green-800); border-color: var(--green-800); color: var(--white); }
.btn-secondary {
  background: transparent;
  color: var(--green-700);
  border-color: var(--green-700);
}
.btn-secondary:hover { background: var(--green-50); }
.btn-ghost {
  background: transparent;
  color: var(--neutral-700);
  border-color: var(--neutral-300);
}
.btn-ghost:hover { background: var(--neutral-100); color: var(--neutral-900); }
.btn-blue {
  background: var(--blue-700);
  color: var(--white);
  border-color: var(--blue-700);
}
.btn-blue:hover { background: var(--blue-800); border-color: var(--blue-800); color: var(--white); }
.btn-sm { padding: 7px 14px; font-size: .8125rem; }
.btn-lg { padding: 14px 30px; font-size: 1rem; }

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-body { padding: 24px; }
.card-img { width: 100%; aspect-ratio: 3/2; object-fit: cover; }
.card-meta { font-size: .8125rem; color: var(--neutral-500); margin-bottom: 8px; }
.card-title { font-size: 1.1rem; font-family: var(--font-display); margin-bottom: 8px; color: var(--neutral-900); }
.card-text { font-size: .9rem; color: var(--neutral-600); line-height: 1.6; }

.card-accent { border-top: 3px solid var(--green-600); }
.card-accent-blue { border-top: 3px solid var(--blue-600); }

/* ── Badges ───────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  font-size: .75rem;
  font-weight: 500;
  border-radius: 99px;
  letter-spacing: .02em;
}
.badge-green  { background: var(--green-100); color: var(--green-800); }
.badge-blue   { background: var(--blue-100);  color: var(--blue-800);  }
.badge-gray   { background: var(--neutral-100); color: var(--neutral-700); }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  padding-top: calc(var(--nav-h) + 80px);
  padding-bottom: 96px;
  background: linear-gradient(160deg, var(--green-50) 0%, var(--white) 50%, var(--blue-50) 100%);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -200px; right: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(45,106,79,.06) 0%, transparent 70%);
  border-radius: 50%;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -200px; left: -100px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(43,78,174,.05) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-content { position: relative; z-index: 1; max-width: 700px; }
.hero h1 { margin-bottom: 20px; }
.hero h1 em { font-style: italic; color: var(--green-700); }
.hero .lead { margin-bottom: 36px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Section headers ──────────────────────────────────────── */
.section-header { margin-bottom: 48px; }
.section-header .eyebrow { margin-bottom: 10px; }
.section-header h2 { margin-bottom: 14px; }
.section-header p { font-size: 1.05rem; max-width: 580px; }
.section-header-center { text-align: center; }
.section-header-center p { margin: 0 auto; }

/* ── Divider ──────────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--neutral-200);
  margin: 0;
}

/* ── Page header (interior pages) ────────────────────────── */
.page-header {
  padding-top: calc(var(--nav-h) + 56px);
  padding-bottom: 56px;
  border-bottom: 1px solid var(--neutral-200);
  background: var(--neutral-50);
}
.page-header .eyebrow { margin-bottom: 12px; }
.page-header h1 { margin-bottom: 14px; }

/* ── Gallery grid ─────────────────────────────────────────── */
.gallery-grid {
  columns: 3;
  column-gap: 16px;
}
.gallery-item {
  break-inside: avoid;
  margin-bottom: 16px;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  position: relative;
}
.gallery-item img { width: 100%; display: block; transition: transform .4s ease; }
.gallery-item:hover img { transform: scale(1.03); }
.gallery-item .gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.6) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition);
  display: flex; align-items: flex-end; padding: 16px;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-caption { color: var(--white); font-size: .85rem; line-height: 1.4; }

/* ── Map ──────────────────────────────────────────────────── */
#travel-map { width: 100%; height: 520px; border-radius: var(--radius-xl); overflow: hidden; }
.leaflet-popup-content-wrapper {
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-lg) !important;
  padding: 4px !important;
}
.map-popup-title { font-family: var(--font-display); font-size: 1rem; margin-bottom: 4px; color: var(--neutral-900); }
.map-popup-desc  { font-size: .85rem; color: var(--neutral-600); margin-bottom: 10px; }

/* ── Adventure tabs ───────────────────────────────────────── */
.category-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 40px; }
.cat-tab {
  padding: 8px 18px;
  font-size: .875rem;
  font-weight: 500;
  border-radius: 99px;
  border: 1.5px solid var(--neutral-300);
  background: transparent;
  color: var(--neutral-600);
  cursor: pointer;
  transition: all var(--transition);
}
.cat-tab:hover { border-color: var(--green-600); color: var(--green-700); }
.cat-tab.active {
  background: var(--green-700);
  border-color: var(--green-700);
  color: var(--white);
}

/* ── Timeline ─────────────────────────────────────────────── */
.timeline { position: relative; padding-left: 32px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 8px; top: 8px; bottom: 0;
  width: 1px;
  background: var(--neutral-200);
}
.timeline-item { position: relative; margin-bottom: 40px; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -28px; top: 6px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--green-600);
  border: 2px solid var(--white);
  box-shadow: 0 0 0 2px var(--green-600);
}
.timeline-date { font-size: .8rem; color: var(--neutral-500); font-weight: 500; margin-bottom: 4px; }
.timeline-title { font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 4px; color: var(--neutral-900); }
.timeline-org { font-size: .875rem; font-weight: 500; color: var(--green-700); margin-bottom: 8px; }
.timeline-desc { font-size: .9rem; color: var(--neutral-600); }

/* ── Resume ───────────────────────────────────────────────── */
.resume-section-label {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--neutral-500);
  margin-bottom: 24px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--neutral-200);
}
.skills-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-chip {
  padding: 5px 14px;
  background: var(--neutral-100);
  border-radius: 99px;
  font-size: .85rem;
  color: var(--neutral-700);
  font-weight: 500;
}

/* ── Forms ────────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: .875rem;
  font-weight: 500;
  color: var(--neutral-700);
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: .95rem;
  border: 1.5px solid var(--neutral-300);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--neutral-900);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--green-600);
  box-shadow: 0 0 0 3px rgba(64,145,108,.12);
}
.form-control::placeholder { color: var(--neutral-400); }
textarea.form-control { resize: vertical; min-height: 120px; }

/* ── Alerts ───────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: .9rem;
  margin-bottom: 20px;
}
.alert-success { background: var(--green-50); color: var(--green-800); border: 1px solid var(--green-100); }
.alert-error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info    { background: var(--blue-50); color: var(--blue-800); border: 1px solid var(--blue-100); }

/* ── Lightbox ─────────────────────────────────────────────── */
.lightbox-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.lightbox-overlay.open { display: flex; }
.lightbox-inner { position: relative; max-width: 90vw; max-height: 90vh; }
.lightbox-inner img { max-width: 90vw; max-height: 85vh; object-fit: contain; border-radius: var(--radius-md); }
.lightbox-close {
  position: absolute; top: -40px; right: 0;
  color: var(--white); font-size: 1.5rem;
  background: none; border: none; cursor: pointer; padding: 4px 8px;
}
.lightbox-caption {
  text-align: center; color: rgba(255,255,255,.7);
  font-size: .875rem; margin-top: 12px;
}

/* ── Footer ───────────────────────────────────────────────── */
.footer {
  background: var(--neutral-900);
  color: var(--neutral-400);
  padding: 56px 0 36px;
  margin-top: auto;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-brand { max-width: 280px; }
.footer-logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--white);
  margin-bottom: 12px;
}
.footer-logo span { color: var(--green-400); }
.footer-tagline { font-size: .9rem; color: var(--neutral-500); line-height: 1.6; }
.footer-heading { font-family: var(--font-body); font-size: .75rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--neutral-500); margin-bottom: 16px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: .9rem; color: var(--neutral-400); transition: color var(--transition); }
.footer-links a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid var(--neutral-800); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; }
.footer-bottom p { font-size: .8125rem; }
.footer-admin-link { font-size: .8125rem; color: var(--neutral-600); transition: color var(--transition); }
.footer-admin-link:hover { color: var(--neutral-400); }

/* ── Utility ──────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-green  { color: var(--green-700); }
.text-blue   { color: var(--blue-700); }
.text-muted  { color: var(--neutral-500); }
.mt-auto { margin-top: auto; }
.mb-0 { margin-bottom: 0; }
.w-full { width: 100%; }
.hidden { display: none; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; max-width: 100%; }
  .gallery-grid { columns: 2; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .gallery-grid { columns: 1; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-h); left: 0; right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--neutral-200);
    padding: 16px 24px;
    box-shadow: var(--shadow-md);
    gap: 4px;
  }
  .nav-toggle { display: block; }
  .dropdown-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; background: var(--neutral-50); }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .section { padding: 64px 0; }
  .hero { padding-top: calc(var(--nav-h) + 48px); padding-bottom: 64px; }
}
