/* Pixelcastle retro-tech theme — 8bitcn-inspired overlays */

@font-face {
  font-family: "Pixelcastle";
  src: url("fonts/redaction-35-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0041;
}

@font-face {
  font-family: "Pixelcastle";
  src: url("fonts/Pixelcastle.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-0040, U+0042-10FFFF;
}

:root {
  --bg: #0d0d0d;
  --text: #d0d0d0;
  --muted: #6b8e6b;
  --border: #2a3a2a;
  --border-light: #4a6a4a;
  --border-dark: #141c14;
  --green: #50fa7b;
  --green-bright: #78ff78;
  --green-dim: #5f875f;
  --green-deep: #2d4a2d;
  --accent: var(--green);
  --font-display: "Pixelcastle", Georgia, serif;
  --font-redaction: "Redaction 35", Georgia, serif;
  --iris-accent: #6c5ce7;
  --iris-accent-teal: #00b894;
  --iris-accent-soft: #a89bf5;
}

body {
  font-size: 0.9375rem;
  line-height: 1.65;
}

a {
  color: var(--green);
  text-decoration: none;
}

a:hover {
  color: var(--green-bright);
}

/* Pixel square dividers */

.pixel-divider {
  border: none;
  height: 4px;
  margin: 0;
  background: repeating-linear-gradient(
    to right,
    var(--border-light) 0,
    var(--border-light) 4px,
    transparent 4px,
    transparent 10px
  );
}

/* Double-line retro frame */

.retro-frame {
  position: relative;
  border: 2px solid var(--border-light);
  background: var(--bg);
  box-shadow:
    inset 0 0 0 2px var(--bg),
    inset 0 0 0 4px var(--border-dark);
}

/* Page hero (Help Center / Quick Answers header) */

.page-hero {
  text-align: center;
  margin-bottom: 3rem;
}

.page-subtitle {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0.75rem 0 0;
}

/* Header / nav */

.site-header {
  border-bottom: none;
  padding: 1.5rem 0 1rem;
}

.site-header .container {
  border-bottom: none;
}

.site-nav a {
  color: var(--muted);
  letter-spacing: 0.16em;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--green);
}

.site-nav a[aria-current="page"] {
  text-decoration: none;
  border-bottom: 2px solid var(--green);
}

.nav-toggle {
  border: 2px solid var(--border-light);
  box-shadow:
    inset 0 0 0 2px var(--bg),
    inset 0 0 0 4px var(--border-dark);
}

/* Typography — main headers (Pixelcastle), sub-headers (JetBrains Mono) */

.page-title,
.contact-panel .display-title {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--green);
}

.page-title {
  font-size: clamp(2rem, 6vw, 3.25rem);
  margin-bottom: 0;
}

.contact-panel .display-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin-bottom: 1.5rem;
}

.section-heading,
.retro-card__title,
.changelog-card__title,
.blog-card-title,
.blog-post__title {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
}

.section-heading {
  font-size: clamp(0.9rem, 2vw, 1rem);
  margin-bottom: 0.75rem;
}

.mono-label {
  color: var(--green-dim);
}

/* Home — Quick Answers grid */

.home-intro {
  max-width: 36rem;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.retro-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.retro-card {
  padding: 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 100%;
}

.retro-card__media {
  margin: 0;
}

.retro-card__image {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 2px solid var(--border-dark);
}

.retro-card__title {
  font-size: 0.8125rem;
  margin: 0;
  line-height: 1.45;
}

.retro-card__body {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--muted);
  flex: 1;
}

.home-section,
.home-row {
  display: contents;
}

/* Projects — Changelog cards (8bit-team2 pattern) */

