*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; cursor: none !important; }

:root {
  --bg: #0a0a0a;
  --bg-alt: #111111;
  --bg-card: #161616;
  --border: #252525;
  --text: #e8e8e8;
  --text-muted: #888888;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
  --nav-h: 56px;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  cursor: none;
}

::selection { background: rgba(212, 163, 115, 0.25); color: #fff; }
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #444; border-radius: 2px; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }

/* ─── NAV ─── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h); display: flex; align-items: center; justify-content: center;
  transition: background .3s, backdrop-filter .3s;
}
.nav-inner {
  width: 100%; max-width: 1200px; padding: 0 32px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { font-weight: 800; font-size: 1.2rem; color: var(--text); }
.nav-links { display: flex; gap: 24px; }
.nav-links a {
  color: var(--text-muted); text-decoration: none;
  font-size: .75rem; font-weight: 500; text-transform: uppercase;
  letter-spacing: .08em; transition: color .2s;
}
.nav-links a:hover { color: var(--text); }
.nav-year { font-size: .7rem; color: var(--text-muted); font-family: var(--mono); }
.nav.scrolled {
  background: rgba(10,10,10,.88); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav.has-bg {
  background: rgba(255,255,255,.95); backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.nav.has-bg .nav-logo { color: #111; }
.nav.has-bg .nav-links a { color: rgba(0,0,0,.5); }
.nav.has-bg .nav-links a:hover { color: #000; }
.nav.has-bg .nav-year { color: rgba(0,0,0,.4); }

/* ─── HERO ─── */
.hero {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
#terrain {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; display: block;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse at 30% 50%, rgba(212,163,115,.08) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 50%, rgba(122,158,177,.06) 0%, transparent 60%);
}
.hero-inner { position: relative; z-index: 2; text-align: center; padding: 0 32px; pointer-events: none; }
.hero-label {
  font-size: .7rem; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: .12em; margin-bottom: 24px;
}
.hero-title-block { margin: 0 0 24px; }
.hero-mask { overflow: hidden; }
.hero-line {
  font-size: clamp(3rem, 12vw, 8rem); font-weight: 900;
  letter-spacing: -.04em; line-height: 1.05; color: #fff;
}
.hero-name { color: var(--text); }
.hero-tags {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}
.hero-tags span {
  font-size: .7rem; color: rgba(255,255,255,.35);
  font-family: var(--mono);
}
.hero-scroll {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  font-size: .6rem; color: rgba(255,255,255,.25);
  text-transform: uppercase; letter-spacing: .15em;
  animation: hFloat 2s ease-in-out infinite;
}
@keyframes hFloat { 0%,100%{transform:translateX(-50%)} 50%{transform:translateX(-50%) translateY(-6px)} }

/* ─── CURSOR ─── */
.cursor-overlay {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
}
#clH {
  position: absolute; left: 0; right: 0; height: 0;
  border-top: .5px solid rgba(220,220,230,.5); top: 0;
}
#clV {
  position: absolute; top: 0; bottom: 0; width: 0;
  border-left: .5px solid rgba(220,220,230,.5); left: 0;
}
#clDot {
  position: absolute; width: 4px; height: 4px; margin-left: -2px; margin-top: -2px;
  background: rgba(220,220,230,.6); border-radius: 50%;
}
#clTrail {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
.cl-coords {
  position: fixed; bottom: 24px; right: 28px;
  font-family: 'JetBrains Mono', monospace; font-size: .5rem;
  color: rgba(220,220,230,.45); letter-spacing: .06em;
  pointer-events: none;
}
.cl-click {
  position: fixed; bottom: 24px; left: 28px;
  font-family: 'JetBrains Mono', monospace; font-size: .5rem;
  color: rgba(220,220,230,.4); letter-spacing: .06em;
  pointer-events: none;
}
.cl-click::before { content: "◆ "; }

