/* ============================================================
   gabemunro.com — styles.css
   Fonts: Syne (display/headings) + DM Sans (body)
   ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:           #0d0d0d;
  --bg2:          #141414;
  --text:         #f0ede8;
  --muted:        #888880;
  --accent:       #c8b89a;
  --border:       rgba(240, 237, 232, 0.08);
  --border-hover: rgba(240, 237, 232, 0.18);
  --nav-bg:       rgba(13, 13, 13, 0.92);
  --panel-bg:     linear-gradient(180deg, rgba(20, 20, 20, 0.98), rgba(13, 13, 13, 0.98));
  --overlay:      rgba(13, 13, 13, 0.82);
  --shadow-lg:    0 24px 80px rgba(0, 0, 0, 0.4);
  --display:      'Cabinet Grotesk', system-ui, sans-serif;
  --sans:         'DM Sans', system-ui, sans-serif;
}

html[data-theme="light"] {
  --bg:           #f6f1e8;
  --bg2:          #fffaf2;
  --text:         #171411;
  --muted:        #6d6257;
  --accent:       #9a7543;
  --border:       rgba(23, 20, 17, 0.08);
  --border-hover: rgba(23, 20, 17, 0.18);
  --nav-bg:       rgba(246, 241, 232, 0.92);
  --panel-bg:     linear-gradient(180deg, rgba(255, 250, 242, 0.98), rgba(246, 241, 232, 0.98));
  --overlay:      rgba(246, 241, 232, 0.76);
  --shadow-lg:    0 24px 80px rgba(23, 20, 17, 0.14);
}

html { scroll-behavior: smooth; }

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  padding: 0.7rem 1rem;
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  font-family: var(--display);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: translateY(-180%);
  transition: transform 0.2s ease;
  z-index: 500;
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── NAV ── */

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.15rem 3rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
}

.nav-logo {
  font-family: var(--display);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s;
}

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

.nav-meta {
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.03em;
  font-family: var(--sans);
  min-width: 104px;
  text-align: right;
}

.nav-utilities {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  position: relative;
}

.theme-switcher {
  position: relative;
}

.theme-toggle {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: transparent;
  font: inherit;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, opacity 0.2s;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  color: var(--text);
}

.theme-toggle .theme-icon {
  transform: translateY(1px);
}

.theme-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.theme-icon svg {
  width: 15px;
  height: 15px;
  display: block;
}

.theme-menu {
  position: absolute;
  top: calc(100% + 0.9rem);
  right: 0;
  width: 236px;
  display: none;
  padding: 1.1rem;
  border: 1px solid var(--border-hover);
  background: var(--panel-bg);
  box-shadow: var(--shadow-lg);
  z-index: 220;
}

.theme-menu.is-visible {
  display: block;
}

.theme-menu-label {
  margin-bottom: 0.9rem;
  color: var(--accent);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.theme-menu-button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
  font-family: var(--display);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.theme-menu-button:hover,
.theme-menu-button.is-active {
  color: var(--text);
  border-color: var(--border);
  background: var(--bg2);
}

.theme-menu-glyph {
  width: 18px;
  flex: 0 0 18px;
}

/* ── BUTTONS ── */

.btn-primary {
  background: var(--text);
  color: var(--bg);
  padding: 0.75rem 1.75rem;
  border-radius: 2px;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: opacity 0.2s;
  display: inline-block;
  font-family: var(--display);
  border: none;
  cursor: pointer;
}

.btn-primary:hover { opacity: 0.85; }

.btn-secondary {
  border: 1px solid var(--border-hover);
  color: var(--text);
  padding: 0.75rem 1.75rem;
  border-radius: 2px;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: border-color 0.2s;
  display: inline-block;
  font-family: var(--display);
  background: transparent;
  cursor: pointer;
}

.btn-secondary:hover { border-color: var(--text); }

/* ── DIVIDER ── */

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0 3rem;
}

/* ── HERO ── */

.hero {
  padding: 7rem 3rem 5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.hero-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2rem;
  font-weight: 400;
  font-family: var(--sans);
}

.hero-headline {
  font-family: var(--display);
  font-size: clamp(2.8rem, 5vw, 4.6rem);
  line-height: 1.05;
  font-weight: 800;
  color: var(--text);
  max-width: 860px;
  margin-bottom: 2.5rem;
  letter-spacing: -0.02em;
}

.accent-word { color: var(--accent); }

.hero-sub {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 540px;
  line-height: 1.75;
  margin-bottom: 3rem;
  font-weight: 300;
}

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

/* ── STATS BAR ── */

.stats-bar {
  display: flex;
  padding: 0 3rem;
  max-width: 1100px;
  margin: 0 auto;
}

.stat {
  flex: 1;
  padding: 2.5rem 2.5rem 2.5rem 0;
  border-right: 1px solid var(--border);
  margin-right: 2.5rem;
}

.stat:last-child {
  border-right: none;
  margin-right: 0;
}

.stat-number {
  font-family: var(--display);
  font-size: 2.6rem;
  color: var(--text);
  line-height: 1;
  margin-bottom: 0.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--sans);
}

/* ── SECTIONS ── */

section {
  padding: 5rem 3rem;
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--sans);
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
  max-width: 80px;
}

