/* =========================================================
   TOKENS — "field notes from a greenhouse lab"
   Bright paper + living green, with electric-lime tech accents.
   ========================================================= */
:root {
  /* surfaces */
  --paper:      #F4F7EE;  /* main page, pale sage-white */
  --sage:       #E7EEDC;  /* alternating band */
  --card:       #FFFFFF;
  --forest:     #14271C;  /* deep green-black: dark bands + headings */
  --forest-2:   #1D3527;

  /* ink */
  --ink:        #17281E;
  --ink-muted:  #5E6F5F;
  --ink-on-dark:#EFF4E6;
  --muted-on-dark: #A7BCA6;

  /* accents */
  --moss:       #3E7F55;  /* primary green */
  --moss-deep:  #2C5C3D;
  --lime:       #B6EE4A;  /* electric, tech signal */
  --signal:     #FFC845;  /* warm, snap-code / CTA */
  --berry:      #C24E72;  /* rare highlight */

  /* lines */
  --line:       rgba(23, 40, 30, 0.14);
  --line-soft:  rgba(23, 40, 30, 0.08);
  --line-dark:  rgba(239, 244, 230, 0.16);

  --font-display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  --font-body:    "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    "JetBrains Mono", "Courier New", monospace;

  --radius:    16px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* =========================================================
   BASE
   ========================================================= */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }

:focus-visible {
  outline: 3px solid var(--moss);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================================================
   TYPE HELPERS
   ========================================================= */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--moss);
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--lime);
  border-radius: 2px;
  flex-shrink: 0;
}
.eyebrow-light { color: var(--lime); }
.eyebrow-light::before { background: var(--lime); }

.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(30px, 4.4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  color: var(--forest);
}
.section-title.small { font-size: clamp(22px, 3vw, 30px); }

.section-lede {
  max-width: 56ch;
  color: var(--ink-muted);
  margin: 0 0 44px;
  font-size: 17px;
}

/* =========================================================
   SIGNATURE — sprout mark
   ========================================================= */
.sprout-mark {
  display: inline-flex;
  width: 26px;
  height: 26px;
  color: var(--moss);
  flex-shrink: 0;
}
.sprout-mark svg { width: 100%; height: 100%; }
.sprout-mark.small { width: 18px; height: 18px; color: var(--lime); }

/* =========================================================
   NAV
   ========================================================= */
.nav-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 247, 238, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.nav-mark { display: flex; align-items: center; gap: 10px; }
.nav-mark-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  color: var(--forest);
}
.nav-links {
  display: flex;
  gap: 34px;
  font-size: 15px;
  font-weight: 500;
}
.nav-links a {
  color: var(--ink-muted);
  position: relative;
  transition: color 0.2s var(--ease);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.nav-links a:hover { color: var(--forest); }
.nav-links a:hover::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--forest);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 84vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 80px 0 70px;
  background:
    radial-gradient(58% 50% at 50% 6%, rgba(182, 238, 74, 0.22), transparent 62%),
    radial-gradient(46% 42% at 88% 92%, rgba(62, 127, 85, 0.16), transparent 62%),
    var(--paper);
}

.scanline {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--moss) 22%, var(--lime) 50%, var(--moss) 78%, transparent);
  opacity: 0.5;
  animation: sweep 6s ease-in-out infinite;
}
@keyframes sweep {
  0%   { top: 10%; opacity: 0; }
  10%  { opacity: 0.5; }
  50%  { top: 90%; opacity: 0.5; }
  60%  { opacity: 0; }
  100% { top: 90%; opacity: 0; }
}

.hero-inner { position: relative; z-index: 1; text-align: center; }
.hero-inner .eyebrow { justify-content: center; }

.viewfinder {
  position: relative;
  max-width: 720px;
  margin: 0 auto 30px;
  padding: 52px 30px;
}
.viewfinder .corner {
  position: absolute;
  width: 32px;
  height: 32px;
  border: 2.5px solid var(--moss);
  border-radius: 3px;
}
.viewfinder .tl { top: 0; left: 0; border-width: 2.5px 0 0 2.5px; }
.viewfinder .tr { top: 0; right: 0; border-width: 2.5px 2.5px 0 0; }
.viewfinder .bl { bottom: 0; left: 0; border-width: 0 0 2.5px 2.5px; }
.viewfinder .br { bottom: 0; right: 0; border-width: 0 2.5px 2.5px 0; }

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(54px, 10.5vw, 116px);
  line-height: 0.9;
  letter-spacing: -0.035em;
  margin: 0;
  color: var(--forest);
}
.hero-role {
  font-family: var(--font-mono);
  font-size: clamp(13px, 1.6vw, 16px);
  color: var(--moss);
  letter-spacing: 0.04em;
  margin: 18px 0 0;
}

