/* ==================== TOKENS ==================== */
:root {
  --bg: #030308;
  --surface: #07071a;
  --surface-2: #0c0c28;
  --cyan: #00e5ff;
  --cyan-dim: rgba(0, 229, 255, 0.07);
  --cyan-glow: rgba(0, 229, 255, 0.22);
  --cyan-border: rgba(0, 229, 255, 0.16);
  --pink: #ff2d78;
  --pink-dim: rgba(255, 45, 120, 0.08);
  --purple: #8b5cf6;
  --yellow: #f59e0b;

  /* Brighter readable text */
  --title: #f0f8ff;
  --text: #94aac0;        /* was #5a7090 — now clearly readable */
  --text-mid: #bdd0e4;    /* was #7a90a8 — now bright */

  --mono: 'JetBrains Mono', monospace;
  --head: 'Orbitron', sans-serif;
  --body: 'Space Grotesk', sans-serif;
  --nav-h: 60px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==================== RESET ==================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text-mid);
  font-family: var(--body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

/* ==================== SCANLINES ==================== */
.scanlines {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg, transparent 0px, transparent 3px,
    rgba(0,0,0,0.07) 3px, rgba(0,0,0,0.07) 4px
  );
  pointer-events: none;
  z-index: 9999;
  opacity: 0.35;
}

/* ==================== APP LOADER ==================== */
.app-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 100vh;
}
.app-loading__dot {
  width: 6px; height: 6px;
  background: var(--cyan);
  border-radius: 50%;
  animation: loader-bounce 0.8s ease infinite;
}
.app-loading__dot:nth-child(2) { animation-delay: 0.15s; }
.app-loading__dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes loader-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50% { transform: translateY(-8px); opacity: 1; }
}

/* ==================== UTILITIES ==================== */
.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }

.section__header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 56px;
}
.section__num {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--cyan);
  opacity: 0.5;
}
.section__label {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--cyan);
  letter-spacing: 0.1em;
}
.section__line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--cyan-border), transparent);
}

/* ==================== ANGULAR CUT CORNERS ==================== */
.angular {
  clip-path: polygon(
    0 0, calc(100% - 14px) 0, 100% 14px,
    100% 100%, 14px 100%, 0 calc(100% - 14px)
  );
}

/* ==================== SHARED ORBIT KEYFRAME ==================== */
@keyframes spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}
@keyframes spin-solo {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}
.btn--primary {
  background: var(--cyan);
  color: #030308;
  font-weight: 700;
}
.btn--primary:hover {
  background: #00d4f0;
  transform: translateY(-2px);
  box-shadow: 0 0 30px var(--cyan-glow), 0 0 60px rgba(0,229,255,0.08);
}
.btn--ghost {
  background: transparent;
  color: var(--text-mid);
  box-shadow: inset 0 0 0 1px var(--cyan-border);
}
.btn--ghost:hover {
  box-shadow: inset 0 0 0 1px var(--cyan);
  color: var(--cyan);
  transform: translateY(-2px);
}
.btn--sm { padding: 7px 14px; font-size: 0.72rem; }

/* ==================== TAGS ==================== */
.tag {
  display: inline-block;
  padding: 4px 10px;
  background: var(--cyan-dim);
  border: 1px solid var(--cyan-border);
  border-radius: 2px;
  font-size: 0.72rem;
  color: var(--text-mid);
  font-family: var(--mono);
  transition: all 0.2s ease;
  clip-path: polygon(0 0, calc(100% - 5px) 0, 100% 5px, 100% 100%, 5px 100%, 0 calc(100% - 5px));
}
.tag:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 8px var(--cyan-glow);
}

/* ==================== LINK CHIPS ==================== */
.link-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  background: var(--cyan-dim);
  border: 1px solid var(--cyan-border);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-mid);
  transition: all 0.2s ease;
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
}
.link-chip:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 12px var(--cyan-glow);
}

