:root {
  --bg: #f3f9f5;
  --surface: #ffffff;
  --surface-soft: #f5fcf7;
  --text: #163125;
  --muted: #486958;
  --primary: #1f8f5f;
  --primary-soft: #ddf5e8;
  --border: #cce7d7;
  --section-divider: color-mix(in oklab, var(--border) 58%, var(--primary) 42%);
  --shadow: 0 16px 34px rgba(20, 70, 46, 0.1);
  --header-bg: rgba(243, 249, 245, 0.9);
}

* {
  box-sizing: border-box;
}

.dark-theme {
  --bg: #0d1f17;
  --surface: #132a1f;
  --surface-soft: #1a3528;
  --text: #e8f8ef;
  --muted: #a1cfb5;
  --primary: #6ad7a2;
  --primary-soft: #1f4734;
  --border: #2c5a42;
  --section-divider: color-mix(in oklab, var(--border) 64%, var(--primary) 36%);
  --shadow: 0 18px 36px rgba(3, 8, 18, 0.45);
  --header-bg: rgba(13, 31, 23, 0.9);
}

body {
  margin: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 8% 12%, #e4f8eb 0%, transparent 36%),
    radial-gradient(circle at 88% 92%, #f0fff6 0%, transparent 32%),
    var(--bg);
}

.dark-theme body {
  background: radial-gradient(circle at 10% 12%, rgba(34, 86, 60, 0.3) 0%, transparent 46%),
    radial-gradient(circle at 88% 88%, rgba(38, 98, 68, 0.26) 0%, transparent 42%),
    var(--bg);
}

.container {
  width: min(1080px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
  backdrop-filter: blur(10px);
}

.header-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-family: "Sora", "Manrope", sans-serif;
  color: var(--text);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.site-nav {
  display: flex;
  gap: 1.15rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.site-nav a {
  font-family: "Sora", "Manrope", sans-serif;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.site-nav a.active,
.site-nav a:hover {
  color: var(--primary);
}

.theme-toggle {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: var(--primary);
}

.main-content {
  padding-block: 1.5rem 4rem;
}

.scroll-section {
  position: relative;
  margin-top: 4.5rem;
  padding-top: 3.35rem;
  scroll-margin-top: 110px;
}

.scroll-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(260px, 68vw);
  height: 2px;
  transform: translate(-50%, -50%);
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--section-divider) 14%,
    color-mix(in oklab, var(--section-divider) 88%, transparent) 50%,
    var(--section-divider) 86%,
    transparent 100%
  );
}

.scroll-section::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 8px;
  height: 8px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: color-mix(in oklab, var(--primary) 58%, var(--surface) 42%);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--bg) 84%, transparent);
}

.scroll-section:first-child {
  margin-top: 0;
  padding-top: 0.8rem;
  min-height: calc(100vh - 170px);
  display: grid;
  align-items: center;
}

.scroll-section:first-child::before,
.scroll-section:first-child::after {
  content: none;
}

#about {
  scroll-margin-top: 110px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 1.5rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 1.6rem;
}

