:root {
  --ink: #1A2E22;
  --ink-soft: #24382C;
  --paper: #F4F0E6;
  --paper-soft: #EBE6D8;
  --cream: #F8F5ED;
  --muted: #5C6B5E;
  --muted-light: #7A8A7C;
  --gold: #C4A35A;
  --gold-soft: #D4B87A;
  --rust: #8B5E3C;
  --leaf: #3D6B4F;
  --line: rgba(26,46,34,0.11);
  --line-dark: rgba(244,240,230,0.13);
  --radius: 5px;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --max: 940px;
  --edge: clamp(20px, 5vw, 68px);
  --nav-h: 64px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.14;
}

a { color: inherit; text-decoration: none; }
img, svg, video { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

.skip {
  position: absolute; left: -999px; top: auto;
  background: var(--gold); color: var(--ink);
  padding: 10px 16px; z-index: 300; font-weight: 600;
}
.skip:focus { left: 16px; top: 16px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* LOGO */
.logo-mark { width: 32px; height: 32px; flex-shrink: 0; }
.logo-mark svg { width: 100%; height: 100%; }

/* NAV */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(26,46,34,0.93);
  backdrop-filter: blur(10px) saturate(150%);
  border-bottom: 1px solid var(--line-dark);
}
.nav-inner {
  max-width: 1120px; margin: 0 auto; padding: 0 var(--edge);
  height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--serif); font-size: 1.08rem; font-weight: 600;
  color: var(--cream); letter-spacing: -0.01em;
}
.nav-brand span { color: var(--gold); font-weight: 400; }
.nav-links { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.nav-links a {
  font-size: 0.86rem; color: rgba(244,240,230,0.7);
  transition: color 0.18s; position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: -3px;
  width: 0; height: 1px; background: var(--gold);
  transition: width 0.25s var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: var(--gold); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line-dark);
  color: var(--cream); width: 40px; height: 40px; border-radius: var(--radius);
  font-size: 1.15rem;
}

@media (max-width: 920px) {
  .nav-links {
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: var(--ink); flex-direction: column; gap: 0;
    max-height: 0; overflow: hidden; transition: max-height 0.3s var(--ease);
    border-bottom: 1px solid var(--line-dark);
  }
  .nav-links.open { max-height: 520px; }
  .nav-links a {
    padding: 14px var(--edge); border-bottom: 1px solid var(--line-dark); width: 100%;
  }
  .nav-links a::after { display: none; }
  .nav-toggle { display: flex; align-items: center; justify-content: center; }
}

/* SECTIONS */
section { padding: 100px var(--edge) 92px; }
.band { max-width: var(--max); margin: 0 auto; }
.band-wide { max-width: 1100px; margin: 0 auto; }

.dark { background: var(--ink); color: var(--cream); }
.dark .muted { color: rgba(244,240,230,0.6); }
.light { background: var(--paper); color: var(--ink); }
.light-soft { background: var(--paper-soft); color: var(--ink); }
.light .muted, .light-soft .muted { color: var(--muted); }

.eyebrow {
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.05em;
  color: var(--gold); text-transform: uppercase;
}
.section-head { margin-bottom: 42px; max-width: 54ch; }
.section-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.35rem); margin-top: 8px; }