/* ==================== REVEAL ==================== */
.reveal {
  opacity: 0;
  transform: translateY(26px) scale(0.985);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.revealed { opacity: 1; transform: translateY(0) scale(1); }

/* ==================== NAV ==================== */
.nav {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}
.nav.scrolled {
  background: rgba(3,3,8,0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--cyan-border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 24px;
}
.nav__logo {
  font-family: var(--head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--title);
  letter-spacing: 0.1em;
  flex-shrink: 0;
}
.nav__logo-bracket { color: var(--cyan); }
.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}
.nav__link {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text);
  letter-spacing: 0.05em;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav__link-num { color: var(--cyan); opacity: 0.5; }
.nav__link:hover, .nav__link.active-link { color: var(--cyan); }
.nav__link.active-link .nav__link-num { opacity: 1; }
.nav__right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav__toggle span {
  display: block;
  width: 20px;
  height: 1px;
  background: var(--cyan);
  transition: all 0.3s ease;
}
.nav__close {
  display: none;
  position: absolute;
  top: 18px; right: 24px;
  font-size: 1.3rem;
  color: var(--cyan);
  cursor: pointer;
}

/* ==================== HERO ==================== */
.hero {
  position: relative;
  min-height: 100svh;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero__canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__rings {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.ring--1 {
  width: 360px; height: 360px;
  border-color: rgba(0,229,255,0.14);
  animation: spin 10s linear infinite;
}
.ring--2 {
  width: 560px; height: 560px;
  border-color: rgba(0,229,255,0.07);
  border-style: dashed;
  animation: spin 18s linear infinite reverse;
}
.ring--3 {
  width: 760px; height: 760px;
  border-color: rgba(255,45,120,0.05);
  animation: spin 28s linear infinite;
}
.ring--4 {
  width: 980px; height: 980px;
  border-color: rgba(139,92,246,0.03);
  animation: spin 40s linear infinite reverse;
}
.ring__orb {
  position: absolute;
  top: -4px; left: 50%;
  transform: translateX(-50%);
  width: 8px; height: 8px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 14px var(--cyan), 0 0 28px var(--cyan-glow);
}
.ring--2 .ring__orb {
  background: var(--pink);
  box-shadow: 0 0 10px var(--pink), 0 0 22px rgba(255,45,120,0.3);
  width: 6px; height: 6px;
}

.hero__inner {
  position: relative;
  z-index: 2;
  padding-top: var(--nav-h);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}
.hero__sys {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--cyan);
  opacity: 0.85;
  animation: fadeInDown 0.6s ease forwards;
}
.sys__dot {
  width: 6px; height: 6px;
  background: var(--cyan);
  border-radius: 50%;
  animation: pulse-dot 2s ease infinite;
  flex-shrink: 0;
}
.sys__text { letter-spacing: 0.05em; }

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,229,255,0.7); }
  50%       { box-shadow: 0 0 0 7px transparent; }
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Glitch */
.hero__name {
  font-family: var(--head);
  font-size: clamp(2.6rem, 7.5vw, 5.8rem);
  font-weight: 900;
  color: var(--title);
  letter-spacing: 0.08em;
  line-height: 1;
  animation: heroIn 0.8s var(--ease) 0.15s both;
  position: relative;
  cursor: default;
  text-shadow: 0 0 50px rgba(0,229,255,0.12);
}
@keyframes heroIn {
  from { opacity: 0; transform: translateY(30px) skewX(-2deg); }
  to   { opacity: 1; transform: translateY(0) skewX(0deg); }
}
.glitch::before, .glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  opacity: 0;
}
.glitch:hover::before, .glitch--active::before {
  animation: glitch-a 0.45s ease;
  color: var(--cyan);
  text-shadow: none;
}
.glitch:hover::after, .glitch--active::after {
  animation: glitch-b 0.45s ease 0.06s;
  color: var(--pink);
  text-shadow: none;
}
@keyframes glitch-a {
  0%,100%  { opacity:0; clip-path:inset(0 0 90% 0); transform:translate(-3px,0); }
  20%,60%  { opacity:0.9; clip-path:inset(5% 0 65% 0); transform:translate(-4px,0); }
  40%,80%  { opacity:0.7; clip-path:inset(35% 0 35% 0); transform:translate(3px,0); }
}
@keyframes glitch-b {
  0%,100%  { opacity:0; clip-path:inset(70% 0 0 0); transform:translate(3px,0); }
  20%,60%  { opacity:0.85; clip-path:inset(55% 0 10% 0); transform:translate(4px,0); }
  40%,80%  { opacity:0.65; clip-path:inset(80% 0 0 0); transform:translate(-2px,0); }
}

