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

:root {
  --bg:        #0d1117;
  --surface:   #161b22;
  --border:    #21262d;
  --accent:    #a855f7;
  --accent2:   #d8b4fe;
  --accent3:   #06b6d4;
  --text:      #e6edf3;
  --muted:     #8b949e;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 2.5rem;
  background: rgba(13,17,23,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: 'Courier New', monospace;
  font-size: 1.1rem; font-weight: 700;
  color: var(--accent2);
}
.nav-logo span { color: var(--accent3); }
nav ul { list-style: none; display: flex; gap: 2rem; }
nav ul a {
  color: var(--muted); text-decoration: none; font-size: .9rem;
  letter-spacing: .03em; transition: color .2s;
}
nav ul a:hover { color: var(--text); }
.nav-cta {
  background: var(--accent); color: #fff !important;
  padding: .4rem 1rem; border-radius: 6px;
}
.nav-cta:hover { background: var(--accent2); color: #fff !important; }

/* ── HERO ── */
#hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 6rem 2.5rem 4rem;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem; align-items: center;
  max-width: 1100px; margin: 0 auto; width: 100%;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(168,85,247,.15);
  border: 1px solid rgba(168,85,247,.35);
  border-radius: 999px; padding: .3rem .9rem;
  font-size: .8rem; color: var(--accent2); margin-bottom: 1.5rem;
}
.hero-badge::before { content: '●'; color: #22c55e; font-size: .55rem; }
h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 800; line-height: 1.1; margin-bottom: 1.2rem;
}
h1 .name { display: block; }
h1 .role {
  display: block;
  background: linear-gradient(90deg, var(--accent2), var(--accent3));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-desc {
  color: var(--muted); font-size: 1.05rem; max-width: 440px;
  margin-bottom: 2rem; line-height: 1.75;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .7rem 1.5rem; border-radius: 8px;
  font-size: .95rem; font-weight: 600; text-decoration: none;
  transition: all .2s; cursor: pointer; border: none;
}
.btn-primary {
  background: var(--accent); color: #fff;
}
.btn-primary:hover { background: var(--accent2); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border); color: var(--text);
}
.btn-outline:hover { border-color: var(--accent2); color: var(--accent2); }

.hero-stats {
  display: flex; gap: 2.5rem; margin-top: 3rem;
  padding-top: 2rem; border-top: 1px solid var(--border);
}
.stat-num {
  font-size: 2rem; font-weight: 800; color: var(--text);
  font-variant-numeric: tabular-nums;
}
.stat-label { font-size: .8rem; color: var(--muted); margin-top: .1rem; }

/* Terminal card */
.hero-terminal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
}
.terminal-bar {
  background: #21262d; padding: .7rem 1rem;
  display: flex; align-items: center; gap: .5rem;
}
.terminal-bar span {
  width: 12px; height: 12px; border-radius: 50%;
}
.dot-r { background: #ff5f57; }
.dot-y { background: #febc2e; }
.dot-g { background: #28c840; }
.terminal-title {
  flex: 1; text-align: center;
  font-family: 'Courier New', monospace;
  font-size: .75rem; color: var(--muted);
}
.terminal-body {
  padding: 1.4rem 1.6rem;
  font-family: 'Courier New', monospace; font-size: .85rem;
  line-height: 2;
}
.t-prompt { color: #22c55e; }
.t-cmd    { color: var(--text); }
.t-key    { color: var(--accent2); }
.t-str    { color: #f97316; }
.t-num    { color: var(--accent3); }
.t-comment{ color: var(--muted); }
.t-kw     { color: #ec4899; }
.t-cursor {
  display: inline-block; width: 9px; height: 1em;
  background: var(--accent2); vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ── SECTION SHARED ── */
section { padding: 6rem 2.5rem; }
.section-inner { max-width: 1100px; margin: 0 auto; }
.section-label {
  font-family: 'Courier New', monospace;
  font-size: .78rem; color: var(--accent2); letter-spacing: .12em;
  text-transform: uppercase; margin-bottom: .6rem;
}
h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: 800; margin-bottom: .6rem;
}
.section-sub {
  color: var(--muted); max-width: 480px; margin-bottom: 3.5rem;
}

/* ── SKILLS ── */
#skills { background: var(--surface); }
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.2rem;
}
.skill-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 1.4rem 1.6rem;
  transition: border-color .2s, transform .2s;
}
.skill-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.skill-icon { font-size: 1.6rem; margin-bottom: .7rem; }
.skill-name {
  font-weight: 700; font-size: .95rem; margin-bottom: .4rem;
}
.skill-desc { font-size: .82rem; color: var(--muted); }
.skill-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .9rem; }
.tag {
  font-size: .72rem; padding: .2rem .6rem; border-radius: 4px;
  background: rgba(168,85,247,.15); color: var(--accent2);
  border: 1px solid rgba(168,85,247,.2);
  font-family: 'Courier New', monospace;
}
.tag.cyan {
  background: rgba(6,182,212,.1); color: var(--accent3);
  border-color: rgba(6,182,212,.2);
}

/* ── EXPERIENCE ── */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: ''; position: absolute; left: 0; top: .5rem; bottom: .5rem;
  width: 2px; background: var(--border);
}
.tl-item {
  position: relative; margin-bottom: 3rem;
}
.tl-dot {
  position: absolute; left: -2.45rem; top: .35rem;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent); border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
}
.tl-item:first-child .tl-dot { background: var(--accent3); box-shadow: 0 0 0 2px var(--accent3); }
.tl-meta {
  display: flex; align-items: center; gap: .8rem;
  margin-bottom: .4rem; flex-wrap: wrap;
}
.tl-company {
  font-weight: 700; font-size: 1.05rem; color: var(--text);
}
.tl-period {
  font-size: .78rem; color: var(--muted);
  font-family: 'Courier New', monospace;
  background: var(--border); padding: .15rem .5rem; border-radius: 4px;
}
.tl-role {
  color: var(--accent2); font-size: .9rem; margin-bottom: .7rem;
}
.tl-desc { color: var(--muted); font-size: .9rem; max-width: 620px; }
.tl-tech { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .8rem; }

/* ── PROJECTS ── */
#projects { background: var(--surface); }
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.4rem;
}
.project-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.8rem;
  display: flex; flex-direction: column; gap: .7rem;
  transition: border-color .2s, transform .2s;
}
.project-card:hover { border-color: var(--accent2); transform: translateY(-3px); }
.project-header { display: flex; align-items: center; justify-content: space-between; }
.project-icon { font-size: 1.5rem; }
.project-links { display: flex; gap: .7rem; }
.project-link {
  color: var(--muted); font-size: .85rem; text-decoration: none;
  transition: color .2s;
}
.project-link:hover { color: var(--accent2); }
.project-name { font-weight: 700; font-size: 1.05rem; }
.project-desc { color: var(--muted); font-size: .87rem; flex: 1; }
.project-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: .5rem; padding-top: .9rem; border-top: 1px solid var(--border);
}
.project-lang {
  font-size: .78rem; color: var(--accent2);
  font-family: 'Courier New', monospace;
}
.project-stars { font-size: .78rem; color: var(--muted); }

