@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;700&family=Inter:wght@300;400;500;600;700&display=swap');

/* ─── Design tokens ─────────────────────────────────────────── */
:root {
  --bg:     #0d1117;
  --bg2:    #161b22;
  --bg3:    #21262d;
  --border: #30363d;
  --text:   #e6edf3;
  --text2:  #8b949e;
  --green:  #39d353;
  --cyan:   #58a6ff;
  --orange: #f78166;
  --purple: #bc8cff;
  --yellow: #e3b341;
}

/* ─── Reset ─────────────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* ─── Base ──────────────────────────────────────────────────── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Scanline overlay */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 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: 1000;
}

/* ─── Content wrapper ───────────────────────────────────────── */
.content-wrap {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  margin: 0 auto;
  /* subtle frosted side boundary so stars peek around the edges */
}

/* ─── Nav ───────────────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  background: rgba(13,17,23,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 12px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
}

.nav-logo {
  font-family: 'JetBrains Mono', monospace;
  color: var(--green);
  font-size: 14px;
}
.nav-logo span { color: var(--text2); }

nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
}

nav a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text2);
  text-decoration: none;
  transition: color 0.2s;
}
nav a:hover      { color: var(--cyan); }
nav a.yt-nav     { color: #ff4444; }
nav a.yt-nav:hover { color: #ff6666; }

/* ─── Hero ──────────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 64px;
  align-items: center;
  padding: 80px 40px 70px;
}

.hero-left {
  display: flex;
  flex-direction: column;
}

/* ─── Hero photo ────────────────────────────────────────────── */
.hero-right {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-photo-wrap {
  position: relative;
  width: 280px;
  flex-shrink: 0;
  /* no overflow:hidden here — keeps bracket pseudo-elements visible */
}

.hero-photo-inner {
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(88, 166, 255, 0.35);
  box-shadow:
    0 0 0 4px rgba(88, 166, 255, 0.06),
    0 0 24px rgba(88, 166, 255, 0.18),
    0 0 64px rgba(88, 166, 255, 0.08);
  position: relative;
  z-index: 1;
}

.hero-photo {
  display: block;
  width: 100%;
  height: 300px;
  object-fit: cover;
  object-position: center 8%;
}

/* Corner accent lines */
.hero-photo-wrap::before,
.hero-photo-wrap::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--cyan);
  border-style: solid;
  z-index: 2;
}
.hero-photo-wrap::before {
  top: -6px; left: -6px;
  border-width: 2px 0 0 2px;
  border-radius: 3px 0 0 0;
}
.hero-photo-wrap::after {
  bottom: -6px; right: -6px;
  border-width: 0 2px 2px 0;
  border-radius: 0 0 3px 0;
}

/* Ambient glow blob behind the photo */
.hero-photo-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(ellipse at center, rgba(88,166,255,0.12) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
}

.hero-prompt {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--green);
  margin-bottom: 16px;
}
.hero-prompt::before { content: '> '; color: var(--text2); }

.hero h1 {
  font-size: clamp(42px, 7vw, 72px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 16px;
}
.hero h1 .accent { color: var(--cyan); }

.hero-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  color: var(--text2);
  margin-bottom: 32px;
}
.hero-sub .highlight { color: var(--orange); }

.hero-desc {
  max-width: 560px;
  color: var(--text2);
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 40px;
}

.hero-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ─── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid;
}

.btn-primary {
  background: var(--cyan);
  color: var(--bg);
  border-color: var(--cyan);
  font-weight: 700;
}
.btn-primary:hover { background: transparent; color: var(--cyan); }

.btn-ghost {
  color: var(--text2);
  border-color: var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--text2); }

/* ─── Hero stats ────────────────────────────────────────────── */
.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.stat-num {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
}
.stat-num span { color: var(--green); }

.stat-label {
  font-size: 12px;
  color: var(--text2);
  margin-top: 2px;
  font-family: 'JetBrains Mono', monospace;
}

