@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Courier+Prime:ital,wght@0,400;0,700;1,400&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&display=swap');

@font-face {
  font-family: 'MiFuente';
  src: url('/font/RS_Xi.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ── CSS VARIABLES ── */
:root {
  --red: #c0392b;
  --red-link: #cc4444;
  --bg: #080808;
  --text: #c8c8b8;
  --text-dim: #666655;
  --text-mid: #999977;
  --border: rgba(255,255,255,0.08);
}

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

html {
  scroll-behavior: smooth;
  overscroll-behavior: none;
  overflow: hidden auto;
}

/* ── BODY ── */
body {
  font-size: 24px;
  margin: 0;
  overflow-x: clip;
  background-color: #050504;
  color: var(--text);
  font-family: 'MiFuente', 'Share Tech Mono', 'Courier New', monospace;
  cursor: url('/cursor/cursor.png') 16 16, crosshair;

  -webkit-font-smoothing: subpixel-antialiased;
  -moz-osx-font-smoothing: auto;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

/* Tiled background on body::before animated with transform scale and opacity flicker (GPU accelerated) */
body::before {
  content: '';
  position: fixed; inset: -40px; z-index: -3;
  background-image:
    linear-gradient(rgba(0,0,0,0.65), rgba(0,0,0,0.65)),
    url('/images/tile.png');
  background-repeat: repeat;
  background-size: 420px auto;
  animation: 
    texturePulse 14s ease-in-out infinite,
    flicker 0.18s infinite;
  pointer-events: none;
  will-change: transform, opacity;
}

html, body {
  height: 100%;
}

@keyframes texturePulse {
  0%,100% { transform: scale(1); }
  50%     { transform: scale(1.06); }
}

/* ── BG GRADIENT ── */
html::before {
  content: '';
  position: fixed; inset: 0; z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 30%, rgba(192,57,43,0.07), transparent 25%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.03), transparent 20%),
    radial-gradient(circle at 70% 80%, rgba(192,57,43,0.06), transparent 30%),
    radial-gradient(circle at 10% 90%, rgba(255,255,255,0.02), transparent 20%);
  animation: bg-drift 18s ease-in-out infinite alternate;
}

@keyframes bg-drift {
  0%   { transform: translate3d(0,0,0) scale(1); }
  50%  { transform: translate3d(-2%,1%,0) scale(1.05); }
  100% { transform: translate3d(2%,-1%,0) scale(1.08); }
}

@keyframes flicker {
  0%   { opacity: 1; }
  2%   { opacity: .98; }
  4%   { opacity: 1; }
  8%   { opacity: .97; }
  70%  { opacity: 1; }
  72%  { opacity: .985; }
  100% { opacity: 1; }
}

body::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 3;
  background: radial-gradient(circle at center, transparent 45%, rgba(0,0,0,0.35) 100%);
}

/* ── NO SELECT / NO DRAG ── */
* {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
img { -webkit-user-drag: none; pointer-events: none; }

#noise-canvas {
  position: fixed; inset: 0; z-index: 1;
  pointer-events: none;
  opacity: 0.025;
  width: 100%; height: 100%;
}
.bg-orb {
  position: fixed;
  border-radius: 50%;
  pointer-events: none; z-index: -1;
  opacity: .12;
  contain: strict;
}
.bg-orb.one {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(122,22,22,0.6) 0%, transparent 70%);
  top: -150px; left: -130px;
  animation: orb1 22s ease-in-out infinite alternate;
}
.bg-orb.two {
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(58,13,13,0.5) 0%, transparent 70%);
  bottom: -130px; right: -110px;
  animation: orb2 18s ease-in-out infinite alternate;
}
@keyframes orb1 { 0% { transform: translate(0,0); } 100% { transform: translate(80px,40px); } }
@keyframes orb2 { 0% { transform: translate(0,0); } 100% { transform: translate(-70px,-50px); } }

/* ── PARTICLES ── */
.particles { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.particles span {
  position: absolute; display: block; width: 2px; height: 2px;
  background: rgba(192,57,43,0.5);
  border-radius: 50%;
  animation: particleFloat linear infinite;
}
@keyframes particleFloat {
  from { transform: translateY(100vh) scale(0.5); opacity: 0; }
  10%  { opacity: 1; }
  to   { transform: translateY(-20vh) scale(1.4); opacity: 0; }
}

/* ── SCANLINES ── */
.scanlines {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(0,0,0,0.10) 0px, rgba(0,0,0,0.10) 1px,
    transparent 1px, transparent 3px
  );
}

