:root {
  --bg: #f6efe3;
  --bg-deep: #efe4d4;
  --surface: rgba(255, 250, 243, 0.75);
  --text: #22170f;
  --muted: #645448;
  --line: rgba(34, 23, 15, 0.1);
  --accent: #b4572f;
  --shadow: 0 24px 80px rgba(84, 48, 25, 0.15);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Manrope", system-ui, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 210, 179, 0.6), transparent 26rem),
    radial-gradient(circle at top right, rgba(205, 226, 255, 0.7), transparent 24rem),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  min-height: 100vh;
}

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

code,
pre {
  font-family: "SFMono-Regular", "Consolas", monospace;
}

code {
  background: rgba(180, 87, 47, 0.08);
  border-radius: 0.4rem;
  padding: 0.15rem 0.35rem;
}

pre {
  overflow-x: auto;
  background: #241a13;
  color: #f8efe7;
  border-radius: 1rem;
  padding: 1rem;
}

.page-shell {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
}

.page-glow {
  position: fixed;
  width: 22rem;
  height: 22rem;
  border-radius: 999px;
  filter: blur(40px);
  opacity: 0.35;
  pointer-events: none;
}

.page-glow-left {
  left: -6rem;
  top: 6rem;
  background: #ffc89e;
}

.page-glow-right {
  right: -5rem;
  top: 16rem;
  background: #b9d8ff;
}

.site-frame {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
  position: relative;
}

.hero,
.info-grid,
.posts-section,
.article-shell {
  animation: rise 700ms ease both;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 1.5rem;
  align-items: stretch;
  padding: 4rem 0 2rem;
}

.hero-copy-block,
.hero-panel,
.featured-card,
.contact-showcase article,
.page-hero,
.about-card,
.timeline-card,
.tag-card,
.site-footer {
  backdrop-filter: blur(10px);
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow);
}

.hero-copy-block {
  padding: 1rem 0;
}

.hero-panel {
  border-radius: 1.6rem;
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-avatar,
.brand-mark {
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #241a13, #7a4a2d);
  color: #fff7ef;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero-avatar-large {
  width: 4.5rem;
  height: 4.5rem;
  font-size: 1.25rem;
}

.hero-stats {
  margin: 1.25rem 0 0;
  display: grid;
  gap: 0.8rem;
}

.hero-stats div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

.hero-stats dt {
  color: var(--muted);
}

.hero-stats dd {
  margin: 0;
  font-weight: 700;
}

.hero-location {
  margin: 1rem 0 0;
  color: var(--muted);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-copy {
  display: grid;
}

.brand-copy strong {
  font-size: 1rem;
}

.brand-copy small,
.topnav {
  color: var(--muted);
  font-size: 0.92rem;
}

.topnav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.topnav a {
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
}

.nav-avatar {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid rgba(34, 23, 15, 0.12);
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 10px 30px rgba(84, 48, 25, 0.12);
}

.nav-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.topnav a:hover,
.featured-link:hover {
  background: rgba(180, 87, 47, 0.08);
}

.featured-card {
  border-radius: 1.6rem;
  padding: 1.4rem;
  margin-bottom: 2rem;
}

.qr-card,
.contact-bottom {
  margin-top: 2.4rem;
}

.contact-bottom .qr-card {
  margin-top: 1rem;
}

.qr-card {
  border-radius: 1.6rem;
  padding: 1.3rem;
}

.qr-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
}

.qr-placeholder {
  aspect-ratio: 1 / 1;
  border-radius: 1.3rem;
  background:
    linear-gradient(135deg, rgba(36, 26, 19, 0.08), rgba(180, 87, 47, 0.15)),
    #fffaf3;
  border: 1px dashed rgba(34, 23, 15, 0.18);
  display: grid;
  place-items: center;
}

.qr-grid {
  width: 72%;
  height: 72%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.45rem;
}

.qr-grid span {
  display: block;
  border-radius: 0.35rem;
  background: #241a13;
}

.qr-grid span:nth-child(3n) {
  background: #b4572f;
}

.qr-copy h2,
.contact-bottom h3 {
  margin: 0;
  font-family: "Fraunces", "Noto Serif SC", serif;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
}

.qr-copy p {
  color: var(--muted);
  line-height: 1.8;
}

.contact-links {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 0.6rem;
}

.featured-card h2,
.page-hero h1,
.about-card h2,
.timeline h2 {
  margin: 0;
  font-family: "Fraunces", "Noto Serif SC", serif;
}

.featured-card h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.featured-link {
  display: inline-flex;
  margin-top: 0.4rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
}

.page-hero {
  border-radius: 1.6rem;
  padding: 1.6rem;
  margin: 1rem 0 1.5rem;
}

.page-hero h1 {
  font-size: clamp(2.7rem, 7vw, 5rem);
}

.about-grid,
.tag-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.studio-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.studio-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.studio-heading-row .hero-copy {
  margin-bottom: 0;
}

.studio-shell.is-locked {
  display: none;
}

.admin-gate {
  min-height: 60vh;
  display: grid;
  place-items: center;
}

.admin-gate-card {
  width: min(100%, 34rem);
  backdrop-filter: blur(10px);
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow);
  border-radius: 1.8rem;
  padding: 1.5rem;
}