/* ─── Sections (shared) ─────────────────────────────────────── */
section {
  padding: 80px 40px;
  border-top: 1px solid var(--border);
}

.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--green);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-label::before { content: '// '; color: var(--text2); }

h2 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 40px;
}

/* ─── Skills ────────────────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
}

.skill-tag {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text2);
  transition: all 0.2s;
  text-align: center;
}
.skill-tag:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(88,166,255,0.05);
}
.skill-tag.core {
  border-color: rgba(88,166,255,0.3);
  color: var(--cyan);
  background: rgba(88,166,255,0.08);
}

/* ─── Experience timeline ───────────────────────────────────── */
.exp-list { display: flex; flex-direction: column; gap: 0; }

.exp-item {
  position: relative;
  padding: 28px 0 28px 28px;
  border-left: 2px solid var(--border);
}

.exp-item::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 36px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--cyan);
}
.exp-item.current::before { background: var(--green); border-color: var(--green); }

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.exp-title { font-weight: 600; font-size: 16px; }

.exp-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text2);
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.exp-item.current .exp-date { color: var(--green); border-color: rgba(57,211,83,0.3); }

.exp-company {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--cyan);
  margin-bottom: 12px;
}
.exp-company .location { color: var(--text2); }

.exp-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.exp-bullets li {
  font-size: 14px;
  color: var(--text2);
  padding-left: 16px;
  position: relative;
  line-height: 1.6;
}
.exp-bullets li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--green);
  font-size: 10px;
  top: 4px;
}

/* ─── Open Source ───────────────────────────────────────────── */
.oss-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.oss-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  transition: all 0.2s;
}
.oss-card:hover {
  border-color: var(--purple);
  transform: translateY(-2px);
}

.oss-icon { font-size: 20px; margin-bottom: 10px; }

.oss-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--purple);
  font-weight: 500;
}

.oss-tag {
  display: inline-block;
  margin-top: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text2);
  background: var(--bg3);
  padding: 2px 8px;
  border-radius: 20px;
}

/* ─── YouTube section ───────────────────────────────────────── */
.yt-command {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 20px;
}
.yt-command .prompt { color: var(--green); }
.yt-command .cmd    { color: var(--text); }
.yt-command .flag   { color: var(--cyan); }
.yt-command .val    { color: var(--orange); }

.yt-terminal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 24px;
}

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

.yt-dots { display: flex; gap: 6px; }
.yt-dot  { width: 10px; height: 10px; border-radius: 50%; }
.yt-dot.red    { background: #ff5f57; }
.yt-dot.yellow { background: #febc2e; }
.yt-dot.green  { background: #28c840; }

.yt-bar-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text2);
  margin-left: 4px;
}

.yt-body {
  padding: 28px 32px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: start;
}

.yt-output-line {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text2);
  margin-bottom: 6px;
}
.yt-output-line .key { color: var(--green); min-width: 80px; display: inline-block; }
.yt-output-line .sep { color: var(--text2); margin: 0 8px; }
.yt-output-line a    { color: var(--cyan); text-decoration: none; }
.yt-output-line a:hover { text-decoration: underline; }

.yt-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.yt-name .play { color: #ff4444; margin-right: 8px; }

.yt-handle {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--cyan);
  margin-bottom: 20px;
}

.yt-desc-text {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: 20px;
}

.yt-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 24px;
}

.yt-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text2);
  background: var(--bg3);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 4px;
}
.yt-tag.hot {
  color: var(--orange);
  border-color: rgba(247,129,102,0.3);
  background: rgba(247,129,102,0.06);
}

.yt-visit-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  color: #ff4444;
  background: rgba(255,68,68,0.08);
  border: 1px solid rgba(255,68,68,0.35);
  padding: 9px 18px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s;
}
.yt-visit-btn:hover {
  background: rgba(255,68,68,0.15);
  border-color: rgba(255,68,68,0.6);
  color: #ff6666;
}