/* ── BORDER ASCII ── */
.border-ascii {
  position: fixed; top: 0; height: 100vh;
  font-family: 'MiFuente', monospace; font-size: 11px;
  line-height: 1; white-space: pre; overflow: hidden;
  color: rgba(192,57,43,0.35);
  opacity: 0.9; pointer-events: none;
}
.border-ascii.left  { top: 0; left: 0; width: 140px; }
.border-ascii.right { top: 0; right: 0; width: 140px; transform: scaleX(-1); }

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: center;
  background: rgba(6,6,5,0.94);
  border-bottom: 1px solid rgba(192,57,43,0.22);
}
nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 12px;
  font-family: 'MiFuente', 'Share Tech Mono', monospace;
  letter-spacing: 0.14em;
  padding: 11px 20px;
  transition: color 0.2s, background 0.2s;
  border-right: 1px solid rgba(255,255,255,0.04);
  text-transform: lowercase;
}
nav a:first-child { border-left: 1px solid rgba(255,255,255,0.04); }
nav a::before { content: '[ '; color: rgba(192,57,43,0.4); }
nav a::after  { content: ' ]'; color: rgba(192,57,43,0.4); }
nav a:hover, nav a.active { color: var(--red-link); background: rgba(192,57,43,0.06); }

/* ── SECTIONS ── */
section {
  position: relative; z-index: 10;
  min-height: 100vh; overflow: hidden;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 8rem 5rem 6rem;
}
section:last-of-type { min-height: auto; padding-bottom: 4rem; }

/* ── STATUE DECORATIONS ── */
.statue-deco {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 150px; height: auto;
  opacity: 0.35; pointer-events: none; z-index: 5;
  filter: grayscale(1) brightness(0.5);
}
.statue-deco.left-statue  { left: calc(50% - 700px); }
.statue-deco.right-statue { right: calc(50% - 700px); }

/* ── CANDLE DIVIDER ── */
.candle-divider {
  position: relative; z-index: 10;
  display: flex; justify-content: center; align-items: center;
  padding: 0.5rem 0; width: 100%; mix-blend-mode: screen;
}
.candle-divider img {
  width: 80px; opacity: 0.65;
  pointer-events: none;
}

/* ── HERO ── */
#about { text-align: center; gap: 1.4rem; }

.ascii-name {
  font-family: 'MiFuente', 'Share Tech Mono', monospace;
  font-size: clamp(6px, 1vw, 11px);
  line-height: 1.18; color: var(--red-link);
  letter-spacing: 0.04em; white-space: pre;
  text-shadow: 0 0 20px rgba(192,57,43,0.35);
  display: inline-block; font-weight: 700;
  animation: asciiPulse 5s ease-in-out infinite, heroFloat 6s ease-in-out infinite;
  will-change: transform;
}

@keyframes heroFloat {
  0%,100% { transform: translateY(0px); }
  50%      { transform: translateY(-6px); }
}
@keyframes asciiPulse {
  0%,100% { opacity: 0.75; }
  50%      { opacity: 1; }
}

.dance-char {
  display: inline-block;
  animation: char-dance var(--dur, 3s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}
@keyframes char-dance {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(var(--amp, -2px)); }
}

.divi {
  font-size: 11px; color: var(--text-dim);
  letter-spacing: 0.08em; text-align: center;
  max-width: 640px; width: 100%;
  font-family: 'MiFuente', monospace;
}

.hero-sub {
  font-size: 13px; color: var(--text-mid);
  max-width: 480px; line-height: 1.9; letter-spacing: 0.04em;
  font-family: 'MiFuente', monospace;
}