[data-reveal] {
  opacity: 0; transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
[data-reveal].visible { opacity: 1; transform: translateY(0); }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; font-family: var(--sans); font-weight: 600; font-size: 0.93rem;
  border-radius: var(--radius); transition: all 0.2s var(--ease);
  border: none; text-decoration: none;
}
.btn-primary { background: var(--gold); color: var(--ink); }
.btn-primary:hover { background: var(--gold-soft); transform: translateY(-1px); }
.btn-ghost {
  background: transparent; color: var(--cream);
  border: 1px solid var(--line-dark);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-outline {
  background: transparent; color: var(--ink);
  border: 1px solid var(--line);
}
.btn-outline:hover { border-color: var(--gold); color: var(--rust); }
.btn-sm { padding: 8px 14px; font-size: 0.84rem; }

/* HERO */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  padding-top: calc(var(--nav-h) + 56px); padding-bottom: 80px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 40%, rgba(196,163,90,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(61,107,79,0.12) 0%, transparent 50%);
  pointer-events: none;
}
.hero-grid {
  max-width: 1100px; margin: 0 auto; position: relative;
  display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 48px; align-items: center;
}
.hero h1 {
  font-size: clamp(2.4rem, 5.2vw, 3.85rem);
  color: var(--cream); margin-bottom: 12px; letter-spacing: -0.025em;
}
.hero .role {
  font-size: clamp(1.02rem, 1.7vw, 1.22rem);
  color: rgba(244,240,230,0.68); margin-bottom: 22px; max-width: 36ch;
}
.hero .intro {
  font-size: 1.04rem; color: var(--cream); max-width: 50ch; margin-bottom: 26px;
}
.now-line {
  font-family: var(--mono); font-size: 0.83rem; color: var(--gold);
  border-left: 2px solid var(--gold); padding-left: 14px; margin-bottom: 34px;
  max-width: 46ch;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-art { display: flex; justify-content: center; }
.hero-art .logo-large {
  width: 100%; max-width: 280px;
  filter: drop-shadow(0 12px 30px rgba(0,0,0,0.25));
  animation: float 7s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@media (max-width: 840px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 180px; margin: 0 auto 6px; }
  .hero-art .logo-large { animation: none; }
}


/* Portrait */
.hero-portrait-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-portrait {
  width: min(280px, 70vw);
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center 18%;
  border-radius: 12px;
  border: 3px solid rgba(196, 163, 90, 0.35);
  box-shadow:
    0 20px 50px rgba(0,0,0,0.35),
    0 0 0 1px rgba(244,240,230,0.08);
  position: relative;
  z-index: 1;
}
.hero-portrait-ring {
  position: absolute;
  inset: -14px;
  border-radius: 18px;
  border: 1px solid rgba(196, 163, 90, 0.22);
  pointer-events: none;
  z-index: 0;
}
.hero-portrait-badge {
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--gold);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 99px;
  border: 1px solid rgba(196, 163, 90, 0.4);
  white-space: nowrap;
  z-index: 2;
}
@media (max-width: 840px) {
  .hero-portrait { width: min(180px, 55vw); }
  .hero-portrait-ring { inset: -10px; border-radius: 14px; }
}

.about-photo {
  width: 100%;
  max-width: 220px;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center 20%;
  border-radius: 50%;
  border: 3px solid var(--gold);
  box-shadow: 0 8px 28px rgba(26,46,34,0.12);
  margin: 0 auto 18px;
}
.specimen .about-photo {
  display: block;
}

/* ABOUT */
.about-grid {
  display: grid; grid-template-columns: 1.45fr 1fr; gap: 52px; align-items: start;
}
.about-grid p + p { margin-top: 16px; }
.specimen {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; background: var(--cream);
}
.specimen h3 {
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.04em;
  color: var(--rust); margin-bottom: 14px; font-weight: 500; text-transform: uppercase;
}
.spec-row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 10px 0; border-top: 1px solid var(--line); font-size: 0.91rem;
}
.spec-row:first-of-type { border-top: none; }
.spec-row dt { color: var(--muted); font-family: var(--mono); font-size: 0.76rem; }
.spec-row dd { font-weight: 500; text-align: right; }
@media (max-width: 780px) { .about-grid { grid-template-columns: 1fr; } }

