/* zsgr.org — page-specific styles (theme lives in core.css) */

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: stretch;
  padding-top: var(--header-h);
  overflow: hidden;
}

/* two slow violet lights behind the wordmark; everything else stays black */
.hero-aurora {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.hero-aurora::before, .hero-aurora::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  will-change: transform;
}
.hero-aurora::before {
  width: 62vmax; height: 34vmax;
  left: -18vmax; top: 22%;
  background: radial-gradient(closest-side, rgba(110, 40, 220, 0.42), transparent);
  animation: drift-a 19s ease-in-out infinite alternate;
}
.hero-aurora::after {
  width: 44vmax; height: 30vmax;
  right: -14vmax; top: 6%;
  background: radial-gradient(closest-side, rgba(154, 77, 255, 0.22), transparent);
  animation: drift-b 24s ease-in-out infinite alternate;
}
@keyframes drift-a { to { transform: translate(14vmax, -5vmax) rotate(12deg); } }
@keyframes drift-b { to { transform: translate(-12vmax, 9vmax) rotate(-16deg); } }

.hero-inner {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2.4vw, 28px);
  padding-top: clamp(20px, 5vh, 56px);
  padding-bottom: clamp(24px, 4vw, 44px);
}

.hero-kicker { color: var(--dim); }

.wordmark-wrap {
  position: relative;
  width: fit-content;
  margin-top: auto;
  margin-left: -0.055em;
  font: 900 clamp(110px, 31vw, 430px) / 0.78 var(--f-display);
  letter-spacing: -0.075em;
  user-select: none;
}
.wordmark {
  --mx: 30%;
  --my: 40%;
  position: relative;
  display: block;
  padding-right: 0.08em;
  padding-bottom: 0.12em;
  color: transparent;
  background:
    radial-gradient(0.9em circle at var(--mx) var(--my), #fff 0%, var(--v-hi) 22%, var(--v) 48%, transparent 76%),
    linear-gradient(180deg, var(--ink) 20%, #8d7fa6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  animation: wordmark-in 1.5s var(--ease-out) 0.1s both;
}
/* outlined ghost behind the fill; drifts opposite the pointer for depth */
.wordmark-ghost {
  position: absolute;
  left: 0; top: 0;
  font-family: var(--f-outline);
  color: transparent;
  -webkit-text-stroke: 1px rgba(154, 77, 255, 0.55);
  transform: translate(calc(var(--gx, 10) * 1px), calc(var(--gy, 8) * 1px));
  transition: transform 0.5s var(--ease-out);
  animation: ghost-in 1.8s var(--ease-out) 0.7s both;
}
@keyframes wordmark-in {
  from { clip-path: inset(0 0 100% 0); transform: translateY(0.18em); }
  to { clip-path: inset(-10%); transform: none; }
}
@keyframes ghost-in { from { opacity: 0; } to { opacity: 1; } }

.hero-meta {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: end;
  gap: 16px clamp(24px, 6vw, 80px);
  padding-top: clamp(10px, 2vw, 22px);
  border-top: 1px solid var(--line-2);
}
.hero-aka {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hero-aka-name {
  font: 700 clamp(30px, 5.4vw, 64px) / 1 var(--f-display);
  letter-spacing: -0.03em;
  color: var(--v-hi);
  min-width: 5ch;
}
.hero-blurb {
  justify-self: end;
  max-width: 30ch;
  font-size: clamp(17px, 1.9vw, 21px);
  line-height: 1.45;
  color: var(--dim);
  text-align: right;
}

.hero-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.hero .status { transition: border-color 0.25s; }
.hero .status:hover { border-color: var(--v); }

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--mute);
  text-decoration: none;
  transition: color 0.2s;
}
.scroll-cue:hover { color: var(--v-hi); }
.scroll-cue-line {
  position: relative;
  width: 64px; height: 1px;
  background: var(--line-2);
  overflow: hidden;
}
.scroll-cue-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--v-hi);
  animation: cue 2.2s var(--ease) infinite;
}
@keyframes cue {
  0% { transform: translateX(-100%); }
  60%, 100% { transform: translateX(100%); }
}

@media (max-width: 640px) {
  .hero-meta { grid-template-columns: 1fr; }
  .hero-blurb { justify-self: start; text-align: left; }
  .wordmark-wrap { font-size: 33vw; }
}

