:root {
  --graphite: #171a21;
  --graphite-deep: #0e1015;
  --slate: #232732;
  --cyan: #22d3ee;
  --amber: #f5a623;
  --paper: #f5f6f8;
  --ink: #1a1d24;
  --ink-soft: #545b68;
  --line: #e2e5ea;
  --white: #ffffff;
  --shadow: 0 18px 40px -18px rgba(14,16,21,0.35);
  --font-head: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-body: 'Inter', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-body); color: var(--ink); background: var(--paper); line-height: 1.65; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; color: var(--graphite-deep); line-height: 1.18; margin: 0 0 0.5em; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

.nav { position: sticky; top: 0; z-index: 50; background: rgba(245,246,248,0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; color: var(--graphite-deep); font-size: 1rem; }
.brand img { width: 30px; height: 30px; }
.links { display: flex; align-items: center; gap: 26px; }
.links a { font-weight: 500; font-size: 0.92rem; color: var(--ink-soft); }
.links a:hover { color: var(--cyan); }
.cta { background: var(--cyan); color: var(--graphite-deep) !important; padding: 9px 20px; border-radius: 999px; font-weight: 700 !important; }
.cta:hover { background: #67e3f5; }
.burger { display: none; flex-direction: column; gap: 5px; width: 36px; height: 36px; background: none; border: none; cursor: pointer; }
.burger span { display: block; height: 2px; background: var(--graphite-deep); border-radius: 2px; }

/* Hero */
.hero { position: relative; overflow: hidden; background: var(--graphite); color: var(--white); padding: 90px 0 70px; }
.hero-grid {
  position: absolute; inset: 0; opacity: 0.5;
  background-image:
    linear-gradient(rgba(34,211,238,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34,211,238,0.06) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(700px 420px at 75% 20%, black, transparent 75%);
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 44px; align-items: center; }
.eyebrow { color: var(--cyan); font-weight: 600; letter-spacing: 0.04em; font-size: 0.8rem; margin-bottom: 12px; font-family: var(--font-mono); }
.hero h1 { color: var(--white); font-size: clamp(2rem, 4.4vw, 3.1rem); margin-bottom: 8px; }
.hero h1 .dot { color: var(--amber); }
.role { color: rgba(255,255,255,0.86); font-weight: 600; font-size: 1rem; margin-bottom: 18px; font-family: var(--font-mono); }
.lead { color: rgba(255,255,255,0.72); max-width: 56ch; margin-bottom: 28px; }
.actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 26px; border-radius: 10px; font-weight: 600; font-size: 0.94rem; transition: transform 0.15s, background 0.15s; }
.btn-primary { background: var(--cyan); color: var(--graphite-deep); box-shadow: 0 10px 24px -8px rgba(34,211,238,0.5); }
.btn-primary:hover { background: #67e3f5; transform: translateY(-2px); }
.btn-ghost { border: 1.5px solid rgba(255,255,255,0.3); color: var(--white); }
.btn-ghost:hover { border-color: var(--amber); color: var(--amber); }
.hero-photo { display: flex; justify-content: center; }
.ring { width: min(260px, 58vw); aspect-ratio: 1; border-radius: 50%; padding: 7px; background: conic-gradient(from 180deg, var(--cyan), var(--amber), var(--cyan)); box-shadow: var(--shadow); }
.ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: center 15%; border: 5px solid var(--graphite); }

/* Stats */
.stats { background: var(--graphite-deep); color: var(--white); padding: 26px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; text-align: center; }
.stats strong { display: block; font-family: var(--font-head); font-size: 1.5rem; color: var(--cyan); }
.stats span { font-size: 0.76rem; color: rgba(255,255,255,0.7); }

.section { padding: 74px 0; }
.section-label { color: var(--graphite-deep); font-weight: 700; font-size: 0.8rem; margin-bottom: 8px; font-family: var(--font-mono); opacity: 0.55; }
.section-label.light { color: var(--amber); opacity: 1; }
.section h2 { font-size: clamp(1.5rem, 2.5vw, 2rem); }
.section-lead { color: var(--ink-soft); max-width: 70ch; }

/* About */
.about-grid { display: grid; grid-template-columns: 1.25fr 0.9fr; gap: 44px; align-items: start; }
.about-grid > div:first-child p { color: var(--ink-soft); }
.sub-h { font-size: 1.05rem; margin-top: 28px; color: var(--graphite-deep); }
.edu-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.edu-list li { display: flex; gap: 14px; }
.edu-list .yr { flex-shrink: 0; width: 84px; color: var(--cyan-dark, #0891b2); font-weight: 700; font-size: 0.78rem; font-family: var(--font-mono); }
.edu-list strong { display: block; font-size: 0.92rem; }
.edu-list span { color: var(--ink-soft); font-size: 0.84rem; }
.skill-card { background: var(--white); border-radius: 16px; padding: 26px; box-shadow: var(--shadow); border-top: 4px solid var(--amber); }
.skill-card h3 { font-size: 1rem; margin-bottom: 14px; }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.plain-list li { font-size: 0.86rem; color: var(--ink-soft); padding-left: 18px; position: relative; }
.plain-list li::before { content: '›'; position: absolute; left: 0; color: var(--cyan); font-weight: 700; }

/* Tech grid */
.tech { background: var(--graphite); color: var(--white); }
.tech h2 { color: var(--white); }
.tech-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tech-card { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; padding: 18px; }
.tech-card h3 { font-size: 0.88rem; color: var(--cyan); margin-bottom: 6px; font-family: var(--font-mono); }
.tech-card p { margin: 0; color: rgba(255,255,255,0.78); font-size: 0.84rem; }

/* Projects */
.projects { background: var(--paper); }
.pub-tabs details { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 14px 20px; margin-bottom: 14px; box-shadow: var(--shadow); }
.pub-tabs summary { cursor: pointer; font-family: var(--font-head); font-size: 1.05rem; color: var(--graphite-deep); font-weight: 700; display: flex; align-items: center; gap: 10px; }
.pub-tabs summary .count { background: rgba(34,211,238,0.15); color: #0e7490; font-size: 0.7rem; font-family: var(--font-mono); padding: 2px 9px; border-radius: 999px; }
.proj-list { list-style: decimal; padding-left: 1.3em; margin: 16px 0 4px; display: grid; gap: 10px; }
.proj-list li { color: var(--ink-soft); font-size: 0.88rem; line-height: 1.55; }
.proj-list strong { color: var(--ink); }
.proj-date { display: inline-block; margin-left: 6px; font-family: var(--font-mono); font-size: 0.74rem; color: var(--amber); background: rgba(245,166,35,0.1); padding: 1px 8px; border-radius: 999px; white-space: nowrap; }

/* Contact */
.contact { background: linear-gradient(160deg, var(--graphite) 0%, var(--graphite-deep) 100%); color: var(--white); }
.contact h2 { color: var(--white); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.contact-grid > div:first-child p { color: rgba(255,255,255,0.78); }
.contact-cards { display: grid; gap: 14px; }
.c-card { display: flex; flex-direction: column; gap: 4px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: 14px; padding: 16px 18px; }
a.c-card:hover { background: rgba(255,255,255,0.13); }
.c-card strong { color: var(--cyan); font-family: var(--font-mono); font-size: 0.84rem; }
.c-card span { font-size: 0.88rem; color: rgba(255,255,255,0.88); word-break: break-word; }

.footer { background: var(--graphite-deep); color: rgba(255,255,255,0.6); padding: 22px 0; font-size: 0.85rem; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.footer a { color: var(--cyan); }

@media (max-width: 900px) {
  .hero-inner, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-photo { order: -1; }
  .frame { width: 190px; margin: 0 auto; }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .tech-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .links { position: fixed; top: 0; right: -100%; width: min(78vw,320px); height: 100vh; background: var(--white); flex-direction: column; align-items: flex-start; padding: 90px 28px 28px; gap: 22px; box-shadow: -10px 0 30px rgba(0,0,0,0.15); transition: right 0.3s ease; }
  .links.open { right: 0; }
  .links a { color: var(--ink); }
  .burger { display: flex; }
}
