:root {
  color-scheme: dark;
  --bg: #171b1d;
  --bg-elevated: #1e2326;
  --panel: #232a2e;
  --panel-soft: #272e33;
  --line: #374145;
  --text: #d3c6aa;
  --muted: #9da9a0;
  --faint: #7a8478;
  --primary: #a7c080;
  --secondary: #7fbbb3;
  --aqua: #83c092;
  --highlight: #dbbc7f;
  --accent: #e69875;
  --accent-strong: #e67e80;
  --danger: #e67e80;
  --shadow: 0 24px 80px rgba(7, 10, 10, 0.58);
  --radius: 8px;
  --max: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 38%, rgba(127, 187, 179, 0.045), transparent 38rem);
  opacity: 0.34;
}

.ambient-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

::selection {
  background: rgba(167, 192, 128, 0.3);
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 999px;
  border: 2px solid var(--bg);
}

.site-shell {
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.main-content {
  padding-top: 72px;
}

.site-nav {
  position: fixed;
  z-index: 50;
  inset: 0 0 auto 0;
  border-bottom: 1px solid rgba(211, 198, 170, 0.08);
  background: rgba(23, 27, 29, 0.9);
  backdrop-filter: blur(18px);
}

.nav-inner {
  width: min(var(--max), calc(100% - 32px));
  height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 760;
  letter-spacing: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(167, 192, 128, 0.48);
  border-radius: 50%;
  color: var(--primary);
  background: rgba(167, 192, 128, 0.1);
}

.brand-text {
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a,
.mobile-menu a {
  color: var(--muted);
  border-radius: var(--radius);
  transition: color 180ms ease, background 180ms ease;
}

.nav-links a {
  padding: 8px 10px;
  font-size: 0.92rem;
}

.nav-links a:hover,
.nav-links a.is-active,
.mobile-menu a:hover,
.mobile-menu a.is-active {
  color: var(--text);
  background: rgba(167, 192, 128, 0.11);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--panel);
}

.mobile-menu {
  display: none;
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(30, 35, 38, 0.98);
  box-shadow: var(--shadow);
}

.mobile-menu.is-open {
  display: grid;
  gap: 4px;
}

.mobile-menu a {
  padding: 10px 12px;
}

.section,
.hero-section,
.page-section {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.hero-section {
  padding: 72px 0 42px;
}

.section,
.page-section {
  padding: 60px 0;
}

.section + .section {
  border-top: 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}

.hero-copy {
  min-width: 0;
}

.eyebrow,
.section-kicker,
.card-kicker {
  margin: 0 0 12px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-title {
  max-width: 760px;
  margin: 0;
  font-size: clamp(3rem, 7vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero-subtitle {
  max-width: 720px;
  margin: 24px 0 0;
  color: var(--text);
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  line-height: 1.35;
}

.hero-intro {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--muted);
}

.hero-actions,
.social-row,
.section-actions,
.tag-row,
.article-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.gallery-actions {
  margin-bottom: 18px;
}

.hero-actions {
  margin-top: 28px;
}

.social-row {
  margin-top: 22px;
}

.button,
.icon-button,
.chip,
.filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--panel);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.button {
  padding: 10px 14px;
  font-weight: 720;
}

.button.primary {
  color: var(--bg);
  border-color: var(--primary);
  background: var(--primary);
}

.button:hover,
.icon-button:hover,
.filter-button:hover,
.chip:hover {
  transform: translateY(-2px);
  border-color: rgba(167, 192, 128, 0.58);
}

.button.primary:hover {
  background: var(--highlight);
}

.icon-button {
  width: 42px;
  height: 42px;
}

.button .feather,
.icon-button .feather,
.brand-mark .feather {
  width: 18px;
  height: 18px;
}

.profile-panel {
  position: relative;
  width: min(100%, 360px);
  justify-self: start;
}

.portrait-frame {
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  border: 1px solid rgba(211, 198, 170, 0.14);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-facts {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.fact-line {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(35, 42, 46, 0.82);
}

.fact-line .feather {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--highlight);
}

.fact-line span {
  color: var(--muted);
  font-size: 0.93rem;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  margin-bottom: 28px;
}

.section-heading h2,
.page-heading h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.section-heading p,
.page-heading p {
  max-width: 680px;
  margin: 12px 0 0;
  color: var(--muted);
}

.post-controls,
.gallery-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 24px;
}

.gallery-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.gallery-controls {
  flex: 1;
  margin-bottom: 0;
}

.filter-button {
  min-height: 36px;
  padding: 7px 11px;
  color: var(--muted);
}

.filter-button.is-active {
  color: var(--bg);
  border-color: var(--primary);
  background: var(--primary);
}

.post-card h3 {
  margin: 0;
  line-height: 1.25;
}

.article-body ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.post-card,
.empty-panel,
.gallery-item,
.page-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(35, 42, 46, 0.78);
}

.post-card p,
.empty-panel p {
  color: var(--muted);
}

.post-card p {
  margin-bottom: 0;
}

.empty-panel {
  padding: 24px;
}

.publication-list {
  display: grid;
  gap: 14px;
}

.publication-list.single-column {
  max-width: 760px;
}

.publication-copy {
  padding: 18px;
}

.publication-copy h3 {
  margin-top: 0;
}

.publication-meta,
.post-meta,
.article-meta {
  color: var(--highlight);
  font-size: 0.9rem;
  font-weight: 700;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.post-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
}

.post-card-image {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--panel-soft);
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 360ms ease;
}

.post-card:hover .post-card-image img,
.gallery-item:hover img {
  transform: scale(1.045);
}

.post-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px;
}

