/* ===== CUSTOM PROPERTIES ===== */
:root {
  --bg: #f4f0ea;
  --bg-warm: #fff4e3;
  --ink: #1f1d1a;
  --muted: #5c5248;
  --accent: #f25c3c;
  --accent-dark: #c33c1f;
  --panel: #fff9f2;
  --line: #e6d8c9;
  --card-bg: #ffffff;
  --pill-bg: #fff1e2;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --shadow-sm: 0 4px 12px rgba(31,29,26,0.06);
  --shadow-md: 0 12px 30px rgba(31,29,26,0.08);
  --shadow-lg: 0 20px 40px rgba(31,29,26,0.10);
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-heading: Georgia, "Times New Roman", serif;
  --max-width: 1120px;
  --gutter: 8vw;
}

@media (max-width: 600px) {
  :root {
    --gutter: 5vw;
  }
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
h1, h2, h3, h4 { margin-top: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; }
ul { padding-left: 1.2em; }

/* ===== BASE ===== */
html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  background-image: radial-gradient(ellipse at top center, var(--bg-warm) 0%, var(--bg) 55%);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  min-height: 100vh;
}

/* ===== HEADER ===== */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px var(--gutter);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(244, 240, 234, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
}

.site-nav {
  display: flex;
  align-items: center;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-links a {
  margin-left: 24px;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.15s;
}

.nav-links a:hover {
  color: var(--ink);
}

/* ===== MAIN / SECTIONS ===== */
main {
  padding: 0 var(--gutter);
  max-width: calc(var(--max-width) + 2 * 8vw);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 80px;
  padding-bottom: 80px;
}

section {
  scroll-margin-top: 80px;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  line-height: 1.2;
}

h2 {
  font-size: 1.8rem;
  margin-bottom: 20px;
}

.section-intro {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 640px;
  margin-bottom: 28px;
}

/* ===== HERO ===== */
.hero {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: center;
  padding-top: 48px;
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 8px;
}

h1 {
  font-size: 2.2rem;
  margin-bottom: 16px;
}

.lead {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.7;
}

.cta-row {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.btn {
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  border: none;
  cursor: pointer;
}

.btn:active {
  transform: scale(0.97);
}

.btn.primary {
  background: var(--accent);
  color: white;
}

.btn.primary:hover {
  background: var(--accent-dark);
}

.btn.ghost {
  border: 1.5px solid var(--line);
  color: var(--ink);
  background: transparent;
}

.btn.ghost:hover {
  border-color: var(--muted);
}

.panel-card {
  background: var(--panel);
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}

.panel-card h3 {
  font-size: 1rem;
  margin-bottom: 12px;
}

.panel-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.panel-card li {
  padding: 6px 0;
  color: var(--muted);
  font-size: 0.92rem;
  position: relative;
  padding-left: 18px;
}

.panel-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  width: 8px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

/* ===== ABOUT ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
  align-items: start;
}

.about-text p {
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 16px;
}

.about-text strong {
  color: var(--ink);
}

.about-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.detail-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 4px;
}

.detail-value {
  font-size: 0.92rem;
  line-height: 1.5;
}

/* ===== CURRENTLY BUILDING ===== */
.building-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
}

.building-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.building-header h3 {
  font-size: 1.3rem;
  margin: 0;
}

.badge {
  background: var(--accent);
  color: white;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.building-desc {
  color: var(--muted);
  line-height: 1.7;
  max-width: 720px;
  margin-bottom: 24px;
}

.arch-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.arch-item {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
}

.arch-item h4 {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.arch-item p {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

/* ===== TRACKS ===== */
.track-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.track-card {
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--card-bg);
  box-shadow: var(--shadow-md);
  transition: box-shadow 0.2s, transform 0.2s;
}

.track-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.track-icon {
  color: var(--accent);
  margin-bottom: 12px;
}

.track-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.track-card > p {
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 12px;
}

.track-highlights {
  margin: 0 0 12px 0;
  padding-left: 1.1em;
}

.track-highlights li {
  font-size: 0.9rem;
  color: var(--muted);
  padding: 3px 0;
  line-height: 1.5;
}

/* ===== PILLS ===== */
.pill-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.pill-row span {
  background: var(--pill-bg);
  color: var(--muted);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 500;
}

/* ===== TEXT LINK ===== */
.text-link {
  display: inline-block;
  margin-top: 16px;
  color: var(--accent-dark);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  transition: color 0.15s;
}

.text-link:hover {
  color: var(--accent);
}

/* ===== EXPERIENCE TIMELINE ===== */
.timeline {
  position: relative;
  padding-left: 140px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 120px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--line);
}

.timeline-item {
  position: relative;
  padding-bottom: 32px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -23px;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
}

.timeline-date {
  position: absolute;
  left: -140px;
  top: 2px;
  width: 100px;
  text-align: right;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
}

.timeline-content h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.role-tag {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.88rem;
}

.location {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 8px;
  margin-top: 0;
}

.timeline-content p:last-child {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 0;
}

/* ===== PHILOSOPHY ===== */
.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.phil-card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.phil-card h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
  margin-bottom: 8px;
}

.phil-card p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0;
}

/* ===== CONTACT ===== */
.contact {
  max-width: 520px;
}

.contact-card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
}

.contact-card h2 {
  margin-top: 0;
}

.contact-card > p {
  color: var(--muted);
  line-height: 1.6;
}

.chat-teaser {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.chat-teaser p {
  font-style: italic;
  color: var(--muted);
  margin-bottom: 12px;
  font-size: 0.95rem;
}

/* ===== FOOTER ===== */
.site-footer {
  padding: 24px var(--gutter) 40px;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ===== FADE-IN ANIMATION ===== */
@media (prefers-reduced-motion: no-preference) {
  .fade-in {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }
  .fade-in.visible {
    opacity: 1;
    transform: none;
  }
}

/* ===== MOBILE: 768px and below ===== */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(244, 240, 234, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    padding: 16px var(--gutter);
    flex-direction: column;
    gap: 12px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    margin-left: 0;
    font-size: 1rem;
    padding: 4px 0;
  }

  main {
    gap: 56px;
    padding-top: 16px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 24px;
  }

  h1 {
    font-size: 1.6rem;
  }

  h2 {
    font-size: 1.5rem;
  }

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

  .cta-row .btn {
    text-align: center;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .about-details {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
  }

  .detail-card {
    flex: 1;
    min-width: 140px;
  }

  .building-card {
    padding: 20px;
  }

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

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

  /* Timeline: switch to stacked layout on mobile */
  .timeline {
    padding-left: 24px;
  }

  .timeline::before {
    left: 4px;
  }

  .timeline-item::before {
    left: -23px;
  }

  .timeline-date {
    position: static;
    width: auto;
    text-align: left;
    margin-bottom: 2px;
    font-size: 0.78rem;
    color: var(--accent-dark);
    font-weight: 600;
  }

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

  .contact-card {
    padding: 24px;
  }
}

/* ===== SMALL MOBILE: 400px and below ===== */
@media (max-width: 400px) {
  h1 {
    font-size: 1.4rem;
  }

  .about-details {
    flex-direction: column;
  }

  .building-header h3 {
    font-size: 1.1rem;
  }
}
