/* ============ Tokens ============ */
:root{
  --bg-0: #0F172A;
  --bg-1: #1E293B;
  --bg-2: #253449;
  --bg-3: #2D3E58;
  --line: #334155;
  --line-soft: #24304A;
  --text: #F8FAFC;
  --text-dim: #94A3B8;
  --text-faint: #64748B;

  --accent: #2563EB;        /* primary — solid fills, buttons, active bars */
  --accent-2: #38BDF8;      /* secondary — text/links/icons on dark bg */
  --accent-light: #3B82F6;  /* hover state for solid accent fills */
  --accent-dim: #2E4C86;    /* subtle borders */
  --accent-wash: rgba(37, 99, 235, 0.14);
  --ink: #F8FAFC;           /* text sitting on top of a solid accent fill */

  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body{
  margin:0;
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

a{ color: inherit; text-decoration: none; }

::selection{ background: var(--accent); color: var(--ink); }

a:focus-visible, button:focus-visible{
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce){
  *{ animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ============ Top navbar ============ */
.navbar{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.navbar-inner{
  max-width: 1000px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.nav-logo{
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 14px;
  color: var(--accent-2);
  flex-shrink: 0;
}
.nav-links{
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  justify-content: flex-end;
}
.nav-link{
  all: unset;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--text-dim);
  padding: 8px 14px;
  border-radius: 7px;
  white-space: nowrap;
}
.nav-link:hover{ color: var(--text); background: var(--bg-1); }
.nav-link.active{
  color: var(--accent-2);
  background: var(--accent-wash);
}
.nav-resume{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: var(--ink);
  margin-left: 6px;
}
.nav-resume:hover{ background: var(--accent-light); color: var(--ink); }
.nav-resume-icon{ width: 12px; height: 12px; }

.nav-toggle{
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  background: var(--bg-1);
  border: 1px solid var(--accent-dim);
  border-radius: 10px;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle:hover{ background: var(--accent-wash); border-color: var(--accent-2); }
.nav-toggle span{
  display: block;
  width: 20px;
  height: 2.5px;
  background: var(--accent-2);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle.open span:nth-child(1){ transform: translateY(8.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2){ opacity: 0; }
.nav-toggle.open span:nth-child(3){ transform: translateY(-8.5px) rotate(-45deg); }

/* ============ Layout ============ */
.app{ display: block; }
.content{
  max-width: 880px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* Profile strip (About tab only) */
.profile-strip{
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 36px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
}
.avatar{
  width: 76px;
  height: 76px;
  border-radius: 999px;
  border: 1.5px solid var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 22px;
  color: var(--accent-2);
  background: var(--accent-wash);
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  transition: border-color .15s ease, transform .15s ease;
}
.avatar:hover{ border-color: var(--accent-2); transform: scale(1.03); }
.avatar-img{
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 999px;
}
.profile-info{ flex: 1; min-width: 200px; }
.name{
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
}
.role{
  font-family: var(--mono);
  color: var(--accent-2);
  font-size: 13.5px;
  font-weight: 500;
  margin: 0 0 6px;
}
.role-sub{
  color: var(--text-dim);
  font-size: 13px;
  margin: 0;
}

.profile-meta{
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
.meta-list{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}
.meta-list li{
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-dim);
}
.meta-list a:hover{ color: var(--accent-2); }
.meta-icon{
  width: 15px; height: 15px;
  flex-shrink: 0;
  color: var(--text-faint);
}

.social-row{ display: flex; gap: 10px; }
.social-link{
  width: 32px; height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text-dim);
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.social-link svg{ width: 15px; height: 15px; }
.social-link:hover{
  color: var(--accent-2);
  border-color: var(--accent-dim);
  background: var(--accent-wash);
}

/* Hero */
.hero{
  padding: 40px 0 36px;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--line-soft);
}
.terminal-line{
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 14px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.prompt-path{ color: var(--text-faint); }
.prompt-dollar{ color: var(--text-faint); }
.terminal-typed{
  color: var(--accent-2);
  font-weight: 600;
  text-shadow: 0 0 12px var(--accent-wash);
}
.cursor{
  color: var(--accent-2);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink{ 50%{ opacity: 0; } }
.hero-line{
  font-size: 32px;
  line-height: 1.28;
  font-weight: 700;
  letter-spacing: -0.015em;
  max-width: 22ch;
  margin: 0 0 14px;
}
.hero-context{
  font-size: 15.5px;
  color: var(--text-dim);
  max-width: 52ch;
  margin: 0 0 24px;
  line-height: 1.6;
}
.hero-actions{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.btn-primary, .btn-ghost{
  all: unset;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  padding: 11px 20px;
  border-radius: 8px;
  box-sizing: border-box;
}
.btn-primary{
  background: var(--accent);
  color: var(--ink);
}
.btn-primary:hover{ background: var(--accent-light); }
.btn-ghost{
  border: 1px solid var(--line);
  color: var(--text);
}
.btn-ghost:hover{ border-color: var(--accent-dim); color: var(--accent-2); }

/* Hero code snippet card */
.code-card{
  margin-top: 28px;
  max-width: 380px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.code-card-bar{
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-soft);
}
.code-dot{
  width: 8px; height: 8px;
  border-radius: 999px;
  background: var(--line);
}
.code-card-body{
  margin: 0;
  padding: 16px 18px 18px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-dim);
  overflow-x: auto;
}
.tok-kw{ color: var(--accent-2); }
.tok-cls{ color: #A78BFA; font-weight: 600; }
.tok-str{ color: #4ADE80; }
.tok-bool{ color: #FB923C; }

/* Numbered section labels */
.section-eyebrow{
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--accent-2);
  letter-spacing: 0.04em;
  margin: 0 0 10px;
}
.section-eyebrow-top{ margin-top: 0; }
.section-title.spaced-tight{ margin-top: 4px; }

.panel{ display: none; }
.panel.active{
  display: block;
  animation: fadein .28s ease;
}
@keyframes fadein{
  from{ opacity: 0; transform: translateY(6px); }
  to{ opacity: 1; transform: translateY(0); }
}

.section-title{
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}
.section-title.spaced{ margin-top: 48px; }
.section-hint{
  color: var(--text-dim);
  font-size: 14.5px;
  margin: -8px 0 20px;
}

.gutter-block{
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 20px;
  margin-bottom: 8px;
}
.gutter{
  display: flex;
  flex-direction: column;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-faint);
  line-height: 1.9;
  padding-top: 40px;
  text-align: right;
}
.lead{
  font-size: 16px;
  color: var(--text-dim);
  max-width: 62ch;
  line-height: 1.75;
}

.exp-card{
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px 22px;
}
.exp-head{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.exp-head h3{ font-size: 16px; margin: 0 0 2px; }
.exp-org{ color: var(--accent-2); font-size: 13.5px; margin: 0; font-family: var(--mono); }
.exp-date{
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text-faint);
  white-space: nowrap;
}
.bullet-list{
  margin: 0;
  padding-left: 18px;
  color: var(--text-dim);
  font-size: 14.5px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bullet-list li::marker{ color: var(--accent-2); }

/* Skills */
.skills-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}
.skill-cat{
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  background: var(--bg-1);
}
.skill-cat h4{
  font-family: var(--mono);
  font-size: 12px;
  text-transform: lowercase;
  color: var(--text-faint);
  margin: 0 0 12px;
  font-weight: 500;
}
.chip-row{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip{
  position: relative;
  font-size: 12.5px;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  color: var(--text-dim);
  background: var(--bg-2);
  cursor: pointer;
}
.chip:hover, .chip.open{
  color: var(--accent-2);
  border-color: var(--accent-dim);
}
.chip .chip-tip{
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-3);
  border: 1px solid var(--accent-dim);
  color: var(--text);
  font-family: var(--sans);
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 7px;
  white-space: nowrap;
  z-index: 10;
}
.chip:hover .chip-tip, .chip.open .chip-tip{ display: block; }

/* Education */
.edu-list{ display: flex; flex-direction: column; gap: 2px; }
.edu-item{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}
.edu-item h3{ font-size: 15px; margin: 0 0 3px; }
.edu-item .exp-org{ color: var(--text-dim); font-family: var(--sans); font-size: 13px; }
.edu-item .exp-date{ color: var(--text-faint); }

/* Projects */
.project-list{
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.project-card{
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 26px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  background: var(--bg-1);
  transition: border-color .15s ease;
}
.project-card:hover{ border-color: var(--accent-dim); }
.project-thumb{
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
}
.project-thumb svg{ width: 56%; height: 56%; }
.project-thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.project-head{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.project-head h3{ font-size: 18px; margin: 0 0 4px; }
.project-title-link{ color: var(--text); }
.project-title-link:hover{ color: var(--accent-2); }
.project-tagline{ color: var(--text-dim); font-size: 13.5px; margin: 0 0 16px; line-height: 1.6; }

.project-links{ display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.project-cta{
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 8px;
  white-space: nowrap;
}
.project-cta-primary{
  background: var(--accent);
  color: var(--ink);
}
.project-cta-primary:hover{ background: var(--accent-light); }
.project-cta-ghost{
  border: 1px solid var(--line);
  color: var(--text-dim);
}
.project-cta-ghost:hover{ color: var(--accent-2); border-color: var(--accent-dim); background: var(--accent-wash); }
.project-cta svg{ width: 14px; height: 14px; }

.tech-row{
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 14px;
}
.tech-tag{
  font-size: 11.5px;
  font-family: var(--mono);
  color: var(--text-faint);
  border: 1px solid var(--line-soft);
  padding: 3px 9px;
  border-radius: 5px;
}

.read-more-btn{
  all: unset;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.read-more-btn:hover{ color: var(--accent-2); }
.read-more-arrow{ font-size: 11px; }

.project-bullets{
  margin: 0;
  padding-left: 18px;
  color: var(--text-dim);
  font-size: 13.5px;
  display: none;
  flex-direction: column;
  gap: 6px;
  max-height: 0;
  overflow: hidden;
}
.project-bullets.expanded{
  display: flex;
  max-height: none;
  margin-top: 14px;
  animation: fadein .2s ease;
}
.project-bullets li::marker{ color: var(--accent-2); }

/* ============ Site footer / contact ============ */
.site-footer{
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid var(--line-soft);
  scroll-margin-top: 90px;
}
.footer-heading{
  font-size: 30px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 28px;
  max-width: 16ch;
}
.footer-email{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 17px;
  color: var(--accent-2);
  padding-bottom: 3px;
  border-bottom: 1px solid var(--accent-dim);
  margin-bottom: 28px;
}
.footer-email:hover{ color: var(--text); border-color: var(--accent-2); }
.footer-email-icon{ width: 16px; height: 16px; }

.footer-links{
  display: flex;
  gap: 20px;
  margin-bottom: 40px;
}
.footer-links a{
  font-size: 14px;
  color: var(--text-dim);
  border-bottom: 1px solid transparent;
}
.footer-links a:hover{ color: var(--accent-2); border-color: var(--accent-dim); }

.footer-bottom{
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-faint);
}

/* ============ Photo lightbox ============ */
.lightbox{
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 40px;
  animation: fadein .18s ease;
}
.lightbox.open{ display: flex; }
.lightbox-img{
  max-width: min(90vw, 520px);
  max-height: 85vh;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  object-fit: contain;
}
.lightbox-close{
  all: unset;
  position: absolute;
  top: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text-dim);
  cursor: pointer;
  background: var(--bg-1);
}
.lightbox-close:hover{ color: var(--accent-2); border-color: var(--accent-dim); }
.lightbox-close svg{ width: 18px; height: 18px; }

/* ============ Responsive ============ */
@media (max-width: 800px){
  .nav-links{
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg-1);
    border-bottom: 1px solid var(--line);
    padding: 10px;
    gap: 4px;
  }
  .nav-links.open{ display: flex; }
  .nav-link{ text-align: left; padding: 12px 14px; }
  .nav-resume{ margin-left: 0; justify-content: center; }
  .nav-toggle{ display: flex; }

  .content{ padding: 32px 20px 60px; }
  .profile-strip{ flex-direction: column; align-items: flex-start; }
  .profile-meta{ align-items: flex-start; width: 100%; }
  .meta-list{ align-items: flex-start; }
  .gutter{ display: none; }
  .gutter-block{ grid-template-columns: 1fr; }
  .project-card{ grid-template-columns: 1fr; }
  .project-thumb{ max-width: 160px; }
  .footer-heading{ font-size: 24px; max-width: 100%; }
  .footer-bottom{ flex-direction: column; }
}
