/* ============================================================
   BASE — MEMBURU PEMANGSA
   Reset, typography, global styles
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: var(--fs-base);
  line-height: 1.6;
  letter-spacing: var(--ls-tight);
  transition:
    background var(--t-slow),
    color var(--t-slow);
}

/* ── SELECTION ── */
::selection {
  background: var(--ink);
  color: var(--bg);
}

/* ── LINKS ── */
a {
  color: var(--ink-bright);
  text-decoration: none;
  border-bottom: 1px dotted var(--ink-dim);
  transition: color var(--t-fast), border-color var(--t-fast);
}

a:hover {
  color: var(--accent-hover);
  border-color: var(--accent-hover);
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 1px;
}

/* ── BUTTONS (base reset) ── */
button {
  cursor: pointer;
  font-family: var(--font-mono);
  border: none;
  background: transparent;
}

button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── INPUTS ── */
input {
  font-family: var(--font-mono);
}

input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* ── SCROLLBAR (webkit) ── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--line-bright);
  border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--ink-dim);
}

/* ── LAYOUT WRAPPER ── */
.wrap {
  position: relative;
  z-index: var(--z-content);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--wrap-pad);
}

/* ── SKIP TO CONTENT (accessibility) ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--sp-4);
  z-index: 10000;
  padding: var(--sp-2) var(--sp-4);
  background: var(--accent);
  color: var(--bg);
  font-size: var(--fs-sm);
  letter-spacing: var(--ls-xwide);
  border: none;
  text-decoration: none;
  transition: top var(--t-fast);
}

.skip-link:focus {
  top: var(--sp-4);
}

/* ── BLINK CURSOR ANIMATION ── */
.cursor::after {
  content: '\2588';
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* ── TEXT GLOW ── */
.text-glow {
  text-shadow: var(--glow);
}

.text-glow-lg {
  text-shadow: var(--glow-lg);
}

/* ── VISUALLY HIDDEN (screen reader only) ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
