:root {
  --bg-canvas: #242424;
  --bg-surface: #333333;
  --bg-surface-elevated: #3e3e3e;
  --bg-glass: rgba(51, 51, 51, 0.88);
  --text-primary: #ffffff;
  --text-muted: #b8b8b8;
  --accent-primary: #a3e635;
  --accent-hover: #bef264;
  --border-subtle: #4a4a4a;
  --font-stack: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-elevation: 0 16px 36px -8px rgba(0, 0, 0, 0.65);
}

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

html {
  font-size: 16px;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-stack);
  scroll-behavior: smooth;
}

body {
  line-height: 1.7;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-wrap: anywhere;
  hyphens: auto;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-stack);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.15;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); margin-bottom: 1rem; }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.6rem); margin-bottom: 0.75rem; }

p {
  margin-bottom: 1.35rem;
  color: #dedede;
  font-size: 1.05rem;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover, a:focus-visible {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Header & Navigation */
header.site-header {
  position: relative;
  width: 100%;
  background: var(--bg-canvas);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.25rem 2rem;
  z-index: 100;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo-mark {
  width: 14px;
  height: 14px;
  background-color: var(--accent-primary);
  display: inline-block;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-decoration: none;
}

.brand-title span {
  color: var(--accent-primary);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.desktop-nav a {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

.mobile-menu-trigger {
  display: none;
  background: none;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 1.5rem;
  padding: 0.2rem 0.65rem;
  cursor: pointer;
  line-height: 1;
}

.mobile-nav-drawer {
  display: none;
  flex-direction: column;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 1rem 2rem;
}

.mobile-nav-drawer.open {
  display: flex;
}

.mobile-nav-drawer a {
  padding: 0.75rem 0;
  font-weight: 700;
  font-size: 1.1rem;
  border-bottom: 1px solid var(--border-subtle);
}

/* Layout Containers */
main {
  flex: 1 0 auto;
}

.reading-column {
  max-width: 72ch;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.content-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.section-block {
  padding: 5rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

/* Hero Elements */
.hero-wrapper {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: #171717;
  overflow: hidden;
  padding: 4rem 1.5rem;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.38;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(36, 36, 36, 0.45) 0%, rgba(36, 36, 36, 0.95) 90%, #242424 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 860px;
  margin: 0 auto;
}

.hero-tag {
  display: inline-block;
  background: var(--accent-primary);
  color: #242424;
  font-weight: 800;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.9rem;
  border-radius: 9999px;
  margin-bottom: 1.5rem;
}

.hero-lead {
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  color: #e5e5e5;
  margin-top: 1.25rem;
  margin-bottom: 2.25rem;
  font-weight: 400;
}

/* Buttons */
.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-primary);
  color: #242424 !important;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 0.9rem 2.2rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  text-decoration: none !important;
  transition: transform 0.2s var(--ease-kinetic), background-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-pill:hover, .btn-pill:focus-visible {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(163, 230, 53, 0.3);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  padding: 0.85rem 1.8rem;
  font-weight: 700;
  margin-left: 0.75rem;
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.btn-outline:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  text-decoration: none;
}

/* Structural Essay Enhancements */
.pull-quote {
  border-left: 4px solid var(--accent-primary);
  padding: 1.5rem 0 1.5rem 1.75rem;
  margin: 3rem 0;
  background: rgba(51, 51, 51, 0.4);
}

.pull-quote p {
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.pull-quote cite {
  font-size: 0.9rem;
  color: var(--accent-primary);
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.wide-figure {
  margin: 3.5rem 0;
  width: 100%;
}

.wide-figure img {
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: cover;
  display: block;
}

.wide-figure figcaption {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  padding-left: 0.25rem;
  border-left: 2px solid var(--accent-primary);
}

/* Project Glass Cards & Bento Framework */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin: 2.5rem 0;
}

.project-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 2.25rem;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.25s var(--ease-kinetic), border-color 0.25s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-primary);
}

.project-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
  width: fit-content;
}

.badge-completed { background: #1c3619; color: var(--accent-primary); border: 1px solid var(--accent-primary); }
.badge-construction { background: #3d3419; color: #facc15; border: 1px solid #facc15; }
.badge-proposed { background: #382528; color: #f87171; border: 1px solid #f87171; }

.status-panel {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  padding: 1.5rem;
  margin: 2rem 0;
}

/* Horizontally Scrollable Tables */
.table-scroll-wrapper {
  width: 100%;
  overflow-x: auto;
  margin: 2rem 0;
  border: 1px solid var(--border-subtle);
}

table.megaproject-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 650px;
}

table.megaproject-table th,
table.megaproject-table td {
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--border-subtle);
}

table.megaproject-table th {
  background: var(--bg-surface-elevated);
  color: var(--accent-primary);
  font-weight: 800;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

table.megaproject-table tr:hover td {
  background: rgba(163, 230, 53, 0.04);
}

/* Data Metric Callouts */
.metric-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2.5rem 0;
}

.metric-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 1.5rem;
}

.metric-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent-primary);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.metric-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

/* Contact Interactive Form */
.contact-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 2.5rem;
  max-width: 720px;
  margin: 2rem auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: #dedede;
}

.form-control {
  width: 100%;
  background: #242424;
  border: 1px solid var(--border-subtle);
  padding: 0.85rem 1rem;
  color: #ffffff;
  font-family: inherit;
  font-size: 1rem;
}

.form-control:focus {
  outline: 2px solid var(--accent-primary);
  border-color: transparent;
}

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

.button-stack {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.feedback-status {
  margin-top: 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-primary);
}

/* Footer Specifications */
footer.site-footer {
  background: #1a1a1a;
  border-top: 1px solid var(--border-subtle);
  padding: 4rem 1.5rem 2.5rem 1.5rem;
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border-subtle);
}

.footer-brand {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.85rem;
  display: inline-block;
  color: #fff;
}

.footer-legal-copy {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.footer-nav-col h4 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1.2rem;
  color: var(--accent-primary);
}

.footer-nav-col ul {
  list-style: none;
}

.footer-nav-col ul li {
  margin-bottom: 0.6rem;
}

.footer-nav-col ul li a {
  color: #dedede;
  font-size: 0.9rem;
}

.footer-bottom {
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: #8c8c8c;
}

/* Animations */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-kinetic), transform 0.7s var(--ease-kinetic);
}

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

/* Responsive Rules */
@media (max-width: 860px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }
  .mobile-menu-trigger {
    display: block;
  }
  header.site-header {
    padding: 1rem 1.25rem;
  }
  .section-block {
    padding: 3.5rem 1rem;
  }
  .content-container {
    padding: 2.5rem 1rem;
  }
  .bento-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
