:root {
  --bg: #edf1ea;
  --bg-deep: #dfe6d8;
  --ink: #15201b;
  --ink-soft: #4a574f;
  --line: rgba(21, 32, 27, 0.12);
  --accent: #2a7a63;
  --accent-deep: #184f40;
  --accent-warm: #c47a3a;
  --panel: rgba(255, 255, 255, 0.58);
  --shadow: 0 22px 60px rgba(21, 32, 27, 0.1);
  --radius: 18px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    radial-gradient(1000px 520px at 8% -8%, rgba(42, 122, 99, 0.2), transparent 55%),
    radial-gradient(820px 480px at 92% 4%, rgba(196, 122, 58, 0.14), transparent 52%),
    radial-gradient(700px 420px at 50% 110%, rgba(42, 122, 99, 0.08), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg-deep));
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: var(--accent-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }

.page-shell {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0 3rem;
  position: relative;
  z-index: 1;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.25rem;
  backdrop-filter: blur(8px);
}

.brand {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand span { color: var(--accent); }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.15rem;
}
.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
  position: relative;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.2rem;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}
.nav a:hover::after,
.nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"],
.nav a:hover { color: var(--ink); }

.header-end {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
}
.lang-switch {
  display: flex;
  gap: 0.35rem;
}
.lang-switch a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
}
.lang-switch a:hover,
.lang-switch a[aria-current="true"] {
  color: var(--accent-deep);
  border-color: rgba(42, 122, 99, 0.35);
  background: rgba(42, 122, 99, 0.1);
}

.hero-stage {
  position: relative;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 2rem;
  align-items: center;
  min-height: min(72vh, 640px);
  padding: 2.5rem 0 3rem;
  isolation: isolate;
}

.hero-atmosphere {
  position: absolute;
  inset: -10% -8% auto -8%;
  height: 120%;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  border-radius: 28px;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(28px);
  opacity: 0.7;
  animation: drift 14s ease-in-out infinite;
}
.orb-a {
  width: 280px;
  height: 280px;
  left: 8%;
  top: 10%;
  background: radial-gradient(circle, rgba(42, 122, 99, 0.45), transparent 70%);
}
.orb-b {
  width: 220px;
  height: 220px;
  right: 12%;
  top: 22%;
  background: radial-gradient(circle, rgba(196, 122, 58, 0.35), transparent 70%);
  animation-delay: -4s;
}
.orb-c {
  width: 180px;
  height: 180px;
  left: 42%;
  bottom: 8%;
  background: radial-gradient(circle, rgba(24, 79, 64, 0.28), transparent 70%);
  animation-delay: -8s;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(21, 32, 27, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 32, 27, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 30% 40%, #000 20%, transparent 75%);
  opacity: 0.55;
}

.hero-noise {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

.hero-copy { max-width: 40rem; position: relative; }
.hero-kicker {
  margin: 0 0 0.9rem;
  color: var(--ink-soft);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
.hero-kicker::before {
  content: "";
  width: 1.5rem;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-warm));
}

.hero-brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 10vw, 6.4rem);
  line-height: 0.9;
  letter-spacing: -0.045em;
  font-weight: 700;
}
.brand-word { color: var(--ink); }
.brand-num {
  background: linear-gradient(120deg, var(--accent) 20%, var(--accent-warm) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
  animation: shimmer 6s ease-in-out infinite;
  background-size: 200% 200%;
}

.hero-lead {
  margin: 1.25rem 0 1.7rem;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  max-width: 34rem;
}

.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.hero-signal {
  justify-self: end;
  width: min(240px, 70vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  position: relative;
  text-align: center;
}
.signal-ring {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  border: 1px solid rgba(42, 122, 99, 0.35);
  box-shadow:
    inset 0 0 40px rgba(42, 122, 99, 0.08),
    0 0 0 18px rgba(255, 255, 255, 0.2);
  animation: spinSlow 28s linear infinite;
}
.signal-ring::before,
.signal-ring::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(196, 122, 58, 0.4);
}
.signal-ring::before { inset: 12%; }
.signal-ring::after { inset: 28%; border-style: solid; border-color: rgba(42, 122, 99, 0.2); }
.signal-core {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: 3.4rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--accent-deep);
  text-shadow: 0 10px 30px rgba(42, 122, 99, 0.25);
}
.hero-signal p {
  position: absolute;
  bottom: 18%;
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.72rem 1.2rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.25s var(--ease-out), background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #f5faf7;
  box-shadow: 0 10px 28px rgba(42, 122, 99, 0.28);
}
.btn-primary:hover { color: #fff; }
.btn-glow { position: relative; }
.btn-glow::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(42, 122, 99, 0.35), rgba(196, 122, 58, 0.25));
  z-index: -1;
  filter: blur(10px);
  opacity: 0.7;
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.45);
  border-color: var(--line);
  color: var(--ink);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-deep); }