/* ── GITHUB HERO BLOCK ── */
.github-hero {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid rgba(192,57,43,0.28);
  background: rgba(8,8,6,0.6);
  padding: 8px 18px;
  font-family: 'MiFuente', monospace;
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  clip-path: polygon(0 0, calc(100% - 5px) 0, 100% 5px, 100% 100%, 5px 100%, 0 calc(100% - 5px));
}
.github-hero:hover {
  border-color: rgba(192,57,43,0.65);
  background: rgba(192,57,43,0.06);
  color: var(--red-link);
}
.github-hero .gh-icon { color: var(--red-link); font-size: 13px; }
.github-hero .gh-username { color: var(--text); }
.github-hero .gh-sep { color: var(--text-dim); opacity: 0.4; }

/* ── HERO TAGS ── */
.hero-tags {
  display: flex; gap: 7px; flex-wrap: wrap; justify-content: center;
}
.pill {
  font-size: 11px; padding: 4px 12px;
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-dim); letter-spacing: 0.06em;
  transition: color 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
  font-family: 'MiFuente', monospace;
}
.pill:hover {
  color: var(--text); border-color: rgba(192,57,43,0.4);
  background: rgba(192,57,43,0.04);
  box-shadow: 0 0 8px rgba(192,57,43,0.12);
}
.pill.lit {
  border-color: rgba(192,57,43,0.75); color: var(--red-link);
  background: rgba(192,57,43,0.05);
}
.pill.lit:hover {
  background: rgba(192,57,43,0.12);
  box-shadow: 0 0 12px rgba(192,57,43,0.25);
  border-color: rgba(192,57,43,1);
}