/* ── ABOUT ── */

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

.about-text p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
  font-weight: 300;
}

.about-text p strong {
  color: var(--text);
  font-weight: 500;
}

.about-details {
  border-top: 1px solid var(--border);
  padding-top: 2rem;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  gap: 1rem;
}

.detail-label { color: var(--muted); white-space: nowrap; }
.detail-value { color: var(--text); font-weight: 400; text-align: right; }

/* ── PROJECTS ── */

.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.project-card {
  background: var(--bg);
  padding: 2.25rem;
  transition: background 0.2s;
}

.project-card:hover { background: var(--bg2); }

.project-tag {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  font-weight: 500;
  font-family: var(--display);
}

.project-title {
  font-family: var(--display);
  font-size: 1.5rem;
  color: var(--text);
  margin-bottom: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.project-desc {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 1.5rem;
  font-weight: 300;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.stack-tag {
  font-size: 0.65rem;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 0.2rem 0.6rem;
  border-radius: 1px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: var(--sans);
}

.project-meta {
  font-size: 0.78rem;
  color: var(--accent);
  margin-top: 1.25rem;
  font-weight: 300;
  font-family: var(--sans);
}

/* ── CAPABILITIES ── */

.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border);
}

.capability {
  padding: 2rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.capability:nth-child(3n) { border-right: none; }
.capability:nth-child(n+4) { border-bottom: none; }

.capability-num {
  font-family: var(--display);
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.capability-title {
  font-family: var(--display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.capability-desc {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.65;
  font-weight: 300;
}

/* ── CONTACT CTA (homepage) ── */

.contact-section {
  border-top: 1px solid var(--border);
  padding: 6rem 3rem;
  text-align: center;
  max-width: 1100px;
  margin: 0 auto;
}

.contact-headline {
  font-family: var(--display);
  font-size: clamp(2.2rem, 4vw, 3.8rem);
  color: var(--text);
  font-weight: 800;
  margin-bottom: 1.25rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.contact-sub {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 2.5rem;
  font-weight: 300;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.contact-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── CONTACT PAGE ── */

.contact-page {
  padding: 7rem 3rem 5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.contact-page-inner {
  max-width: 600px;
}

.contact-page-headline {
  font-family: var(--display);
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  font-weight: 800;
  color: var(--text);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  margin-top: 1.5rem;
}

.contact-page-sub {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.75;
  margin-bottom: 3rem;
  max-width: 500px;
}

.contact-form {
  display: grid;
  gap: 1.5rem;
}

.form-row {
  display: grid;
  gap: 0.5rem;
}

.form-row label {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: var(--display);
  font-weight: 500;
}

.form-row input,
.form-row textarea {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 300;
  padding: 0.85rem 1rem;
  border-radius: 2px;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
  -webkit-appearance: none;
}

.form-row input::placeholder,
.form-row textarea::placeholder {
  color: var(--muted);
  opacity: 0.6;
}

.form-row input:focus,
.form-row textarea:focus {
  border-color: var(--border-hover);
}

.form-row textarea {
  resize: vertical;
  min-height: 140px;
}

.contact-form .btn-primary {
  justify-self: start;
  margin-top: 0.5rem;
}

/* ── MODAL ── */

.modal-open {
  overflow: hidden;
}

.modal-open nav,
.modal-open main,
.modal-open footer {
  filter: blur(2px);
}

.site-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 250;
}

.site-modal.is-visible {
  display: flex;
}

.site-modal-backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.site-modal-panel {
  position: relative;
  width: min(100%, 560px);
  padding: 2.5rem;
  border: 1px solid var(--border-hover);
  background: var(--panel-bg);
  box-shadow: var(--shadow-lg);
}

.site-modal-eyebrow {
  margin-bottom: 0.9rem;
  color: var(--accent);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.site-modal-title {
  margin-bottom: 0.9rem;
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.site-modal-copy {
  max-width: 32rem;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.75;
}

.site-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

/* ── FOOTER ── */

footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

footer p {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: var(--sans);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-size: 0.72rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s;
}

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

/* ── RESPONSIVE ── */

@media (max-width: 768px) {
  nav {
    padding: 1rem 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
  }

  .nav-links { gap: 1.25rem; }
  .nav-meta { display: none; }
  .nav-utilities {
    margin-left: auto;
  }

  .hero,
  section,
  .contact-page,
  .contact-section {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .hero { padding-top: 4rem; padding-bottom: 3rem; }

  .divider { margin: 0 1.5rem; }

  .stats-bar {
    padding: 0 1.5rem;
    flex-wrap: wrap;
    gap: 0;
  }

  .stat {
    flex: 0 0 50%;
    margin-right: 0;
    padding-right: 1.5rem;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .stat:nth-child(odd) { border-right: 1px solid var(--border); }
  .stat:nth-child(3),
  .stat:nth-child(4) { border-bottom: none; }

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

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

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

  .capability {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .capability:last-child { border-bottom: none; }

  footer {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
    padding: 1.5rem;
  }

  .site-modal-panel {
    padding: 2rem 1.25rem;
  }

  .site-modal-actions {
    flex-direction: column;
  }

  .theme-menu {
    right: 0;
    width: min(220px, calc(100vw - 3rem));
  }
}