.hero__tagline {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--text-mid);
  animation: heroIn 0.8s var(--ease) 0.25s both;
}
.hero__current {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text);
  animation: heroIn 0.8s var(--ease) 0.32s both;
}
.hero__typed { color: var(--cyan); }

/* HUD panels */
.hud-grid {
  display: flex;
  animation: heroIn 0.8s var(--ease) 0.42s both;
}
.hud-panel {
  padding: 14px 22px;
  background: rgba(0,229,255,0.03);
  border: 1px solid var(--cyan-border);
  border-right: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  overflow: hidden;
  transition: background 0.2s ease;
}
.hud-panel::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0,229,255,0.04), transparent);
  animation: hud-scan 4s ease infinite;
}
/* stagger scan per panel */
.hud-panel:nth-child(1)::after { animation-delay: 0s; }
.hud-panel:nth-child(2)::after { animation-delay: 1s; }
.hud-panel:nth-child(3)::after { animation-delay: 2s; }
.hud-panel:nth-child(4)::after { animation-delay: 3s; }
@keyframes hud-scan {
  0% { left: -100%; }
  100% { left: 200%; }
}
.hud-panel:first-child {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}
.hud-panel:last-child {
  border-right: 1px solid var(--cyan-border);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
}
.hud-panel:hover { background: rgba(0,229,255,0.07); }
.hud-panel__id {
  font-family: var(--mono);
  font-size: 0.58rem;
  color: var(--cyan);
  opacity: 0.5;
}
.hud-panel__val {
  font-family: var(--head);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--title);
  letter-spacing: 0.05em;
  line-height: 1;
}
.hud-panel__lbl {
  font-family: var(--mono);
  font-size: 0.58rem;
  color: var(--text);
  letter-spacing: 0.07em;
  white-space: nowrap;
}

.hero__ctas {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  animation: heroIn 0.8s var(--ease) 0.52s both;
}

.hero__scroll {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 2;
}
.scroll__line {
  width: 1px; height: 48px;
  background: linear-gradient(to bottom, transparent, var(--cyan));
  animation: scrollLine 2.2s ease infinite;
}
@keyframes scrollLine {
  0%,100% { transform: scaleY(0); transform-origin: top; opacity: 0; }
  40%     { transform: scaleY(1); opacity: 1; }
  80%     { transform: scaleY(1); transform-origin: bottom; opacity: 0; }
}
.scroll__label {
  font-family: var(--mono);
  font-size: 0.58rem;
  color: var(--text);
  letter-spacing: 0.18em;
  writing-mode: vertical-rl;
}

/* ==================== ABOUT ==================== */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 40px;
  align-items: start;
}

/* Terminal */
.about__terminal {
  background: #050512;
  border: 1px solid var(--cyan-border);
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
  overflow: hidden;
}
.terminal__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(0,229,255,0.04);
  border-bottom: 1px solid var(--cyan-border);
}
.terminal__dots { display: flex; gap: 6px; }
.terminal__dots span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
}
.terminal__dots span:first-child  { background: #ff5f57; }
.terminal__dots span:nth-child(2) { background: #febc2e; }
.terminal__dots span:nth-child(3) { background: #28c840; }
.terminal__title {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text);
  margin-left: auto;
}
.terminal__body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.terminal__cmd {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text-mid);
}
.t-prompt { color: var(--cyan); }
.terminal__output {
  padding: 10px 0 10px 20px;
  border-left: 1px solid var(--cyan-border);
  margin: 4px 0;
}
.terminal__output p {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-mid);
  line-height: 1.9;
}
.t-comment { color: rgba(148, 170, 192, 0.45) !important; }
.t-link { color: var(--cyan); text-decoration: none; border-bottom: 1px solid rgba(0,229,255,0.3); transition: border-color 0.2s; }
.t-link:hover { border-color: var(--cyan); }
.t-key {
  color: var(--cyan);
  display: inline-block;
  min-width: 120px;
}
.terminal__cursor {
  color: var(--cyan);
  animation: blink 1s step-start infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* About sidebar */
.about__sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.about__photo-wrap {
  position: relative;
  overflow: hidden;
}
.about__photo {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  filter: grayscale(25%) brightness(0.88);
  transition: filter 0.7s ease, opacity 0.7s ease;
}
.about__photo:hover { filter: grayscale(0%) brightness(1); }
.about__photo-wrap.photo-glitch--active .about__photo {
  animation: photo-glitch-anim 0.5s ease forwards;
}


.photo__corner {
  position: absolute;
  width: 16px; height: 16px;
}
.photo__corner--tl { top:6px;    left:6px;    border-top:1px solid var(--cyan); border-left:1px solid var(--cyan); }
.photo__corner--tr { top:6px;    right:6px;   border-top:1px solid var(--cyan); border-right:1px solid var(--cyan); }
.photo__corner--bl { bottom:6px; left:6px;    border-bottom:1px solid var(--cyan); border-left:1px solid var(--cyan); }
.photo__corner--br { bottom:6px; right:6px;   border-bottom:1px solid var(--cyan); border-right:1px solid var(--cyan); }
.photo__scan {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(0, 229, 255, 0.146) 50%, transparent 100%);
  animation: scan-y 2s ease-in-out infinite;
}
@keyframes scan-y {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

/* Sys table */
.sys-table {
  background: var(--surface);
  border: 1px solid var(--cyan-border);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}
.sys-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 16px;
  border-bottom: 1px solid rgba(0,229,255,0.05);
  font-family: var(--mono);
  font-size: 0.72rem;
}
.sys-row:last-child { border-bottom: none; }
.sys-key { color: var(--text); }
.sys-val { color: var(--text-mid); text-align: right; }
.sys-val--active {
  color: var(--cyan);
  animation: flicker 4s ease infinite;
}
@keyframes flicker {
  0%,94%,100% { opacity:1; }
  95% { opacity:0.3; }
  97% { opacity:1; }
  98% { opacity:0.5; }
}