.status-wrap {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: var(--text-dim);
  letter-spacing: 0.08em;
  font-family: 'MiFuente', monospace;
}
.status-dot {
  width: 6px; height: 6px; background: #4ade80;
  box-shadow: 0 0 7px #4ade8099;
  animation: pulse-dot 2.5s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%,100% { box-shadow: 0 0 7px #4ade8077; }
  50%      { box-shadow: 0 0 16px #4ade80bb; }
}

/* ── WHOAMI CARD ── */
.about-card {
  max-width: 640px; width: 100%;
  border: 1px solid rgba(192,57,43,0.22);
  background: rgba(8,8,6,0.72);
}
.about-card-header {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border-bottom: 1px solid rgba(192,57,43,0.14);
  background: rgba(192,57,43,0.04);
  font-size: 11px; color: var(--text-dim);
  letter-spacing: 0.1em;
  font-family: 'MiFuente', monospace;
}
.about-card-dots { display: flex; gap: 5px; }
.about-card-dots span { width: 9px; height: 9px; border: 1px solid; }
.dot-r { border-color: #ff5f57; }
.dot-y { border-color: #febc2e; }
.dot-g { border-color: #28c840; }
.about-card-body { padding: 1.4rem 1.8rem; }
.about-card-body p {
  font-size: 13px; line-height: 2; color: var(--text-mid);
  font-family: 'MiFuente', monospace;
}
.about-card-body strong { color: var(--text); }
.about-card-body .hl { color: var(--red-link); }
.prompt { color: var(--red-link); margin-right: 6px; }

/* ── SECTION HEADERS ── */
.ascii-section {
  font-family: 'MiFuente', 'Share Tech Mono', monospace;
  font-size: clamp(7px, 1.1vw, 11px);
  line-height: 1.2; color: var(--text-dim);
  white-space: pre; text-align: center; margin-bottom: 1.4rem;
}
.ascii-section .lit { color: var(--red-link); }

/* ── SKILLS ── */
#skills { gap: 2rem; }
.skills-wrap {
  max-width: 720px; width: 100%;
  display: grid; grid-template-columns: 1fr 1fr; gap: 3px;
}
.skill-group {
  background: rgba(4,4,3,0.82);
  border: 1px solid rgba(192,57,43,0.18);
  border-top: 2px solid rgba(192,57,43,0.55);
  padding: 0.9rem 1.2rem 1rem;
  position: relative;
  transition: border-top-color 0.25s, background 0.25s;
}
.skill-group::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 2px,
    rgba(192,57,43,0.015) 2px, rgba(192,57,43,0.015) 4px
  );
  pointer-events: none;
}
.skill-group:hover { border-top-color: var(--red-link); background: rgba(192,57,43,0.03); }
.skill-group-title {
  font-size: 9px; font-weight: 700;
  letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--red-link); margin-bottom: 0.8rem;
  font-family: 'MiFuente', monospace;
  border-bottom: 1px dotted rgba(192,57,43,0.25); padding-bottom: 4px;
}
.skill-group-title::before { content: '» '; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.skill-tag {
  font-size: 11px; padding: 2px 8px;
  border: 1px solid rgba(255,255,255,0.07);
  color: var(--text-mid); background: rgba(255,255,255,0.015);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  cursor: default; letter-spacing: 0.04em;
  font-family: 'MiFuente', monospace;
}
.skill-tag:hover {
  color: var(--text); border-color: rgba(192,57,43,0.3);
  background: rgba(192,57,43,0.04);
}
.skill-group:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* ── PROJECTS ── */
#projects { gap: 2rem; }
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 8px; width: 100%; max-width: 780px;
}
.project-card {
  background: rgba(8,8,6,0.6);
  border: 1px solid var(--border);
  padding: 1.5rem 1.7rem 1.3rem;
  position: relative; overflow: hidden;
  text-decoration: none; display: block; color: inherit;
  transition: border-color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
  transform-style: preserve-3d;
}
.project-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(192,57,43,0.65), transparent);
  opacity: 0; transition: opacity 0.3s;
}
.project-card:hover {
  border-color: rgba(192,57,43,0.28);
  background: rgba(192,57,43,0.022);
  transform: perspective(900px) rotateX(2deg) rotateY(-2deg) translateY(-4px);
  box-shadow: 0 0 40px rgba(192,57,43,0.08), inset 0 0 30px rgba(192,57,43,0.03);
}
.project-card:hover::before { opacity: 1; }
.project-header {
  display: flex; justify-content: space-between;
  align-items: flex-start; margin-bottom: 0.6rem;
}
.project-num {
  font-size: 10px; color: var(--text-dim);
  letter-spacing: 0.16em; font-family: 'MiFuente', monospace;
}
.project-badge {
  font-size: 10px; letter-spacing: 0.07em;
  text-transform: uppercase; padding: 2px 7px;
  border: 1px solid; font-family: 'MiFuente', monospace;
}
.badge-active { color: var(--red-link); border-color: rgba(192,57,43,0.32); background: rgba(192,57,43,0.07); }
.project-title {
  font-family: 'MiFuente', 'Share Tech Mono', monospace;
  font-size: 15px; color: var(--text);
  margin-bottom: 0.5rem; letter-spacing: 0.04em;
}
.project-title::before { content: '> '; color: var(--red-link); }
.project-desc {
  font-size: 12px; color: var(--text-dim);
  line-height: 1.85; margin-bottom: 1rem;
  font-family: 'MiFuente', monospace;
}
.project-desc code {
  color: var(--red-link); font-size: 11px;
  background: rgba(192,57,43,0.08); padding: 1px 4px;
  font-family: 'MiFuente', monospace;
}
.project-footer { display: flex; gap: 5px; flex-wrap: wrap; }
.ptag {
  font-size: 10px; padding: 2px 7px;
  border: 1px solid var(--border); color: var(--text-dim);
  letter-spacing: 0.05em; font-family: 'MiFuente', monospace;
}

/* ── RESEARCH SECTION ── */
#research { gap: 2rem; }
.research-grid {
  width: 100%; max-width: 780px;
  display: flex; flex-direction: column; gap: 3px;
}
.research-entry {
  display: flex; align-items: baseline;
  gap: 0;
  background: rgba(8,8,6,0.6);
  border: 1px solid var(--border);
  border-left: 2px solid rgba(192,57,43,0.4);
  padding: 1rem 1.4rem;
  text-decoration: none; color: inherit;
  transition: border-left-color 0.2s, background 0.2s;
  position: relative; overflow: hidden;
}
.research-entry::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, rgba(192,57,43,0.5), transparent);
  opacity: 0; transition: opacity 0.2s;
}
.research-entry:hover { border-left-color: var(--red-link); background: rgba(192,57,43,0.018); }
.research-entry:hover::before { opacity: 1; }
.research-entry-date {
  font-size: 10px; color: var(--text-dim);
  letter-spacing: 0.1em; white-space: nowrap;
  font-family: 'MiFuente', monospace; min-width: 90px;
}
.research-entry-sep {
  color: rgba(192,57,43,0.3); font-size: 11px;
  margin: 0 12px; font-family: 'MiFuente', monospace;
}
.research-entry-title {
  font-size: 13px; color: var(--text);
  letter-spacing: 0.04em; font-family: 'MiFuente', monospace;
  flex: 1;
}
.research-entry-title::before { content: '> '; color: var(--red-link); }
.research-entry-arrow {
  font-size: 11px; color: var(--text-dim);
  margin-left: auto; padding-left: 16px;
  font-family: 'MiFuente', monospace;
  transition: color 0.2s, transform 0.2s;
}
.research-entry:hover .research-entry-arrow { color: var(--red-link); transform: translateX(3px); }
.research-empty {
  font-size: 12px; color: var(--text-dim);
  text-align: center; padding: 2rem; letter-spacing: 0.1em;
  font-family: 'MiFuente', monospace; opacity: 0.6;
}

