:root {
  --bg: #f4f7f4;
  --surface: #ffffff;
  --surface-soft: #f8fbf8;
  --text: #172033;
  --muted: #627086;
  --border: #d9e1ea;
  --accent: #0f766e;
  --accent-strong: #0b5d57;
  --accent-soft: #e8fbf6;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "SUIT Variable", "Pretendard Variable", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.09), transparent 28%),
    radial-gradient(circle at top right, rgba(148, 163, 184, 0.12), transparent 26%),
    linear-gradient(180deg, #effaf6 0%, var(--bg) 280px);
}

a {
  color: inherit;
}

.site-shell {
  max-width: 1040px;
  margin: 0 auto;
  padding: 28px 20px 80px;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(217, 225, 234, 0.92);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.site-logo,
.site-nav-link {
  text-decoration: none;
}

.site-logo {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  min-height: 56px;
  padding: 0;
  color: var(--text);
}

.site-logo-mark {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0;
}

.site-logo-sub {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-nav-menu {
  display: flex;
  justify-content: flex-end;
  flex: 1;
}

.site-nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(248, 251, 248, 0.96);
  border: 1px solid rgba(217, 225, 234, 0.88);
}

.site-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  transition:
    background-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.site-nav-link:hover,
.site-nav-link:focus-visible,
.site-nav-link.active {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.site-nav-link:hover,
.site-nav-link:focus-visible {
  transform: translateY(-1px);
}

.site-nav-link.active {
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.18);
}

.hero,
.panel,
.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero {
  padding: 36px;
  background: linear-gradient(135deg, #ffffff 0%, #f0fdfa 100%);
}

.hero-banner {
  padding: 0;
  overflow: hidden;
  background: #e9eef4;
  aspect-ratio: 16 / 4;
}

.hero-banner-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.home-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 24px;
}

.hero-copy {
  flex: 1 1 520px;
  min-width: 0;
}

.hero h1 {
  margin: 0 0 12px;
  font-family: "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  font-size: 42px;
  line-height: 1.06;
  letter-spacing: -0.025em;
}

.hero p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.7;
}

.hero-actions,
.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hero-actions-prominent {
  flex: 0 1 auto;
  align-items: center;
  justify-content: flex-start;
  margin-top: 0;
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.button-link,
.ghost-link,
.inline-link,
.section-title-link {
  text-decoration: none;
}

.section-title-link {
  color: inherit;
}

.section-title-link:hover,
.section-title-link:focus-visible {
  color: var(--accent-strong);
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 14px;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
}

.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 14px;
  border-radius: 8px;
  background: #ffffff;
  color: var(--accent);
  border: 1px solid #99f6e4;
}

.panel {
  padding: 28px;
  margin-top: 18px;
}

.panel h2,
.post-list-heading {
  margin: 0 0 12px;
  font-size: 24px;
}

.panel p,
.panel li,
.post-card p,
.post-body p,
.post-body li {
  color: var(--muted);
  line-height: 1.7;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.feature-link {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfb 100%);
  box-shadow: var(--shadow-soft);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.feature-link:hover,
.feature-link:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(15, 118, 110, 0.24);
  box-shadow: var(--shadow);
}

.feature-link span {
  color: var(--accent-strong);
  font-size: 18px;
  font-weight: 800;
}

.feature-link small {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.post-grid {
  display: grid;
  gap: 14px;
}

.diary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.diary-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.post-card {
  padding: 20px;
}

.diary-card {
  padding: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.post-card h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.diary-card h3,
.diary-preview-copy h3 {
  margin: 0 0 8px;
  font-size: 24px;
}

.post-card time,
.post-meta {
  display: block;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 10px;
}

.diary-date,
.diary-mood {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 8px;
}

.diary-preview {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.8fr);
  gap: 20px;
  align-items: end;
}

.diary-preview-copy p:last-child {
  margin-bottom: 0;
}

.diary-preview-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}

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

.photo-gallery-head h2 {
  margin-bottom: 8px;
}

.photo-gallery-note {
  margin: 0 0 16px;
}

.photo-gallery-controls {
  display: flex;
  gap: 8px;
}

.photo-gallery-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--accent-strong);
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
  box-shadow: var(--shadow-soft);
}

.photo-gallery-nav:hover,
.photo-gallery-nav:focus-visible {
  background: var(--accent-soft);
}

.photo-gallery-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(260px, 72vw, 420px);
  gap: 14px;
  overflow-x: auto;
  padding: 2px 2px 12px;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.photo-gallery-empty {
  margin: 0;
  color: var(--muted);
}

.photo-gallery-empty[hidden] {
  display: none;
}

.photo-slide {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: var(--shadow-soft);
  scroll-snap-align: start;
}

.photo-slide-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: zoom-in;
}

.photo-slide-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  background: #e7edf3;
}

.photo-slide-button:hover .photo-slide-image,
.photo-slide-button:focus-visible .photo-slide-image {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.photo-slide-button:focus-visible {
  outline: 2px solid rgba(15, 118, 110, 0.35);
  outline-offset: 3px;
}

.photo-slide-copy h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.photo-slide-copy p {
  margin: 0;
  color: var(--muted);
}

.photo-archive-panel {
  display: grid;
  gap: 18px;
}

.photo-archive-head h2 {
  margin-bottom: 8px;
}

.photo-archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.photo-archive-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: var(--shadow-soft);
}

.photo-archive-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: zoom-in;
}

.photo-archive-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  background: #e7edf3;
}