.about__links { display: flex; flex-wrap: wrap; gap: 8px; }

/* ==================== TIMELINE ==================== */
.timeline { display: flex; flex-direction: column; gap: 20px; }

.timeline__item {
  display: grid;
  grid-template-columns: 152px 1fr;
  gap: 20px;
  align-items: start;
}
.timeline__meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 18px;
  text-align: right;
}
.timeline__period {
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--text);
  letter-spacing: 0.04em;
  line-height: 1.5;
}
.timeline__status {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--text);
  letter-spacing: 0.08em;
}
.timeline__status--active {
  color: var(--cyan);
  animation: flicker 4s ease infinite;
}

.timeline__card {
  background: var(--surface);
  border: 1px solid var(--cyan-border);
  border-left: 2px solid rgba(0,229,255,0.12);
  padding: 20px 24px;
  position: relative;
  overflow: hidden;
  transition: all 0.25s ease;
}
/* Sliding glow on card top border */
.timeline__card::before {
  content: '';
  position: absolute;
  top: 0; left: -60px;
  width: 60px; height: 1px;
  background: linear-gradient(to right, transparent, var(--cyan), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.timeline__card:hover::before {
  opacity: 1;
  animation: card-slide 2s linear infinite;
}
@keyframes card-slide {
  from { left: -60px; }
  to   { left: calc(100% + 60px); }
}
.timeline__card:hover {
  border-color: rgba(0,229,255,0.28);
  border-left-color: var(--cyan);
  background: var(--surface-2);
}
.timeline__card--active {
  border-left-color: var(--cyan);
  animation: left-breathe 2.5s ease infinite;
}
@keyframes left-breathe {
  0%,100% { border-left-color: rgba(0,229,255,0.35); box-shadow: -3px 0 12px transparent; }
  50%     { border-left-color: var(--cyan); box-shadow: -3px 0 16px var(--cyan-glow); }
}

.tc__header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.tc__role {
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--title);
}
.tc__org {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--cyan);
  opacity: 0.75;
}
.tc__desc {
  font-size: 0.875rem;
  line-height: 1.75;
  margin-bottom: 14px;
  color: var(--text-mid);
}
.tc__desc strong { color: var(--title); }
.tc__tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ==================== PROJECTS ==================== */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.project-card {
  background: var(--surface);
  border: 1px solid var(--cyan-border);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
  transition: all 0.25s ease;
}
/* Sliding glow top */
.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: -60px;
  width: 60px; height: 1px;
  background: linear-gradient(to right, transparent, var(--cyan), transparent);
  opacity: 0;
}
.project-card:hover::before {
  opacity: 1;
  animation: card-slide 1.8s linear infinite;
}
.project-card:hover {
  border-color: rgba(0,229,255,0.3);
  background: var(--surface-2);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(0,229,255,0.08);
}

