/* ── TOKENS ── */
:root {
  --bg:           #0d1117;
  --surface:      #161b22;
  --surface2:     #1c2128;
  --border:       #21262d;
  --accent:       #00ff9d;
  --accent-dim:   #00cc7a;
  --accent-glow:  rgba(0,255,157,0.15);
  --text:         #e6edf3;
  --text-muted:   #8b949e;
  --text-dim:     #6e7681;
  --mono:         'Share Tech Mono', 'Courier New', monospace;
  --sans:         'DM Sans', Arial, sans-serif;
}

/* ── RESET ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent-dim); border-radius: 2px; }

/* ── BINARY RAIN CANVAS ── */
canvas#binary-rain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.07;
}

/* ── GRID LINES (subtle background texture) ── */
body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent, transparent 79px,
    rgba(0,255,157,0.018) 79px, rgba(0,255,157,0.018) 80px
  );
}

/* ── CONTAINER ── */
.container {
  position: relative; z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 52px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 40px);
  background: rgba(13,17,23,0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: var(--mono);
  font-size: 15px; color: var(--accent); text-decoration: none; letter-spacing: 0.05em;
}
.nav-logo span { color: var(--text-muted); }
.nav-links { display: flex; gap: 24px; list-style: none; }
.nav-links a {
  font-family: var(--mono); font-size: 12px;
  color: var(--text-muted); text-decoration: none;
  letter-spacing: 0.1em; text-transform: uppercase;
  transition: color .2s;
  position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 1px; background: var(--accent); transition: width .25s;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::after { width: 100%; }
.nav-skills { display: none; }

/* ── LANG TOGGLE ── */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 16px;
  flex-shrink: 0;
}
.ltb {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  transition: color .2s;
  line-height: 1;
}
.ltb:hover { color: var(--accent); }
.ltb.active { color: var(--accent); }
.ltb:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
.ltb-sep {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  user-select: none;
}
.scrambling { color: var(--accent) !important; font-family: var(--mono) !important; }

/* ── PANEL (framed card) ── */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  position: relative;
}

