/* ─── DESIGN TOKENS ─────────────────────────────────────────────── */
:root {
  --bg:          #0A0A0C;
  --bg-card:     #0F0F12;
  --bg-card-2:   #13131A;
  --fg:          #E8E8E8;
  --fg-dim:      #888896;
  --fg-faint:    #3A3A48;
  --accent:      #00F5FF;
  --accent-glow: rgba(0, 245, 255, 0.15);
  --accent-dim:  rgba(0, 245, 255, 0.08);
  --border:      rgba(232, 232, 232, 0.07);
  --border-acc:  rgba(0, 245, 255, 0.3);
  --mono:        'JetBrains Mono', monospace;
  --sans:        'Space Grotesk', sans-serif;
  --r:           0px;
}

/* ─── RESET ─────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box; margin: 0; padding: 0;
  -webkit-tap-highlight-color: transparent;
}
html {
  scroll-behavior: smooth;
  cursor: none;
  -webkit-overflow-scrolling: touch;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; }

/* restore cursor on touch / non-mouse devices */
@media (hover: none), (pointer: coarse) {
  html { cursor: auto; }
  #cursor { display: none; }
  a, button, [role="button"], .bento-card,
  .skill-tag, .contact-cmd { cursor: pointer; }
}

/* ─── CUSTOM CURSOR ─────────────────────────────────────────────── */
#cursor {
  position: fixed;
  top: 0; left: 0;
  width: 20px; height: 20px;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.08s linear, width 0.2s ease, height 0.2s ease, opacity 0.2s ease;
}
#cursor svg { width: 100%; height: 100%; }
body.cursor-hover #cursor { width: 34px; height: 34px; }
body.cursor-hover #cursor line { stroke: var(--accent); }

/* ─── CRT FLASH OVERLAY ─────────────────────────────────────────── */
#crt-flash {
  position: fixed; inset: 0;
  z-index: 10000;
  background: var(--fg);
  pointer-events: none;
  animation: crtPowerOn 1.1s cubic-bezier(0.22,1,0.36,1) forwards;
}
@keyframes crtPowerOn {
  0%   { opacity: 1; clip-path: inset(0 0 0 0); }
  8%   { opacity: 0.85; clip-path: inset(49% 0 49% 0); }
  18%  { opacity: 1; clip-path: inset(49.5% 0 49.5% 0); }
  35%  { opacity: 0.6; clip-path: inset(49.8% 0 49.8% 0); }
  60%  { opacity: 0; clip-path: inset(49.9% 0 49.9% 0); }
  100% { opacity: 0; clip-path: inset(50% 0 50% 0); pointer-events: none; }
}

/* ─── SCANLINE TEXTURE ──────────────────────────────────────────── */
body::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1000;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.035) 2px,
    rgba(0,0,0,0.035) 4px
  );
  mix-blend-mode: multiply;
}

/* ─── DOT MATRIX SVG BACKGROUND ────────────────────────────────── */
.dot-bg {
  position: absolute; inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(232,232,232,0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  z-index: 0;
}

/* ─── NAV ────────────────────────────────────────────────────────── */
#nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 500;
  padding: 18px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
}
#nav.scrolled {
  background: rgba(10,10,12,0.88);
  backdrop-filter: blur(4px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
}
.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}
.nav-links a {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-dim);
  position: relative;
  transition: color 0.2s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -3px;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.25s ease;
}
.nav-links a:hover,
.nav-links a.active { color: var(--fg); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

/* hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: none;
  background: none; border: none; padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 22px; height: 1px;
  background: var(--fg);
  transition: transform 0.25s, opacity 0.25s;
}

/* mobile overlay */
#nav-overlay {
  display: none;
  position: fixed; inset: 0;
  z-index: 490;
  background: rgba(10,10,12,0.98);
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 80px 40px;
  gap: 28px;
}
#nav-overlay.open { display: flex; }
.overlay-link {
  font-family: var(--sans);
  font-size: clamp(32px, 7vw, 56px);
  font-weight: 700;
  color: var(--fg-dim);
  letter-spacing: -0.02em;
  opacity: 0;
  transform: translateY(20px);
  transition: color 0.2s, opacity 0.3s, transform 0.3s;
}
.overlay-link:hover { color: var(--accent); }
#nav-overlay.open .overlay-link {
  opacity: 1;
  transform: translateY(0);
}
#nav-overlay.open .overlay-link:nth-child(2) { transition-delay: 0.05s; }
#nav-overlay.open .overlay-link:nth-child(3) { transition-delay: 0.1s; }
#nav-overlay.open .overlay-link:nth-child(4) { transition-delay: 0.15s; }
#nav-overlay.open .overlay-link:nth-child(5) { transition-delay: 0.2s; }
#nav-overlay.open .overlay-link:nth-child(6) { transition-delay: 0.25s; }
.nav-close {
  position: absolute; top: 22px; right: 40px;
  background: none; border: none;
  color: var(--fg); font-size: 22px;
  cursor: none;
  transition: transform 0.3s;
  font-family: var(--mono);
}
#nav-overlay.open .nav-close { transform: rotate(90deg); }