.admin-gate-card h1 {
  margin: 0;
  font-family: "Fraunces", "Noto Serif SC", serif;
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  line-height: 1;
}

.about-card,
.tag-card {
  border-radius: 1.4rem;
  padding: 1.2rem;
}

.studio-panel,
.studio-preview-card {
  backdrop-filter: blur(10px);
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow);
  border-radius: 1.6rem;
  padding: 1.25rem;
}

.studio-panel {
  display: grid;
  gap: 1rem;
}

.studio-field-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
}

.studio-field {
  display: grid;
  gap: 0.45rem;
}

.studio-field span {
  font-size: 0.95rem;
  font-weight: 700;
}

.studio-field input,
.studio-field textarea,
.studio-field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.95rem 1rem;
  font: inherit;
  color: var(--text);
  background: rgba(255, 255, 255, 0.6);
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.studio-field textarea {
  resize: vertical;
  min-height: 22rem;
  line-height: 1.7;
}

.studio-field input:focus,
.studio-field textarea:focus,
.studio-field select:focus {
  border-color: rgba(180, 87, 47, 0.45);
  box-shadow: 0 0 0 4px rgba(180, 87, 47, 0.08);
}

.studio-upload-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  font-weight: 700;
}

.upload-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.studio-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.studio-hint {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.studio-status {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.studio-status[data-type="success"] {
  color: #2c6b3f;
}

.studio-status[data-type="error"] {
  color: #a33b2b;
}

.studio-status a {
  text-decoration: underline;
  font-weight: 700;
}

.studio-preview-head {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.studio-preview-head h2 {
  margin: 0;
  font-family: "Fraunces", "Noto Serif SC", serif;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1;
}

.studio-cover-preview {
  max-height: 28rem;
  margin: 1rem 0;
}

.studio-manager {
  margin: 1.5rem 0 3rem;
  backdrop-filter: blur(10px);
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow);
  border-radius: 1.6rem;
  padding: 1.25rem;
}

.studio-manager-heading,
.studio-post-card,
.studio-post-title-row,
.studio-post-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.studio-manager-heading,
.studio-post-card {
  justify-content: space-between;
}

.studio-manager-heading h2,
.studio-post-title-row h3 {
  margin: 0;
}

.studio-post-list {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
}

.studio-post-card {
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.4);
}

.studio-post-content {
  min-width: 0;
}

.studio-post-title-row {
  flex-wrap: wrap;
}

.studio-post-meta,
.studio-post-description,
.studio-empty {
  color: var(--muted);
  margin: 0.35rem 0 0;
}

.studio-post-description {
  line-height: 1.6;
}

.studio-post-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 800;
}

.studio-post-badge.is-public {
  color: #215d35;
  background: #dff4e5;
}

.studio-post-badge.is-hidden {
  color: #7a5522;
  background: #f8ead0;
}

.button-small {
  padding: 0.65rem 0.9rem;
  font-size: 0.9rem;
}

.button-danger {
  color: #9d2f23;
  border: 1px solid rgba(157, 47, 35, 0.25);
  background: rgba(255, 235, 231, 0.8);
}

.about-profile {
  grid-row: span 2;
}

.timeline {
  margin-top: 2rem;
}

.timeline-card {
  border-radius: 1.4rem;
  padding: 1.2rem;
}