/* ─── ANNOTATIONS ─── */
.annotations { position: fixed; inset: 0; pointer-events: none; z-index: 9998; }
.ann-item {
  position: absolute;
  font-family: 'JetBrains Mono', monospace; font-size: .6rem;
  color: rgba(180,180,180,.2); letter-spacing: .04em;
  white-space: pre; line-height: 1;
}
.ann-key { color: rgba(180,180,180,.35); }
.ann-dot { color: rgba(180,180,180,.2); }
.ann-val { color: rgba(180,180,180,.4); }
.ann-dot { color: rgba(180,180,180,.1); }
.ann-val { color: rgba(180,180,180,.25); }

/* ─── SECTION COMMON ─── */
.section-label {
  font-family: var(--mono); font-size: .7rem;
  color: #666; letter-spacing: .04em; margin-bottom: 16px;
}
.sec-title { margin-bottom: 12px; }
.sec-title h2 {
  font-size: clamp(2.2rem, 5vw, 4.5rem); font-weight: 900;
  letter-spacing: -.03em; line-height: 1.05;
}
.sec-title h2.a { color: var(--act-c, #888); }
.section-curtain {
  position: relative; background: var(--act-bg, var(--bg-alt)); overflow: hidden;
}
.section-curtain.dark { --act-bg: #0a0a0a; --act-c: #777; }
.sec-content { position: relative; z-index: 2; padding: 110px 0; }

/* ─── ABOUT ─── */
.about {
  padding: 110px 0; background: var(--bg-alt);
}
.about-grid {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 64px; margin-bottom: 48px;
}
.about-text h2 {
  font-size: clamp(1.2rem, 2.5vw, 1.8rem); font-weight: 600;
  line-height: 1.4; color: var(--text);
}
.about-code {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; padding: 24px;
  font-family: var(--mono); font-size: .8rem; line-height: 2;
  display: flex; flex-direction: column;
}
.about-code .cm { color: #555; }
.about-code .ln { color: var(--text-muted); }
.about-code .kw { color: #d4a373; }
.about-code .s { color: #888; }
.about-code .ty { color: #7a9eb1; }
.about-body p {
  color: var(--text-muted); font-size: .9rem; line-height: 1.8;
  margin-bottom: 16px; max-width: 720px;
}

/* ─── EXPERIENCE ─── */
#experience { --act-bg: #141210; --act-c: #d4a373; }
.exp-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 48px; margin-bottom: 60px; }
.exp-row {
  display: flex; border-bottom: 1px solid rgba(255,255,255,.05);
  padding: 14px 0;
}
.exp-lbl { width: 100px; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.3); flex-shrink: 0; }
.exp-val { font-size: .85rem; color: rgba(255,255,255,.6); }
.exp-item {
  display: grid; grid-template-columns: 40px 1fr; gap: 16px;
  padding: 18px 0; border-bottom: 1px solid rgba(255,255,255,.05);
}
.exp-item:last-child { border-bottom: none; }
.exp-num { font-family: var(--mono); font-size: .65rem; color: #666; padding-top: 2px; }
.exp-date { font-size: .7rem; color: #888; font-family: var(--mono); display: block; margin-bottom: 4px; }
.exp-body h3 { font-size: 1rem; font-weight: 600; margin-bottom: 2px; }
.exp-role { font-size: .78rem; color: var(--text-muted); display: block; margin-bottom: 6px; }
.exp-body p { font-size: .78rem; color: var(--text-muted); line-height: 1.6; }

/* ─── SKILLS ─── */
#skills { --act-bg: #101214; --act-c: #7a9eb1; }
.skills-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 48px; margin-bottom: 60px; }
.skills-list { display: flex; flex-direction: column; gap: 24px; }
.skill-cat h4 { font-size: .6rem; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.25); margin-bottom: 10px; font-weight: 600; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.skill-tags span {
  padding: 4px 10px; border-radius: 4px; font-size: .72rem;
  background: rgba(255,255,255,.04); color: #999;
  border: 1px solid rgba(255,255,255,.07);
}

/* ─── PROJECTS ─── */
#projects { --act-c: #8a8a7a; }
.proj-track-wrap { overflow: hidden; padding: 48px 0; }
.proj-track { display: flex; gap: 24px; padding: 0 32px; width: max-content; }
.proj-card {
  width: 340px; background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.06); border-radius: 10px;
  padding: 32px; flex-shrink: 0; display: flex; flex-direction: column;
}
.proj-num { font-family: var(--mono); font-size: .65rem; color: #666; margin-bottom: 14px; display: block; }
.proj-icon { font-size: 1.3rem; margin-bottom: 16px; }
.proj-card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 10px; }
.proj-card p { font-size: .78rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 16px; flex: 1; }
.proj-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 16px; }
.proj-tags span {
  padding: 2px 8px; border-radius: 3px; font-size: .62rem;
  background: rgba(255,255,255,.04); color: #888;
  border: 1px solid rgba(255,255,255,.07);
}
.proj-card a { color: var(--text-muted); text-decoration: none; font-size: .78rem; font-weight: 500; transition: color .2s; }
.proj-card a:hover { color: #fff; }

/* ─── GITHUB / LEETCODE ─── */
#github { --act-bg: #0e0c12; --act-c: #9b8ec4; }
#leetcode { --act-bg: #0c1110; --act-c: #5a9a7a; }
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 1px; background: var(--border); border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden; margin-bottom: 24px;
}
.stat { background: var(--bg-card); padding: 24px; text-align: center; }
.stat-num { font-size: 1.6rem; font-weight: 800; font-family: var(--mono); color: var(--text); }
.stat-lbl { font-size: .65rem; color: var(--text-muted); margin-top: 4px; text-transform: uppercase; letter-spacing: .06em; }

.gh-contrib {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; padding: 24px; margin-bottom: 0;
}
.gh-contrib-label {
  font-size: .7rem; font-weight: 600; color: var(--text-muted);
  margin-bottom: 16px; text-transform: uppercase; letter-spacing: .06em;
}
.gh-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11px, 1fr));
  gap: 3px;
}
.gh-cell {
  aspect-ratio: 1; border-radius: 2px;
  background: rgba(155,142,196,.06);
  transition: background .2s;
}
.gh-cell.l1 { background: rgba(155,142,196,.2); }
.gh-cell.l2 { background: rgba(155,142,196,.4); }
.gh-cell.l3 { background: rgba(155,142,196,.6); }
.gh-cell.l4 { background: rgba(155,142,196,.85); }
.gh-cell:hover { background: rgba(155,142,196,1) !important; }

.lc-layout {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 24px; margin-bottom: 40px; align-items: start;
}
.stats-compact { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.lc-bars {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; padding: 28px 24px;
  display: flex; flex-direction: column; gap: 20px;
}
.lc-bar-row {
  display: grid; grid-template-columns: 48px 1fr 36px;
  gap: 12px; align-items: center;
}
.lc-bar-lbl {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-muted); font-weight: 500;
}
.lc-bar-track {
  height: 6px; background: rgba(255,255,255,.06);
  border-radius: 3px; overflow: hidden;
}
.lc-bar-fill {
  height: 100%; border-radius: 3px;
  background: #5a9a7a; transition: width 1s ease;
}
.lc-bar-fill.med { background: #7a9eb1; }
.lc-bar-fill.hard { background: #9b8ec4; }
.lc-bar-num {
  font-family: var(--mono); font-size: .8rem;
  color: var(--text-muted); text-align: right;
}

/* ─── BLOG ─── */
#blog { --act-bg: #12100e; --act-c: #c4a88a; }
.blog-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1px; background: var(--border); border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden;
}
.blog-card { background: var(--bg-card); padding: 28px; transition: background .3s; }
.blog-card:hover { background: var(--bg); }
.blog-tag {
  display: inline-block; font-size: .58rem; text-transform: uppercase;
  letter-spacing: .08em; color: #888;
  border: 1px solid rgba(255,255,255,.08); padding: 2px 8px;
  border-radius: 3px; margin-bottom: 14px;
}
.blog-card h4 { font-size: .88rem; font-weight: 600; margin-bottom: 10px; line-height: 1.4; }
.blog-card p { color: var(--text-muted); font-size: .75rem; line-height: 1.5; margin-bottom: 14px; }
.blog-card a { color: var(--text-muted); text-decoration: none; font-size: .75rem; font-weight: 500; transition: color .2s; }
.blog-card a:hover { color: #fff; }

/* ─── STATEMENT ─── */
.statement { border-top: 1px solid var(--border); padding-top: 36px; }
.st-line { display: flex; gap: 14px; margin-bottom: 10px; align-items: baseline; }
.st-line:last-child { margin-bottom: 0; }
.st-num { font-family: var(--mono); font-size: .65rem; color: #555; flex-shrink: 0; }
.st-line p { font-size: .85rem; color: rgba(255,255,255,.5); line-height: 1.6; }
.st-link { color: #888; text-decoration: none; font-size: .85rem; font-weight: 500; transition: color .2s; }
.st-link:hover { color: #fff; }

/* ─── CREDITS ─── */
.credits {
  padding: 80px 0 48px; background: var(--bg);
  border-top: 1px solid var(--border);
}
.credits-inner {
  display: flex; flex-direction: column; align-items: center; gap: 20px;
  margin-bottom: 32px;
}
.credits-row {
  display: flex; align-items: center; gap: 14px;
}
.credits-key {
  font-size: .75rem; text-transform: uppercase; letter-spacing: .12em;
  color: rgba(255,255,255,.2); font-weight: 500;
}
.credits-row a {
  font-size: 1rem; color: rgba(255,255,255,.5);
  text-decoration: none; transition: color .2s;
}
.credits-row a:hover { color: #d4a373; }
.credits-status {
  display: flex; align-items: center; justify-content: center; gap: 24px;
  margin-bottom: 32px;
}
.credits-status span {
  font-size: 1rem; color: rgba(255,255,255,.25);
}
.credits-badge {
  font-size: .75rem; text-transform: uppercase; letter-spacing: .12em;
  color: #d4a373; border: 1px solid rgba(212,163,115,.15);
  padding: 6px 18px; border-radius: 5px;
}
.credits-foot {
  display: flex; align-items: center; justify-content: center; gap: 18px;
}
.credits-foot span {
  font-size: .75rem; color: rgba(255,255,255,.15);
}
.credits-v {
  font-family: var(--mono); color: rgba(255,255,255,.08);
}

/* ─── FOOTER ─── */
.footer { padding: 4px 0 32px; background: var(--bg); }
.footer-inner { text-align: center; }
.footer-tagline { font-size: .6rem; color: rgba(255,255,255,.08); max-width: 360px; margin: 0 auto; line-height: 1.5; }

/* ─── CURTAIN ─── */
.curtain-wrap {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  overflow: hidden;
}
.curtain-panel {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.curtain-cards { display: flex; gap: 24px; perspective: 1200px; }
.c-card { width: 200px; height: 260px; perspective: 1200px; }
.c-card-inner { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; }
.c-card-face { position: absolute; inset: 0; border-radius: 10px; backface-visibility: hidden; }
.curtain-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px; width: 100%; max-width: 500px; padding: 40px;
}
.g-rect { aspect-ratio: 1; background: rgba(255,255,255,.12); border-radius: 6px; }
.g-center { background: rgba(255,255,255,.2); }

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .exp-grid { grid-template-columns: 1fr; gap: 32px; }
  .skills-layout { grid-template-columns: 1fr; gap: 32px; }
}@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .sec-content { padding: 80px 0; }
  .about { padding: 80px 0; }
  .nav-links { display: none; }
  .proj-card { width: 280px; padding: 24px; }
  .credits { padding: 60px 0 32px; }
  .credits-row a { font-size: .9rem; }
  .credits-status { flex-direction: column; gap: 12px; }
  .credits-status span, .credits-badge { font-size: .85rem; }
}
@media (max-width: 480px) {
  .hero-line { font-size: 2.5rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .proj-card { width: 260px; }
}