.yt-stats-block {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  min-width: 160px;
}

.yt-stat-item { text-align: center; }

.yt-stat-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 28px;
  font-weight: 700;
  color: #ff4444;
  line-height: 1;
}
.yt-stat-num span { color: var(--green); }

.yt-stat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text2);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.yt-stat-divider { height: 1px; background: var(--border); }
.yt-stat-num.cyan   { color: var(--cyan);   font-size: 18px; }
.yt-stat-num.purple { color: var(--purple); font-size: 18px; }

/* Hero stat — YouTube accent */
.stat-num.yt { color: #ff4444; }

/* ─── Contact section ───────────────────────────────────────── */
.contact-intro {
  color: var(--text2);
  max-width: 460px;
  margin-bottom: 28px;
  font-size: 15px;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-row {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--text2);
  display: flex;
  align-items: center;
  gap: 8px;
}

.contact-key       { color: var(--green); }
.contact-key.yt    { color: #ff4444; }
.contact-arrow     { color: var(--text2); }
.contact-val       { color: var(--text); }
.contact-val--link { color: var(--cyan); text-decoration: none; }
.contact-val--link:hover { text-decoration: underline; }

/* ─── Footer ────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 40px;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text2);
}
footer a { color: var(--cyan); text-decoration: none; }
.footer-links { margin-top: 8px; }
.footer-yt { color: #ff4444 !important; }

/* ─── YouTube output-line utility ───────────────────────────── */
.yt-output-line--spaced { margin-bottom: 20px; }
.text-main { color: var(--text); }

/* ─── Cursor blink ──────────────────────────────────────────── */
.cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--green);
  margin-left: 4px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

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

/* ─── Hamburger button (hidden on desktop) ──────────────────── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text2);
  border-radius: 2px;
  transition: all 0.25s ease;
  transform-origin: center;
}

/* Animate to X when open */
nav.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
nav.nav-open .nav-toggle span:nth-child(2) { opacity: 0; transform: scaleX(0); }
nav.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── Neon glow effects ─────────────────────────────────────── */

/* Stars canvas */
#stars-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Ambient color wash sits between canvas and content */
body::after {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse 600px 400px at 5% 10%, rgba(0,180,255,0.04) 0%, transparent 60%),
    radial-gradient(ellipse 500px 400px at 90% 80%, rgba(188,140,255,0.03) 0%, transparent 60%);
  pointer-events: none;
  z-index: 1;
}

/* Cursor glow */
.cursor {
  box-shadow: 0 0 8px rgba(88,166,255,0.8);
}

/* Section label green glow */
.section-label {
  text-shadow: 0 0 10px rgba(57,211,83,0.4);
}

/* Core skill tags — subtle cyan glow */
.skill-tag.core {
  box-shadow: 0 0 10px rgba(88,166,255,0.12), inset 0 0 8px rgba(88,166,255,0.04);
}
.skill-tag:hover {
  box-shadow: 0 0 14px rgba(88,166,255,0.25);
}

/* Active experience dot — green pulse */
.exp-item.current::before {
  box-shadow: 0 0 0 3px rgba(57,211,83,0.15), 0 0 12px rgba(57,211,83,0.4);
}

/* Hero stat numbers — very subtle white glow */
.stat-num {
  text-shadow: 0 0 20px rgba(230,237,243,0.12);
}
.stat-num.yt {
  text-shadow: 0 0 16px rgba(247,129,102,0.4);
}

/* YouTube terminal border glow */
.yt-terminal {
  box-shadow: 0 0 0 1px var(--border), 0 0 28px rgba(247,129,102,0.08);
}

/* Visit channel button glow on hover */
.yt-visit-btn:hover {
  box-shadow: 0 0 18px rgba(247,129,102,0.35);
}

