/* ============================
   RESET & VARIABLES
   ============================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg:       #060608;
  --bg2:      #0c0c10;
  --bg3:      #12121a;
  --panel:    #16161f;
  --gold:     #c9a84c;
  --gold-l:   #e8c97a;
  --gold-d:   rgba(201,168,76,0.12);
  --gold-b:   rgba(201,168,76,0.25);
  --white:    #eeeae0;
  --muted:    rgba(238,234,224,0.45);
  --faint:    rgba(238,234,224,0.07);
  --border:   rgba(201,168,76,0.18);
  --green:    #3ddc84;
  --red:      #ff5f57;
  --yellow:   #febc2e;
  --font-display: 'Bebas Neue', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-body);
  overflow-x: hidden;
  line-height: 1.6;
}

/* ============================
   CANVAS BACKGROUND
   ============================ */
#bg-canvas {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
}

/* ============================
   LOADER
   ============================ */
#loader {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#loader.hidden { opacity: 0; visibility: hidden; }

.loader-inner {
  display: flex; flex-direction: column; align-items: center; gap: 20px;
  width: 260px;
}
.loader-bar {
  width: 100%; height: 2px;
  background: var(--faint);
  overflow: hidden;
}
.loader-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-l));
  width: 0%;
  transition: width 0.05s linear;
  box-shadow: 0 0 12px var(--gold);
}
.loader-text {
  font-family: var(--font-mono);
  font-size: 0.7rem; letter-spacing: 0.2em;
  color: var(--muted); text-transform: uppercase;
}
.loader-dots::after {
  content: '';
  animation: dots 1.2s steps(4, end) infinite;
}
@keyframes dots {
  0%   { content: ''; }
  25%  { content: '.'; }
  50%  { content: '..'; }
  75%  { content: '...'; }
}

/* ============================
   NAV
   ============================ */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 60px;
  transition: background 0.3s, padding 0.3s, backdrop-filter 0.3s;
}
#nav.scrolled {
  background: rgba(6,6,8,0.92);
  backdrop-filter: blur(16px);
  padding: 14px 60px;
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.1rem; font-weight: 500;
  color: var(--gold); letter-spacing: 0.05em;
}
.logo-bracket { opacity: 0.5; }

.nav-links { display: flex; gap: 40px; }
.nav-link {
  color: var(--muted); text-decoration: none;
  font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.15em; text-transform: uppercase;
  position: relative; transition: color 0.3s;
}
.nav-link::after {
  content: ''; position: absolute; bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 0.3s cubic-bezier(.25,.46,.45,.94);
}
.nav-link:hover { color: var(--gold); }
.nav-link:hover::after { width: 100%; }
.nav-link.active { color: var(--gold); }
.nav-link.active::after { width: 100%; }

.nav-status {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.65rem; letter-spacing: 0.12em;
  color: var(--muted); text-transform: uppercase;
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse-green 2s ease-in-out infinite;
}
@keyframes pulse-green {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--green); }
  50%       { opacity: 0.6; box-shadow: 0 0 16px var(--green); }
}

/* ============================
   HERO
   ============================ */
#hero {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: grid; grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 120px 60px 80px;
  gap: 60px;
  overflow: hidden;
}

.hero-tag {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 0.7rem;
  color: var(--gold); letter-spacing: 0.15em; text-transform: uppercase;
  margin-bottom: 28px;
  opacity: 0; transform: translateY(20px);
  animation: fadeUp 0.6s 1.6s ease forwards;
}
.tag-dash { opacity: 0.5; }

.hero-name {
  display: flex; flex-direction: column;
  margin-bottom: 20px;
  opacity: 0; transform: translateY(30px);
  animation: fadeUp 0.7s 1.8s ease forwards;
}
.name-line {
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 9vw, 9rem);
  line-height: 0.92; letter-spacing: 0.03em;
  color: var(--white);
  display: block;
  position: relative;
}
.name-line.accent { color: var(--gold); }

.hero-sub {
  font-family: var(--font-mono); font-size: 0.85rem;
  color: var(--muted); letter-spacing: 0.2em;
  margin-bottom: 48px;
  opacity: 0; transform: translateY(20px);
  animation: fadeUp 0.6s 2s ease forwards;
}