/* RESEARCH */
.research-grid {
  display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: start;
}
.research-grid h2 { font-size: clamp(1.55rem, 3vw, 2.1rem); color: var(--cream); margin-bottom: 8px; }
.research-sub {
  font-family: var(--serif); font-style: italic; font-size: 1.06rem;
  color: rgba(244,240,230,0.62); margin-bottom: 18px;
}
.research-meta {
  display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 26px;
  font-family: var(--mono); font-size: 0.78rem; color: rgba(244,240,230,0.55);
}
.research-meta strong { color: var(--cream); font-weight: 500; }
.pod-art { width: 140px; opacity: 0.92; }
@media (max-width: 780px) {
  .research-grid { grid-template-columns: 1fr; }
  .pod-art { display: none; }
}

/* SKILLS */
.skills-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.skill-group h3 {
  font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.04em;
  color: var(--rust); margin-bottom: 14px; font-weight: 500; text-transform: uppercase;
}
.skill-list { list-style: none; }
.skill-list li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 10px 0; border-top: 1px solid var(--line); font-size: 0.93rem;
}
.skill-list li:first-child { border-top: none; }
.skill-list .tag { font-family: var(--mono); font-size: 0.74rem; color: var(--muted); }
@media (max-width: 700px) { .skills-grid { grid-template-columns: 1fr; gap: 32px; } }

/* PROJECTS */
.project {
  border-top: 1px solid var(--line-dark); padding: 30px 0;
  display: grid; grid-template-columns: 88px 1fr; gap: 22px;
}
.project:last-child { border-bottom: 1px solid var(--line-dark); }
.project-no { font-family: var(--mono); color: var(--gold); font-size: 0.83rem; padding-top: 4px; }
.project-title { font-family: var(--serif); font-size: 1.28rem; color: var(--cream); margin-bottom: 8px; }
.project-title a:hover { color: var(--gold); }
.project-desc { color: rgba(244,240,230,0.62); max-width: 56ch; margin-bottom: 12px; }
.project-stack { font-family: var(--mono); font-size: 0.74rem; color: rgba(244,240,230,0.5); }
.project-stack span { color: var(--gold); }
@media (max-width: 600px) { .project { grid-template-columns: 1fr; gap: 6px; } }

/* EDUCATION */
.timeline { border-left: 1px solid var(--line); }
.t-item { position: relative; padding: 0 0 32px 28px; }
.t-item:last-child { padding-bottom: 0; }
.t-item::before {
  content: ''; position: absolute; left: -5px; top: 5px;
  width: 9px; height: 9px; border-radius: 50%; background: var(--gold);
  box-shadow: 0 0 0 3px var(--paper);
}
.t-date { font-family: var(--mono); font-size: 0.74rem; color: var(--rust); margin-bottom: 4px; }
.t-item h3 { font-size: 1.1rem; margin-bottom: 4px; }
.t-item p { color: var(--muted); font-size: 0.93rem; max-width: 56ch; }

/* JOURNAL */
.journal-header {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 28px;
}
.journal-search { position: relative; flex: 1; min-width: 200px; max-width: 320px; }
.journal-search input {
  width: 100%; font-family: var(--sans); font-size: 0.9rem;
  background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 14px 10px 38px; outline: none; color: var(--ink);
  transition: border-color 0.2s;
}
.journal-search input:focus { border-color: var(--gold); }
.journal-search .icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 0.95rem; pointer-events: none;
}
.filter-row {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; align-items: center;
}
.filter-pill {
  font-family: var(--mono); font-size: 0.76rem; padding: 6px 14px;
  border-radius: 99px; border: 1px solid var(--line); background: var(--cream);
  color: var(--muted); transition: all 0.18s var(--ease);
}
.filter-pill:hover { border-color: var(--gold); color: var(--ink); }
.filter-pill.active {
  background: var(--ink); color: var(--cream); border-color: var(--ink);
}

