/* ═══════════════════════════════════════════════
   TOKENS — Variables · Resets · Global Utilities
═══════════════════════════════════════════════ */

:root {
  --linen:    #F4F2EE;
  --paper:    #F9F8F6;
  --ink:      #0C0C10;
  --ink-2:    #26262E;
  --ink-3:    #6B6B78;
  --ink-4:    #ADADB8;
  --rule:     #DDDAD5;

  --void:   #07070E;
  --void-2: #0E0E18;
  --void-3: #151520;
  --void-4: #1B1B28;
  --wire:   rgba(255,255,255,0.07);
  --wire-2: rgba(255,255,255,0.11);

  --arc:     #00E5FF;
  --arc-dim: rgba(0,229,255,0.10);
  --arc-glo: rgba(0,229,255,0.22);
  --arc-txt: rgba(0,229,255,0.80);

  --display: 'DM Serif Display', Georgia, serif;
  --body:    'Rubik', system-ui, sans-serif;
  --mono:    'IBM Plex Mono', monospace;

  --nav-h: 50px;
  --ease:  cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background: var(--linen);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a    { color: inherit; text-decoration: none; }
ul   { list-style: none; }
img  { max-width: 100%; display: block; }

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 8px 40px;
  height: 100%;
}

::-webkit-scrollbar       { width: 2px; }
::-webkit-scrollbar-track { background: var(--void); }
::-webkit-scrollbar-thumb { background: var(--arc); }

/* ── Custom cursor ── */
#cd {
  width: 5px;
  height: 5px;
  background: var(--arc);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 6px var(--arc);
}

#cr {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(0,229,255,0.4);
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width .28s var(--ease), height .28s var(--ease), border-color .28s;
}

#cr.big {
  width: 46px;
  height: 46px;
  border-color: rgba(0,229,255,0.7);
}

/* Hide custom cursor on touch / no-hover devices (mobile) */
@media (hover: none), (pointer: coarse) {
  #cd, #cr { display: none !important; }
}

/* ── Texture overlays ── */
.scanlines::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: repeating-linear-gradient(
    0deg,
    transparent, transparent 2px,
    rgba(0,0,0,0.07) 2px, rgba(0,0,0,0.07) 4px
  );
}

.dotgrid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(circle, rgba(0,229,255,0.055) 1px, transparent 1px);
  background-size: 28px 28px;
}

.techgrid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(0,229,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,255,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* ── Coordinate labels ── */
.coord {
  font-family: var(--mono);
  font-size: 0.52rem;
  letter-spacing: 0.09em;
  color: var(--arc-txt);
  opacity: 0.38;
  position: absolute;
  pointer-events: none;
  user-select: none;
  z-index: 3;
}

.coord-lt { top: 16px; left: 40px; }
.coord-rt { top: 16px; right: 40px; }
.coord-lb { bottom: 72px; left: 40px; }

/* Sections where coord sits below other z-stacked elements */
#skills .coord,
#portfolio .coord,
#faq .coord,
#contact .coord { z-index: 1; }

/* Light-section coords: muted dark for WCAG contrast (cyan-on-light fails AA) */
#hero .coord,
#skills .coord,
#portfolio .coord,
#faq .coord,
#contact .coord { color: #5a5a66; opacity: 1; }

/* ── Scroll reveal ── */
.rv {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.rvl {
  opacity: 0;
  transform: translateX(-16px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.rvr {
  opacity: 0;
  transform: translateX(16px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.rv.in, .rvl.in, .rvr.in {
  opacity: 1;
  transform: none;
}

/* ── Section eyebrow ── */
.eye {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--arc-txt);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.eye .n {
  color: var(--ink-4);
  font-size: 0.52rem;
  letter-spacing: 0.12em;
}
.eye .dash {
  width: 22px;
  height: 1px;
  background: var(--arc);
  box-shadow: 0 0 5px var(--arc);
}
.eye-inv .n { color: rgba(255,255,255,0.2); }

/* ── Section headings ── */
.sh {
  font-family: var(--display);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.04;
  color: var(--ink);
}
.sh i      { font-style: italic; }
.sh-inv    { color: rgba(255,255,255,0.90); }

/* Per-section heading bottom margin */
#about .sh,
#skills .sh    { margin-bottom: 52px; }
#faq .sh       { margin-bottom: 40px; }
#resume .sh,
#services .sh,
#contact .sh   { margin-bottom: 0; }

/* ── Buttons ── */
.btn {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 10px 20px;
  border-radius: 2px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all .24s var(--ease);
  border: none;
}

.btn-s { background: var(--ink); color: var(--linen); }
.btn-s:hover {
  background: var(--arc);
  color: var(--void);
  box-shadow: 0 0 24px var(--arc-glo);
}

.btn-g { background: transparent; color: var(--ink-2); border: 1px solid var(--rule); }
.btn-g:hover { border-color: var(--arc); color: var(--arc); }

.btn-gi { background: transparent; color: rgba(255,255,255,0.55); border: 1px solid var(--wire-2); }
.btn-gi:hover { border-color: var(--arc); color: var(--arc); }

/* ── Keyframes ── */
@keyframes fdIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes fdUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}
@keyframes widen {
  from { transform: scaleX(0); transform-origin: left; }
  to   { transform: scaleX(1); }
}
@keyframes blk {
  50% { opacity: 0; }
}

/* --- Inline SVG icons (replaces Font Awesome) --- */
.ic { width: 1em; height: 1em; display: inline-block; vertical-align: -0.125em; fill: currentColor; flex-shrink: 0; }
@keyframes ic-spin { to { transform: rotate(1turn); } }
.ic.spin { animation: ic-spin .8s linear infinite; }