/* Featured spans full row */
.project-card--featured {
  grid-column: span 3;
  background: linear-gradient(135deg, #07071a 0%, #0a0a28 100%);
  flex-direction: row;
  gap: 0;
  align-items: center;
}
.project-card--featured .project-card__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 24px;
}

/* Mini orbital rings on featured card */
.card-cosmos {
  position: relative;
  width: 160px;
  height: 160px;
  flex-shrink: 0;
}
.cc-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.cc-ring--1 {
  width: 54px; height: 54px;
  border-color: rgba(0,229,255,0.35);
  animation: spin 5s linear infinite;
}
.cc-ring--2 {
  width: 96px; height: 96px;
  border-color: rgba(0,229,255,0.15);
  border-style: dashed;
  animation: spin 9s linear infinite reverse;
}
.cc-ring--3 {
  width: 144px; height: 144px;
  border-color: rgba(255,45,120,0.1);
  animation: spin 15s linear infinite;
}
.cc-orb {
  position: absolute;
  top: -3px; left: 50%;
  transform: translateX(-50%);
  width: 6px; height: 6px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--cyan), 0 0 20px var(--cyan-glow);
}
.cc-ring--2 .cc-orb {
  background: var(--pink);
  box-shadow: 0 0 8px var(--pink);
  width: 5px; height: 5px;
}

.project-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.p-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--text);
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.p-badge--wip    { color: var(--yellow); }
.p-badge--live   { color: var(--cyan); }
.p-badge--merged { color: var(--purple); }
.p-badge--win    { color: var(--yellow); }
.project-card__title {
  font-family: var(--head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--title);
  letter-spacing: 0.05em;
}
.project-card--featured .project-card__title { font-size: 1.25rem; }
.project-card__ext {
  color: var(--text);
  font-size: 1rem;
  transition: color 0.2s ease;
  flex-shrink: 0;
}
.project-card__ext:hover { color: var(--cyan); }
.project-card__desc {
  font-size: 0.84rem;
  line-height: 1.75;
  flex: 1;
  color: var(--text-mid);
}
.project-card__desc strong { color: var(--title); }
.project-card__stack { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }

/* ==================== SKILLS ==================== */
.skills__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.skills__group {
  background: var(--surface);
  border: 1px solid var(--cyan-border);
  padding: 24px;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s ease;
}
.skills__group:hover { border-color: rgba(0,229,255,0.28); }
/* Sliding glow on skill group hover */
.skills__group::before {
  content: '';
  position: absolute;
  top: 0; left: -60px;
  width: 60px; height: 1px;
  background: linear-gradient(to right, transparent, var(--cyan), transparent);
  opacity: 0;
}
.skills__group:hover::before {
  opacity: 1;
  animation: card-slide 2.2s linear infinite;
}

/* Mini orbit in corner */
.skills__cosmos {
  position: absolute;
  top: -20px; right: -20px;
  width: 80px; height: 80px;
  pointer-events: none;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}
.skills__group:hover .skills__cosmos { opacity: 1; }
.sc-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(0,229,255,0.25);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.sc-ring--1 {
  width: 28px; height: 28px;
  animation: spin 5s linear infinite;
}
.sc-ring--2 {
  width: 58px; height: 58px;
  border-style: dashed;
  border-color: rgba(0,229,255,0.12);
  animation: spin 11s linear infinite reverse;
}
.sc-orb {
  position: absolute;
  top: -2px; left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 4px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--cyan);
}

.skills__group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.skills__group-icon {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--cyan);
}
.skills__group-title {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-mid);
  letter-spacing: 0.1em;
}
.skills__tags { display: flex; flex-wrap: wrap; gap: 8px; }

/* ==================== AWARDS ==================== */
.awards__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.award-card {
  background: var(--surface);
  border: 1px solid var(--cyan-border);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
  transition: all 0.25s ease;
}
.award-card:hover {
  border-color: rgba(0,229,255,0.3);
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(0,229,255,0.08);
}
/* Sliding glow */
.award-card::before {
  content: '';
  position: absolute;
  top: 0; left: -60px;
  width: 60px; height: 1px;
  background: linear-gradient(to right, transparent, var(--cyan), transparent);
  opacity: 0;
}
.award-card:hover::before {
  opacity: 1;
  animation: card-slide 2s linear infinite;
}