.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: riseIn 0.9s var(--ease-out) forwards;
}
.reveal[data-delay="1"] { animation-delay: 0.12s; }
.reveal[data-delay="2"] { animation-delay: 0.24s; }
.reveal[data-delay="3"] { animation-delay: 0.36s; }
.reveal[data-delay="4"] { animation-delay: 0.48s; }

.reveal-block {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.reveal-block.is-visible {
  opacity: 1;
  transform: none;
}

@keyframes riseIn {
  to { opacity: 1; transform: none; }
}
@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(18px, -22px) scale(1.08); }
}
@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@keyframes spinSlow {
  to { transform: rotate(360deg); }
}

.home-notes,
.home-side {
  margin-top: 1rem;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1.25rem;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.tag-chip em {
  font-style: normal;
  opacity: 0.65;
  font-size: 0.78rem;
}
.tag-chip:hover,
.tag-chip.is-active {
  color: var(--accent-deep);
  border-color: rgba(42, 122, 99, 0.4);
  background: rgba(42, 122, 99, 0.12);
  transform: translateY(-1px);
}
.tag-chip.sm {
  padding: 0.15rem 0.55rem;
  font-size: 0.78rem;
}

.note-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  width: 100%;
  gap: 0.85rem;
}
.note-card {
  display: grid;
  width: 100%;
  gap: 0.55rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.note-list.dense .note-card:has(.note-cover) {
  grid-template-columns: 140px minmax(0, 1fr);
  align-items: start;
  gap: 1rem;
}
.note-body {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
}
.note-cover {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: var(--bg-deep);
}
.note-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.note-main {
  display: grid;
  gap: 0.25rem;
  text-decoration: none;
  color: inherit;
}
.note-main strong {
  font-family: var(--font-display);
  font-size: 1.2rem;
}
.note-main span,
.note-main time {
  color: var(--ink-soft);
  font-size: 0.92rem;
}
.note-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.ext-link,
.ext-banner a {
  color: var(--accent-deep);
  font-size: 0.88rem;
  font-weight: 600;
}
.ext-banner {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: rgba(42, 122, 99, 0.08);
  border: 1px solid rgba(42, 122, 99, 0.18);
  margin: 0 0 1.25rem;
  word-break: break-all;
}

@media (max-width: 860px) {
  .note-list.dense .note-card:has(.note-cover) {
    grid-template-columns: 1fr;
  }
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}
.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
}
.section-head a { font-size: 0.92rem; }

.feed-list, .link-list, .tool-list, .track-preview, .post-list, .playlist, .tool-grid {
  list-style: none;
  margin: 0;
  padding: 0;
}
.feed-list li a,
.tool-list li a {
  display: grid;
  gap: 0.2rem;
  padding: 0.95rem 0.2rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: padding-left 0.3s var(--ease-out), background 0.3s ease;
  border-radius: 8px;
}
.feed-list li a:hover,
.tool-list li a:hover {
  padding-left: 0.55rem;
  background: linear-gradient(90deg, rgba(42, 122, 99, 0.08), transparent);
}
.feed-list time, .post-item time, .page-head time {
  color: var(--ink-soft);
  font-size: 0.86rem;
}
.feed-list strong, .tool-list strong { font-size: 1.05rem; }
.feed-list span, .tool-list span { color: var(--ink-soft); font-size: 0.95rem; }

.link-list li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}
.link-list p, .tags { margin: 0.25rem 0 0; color: var(--ink-soft); font-size: 0.92rem; }

.home-music {
  margin-top: 2.5rem;
  padding: 1.25rem 1.35rem;
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.55), rgba(42, 122, 99, 0.08));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.track-preview li, .playlist li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}
.playlist li {
  grid-template-columns: 56px auto 1fr;
}
.track-preview strong, .track-meta strong { display: block; }
.track-preview span, .track-meta span { color: var(--ink-soft); font-size: 0.9rem; }

.play-btn {
  min-width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.play-btn:hover, .play-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: scale(1.05);
}
.play-btn.is-active {
  box-shadow: 0 0 0 6px rgba(42, 122, 99, 0.15);
  animation: pulseSoft 1.8s ease-in-out infinite;
}
@keyframes pulseSoft {
  0%, 100% { box-shadow: 0 0 0 6px rgba(42, 122, 99, 0.12); }
  50% { box-shadow: 0 0 0 12px rgba(42, 122, 99, 0.05); }
}