/* ---------- about ---------- */

.about {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
}
.about-statement {
  font: 500 clamp(24px, 3.3vw, 42px) / 1.18 var(--f-display);
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.about-statement .ch > span { transition-delay: calc(var(--i, 0) * 28ms); }

.facts { margin: 0; }
.fact {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.fact:last-child { border-bottom: 1px solid var(--line); }
.fact dt {
  font: 500 12px var(--f-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--v-hi);
  padding-top: 4px;
}
.fact dd { margin: 0; color: var(--dim); }

@media (max-width: 820px) {
  .about { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .fact { grid-template-columns: 1fr; gap: 6px; }
}

/* ---------- youtube ---------- */

.yt {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.yt-label { margin-bottom: 14px; }

.yt-thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 1px solid var(--line-2);
  background: var(--panel);
  overflow: hidden;
  cursor: pointer;
}
.yt-thumb-empty {
  display: grid;
  place-items: center;
  cursor: default;
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(154, 77, 255, 0.05) 14px 15px),
    var(--panel);
}
.yt-thumb img, .yt-thumb iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}
.yt-thumb img {
  filter: saturate(0.9) brightness(0.82);
  transition: transform 0.9s var(--ease-out), filter 0.4s;
}
.yt-thumb:hover img { transform: scale(1.04); filter: none; }
.yt-play {
  position: absolute;
  left: 18px; bottom: 18px;
  display: grid;
  place-items: center;
  width: 62px; height: 62px;
  background: var(--v);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: background 0.25s, transform 0.4s var(--ease-out);
}
.yt-play svg { width: 26px; height: 26px; fill: #000; }
.yt-thumb:hover .yt-play { background: var(--ink); transform: scale(1.08); }

.yt-video-title {
  display: block;
  margin-top: 16px;
  font: 600 clamp(18px, 2.2vw, 24px) / 1.25 var(--f-display);
  letter-spacing: -0.02em;
  text-decoration: none;
  transition: color 0.2s;
}
.yt-video-title:hover { color: var(--v-hi); }
.yt-video-meta {
  display: flex;
  gap: 18px;
  margin-top: 8px;
  font: 500 12px var(--f-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
}

.yt-channel { display: flex; flex-direction: column; gap: 18px; }
.yt-channel > * + * { margin-top: 0; }
.yt-channel .yt-label { margin-bottom: 0; }
.yt-head { display: flex; align-items: center; gap: 14px; }
.yt-avatar { width: 56px; height: 56px; border: 1px solid var(--line-2); object-fit: cover; }
.yt-name {
  font: 700 clamp(22px, 2.6vw, 28px) / 1.1 var(--f-display);
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
}
a.yt-name:hover { color: var(--v-hi); }
.yt-bio {
  margin-top: 12px;
  color: var(--dim);
  font-size: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.yt-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}
.yt-channel .btn { align-self: flex-start; }

@media (max-width: 860px) {
  .yt { grid-template-columns: 1fr; }
}

/* ---------- projects ---------- */

.projects { margin-top: calc(clamp(32px, 5vw, 56px) * -1); }
.section-head + .rows { border-top: 0; margin-top: calc(clamp(32px, 5vw, 56px) * -1); }

.project {
  display: grid;
  grid-template-columns: clamp(56px, 9vw, 120px) minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(18px, 3.4vw, 48px);
  align-items: center;
  padding-block: clamp(36px, 5.5vw, 72px);
  border-bottom: 1px solid var(--line);
}
.project-num {
  align-self: start;
  font: 800 clamp(32px, 5vw, 64px) / 0.9 var(--f-outline);
  letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-2);
  transition: -webkit-text-stroke-color 0.4s, color 0.4s;
}
.project:hover .project-num { -webkit-text-stroke-color: var(--v); color: rgba(154, 77, 255, 0.14); }

.project-body { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.project-title {
  font: 800 clamp(30px, 4.6vw, 56px) / 1 var(--f-display);
  letter-spacing: -0.04em;
}
.project-title a {
  text-decoration: none;
  background: linear-gradient(var(--v), var(--v)) 0 100% / 0 3px no-repeat;
  transition: background-size 0.5s var(--ease-out), color 0.25s;
}
.project-title a:hover { background-size: 100% 3px; color: var(--v-hi); }
.project-text { color: var(--dim); max-width: 54ch; }

.project-visual { min-width: 0; margin: 0; }

.project-visual-smp {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  min-height: 220px;
  padding: clamp(22px, 3vw, 34px);
}
.project-visual-smp img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 26px rgba(154, 77, 255, 0.35));
  transition: transform 0.7s var(--ease-out), filter 0.4s;
}
.project-visual-smp:hover img {
  transform: scale(1.035) rotate(-1deg);
  filter: drop-shadow(0 0 40px rgba(154, 77, 255, 0.6));
}
.project-visual-smp .status { margin: 0; }

/* code excerpt */
.code { padding: 0; }
.code > * + * { margin-top: 0; }
.code-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--mute);
  font-size: 11px;
}
.code-dot { width: 7px; height: 7px; background: var(--v); }
.code-body {
  margin: 0;
  padding: 18px;
  overflow-x: auto;
  white-space: normal;
  font: 400 12.5px / 1.75 var(--f-mono);
  color: #cfc7de;
  tab-size: 4;
}
.code-body .ln { display: block; white-space: pre; }
.code-body i { font-style: normal; color: var(--mute); }
.code-body b { font-weight: 500; color: var(--v-hi); }
.code-body u { text-decoration: none; color: var(--v-hi); }
.js .code-body [data-reveal] { transform: translateX(-10px); transition-duration: 0.5s; }
.caret {
  display: inline-block;
  width: 7px; height: 1.05em;
  margin-left: 3px;
  vertical-align: text-bottom;
  background: var(--v);
  animation: blink 1s steps(1) infinite;
}