/* ── HERO ── */
.hero-panel {
  margin-top: 68px;
  padding: 32px 36px 28px;
  border-left: 3px solid var(--accent);
}
.hero-panel::before {
  content: '';
  position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(
    90deg,
    transparent, transparent 59px,
    rgba(0,255,157,0.015) 59px, rgba(0,255,157,0.015) 60px
  );
}
.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 20px;
}
.terminal-line {
  font-family: var(--mono); font-size: 14px;
  color: var(--accent); letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.hero-name {
  font-family: var(--mono);
  font-size: clamp(36px, 6vw, 64px);
  color: var(--text); line-height: 1.05; letter-spacing: -0.02em;
}
.hero-name em { color: var(--accent); font-style: normal; }
.hero-location {
  text-align: right;
  font-family: var(--mono);
  flex-shrink: 0;
}
.loc-cmd { font-size: 13px; color: var(--accent); margin-bottom: 3px; }
.loc-value { font-size: 15px; color: var(--text-muted); }

.hero-bio {
  font-size: 16px; color: var(--text-muted);
  line-height: 1.7;
  position: relative;
}

/* ── CURSOR ── */
.cursor {
  display: inline-block; width: 3px; height: 0.82em;
  background: var(--accent); margin-left: 5px; vertical-align: middle;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* ── SECTION LABEL ── */
.section-label {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.section-label .sl-prefix { color: var(--text-dim); }
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── CONNECT ── */
#connect {
  margin-top: 24px;
  margin-bottom: 24px;
}
.connect-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.connect-card {
  display: block; padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  text-decoration: none;
  transition: border-color .2s, background .2s, transform .2s;
}
.connect-card:hover { background: var(--surface2); transform: translateY(-2px); border-color: rgba(0,255,157,.4); }
.c-title  { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.c-path   { font-family: var(--mono); font-size: 11px; color: var(--accent-dim); margin-bottom: 4px; }
.c-value  { font-family: var(--mono); font-size: 12px; color: var(--text-muted); }

/* ── TWO-COLUMN LAYOUT ── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}

/* ── MAIN COLUMN ── */
.col-main section { margin-bottom: 28px; }
.col-main section:last-child { margin-bottom: 0; }

/* ── EXPERIENCE CARDS ── */
.exp-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  padding: 18px 20px;
  margin-bottom: 10px;
  transition: background .18s;
}
.exp-card:last-child { margin-bottom: 0; }
.exp-card:hover { background: var(--surface2); }

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}
.exp-role     { font-size: 17px; font-weight: 600; color: var(--text); line-height: 1.25; }
.exp-date     { font-family: var(--mono); font-size: 12px; color: var(--accent-dim); white-space: nowrap; margin-left: 12px; }
.exp-company  { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }

.exp-bullets { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.exp-bullets li {
  font-size: 14px; color: var(--text-dim);
  padding-left: 24px; position: relative; line-height: 1.5;
}
.exp-bullets li::before {
  content: '>_'; font-family: var(--mono); color: var(--accent);
  font-size: 11px; position: absolute; left: 0; top: 3px;
}

/* ── EDUCATION ── */
.edu-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  padding: 18px 20px;
  margin-bottom: 10px;
}
.edu-card:last-child { margin-bottom: 0; }
.edu-school { font-size: 17px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.edu-degree { font-size: 15px; color: var(--text-muted); margin-bottom: 4px; }
.edu-meta   { font-family: var(--mono); font-size: 12px; color: var(--accent-dim); }
.edu-desc   { font-size: 13px; color: var(--text-muted); margin-top: 10px; }
.edu-topics { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.edu-tag {
  font-family: var(--mono); font-size: 11px; padding: 5px 10px;
  border: 1px solid var(--border); color: var(--text-dim);
  background: rgba(0,255,157,.03); line-height: 1.4;
}
.edu-tag-prefix { color: var(--accent); margin-right: 2px; }
.edu-tag-skills { color: var(--accent-dim); }

/* ── SIDEBAR ── */
.col-side {
  position: sticky;
  top: 68px;
}

.side-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 20px;
  margin-bottom: 16px;
}
.side-panel:last-child { margin-bottom: 0; }

.side-panel .section-label {
  margin-bottom: 14px;
}

/* ── SKILL GROUPS ── */
.skill-group { margin-bottom: 14px; }
.skill-group:last-child { margin-bottom: 0; }
.sg-label {
  font-family: var(--mono); font-size: 10px; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 6px;
}
.skill-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.skill-tag {
  font-family: var(--mono); font-size: 12px; padding: 4px 10px;
  border: 1px solid rgba(0,255,157,.25); color: var(--accent-dim); background: rgba(0,255,157,.04);
  transition: border-color .18s, color .18s, background .18s;
}
.skill-tag:hover { border-color: var(--accent); color: var(--accent); background: rgba(0,255,157,.09); }
.skill-tag.soft { border-color: var(--border); color: var(--text-dim); background: transparent; }
.skill-tag.soft:hover { border-color: var(--text-muted); color: var(--text-muted); }

/* ── LANGUAGES ── */
.lang-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.lang-item:first-of-type { border-top: 1px solid var(--border); }
.lang-item:last-child { border-bottom: none; }
.lang-name  { font-size: 14px; color: var(--text); }
.lang-level { font-family: var(--mono); font-size: 12px; color: var(--accent-dim); }

/* ── CERTIFICATIONS ── */
.cert-card {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  background: rgba(0,255,157,.03);
  margin-bottom: 10px;
}
.cert-card:last-child { margin-bottom: 0; }
.cert-card--link {
  display: block; text-decoration: none;
  transition: background .2s, border-color .2s;
}
.cert-card--link:hover { background: rgba(0,255,157,.06); border-color: rgba(0,255,157,.4); }
.cert-name   { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.cert-issuer { font-family: var(--mono); font-size: 12px; color: var(--text-dim); }
.cert-verify {
  font-family: var(--mono); font-size: 11px; color: var(--accent-dim);
  margin-top: 6px; letter-spacing: 0.04em;
  transition: color .2s;
}
.cert-card--link:hover .cert-verify { color: var(--accent); }
.cert-card--has-badge { display: flex; align-items: center; gap: 12px; }
.cert-badge { width: 48px; height: 48px; flex-shrink: 0; border-radius: 4px; }
.cert-info { flex: 1; min-width: 0; }

/* ── FOOTER ── */
footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 24px clamp(16px, 4vw, 40px);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
}
.footer-logo { font-family: var(--mono); font-size: 14px; color: var(--text-dim); }
.footer-logo span { color: var(--accent); }
.footer-note { font-family: var(--mono); font-size: 12px; color: var(--text-dim); }

/* ── SECTION HIGHLIGHT ON NAV JUMP ── */
@keyframes sectionFlash {
  0%   { box-shadow: inset 0 0 0 1px var(--accent), 0 0 20px var(--accent-glow); }
  100% { box-shadow: none; }
}
.section-highlight {
  animation: sectionFlash 1.2s ease-out forwards;
}

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

/* ── MOBILE ── */
@media (max-width: 900px) {
  .two-col {
    grid-template-columns: 1fr;
  }
  .col-side {
    position: static;
  }
  .connect-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .nav-skills { display: list-item; }
}

@media (max-width: 600px) {
  .nav-links { display: none; }
  .hero-panel { padding: 24px 20px 20px; }
  .hero-top { flex-direction: column; align-items: flex-start; }
  .hero-location { text-align: left; margin-top: 12px; }
  .hero-name { font-size: 32px; }
  .connect-grid { grid-template-columns: 1fr; }
  .exp-header { flex-direction: column; }
  .exp-date { margin-left: 0; margin-top: 2px; }
  .footer-note { text-align: left; }
}