.hero-cta {
  display: flex; gap: 16px; align-items: center;
  opacity: 0; transform: translateY(20px);
  animation: fadeUp 0.6s 2.1s ease forwards;
}

.btn-main {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 32px;
  background: var(--gold);
  color: var(--bg); text-decoration: none;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  transition: transform 0.2s;
}
.btn-bg {
  position: absolute; inset: 0;
  background: var(--gold-l);
  transform: translateX(-101%);
  transition: transform 0.35s cubic-bezier(.25,.46,.45,.94);
}
.btn-main:hover .btn-bg { transform: translateX(0); }
.btn-main:hover { transform: translateY(-2px); }
.btn-text, .btn-icon { position: relative; z-index: 1; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px;
  border: 1px solid var(--border);
  color: var(--muted); text-decoration: none;
  font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  transition: all 0.3s;
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); background: var(--gold-d); }

/* HERO RIGHT */
.hero-right {
  display: flex; flex-direction: column; gap: 28px;
  opacity: 0; transform: translateX(40px);
  animation: fadeRight 0.8s 2s ease forwards;
}

.hero-stats {
  display: flex; gap: 16px;
}
.stat-card {
  flex: 1;
  background: var(--panel);
  border: 1px solid var(--border);
  border-top: 2px solid var(--gold);
  padding: 20px 16px;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}
.stat-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(201,168,76,0.12); }
.stat-num {
  font-family: var(--font-display);
  font-size: 3.2rem; line-height: 1;
  color: var(--gold);
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 0.6rem; color: var(--muted);
  letter-spacing: 0.15em; text-transform: uppercase;
  margin-top: 4px;
}

/* TERMINAL */
.hero-terminal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.terminal-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}
.t-dot {
  width: 10px; height: 10px; border-radius: 50%;
}
.t-dot.red    { background: var(--red); }
.t-dot.yellow { background: var(--yellow); }
.t-dot.green  { background: var(--green); }
.t-title {
  font-family: var(--font-mono); font-size: 0.65rem;
  color: var(--muted); margin-left: 8px; letter-spacing: 0.05em;
}
.terminal-body {
  padding: 16px;
  font-family: var(--font-mono); font-size: 0.72rem;
  line-height: 1.8; min-height: 120px;
  color: var(--green);
}
.terminal-body .prompt { color: var(--gold); }
.terminal-body .output { color: var(--muted); }
.terminal-body .cursor {
  display: inline-block; width: 8px; height: 1.1em;
  background: var(--gold); vertical-align: text-bottom;
  animation: blink-cursor 1s step-end infinite;
}
@keyframes blink-cursor { 50% { opacity: 0; } }

/* SCROLL HINT */
.hero-scroll-hint {
  position: absolute; bottom: 36px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  opacity: 0; animation: fadeUp 0.6s 2.5s ease forwards;
}
.hero-scroll-hint span {
  font-family: var(--font-mono); font-size: 0.6rem;
  color: var(--faint); letter-spacing: 0.25em; text-transform: uppercase;
}
.scroll-wheel {
  width: 22px; height: 36px;
  border: 1px solid var(--border); border-radius: 12px;
  display: flex; justify-content: center; padding-top: 6px;
}
.scroll-wheel-inner {
  width: 3px; height: 7px; border-radius: 2px;
  background: var(--gold);
  animation: scroll-anim 2s ease-in-out infinite;
}
@keyframes scroll-anim {
  0%   { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(14px); opacity: 0; }
}

/* ============================
   SECTION COMMONS
   ============================ */
.section {
  position: relative; z-index: 1;
  padding: 120px 60px;
}
.section:nth-child(even) { background: var(--bg2); }

.section-label {
  display: flex; align-items: center; gap: 20px;
  margin-bottom: 80px;
}
.label-num {
  font-family: var(--font-mono); font-size: 0.65rem;
  color: var(--gold); letter-spacing: 0.15em; opacity: 0.7;
}
.label-line {
  width: 48px; height: 1px;
  background: var(--gold); opacity: 0.4;
}
.label-text {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  letter-spacing: 0.05em; color: var(--white);
}

/* ============================
   ABOUT
   ============================ */
#about .about-grid {
  display: grid; grid-template-columns: 340px 1fr;
  gap: 80px; align-items: center;
}