.hero-sub {
  max-width: 44ch;
  margin: 0 auto 36px;
  color: var(--ink-muted);
  font-size: 18px;
}

.hero-ctas {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease),
              border-color 0.18s var(--ease), color 0.18s var(--ease);
}
.btn:hover { transform: translateY(-2px); }

.btn-primary { background: var(--moss); color: #FFFFFF; }
.btn-primary:hover { background: var(--moss-deep); }

.btn-ghost { background: transparent; border-color: var(--line); color: var(--forest); }
.btn-ghost:hover { border-color: var(--moss); color: var(--moss); }

.btn-outline { background: transparent; border-color: var(--line); color: var(--forest); }
.btn-outline:hover { border-color: var(--moss); color: var(--moss); }

/* =========================================================
   SECTIONS
   ========================================================= */
.section { padding: 100px 0; }
.section-paper { background: var(--paper); }
.section-sage  { background: var(--sage); }

/* ---- Site-wide stats band (dark, high contrast) ---- */
.stats-band {
  background:
    radial-gradient(70% 120% at 12% 0%, rgba(62, 127, 85, 0.5), transparent 60%),
    var(--forest);
  color: var(--ink-on-dark);
  padding: 70px 0;
}
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 28px;
  margin: 0 0 22px;
}
.stats-row li {
  border-left: 2px solid var(--lime);
  padding-left: 18px;
}
.stats-row .stat-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(38px, 5.4vw, 60px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--lime);
}
.stats-row .stat-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-on-dark);
  margin-top: 10px;
}
.stats-note {
  font-size: 14px;
  color: var(--muted-on-dark);
  margin: 0;
  max-width: 60ch;
}

/* ---- Featured / flagship ---- */
.featured-entry + .featured-entry {
  margin-top: 80px;
  padding-top: 80px;
  border-top: 1px solid var(--line);
}

.featured-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 52px;
  align-items: center;
}

.featured-media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--forest);
  aspect-ratio: 4 / 3;
}
.featured-media video,
.featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.featured-media .media-corner {
  position: absolute;
  width: 26px;
  height: 26px;
  border: 2.5px solid var(--lime);
  opacity: 0.9;
}
.featured-media .tl { top: 12px; left: 12px; border-width: 2.5px 0 0 2.5px; }
.featured-media .tr { top: 12px; right: 12px; border-width: 2.5px 2.5px 0 0; }
.featured-media .bl { bottom: 12px; left: 12px; border-width: 0 0 2.5px 2.5px; }
.featured-media .br { bottom: 12px; right: 12px; border-width: 0 2.5px 2.5px 0; }

.featured-spotlight {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--forest);
  background: var(--signal);
  border-radius: 999px;
  padding: 9px 16px;
  margin: 0 0 18px;
  font-weight: 500;
}

.featured-team {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--berry);
  margin: 0 0 16px;
}

.featured-desc {
  color: var(--ink-muted);
  font-size: 16.5px;
  margin: 0 0 28px;
  max-width: 54ch;
}

.featured-secondary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 10px;
  margin-bottom: 28px;
}
.featured-secondary-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--forest);
  aspect-ratio: 4 / 5;
}
.featured-secondary-item video,
.featured-secondary-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.featured-secondary-item .tag {
  position: absolute;
  left: 6px;
  bottom: 6px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.02em;
  background: rgba(20, 39, 28, 0.82);
  color: var(--ink-on-dark);
  padding: 3px 7px;
  border-radius: 999px;
}

.featured-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

/* ---- Snap code button + thumbnail ---- */
.snap-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--forest);
  background: var(--signal);
  border: none;
  border-radius: var(--radius-sm);
  padding: 11px 15px;
  cursor: pointer;
  font-weight: 500;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease);
}
.snap-btn:hover { transform: translateY(-2px); background: #FFD873; }
.snap-btn .dot {
  width: 7px; height: 7px;
  border-radius: 2px;
  background: var(--forest);
}

.snapcode-thumb {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  cursor: pointer;
  border: 2px solid var(--line);
  transition: transform 0.18s var(--ease), border-color 0.18s var(--ease);
}
.snapcode-thumb:hover { transform: scale(1.06); border-color: var(--moss); }
.snapcode-thumb.small { width: 42px; height: 42px; }

/* ---- About ---- */
.about-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 52px;
  align-items: start;
}
.about-bio {
  font-size: 20px;
  line-height: 1.65;
  max-width: 52ch;
  margin: 0;
  color: var(--ink);
}
.about-bio strong { color: var(--moss); font-weight: 700; }

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-content: flex-start;
}
.chip {
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 9px 15px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink);
}

