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

:root {
  --bg:        #0a0a0c;
  --bg2:       #0f0f12;
  --bg3:       #141418;
  --border:    rgba(255,255,255,0.07);
  --border-h:  rgba(255,255,255,0.13);
  --text:      #e2e2e8;
  --muted:     #666672;
  --muted2:    #44444e;
  --accent:    #7c6ef5;
  --accent2:   #5b8cff;
  --accent3:   #a78bfa;
  --glow:      rgba(124,110,245,0.18);
  --glow-s:    rgba(124,110,245,0.08);
  --green:     #3ecf8e;
  --yellow:    #f5c642;
  --red:       #f56565;
  --font:      'Inter', sans-serif;
  --mono:      'JetBrains Mono', monospace;
  --radius:    14px;
  --radius-sm: 8px;
  --ease:      cubic-bezier(0.22, 1, 0.36, 1);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  overflow-x: hidden;
  cursor: none;
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent3); }

.grain {
  position: fixed; inset: 0; z-index: 1000;
  pointer-events: none;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px;
}

#bg {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
}

.cur-dot, .cur-ring {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s;
}
.cur-dot  { width: 5px; height: 5px; background: var(--accent); }
.cur-ring {
  width: 28px; height: 28px;
  border: 1.5px solid rgba(124,110,245,0.5);
  transition: width 0.15s var(--ease), height 0.15s var(--ease), border-color 0.15s;
}
.cur-ring.hover { width: 44px; height: 44px; border-color: var(--accent3); }

@media (hover: none) {
  .cur-dot, .cur-ring { display: none; }
  body { cursor: auto; }
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }

.section-tag {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

h2 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: #fff;
}

nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 200;
  height: 62px;
  display: flex; align-items: center;
  padding: 0 28px;
  justify-content: space-between;
  border-bottom: 1px solid transparent;
  transition: background 0.35s, border-color 0.35s;
}
nav.scrolled {
  background: rgba(10,10,12,0.85);
  backdrop-filter: blur(14px) saturate(1.4);
  border-color: var(--border);
}

.logo {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  text-decoration: none;
}

.logo-dot { color: var(--accent); }

.nav-links { display: flex; gap: 32px; }
.nav-links a {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: #fff; }

.burger {
  display: none;
  flex-direction: column; gap: 5px;
  background: none; border: none;
  cursor: pointer; padding: 4px;
}
.burger span {
  display: block; width: 22px; height: 1.5px;
  background: var(--muted);
  transition: transform 0.25s, opacity 0.25s;
}

.drawer {
  position: fixed;
  top: 62px; left: 0; right: 0;
  background: rgba(10,10,12,0.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column;
  z-index: 199;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s var(--ease), opacity 0.25s;
}
.drawer.open { transform: translateY(0); opacity: 1; pointer-events: all; }
.drawer a {
  padding: 16px 28px;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s, background 0.2s;
}
.drawer a:hover { color: #fff; background: var(--bg3); }

.pulse-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--pulse-color, var(--green));
  position: relative;
}
.pulse-dot::after {
  content: '';
  position: absolute; inset: -3px;
  border-radius: 50%;
  background: var(--pulse-color, var(--green));
  opacity: 0.3;
  animation: pulse 2s ease infinite;
}
.pulse-dot.sm { width: 6px; height: 6px; }

@keyframes pulse {
  0%,100% { transform: scale(1); opacity: 0.3; }
  50%      { transform: scale(2); opacity: 0;   }
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 56px;
  padding: 100px 28px 60px;
  max-width: 1080px;
  margin: 0 auto;
  position: relative; z-index: 1;
}

.hero-inner { flex: 1; min-width: 0; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--green);
  background: rgba(62,207,142,0.08);
  border: 1px solid rgba(62,207,142,0.2);
  border-radius: 99px;
  padding: 5px 12px;
  margin-bottom: 28px;
  letter-spacing: 0.04em;
}

h1 {
  font-size: clamp(2.4rem, 7vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 20px;
  color: #fff;
}
h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent3), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 16px;
  max-width: 420px;
}

.hero-note {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted2);
  margin-bottom: 36px;
}

.hero-btns {
  display: flex; gap: 12px; flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex; align-items: center;
  padding: 11px 24px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font-size: 14px; font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.btn-primary:hover {
  background: var(--accent3);
  transform: translateY(-1px);
  box-shadow: 0 8px 32px var(--glow);
}
.btn-ghost {
  display: inline-flex; align-items: center;
  padding: 11px 24px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-h);
  color: var(--muted);
  font-size: 14px; font-weight: 500;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, transform 0.15s;
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}

.hero-card {
  flex-shrink: 0;
  width: 320px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 0 80px var(--glow-s), 0 32px 64px rgba(0,0,0,0.4);
  transition: transform 0.4s var(--ease), box-shadow 0.4s;
}
.card-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
}
.card-dots { display: flex; gap: 5px; }
.card-dots i {
  display: block; width: 10px; height: 10px;
  border-radius: 50%; background: var(--muted2);
}
.card-dots i:nth-child(1) { background: #f56565; }
.card-dots i:nth-child(2) { background: #f5c642; }
.card-dots i:nth-child(3) { background: #3ecf8e; }
.card-bar span {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
}
.hero-code {
  padding: 18px;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.8;
  white-space: pre;
  overflow-x: auto;
}

.t-c { color: var(--muted2); }
.t-k { color: var(--accent3); }
.t-f { color: var(--accent2); }
.t-v { color: var(--green);   }
.t-n { color: var(--yellow);  }

.about { padding: 100px 0; position: relative; z-index: 1; }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 40px;
  margin-top: 40px;
}

.about-text p {
  color: var(--muted);
  margin-bottom: 14px;
  max-width: 480px;
}

.inline-note {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted2);
  border-left: 2px solid var(--accent);
  padding-left: 12px;
  line-height: 1.6;
}

.about-tags {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  height: fit-content;
}

.at-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.at-row:last-child { border-bottom: none; }
.at-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted2);
  flex-shrink: 0;
}
.at-val {
  font-size: 13px;
  color: var(--text);
  text-align: right;
  display: flex; align-items: center; gap: 6px;
}
.at-val.glow { color: var(--accent3); }

