:root {
  --bg: #cfd5dd;
  --paper: rgba(246, 248, 251, 0.72);
  --paper-strong: #f8fafc;
  --ink: #10161d;
  --muted: #5f6975;
  --line: rgba(16, 22, 29, 0.1);
  --accent: #0f6fff;
  --accent-deep: #0a56c2;
  --olive: #435163;
  --shadow: 0 24px 80px rgba(18, 25, 36, 0.18);
  --serif: "New York", "Iowan Old Style", "Palatino Linotype", serif;
  --sans: "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  background:
    radial-gradient(circle at 15% 18%, rgba(255, 255, 255, 0.92), transparent 18%),
    radial-gradient(circle at 85% 20%, rgba(179, 203, 255, 0.72), transparent 22%),
    radial-gradient(circle at 50% 100%, rgba(141, 154, 176, 0.35), transparent 32%),
    linear-gradient(180deg, #bcc5d2 0%, var(--bg) 44%, #dce3eb 100%);
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.14) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.75), transparent);
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.page-shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.site-chrome,
.hero,
.archive-panel,
.post-modal .modal-post {
  backdrop-filter: blur(18px);
}

.site-chrome {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 34px;
  background: linear-gradient(180deg, rgba(249, 251, 254, 0.62), rgba(236, 241, 247, 0.7));
  box-shadow:
    0 18px 44px rgba(56, 68, 84, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 8px 20px;
}

.window-title-group {
  text-align: left;
}

.window-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: transparent;
  border: 0;
  padding: 0;
  border-radius: 8px;
  color: rgba(16, 22, 29, 0.78);
  transition: transform 180ms ease, opacity 180ms ease, color 180ms ease;
  cursor: pointer;
}

.social-link:hover,
.social-link:focus-visible {
  color: rgba(16, 22, 29, 1);
  transform: translateY(-2px);
  opacity: 1;
}

.social-link img {
  display: block;
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.blinking-cursor {
  display: inline-block;
  width: 0.08em;
  height: 0.92em;
  margin-left: 0.14em;
  vertical-align: -0.08em;
  background: var(--accent-deep);
  border-radius: 999px;
  animation: blink 1s steps(1) infinite;
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: end;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.68), rgba(241, 245, 250, 0.78));
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.76rem;
  color: var(--accent-deep);
}

.hero h1,
.section-heading h2,
.archive-header h2,
.modal-post h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  line-height: 0.95;
}

.hero h1 {
  max-width: 12ch;
  font-size: clamp(2.9rem, 6vw, 5.9rem);
  letter-spacing: -0.045em;
}

.hero-text,
.hero-card-note,
.results-meta,
.modal-post p,
.modal-post li {
  color: var(--muted);
  line-height: 1.7;
}

.hero-text {
  max-width: 60ch;
  margin: 18px 0 0;
  font-size: 1.04rem;
}

.layout {
  margin-top: 24px;
}

.archive-panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: var(--shadow);
  padding: 18px 18px 28px;
}

.meta-row,
.post-card-meta,
.modal-meta {
  color: var(--accent-deep);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ghost-link,
.inline-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  text-decoration: none;
}

.ghost-link {
  width: fit-content;
  padding: 10px 16px;
  color: #fff;
  background: var(--accent);
  transition: transform 180ms ease, background 180ms ease;
}

.ghost-link:hover,
.ghost-link:focus-visible {
  background: var(--accent-deep);
  transform: translateY(-1px);
}

.archive-header {
  display: flex;
  gap: 24px;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 18px;
}

.search {
  width: min(100%, 360px);
}

.search input {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid rgba(31, 27, 23, 0.14);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: inset 0 1px 1px rgba(16, 22, 29, 0.04);
}

.results-meta {
  min-height: 22px;
  margin: 0 4px 16px;
  font-size: 0.92rem;
}

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

.post-card {
  position: relative;
  display: block;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 18px 36px rgba(17, 23, 35, 0.1);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.post-card:hover,
.post-card:has(.post-card-hitbox:focus-visible) {
  transform: translateY(-4px);
  box-shadow: 0 24px 42px rgba(17, 23, 35, 0.18);
}

.post-card-hitbox {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.post-card-media {
  position: relative;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(15, 111, 255, 0.22), rgba(67, 81, 99, 0.16)),
    #e8eef5;
  background-size: cover;
  background-position: center;
  min-height: 240px;
}

.post-card-media::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(180deg, rgba(7, 10, 15, 0.04) 0%, rgba(7, 10, 15, 0.16) 42%, rgba(7, 10, 15, 0.58) 72%, rgba(7, 10, 15, 0.94) 100%),
    linear-gradient(0deg, rgba(7, 10, 15, 0.14), rgba(7, 10, 15, 0.14));
}

.post-card-body {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  padding: 34px 18px 18px;
  color: #f6f8fb;
  background: linear-gradient(180deg, rgba(7, 10, 15, 0) 0%, rgba(7, 10, 15, 0.2) 20%, rgba(7, 10, 15, 0.42) 55%, rgba(7, 10, 15, 0.72) 100%);
}

