/*
Theme Name: Thaumaturgy
Theme URI: https://thaumaturgy.animax.moe/
Author: Animax
Description: A spectral editorial theme for experiments, field notes, and machine curiosities.
Version: 1.0.0
Text Domain: thaumaturgy
*/

:root {
  --void: #07070a;
  --ink: #101116;
  --paper: #eeeee8;
  --muted: #9b9da8;
  --faint: rgba(238, 238, 232, .1);
  --line: rgba(238, 238, 232, .16);
  --acid: #c6ff4a;
  --violet: #aa8cff;
  --cyan: #54e9ff;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", Iowan Old Style, Baskerville, serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", Inter, ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--void);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
body::before {
  position: fixed;
  z-index: -2;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 7% 12%, rgba(84, 233, 255, .14), transparent 26rem),
    radial-gradient(circle at 86% 18%, rgba(170, 140, 255, .16), transparent 31rem),
    radial-gradient(circle at 62% 90%, rgba(198, 255, 74, .08), transparent 25rem),
    var(--void);
}
body::after {
  position: fixed;
  z-index: -1;
  inset: 0;
  content: "";
  opacity: .22;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}
a { color: inherit; text-decoration-color: rgba(198, 255, 74, .55); text-underline-offset: .18em; }
a:hover { color: var(--acid); }
img { display: block; height: auto; max-width: 100%; }
button { font: inherit; }

.site-shell { width: min(1240px, calc(100% - 48px)); margin: 0 auto; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 13px; font-weight: 800; letter-spacing: .18em; text-decoration: none; text-transform: uppercase; }
.brand-mark { display: grid; width: 24px; aspect-ratio: 1; place-items: center; border: 1px solid var(--acid); border-radius: 50%; color: var(--acid); font-size: 13px; box-shadow: 0 0 22px rgba(198,255,74,.25); }
.site-nav .menu { display: flex; gap: 25px; margin: 0; padding: 0; list-style: none; }
.site-nav a { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-decoration: none; text-transform: uppercase; }
.site-nav .current-menu-item a, .site-nav a:hover { color: var(--paper); }
.menu-toggle { display: none; padding: 7px; border: 0; color: var(--paper); background: transparent; cursor: pointer; }
.menu-toggle span { display: block; width: 24px; height: 1px; margin: 5px; background: currentColor; }