/* ── CONTACT ── */
#contact { gap: 0; text-align: center; }
.contact-wrap {
  display: flex; flex-direction: column;
  align-items: center; gap: 1.1rem;
  max-width: 520px; width: 100%;
}
.contact-eyebrow {
  font-size: 10px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--red-link);
  font-family: 'MiFuente', monospace;
}
.contact-ascii {
  font-family: 'MiFuente', 'Share Tech Mono', monospace;
  font-size: clamp(6.5px, 1vw, 10.5px);
  line-height: 1.2; color: var(--text-dim);
  white-space: pre; text-align: center;
}
.contact-ascii .hl { color: var(--red-link); }
.contact-sub {
  font-size: 12px; color: var(--text-mid);
  max-width: 340px; line-height: 1.9; letter-spacing: 0.04em;
  font-family: 'MiFuente', monospace;
}
.contact-links { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

/* ── GITHUB STATS BLOCK ── */
.github-stats-block {
  border: 1px solid rgba(192,57,43,0.22);
  background: rgba(8,8,6,0.72);
  max-width: 480px; width: 100%;
  font-family: 'MiFuente', monospace;
}
.github-stats-header {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border-bottom: 1px solid rgba(192,57,43,0.14);
  background: rgba(192,57,43,0.04);
  font-size: 11px; color: var(--text-dim); letter-spacing: 0.1em;
}
.github-stats-body {
  padding: 1rem 1.4rem;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
}
.gh-stat {
  display: flex; flex-direction: column; gap: 2px;
}
.gh-stat-label {
  font-size: 9px; color: var(--text-dim);
  letter-spacing: 0.18em; text-transform: uppercase;
}
.gh-stat-value {
  font-size: 16px; color: var(--red-link);
  letter-spacing: 0.04em;
}
.gh-stat-value.loading { opacity: 0.35; animation: blink 1s step-end infinite; }
@keyframes blink { 0%,100% { opacity: 0.35; } 50% { opacity: 0.6; } }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; padding: 9px 22px;
  text-decoration: none; letter-spacing: 0.12em;
  text-transform: lowercase;
  font-family: 'MiFuente', monospace;
  transition: all 0.15s; border: 1px solid;
  position: relative;
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
}
.btn::after {
  content: ''; position: absolute; inset: 0; opacity: 0;
  transition: opacity 0.15s;
  background: repeating-linear-gradient(
    45deg, transparent, transparent 2px,
    rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.03) 4px
  );
}
.btn:hover::after { opacity: 1; }
.btn-primary {
  background: rgba(192,57,43,0.12); color: var(--red-link);
  border-color: rgba(192,57,43,0.5);
  box-shadow: 0 0 8px rgba(192,57,43,0.15), inset 0 0 8px rgba(192,57,43,0.05);
}
.btn-primary:hover {
  background: rgba(192,57,43,0.22); color: #e05555;
  box-shadow: 0 0 16px rgba(192,57,43,0.3), inset 0 0 12px rgba(192,57,43,0.1);
}
.btn-ghost {
  background: rgba(255,255,255,0.02); color: var(--text-dim);
  border-color: rgba(255,255,255,0.12);
}
.btn-ghost:hover {
  color: var(--text); border-color: rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.05);
}
.btn-github {
  background: rgba(192,57,43,0.08);
  color: var(--red-link);
  border-color: rgba(192,57,43,0.4);
  font-size: 13px;
  padding: 10px 28px;
  gap: 8px;
}
.btn-github svg {
  flex-shrink: 0;
  filter: drop-shadow(0 0 4px rgba(192,57,43,0.4));
}
.btn-github:hover {
  background: rgba(192,57,43,0.18);
  color: #e05555;
  border-color: rgba(192,57,43,0.8);
  box-shadow: 0 0 20px rgba(192,57,43,0.25);
}
.btn-github:hover svg {
  filter: drop-shadow(0 0 6px rgba(192,57,43,0.7));
}