.skills { padding: 100px 0; position: relative; z-index: 1; }

.skills-list {
  margin-top: 40px;
  display: flex; flex-direction: column; gap: 20px;
}

.skill-row {
  display: grid;
  grid-template-columns: 1fr 200px;
  align-items: center;
  gap: 24px;
  padding: 16px 20px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, background 0.2s;
}
.skill-row:hover { border-color: var(--border-h); background: var(--bg3); }

.sk-meta { min-width: 0; }
.sk-name {
  display: block; font-size: 14px; font-weight: 500;
  color: #fff; margin-bottom: 3px;
}
.sk-note {
  font-family: var(--mono); font-size: 11px; color: var(--muted2);
}

.sk-bar-track {
  height: 4px;
  background: var(--bg3);
  border-radius: 99px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.sk-bar-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 99px;
  transition: width 1s var(--ease);
  box-shadow: 0 0 8px var(--glow);
}

.tag-cloud {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 32px;
}
.tag-cloud span {
  font-family: var(--mono); font-size: 11px;
  color: var(--muted);
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 4px 12px;
  transition: border-color 0.2s, color 0.2s;
}
.tag-cloud span:hover { border-color: var(--accent); color: var(--accent3); }

.projects { padding: 100px 0; position: relative; z-index: 1; }

.proj-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 40px;
}
.proj-card.featured { grid-column: 1 / -1; }

.proj-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s var(--ease), box-shadow 0.25s;
  position: relative;
}
.proj-card::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--glow-s), transparent);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.proj-card:hover {
  border-color: var(--border-h);
  transform: translateY(-3px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.3), 0 0 40px var(--glow-s);
}
.proj-card:hover::before { opacity: 1; }

.proj-top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px 0;
}

.status {
  font-family: var(--mono); font-size: 10px;
  padding: 3px 9px; border-radius: 99px; font-weight: 500;
  letter-spacing: 0.04em;
}
.status.done    { background: rgba(62,207,142,0.1);   color: var(--green);  border: 1px solid rgba(62,207,142,0.25); }
.status.wip     { background: rgba(245,198,66,0.1);   color: var(--yellow); border: 1px solid rgba(245,198,66,0.25); }
.status.shelved { background: rgba(102,102,114,0.15); color: var(--muted);  border: 1px solid var(--border); }

.gh-icon { color: var(--muted2); transition: color 0.2s; display: flex; }
.gh-icon:hover { color: #fff; }
.gh-icon svg { width: 16px; height: 16px; }

/* proj body */
.proj-body { padding: 12px 16px 18px; }
.proj-body h3 {
  font-size: 15px; font-weight: 600; color: #fff;
  margin-bottom: 7px; letter-spacing: -0.02em;
}
.proj-body p {
  font-size: 13px; color: var(--muted);
  line-height: 1.6; margin-bottom: 12px;
}
.proj-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.proj-tags span {
  font-family: var(--mono); font-size: 10px;
  color: var(--muted); background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px; padding: 2px 8px;
}

.contact { padding: 100px 0 120px; position: relative; z-index: 1; }

.contact-sub { margin-top: 10px; font-size: 13px; color: var(--muted); }

.contact-cards {
  display: flex; flex-direction: column;
  gap: 10px; margin-top: 36px; max-width: 520px;
}

.contact-card {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none; color: inherit;
  transition: border-color 0.2s, background 0.2s, transform 0.2s var(--ease);
}
.contact-card:hover {
  border-color: var(--accent);
  background: var(--bg3);
  transform: translateX(4px);
}

.cc-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.cc-icon svg { width: 18px; height: 18px; }
.cc-icon.discord { background: rgba(88,101,242,0.15); color: #7289da; }
.cc-icon.github  { background: rgba(255,255,255,0.06); color: var(--text); }
.cc-icon.email   { background: rgba(124,110,245,0.12); color: var(--accent3); }

.cc-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.cc-label { font-family: var(--mono); font-size: 10px; color: var(--muted2); letter-spacing: 0.05em; }
.cc-val   { font-size: 14px; color: var(--text); font-weight: 500; }
.cc-arrow { color: var(--muted2); font-size: 16px; transition: transform 0.2s, color 0.2s; }
.contact-card:hover .cc-arrow { transform: translateX(3px); color: var(--accent); }

footer {
  padding: 24px 28px;
  display: flex; align-items: center; gap: 10px;
  border-top: 1px solid var(--border);
  font-family: var(--mono); font-size: 12px;
  color: var(--muted2);
  position: relative; z-index: 1;
}
.footer-sep { color: var(--border-h); }

@media (max-width: 860px) {
  .hero { flex-direction: column; align-items: flex-start; padding-top: 110px; }
  .hero-card { width: 100%; }
  .about-grid { grid-template-columns: 1fr; }
  .skill-row  { grid-template-columns: 1fr; gap: 10px; }
  .proj-grid  { grid-template-columns: 1fr; }
  .proj-card.featured { grid-column: 1; }
}

@media (max-width: 600px) {
  .nav-links { display: none; }
  .burger    { display: flex; }
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.7rem; }
  .hero-btns { flex-direction: column; }
  .btn-primary, .btn-ghost { width: 100%; justify-content: center; }
  .contact-cards { max-width: 100%; }
}