.post-card h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.04;
  text-shadow: 0 4px 22px rgba(0, 0, 0, 0.62);
}

.post-card-meta {
  margin: 0 0 10px;
  color: rgba(244, 247, 252, 0.96);
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.54);
}

.post-card:nth-child(5n + 1) .post-card-media {
  min-height: 380px;
}

.post-card:nth-child(5n + 2) .post-card-media {
  min-height: 260px;
}

.post-card:nth-child(5n + 3) .post-card-media {
  min-height: 320px;
}

.post-card:nth-child(5n + 4) .post-card-media {
  min-height: 290px;
}

.post-card:nth-child(5n + 5) .post-card-media {
  min-height: 420px;
}

.post-modal {
  width: min(920px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  padding: 0;
  border: 0;
  border-radius: 28px;
  background: transparent;
}

.contact-modal {
  width: min(760px, calc(100vw - 24px));
  padding: 0;
  border: 0;
  border-radius: 28px;
  background: transparent;
}

.contact-modal::backdrop {
  background: rgba(20, 14, 10, 0.45);
  backdrop-filter: blur(6px);
}

.post-modal::backdrop {
  background: rgba(20, 14, 10, 0.55);
  backdrop-filter: blur(6px);
}

.close-modal {
  position: sticky;
  top: 16px;
  z-index: 2;
  margin: 16px 16px 0 auto;
  padding: 10px 14px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(31, 27, 23, 0.8);
  cursor: pointer;
}

.modal-post {
  margin: 0 12px 12px;
  padding: 32px;
  overflow: auto;
  border: 1px solid rgba(255, 250, 243, 0.28);
  border-radius: 28px;
  background: rgba(248, 250, 252, 0.96);
}

.contact-sheet {
  margin: 0 12px 12px;
  padding: 32px;
  border: 1px solid rgba(255, 250, 243, 0.28);
  border-radius: 28px;
  background: rgba(248, 250, 252, 0.98);
}

.contact-copy h2 {
  margin: 4px 0 10px;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 500;
  letter-spacing: -0.03em;
}

.contact-kicker {
  margin: 0;
  color: var(--accent-deep);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-form {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.contact-form label {
  display: grid;
  gap: 8px;
}

.contact-form span {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(16, 22, 29, 0.12);
  border-radius: 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
}

.contact-form textarea {
  resize: vertical;
  min-height: 160px;
}

.contact-submit {
  width: fit-content;
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--ink);
  cursor: pointer;
}

.contact-status {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
}

.contact-honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

.modal-post h1 {
  font-size: clamp(2.6rem, 4vw, 4.2rem);
}

.modal-post img {
  max-width: 100%;
  height: auto;
  border-radius: 18px;
}

.modal-post a {
  color: var(--accent-deep);
}

.modal-content-body {
  margin-top: 24px;
  color: var(--ink);
  font-family: "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1.04rem;
  line-height: 1.8;
}

.modal-content-body,
.modal-content-body * {
  font-family: "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif !important;
  color: inherit !important;
}

.modal-content-body p,
.modal-content-body li,
.modal-content-body div,
.modal-content-body span {
  font-size: 1.04rem !important;
  line-height: 1.8 !important;
}

.modal-content-body h2,
.modal-content-body h3,
.modal-content-body h4 {
  margin-top: 1.7em;
  margin-bottom: 0.6em;
  font-family: "New York", "Iowan Old Style", "Palatino Linotype", serif !important;
  line-height: 1.15 !important;
  letter-spacing: -0.02em;
}

.modal-content-body ul,
.modal-content-body ol {
  padding-left: 1.3rem;
}

.modal-content-body a {
  color: var(--accent-deep) !important;
  text-decoration-thickness: 1px;
}

.modal-content-body img {
  display: block;
  margin: 1.5rem auto;
}

.modal-content-body .separator {
  text-align: center !important;
}

.empty-state {
  padding: 30px 20px;
  text-align: center;
  border: 1px dashed rgba(31, 27, 23, 0.14);
  border-radius: 20px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.45);
}

@media (max-width: 980px) {
  .window-bar {
    flex-wrap: wrap;
  }

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

  .page-shell {
    width: min(100vw - 20px, 1180px);
    padding-top: 18px;
  }

  .hero,
  .archive-panel,
  .modal-post {
    border-radius: 24px;
  }

  .post-card-media {
    min-height: 240px;
  }
}

@media (max-width: 640px) {
  .post-list {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero,
  .archive-panel,
  .post-card {
    animation: rise-in 680ms ease both;
  }

  .post-card:nth-child(2n) {
    animation-duration: 760ms;
  }

  .post-card:nth-child(3n) {
    animation-duration: 840ms;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes blink {
  0%,
  49% {
    opacity: 1;
  }

  50%,
  100% {
    opacity: 0;
  }
}