.post-card {
  border-top: 1px solid var(--line); padding: 26px 0;
  cursor: pointer; transition: opacity 0.2s;
}
.post-card:hover { opacity: 0.82; }
.post-card:last-child { border-bottom: 1px solid var(--line); }
.post-meta {
  font-family: var(--mono); font-size: 0.74rem; color: var(--muted);
  display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; align-items: center;
}
.post-type {
  display: inline-block; padding: 2px 10px; border-radius: 99px;
  font-size: 0.7rem; font-family: var(--mono);
}
.type-learn { background: #d4efe0; color: #165c38; }
.type-fix { background: #f5e6c4; color: #6b3f10; }
.type-search { background: #dce8f5; color: #1a3d66; }
.type-note { background: #e6e2f5; color: #3a2a6e; }
.post-title { font-family: var(--serif); font-size: 1.2rem; margin-bottom: 6px; }
.post-excerpt { color: var(--muted); font-size: 0.93rem; max-width: 58ch; }
.post-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag-chip {
  font-family: var(--mono); font-size: 0.7rem; color: var(--muted-light);
  background: var(--paper); border: 1px solid var(--line); border-radius: 99px;
  padding: 2px 9px;
}
.post-media-thumb {
  margin-top: 12px; border-radius: var(--radius); overflow: hidden;
  max-width: 280px; border: 1px solid var(--line);
}
.post-media-thumb img, .post-media-thumb video {
  width: 100%; height: auto; max-height: 160px; object-fit: cover;
}

.view-panel { display: none; }
.view-panel.active { display: block; animation: fadeIn 0.35s var(--ease); }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.back-link {
  font-family: var(--mono); font-size: 0.82rem; color: var(--muted);
  margin-bottom: 22px; display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; padding: 0;
}
.back-link:hover { color: var(--ink); }
.sp-title { font-size: clamp(1.55rem, 3vw, 2.05rem); margin-bottom: 10px; }
.sp-body { font-size: 1.02rem; line-height: 1.82; max-width: 64ch; }
.sp-body p { margin-bottom: 1rem; }
.sp-body h3 { font-size: 1.12rem; margin: 1.4rem 0 0.5rem; }
.sp-body pre, .sp-body code {
  font-family: var(--mono); font-size: 0.85rem;
  background: var(--paper); padding: 2px 6px; border-radius: 3px;
}
.sp-body pre {
  display: block; padding: 14px 16px; margin: 1rem 0;
  overflow-x: auto; border: 1px solid var(--line);
}
.sp-media {
  margin: 1.4rem 0; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line);
}
.sp-media img, .sp-media video { width: 100%; height: auto; }

.comment-box {
  margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line);
}
.comment-box h4 { font-size: 1.05rem; margin-bottom: 14px; }
.comment-item {
  background: var(--cream); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 16px; margin-bottom: 10px;
}
.comment-author { font-weight: 600; font-size: 0.87rem; margin-bottom: 2px; }
.comment-text { font-size: 0.9rem; color: var(--muted); }
.comment-time { font-family: var(--mono); font-size: 0.7rem; color: var(--muted-light); margin-top: 4px; }

.form-input, .form-textarea, .form-select {
  font-family: var(--sans); font-size: 0.9rem; color: var(--ink);
  background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 14px; outline: none; transition: border-color 0.18s; width: 100%;
}
.form-input:focus, .form-textarea:focus, .form-select:focus { border-color: var(--gold); }
.form-textarea { min-height: 90px; resize: vertical; line-height: 1.55; }
.form-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }

/* TOOLS */
.tools-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 700px) { .tools-grid { grid-template-columns: 1fr; } }
.tool-card {
  background: var(--cream); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
}
.tool-card h3 {
  font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.04em;
  color: var(--rust); text-transform: uppercase; margin-bottom: 12px;
}
.notepad-area {
  width: 100%; min-height: 140px; font-family: var(--mono); font-size: 0.86rem;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; resize: vertical; outline: none; line-height: 1.6;
}
.notepad-area:focus { border-color: var(--gold); }
.tool-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