.avatar-frame {
  position: relative; width: 280px; margin: 0 auto;
}
.avatar-inner {
  aspect-ratio: 1;
  background: var(--panel);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.avatar-initials {
  font-family: var(--font-display);
  font-size: 7rem; color: var(--gold); opacity: 0.2;
  line-height: 1; user-select: none;
}
.avatar-rings {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.ring {
  position: absolute; border-radius: 50%;
  border: 1px solid var(--border);
}
.r1 { width: 220px; height: 220px; animation: spin-cw 20s linear infinite; }
.r2 { width: 170px; height: 170px; animation: spin-ccw 14s linear infinite; }
.r3 { width: 110px; height: 110px; animation: spin-cw 9s linear infinite; }
@keyframes spin-cw  { to { transform: rotate(360deg); } }
@keyframes spin-ccw { to { transform: rotate(-360deg); } }

.avatar-badge {
  position: absolute; bottom: -16px; right: -16px;
  width: 90px; height: 90px;
  background: var(--gold); border-radius: 50%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 1px;
}
.badge-n {
  font-family: var(--font-display);
  font-size: 2rem; line-height: 1;
  color: var(--bg);
}
.badge-t {
  font-family: var(--font-mono);
  font-size: 0.52rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--bg); opacity: 0.7;
}

.about-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  line-height: 1.15; letter-spacing: 0.03em;
  margin-bottom: 24px;
}
.about-title em { font-style: normal; color: var(--gold); }
.about-text {
  font-size: 1rem; color: var(--muted); line-height: 1.8;
  margin-bottom: 32px;
}
.about-text strong { color: var(--white); font-weight: 500; }

.about-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.atag {
  padding: 6px 14px;
  border: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 0.62rem;
  color: var(--muted); letter-spacing: 0.12em; text-transform: uppercase;
  transition: all 0.3s;
}
.atag:hover { border-color: var(--gold); color: var(--gold); background: var(--gold-d); }

/* ============================
   SKILLS
   ============================ */
.skills-tabs {
  display: flex; gap: 0;
  margin-bottom: 48px;
  border-bottom: 1px solid var(--border);
}
.stab {
  background: none; border: none;
  padding: 14px 28px;
  font-family: var(--font-body); font-size: 0.8rem; font-weight: 500;
  color: var(--muted); letter-spacing: 0.08em;
  cursor: pointer;
  position: relative;
  transition: color 0.3s;
}
.stab::after {
  content: ''; position: absolute; bottom: -1px; left: 0; right: 0;
  height: 2px; background: var(--gold);
  transform: scaleX(0);
  transition: transform 0.3s cubic-bezier(.25,.46,.45,.94);
}
.stab.active { color: var(--gold); }
.stab.active::after { transform: scaleX(1); }
.stab:hover { color: var(--white); }

.skills-panels { position: relative; }
.skills-panel {
  display: none;
  animation: panelIn 0.4s ease;
}
.skills-panel.active { display: block; }

@keyframes panelIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.skills-row {
  display: flex; flex-wrap: wrap; gap: 16px;
}

.sk-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-bottom: 2px solid transparent;
  padding: 20px 20px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  min-width: 110px;
  cursor: default;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
  animation: cardIn 0.4s calc(var(--d,0ms)) ease both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.sk-card:hover {
  transform: translateY(-6px);
  border-bottom-color: var(--gold);
  box-shadow: 0 8px 32px rgba(201,168,76,0.1), 0 0 0 1px var(--border);
}
.sk-icon { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; }
.sk-icon svg { width: 32px; height: 32px; }
.sk-name {
  font-family: var(--font-mono); font-size: 0.62rem;
  color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase;
  text-align: center;
}
.sk-bar {
  width: 100%; height: 2px;
  background: var(--faint); border-radius: 1px;
  overflow: hidden;
}
.sk-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--gold), var(--gold-l));
  border-radius: 1px;
  transition: width 0.8s cubic-bezier(.25,.46,.45,.94);
  box-shadow: 0 0 6px var(--gold);
}
.sk-card.in-view .sk-fill { width: var(--p, 0%); }

/* ============================
   GITHUB PROJECTS
   ============================ */
.projects-meta {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.7rem;
  color: var(--muted); margin-bottom: 40px;
}
.meta-link {
  color: var(--gold); text-decoration: none;
  transition: color 0.3s;
}
.meta-link:hover { color: var(--gold-l); }

