:root {
  /* Dynamic Palette (Strictly No Blue - Warm Ochre & Obsidian base) */
  --bg-canvas: #1e1612;
  --bg-surface: #2c211b;
  --bg-surface-translucent: rgba(44, 33, 27, 0.7);
  --bg-surface-hover: rgba(54, 43, 37, 0.9);
  --text-primary: #f5ecdf;
  --text-muted: #c4b5a3;
  --accent-primary: #f59e0b;
  --accent-secondary: #d97706;
  --border-subtle: rgba(245, 158, 11, 0.25);
  
  /* Advanced UI Micro-Interactions & Depth */
  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-elevation: 0 12px 32px -4px rgba(0, 0, 0, 0.6);
  --glow-accent: 0 0 24px -4px rgba(245, 158, 11, 0.4);
  --glass-backdrop: blur(16px) saturate(180%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  overflow-wrap: anywhere;
  hyphens: auto;
}

/* Typography */
h1, h2, h3, h4, h5, h6, .mono, label, .section-num {
  font-family: monospace;
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0;
}

h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.1;
  color: var(--accent-primary);
  margin-bottom: 1rem;
}

h2 {
  font-size: 2rem;
  color: var(--accent-primary);
  margin-bottom: 1.5rem;
}

p {
  margin-bottom: 1.5rem;
}

a {
  color: var(--accent-primary);
  text-decoration: underline;
  text-decoration-color: var(--border-subtle);
  transition: all 0.3s ease;
}

a:hover {
  text-decoration-color: var(--accent-primary);
}

/* Header & Nav */
.header-wrapper {
  position: relative;
  width: 100%;
  padding: 20px;
  z-index: 100;
}

header {
  max-width: 1200px;
  margin: 0 auto;
  background: var(--bg-surface-translucent);
  backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px; /* The one exception to 0px rule */
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  font-family: monospace;
  color: var(--accent-primary);
  font-size: 1.1rem;
  font-weight: bold;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.1em;
}

.brand::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  background: var(--accent-primary);
  border-radius: 0; 
}

nav {
  display: flex;
  gap: 1.5rem;
}

nav a {
  text-decoration: none;
  color: var(--text-primary);
  font-family: monospace;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

nav a:hover {
  color: var(--accent-primary);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  font-family: monospace;
}

/* Mobile Nav */
@media (max-width: 768px) {
  nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 80px;
    right: 20px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    padding: 1.5rem;
    gap: 1rem;
    border-radius: 0;
    box-shadow: var(--shadow-elevation);
  }
  nav.active {
    display: flex;
  }
  .menu-toggle {
    display: block;
  }
}

/* Timeline Layout */
.timeline-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.timeline-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 40px;
  width: 1px;
  background: var(--accent-primary);
  opacity: 0.3;
  z-index: -1;
}

@media (max-width: 768px) {
  .timeline-line {
    left: 30px;
  }
}

section {
  padding: 6rem 0 6rem 60px;
  position: relative;
}

@media (max-width: 768px) {
  section {
    padding-left: 40px;
  }
}

.section-num {
  display: block;
  font-size: 1.2rem;
  color: var(--accent-primary);
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.5rem;
  width: fit-content;
  padding-right: 2rem;
}

.section-num::before {
  content: "";
  position: absolute;
  left: -24px;
  top: 6.2rem;
  width: 9px;
  height: 9px;
  background: var(--bg-canvas);
  border: 1px solid var(--accent-primary);
  border-radius: 0;
}

@media (max-width: 768px) {
  .section-num::before {
    left: -14px;
  }
}

/* Background Patterns */
.pattern-bg {
  background-image: radial-gradient(var(--border-subtle) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: 0 0;
}

/* Hero Section */
.hero-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 992px) {
  .hero-layout {
    grid-template-columns: 1fr;
  }
}

.hero-images {
  position: relative;
  height: 500px;
  width: 100%;
}

.img-overlap {
  position: absolute;
  border: 1px solid var(--border-subtle);
  object-fit: cover;
  border-radius: 0 !important;
  box-shadow: var(--shadow-elevation);
  transition: transform 0.5s var(--ease-kinetic);
}

.img-overlap:hover {
  transform: scale(1.03) translateY(-10px);
  z-index: 10 !important;
  border-color: var(--accent-primary);
  box-shadow: var(--glow-accent);
}

.img-1 { top: 0; left: 0; width: 60%; height: 60%; z-index: 1; }
.img-2 { top: 15%; right: 0; width: 55%; height: 65%; z-index: 2; }
.img-3 { bottom: 0; left: 15%; width: 65%; height: 50%; z-index: 3; }

/* Cards & UI Elements */
.card {
  background: var(--bg-surface-translucent);
  backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--border-subtle);
  border-radius: 0 !important;
  padding: 2rem;
  transition: all 0.4s var(--ease-kinetic);
  position: relative;
}

.card:hover {
  transform: translateY(-5px) scale(1.015);
  box-shadow: var(--shadow-elevation), var(--glow-accent);
  background: var(--bg-surface-hover);
  border-color: var(--accent-primary);
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

/* Images globally */
img {
  max-width: 100%;
  height: auto;
  border-radius: 0 !important;
}

.card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-subtle);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border: 1px solid var(--accent-primary);
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  text-decoration: none;
  font-family: monospace;
  background: transparent;
  cursor: pointer;
  transition: all 0.3s var(--ease-kinetic);
  border-radius: 0 !important;
  font-size: 0.9rem;
}

.btn:hover {
  background: var(--accent-primary);
  color: var(--bg-canvas);
  box-shadow: var(--glow-accent);
}

/* Forms */
input, textarea {
  width: 100%;
  padding: 12px;
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: monospace;
  margin-bottom: 1.5rem;
  border-radius: 0 !important;
  transition: border 0.3s ease;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.3);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--accent-primary);
}

/* Typewriter Output Box */
#output-area {
  margin-top: 2rem;
  border-top: 1px dashed var(--border-subtle);
  padding-top: 2rem;
}

#typewriter-box {
  background: #110c0a;
  border: 1px solid var(--accent-primary);
  padding: 1.5rem;
  color: var(--accent-primary);
  min-height: 100px;
  white-space: pre-wrap;
  border-radius: 0;
  margin-bottom: 1.5rem;
}

.btn-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Content blocks */
.content-wrapper {
  max-width: 72ch;
  margin: 0 auto;
}

/* Scroll Reveals */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s var(--ease-kinetic);
}

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

/* Footer */
footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 4rem 20px 2rem;
  margin-top: 4rem;
  font-family: monospace;
  font-size: 0.85rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  color: var(--accent-primary);
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.5rem;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

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

.footer-col a {
  text-decoration: none;
  color: var(--text-muted);
}

.footer-col a:hover {
  color: var(--accent-primary);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid var(--border-subtle);
  padding-top: 2rem;
  text-align: center;
  color: var(--text-muted);
}

.footer-bottom p {
  margin-bottom: 0.5rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-family: monospace;
}

th, td {
  border: 1px solid var(--border-subtle);
  padding: 1rem;
  text-align: left;
}

th {
  color: var(--accent-primary);
  background: rgba(245, 158, 11, 0.05);
}

.table-wrapper {
  overflow-x: auto;
}

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