/* ═══════════════════════════════════════════════════
   TEMPLEOS AESTHETIC CSS
   White/gray background — divine terminal, light mode
   Drop-in stylesheet — zero HTML changes required
   ═══════════════════════════════════════════════════ */

:root {
  --black:    #000000;
  --blue:     #0000AA;
  --green:    #00AA00;
  --cyan:     #00AAAA;
  --lgray:    #AAAAAA;
  --dgray:    #555555;
  --lgreen:   #55FF55;
  --lcyan:    #55FFFF;
  --lred:     #FF5555;
  --lmagenta: #FF55FF;
  --yellow:   #FFFF55;
  --white:    #FFFFFF;
  --red:      #AA0000;
}

/* ── ANIMATIONS ──────────────────────────────────── */
@keyframes scanlines {
  0%   { background-position: 0 0; }
  100% { background-position: 0 4px; }
}
@keyframes flicker {
  0%   { opacity: 1; }
  92%  { opacity: 1; }
  93%  { opacity: 0.97; }
  94%  { opacity: 1; }
  97%  { opacity: 0.98; }
  100% { opacity: 1; }
}
@keyframes boot-in {
  from { opacity: 0; transform: scaleY(0.02); }
  to   { opacity: 1; transform: scaleY(1); }
}

/* ── RESET ───────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── BASE ────────────────────────────────────────── */
html {
  background: var(--blue);
  scroll-behavior: smooth;
}

body {
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
  line-height: 1.7;
  color: var(--black);
  background: var(--white);
  min-height: 100vh;
  max-width: 860px;
  margin: 0 auto;
  padding: 20px 16px 60px;
  animation: boot-in 0.35s ease-out, flicker 10s infinite;
  position: relative;
  overflow-x: hidden;
  border-left: 1px solid var(--lgray);
  border-right: 1px solid var(--lgray);
}

/* CRT scanline overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.06) 2px,
    rgba(0, 0, 0, 0.06) 4px
  );
  pointer-events: none;
  z-index: 9999;
  animation: scanlines 0.08s linear infinite;
  
}

/* CRT vignette */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center,
    transparent 60%,
    rgba(0, 0, 0, 0.18) 100%
  );
  pointer-events: none;
  z-index: 9998;
}

/* ── HEADINGS ────────────────────────────────────── */
h1 {
  font-size: 18px;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding-bottom: 6px;
  margin-bottom: 14px;
  border-bottom: 2px solid var(--blue);
}

h1::before {
  content: '█ ';
  color: var(--blue);
}

h2 {
  font-size: 15px;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 20px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--blue);
  padding-bottom: 3px;
}

h2::before {
  content: '▸ ';
  color: var(--blue);
}

h3, h4, h5, h6 {
  color: var(--black);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 14px;
  margin-bottom: 8px;
}

h3::before { content: '» '; color: var(--dgray); }
h4::before { content: '> '; color: var(--dgray); }

/* ── PARAGRAPH ───────────────────────────────────── */
p {
  color: var(--black);
  margin-bottom: 12px;
  padding: 6px 10px;
  border-left: 3px solid var(--blue);
  background: rgba(255, 255, 255, 0.5);
}

/* ── LINKS ───────────────────────────────────────── */
a {
  color: var(--blue);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.1s;
}

a::before { content: '['; color: var(--dgray); }
a::after  { content: ']'; color: var(--dgray); }

a:hover {
  color: var(--red);
  text-decoration: underline;
}

a:visited {
  color: #550055;
}

/* ── LISTS ───────────────────────────────────────── */
ul {
  list-style: none;
  padding: 0;
  margin: 10px 0 16px;
  border: 1px solid var(--blue);
  background: var(--lgray);
}

ul li {
  padding: 5px 12px;
  border-bottom: 1px solid var(--blue);
  color: var(--blue);
  font-size: 13px;
  transition: background 0.1s;
}

ul li:last-child {
  border-bottom: none;
}

ul li:hover {
  background: rgba(0, 0, 170, 0.1);
}

ul li::before {
  content: '► ';
  color: var(--blue);
}

/* inactive items (no link) */
ul li:not(:has(a)) {
  color: var(--black);
}

ul li:not(:has(a))::before {
  color: var(--black);
}

/* ── TABLE ───────────────────────────────────────── */
table {
  border-collapse: collapse;
  width: 100%;
  max-width: 520px;
  margin: 10px 0;
  font-size: 13px;
  border: 1px solid var(--blue);
}