/* Primary CTA button glow */
.btn-primary {
  box-shadow: 0 0 16px rgba(88,166,255,0.3);
}
.btn-primary:hover {
  box-shadow: 0 0 20px rgba(88,166,255,0.45);
}

/* ─── Responsive ────────────────────────────────────────────── */

/* Tablet — tighten spacing */
@media (max-width: 768px) {
  section { padding: 60px 28px; }
  .hero   { grid-template-columns: 1fr 220px; gap: 40px; padding: 64px 28px 52px; }

  h2 { font-size: 28px; margin-bottom: 32px; }

  .oss-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

  .hero-photo-wrap { width: 200px; }
}

/* Mobile — full treatment */
@media (max-width: 600px) {

  /* Nav */
  nav {
    padding: 0 20px;
    height: 52px;
    position: sticky;
    top: 0;
    z-index: 200;
  }

  .nav-toggle { display: flex; }

  nav ul {
    display: none;
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    padding: 4px 0 8px;
    z-index: 199;
  }

  nav.nav-open ul { display: flex; }

  nav ul li a {
    display: block;
    padding: 13px 20px;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
    color: var(--text2);
  }

  nav ul li:last-child a { border-bottom: none; }

  /* Hero */
  .hero {
    grid-template-columns: 1fr;
    padding: 40px 20px 44px;
    gap: 32px;
  }

  .hero-right { order: -1; }

  .hero-photo-wrap {
    width: 140px;
    margin: 0 auto;
  }

  .hero-photo-inner {
    height: 160px;
  }

  .hero-photo {
    height: 160px;
  }

  .hero h1 {
    font-size: clamp(36px, 10vw, 52px);
    letter-spacing: -1px;
    margin-bottom: 14px;
  }

  .hero-sub  { font-size: 14px; margin-bottom: 20px; }
  .hero-desc { font-size: 15px; margin-bottom: 28px; }

  .hero-links { gap: 10px; }
  .btn        { padding: 9px 16px; font-size: 12px; }

  .hero-stats {
    flex-wrap: wrap;
    gap: 0;
    margin-top: 40px;
    padding-top: 28px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    row-gap: 24px;
  }

  .stat-num   { font-size: 26px; }
  .stat-label { font-size: 11px; }

  /* Sections */
  section {
    padding: 52px 20px;
  }

  h2 {
    font-size: 24px;
    letter-spacing: -0.5px;
    margin-bottom: 24px;
  }

  /* Skills */
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .skill-tag { font-size: 11px; padding: 7px 8px; }

  /* Experience */
  .exp-item { padding: 20px 0 20px 22px; }

  .exp-header {
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
  }

  .exp-title  { font-size: 15px; }
  .exp-date   { font-size: 10px; }

  .exp-company { font-size: 12px; margin-bottom: 10px; }

  .exp-bullets li { font-size: 13px; }

  /* OSS */
  .oss-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .oss-card  { padding: 16px; }
  .oss-icon  { font-size: 18px; margin-bottom: 8px; }
  .oss-name  { font-size: 11px; }
  .oss-tag   { font-size: 10px; }

  /* YouTube */
  .yt-command {
    font-size: 11px;
    word-break: break-word;
    line-height: 1.8;
  }

  .yt-body {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px 18px;
  }

  .yt-name     { font-size: 17px; }
  .yt-handle   { font-size: 11px; }
  .yt-desc-text { font-size: 13px; }

  .yt-stats-block {
    flex-direction: row;
    justify-content: space-around;
    min-width: unset;
    padding: 16px;
  }

  .yt-stat-divider { width: 1px; height: auto; }
  .yt-stat-num     { font-size: 22px; }

  /* Contact */
  .contact-list { gap: 14px; }
  .contact-row  { font-size: 12px; flex-wrap: wrap; }
  .contact-key  { min-width: 64px; }

  /* Footer */
  footer { padding: 28px 20px; font-size: 11px; }
}
