:root {
  --bg: #0a0a0a;
  --bg2: #111111;
  --bg3: #161616;
  --border: #1f1f1f;
  --green: #00ff88;
  --green-dim: #00cc6a;
  --green-muted: rgba(0,255,136,0.08);
  --text: #e8e8e8;
  --text-muted: #5a5a5a;
  --text-dim: #888;
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Inter', sans-serif;
}

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

html { scroll-behavior: smooth; }

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

/* Scanlines subtle overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.03) 2px,
    rgba(0,0,0,0.03) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: 60px;
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--green);
  letter-spacing: 0.05em;
}

.nav-logo span { color: var(--text-muted); }

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.08em;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--green); }
.nav-links a.active { color: var(--green); border-bottom: 1px solid var(--green); padding-bottom: 2px; }

/* ── HERO ── */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 48px 60px;
  max-width: 1100px;
  margin: 0 auto;
}

.hero-prefix {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--green);
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 0.6s 0.2s forwards;
}

.hero-name {
  font-family: var(--mono);
  font-size: clamp(42px, 7vw, 88px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text);
  opacity: 0;
  animation: fadeUp 0.6s 0.35s forwards;
}

.hero-name .cursor {
  display: inline-block;
  width: 4px;
  height: 0.85em;
  background: var(--green);
  margin-left: 6px;
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}

.hero-role {
  font-family: var(--mono);
  font-size: clamp(16px, 2.5vw, 22px);
  color: var(--text-dim);
  margin-top: 16px;
  opacity: 0;
  animation: fadeUp 0.6s 0.5s forwards;
}

.hero-terminal-line {
  display: flex;
  align-items: center;
  margin-top: 20px;
  font-family: var(--mono);
  font-size: 14px;
  opacity: 0;
  animation: fadeUp 0.6s 0.55s forwards;
}
.htl-prompt { color: var(--green); margin-right: 6px; }
.htl-text { color: var(--text-dim); }
.htl-cursor {
  display: inline-block;
  width: 8px; height: 15px;
  background: var(--green);
  margin-left: 2px;
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}

.hero-role .highlight { color: var(--green); }

.hero-desc {
  margin-top: 32px;
  max-width: 560px;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.8;
  opacity: 0;
  animation: fadeUp 0.6s 0.65s forwards;
}

.hero-cta {
  display: flex;
  gap: 16px;
  margin-top: 48px;
  opacity: 0;
  animation: fadeUp 0.6s 0.8s forwards;
}

.btn-primary {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  padding: 12px 28px;
  background: var(--green);
  color: #000;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  display: inline-block;
}

.btn-primary:hover {
  background: var(--green-dim);
  transform: translateY(-1px);
}

.btn-ghost {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  padding: 12px 28px;
  background: transparent;
  color: var(--green);
  border: 1px solid var(--green);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  display: inline-block;
}

.btn-ghost:hover {
  background: var(--green-muted);
  transform: translateY(-1px);
}

.hero-stats {
  display: flex;
  gap: 48px;
  margin-top: 72px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  opacity: 0;
  animation: fadeUp 0.6s 0.95s forwards;
}

.stat-val {
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 700;
  color: var(--green);
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  letter-spacing: 0.05em;
}

/* ── SECTION COMMON ── */
section {
  padding: 100px 48px;
  max-width: 1100px;
  margin: 0 auto;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 64px;
}

.section-tag {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--green);
  letter-spacing: 0.15em;
}

.section-title {
  font-family: var(--mono);
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 700;
  color: var(--text);
}

.section-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

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

.skill-group {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 28px;
  transition: border-color 0.2s, background 0.2s;
  opacity: 0;
  transform: translateY(20px);
}

.skill-group.visible {
  animation: fadeUp 0.5s forwards;
}

.skill-group:hover {
  border-color: rgba(0,255,136,0.3);
  background: var(--bg3);
}

.skill-cat {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--green);
  margin-bottom: 20px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tag {
  font-family: var(--mono);
  font-size: 12px;
  padding: 5px 12px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  transition: all 0.2s;
  display: inline-block;
  white-space: nowrap;
}

.skill-tag:hover {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-muted);
}

/* ── EXPERIENCE ── */
.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 1px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 56px;
  opacity: 0;
  transform: translateX(-16px);
}