.tag-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.tag-card span {
  color: var(--muted);
}

.site-footer {
  margin-top: 2rem;
  border-radius: 1.4rem;
  padding: 1.2rem 1.4rem;
}

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

.hero h1,
.article-header h1,
.section-heading h2 {
  margin: 0;
  font-family: "Fraunces", "Noto Serif SC", serif;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.hero h1 {
  font-size: clamp(3rem, 10vw, 6.4rem);
  max-width: 12ch;
}

.hero-copy {
  max-width: 42rem;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.9rem 1.3rem;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
  border: 0;
  cursor: pointer;
  font: inherit;
}

.button:disabled {
  cursor: wait;
  opacity: 0.6;
  transform: none;
}

.button:hover,
.post-card:hover,
.back-link:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--text);
  color: #fff7ef;
  box-shadow: var(--shadow);
}

.button-secondary {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.4);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 2rem 0 3.2rem;
}

.info-card,
.post-card,
.article-shell {
  backdrop-filter: blur(10px);
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow);
}

.info-card {
  padding: 1.4rem;
  border-radius: 1.4rem;
}

.info-card h2 {
  margin: 0 0 0.6rem;
  font-family: "Fraunces", "Noto Serif SC", serif;
  font-size: 1.35rem;
}

.info-card p,
.post-card p,
.article-description,
.article-meta,
.article-content {
  color: var(--muted);
  line-height: 1.8;
}

.section-heading {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.2rem;
}

.section-heading h2 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
}

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

.post-card {
  display: block;
  padding: 1.5rem;
  border-radius: 1.5rem;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.post-card-cover,
.featured-cover,
.article-cover,
.studio-cover-preview {
  width: 100%;
  display: block;
  object-fit: cover;
  border-radius: 1.1rem;
}

.post-card-cover {
  max-height: 22rem;
  margin-bottom: 1rem;
}

.featured-cover {
  max-height: 30rem;
  margin-bottom: 1rem;
}

.article-cover {
  max-height: 40rem;
  margin: 0.5rem 0 1.5rem;
}

.post-card:hover {
  border-color: rgba(180, 87, 47, 0.35);
  box-shadow: 0 30px 80px rgba(84, 48, 25, 0.18);
}

.post-card-meta,
.article-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.92rem;
}

.post-card h3 {
  margin: 0.8rem 0 0.5rem;
  font-size: 1.7rem;
  font-family: "Fraunces", "Noto Serif SC", serif;
}

.post-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.view-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  background: rgba(180, 87, 47, 0.08);
  color: var(--text);
  font-weight: 700;
}

.article-shell {
  margin-top: 2rem;
  padding: 1.4rem;
  border-radius: 1.8rem;
}

.back-link {
  display: inline-flex;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
}

.article-header {
  padding: 1.6rem 0 0.8rem;
}

.article-header h1 {
  font-size: clamp(2.7rem, 7vw, 5rem);
  margin-bottom: 1rem;
}

.article-description {
  font-size: 1.08rem;
  max-width: 42rem;
}

.article-content {
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  font-size: 1.06rem;
}

.article-content h2,
.article-content h3 {
  color: var(--text);
  font-family: "Fraunces", "Noto Serif SC", serif;
  line-height: 1.15;
  margin-top: 2.3rem;
}

.article-content p,
.article-content li {
  line-height: 1.95;
}

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

.article-content blockquote {
  margin: 1.6rem 0;
  padding: 0.2rem 1rem;
  border-left: 4px solid var(--accent);
  background: rgba(255, 216, 191, 0.35);
  border-radius: 0.8rem;
}

.article-content img {
  max-width: 100%;
  border-radius: 1rem;
}

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

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

@media (max-width: 820px) {
  .site-frame {
    width: min(100% - 1rem, 1100px);
  }

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

  .topbar {
    gap: 0.8rem;
  }

  .about-grid,
  .tag-grid,
  .studio-layout,
  .studio-field-grid {
    grid-template-columns: 1fr;
  }

  .studio-heading-row {
    display: grid;
  }

  .studio-manager-heading,
  .studio-post-card {
    align-items: stretch;
    flex-direction: column;
  }

  .studio-post-actions .button {
    flex: 1;
  }

  .qr-card {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 3rem;
  }

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

  .article-shell {
    padding: 1rem;
  }
}