/* ── FOOTER ── */
footer {
  position: relative; z-index: 10;
  text-align: center; padding: 1.2rem 1.6rem 1.6rem;
  font-size: 11px; color: var(--text-dim);
  border-top: 1px solid rgba(192,57,43,0.14);
  letter-spacing: 0.1em; font-family: 'MiFuente', monospace;
}
.footer-ascii {
  display: block; font-size: 9px;
  color: rgba(192,57,43,0.25); letter-spacing: 0.05em;
  margin-bottom: 0.6rem; white-space: nowrap; overflow: hidden;
}
.footer-ascii .fa-lit {
  color: rgba(192,57,43,0.55);
  animation: asciiPulse 4s ease-in-out infinite;
}

/* ── REVEAL ── */
.reveal {
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.d1 { transition-delay: 0.00s; }
.d2 { transition-delay: 0.06s; }
.d3 { transition-delay: 0.12s; }
.d4 { transition-delay: 0.18s; }
.d5 { transition-delay: 0.24s; }
.d6 { transition-delay: 0.30s; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) { .statue-deco { display: none; } }
@media (max-width: 620px) {
  .ascii-name { font-size: 4px; }
  nav a { padding: 10px 11px; font-size: 11px; }
  .projects-grid { grid-template-columns: 1fr; }
  .skills-wrap { grid-template-columns: 1fr; }
  section { padding: 8rem 3.5rem 6rem; }
  .border-ascii.left, .border-ascii.right { width: 28px; font-size: 7px; }
  .github-stats-body { grid-template-columns: 1fr 1fr; }
  .research-entry { flex-wrap: wrap; gap: 4px; }
}

/* ══════════════════════════════════════════════
   ARTICLE PAGE STYLES
   ══════════════════════════════════════════════ */

.article-page body {
  cursor: url('/cursor/favicon.ico') 16 16, crosshair;
}

/* article page nav gets a back link */
.article-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  background: rgba(6,6,5,0.94);
  border-bottom: 1px solid rgba(192,57,43,0.22);
  height: 42px;
}
.article-nav-back {
  color: var(--text-dim); text-decoration: none;
  font-size: 11px; font-family: 'MiFuente', monospace;
  letter-spacing: 0.14em;
  transition: color 0.2s;
  padding: 6px 0;
}
.article-nav-back::before { content: '← '; color: rgba(192,57,43,0.6); }
.article-nav-back:hover { color: var(--red-link); }
.article-nav-title {
  font-size: 10px; color: var(--text-dim);
  font-family: 'MiFuente', monospace; letter-spacing: 0.12em;
  opacity: 0.6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 50%;
}

/* article layout */
.article-wrap {
  position: relative; z-index: 10;
  max-width: 1200px; width: 100%;
  margin: 0 auto;
  padding: 7rem 5rem 6rem;
}

.article-meta {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 2rem;
  font-size: 10px; color: var(--text-dim);
  font-family: 'MiFuente', monospace; letter-spacing: 0.12em;
}
.article-meta-date { color: var(--red-link); }
.article-meta-sep { opacity: 0.3; }

.article-title {
  font-family: 'MiFuente', 'Share Tech Mono', monospace;
  font-size: clamp(18px, 2.5vw, 28px);
  color: var(--text); line-height: 1.3;
  letter-spacing: 0.04em; margin-bottom: 2.5rem;
  border-bottom: 1px solid rgba(192,57,43,0.18);
  padding-bottom: 1.5rem;
}
.article-title::before { content: '// '; color: var(--red-link); }

