:root {
  color-scheme: light;
  --bg: #f5f0e8;
  --bg-alt: #ece7de;
  --surface: #faf7f2;
  --surface-hover: #ffffff;
  --ink: #1c1814;
  --muted: #6b6460;
  --accent: #1e2e1a;

  /* Sage — forest green for primary interactive elements */
  --sage: #3f7d30;
  --sage-bg: rgba(63, 125, 48, 0.09);
  --sage-border: rgba(63, 125, 48, 0.24);

  /* Amber — warm gold for secondary / metadata details */
  --amber: #a07830;
  --amber-bg: rgba(160, 120, 48, 0.09);
  --amber-border: rgba(160, 120, 48, 0.22);

  /* Teal — deep blue-green for structural line details */
  --teal: #2e5c60;
  --teal-subtle: rgba(46, 92, 96, 0.13);

  /* Nav background — very dark forest */
  --nav-bg: #252f22;

  --line: rgba(28, 24, 20, 0.1);
  --shadow: 0 4px 24px -4px rgba(28, 24, 20, 0.08);
  --shadow-hover: 0 12px 32px -8px rgba(28, 24, 20, 0.14);
  --tag-bg: var(--sage-bg);
  --tag-border: var(--sage-border);
  --radius: 12px;
  --radius-lg: 16px;
  --max-width: 1200px;
  --transition: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: "Sora", system-ui, -apple-system, sans-serif;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  color: var(--ink);
  line-height: 1.1;
}

h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: clamp(2.8rem, 5.5vw, 5rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

h2::after {
  content: "";
  display: block;
  width: 36px;
  height: 2px;
  background: var(--teal);
  margin-top: 16px;
  border-radius: 2px;
}

h3 {
  font-size: 1.35rem;
}

p {
  margin: 0 0 1.2rem;
  color: var(--muted);
  font-size: 1.05rem;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

img {
  max-width: 100%;
  display: block;
}

button, input, textarea {
  font-family: inherit;
}

.container {
  width: min(100% - 48px, var(--max-width));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 10px;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  z-index: 1000;
}

.skip-link:focus {
  left: 10px;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid transparent;
  transition: all var(--transition);
  cursor: pointer;
  letter-spacing: -0.01em;
}

.button.primary {
  background: var(--nav-bg);
  color: #faf7f2;
}

.button.primary:hover {
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.button.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.button.ghost:hover {
  background: var(--surface-hover);
  border-color: var(--teal);
  color: var(--teal);
  transform: translateY(-2px);
}

/* Sections */
.section {
  padding: 120px 0;
  position: relative;
}

.section.alt {
  background: var(--bg-alt);
  padding: 100px 0;
}

.section-head {
  max-width: 760px;
  margin-bottom: 60px;
}

/* Eyebrow — editorial label with left-bar */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--sage);
  font-weight: 700;
  margin-bottom: 20px;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--sage);
  flex-shrink: 0;
}

/* Hero */
.hero {
  padding: 160px 0 100px;
  min-height: 88vh;
  display: flex;
  align-items: center;
}

.hero-header {
  margin-bottom: 2.5rem;
}

.hero-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: clamp(2.6rem, 5.5vw, 5.2rem);
  line-height: 1.1;
  font-weight: 700;
  max-width: 980px;
  margin-bottom: 5rem;
  letter-spacing: -0.02em;
}

.hero-bottom-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
  border-top: 2px solid var(--teal);
  padding-top: 48px;
}

.hero-quote blockquote {
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-family: 'Sora', sans-serif;
  margin: 0 0 1.5rem 0;
  color: var(--ink);
  line-height: 1.45;
  font-weight: 400;
}

.hero-quote-author {
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.8rem;
}

.hero-details {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.detail-item .detail-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 700;
}