.timeline-item.visible {
  animation: fadeRight 0.5s forwards;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -36px;
  top: 6px;
  width: 8px;
  height: 8px;
  border: 1px solid var(--green);
  background: var(--bg);
  transform: rotate(45deg);
}

.timeline-item:first-child::before {
  background: var(--green);
}

.timeline-date {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--green);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.timeline-company {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.timeline-role {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  margin-bottom: 16px;
}

.timeline-desc {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.75;
  max-width: 620px;
}

.timeline-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}

.timeline-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: 660px;
}

.timeline-list li {
  position: relative;
  padding-left: 22px;
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.75;
  margin-bottom: 8px;
}

.timeline-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--green);
  font-family: var(--mono);
  font-size: 12px;
}

.timeline-list li strong {
  color: var(--green);
  font-weight: 600;
}

.chip {
  font-family: var(--mono);
  font-size: 11px;
  padding: 3px 10px;
  background: var(--green-muted);
  border: 1px solid rgba(0,255,136,0.2);
  color: var(--green);
}

/* ── EDUCATION ── */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2px;
}

.edu-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 32px;
  transition: border-color 0.2s;
  opacity: 0;
  transform: translateY(20px);
}

.edu-card.visible {
  animation: fadeUp 0.5s forwards;
}

.edu-card:hover { border-color: rgba(0,255,136,0.3); }

.edu-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.edu-logo { height: 28px; width: auto; opacity: 0.85; }

.edu-degree {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.edu-school {
  font-size: 13px;
  color: var(--green);
  margin-bottom: 6px;
}

.edu-year {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
}

.edu-school-link {
  text-decoration: none;
  transition: color 0.2s;
}

.edu-school-link:hover { color: var(--green-dim); }

.edu-powered {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-top: 10px;
}

/* ── CONTACT ── */
#contact {
  border-top: 1px solid var(--border);
}

.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.contact-left h2 {
  font-family: var(--mono);
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 20px;
}

.contact-left h2 span { color: var(--green); }

.contact-left p {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.8;
  max-width: 380px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 40px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--bg2);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: all 0.2s;
  color: var(--text);
}

.contact-link:hover {
  border-color: var(--green);
  background: var(--green-muted);
  transform: translateX(4px);
}

.contact-link-icon {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--green);
  min-width: 80px;
}

.contact-link-label {
  font-size: 14px;
  color: var(--text-dim);
}

.contact-link-arrow {
  margin-left: auto;
  font-family: var(--mono);
  color: var(--text-muted);
  transition: color 0.2s;
}

.contact-link:hover .contact-link-arrow { color: var(--green); }

/* Terminal window on right */
.terminal-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
}

.t-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}

.t-dot.red { background: #ff5f57; }
.t-dot.yellow { background: #febc2e; }
.t-dot.green { background: #28c840; }

.terminal-title {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 8px;
}

.terminal-body {
  padding: 24px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 2;
  min-height: 260px;
}

.t-prompt { color: var(--green); }
.t-cmd { color: var(--text); }
.t-out { color: var(--text-dim); }
.t-str { color: #ffd580; }
.t-num { color: #d4bfff; }
.t-key { color: var(--green-dim); }
.t-cursor-line { display: inline-block; width: 8px; height: 14px; background: var(--green); vertical-align: middle; animation: blink 1s step-end infinite; }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

footer p {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
}

footer span { color: var(--green); }

.footer-link {
  color: var(--green);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-link:hover { color: var(--green-dim); }

/* ── TWEAKS PANEL ── */
#tweaks-panel {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 260px;
  background: var(--bg2);
  border: 1px solid var(--border);
  z-index: 1000;
  display: none;
  overflow: hidden;
}

#tweaks-panel.open { display: block; }

.tweaks-header {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--green);
  letter-spacing: 0.15em;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg3);
}

.tweak-row {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.tweak-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.tweak-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tweak-btn {
  font-family: var(--mono);
  font-size: 11px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.15s;
}

.tweak-btn:hover, .tweak-btn.active {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-muted);
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeRight {
  from { opacity: 0; transform: translateX(-16px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  nav { padding: 0 24px; }
  #hero, section { padding-left: 24px; padding-right: 24px; }
  .contact-wrap { grid-template-columns: 1fr; gap: 40px; }
  footer { flex-direction: column; gap: 12px; text-align: center; }
  .hero-stats { gap: 28px; flex-wrap: wrap; }
  .nav-links { display: none; }
}