/* rendered markdown content */
.article-content {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px; line-height: 2.1;
  color: var(--text-mid);
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
}
.article-content h1,
.article-content h2,
.article-content h3 {
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.06em; margin: 2rem 0 0.8rem;
  line-height: 1.3;
}
.article-content h1 { font-size: 18px; }
.article-content h2 { font-size: 15px; border-bottom: 1px dotted rgba(192,57,43,0.2); padding-bottom: 4px; }
.article-content h2::before { content: '## '; color: var(--red-link); font-size: 11px; }
.article-content h3 { font-size: 13px; }
.article-content h3::before { content: '### '; color: var(--red-link); font-size: 10px; }
.article-content p { margin-bottom: 1rem; }
.article-content a { color: var(--red-link); text-decoration: underline; text-underline-offset: 3px; }
.article-content strong { color: var(--text); }
.article-content em { color: var(--text-mid); font-style: italic; }
.article-content code {
  color: var(--red-link); font-size: 11px;
  background: rgba(192,57,43,0.08); padding: 1px 6px;
  font-family: 'JetBrains Mono', monospace;
  border: 1px solid rgba(192,57,43,0.15);
}
.article-content pre {
  background: rgba(4,4,3,0.9);
  border: 1px solid rgba(192,57,43,0.22);
  border-left: 3px solid rgba(192,57,43,0.55);
  padding: 1.2rem 1.4rem; margin: 1.2rem 0;
  overflow-x: auto;
  font-family: 'MiFuente', monospace; font-size: 11px;
  line-height: 1.8; color: var(--text-dim);
  position: relative;
}
.article-content pre code {
  background: none; border: none; padding: 0;
  color: var(--text-dim); font-size: 11px;
}
.article-content blockquote {
  border-left: 2px solid rgba(192,57,43,0.45);
  padding: 0.4rem 0 0.4rem 1.2rem;
  margin: 1rem 0; color: var(--text-dim);
  font-style: italic;
}
.article-content ul, .article-content ol {
  padding-left: 1.5rem; margin-bottom: 1rem;
}
.article-content li { margin-bottom: 0.35rem; }
.article-content hr {
  border: none;
  border-top: 1px dotted rgba(192,57,43,0.2);
  margin: 2rem 0;
}

.article-footer-nav {
  margin-top: 4rem; padding-top: 1.5rem;
  border-top: 1px solid rgba(192,57,43,0.14);
  display: flex; justify-content: flex-start;
}

@media (max-width: 620px) {
  .article-wrap { padding: 6rem 2rem 4rem; }
}

/* ── WRITEUPS LINK SECTION ── */
.writeups-link-section {
  text-align: center;
  gap: 2rem;
  min-height: 60vh !important;
  padding: 6rem 5rem 4rem !important;
}

.writeups-link-sub {
  font-family: 'MiFuente', 'Share Tech Mono', monospace;
  font-size: 13px;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  line-height: 1.9;
  max-width: 500px;
  margin: 0 auto;
}

.btn-writeups {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1rem;
  padding: 0.9rem 2.2rem;
  border: 1px solid rgba(192,57,43,0.55);
  background: rgba(192,57,43,0.06);
  color: var(--red-link);
  font-family: 'MiFuente', 'Share Tech Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-decoration: none;
  text-transform: lowercase;
  transition: background 0.25s, border-color 0.25s, box-shadow 0.25s, transform 0.2s;
  cursor: url('/cursor/cursor.png') 16 16, crosshair;
}
.btn-writeups:hover {
  background: rgba(192,57,43,0.16);
  border-color: rgba(192,57,43,0.9);
  box-shadow: 0 0 18px rgba(192,57,43,0.25), inset 0 0 8px rgba(192,57,43,0.08);
  transform: translateY(-2px);
}
.btn-writeups-arrow {
  font-size: 16px;
  animation: arrowPulse 2s ease-in-out infinite;
}
@keyframes arrowPulse {
  0%,100% { transform: translate(0,0); }
  50%      { transform: translate(2px,-2px); }
}

/* ── NAV WRITEUPS LINK ── */
nav a.nav-writeups {
  color: rgba(192,57,43,0.65);
  border-left: 1px solid rgba(255,255,255,0.04);
}
nav a.nav-writeups:hover {
  color: var(--red-link);
  background: rgba(192,57,43,0.09);
}
nav a.nav-writeups::before,
nav a.nav-writeups::after { content: ''; }