.player-panel {
  display: grid;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  margin-bottom: 1.5rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.player-panel[hidden] { display: none; }
.player-panel audio { width: 100%; }
.player-panel span { display: block; color: var(--ink-soft); font-size: 0.9rem; }
.player-error {
  margin: 0;
  color: #a33;
  font-size: 0.88rem;
}
.player-error[hidden] { display: none; }

.page-head { margin-bottom: 1.5rem; max-width: 40rem; }
.page-head h1 {
  margin: 0.2rem 0 0.4rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.8rem);
  letter-spacing: -0.03em;
}
.page-head p { margin: 0; color: var(--ink-soft); }

.post-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1.1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}
.post-item h2 { margin: 0.2rem 0 0.4rem; font-size: 1.3rem; font-family: var(--font-display); }
.post-item h2 a { color: inherit; text-decoration: none; }
.post-cover img, .post-hero-image img, .photo-grid img, .track-cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
}
.post-cover {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: var(--bg-deep);
}
.post-hero-image { margin: 0 0 1.5rem; }
.post-hero-image img { max-height: 420px; width: 100%; object-fit: cover; }

.prose {
  max-width: 42rem;
  font-size: 1.05rem;
  white-space: pre-wrap;
}
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.85rem;
  margin: 2rem 0;
}
.photo-grid figure { margin: 0; }
.photo-grid figcaption { margin-top: 0.35rem; color: var(--ink-soft); font-size: 0.85rem; }

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.tool-grid a {
  display: grid;
  gap: 0.45rem;
  padding: 1.1rem;
  min-height: 140px;
  text-decoration: none;
  color: inherit;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.3s var(--ease-out), border-color 0.3s ease;
}
.tool-grid a:hover {
  transform: translateY(-4px);
  border-color: rgba(42, 122, 99, 0.35);
}
.tool-grid strong { font-family: var(--font-display); font-size: 1.2rem; }
.tool-grid span, .tool-grid em { color: var(--ink-soft); font-style: normal; }
.tool-actions { display: flex; gap: 0.75rem; margin: 1.25rem 0; flex-wrap: wrap; }

.track-cover {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: linear-gradient(135deg, #c7d7cf, #9fb8ad);
}
.track-cover.placeholder { opacity: 0.7; }

.muted { color: var(--ink-soft); }
.back-link { margin-top: 2rem; }
.site-footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.form-error { color: #9b2c2c; }
.form-success {
  color: var(--accent-deep);
  background: rgba(47, 107, 90, 0.1);
  border: 1px solid rgba(47, 107, 90, 0.25);
  border-radius: 12px;
  padding: 0.85rem 1rem;
}
.contact-form {
  display: grid;
  gap: 0.95rem;
  max-width: 560px;
}
.contact-form label {
  display: grid;
  gap: 0.35rem;
  font-weight: 500;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  background: rgba(255, 255, 255, 0.72);
}
.contact-form .hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.admin-body { background: #f3f5f2; }
.admin-shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.admin-shell.login-only { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.25rem;
  background: #1c2420;
  color: #e8eee9;
}
.admin-nav a, .admin-nav .linkish {
  color: #d7e2db;
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.admin-nav .brand { color: #fff; margin-bottom: 0.75rem; }
.admin-main { padding: 1.5rem; }
.admin-main h1 { font-family: var(--font-display); margin-top: 0; }
.admin-form { display: grid; gap: 0.9rem; max-width: 640px; }
.admin-form.narrow { max-width: 360px; }
.admin-form label { display: grid; gap: 0.35rem; font-weight: 500; }
.admin-form label small { font-weight: 400; }
.admin-form input, .admin-form textarea, .admin-form select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  background: #fff;
}
.admin-form .checkbox { display: flex; align-items: center; gap: 0.5rem; }
.admin-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; }
.admin-table th, .admin-table td { padding: 0.75rem 0.85rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.admin-table .actions { display: flex; gap: 0.75rem; align-items: center; }
.linkish { background: none; border: 0; color: var(--accent-deep); cursor: pointer; font: inherit; padding: 0; }
.linkish.danger { color: #9b2c2c; }
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}
.stat-grid a {
  display: grid;
  gap: 0.2rem;
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
}
.stat-grid strong { font-size: 1.8rem; font-family: var(--font-display); }
.existing-images { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.existing-images img { border-radius: 8px; object-fit: cover; height: 80px; width: 80px; }

@media (max-width: 860px) {
  .hero-stage,
  .home-grid,
  .post-item,
  .admin-shell { grid-template-columns: 1fr; }
  .hero-stage { min-height: auto; padding-top: 1.5rem; }
  .hero-signal { justify-self: start; width: 180px; margin-top: 0.5rem; }
  .playlist li { grid-template-columns: 48px auto 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .site-header { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-block,
  .orb,
  .brand-num,
  .signal-ring,
  .play-btn.is-active,
  .btn {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