/* Orbital cosmos in award card corner */
.award-cosmos {
  position: absolute;
  bottom: -20px; right: -20px;
  width: 100px; height: 100px;
  pointer-events: none;
  opacity: 0.4;
  transition: opacity 0.3s ease;
}
.award-card:hover .award-cosmos { opacity: 0.8; }
.ac-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.ac-ring--1 {
  width: 30px; height: 30px;
  border-color: rgba(0,229,255,0.4);
  animation: spin 5s linear infinite;
}
.ac-ring--2 {
  width: 60px; height: 60px;
  border-color: rgba(255,45,120,0.25);
  border-style: dashed;
  animation: spin 10s linear infinite reverse;
}
.ac-ring--3 {
  width: 90px; height: 90px;
  border-color: rgba(139,92,246,0.12);
  animation: spin 16s linear infinite;
}
.ac-orb {
  position: absolute;
  top: -3px; left: 50%;
  transform: translateX(-50%);
  width: 6px; height: 6px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--cyan);
}
.ac-ring--2 .ac-orb {
  background: var(--pink);
  box-shadow: 0 0 6px var(--pink);
  width: 4px; height: 4px;
}

.award-card__num {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--cyan);
  opacity: 0.5;
}
.award-card__icon { font-size: 1.8rem; line-height: 1; }
.award-card__title {
  font-family: var(--head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--title);
  letter-spacing: 0.05em;
  line-height: 1.3;
}
.award-card__sub {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--cyan);
  opacity: 0.65;
}
.award-card__desc {
  font-size: 0.86rem;
  line-height: 1.7;
  color: var(--text-mid);
}

/* ==================== CONTACT ==================== */
.contact__inner {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  position: relative;
}

/* Orbital rings behind contact */
.contact__rings {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 500px; height: 500px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}
.contact__inner > *:not(.contact__rings) { position: relative; z-index: 1; }
.cr-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.cr-ring--1 {
  width: 160px; height: 160px;
  border-color: rgba(0,229,255,0.2);
  animation: spin 8s linear infinite;
}
.cr-ring--2 {
  width: 280px; height: 280px;
  border-color: rgba(0,229,255,0.1);
  border-style: dashed;
  animation: spin 15s linear infinite reverse;
}
.cr-ring--3 {
  width: 420px; height: 420px;
  border-color: rgba(255,45,120,0.06);
  animation: spin 25s linear infinite;
}
.cr-orb {
  position: absolute;
  top: -4px; left: 50%;
  transform: translateX(-50%);
  width: 8px; height: 8px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--cyan), 0 0 24px var(--cyan-glow);
}
.cr-ring--2 .cr-orb {
  background: var(--pink);
  box-shadow: 0 0 8px var(--pink);
  width: 6px; height: 6px;
}

.contact__sys {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--cyan);
  letter-spacing: 0.05em;
}
.contact__title {
  font-family: var(--head);
  font-size: clamp(2rem, 5.5vw, 3.8rem);
  font-weight: 900;
  color: var(--title);
  letter-spacing: 0.05em;
  line-height: 1.1;
  text-shadow: 0 0 60px rgba(0,229,255,0.1);
}
.contact__accent { color: var(--cyan); }
.contact__sub {
  font-size: 0.92rem;
  color: var(--text-mid);
  line-height: 1.75;
  max-width: 480px;
}
.contact__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.contact__email {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--text);
}

/* ==================== FOOTER ==================== */
.footer {
  border-top: 1px solid var(--cyan-border);
  padding: 20px 0;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer__copy {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text);
}
.footer__mono {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text);
  opacity: 0.5;
}
.footer__socials { display: flex; gap: 16px; }
.footer__socials a {
  color: var(--text);
  font-size: 1.05rem;
  transition: color 0.2s ease;
}
.footer__socials a:hover {
  color: var(--cyan);
  text-shadow: 0 0 8px var(--cyan-glow);
}