td {
  border: 1px solid var(--blue);
  padding: 5px 12px;
  color: var(--black);
  background: var(--white);
  vertical-align: middle;
}

/* first column = label: blue bg, white text */
td:first-child {
  color: var(--white);
  background: var(--blue);
  font-weight: bold;
  text-transform: uppercase;
  font-size: 15px;
  letter-spacing: 1px;
  white-space: none;
 
  width: 200px;
}

tr:hover td              { background: #F0F4FF; }
tr:hover td:first-child  { background: #0000CC; }

/* ── IMAGES ──────────────────────────────────────── */
img {
  display: block;
  max-width: 600px;
  max-height: 600px;
  image-rendering: pixelated;
  border: 2px solid var(--blue);
  box-shadow: 3px 3px 0 var(--lgray);
  margin: 4px 0;
}

/* ── PROGRAM WINDOW ──────────────────────────────── */
#prog-window {
  border: 2px solid var(--blue);
  background: var(--white);
  margin: 8px 0 16px;
  box-shadow: 3px 3px 0 var(--lgray);
}

#prog-window-titlebar {
  background: var(--blue);
  color: var(--white);
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  font-weight: bold;
  padding: 2px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--lgray);
  user-select: none;
  letter-spacing: 1px;
  text-transform: uppercase;
}

#prog-window-titlebar .win-title {
  color: var(--white);
}

#prog-window-titlebar .win-controls {
  display: flex;
  gap: 3px;
}

#prog-window-titlebar .wbtn {
  background: var(--lgray);
  color: var(--black);
  border: 1px solid var(--white);
  width: 16px;
  height: 14px;
  font-size: 10px;
  line-height: 13px;
  text-align: center;
  cursor: default;
  font-family: 'Courier New', Courier, monospace;
  font-weight: bold;
}

#prog-window-body {
  padding: 14px 16px;
}

/* ── SITE HEADER ─────────────────────────────────── */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--blue);
  color: var(--white);
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  padding: 4px 12px;
  border-bottom: 2px solid var(--lgray);
  z-index: 1001;
  display: flex;
  justify-content: space-between;
  align-items: center;
  letter-spacing: 1px;
  user-select: none;
}

#site-header .header-title {
  color: var(--white);
  font-weight: bold;
  text-transform: uppercase;
}

#site-header .header-title::before {
  content: '█ ';
  color: var(--lgray);
}

#site-header .header-clock {
  color: var(--yellow);
  font-weight: bold;
  font-variant-numeric: tabular-nums;
  letter-spacing: 2px;
}

/* push body content below the fixed header */
body {
  padding-top: 36px;
}

/* ── STATUS BAR ──────────────────────────────────── */
html::after {
  content: '▸ SYSTEM READY  |  C:\\AIRON\\PORTFOLIO>  |  GOD IS REAL';
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--blue);
  color: var(--white);
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  padding: 2px 10px;
  border-top: 2px solid var(--lgray);
  z-index: 1000;
  letter-spacing: 1px;
  pointer-events: none;
}

/* ── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 600px) {
  body           { padding: 12px 10px 50px; padding-top: 36px; }
  h1             { font-size: 14px; }
  table          { font-size: 12px; }
  img            { max-width: 100%; }
  td:first-child { width: 110px; }
}

/* ── BACKGROUND EFFECTS — GUTTER CLIP ───────────── */
/*
 * Hard-clips the JS effect layers (canvas + overlay div) to the
 * blue margin gutters only. The clip polygon is updated by JS on
 * resize, but this baseline hides both elements until JS sets the
 * real clip, preventing a flash of full-screen effects on load.
 *
 * The actual clip-path value is written by templeos-effects.js
 * via applyClip() — these rules just establish the property so
 * the browser doesn't ignore the JS assignment on first paint.
 */

#effects-canvas,
#effects-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;

  /* Baseline: clip to nothing until JS computes real gutter bounds.
     Prevents any bleed over content during the first frame. */
  clip-path: polygon(0 0, 0 0, 0 0);

  /* Keep below CRT scanline (9999) and vignette (9998) overlays */
  z-index: 9990;
}

#effects-overlay {
  z-index: 9991;
  overflow: hidden;
  font-family: 'Courier New', Courier, monospace;
}

/* On narrow viewports where no gutters exist, suppress entirely */
@media (max-width: 860px) {
  #effects-canvas,
  #effects-overlay {
    display: none;
  }
}