/*
Theme Name: Cyscy Minimal
Theme URI: https://cyscy.xyz
Author: OpenAI Codex
Description: A lightweight custom theme for cyscy.xyz focused on readability and low resource usage.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: cyscy-minimal
*/

:root {
  --bg: #f5f1e8;
  --surface: rgba(255, 251, 245, 0.92);
  --text: #1d1c1a;
  --muted: #6f685d;
  --line: rgba(29, 28, 26, 0.12);
  --accent: #b54d2f;
  --accent-deep: #6b2f1f;
  --shadow: 0 24px 60px rgba(61, 41, 25, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --content: 1120px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(216, 144, 109, 0.22), transparent 32%),
    radial-gradient(circle at top right, rgba(55, 89, 116, 0.15), transparent 24%),
    linear-gradient(180deg, #efe8db 0%, #f7f4ee 36%, #f5f1e8 100%);
  font-family: "Noto Serif SC", "Source Han Serif SC", "PingFang SC", serif;
  line-height: 1.75;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-deep); }
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(0, 0, 0, 0.015) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 0, 0, 0.015) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(circle at center, black 45%, transparent 82%);
}
.site-shell { width: min(calc(100% - 32px), var(--content)); margin: 0 auto; }
.site-header { position: sticky; top: 0; z-index: 40; backdrop-filter: blur(18px); background: rgba(247, 244, 238, 0.82); border-bottom: 1px solid rgba(29, 28, 26, 0.08); }
.site-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 14px; font-weight: 700; letter-spacing: 0.04em; }
.brand-mark { width: 48px; height: 48px; border-radius: 18px; overflow: hidden; box-shadow: 0 12px 28px rgba(41, 32, 24, 0.18); background: linear-gradient(145deg, #e49a71, #8b4028); flex: 0 0 auto; }
.brand-mark img, .brand-mark .custom-logo { width: 100%; height: 100%; object-fit: cover; }
.brand-text { display: flex; flex-direction: column; gap: 2px; }
.brand-name { font-size: 1.1rem; }
.brand-tag { font-size: 0.72rem; color: var(--muted); letter-spacing: 0.16em; text-transform: uppercase; }
.site-nav ul { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin: 0; padding: 0; list-style: none; }
.site-nav a { display: inline-flex; align-items: center; min-height: 42px; padding: 0 16px; border-radius: 999px; color: var(--muted); transition: 180ms ease; }
.site-nav a:hover, .site-nav .current-menu-item > a, .site-nav .current-menu-ancestor > a, .site-nav .current-cat > a { background: rgba(181, 77, 47, 0.1); color: var(--accent-deep); }
.hero { padding: 54px 0 26px; }
.hero-panel { position: relative; overflow: hidden; padding: clamp(28px, 4vw, 48px); border: 1px solid rgba(29, 28, 26, 0.08); border-radius: var(--radius-lg); background: linear-gradient(145deg, rgba(255, 252, 247, 0.94), rgba(246, 236, 223, 0.88)); box-shadow: var(--shadow); }
.hero-panel::after { content: ""; position: absolute; inset: auto -10% -30% auto; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(181, 77, 47, 0.16), transparent 70%); }
.hero-kicker { margin: 0 0 12px; color: var(--accent-deep); font-size: 0.88rem; letter-spacing: 0.22em; text-transform: uppercase; }
.hero-title { margin: 0; max-width: 12ch; font-size: clamp(2.4rem, 5vw, 4.8rem); line-height: 1.02; }
.hero-copy { margin: 18px 0 0; max-width: 760px; color: var(--muted); font-size: 1.02rem; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(29, 28, 26, 0.08); background: rgba(255, 255, 255, 0.58); color: var(--muted); font-size: 0.92rem; }
.posts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; padding: 20px 0 48px; }
.post-card, .content-card { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow); }
.post-card { display: flex; flex-direction: column; overflow: hidden; transition: transform 180ms ease, box-shadow 180ms ease; }
.post-card:hover { transform: translateY(-4px); box-shadow: 0 28px 68px rgba(61, 41, 25, 0.14); }
.post-thumb { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(135deg, rgba(181, 77, 47, 0.18), rgba(55, 89, 116, 0.12)); }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-body { display: grid; gap: 10px; padding: 22px; }
.post-taxonomy, .archive-label { color: var(--muted); font-size: 0.86rem; letter-spacing: 0.06em; text-transform: uppercase; }
.post-title { margin: 0; font-size: clamp(1.25rem, 2vw, 1.65rem); line-height: 1.25; }
.post-title a { display: inline; color: var(--text); }
.post-excerpt { margin: 0; color: var(--muted); }
.content-layout { padding: 28px 0 54px; }
.content-card { padding: clamp(22px, 4vw, 42px); }
.entry-header { margin-bottom: 28px; }
.entry-title { margin: 10px 0 0; font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1.12; }
.entry-content, .entry-summary { font-size: 1.05rem; }
.entry-content p, .entry-summary p { margin: 0 0 1.2em; }
.entry-content h2, .entry-content h3, .entry-content h4 { margin: 1.8em 0 0.7em; line-height: 1.25; }
.entry-content a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.16em; }
.entry-content blockquote { margin: 1.8em 0; padding: 18px 20px; border-left: 4px solid var(--accent); background: rgba(181, 77, 47, 0.06); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.entry-content pre, .entry-content code { font-family: "JetBrains Mono", "SFMono-Regular", monospace; }
.entry-content pre { overflow: auto; padding: 18px; border-radius: var(--radius-sm); background: #1f1c18; color: #f4efe7; }
.entry-footer { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); }
.pagination, .posts-navigation, .post-navigation { display: flex; justify-content: space-between; gap: 16px; margin-top: 28px; }
.page-numbers, .nav-links a, .nav-links span { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,0.72); }
.page-numbers.current { background: var(--accent); color: #fff; border-color: transparent; }
.site-footer { padding: 18px 0 42px; color: var(--muted); }
.footer-panel { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; padding: 18px 22px; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(255, 251, 245, 0.78); }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.not-found { text-align: center; padding: 60px 0; }
.comments-area ol { padding-left: 20px; }
.comments-area .comment-form input, .comments-area .comment-form textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.comments-area .submit { min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--accent); color: #fff; cursor: pointer; }
@media (max-width: 860px) {
  .site-header-inner { flex-direction: column; align-items: flex-start; padding: 14px 0; }
  .site-nav ul { justify-content: flex-start; }
  .posts-grid { grid-template-columns: 1fr; }
  .hero-title { max-width: none; }
}
@media (max-width: 560px) {
  .site-shell { width: min(calc(100% - 20px), var(--content)); }
  .hero, .content-layout { padding-top: 20px; }
  .post-body, .content-card, .hero-panel { padding-left: 18px; padding-right: 18px; }
}

.cyscy-zoomable { cursor: zoom-in; }
.cyscy-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  background: rgba(15, 12, 8, 0.72);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}
.cyscy-lightbox.is-active { opacity: 1; pointer-events: auto; }
.cyscy-lightbox-image {
  max-width: min(1100px, 92vw);
  max-height: 82vh;
  border-radius: 16px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
  background: #fff;
}
.cyscy-lightbox-close {
  position: fixed;
  top: 22px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.92);
  color: #1d1c1a;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}
.cyscy-lightbox-caption {
  max-width: min(960px, 90vw);
  color: #f4efe7;
  font-size: 0.95rem;
  text-align: center;
}
body.lightbox-open { overflow: hidden; }

.comments-area .comment-form {
  display: grid;
  gap: 14px;
}
.comments-area .comment-form label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.92rem;
}
.comments-area .comment-form input,
.comments-area .comment-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
}
.comments-area .comment-form textarea { min-height: 140px; }
.comments-area .submit,
.comments-area .comment-submit {
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.comments-area .submit:hover,
.comments-area .comment-submit:hover {
  background: var(--accent-deep);
}

.share-card {
  display: grid;
  gap: 12px;
}
.share-title {
  font-size: 1.1rem;
  font-weight: 700;
}
.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.share-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
  cursor: pointer;
  transition: 180ms ease;
}
.share-button:hover {
  border-color: rgba(181, 77, 47, 0.4);
  color: var(--accent-deep);
  background: rgba(255, 255, 255, 0.95);
}
.share-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  background: rgba(181, 77, 47, 0.12);
  color: var(--accent-deep);
}
.share-tip {
  color: var(--muted);
  font-size: 0.9rem;
  min-height: 1.2em;
}
