/* ============================================
   NGUYỄN HOÀNG SANG · nghsang_official
   style.css · Dark Futuristic Portfolio
   ============================================ */

/* ── Variables ───────────────────────────── */
:root {
  --bg:        #03080f;
  --bg-2:      #060d18;
  --bg-card:   rgba(6, 20, 38, 0.55);
  --border:    rgba(0, 200, 255, 0.12);
  --border-h:  rgba(0, 200, 255, 0.40);
  --cyan:      #00c8ff;
  --cyan-dim:  rgba(0, 200, 255, 0.15);
  --cyan-glow: rgba(0, 200, 255, 0.35);
  --gold:      #f0c060;
  --text:      #e0ecf8;
  --text-dim:  rgba(200, 220, 240, 0.55);
  --font-h:    'Orbitron', sans-serif;
  --font-b:    'Syne', sans-serif;
  --font-m:    'JetBrains Mono', monospace;
  --nav-h:     72px;
  --radius:    16px;
  --radius-sm: 10px;
  --ease:      cubic-bezier(0.23, 1, 0.32, 1);
  --ease-b:    cubic-bezier(0.76, 0, 0.24, 1);
}

/* ── Reset ───────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-b);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
  cursor: none;
}
body::after {
  content: "";
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.06) 50%);
  z-index: 9998;
  background-size: 100% 4px;
  pointer-events: none;
  opacity: 0.3;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
ul { list-style: none; }
button { border: none; background: none; font-family: inherit; cursor: none; }

.mono { font-family: var(--font-m); }
.small { font-size: 0.78rem; }
.accent { color: var(--cyan); }

/* ── WebGL Canvas ────────────────────────── */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ── Custom Cursor ───────────────────────── */
.cursor-dot, .cursor-ring {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
}
.cursor-dot {
  width: 6px; height: 6px;
  background: var(--cyan);
  top: 0; left: 0;
}
.cursor-ring {
  width: 32px; height: 32px;
  border: 1.5px solid var(--cyan);
  top: 0; left: 0;
  transition: width 0.25s var(--ease), height 0.25s var(--ease), border-color 0.25s;
}
.cursor-ring.hovered {
  width: 48px; height: 48px;
  border-color: var(--gold);
  background: rgba(240, 192, 96, 0.06);
}
@media (hover: none) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* ── Loader ──────────────────────────────── */
.loader {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 8000;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}
.loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-inner { display: flex; flex-direction: column; align-items: center; gap: 24px; }
.loader-ring {
  width: 56px; height: 56px;
  border: 2px solid var(--border);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
.loader-text { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.loader-text span { font-size: 0.7rem; letter-spacing: 0.15em; color: var(--text-dim); }
.loader-id { color: var(--cyan) !important; font-size: 0.9rem !important; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Navbar ──────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(16px, 5vw, 60px);
  z-index: 1000;
  transition: background 0.4s, backdrop-filter 0.4s, border-color 0.4s;
}
.nav.scrolled {
  background: rgba(3, 8, 15, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-m); font-size: 0.9rem;
  color: var(--cyan); letter-spacing: 0.08em;
}
.nav-logo-img {
  width: 44px; height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px var(--cyan-glow));
}
.nav-logo-text {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: linear-gradient(90deg, var(--cyan), #fff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}
.nav-logo svg { width: 32px; height: 32px; color: var(--cyan); }
.nav-links { display: flex; gap: 8px; }
.nav-link {
  font-family: var(--font-m);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 10px 22px;
  background: rgba(0, 200, 255, 0.03);
  border: 1px solid var(--border);
  position: relative;
  transition: all 0.4s var(--ease);
  clip-path: polygon(8px 0%, 100% 0%, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0% 100%, 0% 8px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-link:hover {
  color: var(--cyan);
  background: var(--cyan-dim);
  border-color: var(--cyan);
  transform: translateY(-2px);
  box-shadow: 0 0 20px var(--cyan-glow);
  text-shadow: 0 0 8px var(--cyan-glow);
}

.nav-link::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(transparent, var(--cyan-dim), transparent);
  transform: translateY(-100%);
  transition: transform 0.6s var(--ease);
}

.nav-link:hover::before {
  transform: translateY(100%);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; width: 100%; height: 2px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.4s var(--ease);
  box-shadow: 0 0 10px var(--cyan);
}

.nav-link:hover::after {
  transform: scaleX(1);
}

.btn-nav {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-m); font-size: 0.78rem;
  color: var(--cyan); border: 1px solid var(--border);
  padding: 9px 18px; border-radius: 100px;
  transition: background 0.25s, border-color 0.25s, transform 0.2s;
  letter-spacing: 0.03em;
}
.btn-nav svg { width: 14px; height: 14px; }
.btn-nav:hover {
  background: var(--cyan-dim); border-color: var(--cyan);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  width: 32px; height: 32px; justify-content: center;
}
.nav-toggle span {
  display: block; height: 1.5px; background: var(--text);
  transition: transform 0.3s, opacity 0.3s;
  transform-origin: center;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile Menu */
.mobile-menu {
  position: fixed; inset: 0; top: var(--nav-h);
  background: rgba(3, 8, 15, 0.97);
  backdrop-filter: blur(24px);
  z-index: 900;
  display: flex; align-items: center; justify-content: center;
  transform: translateX(100%);
  transition: transform 0.4s var(--ease);
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu ul { display: flex; flex-direction: column; gap: 28px; text-align: center; }
.mob-link {
  font-family: var(--font-m);
  font-size: clamp(1.2rem, 4vw, 1.6rem);
  font-weight: 400; color: var(--text);
  padding: 16px 32px;
  background: rgba(255, 255, 255, 0.05);
  clip-path: polygon(8% 0, 100% 0, 92% 100%, 0 100%);
  transition: all 0.3s;
  display: block;
}
.mob-link:hover { background: var(--cyan); color: var(--bg); }
.mob-link.highlight { background: var(--cyan); color: var(--bg); font-weight: 600; }

/* ── Buttons ─────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--cyan); color: #000;
  font-weight: 700; font-size: 0.88rem; letter-spacing: 0.04em;
  padding: 14px 28px; border-radius: 100px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s, background 0.25s;
  position: relative; overflow: hidden;
}
.btn-primary svg { width: 16px; height: 16px; }
.btn-primary::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 200, 255, 0.45);
}
.btn-primary:hover::before { transform: translateX(100%); }
.btn-primary.sm { padding: 11px 22px; font-size: 0.82rem; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid var(--border); color: var(--text);
  font-size: 0.88rem; letter-spacing: 0.04em;
  padding: 14px 28px; border-radius: 100px;
  transition: border-color 0.25s, background 0.25s, transform 0.25s;
}
.btn-ghost svg { width: 16px; height: 16px; }
.btn-ghost:hover {
  border-color: var(--border-h);
  background: rgba(255,255,255,0.04);
  transform: translateY(-2px);
}

/* ── Hero ────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center;
  padding: var(--nav-h) clamp(16px, 8vw, 100px) 80px;
  gap: clamp(32px, 6vw, 80px);
  z-index: 1;
  overflow: hidden;
}
.hero-grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,200,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,200,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}
.hero-content { flex: 1; min-width: 0; z-index: 2; }
.hero-hud {
  display: flex; align-items: center; gap: 16px; margin-bottom: 28px;
  color: var(--cyan);
}
.hud-line { width: 40px; height: 1px; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.hud-text { font-size: 0.65rem; letter-spacing: 0.25em; font-weight: 600; }
.hud-coords { font-size: 0.62rem; opacity: 0.4; margin-left: auto; letter-spacing: 0.1em; }


.hero-name {
  font-family: var(--font-h);
  font-size: clamp(2.6rem, 7vw, 6rem);
  font-weight: 900; line-height: 1.05;
  letter-spacing: -0.02em;
  display: flex; flex-direction: column;
}
.name-vn { color: var(--text); }
.name-highlight {
  color: transparent;
  -webkit-text-stroke: 2px var(--cyan);
  filter: drop-shadow(0 0 20px rgba(0,200,255,0.5));
}
.hero-id {
  font-size: 0.85rem; color: var(--text-dim); margin: 12px 0 20px;
  letter-spacing: 0.08em;
}
.hero-desc {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: var(--text-dim); max-width: 480px;
  line-height: 1.8; margin-bottom: 36px;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; }

/* Hero Avatar */
.hero-avatar-wrap {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
}
.avatar-3d-container {
  position: relative;
  width: clamp(240px, 30vw, 360px);
  height: clamp(240px, 30vw, 360px);
  display: flex; align-items: center; justify-content: center;
}
.avatar-ring {
  position: absolute; border-radius: 50%;
  border: 1px solid transparent;
  animation: ring-spin linear infinite;
}
.ring-1 {
  inset: -16px;
  border-top-color: var(--cyan);
  border-right-color: rgba(0,200,255,0.2);
  animation-duration: 8s;
}
.ring-2 {
  inset: -36px;
  border-bottom-color: var(--gold);
  border-left-color: rgba(240,192,96,0.15);
  animation-duration: 14s; animation-direction: reverse;
}
.ring-3 {
  inset: -60px;
  border-top-color: rgba(0,200,255,0.12);
  border-bottom-color: rgba(0,200,255,0.06);
  animation-duration: 22s;
}
@keyframes ring-spin { to { transform: rotate(360deg); } }

.avatar-glow {
  position: absolute; inset: -20px;
  background: radial-gradient(ellipse, rgba(0,200,255,0.2) 0%, transparent 70%);
  border-radius: 50%; filter: blur(12px);
  animation: glow-pulse 3s ease-in-out infinite;
}
@keyframes glow-pulse { 0%,100%{opacity:0.6;transform:scale(0.95)} 50%{opacity:1;transform:scale(1.05)} }

.avatar-frame {
  width: clamp(200px, 25vw, 300px);
  height: clamp(200px, 25vw, 300px);
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(0,200,255,0.35);
  position: relative; z-index: 2;
  background: var(--bg-2);
  box-shadow: 0 0 40px rgba(0,200,255,0.2), inset 0 0 40px rgba(0,0,0,0.4);
}
.avatar-img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  filter: saturate(1.1) contrast(1.05);
}

.avatar-orbit {
  position: absolute; inset: -50px;
  border-radius: 50%;
  animation: orbit linear 10s infinite;
}
.avatar-orbit.orbit-2 {
  inset: -80px;
  animation-duration: 16s; animation-direction: reverse;
}
.orbit-dot {
  position: absolute; top: 0; left: 50%;
  transform: translate(-50%, -50%);
  width: 28px; height: 28px;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: var(--cyan);
  box-shadow: 0 0 12px var(--cyan-glow);
}
.orbit-dot svg { width: 14px; height: 14px; }
@keyframes orbit { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }

/* Scroll hint */
.scroll-hint {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--text-dim); font-size: 0.65rem; letter-spacing: 0.12em;
  animation: float 2.5s ease-in-out infinite;
  z-index: 2;
}
.scroll-hint svg { width: 18px; height: 18px; }
@keyframes float { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(6px)} }



/* ── Section Base ────────────────────────── */
.section { position: relative; z-index: 1; padding: clamp(64px, 10vw, 120px) 0; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 clamp(16px, 5vw, 60px); }
.section-label {
  font-size: 0.72rem; color: var(--cyan); letter-spacing: 0.18em;
  text-transform: uppercase; margin-bottom: 20px;
}
.section-title {
  font-family: var(--font-h);
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  font-weight: 700; line-height: 1.15;
  letter-spacing: -0.01em; margin-bottom: 40px;
}
.section-title.centered { text-align: center; }
.centered { text-align: center; }

/* ── Section Corners ────────────────────── */
.section-corner {
  position: absolute; width: 40px; height: 40px;
  border-color: var(--cyan); border-style: solid;
  opacity: 0.15; pointer-events: none;
  z-index: 0;
}
.section-corner.tl { top: 40px; left: 40px; border-width: 1px 0 0 1px; }
.section-corner.tr { top: 40px; right: 40px; border-width: 1px 1px 0 0; }
.section-corner.bl { bottom: 40px; left: 40px; border-width: 0 0 1px 1px; }
.section-corner.br { bottom: 40px; right: 40px; border-width: 0 1px 1px 0; }

/* ── Glassmorphism Card ──────────────────── */
.glass {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s var(--ease);
}
.glass:hover {
  border-color: var(--border-h);
  box-shadow: 0 8px 40px rgba(0,200,255,0.08), 0 0 0 1px rgba(0,200,255,0.08);
}

/* ── About ───────────────────────────────── */
.about { background: radial-gradient(ellipse at 80% 50%, rgba(0,200,255,0.04) 0%, transparent 60%); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.about-photo-wrap {
  position: relative;
  display: inline-block; width: 100%;
  max-width: 320px;
  margin: 0 auto;
}
.about-photo-wrap img {
  width: 100%; aspect-ratio: 3/4; object-fit: cover;
  border-radius: var(--radius); filter: saturate(1.1) contrast(1.05);
  border: 1px solid var(--border);
}
.photo-corner {
  position: absolute; width: 20px; height: 20px;
  border-color: var(--cyan); border-style: solid;
}
.photo-corner.tl { top: -6px; left: -6px; border-width: 2px 0 0 2px; }
.photo-corner.tr { top: -6px; right: -6px; border-width: 2px 2px 0 0; }
.photo-corner.bl { bottom: -6px; left: -6px; border-width: 0 0 2px 2px; }
.photo-corner.br { bottom: -6px; right: -6px; border-width: 0 2px 2px 0; }
.photo-badge {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: rgba(3, 8, 15, 0.7); backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 200, 255, 0.4);
  padding: 8px 24px;
  border-radius: 100px;
  font-size: 0.75rem; font-weight: 600; color: var(--cyan);
  text-transform: uppercase; letter-spacing: 0.15em;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  z-index: 5;
  white-space: nowrap;
  animation: badgeFloat 4s ease-in-out infinite;
}
@keyframes badgeFloat {
  0%, 100% { transform: translateX(-50%) translateY(0); box-shadow: 0 4px 15px rgba(0, 200, 255, 0.2); }
  50% { transform: translateX(-50%) translateY(-8px); box-shadow: 0 8px 25px rgba(0, 200, 255, 0.4); }
}
.about-desc { color: var(--text-dim); line-height: 1.8; margin-bottom: 20px; font-size: 1rem; }
.about-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.tag {
  font-size: 0.72rem; color: var(--cyan); letter-spacing: 0.1em;
  border: 1px solid var(--border); padding: 6px 14px;
  border-radius: 100px; background: var(--cyan-dim);
}

/* ── Skills ──────────────────────────────── */
.skills { background: radial-gradient(ellipse at 20% 60%, rgba(240,192,96,0.04) 0%, transparent 60%); }
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 16px;
}
.skill-card {
  padding: 28px;
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}
.skill-card:hover { transform: translateY(-4px); }
.skill-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--cyan); margin-bottom: 16px;
  background: var(--cyan-dim);
  transition: box-shadow 0.3s;
}
.skill-card:hover .skill-icon { box-shadow: 0 0 16px var(--cyan-glow); }
.skill-icon svg { width: 22px; height: 22px; }
.skill-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 6px; font-family: var(--font-h); letter-spacing: 0.02em; }
.skill-card .mono { color: var(--text-dim); }
.skill-bar {
  margin-top: 16px; height: 3px;
  background: rgba(255,255,255,0.06); border-radius: 100px;
  overflow: visible;
}
.skill-fill {
  height: 100%; background: linear-gradient(90deg, var(--cyan), rgba(0,200,255,0.5));
  border-radius: 100px; width: 0;
  box-shadow: 0 0 8px var(--cyan-glow);
  transition: width 1.2s var(--ease);
}
.skill-fill.animated { width: var(--fill); }
.skill-card::after {
  content: 'TECH_UNIT_0' + attr(data-index);
  position: absolute; top: 12px; right: 16px;
  font-family: var(--font-m); font-size: 0.55rem;
  color: var(--text-dim); opacity: 0.2;
}