.photo-archive-button:hover .photo-archive-image,
.photo-archive-button:focus-visible .photo-archive-image {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.photo-archive-button:focus-visible {
  outline: 2px solid rgba(15, 118, 110, 0.35);
  outline-offset: 3px;
}

.photo-archive-copy h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.photo-archive-copy p {
  margin: 0;
  color: var(--muted);
}

.api-guide-panel {
  display: grid;
  gap: 18px;
}

.api-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.api-guide-card,
.api-endpoint-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbfa 100%);
  box-shadow: var(--shadow-soft);
}

.api-guide-card strong {
  font-size: 18px;
  color: var(--accent-strong);
}

.api-guide-card p,
.api-endpoint-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.api-endpoint-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.api-endpoint-head code {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.api-endpoint-method {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.lightbox-open {
  overflow: hidden;
}

.photo-lightbox[hidden] {
  display: none;
}

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
}

.photo-lightbox-figure {
  display: grid;
  gap: 14px;
  width: min(920px, 100%);
  margin: 0;
}

.photo-lightbox-image {
  display: block;
  max-width: 100%;
  max-height: 78vh;
  margin: 0 auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.26);
  background: #ffffff;
}

.photo-lightbox-caption {
  color: #ffffff;
  text-align: center;
}

.photo-lightbox-caption strong {
  display: block;
  font-size: 18px;
}

.photo-lightbox-caption p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.78);
}

.photo-lightbox-close {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}

.diary-hero {
  background:
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.14), transparent 36%),
    linear-gradient(135deg, #ffffff 0%, #f6fffd 100%);
}

.archive-hero {
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.12), transparent 34%),
    radial-gradient(circle at bottom right, rgba(148, 163, 184, 0.16), transparent 30%),
    linear-gradient(135deg, #ffffff 0%, #f4fbff 100%);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.home-pagination {
  justify-content: center;
  align-items: center;
}

.home-page-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.pagination-link.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.pagination-link.disabled,
.pagination-link:disabled {
  opacity: 0.45;
  cursor: default;
}

.post-card .inline-link,
.post-header .inline-link,
.diary-card .inline-link {
  color: var(--accent);
}

.post-layout {
  max-width: 820px;
}

.post-header {
  margin-bottom: 20px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  margin-bottom: 16px;
  padding: 0 12px;
  border-radius: 999px;
  text-decoration: none;
  background: var(--surface-soft);
  border: 1px solid rgba(217, 225, 234, 0.96);
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: 700;
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.back-link:hover,
.back-link:focus-visible {
  transform: translateY(-1px);
  background: var(--accent-soft);
  box-shadow: var(--shadow-soft);
}

.neighbor-panel {
  margin-top: 18px;
}

.neighbor-list {
  display: grid;
  gap: 10px;
}

.neighbor-item {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

.neighbor-item:hover,
.neighbor-item:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(15, 118, 110, 0.22);
  box-shadow: var(--shadow-soft);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfb 100%);
}

.neighbor-date {
  color: var(--muted);
  font-size: 13px;
}

.neighbor-title {
  color: var(--accent-strong);
  font-weight: 700;
}

.post-header h1 {
  margin: 0 0 10px;
  font-family: "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  font-size: 38px;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

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

.post-body h1 {
  font-size: 30px;
}

.post-body h2 {
  font-size: 24px;
}

.post-body h3 {
  font-size: 20px;
}

.post-body ul,
.post-body ol {
  padding-left: 22px;
}

.post-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: #edf4f7;
  color: #164e63;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid rgba(217, 225, 234, 0.92);
  font-size: 0.95em;
}

.post-body pre {
  margin: 14px 0 18px;
  padding: 18px 18px 16px;
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid rgba(30, 41, 59, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0) 28px),
    linear-gradient(135deg, #132033 0%, #0f172a 100%);
  color: #e8eef7;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 24px rgba(15, 23, 42, 0.12);
  line-height: 1.65;
}

.post-body pre code {
  display: block;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: 13px;
}

.post-body .content-figure {
  margin: 18px 0 22px;
  padding: 18px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfb 100%);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.post-body .content-figure img {
  display: inline-block;
  width: min(160px, 100%);
  height: auto;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.post-body .content-figure figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.post-tag {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 700;
}

.site-footer {
  margin-top: 40px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.visit-counter {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
}

.visit-counter span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(217, 225, 234, 0.92);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-soft);
  color: var(--muted);
}

.visit-counter strong {
  color: var(--accent-strong);
  font-weight: 800;
}

.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.94);
  color: var(--accent-strong);
  border: 1px solid rgba(217, 225, 234, 0.96);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
  font-size: 14px;
  line-height: 1;
  z-index: 20;
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  transform: translateY(-2px);
  background: var(--accent-soft);
  color: var(--accent);
}

@media (max-width: 720px) {
  .site-shell {
    padding-top: 18px;
  }

  .site-nav {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
  }

  .site-logo {
    align-items: center;
    text-align: center;
  }

  .site-logo-mark {
    font-size: 28px;
  }

  .site-nav-menu {
    width: 100%;
  }

  .site-nav-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    border-radius: 18px;
  }

  .site-nav-link {
    min-width: 0;
    padding: 0 12px;
    font-size: 14px;
  }

  .home-hero {
    align-items: stretch;
  }

  .hero-actions-prominent {
    margin-top: 8px;
  }

  .diary-preview {
    grid-template-columns: 1fr;
  }

  .hero h1,
  .post-header h1 {
    font-size: 32px;
  }

  .hero,
  .panel {
    padding: 22px;
  }

  .hero-banner {
    padding: 0;
    aspect-ratio: 16 / 5;
  }

  .hero-banner-image {
    width: 100%;
  }

  .neighbor-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .back-to-top {
    right: 14px;
    bottom: 14px;
    width: 38px;
    height: 38px;
  }
}