.hero { display: grid; min-height: min(720px, calc(100vh - 90px)); grid-template-columns: 1.15fr .85fr; align-items: center; gap: 48px; padding: 74px 0 90px; }
.eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 20px; color: var(--acid); font-size: 11px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.eyebrow::before { width: 25px; height: 1px; content: ""; background: currentColor; }
.hero h1 { max-width: 780px; margin: 0; font-family: var(--serif); font-size: clamp(4.25rem, 10.7vw, 9.75rem); font-weight: 400; letter-spacing: -.075em; line-height: .78; }
.hero h1 em { color: var(--cyan); font-style: italic; text-shadow: 0 0 52px rgba(84,233,255,.19); }
.hero-copy { max-width: 510px; margin: 30px 0 0; color: #c7c7c0; font-family: var(--serif); font-size: clamp(1.16rem, 2vw, 1.5rem); line-height: 1.4; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 17px; align-items: center; margin-top: 34px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 18px; border: 1px solid var(--acid); background: var(--acid); color: #12140c; font-size: 11px; font-weight: 900; letter-spacing: .13em; text-decoration: none; text-transform: uppercase; transition: transform .2s ease, box-shadow .2s ease; }
.button:hover { color: #12140c; box-shadow: 5px 5px 0 var(--violet); transform: translate(-2px, -2px); }
.text-link { color: var(--paper); font-size: 12px; font-weight: 700; letter-spacing: .11em; text-decoration: none; text-transform: uppercase; }
.hero-art { position: relative; width: min(100%, 410px); aspect-ratio: .84; justify-self: end; border: 1px solid var(--line); background: linear-gradient(146deg, rgba(255,255,255,.09), rgba(255,255,255,.015)); box-shadow: inset 0 0 70px rgba(84,233,255,.04); overflow: hidden; }
.hero-art::before { position: absolute; inset: 8%; content: ""; border: 1px solid rgba(198,255,74,.45); border-radius: 50%; animation: pulse-ring 4s ease-in-out infinite; }
.hero-art::after { position: absolute; inset: 22%; content: "✶"; color: var(--acid); font-family: var(--serif); font-size: clamp(9rem, 18vw, 14rem); line-height: .76; text-align: center; text-shadow: 0 0 60px rgba(198,255,74,.6); transform: rotate(-14deg); }
.orbit { position: absolute; top: 13%; left: 18%; width: 67%; aspect-ratio: 1; border: 1px solid rgba(84,233,255,.5); border-radius: 48% 52% 50% 50%; transform: rotate(43deg); animation: drift 11s linear infinite; }
.art-index { position: absolute; right: 16px; bottom: 15px; color: var(--muted); font-size: 10px; letter-spacing: .16em; }
@keyframes pulse-ring { 50% { transform: scale(.84); opacity: .4; } }
@keyframes drift { to { transform: rotate(403deg); } }

.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head h2 { margin: 0; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.section-head p { max-width: 430px; margin: 0; color: var(--muted); font-size: 13px; text-align: right; }
.notes { padding: 23px 0 90px; }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-left: 1px solid var(--line); }
.note-card { display: flex; min-height: 370px; flex-direction: column; padding: 25px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(16,17,22,.38); transition: background .25s ease, transform .25s ease; }
.note-card:hover { background: rgba(170,140,255,.11); transform: translateY(-6px); }
.note-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.note-meta a { color: var(--acid); text-decoration: none; }
.note-card h3 { margin: 32px 0 13px; font-family: var(--serif); font-size: clamp(1.7rem, 2.7vw, 2.45rem); font-weight: 400; letter-spacing: -.035em; line-height: 1.02; }
.note-card h3 a { text-decoration: none; }
.note-card p { margin: 0; color: #bbbcb7; font-size: 14px; }
.read-more { margin-top: auto; padding-top: 28px; color: var(--cyan); font-size: 11px; font-weight: 800; letter-spacing: .13em; text-decoration: none; text-transform: uppercase; }
.empty-note { grid-column: 1 / -1; padding: 45px 25px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); }

.signal { display: grid; grid-template-columns: .7fr 1.3fr; gap: 1px; margin-bottom: 90px; background: var(--line); border: 1px solid var(--line); }
.signal-label, .signal-copy { padding: 32px; background: var(--ink); }
.signal-label { color: var(--acid); font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.signal-copy { color: #c2c2bc; font-family: var(--serif); font-size: clamp(1.3rem, 2.5vw, 2rem); line-height: 1.2; }
.signal-copy strong { color: var(--paper); font-weight: 400; }
.site-footer { display: flex; justify-content: space-between; gap: 20px; padding: 24px 0 36px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }

.entry-wrap { width: min(890px, 100%); padding: 76px 0 98px; }
.entry-kicker { margin-bottom: 21px; color: var(--acid); font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.entry-title { max-width: 860px; margin: 0; font-family: var(--serif); font-size: clamp(3.6rem, 9vw, 7.5rem); font-weight: 400; letter-spacing: -.065em; line-height: .84; }
.entry-date { margin: 25px 0 42px; color: var(--muted); font-size: 12px; }
.entry-content { max-width: 720px; color: #d1d1ca; font-family: var(--serif); font-size: clamp(1.15rem, 2vw, 1.4rem); line-height: 1.62; }
.entry-content > * { margin-top: 0; margin-bottom: 1.5em; }
.entry-content h2, .entry-content h3 { color: var(--paper); font-family: var(--sans); font-size: 1.2rem; letter-spacing: .01em; }
.entry-content pre, .entry-content code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.entry-content pre { overflow-x: auto; padding: 18px; background: #11131a; border-left: 2px solid var(--acid); color: #dddfd3; font-size: .82rem; }
.entry-content blockquote { margin-left: 0; padding-left: 24px; border-left: 1px solid var(--violet); color: var(--cyan); }
.entry-content a { color: var(--acid); }
.entry-content figure { margin-right: 0; margin-left: 0; }
.entry-content figcaption { color: var(--muted); font-family: var(--sans); font-size: .75rem; }
.post-navigation { display: flex; justify-content: space-between; gap: 20px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 12px; }
.post-navigation a { color: var(--acid); }

@media (max-width: 760px) {
  .site-shell { width: min(100% - 32px, 1240px); }
  .site-header { padding: 18px 0; }
  .menu-toggle { display: block; }
  .site-nav { position: absolute; z-index: 3; top: 67px; right: 16px; left: 16px; display: none; padding: 15px; border: 1px solid var(--line); background: #13141a; }
  .site-nav.is-open { display: block; }
  .site-nav .menu { display: block; }
  .site-nav li + li { margin-top: 13px; }
  .hero { grid-template-columns: 1fr; min-height: auto; gap: 40px; padding: 62px 0 66px; }
  .hero h1 { font-size: clamp(4.1rem, 22vw, 7rem); }
  .hero-art { width: min(100%, 360px); justify-self: start; }
  .section-head { display: block; }
  .section-head p { margin-top: 10px; text-align: left; }
  .post-grid { grid-template-columns: 1fr; }
  .note-card { min-height: 290px; }
  .signal { grid-template-columns: 1fr; }
  .site-footer { display: block; }
  .site-footer span + span { display: block; margin-top: 7px; }
  .entry-wrap { padding: 55px 0 72px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