/* ── Works ───────────────────────────────── */
.works { background: radial-gradient(ellipse at 70% 50%, rgba(0,200,255,0.04) 0%, transparent 60%); }
.works-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 20px;
  margin-top: 16px;
}
.work-card.featured { grid-column: 1 / -1; }

.work-card { padding: 28px; transition: transform 0.3s var(--ease); }
.work-card:hover { transform: translateY(-4px); }

.work-card-inner { display: flex; gap: 32px; align-items: center; }
.work-preview { flex: 1; min-width: 0; }
.work-preview-frame {
  border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden; background: #010610;
}
.browser-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.3);
}
.browser-dots { display: flex; gap: 6px; }
.browser-dots span {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,0.12);
}
.browser-dots span:first-child { background: #ff5f57; }
.browser-dots span:nth-child(2) { background: #febc2e; }
.browser-dots span:last-child { background: #28c840; }
.browser-url { font-size: 0.68rem; color: var(--text-dim); }
.work-preview-body { padding: 18px; display: flex; flex-direction: column; gap: 10px; position: relative; }
.preview-skeleton {
  height: 10px; border-radius: 4px;
  background: linear-gradient(90deg, rgba(0,200,255,0.06), rgba(0,200,255,0.12), rgba(0,200,255,0.06));
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}
.s1 { width: 80%; }
.s2 { width: 60%; }
.s3 { width: 90%; }
.preview-pulse {
  position: absolute; top: 18px; right: 18px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #00ff88;
  box-shadow: 0 0 0 0 rgba(0,255,136,0.4);
  animation: pulse-ring 2s infinite;
}
@keyframes shimmer { 0%{background-position:200%} 100%{background-position:-200%} }
@keyframes pulse-ring { 0%{box-shadow:0 0 0 0 rgba(0,255,136,0.4)} 70%{box-shadow:0 0 0 8px transparent} 100%{box-shadow:0 0 0 0 transparent} }

.work-info { flex: 1.2; min-width: 0; }
.work-tag { font-size: 0.68rem; color: var(--cyan); letter-spacing: 0.12em; margin-bottom: 10px; }
.work-card h3 { font-size: clamp(1rem, 2vw, 1.3rem); font-family: var(--font-h); margin-bottom: 10px; letter-spacing: 0.02em; }
.work-card p { font-size: 0.9rem; color: var(--text-dim); line-height: 1.7; margin-bottom: 16px; }
.work-tech { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.work-tech span {
  font-size: 0.7rem; color: var(--text-dim);
  border: 1px solid var(--border); padding: 4px 12px; border-radius: 100px;
}
.work-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.85rem; font-weight: 600;
  color: var(--cyan); letter-spacing: 0.04em;
  transition: gap 0.2s;
}
.work-link:hover { gap: 14px; }
.work-link svg { width: 16px; height: 16px; }

.work-icon-wrap {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--cyan); margin-bottom: 16px;
  background: var(--cyan-dim);
}
.work-icon-wrap svg { width: 24px; height: 24px; }

.works-cta {
  text-align: center; margin-top: 48px;
  display: flex; flex-direction: column; align-items: center; gap: 20px;
}
.works-cta p { font-size: 0.8rem; color: var(--text-dim); letter-spacing: 0.06em; }

/* ── Contact ─────────────────────────────── */
.contact {
  background: radial-gradient(ellipse at 30% 50%, rgba(240,192,96,0.04) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 50%, rgba(0,200,255,0.04) 0%, transparent 50%);
}
.contact-sub { color: var(--text-dim); margin-bottom: 48px; font-size: 1rem; }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.contact-card {
  display: flex; align-items: center; gap: 16px;
  padding: 22px 24px;
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}
.contact-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-h);
  box-shadow: 0 8px 32px rgba(0,200,255,0.08);
}
.cc-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--cyan); background: var(--cyan-dim);
  transition: box-shadow 0.3s;
}
.contact-card:hover .cc-icon { box-shadow: 0 0 16px var(--cyan-glow); }
.cc-icon svg { width: 20px; height: 20px; }
.cc-info { flex: 1; min-width: 0; }
.cc-label { display: block; font-size: 0.68rem; color: var(--text-dim); letter-spacing: 0.1em; margin-bottom: 3px; }
.cc-val { font-size: 0.88rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-arrow { width: 16px; height: 16px; color: var(--text-dim); flex-shrink: 0; transition: transform 0.2s, color 0.2s; }
.contact-card:hover .cc-arrow { transform: translateX(4px); color: var(--cyan); }

/* ── Footer ──────────────────────────────── */
.footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--border);
  padding: 32px clamp(16px, 5vw, 60px);
  background: rgba(3, 8, 15, 0.8);
}
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.footer-logo {
  display: flex; align-items: center; gap: 10px;
  color: var(--text-dim); font-size: 0.85rem;
}
.footer-logo svg { width: 28px; height: 28px; color: var(--cyan); }
.footer-copy { font-size: 0.72rem; color: var(--text-dim); letter-spacing: 0.06em; }
.footer-link { font-size: 0.78rem; color: var(--cyan); transition: opacity 0.2s; }
.footer-link:hover { opacity: 0.7; }