.detail-item .detail-val {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* Skill strip — replaces the marquee */
.skill-strip {
  border-top: 1px solid var(--teal-subtle);
  border-bottom: 1px solid var(--teal-subtle);
  padding: 18px 0;
  margin: 40px 0;
  overflow: hidden;
}

.skill-strip-inner {
  display: flex;
  gap: 48px;
  animation: scroll 22s linear infinite;
  white-space: nowrap;
  font-family: 'Sora', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.skill-strip-inner span {
  display: flex;
  align-items: center;
  gap: 48px;
}

.skill-strip-inner span::after {
  content: "·";
  color: var(--amber);
  opacity: 0.6;
}

@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Bento Grid */
.bento-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: minmax(180px, auto);
}

.bento-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 2px solid var(--teal-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.bento-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  background: var(--surface-hover);
  border-top-color: var(--teal);
}

/* Tags */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.tag {
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--sage-bg);
  color: var(--sage);
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid var(--sage-border);
  transition: all 0.2s ease;
  letter-spacing: 0.01em;
}

.tag:hover {
  background: var(--sage);
  color: #faf7f2;
  border-color: var(--sage);
}

/* Project Badge */
.project-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--amber);
  background: var(--amber-bg);
  border: 1px solid var(--amber-border);
  border-radius: 999px;
  padding: 4px 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.project-badge-light {
  color: rgba(245, 240, 232, 0.9);
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Project Gallery — asymmetric 3-col grid */
.project-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 300px 300px 380px;
  gap: 14px;
}

/* Base card */
.pgal-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
}

.pgal-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

/* Image card */
.pgal-img {
  cursor: pointer;
}

.pgal-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.pgal-card:hover .pgal-bg {
  transform: scale(1.05);
}

.pgal-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(20, 20, 16, 0.15) 0%,
    rgba(20, 20, 16, 0.7) 100%
  );
  transition: opacity var(--transition);
}

.pgal-card:hover .pgal-overlay {
  opacity: 1.3;
}

/* Text card */
.pgal-text {
  background: var(--surface);
}

.pgal-accent-teal.pgal-text  { border-top: 3px solid var(--teal); }
.pgal-accent-sage.pgal-text  { border-top: 3px solid var(--sage); }
.pgal-accent-amber.pgal-text { border-top: 3px solid var(--amber); }

/* Card content layout */
.pgal-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px 26px;
  z-index: 1;
}

.pgal-text .pgal-content {
  position: relative;
  height: 100%;
}

/* Project number */
.pgal-num {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 1.5rem;
  font-weight: 400;
  color: rgba(245, 240, 232, 0.7);
  line-height: 1;
  align-self: flex-start;
}

.pgal-num-dark {
  color: var(--muted);
}

/* Bottom content block */
.pgal-bottom {
  display: flex;
  flex-direction: column;
  gap: 10px;
  transform: translateY(6px);
  transition: transform var(--transition);
}

.pgal-card:hover .pgal-bottom {
  transform: translateY(0);
}

.pgal-bottom-dark {
  transform: none;
}

.pgal-card:hover .pgal-bottom-dark {
  transform: none;
}

.pgal-title {
  font-size: 1.35rem;
  margin: 0;
  color: #f5f0e8;
  line-height: 1.2;
}

.pgal-title-dark {
  color: var(--ink);
}

.pgal-featured .pgal-title {
  font-size: 1.7rem;
}

.pgal-desc {
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.55;
  color: var(--muted);
}

.pgal-desc-light {
  color: rgba(245, 240, 232, 0.75);
}

.pgal-bottom .tag-row,
.pgal-bottom-dark .tag-row {
  margin: 0;
}

/* Light tags (on dark/image cards) */
.tag-light {
  background: rgba(255, 255, 255, 0.15);
  color: rgba(245, 240, 232, 0.9);
  border-color: rgba(255, 255, 255, 0.25);
}

