@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Public+Sans:wght@400;500;600&display=swap");

:root {
  --bg: #fdfcf9;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-strong: #ffffff;
  --line: rgba(21, 29, 34, 0.12);
  --line-strong: rgba(21, 29, 34, 0.2);
  --text: #1b2328;
  --muted: #5d676f;
  --accent: #163a59;
  --accent-soft: #eef3f8;
  --shadow: 0 18px 50px rgba(17, 29, 38, 0.07);
  --max-width: 1120px;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Public Sans", "Helvetica Neue", sans-serif;
  background:
    linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7)),
    linear-gradient(90deg, rgba(21, 29, 34, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(21, 29, 34, 0.04) 1px, transparent 1px),
    radial-gradient(circle at top left, rgba(209, 223, 235, 0.45), transparent 28%);
  background-color: var(--bg);
  background-size: auto, 36px 36px, 36px 36px, auto;
  line-height: 1.65;
}

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

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

button,
input,
textarea {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
}

.site-header,
.site-footer,
.page {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 0;
}

.site-mark {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.site-mark h1,
.site-mark p,
.page h1,
.page h2,
.page h3,
.page h4 {
  margin: 0;
}

.site-mark-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.85rem, 3vw, 2.4rem);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.site-mark-subtitle {
  color: var(--muted);
  font-size: 0.95rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.site-nav a {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.65rem 1rem;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  background: rgba(255, 255, 255, 0.78);
  border-color: var(--line);
}

.page {
  padding: 1rem 0 4rem;
}

.hero,
.grid-two,
.card-grid,
.post-grid,
.video-grid,
.admin-grid {
  display: grid;
  gap: 1.5rem;
}

.hero {
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.85fr);
  align-items: center;
  padding: 3rem 0 2.5rem;
}

.hero-copy {
  max-width: 42rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1,
.page-intro h1,
.section-heading h2,
.post-header h1 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(3.2rem, 6vw, 5.1rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
}

.hero-role {
  margin: 1rem 0 0;
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: 600;
}

.hero-summary,
.page-intro p {
  max-width: 42rem;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-actions,
.post-meta,
.tag-row,
.preview-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.hero-actions {
  margin-top: 0.4rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.85rem 1.45rem;
  background: var(--surface-strong);
  color: var(--text);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: 0 12px 26px rgba(17, 29, 38, 0.08);
}

.button-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.74);
}

.hero-portrait {
  justify-self: end;
  width: min(100%, 440px);
}

.portrait-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(21, 29, 34, 0.08);
  background: linear-gradient(180deg, rgba(234, 238, 242, 0.9), #ffffff);
  box-shadow: var(--shadow);
}

.portrait-frame::before {
  content: "";
  position: absolute;
  inset: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: calc(var(--radius-lg) - 10px);
  pointer-events: none;
}

.panel,
.feature-card,
.status-card,
.post-card,
.video-card,
.post-view,
.post-list-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.panel,
.status-card,
.post-view {
  padding: 1.4rem;
}

.panel-accent {
  background: linear-gradient(180deg, rgba(243, 247, 251, 0.95), #ffffff);
}

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

.plain-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.section-heading,
.page-intro {
  margin: 2.75rem 0 1.25rem;
}

.card-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.feature-card,
.post-card,
.video-card,
.post-list-item {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 1.35rem;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.feature-card:hover,
.post-card:hover,
.video-card:hover,
.post-list-item:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.feature-index {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.feature-card h3,
.post-card h3,
.video-card h3,
.post-list-item h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2rem;
  line-height: 1;
}

.feature-card p,
.post-card p,
.video-card p,
.post-list-item p,
.status-card,
.microcopy,
.meta-text {
  margin: 0;
  color: var(--muted);
}

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

.page-home .post-grid {
  margin-bottom: 2rem;
}

.post-list {
  display: grid;
  gap: 1rem;
}

.post-list-item {
  gap: 0.6rem;
}

.post-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: var(--accent);
  font-weight: 600;
}

.tag-row {
  margin-top: auto;
}

.tag {
  border-radius: 999px;
  padding: 0.28rem 0.75rem;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
}

.status-card {
  margin-bottom: 1rem;
}

.status-card.is-hidden {
  display: none;
}

.status-compact {
  margin-top: 1rem;
}

.status-success {
  border-color: rgba(25, 105, 63, 0.25);
  background: rgba(244, 251, 247, 0.92);
  color: #1a5f3c;
}

.status-error {
  border-color: rgba(154, 28, 28, 0.25);
  background: rgba(254, 246, 246, 0.95);
  color: #7c1f1f;
}

.video-card iframe {
  aspect-ratio: 16 / 9;
  width: 100%;
  border: 0;
  border-radius: 12px;
}

.post-view {
  width: min(100%, 860px);
  margin: 2rem auto 0;
  padding: 2rem;
}

.post-header {
  margin-bottom: 1.4rem;
}

.post-header h1 {
  font-size: clamp(2.8rem, 5vw, 4.4rem);
}

.rich-copy {
  color: var(--text);
  font-size: 1.04rem;
}

.rich-copy h1,
.rich-copy h2,
.rich-copy h3,
.rich-copy h4 {
  margin: 2rem 0 0.75rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  line-height: 1.05;
}

.rich-copy h2 {
  font-size: 2.2rem;
}

.rich-copy h3 {
  font-size: 1.8rem;
}

.rich-copy p,
.rich-copy ul,
.rich-copy ol,
.rich-copy blockquote,
.rich-copy pre {
  margin: 0 0 1rem;
}

.rich-copy ul,
.rich-copy ol {
  padding-left: 1.35rem;
}

.rich-copy blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  color: var(--muted);
}

.rich-copy code,
.rich-copy pre {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.95rem;
}

.rich-copy a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.rich-copy pre {
  overflow-x: auto;
  border-radius: 14px;
  padding: 1rem;
  background: #f5f7f8;
  border: 1px solid rgba(21, 29, 34, 0.08);
}

.admin-grid {
  grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.18fr);
  align-items: start;
}

.stack-form {
  display: grid;
  gap: 1rem;
}

.stack-form label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.94rem;
  color: var(--text);
}

.stack-form input,
.stack-form textarea {
  width: 100%;
  border: 1px solid rgba(21, 29, 34, 0.14);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
}

.stack-form textarea {
  resize: vertical;
}

.preview-body {
  min-height: 240px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-link {
  color: var(--accent);
  font-weight: 600;
}

@media (max-width: 980px) {
  .hero,
  .grid-two,
  .card-grid,
  .post-grid,
  .video-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 1.2rem;
  }

  .hero-portrait {
    justify-self: start;
    max-width: 360px;
  }

  .site-header,
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .site-header,
  .site-footer,
  .page {
    width: min(calc(100% - 1.25rem), var(--max-width));
  }

  .hero h1,
  .page-intro h1,
  .section-heading h2,
  .post-header h1 {
    font-size: clamp(2.6rem, 15vw, 3.6rem);
  }

  .site-nav {
    width: 100%;
  }

  .site-nav a {
    flex: 1 1 calc(50% - 0.5rem);
    text-align: center;
  }

  .post-view {
    padding: 1.3rem;
  }
}