/* ── ABOUT ── */
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 4rem; align-items: start;
}
.about-text p { color: var(--muted); margin-bottom: 1rem; font-size: .95rem; }
.about-text p strong { color: var(--text); }
.about-facts { display: flex; flex-direction: column; gap: 1rem; }
.fact {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 1.2rem 1.4rem;
  display: flex; align-items: flex-start; gap: 1rem;
}
.fact-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: .1rem; }
.fact-title { font-weight: 600; font-size: .9rem; margin-bottom: .2rem; }
.fact-sub { font-size: .8rem; color: var(--muted); }

/* ── CONTACT ── */
#contact { background: var(--surface); text-align: center; }
.contact-card {
  max-width: 560px; margin: 0 auto;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 16px; padding: 3rem 2.5rem;
}
.contact-card h2 { margin-bottom: .5rem; }
.contact-card p { color: var(--muted); margin-bottom: 2rem; }
.contact-links { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.contact-link {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .65rem 1.3rem; border-radius: 8px;
  border: 1px solid var(--border); color: var(--text);
  text-decoration: none; font-size: .88rem;
  transition: all .2s;
}
.contact-link:hover {
  border-color: var(--accent2); color: var(--accent2);
  transform: translateY(-1px);
}

/* ── FOOTER ── */
footer {
  text-align: center; padding: 2rem;
  border-top: 1px solid var(--border);
  color: var(--muted); font-size: .8rem;
  font-family: 'Courier New', monospace;
}

/* ── BACKGROUND BLOBS ── */
.blob {
  position: absolute; border-radius: 50%;
  filter: blur(100px); pointer-events: none; opacity: .12;
}
.blob-1 { width: 500px; height: 500px; background: var(--accent); top: -100px; right: -100px; }
.blob-2 { width: 400px; height: 400px; background: var(--accent3); bottom: -80px; left: -80px; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  nav ul { display: none; }
  .hero-grid, .about-grid { grid-template-columns: 1fr; }
  .hero-terminal { display: none; }
  .hero-stats { gap: 1.5rem; }
}

/* ── SCROLL ANIMATIONS ── */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal.visible { opacity: 1; transform: none; }