.calc-display {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; text-align: right; margin-bottom: 10px;
}
.calc-expr { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); min-height: 16px; }
.calc-result { font-family: var(--mono); font-size: 1.5rem; font-weight: 600; }
.calc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.calc-btn {
  font-family: var(--mono); font-size: 0.95rem; padding: 12px 6px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  transition: all 0.12s; color: var(--ink);
}
.calc-btn:hover { background: var(--paper-soft); border-color: var(--gold); }
.calc-btn.op { color: var(--leaf); }
.calc-btn.eq { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.calc-btn.ac { color: var(--rust); }

/* WEATHER */
.weather-wrap { max-width: 420px; }
.weather-search { display: flex; gap: 8px; margin-bottom: 16px; }
.weather-card {
  background: var(--cream); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
}
.weather-city { font-size: 1.15rem; font-weight: 600; margin-bottom: 4px; }
.weather-temp { font-family: var(--serif); font-size: 2.8rem; font-weight: 300; line-height: 1.1; margin: 8px 0; }
.weather-desc { font-size: 0.92rem; color: var(--muted); text-transform: capitalize; margin-bottom: 14px; }
.weather-details { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.weather-detail-val { font-weight: 600; font-size: 0.95rem; }
.weather-detail-lbl { font-size: 0.72rem; color: var(--muted); font-family: var(--mono); }

/* NEWS */
.news-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.news-card {
  background: var(--cream); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px; margin-bottom: 10px;
  transition: border-color 0.15s;
}
.news-card:hover { border-color: var(--gold); }
.news-source { font-family: var(--mono); font-size: 0.7rem; color: var(--muted); text-transform: uppercase; margin-bottom: 4px; }
.news-title { font-family: var(--serif); font-size: 1.05rem; margin-bottom: 4px; }
.news-time { font-size: 0.72rem; color: var(--muted-light); }

/* CONTACT */
.contact-grid {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: start;
}
.contact-grid h2 { font-size: clamp(1.75rem, 3.4vw, 2.4rem); color: var(--cream); margin-bottom: 14px; }
.contact-lead { color: rgba(244,240,230,0.62); max-width: 42ch; margin-bottom: 26px; }
.contact-links {
  display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 28px;
  font-family: var(--mono); font-size: 0.84rem;
}
.contact-links a { color: rgba(244,240,230,0.6); transition: color 0.15s; }
.contact-links a:hover { color: var(--gold); }
.ask-card {
  background: rgba(244,240,230,0.05); border: 1px solid var(--line-dark);
  border-radius: var(--radius); padding: 24px;
}
.ask-card h3 { font-size: 1.08rem; color: var(--cream); margin-bottom: 8px; }
.ask-card .form-input, .ask-card .form-textarea {
  background: rgba(244,240,230,0.07); border-color: var(--line-dark); color: var(--cream);
}
.ask-card .form-input::placeholder, .ask-card .form-textarea::placeholder {
  color: rgba(244,240,230,0.38);
}
@media (max-width: 780px) { .contact-grid { grid-template-columns: 1fr; } }

/* FOOTER */
.site-foot {
  padding: 28px var(--edge); text-align: center;
  background: var(--ink); color: rgba(244,240,230,0.48);
  font-size: 0.8rem; border-top: 1px solid var(--line-dark);
}

/* TOAST */
.toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(24px);
  background: var(--ink); color: var(--cream); font-family: var(--mono); font-size: 0.83rem;
  padding: 12px 20px; border-radius: var(--radius); opacity: 0;
  transition: all 0.28s var(--ease); z-index: 250; pointer-events: none;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); font-size: 0.94rem; }

