:root {
  --bg: #07070c;
  --bg-2: #0d0d16;
  --card: rgba(255, 255, 255, 0.03);
  --border: rgba(255, 255, 255, 0.08);
  --text: #e9e9f4;
  --muted: #8a8aa8;
  --cyan: #00e5ff;
  --purple: #a855f7;
  --radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* --- HIDE SCROLLBAR --- */
html {
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
html::-webkit-scrollbar { display: none; }
body::-webkit-scrollbar { display: none; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  scrollbar-width: none;
}

.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }

/* ---------- background layers ---------- */
#bg { position: fixed; inset: 0; z-index: -2; display: block; }

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 600px at 15% -10%, rgba(0, 229, 255, 0.10), transparent 60%),
    radial-gradient(800px 600px at 90% 10%, rgba(168, 85, 247, 0.10), transparent 60%),
    radial-gradient(700px 500px at 50% 110%, rgba(0, 229, 255, 0.06), transparent 60%);
}

/* ---------- scroll progress ---------- */
#progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  z-index: 100;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.7);
  transition: width 0.1s linear;
}

/* ---------- nav ---------- */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px clamp(20px, 5vw, 64px);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(7, 7, 12, 0.55);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
nav.scrolled { border-bottom-color: var(--border); }

.logo {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.logo span { color: var(--cyan); }

.links { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  padding: 8px 12px;
  border-radius: 999px;
  transition: color 0.25s, background 0.25s;
}
.links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.links a.active { color: var(--cyan); }

@media (max-width: 520px) {
  nav { flex-direction: column; gap: 10px; padding: 12px 16px; }
  .links a { padding: 6px 8px; font-size: 0.8rem; }
}

/* ---------- layout ---------- */
section, header.hero {
  padding: clamp(70px, 10vw, 120px) clamp(20px, 6vw, 64px);
  max-width: 1100px;
  margin: 0 auto;
}

.eyebrow {
  color: var(--cyan);
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 14px;
  opacity: 0.9;
}

h2 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.section-sub {
  color: var(--muted);
  max-width: 620px;
  margin-bottom: 42px;
}

/* ---------- hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 140px;
  padding-bottom: 90px;
}

.hero h1 {
  font-size: clamp(2.5rem, 12vw, 6rem);
  line-height: 1.1;
  letter-spacing: -2px;
  font-weight: 800;
  background: linear-gradient(100deg, #ffffff 10%, var(--cyan) 45%, var(--purple) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeUp 0.9s ease both;
  word-break: break-word;
}

.typed-line {
  margin-top: 18px;
  font-size: clamp(1rem, 4vw, 1.35rem);
  color: var(--cyan);
  min-height: 1.8em;
  animation: fadeUp 0.9s 0.15s ease both;
  word-break: break-all;
}

.caret {
  display: inline-block;
  width: 9px;
  height: 1.05em;
  margin-left: 3px;
  vertical-align: -2px;
  background: var(--cyan);
  animation: blink 1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.lead {
  margin-top: 22px;
  max-width: 560px;
  color: var(--muted);
  font-size: clamp(0.95rem, 3vw, 1.02rem);
  animation: fadeUp 0.9s 0.3s ease both;
}

.cta {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  animation: fadeUp 0.9s 0.45s ease both;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border);
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s, color 0.25s;
  width: 100%;
}

@media (min-width: 480px) { .btn { width: auto; } }

.btn.primary {
  background: linear-gradient(100deg, var(--cyan), var(--purple));
  color: #05050a;
  border-color: transparent;
  box-shadow: 0 0 28px rgba(0, 229, 255, 0.25);
}
.btn.primary:hover { transform: translateY(-3px); box-shadow: 0 8px 36px rgba(0, 229, 255, 0.4); }

.btn.ghost { color: var(--text); background: rgba(255, 255, 255, 0.03); }
.btn.ghost:hover { transform: translateY(-3px); background: rgba(255, 255, 255, 0.07); border-color: rgba(0, 229, 255, 0.4); }

.scroll-hint {
  margin-top: 64px;
  font-size: 0.72rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
  animation: float 2.4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(7px); opacity: 1; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 820px) { .about-grid { grid-template-columns: 1fr; } }

.about-text p { color: var(--muted); margin-bottom: 16px; }
.about-text strong { color: var(--text); font-weight: 600; }

.terminal {
  background: #0a0a12;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  max-width: 100%;
}
.terminal-bar {
  display: flex;
  gap: 7px;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.r { background: #ff5f57; }
.dot.y { background: #febc2e; }
.dot.g { background: #28c840; }

.terminal-body {
  padding: 16px 18px;
  font-size: 0.83rem;
  line-height: 1.5; 
  color: #b9b9d0;
  overflow-x: auto;
}
.terminal-body .prompt { color: var(--cyan); }
.terminal-body .ok { color: #4ade80; }
.terminal-body .key { color: var(--purple); }
.terminal-body .dim { color: #5f5f7a; }

.terminal-body > div { margin-bottom: 2px; }
.terminal-body > div:empty { display: none; } 

/* ---------- stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 16px;
  margin-top: 56px;
}

.stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 10px;
  text-align: center;
  transition: border-color 0.3s, transform 0.3s;
}
.stat:hover { border-color: rgba(0, 229, 255, 0.35); transform: translateY(-4px); }

.stat .num {
  display: block;
  font-size: clamp(1.6rem, 5vw, 1.9rem);
  font-weight: 800;
  background: linear-gradient(100deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat .lbl {
  font-size: 0.76rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.skill-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 0.35s, border-color 0.35s, box-shadow 0.35s;
}
.skill-card:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 229, 255, 0.35);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.skill-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.skill-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  font-size: 1.05rem;
  background: linear-gradient(140deg, rgba(0, 229, 255, 0.16), rgba(168, 85, 247, 0.16));
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.skill-head h3 {
  font-size: 1rem;
  font-weight: 650;
  flex: 1;
}

.skill-pct {
  font-size: 0.8rem;
  color: var(--cyan);
  font-family: ui-monospace, Menlo, monospace;
}

.bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  margin-bottom: 14px;
}

.bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.skill-card.visible .bar-fill { width: var(--level); }

.skill-card p {
  font-size: 0.87rem;
  color: var(--muted);
}

/* ---------- work / cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  overflow: hidden;
  transition: transform 0.35s, border-color 0.35s;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, rgba(0, 229, 255, 0.09), transparent 55%);
  opacity: 0;
  transition: opacity 0.4s;
}
.card:hover { transform: translateY(-5px); border-color: rgba(168, 85, 247, 0.4); }
.card:hover::before { opacity: 1; }
.card > * { position: relative; }

.card .tag {
  display: inline-block;
  font-size: 0.68rem;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--purple);
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: 999px;
  padding: 3px 10px;
  margin-bottom: 14px;
}

.card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.card p { font-size: 0.88rem; color: var(--muted); }

/* ---------- contact ---------- */
.contact-box {
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: clamp(36px, 6vw, 64px) 24px;
  background:
    radial-gradient(600px 240px at 50% 0%, rgba(0, 229, 255, 0.10), transparent 70%),
    var(--bg-2);
}

.contact-box h2 { margin-bottom: 10px; }
.contact-box p { color: var(--muted); max-width: 480px; margin: 0 auto 28px; }

.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
  transition: border-color 0.25s, color 0.25s, transform 0.25s;
}
.social:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  transform: translateY(-3px);
}

/* ---------- footer ---------- */
footer {
  text-align: center;
  padding: 34px 20px 48px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
}
footer .clock { color: var(--cyan); font-family: ui-monospace, Menlo, monospace; }

/* ---------- reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}