/* gears */
.project-visual-plain { display: grid; place-items: center; color: var(--line-2); }
.gear { width: min(100%, 230px); height: auto; overflow: visible; transition: color 0.5s; }
.project:hover .gear { color: var(--v); }
.gear-a { transform-origin: 80px 84px; animation: spin 24s linear infinite; }
.gear-b { transform-origin: 134.2px 138.2px; animation: spin 16s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

.specs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.specs .stat-value { font-size: clamp(16px, 1.7vw, 21px); }

@media (max-width: 900px) {
  .project { grid-template-columns: clamp(44px, 9vw, 72px) minmax(0, 1fr); }
  .project-visual { grid-column: 2; }
  .project-visual-plain { justify-items: start; }
  .gear { width: 150px; }
}
@media (max-width: 520px) {
  .project { grid-template-columns: 1fr; }
  .project-visual { grid-column: 1; }
  .specs { grid-template-columns: 1fr; }
}

/* ---------- gaming ---------- */

.section-gaming { padding-bottom: clamp(40px, 6vw, 80px); }
.section-gaming .section-head { margin-bottom: clamp(24px, 4vw, 40px); }

/* ---------- contact ---------- */

.contact { padding-top: clamp(48px, 8vw, 110px); }
.contact-title {
  margin-top: 16px;
  max-width: 14ch;
  font: 800 clamp(40px, 8.4vw, 116px) / 1 var(--f-display);
  letter-spacing: -0.05em;
}
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: clamp(28px, 5vw, 56px);
  padding-top: 24px;
  border-top: 1px solid var(--line-2);
}
.contact-mail {
  font: 600 clamp(20px, 3.4vw, 40px) / 1.1 var(--f-display);
  letter-spacing: -0.03em;
  color: var(--v-hi);
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
  transition: background-size 0.5s var(--ease-out);
  overflow-wrap: anywhere;
}
.contact-mail:hover { background-size: 100% 2px; }

/* ---------- 404 ---------- */

.notfound {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-content: center;
  gap: 20px;
  padding-top: var(--header-h);
}
.notfound-code {
  font: 900 clamp(120px, 34vw, 420px) / 0.8 var(--f-outline);
  letter-spacing: -0.07em;
  color: transparent;
  -webkit-text-stroke: 1px var(--v);
  margin-left: -0.05em;
}

/* ---------- /gaming hub cards ---------- */
.gaming-hub { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: clamp(28px, 4vw, 44px); }
@media (max-width: 640px) { .gaming-hub { grid-template-columns: minmax(0, 1fr); } }
.hub-card { min-height: 190px; display: flex; flex-direction: column; justify-content: flex-end; transition: transform 0.4s var(--ease-out); }
.hub-card h3 { font-size: clamp(28px, 4vw, 44px); }
.hub-card:hover { transform: translateY(-4px); }