@media (max-width: 768px) {
  #nav { padding: 18px 24px; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
}

/* ─── HERO ───────────────────────────────────────────────────────── */
#hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 40px 80px;
  overflow: hidden;
}

/* ASCII watermark */
.hero-watermark {
  position: absolute;
  top: 50%;
  right: 60px;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.15;
  letter-spacing: 0.12em;
  color: rgba(0, 245, 255, 0.05);
  white-space: pre;
  user-select: none;
  pointer-events: none;
  z-index: 0;
}

.hero-eyebrow {
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  position: relative; z-index: 1;
}
.hero-name {
  font-family: var(--sans);
  font-size: clamp(44px, 10vw, 140px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.9;
  color: var(--fg);
  margin-bottom: 32px;
  position: relative; z-index: 1;
  overflow-wrap: break-word;
  word-break: break-word;
}
.hero-name .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(30px) skewX(-4deg);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.hero-name.revealed .char { opacity: 1; transform: translateY(0) skewX(0deg); }

/* glitch effect on hero name */
.hero-name.glitch {
  position: relative;
}
.hero-name.glitch::before,
.hero-name.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  font-family: var(--sans);
  font-size: clamp(44px, 10vw, 140px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.9;
  overflow: hidden;
  pointer-events: none;
}
.hero-name.glitch::before {
  color: var(--accent);
  animation: glitchTop 1.5s steps(2, end) forwards;
  clip-path: polygon(0 0, 100% 0, 100% 40%, 0 40%);
}
.hero-name.glitch::after {
  color: #FF0060;
  animation: glitchBot 1.5s steps(2, end) forwards;
  clip-path: polygon(0 60%, 100% 60%, 100% 100%, 0 100%);
}
@keyframes glitchTop {
  0%,100%  { transform: translate(0,0);    opacity: 0; }
  10%      { transform: translate(-3px,0);  opacity: 0.8; }
  20%      { transform: translate(3px,-2px); opacity: 0.6; }
  30%      { transform: translate(-2px,0);  opacity: 0; }
  40%      { transform: translate(4px,1px); opacity: 0.9; }
  60%      { transform: translate(-3px,0);  opacity: 0; }
}
@keyframes glitchBot {
  0%,100%  { transform: translate(0,0);     opacity: 0; }
  15%      { transform: translate(3px,0);   opacity: 0.7; }
  25%      { transform: translate(-4px,2px); opacity: 0.5; }
  45%      { transform: translate(2px,-1px); opacity: 0.9; }
  65%      { transform: translate(-2px,0);  opacity: 0; }
}

/* terminal typewriter */
.hero-terminal {
  font-size: clamp(11px, 1.5vw, 14px);
  color: var(--fg-dim);
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 48px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  position: relative; z-index: 1;
}
.hero-terminal .prompt { color: var(--accent); margin-right: 8px; }
.hero-terminal .typed-text { color: var(--fg); }
.hero-terminal .cursor-blink {
  display: inline-block;
  width: 8px; height: 14px;
  background: var(--accent);
  margin-left: 3px;
  animation: blink 1s step-end infinite;
  vertical-align: middle;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

.hero-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative; z-index: 1;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.hero-scroll-hint {
  font-size: 9px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--fg-faint);
  display: flex;
  align-items: center;
  gap: 12px;
}
.hero-scroll-hint::before {
  content: '';
  display: block;
  width: 40px; height: 1px;
  background: var(--fg-faint);
}
.hero-coords {
  font-size: 9px;
  letter-spacing: 0.15em;
  color: var(--fg-faint);
}

/* ─── SECTIONS (shared) ─────────────────────────────────────────── */
section {
  position: relative;
  padding: 120px 40px;
  overflow: hidden;
}
.section-label {
  font-size: 9px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.section-label::before {
  content: '';
  display: block;
  width: 24px; height: 1px;
  background: var(--accent);
}
.section-heading {
  font-family: var(--sans);
  font-size: clamp(36px, 5vw, 72px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.95;
  margin-bottom: 64px;
  color: var(--fg);
}

/* scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ─── ABOUT ──────────────────────────────────────────────────────── */
#about {
  border-top: 1px solid var(--border);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.about-photo-wrap {
  position: relative;
  aspect-ratio: 3/4;
  max-width: 380px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.about-photo-placeholder {
  width: 100%; height: 100%;
  background: var(--bg-card-2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  color: var(--fg-faint);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.about-photo-placeholder::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 12px,
    rgba(232,232,232,0.025) 12px,
    rgba(232,232,232,0.025) 13px
  );
}
.about-photo-label {
  position: relative; z-index: 1;
  text-align: center;
  line-height: 2;
}

.about-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

.about-photo-wrap:hover .about-photo {
  animation: photoGlitch 0.4s steps(3) forwards;
}
@keyframes photoGlitch {
  0%   { filter: none; }
  25%  { filter: drop-shadow(3px 0 #FF0060) drop-shadow(-3px 0 var(--accent)); clip-path: inset(20% 0 50% 0); }
  50%  { filter: drop-shadow(-4px 0 var(--accent)) drop-shadow(3px 0 #FF0060); clip-path: inset(60% 0 5% 0); }
  75%  { filter: drop-shadow(2px 0 #FF0060) drop-shadow(-2px 0 var(--accent)); }
  100% { filter: none; clip-path: none; }
}

/* profile dump table */
.profile-dump {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--border);
}
.profile-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  transition: background 0.2s;
}
.profile-row:hover { background: var(--accent-dim); }
.profile-key {
  color: var(--fg-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 10px;
}
.profile-val {
  color: var(--fg);
  line-height: 1.5;
}
.profile-val .tag {
  display: inline-block;
  border: 1px solid var(--border-acc);
  color: var(--accent);
  font-size: 9px;
  padding: 2px 7px;
  letter-spacing: 0.12em;
  margin: 2px 4px 2px 0;
  text-transform: uppercase;
}
.profile-val .accent { color: var(--accent); }

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .about-photo-wrap { max-width: 280px; aspect-ratio: 1/1; }
}

/* ─── PROJECTS ───────────────────────────────────────────────────── */
#projects {
  border-top: 1px solid var(--border);
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: auto auto;
  gap: 2px;
}
.bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 32px;
  position: relative;
  overflow: hidden;
  cursor: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.bento-card:hover {
  border-color: var(--border-acc);
  box-shadow: 6px 6px 0 var(--accent-glow);
  transform: translateY(-3px);
  z-index: 10;
}
.bento-card.large  { grid-column: span 7; }
.bento-card.medium { grid-column: span 5; }
.bento-card.wide   { grid-column: span 8; }
.bento-card.slim   { grid-column: span 4; }

.card-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 24px;
}
.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
}
.status-dot.active {
  background: #39FF14;
  box-shadow: 0 0 6px #39FF14;
  animation: dotPulse 2s ease infinite;
}
.status-dot.archived { background: #FFB800; }
@keyframes dotPulse {
  0%,100% { opacity: 1; }
  50%     { opacity: 0.4; }
}

.card-codename {
  font-family: var(--mono);
  font-size: clamp(18px, 2.5vw, 26px);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg);
  margin-bottom: 10px;
  line-height: 1;
}
.card-desc {
  font-size: 12px;
  color: var(--fg-dim);
  line-height: 1.6;
  letter-spacing: 0.04em;
  margin-bottom: 24px;
  max-width: 380px;
}

.card-stack {
  position: absolute;
  inset: 0;
  background: var(--bg-card-2);
  border: 1px solid var(--border-acc);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.bento-card:hover .card-stack {
  opacity: 1;
  transform: translateY(0);
}
.card-stack-prompt {
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}
.card-stack-line {
  font-size: 11px;
  color: var(--fg-dim);
  line-height: 1.8;
}
.card-stack-line .k { color: var(--fg-dim); }
.card-stack-line .v { color: var(--fg); }
.card-stack-line .acc { color: var(--accent); }

.card-tag {
  display: inline-block;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px solid var(--fg-faint);
  color: var(--fg-dim);
  padding: 3px 8px;
  margin-right: 6px;
}

.card-number {
  position: absolute;
  top: 32px; right: 32px;
  font-size: 56px;
  font-weight: 700;
  color: var(--fg-faint);
  line-height: 1;
  letter-spacing: -0.04em;
  font-family: var(--sans);
  pointer-events: none;
  user-select: none;
}

@media (max-width: 900px) {
  .bento-grid { grid-template-columns: 1fr 1fr; }
  .bento-card.large, .bento-card.medium,
  .bento-card.wide,  .bento-card.slim { grid-column: span 1; }
}
@media (max-width: 600px) {
  .bento-grid { grid-template-columns: 1fr; }
}

/* ─── SKILLS ─────────────────────────────────────────────────────── */
#skills {
  border-top: 1px solid var(--border);
}
.skills-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.radar-wrap {
  display: flex;
  justify-content: center;
}
.radar-wrap svg {
  width: min(100%, 420px);
  height: auto;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: baseline;
}
.skill-tag {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg);
  line-height: 1;
  transition: color 0.2s, opacity 0.2s;
  cursor: none;
}
.skill-tag:hover { color: var(--accent); }
.skill-tag[data-level="5"] { font-size: 22px; font-weight: 700; }
.skill-tag[data-level="4"] { font-size: 17px; font-weight: 500; opacity: 0.9; }
.skill-tag[data-level="3"] { font-size: 13px; font-weight: 400; opacity: 0.75; }
.skill-tag[data-level="2"] { font-size: 11px; font-weight: 300; opacity: 0.6; }
.skill-tag[data-level="1"] { font-size: 9px;  font-weight: 300; opacity: 0.45; }

.skills-categories {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-top: 48px;
}
.cat-label {
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

@media (max-width: 900px) {
  .skills-layout { grid-template-columns: 1fr; gap: 48px; }
}

/* ─── COMMUNITY ─────────────────────────────────────────────────────── */
#community {
  border-top: 1px solid var(--border);
  --accent:      #FF6B00;
  --accent-glow: rgba(255, 107, 0, 0.15);
  --accent-dim:  rgba(255, 107, 0, 0.08);
  --border-acc:  rgba(255, 107, 0, 0.3);
}
.community-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.comm-org-tag {
  font-size: 9px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.comm-org-tag a {
  color: inherit;
  border-bottom: 1px solid var(--border-acc);
  padding-bottom: 1px;
  transition: color 0.2s;
}
.comm-org-tag a:hover { color: var(--fg); }
.comm-title {
  font-family: var(--sans);
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--fg);
  margin-bottom: 10px;
}
.comm-sub {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 28px;
}
.comm-desc {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.75;
  color: var(--fg-dim);
  margin-bottom: 32px;
  font-weight: 300;
}
.comm-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.comm-chip {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: 1px solid var(--border-acc);
  color: var(--accent);
  padding: 5px 12px;
}
.comm-quote {
  border-left: 2px solid var(--accent);
  padding: 4px 0 4px 24px;
  margin-bottom: 32px;
  position: relative;
}
.comm-quote-mark {
  font-family: var(--sans);
  font-size: 48px;
  line-height: 0;
  color: var(--accent);
  opacity: 0.25;
  position: absolute;
  top: 24px; left: 6px;
}
.comm-quote p,
.comm-quote {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.75;
  color: var(--fg);
  font-style: italic;
  font-weight: 300;
}
.comm-cite {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  font-style: normal;
  color: var(--accent);
  letter-spacing: 0.12em;
  margin-top: 12px;
}
.comm-divider {
  width: 40px;
  height: 1px;
  background: var(--border);
  margin: 28px 0;
}
.comm-reflection {
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.8;
  color: var(--fg-dim);
  font-weight: 300;
  margin-bottom: 36px;
}
.comm-stat-row {
  display: flex;
  gap: 40px;
  border-top: 1px solid var(--border);
  padding-top: 24px;
}
.comm-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.comm-stat-val {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--fg);
  letter-spacing: 0.06em;
}
.comm-stat-key {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-faint);
}
@media (max-width: 900px) {
  .community-grid { grid-template-columns: 1fr; gap: 48px; }
}

/* ─── CONTACT ─────────────────────────────────────────────────────── */
#contact {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 140px 40px;
}
.contact-heading {
  font-family: var(--sans);
  font-size: clamp(40px, 6vw, 88px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: var(--fg);
  margin-bottom: 52px;
  text-transform: lowercase;
}

.contact-cmd {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-size: clamp(13px, 2vw, 18px);
  letter-spacing: 0.04em;
  color: var(--fg-dim);
  border: 1px solid var(--border);
  padding: 16px 28px;
  cursor: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  margin-bottom: 52px;
  position: relative;
}
.contact-cmd:hover {
  border-color: var(--accent);
  color: var(--fg);
  background: var(--accent-dim);
}
.contact-cmd .c-prompt { color: var(--accent); margin-right: 10px; }
.contact-cmd .c-copy-hint {
  position: absolute;
  top: -28px; left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.contact-cmd:hover .c-copy-hint { opacity: 1; }
.contact-copied {
  position: absolute;
  top: -28px; left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #39FF14;
  opacity: 0;
  transition: opacity 0.3s;
  white-space: nowrap;
  pointer-events: none;
}
.contact-copied.show { opacity: 1; }

.contact-handles {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
.contact-handle {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--fg-dim);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s;
}
.contact-handle:hover { color: var(--fg); }
.contact-handle .flag { color: var(--accent); margin-right: 2px; }

/* ─── FOOTER ─────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-faint);
}
@media (max-width: 600px) {
  footer { flex-direction: column; gap: 12px; text-align: center; }
  section { padding: 80px 24px; }
  #hero { padding: 0 24px 60px; }
  #nav { padding: 16px 24px; }
  #contact { padding: 80px 24px; }
  footer { padding: 24px; }
}

/* ─── TABLET: hide watermark, compress nav padding ──────────────── */
@media (max-width: 900px) {
  .hero-watermark { display: none; }
  #nav { padding: 16px 32px; }
}

/* ─── SMALL PHONE (≤ 480px) ────────────────────────────────────── */
@media (max-width: 480px) {
  /* tighter section spacing */
  section { padding: 64px 20px; }
  #hero   { padding: 0 20px 48px; }
  #contact { padding: 64px 20px; }
  footer  { padding: 20px; }

  /* hero */
  .hero-eyebrow { font-size: 9px; letter-spacing: 0.2em; }
  .hero-scroll-hint, .hero-coords { font-size: 8px; }

  /* profile row: stack key above value */
  .profile-row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 12px 0;
  }

  /* contact command: allow wrapping */
  .contact-cmd {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    font-size: 12px;
    padding: 14px 18px;
    gap: 4px;
  }
  .contact-cmd .c-prompt { margin-right: 4px; }

  /* section headings */
  .section-heading { margin-bottom: 40px; }

  /* skills tag cloud: tighter */
  .tag-cloud { gap: 8px; }
  .skill-tag[data-level="5"] { font-size: 18px; }
  .skill-tag[data-level="4"] { font-size: 14px; }

  /* community */
  .comm-stat-row { gap: 24px; }
  .comm-title { font-size: 22px; }

  /* card number decoration: smaller */
  .card-number { font-size: 40px; top: 20px; right: 20px; }
  .bento-card { padding: 24px; }
}

/* ─── VERY SMALL (≤ 360px) ─────────────────────────────────────── */
@media (max-width: 360px) {
  section { padding: 56px 16px; }
  #hero   { padding: 0 16px 40px; }
  #nav    { padding: 14px 16px; }
  .nav-logo { font-size: 10px; }
  .contact-handles { gap: 8px; }
}

/* ─── SKIP LINK ─────────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 99999;
  background: var(--bg);
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 8px 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: top 0.2s;
}
.skip-link:focus { top: 16px; }

/* ─── REDUCED MOTION ────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
  html { scroll-behavior: auto; }
  #crt-flash { display: none; }
  .reveal { opacity: 1; transform: none; }
  .hero-eyebrow,
  .hero-name .char,
  .hero-terminal,
  .hero-bottom { opacity: 1 !important; transform: none !important; }
}