.retro-changelog {
  max-width: 42rem;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.changelog-card {
  position: relative;
  padding: 1.25rem 1.35rem 1.35rem;
}

.changelog-card .retro-tag {
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  z-index: 1;
}

.changelog-card__header {
  padding-bottom: 0.5rem;
  padding-right: 4.5rem;
}

.changelog-card__title {
  font-size: 0.8125rem;
  margin: 0;
  line-height: 1.45;
}

.changelog-card__content {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.changelog-card__description {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.65;
}

.changelog-card__link {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
  align-self: flex-start;
}

.changelog-card__link:hover {
  color: var(--green-bright);
}

.changelog-card__link::after {
  content: " ↓";
}

.changelog-separator {
  margin: 0;
}

.retro-tag {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.25rem 0.5rem;
  border: 2px solid var(--green);
  color: var(--bg);
  background: var(--green);
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
}

/* Legacy entry aliases removed — projects use changelog-card */

/* Blog — retro cards */

.blog-grid {
  gap: 1.25rem;
}

.blog-card {
  border: none;
  padding: 0;
}

.blog-card-inner {
  padding: 1.25rem 1.35rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.blog-card-title {
  font-size: 0.8125rem;
  line-height: 1.45;
}

.blog-card-link {
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green);
}

.blog-card-link:hover {
  color: var(--green-bright);
}

/* Blog post */

.blog-post__title {
  font-size: clamp(0.95rem, 2.5vw, 1.125rem);
  line-height: 1.45;
}

.blog-post__back:hover {
  color: var(--green);
}

.blog-post__tag {
  border: 2px solid var(--border-light);
  color: var(--green-dim);
}

.blog-card-excerpt {
  font-size: 0.8125rem;
}

.blog-formula {
  border: 2px solid var(--border-light);
  box-shadow: inset 0 0 0 2px var(--bg), inset 0 0 0 4px var(--border-dark);
}

/* IRIS — Redaction 35 + main-branch purple accent */

body:has(main.iris-page) .site-nav a:hover,
body:has(main.iris-page) .site-nav a[aria-current="page"] {
  color: var(--iris-accent);
}

body:has(main.iris-page) .site-nav a[aria-current="page"] {
  border-bottom-color: var(--iris-accent);
}

body:has(main.iris-page) .site-header {
  background: var(--bg);
}

.iris-page::before {
  opacity: 0.08;
  filter: blur(1px) grayscale(100%);
  mix-blend-mode: screen;
}

.iris-panel {
  max-width: 36rem;
  margin-inline: auto;
  padding: 2rem 1.75rem;
  text-align: center;
}

body:has(main.iris-page) .iris-panel.retro-frame {
  border-color: #5544c0;
  box-shadow:
    inset 0 0 0 2px var(--bg),
    inset 0 0 0 4px #3d2f8a;
}

.iris-content .display-title {
  font-family: var(--font-redaction);
  font-size: clamp(1.35rem, 3.5vw, 2rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--iris-accent);
}

.iris-content .mono-label {
  color: var(--iris-accent-teal);
}

.iris-content .body-copy {
  color: #e5e5e5;
}

.iris-links a {
  color: var(--iris-accent);
}

.iris-links a:hover {
  color: var(--iris-accent-soft);
}

.iris-links a::after {
  color: var(--muted);
}

.iris-links a:hover::after {
  color: var(--iris-accent);
}

/* Contact */

.contact-block {
  max-width: 36rem;
  margin-inline: auto;
}

.contact-panel {
  padding: 1.75rem 1.5rem;
}

.contact-list a {
  color: var(--green);
}

.contact-list a:hover {
  color: var(--green-bright);
}

.contact-credentials {
  border-top: none;
  padding-top: 0;
  margin-top: 1.5rem;
}

.contact-credentials p {
  font-size: 0.8125rem;
}

/* Accordion (Help Center pattern) */

.retro-accordion {
  max-width: 40rem;
  margin-inline: auto;
}

.retro-accordion__label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 1.75rem 0 0.75rem;
}

.retro-accordion__label:first-child {
  margin-top: 0;
}

.retro-accordion__item {
  border: none;
  background: none;
}

.retro-accordion__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border: none;
  background: none;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.retro-accordion__trigger:hover {
  color: var(--green);
}

.retro-accordion__chevron {
  flex-shrink: 0;
  font-size: 0.65rem;
  color: var(--muted);
  transition: transform 0.15s ease;
}

.retro-accordion__item.is-open .retro-accordion__chevron {
  transform: rotate(180deg);
}

.retro-accordion__panel {
  display: none;
  padding: 0 0 0.85rem;
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.65;
}

.retro-accordion__item.is-open .retro-accordion__panel {
  display: block;
}

/* Footer */

.site-footer {
  border-top: none;
  padding-top: 0;
}

.site-footer::before {
  content: "";
  display: block;
  height: 4px;
  margin-bottom: 1.5rem;
  background: repeating-linear-gradient(
    to right,
    var(--border-light) 0,
    var(--border-light) 4px,
    transparent 4px,
    transparent 10px
  );
}

.footer-inner a:hover {
  color: var(--green);
}

/* Responsive */

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