.github-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2px;
}

.gh-loading {
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: center; gap: 16px;
  padding: 80px;
  font-family: var(--font-mono); font-size: 0.72rem;
  color: var(--muted); letter-spacing: 0.1em;
}
.loading-spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--faint);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.gh-card {
  background: var(--panel);
  border-left: 2px solid var(--border);
  padding: 28px 28px 24px;
  display: flex; flex-direction: column; gap: 12px;
  text-decoration: none; color: inherit;
  position: relative; overflow: hidden;
  transition: border-left-color 0.3s, transform 0.3s, background 0.3s;
  animation: fadeUp 0.5s ease both;
  animation-delay: var(--delay, 0ms);
}
.gh-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(120deg, var(--gold-d), transparent 60%);
  opacity: 0; transition: opacity 0.3s;
}
.gh-card:hover { border-left-color: var(--gold); transform: translateX(6px); background: var(--bg3); }
.gh-card:hover::before { opacity: 1; }

.gh-top {
  display: flex; justify-content: space-between; align-items: flex-start;
}
.gh-name {
  font-family: var(--font-mono); font-size: 0.85rem;
  color: var(--gold); letter-spacing: 0.05em;
  transition: color 0.3s;
}
.gh-arrow {
  font-size: 1.1rem; color: var(--faint);
  transition: all 0.3s; flex-shrink: 0;
}
.gh-card:hover .gh-arrow { color: var(--gold); transform: translate(3px, -3px); }

.gh-desc {
  font-size: 0.78rem; color: var(--muted); line-height: 1.7;
  flex: 1;
}
.gh-foot {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.gh-lang {
  display: flex; align-items: center; gap: 5px;
  font-family: var(--font-mono); font-size: 0.62rem; color: var(--muted);
}
.gh-lang-dot { width: 8px; height: 8px; border-radius: 50%; }
.gh-stars {
  font-family: var(--font-mono); font-size: 0.62rem; color: var(--muted);
}
.gh-date {
  font-family: var(--font-mono); font-size: 0.6rem;
  color: var(--faint); margin-left: auto;
}

/* ============================
   TIMELINE
   ============================ */
.timeline {
  position: relative; padding-left: 0;
  max-width: 800px;
}
.timeline::before {
  content: ''; position: absolute; left: 100px; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--gold), transparent);
}

.tl-item {
  display: grid; grid-template-columns: 100px 1fr;
  gap: 40px; margin-bottom: 64px;
  position: relative;
  opacity: 0; transform: translateX(-30px);
  transition: opacity 0.6s calc(var(--d, 0ms)), transform 0.6s calc(var(--d, 0ms));
}
.tl-item.visible { opacity: 1; transform: translateX(0); }

.tl-year {
  font-family: var(--font-mono); font-size: 0.62rem;
  color: var(--gold); letter-spacing: 0.1em;
  text-align: right; padding-top: 8px;
  line-height: 1.4;
}

.tl-content { position: relative; }
.tl-dot {
  position: absolute; left: -48px; top: 10px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--gold);
  transition: background 0.3s, box-shadow 0.3s;
}
.tl-item:hover .tl-dot {
  background: var(--gold);
  box-shadow: 0 0 12px var(--gold);
}

.tl-role {
  font-family: var(--font-display);
  font-size: 1.8rem; letter-spacing: 0.03em;
  margin-bottom: 4px;
}
.tl-company {
  font-family: var(--font-mono); font-size: 0.68rem;
  color: var(--gold); letter-spacing: 0.15em; text-transform: uppercase;
  margin-bottom: 14px;
}
.tl-desc {
  font-size: 0.88rem; color: var(--muted); line-height: 1.8;
  margin-bottom: 16px;
}
.tl-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tl-tags span {
  padding: 4px 10px;
  border: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 0.58rem;
  color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase;
  transition: all 0.3s;
}
.tl-tags span:hover { border-color: var(--gold); color: var(--gold); }

/* ============================
   CONTACT
   ============================ */
.contact-wrap {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 80px; align-items: start;
}
.contact-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.05; letter-spacing: 0.03em;
  margin-bottom: 20px;
}
.contact-title em { font-style: normal; color: var(--gold); }
.contact-sub {
  font-size: 0.9rem; color: var(--muted); line-height: 1.8;
}