/* ADMIN PAGE */
.admin-body { background: var(--paper); min-height: 100vh; }
.admin-header {
  background: var(--ink); color: var(--cream); padding: 18px var(--edge);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.admin-header h1 { font-size: 1.2rem; }
.admin-main { max-width: 720px; margin: 0 auto; padding: 40px var(--edge); }
.admin-card {
  background: var(--cream); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px; margin-bottom: 24px;
}
.admin-card h2 { font-size: 1.25rem; margin-bottom: 18px; }
.admin-gate {
  max-width: 380px; margin: 80px auto; text-align: center;
  background: var(--cream); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 32px;
}
.admin-gate input { margin: 16px 0; text-align: center; }
.inbox-item {
  border-top: 1px solid var(--line); padding: 14px 0;
}
.inbox-item:first-child { border-top: none; }
.inbox-meta { font-family: var(--mono); font-size: 0.74rem; color: var(--muted); margin-bottom: 4px; }

/* ---------- CHAT / MESSAGES ---------- */
.chat-wrap {
  max-width: 560px;
  height: 480px;
  display: flex;
  flex-direction: column;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.chat-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.chat-status {
  width: 8px; height: 8px; border-radius: 50%;
  background: #2ecc71; flex-shrink: 0;
}
.chat-status.off { background: var(--muted-light); }
.chat-list {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.chat-item { max-width: 80%; }
.chat-item.me { align-self: flex-end; }
.chat-item.them { align-self: flex-start; }
.chat-author {
  font-size: 0.7rem; color: var(--muted); margin-bottom: 3px;
  font-family: var(--mono);
}
.chat-bubble {
  padding: 10px 14px; border-radius: 12px;
  font-size: 0.92rem; line-height: 1.45;
}
.chat-item.me .chat-bubble {
  background: var(--ink); color: var(--cream);
  border-bottom-right-radius: 4px;
}
.chat-item.them .chat-bubble {
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}
.chat-time {
  font-size: 0.68rem; color: var(--muted-light);
  margin-top: 3px; font-family: var(--mono);
}
.chat-item.me .chat-time { text-align: right; }
.chat-input-row {
  border-top: 1px solid var(--line);
  padding: 12px; display: flex; gap: 8px; align-items: flex-end;
}
.chat-input {
  flex: 1; font-family: var(--sans); font-size: 0.9rem;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 10px 12px;
  outline: none; resize: none; max-height: 80px; line-height: 1.4;
  color: var(--ink);
}
.chat-input:focus { border-color: var(--gold); }
.chat-name-setup {
  padding: 28px 20px; display: flex; flex-direction: column;
  gap: 12px; align-items: stretch; justify-content: center; flex: 1;
}
.chat-note {
  font-size: 0.82rem; color: var(--muted); margin-top: 12px;
  max-width: 48ch; line-height: 1.5;
}
.chat-offline {
  padding: 24px; text-align: center; color: var(--muted); font-size: 0.9rem;
}

/* ---------- Animated seedling ---------- */
.seedling-float {
  position: absolute;
  width: 72px;
  height: auto;
  pointer-events: none;
  z-index: 2;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.2));
  animation: seedling-bob 3.5s ease-in-out infinite;
}
.seedling-float--hero {
  right: -8px;
  bottom: -6px;
  width: 64px;
}
.seedling-float--about {
  position: relative;
  width: 56px;
  margin: 0 auto 8px;
  display: block;
  animation: seedling-bob 3.5s ease-in-out infinite;
}
@keyframes seedling-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@media (max-width: 840px) {
  .seedling-float--hero { width: 48px; right: -4px; bottom: -4px; }
}

/* ---------- Field gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 28px;
}
.gallery-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.gallery-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(26,46,34,0.1);
}
.gallery-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center;
  display: block;
  background: var(--paper);
}
.gallery-card figcaption {
  padding: 12px 14px 14px;
}
.gallery-card .g-title {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--ink);
  margin: 0 0 4px;
}
.gallery-card .g-cap {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
  margin: 0;
}
@media (max-width: 600px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .gallery-card figcaption { padding: 8px 10px 10px; }
  .gallery-card .g-title { font-size: 0.92rem; }
}