.post-card-body p {
  flex: 1;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  color: var(--accent);
  font-weight: 760;
}

.chip {
  min-height: 30px;
  padding: 4px 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.tag-row {
  margin-top: 12px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 12px;
}

.gallery-item {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  color: var(--text);
  text-align: left;
  padding: 0;
}

.gallery-item.large {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-item.tall {
  grid-row: span 2;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  transition: transform 360ms ease;
}

.gallery-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 46px 14px 14px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), transparent);
}

.gallery-caption strong {
  display: block;
  line-height: 1.2;
}

.gallery-caption-text {
  display: block;
  margin-top: 4px;
  color: rgba(211, 198, 170, 0.78);
  font-size: 0.86rem;
}

.gallery-tag-row {
  margin-top: 10px;
  gap: 6px;
}

.gallery-tag-row .chip {
  min-height: 26px;
  border-color: rgba(211, 198, 170, 0.18);
  color: rgba(211, 198, 170, 0.86);
  background: rgba(23, 27, 29, 0.76);
  font-size: 0.76rem;
}

.page-heading {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0 22px;
}

.search-input {
  width: min(100%, 420px);
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--text);
  background: var(--panel);
  outline: none;
}

.search-input:focus {
  border-color: var(--primary);
}

.contact-footer {
  margin-top: 48px;
  border-top: 1px solid rgba(167, 192, 128, 0.24);
  background:
    linear-gradient(180deg, rgba(127, 187, 179, 0.04), rgba(23, 27, 29, 0) 38%),
    rgba(23, 27, 29, 0.78);
  box-shadow: inset 0 1px 0 rgba(211, 198, 170, 0.04);
}

.contact-inner {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 40px;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 14px;
}

.contact-inner .section-kicker {
  margin-bottom: 0;
}

.contact-line {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  transition: color 180ms ease;
}

.contact-line:hover {
  color: var(--text);
}

.contact-line .feather {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: var(--secondary);
}

.footer-links {
  margin-top: 0;
}

.footer-links .icon-button {
  border-color: rgba(167, 192, 128, 0.26);
  background: rgba(35, 42, 46, 0.84);
}

.article-shell {
  width: min(900px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0 40px;
}

.article-hero {
  margin-bottom: 34px;
}

.article-hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.article-hero p {
  color: var(--muted);
}

.article-cover {
  overflow: hidden;
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
}

.article-cover img {
  width: 100%;
  height: auto;
}

.article-body {
  color: var(--muted);
  font-size: 1.04rem;
}

.article-body h2,
.article-body h3 {
  margin: 44px 0 12px;
  color: var(--text);
  line-height: 1.25;
}

.article-body p {
  margin: 0 0 18px;
}

.article-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-figure {
  margin: 34px 0;
  text-align: center;
}

.article-figure img {
  width: min(100%, 680px);
  height: auto;
  margin: 0 auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: transparent;
}

.article-figure figcaption {
  margin-top: 10px;
  color: var(--faint);
  font-size: 0.92rem;
}

.modal {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.74);
}

.modal.is-open {
  display: flex;
}

.modal-panel {
  width: min(980px, 100%);
  max-height: calc(100vh - 48px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
}

.modal-image {
  max-height: 70vh;
  width: 100%;
  object-fit: contain;
  background: #171b1d;
}

.modal-copy {
  padding: 16px 18px 18px;
}

.modal-copy h3 {
  margin: 0;
}

.modal-copy p {
  margin: 6px 0 0;
  color: var(--muted);
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .profile-panel {
    max-width: 420px;
    justify-self: center;
  }

  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .hero-section,
  .page-heading {
    padding-top: 44px;
  }

  .section-heading {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .gallery-toolbar {
    flex-direction: column;
  }

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

@media (max-width: 560px) {
  .nav-inner,
  .section,
  .hero-section,
  .page-section,
  .page-heading,
  .article-shell,
  .contact-inner {
    width: min(100% - 24px, var(--max));
  }

  .brand-text {
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero-actions .button,
  .article-actions .button,
  .section-actions .button {
    width: 100%;
  }

  .contact-inner {
    gap: 12px;
  }

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

  .gallery-item.large,
  .gallery-item.tall {
    grid-column: auto;
    grid-row: auto;
  }
}