.contact-card {
  display: flex; align-items: center; gap: 16px;
  padding: 20px 24px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 2px solid var(--border);
  text-decoration: none; color: inherit;
  transition: all 0.3s; margin-bottom: 2px;
  position: relative; overflow: hidden;
}
.contact-card::after {
  content: ''; position: absolute; inset: 0;
  background: var(--gold-d);
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(.25,.46,.45,.94);
}
.contact-card:hover { border-left-color: var(--gold); transform: translateX(6px); }
.contact-card:hover::after { transform: translateX(0); }

.cc-icon {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--faint);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); flex-shrink: 0;
  position: relative; z-index: 1;
  transition: background 0.3s;
}
.contact-card:hover .cc-icon { background: var(--gold-d); }
.cc-info { flex: 1; position: relative; z-index: 1; }
.cc-label {
  font-family: var(--font-mono); font-size: 0.6rem;
  color: var(--muted); letter-spacing: 0.15em; text-transform: uppercase;
  margin-bottom: 2px;
}
.cc-val { font-size: 0.85rem; color: var(--white); font-weight: 500; }
.cc-arrow {
  color: var(--muted); font-size: 1.1rem;
  transition: all 0.3s; position: relative; z-index: 1;
}
.contact-card:hover .cc-arrow { color: var(--gold); transform: translate(3px,-3px); }

.contact-card-email .cc-icon { color: var(--gold); }

/* ============================
   FOOTER
   ============================ */