/* ---- Background (non-AR experience) ---- */
.background-block {
  margin-top: 64px;
  padding-top: 44px;
  border-top: 1px solid var(--line);
}
.background-heading {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 28px;
}
.background-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 28px 36px;
}
.background-list li {
  border-left: 2px solid var(--lime);
  padding-left: 18px;
}
.background-list .bg-role {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: var(--forest);
  margin-bottom: 3px;
}
.background-list .bg-meta {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--moss);
  margin-bottom: 9px;
}
.background-list .bg-detail {
  display: block;
  font-size: 14.5px;
  color: var(--ink-muted);
  line-height: 1.55;
}

/* ---- Project grid ---- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.project-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 34px -20px rgba(20, 39, 28, 0.45);
}

.project-media {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--forest);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.project-media video,
.project-media img.preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.project-media-placeholder {
  text-align: center;
  color: var(--muted-on-dark);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.project-media-placeholder .sprout-mark { color: var(--moss); }

.project-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.project-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  margin: 0 0 9px;
  color: var(--forest);
}
.project-desc {
  font-size: 14.5px;
  color: var(--ink-muted);
  margin: 0 0 18px;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}
.project-tags span {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.02em;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink-muted);
}
.project-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
}

/* ---- Resume ---- */
.resume-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 26px;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 44px;
}
.resume-card-text p { margin: 8px 0 0; color: var(--ink-muted); }
.resume-card-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---- Footer ---- */
.footer {
  background:
    radial-gradient(60% 100% at 85% 0%, rgba(62, 127, 85, 0.42), transparent 62%),
    var(--forest);
  color: var(--ink-on-dark);
  padding: 90px 0 30px;
}
.footer-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(26px, 3.6vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 44px;
  max-width: 20ch;
  color: var(--ink-on-dark);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

.contact-list { display: flex; flex-direction: column; gap: 16px; }
.contact-list li { display: flex; flex-direction: column; gap: 3px; }
.contact-list .contact-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-on-dark);
}
.contact-list a,
.contact-list .contact-value {
  font-family: var(--font-mono);
  font-size: 15.5px;
  color: var(--lime);
  width: fit-content;
  border-bottom: 1px solid rgba(182, 238, 74, 0.35);
  transition: border-color 0.2s var(--ease);
}
.contact-list a:hover { border-bottom-color: var(--lime); }

.social-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 15px;
  font-weight: 500;
}
.social-list a { color: var(--muted-on-dark); transition: color 0.2s var(--ease); }
.social-list a:hover { color: var(--lime); }

.footer-bottom {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted-on-dark);
  font-size: 13px;
  padding-top: 26px;
  border-top: 1px solid var(--line-dark);
}
.footer-bottom p { margin: 0; }

/* =========================================================
   LIGHTBOX
   ========================================================= */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.lightbox[hidden] { display: none; }
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 39, 28, 0.72);
  backdrop-filter: blur(4px);
}
.lightbox-panel {
  position: relative;
  background: var(--card);
  border-radius: var(--radius);
  padding: 34px;
  max-width: 380px;
  width: 100%;
  text-align: center;
}
.lightbox-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: var(--ink-muted);
  cursor: pointer;
  padding: 4px 8px;
}
.lightbox-close:hover { color: var(--forest); }
.lightbox-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  margin: 0 0 18px;
  color: var(--forest);
}
.lightbox-code {
  width: 240px;
  height: 240px;
  margin: 0 auto 18px;
  border-radius: 12px;
}
.lightbox-hint {
  font-size: 13.5px;
  color: var(--ink-muted);
  margin: 0 0 20px;
}
.lightbox-link[hidden] { display: none; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .featured-grid { grid-template-columns: 1fr; gap: 32px; }
  .project-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .nav-links {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s var(--ease);
  }
  .nav-links.open { max-height: 280px; }
  .nav-links a { padding: 17px 24px; border-top: 1px solid var(--line-soft); }
  .nav-links a::after { display: none; }
  .nav-toggle { display: flex; }

  .project-grid { grid-template-columns: 1fr; }
  .resume-card { flex-direction: column; align-items: flex-start; padding: 30px; }
  .section { padding: 72px 0; }
  .footer-grid { flex-direction: column; gap: 34px; }
  .social-list { flex-direction: row; flex-wrap: wrap; gap: 20px; }
}

/* =========================================================
   MOTION PREFERENCES
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scanline { animation: none; opacity: 0.25; top: 50%; }
  .btn:hover, .project-card:hover, .snap-btn:hover, .snapcode-thumb:hover { transform: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