/* ── Reveal Animations ───────────────────── */
.reveal-up, [data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal-up.visible, [data-reveal].visible {
  opacity: 1; transform: translateY(0);
}
.reveal-right {
  opacity: 0; transform: translateX(40px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }

/* Stagger delays */
.reveal-up:nth-child(2), [data-reveal]:nth-child(2) { transition-delay: 0.1s; }
.reveal-up:nth-child(3), [data-reveal]:nth-child(3) { transition-delay: 0.2s; }
.reveal-up:nth-child(4), [data-reveal]:nth-child(4) { transition-delay: 0.3s; }
.reveal-up:nth-child(5), [data-reveal]:nth-child(5) { transition-delay: 0.4s; }

/* ── Responsive ──────────────────────────── */
@media (max-width: 960px) {
  .hero {
    flex-direction: column-reverse;
    text-align: center;
    padding-top: calc(var(--nav-h) + 40px);
  }
  .hero-content { order: 2; }
  .hero-avatar-wrap { order: 1; }
  .hero-desc { margin-left: auto; margin-right: auto; }
  .hero-ctas { justify-content: center; }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo-col { display: flex; justify-content: center; }
  .work-card-inner { flex-direction: column; }
  .works-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-links, .btn-nav { display: none; }
  .nav-toggle { display: flex; }
  .stats-inner { flex-wrap: wrap; }
  .stat-divider { display: none; }
  .stat-item { min-width: 50%; border-bottom: 1px solid var(--border); }
}

@media (max-width: 480px) {
  .avatar-3d-container {
    width: 220px; height: 220px;
  }
  .avatar-frame { width: 180px; height: 180px; }
  .section-title { font-size: 1.6rem; }
  .hero-name { font-size: 2.4rem; }
}

/* ── Scrollbar ───────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(0,200,255,0.3); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,200,255,0.6); }

/* ── Selection ───────────────────────────── */
::selection { background: rgba(0,200,255,0.25); color: var(--text); }

/* ── System Logs ────────────────────────── */
.system-logs {
  position: fixed; bottom: 30px; right: 30px;
  background: rgba(0, 12, 25, 0.7); backdrop-filter: blur(8px);
  border-right: 2px solid var(--cyan);
  padding: 10px 14px; font-size: 0.58rem; color: var(--cyan);
  pointer-events: none; z-index: 1000;
  max-width: 180px; display: flex; flex-direction: column; gap: 5px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  text-align: right;
}
.log-line { opacity: 0.8; white-space: nowrap; overflow: hidden; }
.log-line:last-child { animation: typing 1s steps(20) infinite alternate; }
@keyframes typing { from{width: 0} to{width: 100%} }

@media (max-width: 768px) {
  .system-logs { display: none; }
}