.hero-plain {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.eyebrow {
  margin: 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 800;
}

h1 {
  font-family: "Sora", "Manrope", sans-serif;
  margin: 0.45rem 0 0.75rem;
  font-size: clamp(1.75rem, 4vw, 2.55rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero-name {
  margin-bottom: 0.1rem;
  font-size: clamp(2.1rem, 5.2vw, 3.2rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.hero-role {
  font-family: "Sora", "Manrope", sans-serif;
  margin: 0;
  font-size: clamp(1.02rem, 2.2vw, 1.35rem);
  font-weight: 600;
  color: var(--text);
}

.summary {
  margin: 0.7rem 0 0;
  color: var(--muted);
  line-height: 1.8;
  max-width: 58ch;
}

.links {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.links a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.icon-links {
  gap: 0.75rem;
}

.icon-links a {
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  justify-content: center;
  color: var(--muted);
  background: var(--surface-soft);
  transition: all 0.2s ease;
}

.icon-links a:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-soft);
  text-decoration: none;
}

.links a:hover {
  text-decoration: underline;
}

.profile {
  width: 220px;
  max-width: 100%;
  border-radius: 14px;
  border: 1px solid var(--border);
}

.hero-visual {
  position: relative;
  width: min(420px, 100%);
  justify-self: end;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.hero-visual::before {
  content: none;
}

.hero-visual::after {
  content: none;
}

.ghibli-photo {
  width: min(388px, 100%);
  border: 1px solid color-mix(in oklab, var(--border) 78%, var(--primary) 22%);
  border-radius: 22px;
  box-shadow:
    0 18px 34px color-mix(in oklab, var(--primary) 24%, transparent),
    0 8px 18px rgba(18, 31, 53, 0.16);
  filter: none;
}

.dark-theme .hero-visual::before {
  content: none;
}

.dark-theme .hero-visual::after {
  content: none;
}

.dark-theme .ghibli-photo {
  border-color: color-mix(in oklab, var(--border) 72%, var(--primary) 28%);
  box-shadow:
    0 18px 36px color-mix(in oklab, var(--primary) 26%, transparent),
    0 10px 26px rgba(0, 0, 0, 0.34);
  filter: none;
}

.section-heading h1 {
  margin: 0.2rem 0 0;
  font-size: clamp(1.5rem, 3.2vw, 2rem);
  font-weight: 780;
  letter-spacing: -0.015em;
}

.split-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
}

.section-heading p {
  margin-top: 0.75rem;
  color: var(--muted);
  line-height: 1.75;
  max-width: 64ch;
}

.section-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}

.section-link:hover {
  text-decoration: underline;
}

.plain-list {
  margin-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.plain-item {
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--border);
}

.plain-item h3 {
  font-family: "Sora", "Manrope", sans-serif;
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.plain-item p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-weight: 600;
}

.plain-item span {
  display: inline-block;
  margin-top: 0.22rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.feature-list {
  margin-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.feature-item {
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--border);
}

.feature-item h2 {
  font-family: "Sora", "Manrope", sans-serif;
  margin: 0.15rem 0 0;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

.feature-item h2 a {
  color: var(--text);
  text-decoration: none;
}

.feature-item h2 a:hover {
  color: var(--primary);
}

.feature-item p {
  margin-top: 0.45rem;
  color: var(--muted);
  line-height: 1.72;
}

.contact-list {
  margin-top: 1.25rem;
  display: flex;
  gap: 0.8rem;
}

.contact-list a {
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.link-icon {
  width: 1rem;
  height: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 1rem;
}

.link-icon svg {
  width: 100%;
  height: 100%;
}

.cards {
  margin-top: 1rem;
  display: grid;
  gap: 1rem;
}

.cards.two-col,
.listing-grid,
.terms-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.2rem;
  box-shadow: var(--shadow);
}

.card h2 {
  font-family: "Sora", "Manrope", sans-serif;
  margin: 0;
  font-size: 1.14rem;
  letter-spacing: -0.01em;
}

.card h2 a {
  color: var(--text);
  text-decoration: none;
}

.card h2 a:hover {
  color: var(--primary);
}

.card p {
  margin: 0.6rem 0 0;
  color: var(--muted);
  line-height: 1.72;
}

.kicker {
  margin: 0 0 0.55rem;
  color: var(--primary);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
}

.card-link {
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
}

.card ul {
  margin: 0.85rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.card li {
  margin-bottom: 0.85rem;
}

.card li strong {
  display: block;
  color: var(--text);
}

.card li span {
  font-size: 0.92rem;
}

.meta-row {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.feature-item .meta-row {
  margin-top: 0.55rem;
  margin-bottom: 0.6rem;
}

.feature-item .linked-tags {
  margin-top: 0;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tags span,
.tags a {
  font-size: 0.77rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.16rem 0.56rem;
  color: var(--muted);
  text-decoration: none;
  background: var(--surface-soft);
}

.linked-tags a:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.content {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.content-detail {
  min-height: calc(100vh - 220px);
}

.content .section-heading {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.content .section-heading h1 {
  font-size: clamp(1.7rem, 3.6vw, 2.35rem);
  letter-spacing: -0.02em;
}

.content .meta-row {
  margin-top: 0.75rem;
}

.prose {
  margin-top: 1.25rem;
  color: var(--muted);
  line-height: 1.82;
}

.prose h2,
.prose h3 {
  font-family: "Sora", "Manrope", sans-serif;
  color: var(--text);
  margin-top: 1.35em;
  margin-bottom: 0.35em;
}

.prose p,
.prose ul,
.prose ol,
.prose blockquote {
  max-width: 68ch;
}

.prose p {
  margin: 0.7em 0;
}

.prose a {
  color: var(--primary);
  text-underline-offset: 2px;
}

.prose a:hover {
  opacity: 0.9;
}

.prose pre {
  overflow-x: auto;
  background: var(--surface-soft);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 1rem;
  border-radius: 12px;
}

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.9em;
}

.prose :not(pre) > code {
  color: var(--text);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.12em 0.4em;
}

.term-card {
  text-decoration: none;
  color: var(--text);
}

.term-card p {
  margin-top: 0.35rem;
}

@media (max-width: 820px) {
  .main-content {
    padding-block: 1.2rem 2.4rem;
  }

  .scroll-section {
    margin-top: 3rem;
    padding-top: 2.5rem;
  }

  .scroll-section:first-child {
    min-height: auto;
    display: block;
    padding-top: 0.2rem;
  }

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

  .hero-visual {
    justify-self: start;
    margin-top: 0.9rem;
    width: min(360px, 100%);
  }

  .ghibli-photo {
    width: min(320px, 100%);
  }

  .cards.two-col,
  .listing-grid,
  .terms-grid {
    grid-template-columns: 1fr;
  }

  .site-nav {
    gap: 0.8rem;
    font-size: 0.93rem;
  }

  .split-heading {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-controls {
    gap: 0.55rem;
  }

  .theme-toggle {
    padding: 0.35rem 0.6rem;
    font-size: 0.8rem;
  }

  .content-detail {
    min-height: calc(100vh - 190px);
  }
}