footer {
  position: relative; z-index: 1;
  display: flex; justify-content: space-between; align-items: center;
  padding: 28px 60px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.footer-logo {
  font-family: var(--font-mono); font-size: 0.9rem;
  color: var(--gold);
}
.footer-copy {
  font-family: var(--font-mono); font-size: 0.62rem;
  color: var(--faint); letter-spacing: 0.15em; text-transform: uppercase;
}
.footer-built {
  font-family: var(--font-mono); font-size: 0.62rem;
  color: var(--faint); letter-spacing: 0.15em; text-transform: uppercase;
}

/* ============================
   REVEAL ANIMATIONS
   ============================ */
.reveal-left {
  opacity: 0; transform: translateX(-40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-right {
  opacity: 0; transform: translateX(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-up {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-left.visible,
.reveal-right.visible,
.reveal-up.visible {
  opacity: 1; transform: translate(0, 0);
}

/* ============================
   KEYFRAMES
   ============================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ============================
   SCROLLBAR
   ============================ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

.mobile-menu {
    display: none;
}
/* ============================
   RESPONSIVE — TABLET & MOBILE
   ============================ */

/* ---- TABLET (≤ 1024px) ---- */
@media (max-width: 1024px) {

  #nav {
    padding: 16px 32px;
  }
  #nav.scrolled {
    padding: 12px 32px;
  }

  .nav-links {
    gap: 24px;
  }

  #hero {
    grid-template-columns: 1fr;
    padding: 120px 32px 80px;
    gap: 48px;
  }

  .hero-right {
    animation: fadeUp 0.8s 2s ease forwards;
    opacity: 0;
    transform: translateY(30px);
  }

  .name-line {
    font-size: clamp(3.5rem, 10vw, 7rem);
  }

  .section {
    padding: 80px 32px;
  }

  #about .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }

  .about-tags {
    justify-content: center;
  }

  .avatar-frame {
    width: 220px;
  }

  .contact-wrap {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  footer {
    padding: 24px 32px;
  }
}

/* ---- MOBILE (≤ 768px) ---- */
@media (max-width: 768px) {

  /* NAV */
  #nav {
    padding: 14px 20px;
    flex-wrap: wrap;
    gap: 10px;
  }
  #nav.scrolled {
    padding: 10px 20px;
  }

  .nav-links {
    order: 3;
    width: 100%;
    gap: 0;
    justify-content: space-between;
    border-top: 1px solid var(--border);
    padding-top: 10px;
    flex-wrap: wrap;
    gap: 4px 0;
  }

  .nav-link {
    font-size: 0.62rem;
    padding: 6px 4px;
  }

  .nav-status {
    font-size: 0.6rem;
  }

  /* HERO */
  #hero {
    padding: 110px 20px 60px;
    min-height: auto;
    gap: 36px;
  }

  .hero-tag {
    font-size: 0.62rem;
    margin-bottom: 16px;
  }

  .name-line {
    font-size: clamp(3rem, 14vw, 5rem);
  }

  .hero-sub {
    font-size: 0.72rem;
    margin-bottom: 32px;
  }

  .hero-cta {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .btn-main,
  .btn-ghost {
    width: 100%;
    justify-content: center;
    padding: 14px 24px;
  }

  .hero-stats {
    gap: 10px;
  }

  .stat-num {
    font-size: 2.4rem;
  }

  .stat-label {
    font-size: 0.55rem;
  }

  .hero-scroll-hint {
    display: none;
  }

  /* SECTIONS */
  .section {
    padding: 64px 20px;
  }

  .section-label {
    margin-bottom: 48px;
    flex-wrap: wrap;
    gap: 12px;
  }

  .label-text {
    font-size: clamp(1.5rem, 6vw, 2.2rem);
  }

  /* ABOUT */
  #about .about-grid {
    grid-template-columns: 1fr;
    gap: 36px;
    text-align: center;
  }

  .avatar-frame {
    width: 180px;
  }

  .avatar-initials {
    font-size: 5rem;
  }

  .r1 { width: 170px; height: 170px; }
  .r2 { width: 130px; height: 130px; }
  .r3 { width: 90px; height: 90px; }

  .avatar-badge {
    width: 72px; height: 72px;
    bottom: -12px; right: -12px;
  }

  .badge-n { font-size: 1.5rem; }
  .badge-t { font-size: 0.45rem; }

  .about-title {
    font-size: clamp(1.6rem, 6vw, 2.4rem);
  }

  .about-text {
    font-size: 0.9rem;
  }

  .about-tags {
    justify-content: center;
  }

  /* SKILLS */
  .skills-tabs {
    flex-wrap: wrap;
    gap: 0;
    border-bottom: none;
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 32px;
  }

  .stab {
    flex: 1 1 50%;
    padding: 11px 12px;
    font-size: 0.72rem;
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
    text-align: center;
  }

  .stab::after {
    display: none;
  }

  .stab.active {
    background: var(--gold-d);
  }

  .skills-row {
    gap: 10px;
  }

  .sk-card {
    min-width: calc(50% - 5px);
    flex: 1 1 calc(50% - 5px);
    padding: 14px 12px 12px;
  }

  .sk-icon { width: 28px; height: 28px; }
  .sk-icon svg { width: 26px; height: 26px; }

  /* PROJECTS */
  .projects-meta {
    flex-wrap: wrap;
    font-size: 0.65rem;
  }

  .github-grid {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .gh-card {
    padding: 20px 18px;
  }

  /* TIMELINE */
  .timeline::before {
    left: 0;
  }

  .timeline {
    padding-left: 20px;
  }

  .tl-item {
    grid-template-columns: 1fr;
    gap: 6px;
    padding-left: 24px;
    margin-bottom: 48px;
  }

  .tl-dot {
    left: -30px;
    top: 6px;
  }

  .tl-year {
    text-align: left;
    font-size: 0.6rem;
    padding-top: 0;
  }

  .tl-role {
    font-size: 1.4rem;
  }

  .tl-desc {
    font-size: 0.82rem;
  }

  /* CONTACT */
  .contact-wrap {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .contact-title {
    font-size: clamp(2rem, 8vw, 3.2rem);
  }

  .contact-sub {
    font-size: 0.85rem;
  }

  .contact-card {
    padding: 16px 18px;
  }

  .cc-val {
    font-size: 0.78rem;
    word-break: break-all;
  }

  /* FOOTER */
  footer {
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    text-align: center;
  }

  /* TERMINAL */
  .terminal-body {
    font-size: 0.65rem;
    padding: 12px;
    min-height: 90px;
  }
}

/* ---- SMALL MOBILE (≤ 380px) ---- */
@media (max-width: 380px) {

  .name-line {
    font-size: clamp(2.6rem, 16vw, 4rem);
  }

  .sk-card {
    min-width: 100%;
    flex: 1 1 100%;
  }

  .hero-stats {
    flex-direction: column;
    gap: 8px;
  }

  .stat-card {
    padding: 12px;
  }

  .nav-links {
    justify-content: center;
    gap: 4px 8px;
  }
}