.tag-light:hover {
  background: rgba(255, 255, 255, 0.3);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

/* Project links */
.pgal-link {
  font-size: 0.76rem;
  font-weight: 700;
  color: rgba(245, 240, 232, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  align-self: flex-start;
  transition: color 0.2s;
}

.pgal-link::after {
  content: "→";
  transition: transform 0.2s;
}

.pgal-link:hover::after {
  transform: translateX(3px);
}

.pgal-link.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.pgal-link-dark {
  color: var(--sage);
}

@media (max-width: 900px) {
  .project-gallery {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: 260px 260px 260px;
  }

  .project-gallery article[style*="span 3"] {
    grid-column: span 2 !important;
  }

  .project-gallery article[style*="span 2"] {
    grid-column: span 2 !important;
  }
}

@media (max-width: 580px) {
  .project-gallery {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .project-gallery article[style] {
    grid-column: span 1 !important;
    min-height: 260px;
  }
}

/* Stats Strip */
.stats-strip {
  padding: 56px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  position: relative;
  cursor: default;
}

.stat-item + .stat-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 15%;
  bottom: 15%;
  width: 1px;
  background: var(--line);
}

.stat-num {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: clamp(3rem, 5vw, 4.2rem);
  font-weight: 700;
  color: var(--sage);
  line-height: 1;
  transition: color 0.4s ease;
  display: block;
}

.stat-infinity {
  font-size: clamp(3.2rem, 5.5vw, 4.8rem);
  color: var(--teal);
}

.stat-item:hover .stat-num {
  color: var(--amber);
}

.stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 700;
  text-align: center;
}

@media (max-width: 640px) {
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-item:nth-child(3)::before {
    display: none;
  }
}

/* Timeline */
.timeline {
  display: grid;
  gap: 1px;
}

.timeline-item {
  position: relative;
  padding: 32px 0 32px 28px;
  border-left: 2px solid var(--teal-subtle);
  transition: all var(--transition);
}

.timeline-item:hover {
  border-left-color: var(--teal);
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 38px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--amber);
}

.timeline-year {
  display: inline-block;
  font-weight: 700;
  color: var(--amber);
  margin-bottom: 8px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Contact */
.contact-cards-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.contact-card {
  flex: 1 1 200px;
  padding: 20px 22px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: all 0.2s ease;
  display: block;
}

.contact-card span {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.contact-card div {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.contact-card:hover {
  border-color: var(--sage);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

/* Navigation */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--nav-bg);
  height: 62px;
  animation: navDown 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

@keyframes navDown {
  from { transform: translateY(-100%); }
  to   { transform: translateY(0); }
}

.site-nav.scrolled {
  box-shadow: 0 6px 32px -4px rgba(0, 0, 0, 0.3);
}


.nav-inner {
  width: min(100% - 48px, var(--max-width));
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}


.nav-logo-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 1.1rem;
  font-weight: 700;
  color: rgba(245, 240, 232, 0.9);
  letter-spacing: -0.01em;
  transition: color 0.3s;
}

.nav-logo:hover .nav-logo-name {
  color: #f5f0e8;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links li {
  opacity: 0;
  animation: navLinkIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.nav-links li:nth-child(1) { animation-delay: 0.45s; }
.nav-links li:nth-child(2) { animation-delay: 0.55s; }
.nav-links li:nth-child(3) { animation-delay: 0.65s; }
.nav-links li:nth-child(4) { animation-delay: 0.75s; }

@keyframes navLinkIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.nav-links a {
  position: relative;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: rgba(245, 240, 232, 0.55);
  text-decoration: none;
  transition: color 0.3s;
  padding-bottom: 3px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  right: 50%;
  height: 1.5px;
  background: var(--amber);
  border-radius: 2px;
  transition: left 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-links a:hover,
.nav-links a.active {
  color: #f5f0e8;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  left: 0;
  right: 0;
}

/* Ensure anchored sections aren't hidden under the fixed nav */
section[id] {
  scroll-margin-top: 72px;
}

.site-footer {
  padding: 40px 0;
  text-align: center;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
}

@media (max-width: 900px) {
  .hero-bottom-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .bento-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 2.8rem;
  }

  .nav-links {
    gap: 20px;
  }
}

@media (max-width: 600px) {
  .nav-links {
    display: none;
  }
}

@media (max-width: 600px) {
  .hero {
    padding: 120px 0 80px;
  }

  .section {
    padding: 80px 0;
  }

  .section.alt {
    padding: 80px 0;
  }
}
