/* =====================================================
   DESIGN TOKENS
   ===================================================== */
:root {
  --teal: #2a7c6f;
  --teal-light: #eef7f5;
  --teal-muted: #5da398;
  --background: #f8f8f5;
  --card: #ffffff;
  --foreground: #171717;
  --body: #454545;
  --border: #e0e0e0;
  --muted: #eff1f3;
  --muted-foreground: #6b6b6b;
  --primary-fg: #f9fafb;
  --radius: 0.5rem;
}

/* =====================================================
   RESET & BASE
   ===================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-color: var(--border);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Georgia', 'Times New Roman', serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Georgia', 'Times New Roman', serif;
}

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

ul {
  list-style: none;
}

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

/* =====================================================
   LAYOUT UTILITIES
   ===================================================== */
.container {
  max-width: 72rem;
  /* 6xl */
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-pad {
  padding: 6rem 0;
}

/* py-24 */
.section-pad-sm {
  padding: 5rem 0;
}

/* py-20 */

/* =====================================================
   NAVBAR
   ===================================================== */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--card);
  transition: border-bottom 0.3s, box-shadow 0.3s;
}

#navbar.scrolled {
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

#navbar nav {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  color: var(--foreground);
  transition: color 0.2s;
}

.nav-logo:hover {
  color: var(--teal);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.875rem;
  color: var(--body);
  position: relative;
  transition: color 0.2s;
}

.nav-links a:not(.nav-resume-btn)::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--teal);
  transition: width 0.2s;
}

.nav-links a:not(.nav-resume-btn):hover {
  color: var(--teal);
}

.nav-links a:not(.nav-resume-btn):hover::after {
  width: 100%;
}

.nav-resume-btn {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--teal);
  border: 1px solid var(--teal);
  border-radius: var(--radius);
  padding: 0.375rem 0.75rem;
  transition: background 0.2s, color 0.2s;
}

.nav-resume-btn:hover {
  background: var(--teal);
  color: #ffffff !important;
}

.nav-resume-btn svg {
  width: 0.875rem;
  height: 0.875rem;
  flex-shrink: 0;
}

/* Hamburger */
#hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--foreground);
  padding: 0.5rem;
}

#hamburger svg {
  width: 1.25rem;
  height: 1.25rem;
}

#mobile-menu {
  display: none;
  flex-direction: column;
  gap: 1rem;
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 1rem 1.5rem;
}

#mobile-menu.open {
  display: flex;
}

#mobile-menu a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--body);
  transition: color 0.2s;
}

#mobile-menu a:hover {
  color: var(--teal);
}

/* =====================================================
   HERO
   ===================================================== */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 4rem;
  /* offset for fixed nav */
  background: var(--background);
}

#hero .inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 6rem 1.5rem;
}

.hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1.5rem;
}

.hero-h1 {
  font-size: clamp(2.25rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--foreground);
  max-width: 56rem;
  margin-bottom: 1.5rem;
}

.hero-sub {
  font-size: 1.125rem;
  color: var(--body);
  max-width: 40rem;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 5rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--teal);
  color: var(--primary-fg);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  transition: opacity 0.2s;
  cursor: pointer;
  border: none;
}

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

.btn-primary svg {
  width: 1rem;
  height: 1rem;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border);
  color: var(--foreground);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  transition: border-color 0.2s, color 0.2s;
  cursor: pointer;
  background: none;
}

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

.btn-secondary svg {
  width: 1rem;
  height: 1rem;
}

.metrics-row {
  border-top: 1px solid var(--border);
  padding-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 28rem;
}

.metric-item {}

.metric-value {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--teal);
}

.metric-label {
  font-size: 0.7rem;
  color: var(--muted-foreground);
  margin-top: 0.25rem;
  line-height: 1.35;
}

/* =====================================================
   CREDIBILITY STRIP
   ===================================================== */
#credibility {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--card);
  padding: 2rem 0;
}

.credibility-grid {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.cred-block {}

.cred-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted-foreground);
  margin-bottom: 0.5rem;
}

.cred-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--foreground);
}

.cred-sub {
  font-size: 0.7rem;
  color: var(--body);
}

.tag-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.tag-teal {
  font-size: 0.7rem;
  background: var(--teal-light);
  color: var(--teal);
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-weight: 500;
}

.tag-muted {
  font-size: 0.7rem;
  background: var(--muted);
  color: var(--foreground);
  border: 1px solid var(--border);
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
}

.tag-company {
  font-size: 0.7rem;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.375rem 0.75rem;
  color: var(--foreground);
  font-weight: 500;
}

/* =====================================================
   IMPACT SECTION (Selected Work)
   ===================================================== */
#work {
  padding: 6rem 0;
  background: var(--background);
}

.section-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--teal);
  margin-bottom: 0.5rem;
}

.section-h2 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  color: var(--foreground);
}

.section-desc {
  color: var(--body);
  margin-top: 0.75rem;
  max-width: 36rem;
}

.section-header {
  margin-bottom: 3rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.impact-card {
  text-align: left;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
  width: 100%;
  font-family: 'Georgia', 'Times New Roman', serif;
}

.impact-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.card-index {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--teal-muted);
  margin-bottom: 1rem;
}

.card-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted-foreground);
}