/* ==================== SCROLL UP ==================== */
.scroll-up {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 36px; height: 36px;
  background: var(--surface);
  border: 1px solid var(--cyan-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan);
  font-size: 0.9rem;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 99;
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
}
.scroll-up.show { opacity: 1; transform: translateY(0); pointer-events: all; }
.scroll-up:hover { background: var(--cyan-dim); box-shadow: 0 0 16px var(--cyan-glow); }

/* ==================== TYPED ==================== */
.typed-cursor { color: var(--cyan); }

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(0,229,255,0.12); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,229,255,0.28); }

/* ==================== RESPONSIVE ==================== */

/* Tablet */
@media (max-width: 1024px) {
  .hud-panel__val { font-size: 1.15rem; }
  .projects__grid { grid-template-columns: 1fr 1fr; }
  .project-card--featured {
    grid-column: span 2;
    flex-direction: column;
  }
  .project-card--featured .project-card__content { padding-right: 0; }
  .card-cosmos { display: none; }
  .awards__grid { grid-template-columns: 1fr 1fr; }
  .about__grid { grid-template-columns: 1fr 320px; gap: 32px; }
}

/* Mobile */
@media (max-width: 768px) {
  :root { --nav-h: 56px; }
  .section { padding: 64px 0; }
  .container { padding: 0 16px; }

  /* Nav drawer */
  .nav__links {
    position: fixed;
    top: 0; right: -100%;
    height: 100svh; height: 100vh;
    width: min(280px, 80vw);
    background: rgba(3,3,8,0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 64px 32px;
    gap: 32px;
    border-left: 1px solid var(--cyan-border);
    transition: right 0.3s ease;
    z-index: 200;
  }
  .nav__links.show-menu { right: 0; }
  .nav__link { font-size: 0.9rem; gap: 8px; }
  .nav__close { display: block; }
  .nav__toggle { display: flex; }

  /* Hero */
  .hero__name { font-size: clamp(2rem, 10vw, 3.2rem); }
  .hero__tagline { font-size: 0.88rem; }
  .hero__current { font-size: 0.75rem; }
  .hud-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }
  .hud-panel {
    border-right: 1px solid var(--cyan-border) !important;
    clip-path: none !important;
    padding: 12px 16px;
  }
  .hud-panel__val { font-size: 1.2rem; }
  .hud-panel__lbl { font-size: 0.55rem; }
  .hero__ctas { flex-direction: column; align-items: flex-start; gap: 8px; }
  .hero__ctas .btn { width: 100%; justify-content: center; }

  /* About */
  .about__grid { grid-template-columns: 1fr; gap: 24px; }
  .about__sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    order: -1;
  }
  .about__photo-wrap { grid-row: span 2; }
  .about__photo { aspect-ratio: 2/3; }
  .about__links { grid-column: 1 / -1; }

  /* Timeline */
  .timeline__item { grid-template-columns: 1fr; gap: 6px; }
  .timeline__meta {
    text-align: left;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding-top: 0;
  }
  .timeline__card { border-left-width: 2px; }

  /* Projects */
  .projects__grid { grid-template-columns: 1fr; }
  .project-card--featured { grid-column: span 1; flex-direction: column; }
  .project-card--featured .project-card__content { padding-right: 0; }
  .card-cosmos { display: none; }

  /* Skills */
  .skills__grid { grid-template-columns: 1fr; gap: 16px; }

  /* Awards */
  .awards__grid { grid-template-columns: 1fr; }

  /* Contact rings smaller */
  .contact__rings { width: 320px; height: 320px; }
  .cr-ring--3 { width: 300px; height: 300px; }

  /* Contact actions */
  .contact__actions { flex-direction: column; width: 100%; }
  .contact__actions .btn { width: 100%; justify-content: center; }

  /* Footer */
  .footer__inner { flex-direction: column; gap: 10px; text-align: center; }
  .footer__mono { display: none; }
}

/* Small phones */
@media (max-width: 400px) {
  .hero__name { font-size: 1.9rem; letter-spacing: 0.04em; }
  .hud-grid { grid-template-columns: 1fr 1fr; }
  .about__sidebar { grid-template-columns: 1fr; }
  .about__photo-wrap { grid-row: auto; }
  .about__photo { aspect-ratio: 4/3; }
  .section__header { gap: 10px; }
  .terminal__body { padding: 14px 16px; }
  .terminal__output p { font-size: 0.74rem; }
  .t-key { min-width: 90px; font-size: 0.72rem; }
}