.card-problem-text {
  font-size: 0.8125rem;
  color: var(--foreground);
  margin-top: 0.25rem;
  line-height: 1.6;
}

.card-action-text {
  font-size: 0.8125rem;
  color: var(--body);
  margin-top: 0.25rem;
  line-height: 1.6;
}

.card-problem {
  margin-bottom: 0.75rem;
}

.card-action {
  margin-bottom: 1rem;
}

.card-metric-row {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.card-metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--teal);
}

.card-metric-label {
  font-size: 0.65rem;
  color: var(--muted-foreground);
  margin-top: 0.125rem;
}

.card-arrow {
  opacity: 0;
  transform: translateX(0);
  transition: opacity 0.2s, transform 0.2s;
  color: var(--teal);
}

.impact-card:hover .card-arrow {
  opacity: 1;
  transform: translateX(4px);
}

.card-arrow svg {
  width: 1rem;
  height: 1rem;
}

/* =====================================================
   CASE STUDIES
   ===================================================== */
#case-studies {}

.case-study {
  padding: 5rem 0;
  border-top: 1px solid var(--border);
}

.cs-header {
  margin-bottom: 3rem;
}

.cs-eyebrow {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--teal);
  margin-bottom: 0.5rem;
}

.cs-title {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 1rem;
}

.cs-summary {
  font-size: 1.0625rem;
  color: var(--body);
  max-width: 40rem;
  line-height: 1.7;
}

.cs-body {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
}

.cs-main {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.cs-section h3 {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted-foreground);
  margin-bottom: 0.75rem;
}

.cs-section p {
  color: var(--foreground);
  line-height: 1.7;
}

.cs-constraints {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cs-constraints li {
  display: flex;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--body);
  line-height: 1.6;
}

.cs-constraints li::before {
  content: '—';
  color: var(--teal);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.05em;
}

.cs-differently p {
  color: var(--body);
  font-style: italic;
  border-left: 2px solid var(--border);
  padding-left: 1rem;
  line-height: 1.7;
}

/* Arch Diagram Placeholder */
.arch-placeholder {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  color: var(--muted-foreground);
  font-size: 0.8125rem;
}

.arch-placeholder-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

/* Sidebar */
.cs-sidebar {}

.cs-sidebar-sticky {
  position: sticky;
  top: 6rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.impact-box {
  background: var(--teal-light);
  border: 1px solid rgba(42, 124, 111, 0.2);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.impact-box h3 {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--teal);
  margin-bottom: 1rem;
}

.impact-metrics {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.impact-metric-value {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--teal);
  line-height: 1;
}

.impact-metric-label {
  font-size: 0.7rem;
  color: var(--body);
  margin-top: 0.125rem;
  line-height: 1.35;
}

.impact-context {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.impact-context h3 {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted-foreground);
  margin-bottom: 0.75rem;
}

.impact-context p {
  font-size: 0.8125rem;
  color: var(--body);
  line-height: 1.6;
}

/* =====================================================
   THINKING SECTION
   ===================================================== */
#thinking {
  padding: 6rem 0;
  background: var(--card);
  border-top: 1px solid var(--border);
}

.thinking-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.thinking-card {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.thinking-card.span-2 {
  grid-column: span 2;
}

.thinking-card-inner {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.thinking-index {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--teal);
  flex-shrink: 0;
  margin-top: 0.1em;
}

.thinking-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

.thinking-card p {
  font-size: 0.8125rem;
  color: var(--body);
  line-height: 1.7;
}

/* =====================================================
   RESUME SECTION
   ===================================================== */
#resume {
  padding: 6rem 0;
  background: var(--background);
  border-top: 1px solid var(--border);
}

.resume-desc {
  color: var(--body);
  line-height: 1.7;
  max-width: 40rem;
  margin-top: 1rem;
  margin-bottom: 2.5rem;
}

.resume-iframe-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  height: 800px;
}

.resume-iframe-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* =====================================================
   CONTACT / FOOTER
   ===================================================== */
#contact {
  padding: 6rem 0;
  background: var(--card);
  border-top: 1px solid var(--border);
}

.contact-inner {
  max-width: 40rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.contact-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--teal-light);
  border: 1px solid rgba(42, 124, 111, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}

.contact-icon svg {
  width: 1rem;
  height: 1rem;
  color: var(--teal);
  transition: color 0.2s;
}

.contact-link:hover .contact-icon {
  background: var(--teal);
}

.contact-link:hover .contact-icon svg {
  color: var(--primary-fg);
}

.contact-link-label {
  font-size: 0.7rem;
  color: var(--muted-foreground);
}

.contact-link-value {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  transition: color 0.2s;
}

.contact-link:hover .contact-link-value {
  color: var(--teal);
}

.footer-note {
  margin-top: 5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  #hamburger {
    display: block;
  }

  .credibility-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

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

  .cs-body {
    grid-template-columns: 1fr;
  }

  .cs-sidebar-sticky {
    position: static;
  }

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

  .thinking-card.span-2 {
    grid-column: span 1;
  }

  .metrics-row {
    max-width: 100%;
  }

  .cta-group {
    flex-direction: column;
  }

  .cta-group a,
  .cta-group button {
    width: 100%;
    justify-content: center;
  }
}

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

  .metrics-row {
    grid-template-columns: 1fr 1fr 1fr;
  }
}