/* ============================================
   TOKENS
============================================ */
:root{
  --paper:      #0B0E14;
  --paper-alt:  #10141D;
  --ink:        #E9ECF2;
  --ink-soft:   #A9AFBD;
  --slate:      #767E8F;
  --line:       rgba(255,255,255,0.09);
  --steel:      #5B8DEF;
  --steel-deep: #7FA5F5;
  --sage:       #4FA688;
  --sage-soft:  rgba(79,166,136,0.14);
  --amber:      #D9A85C;
  --card:       #141924;
  --shadow:     0 1px 2px rgba(0,0,0,0.2), 0 8px 24px rgba(0,0,0,0.28);
  --shadow-lg:  0 4px 14px rgba(0,0,0,0.28), 0 24px 48px rgba(0,0,0,0.38);
  --radius:     10px;
  --font-display: 'IBM Plex Sans', sans-serif;
  --font-body:    'IBM Plex Sans', sans-serif;
  --font-mono:    'DM Serif Text', serif;
}

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

html{ scroll-behavior: smooth; }

body{
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a{ color: inherit; text-decoration: none; }
ul{ list-style: none; }
img{ max-width: 100%; display: block; }

::selection{ background: var(--sage-soft); color: var(--steel-deep); }

:focus-visible{
  outline: 2px solid var(--steel);
  outline-offset: 3px;
  border-radius: 4px;
}

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

h1,h2,h3{ font-family: var(--font-display); color: var(--ink); letter-spacing: -0.01em; }

.eyebrow{
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--steel);
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}

/* ============================================
   NAV
============================================ */
.nav{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11,14,20,0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-inner{
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
}
.nav-brand .dot{ color: var(--steel); }

.nav-links{
  display: flex;
  gap: 32px;
}
.nav-links a{
  font-size: 0.92rem;
  color: var(--ink-soft);
  transition: color 0.15s ease;
  position: relative;
}
.nav-links a:hover{ color: var(--steel); }

.nav-cta{
  font-family: var(--font-mono);
  font-size: 0.95rem;
  padding: 9px 16px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.nav-cta:hover{
  background: var(--ink);
  color: var(--paper);
}

@media (max-width: 780px){
  .nav-links{ display: none; }
  .nav-inner{ padding: 16px 20px; }
}

/* ============================================
   HERO
============================================ */
.hero{
  position: relative;
  z-index: 1;
  padding: 80px 32px 100px;
}

.hero-inner{
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
}

.hero-copy h1{
  font-size: clamp(2.4rem, 4.2vw, 3.4rem);
  font-weight: 600;
  line-height: 1.08;
  margin-bottom: 22px;
}

.hero-sub{
  font-size: 1.08rem;
  color: var(--ink-soft);
  max-width: 46ch;
  margin-bottom: 32px;
}

.hero-actions{
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 9px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.18s ease;
  border: 1px solid transparent;
}
.btn-primary{
  background: var(--steel);
  color: #fff;
}
.btn-primary:hover{
  background: var(--steel-deep);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.btn-ghost{
  border-color: var(--line);
  color: var(--ink);
  background: var(--card);
}
.btn-ghost:hover{
  border-color: var(--steel);
  color: var(--steel);
}
.btn-lg{ padding: 15px 30px; font-size: 1rem; }

.hero-meta{
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--slate);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.hero-meta a:hover{ color: var(--steel); }
.sep{ color: var(--line); }

/* Hero visual */
.hero-visual{
  position: relative;
  display: flex;
  justify-content: center;
}

.photo-frame{
  width: 230px;
  height: 230px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--card);
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 2;
  margin-bottom: -60px;
  margin-left: -140px;
}
.photo-frame img{ width: 100%; height: 100%; object-fit: cover; }

.terminal-card{
  width: 340px;
  background: #1A1E27;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  margin-top: 90px;
  position: relative;
  z-index: 1;
}

.terminal-bar{
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  background: #12151C;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.tdot{ width: 9px; height: 9px; border-radius: 50%; }
.tdot.r{ background: #E5675F; }
.tdot.y{ background: #E7B84B; }
.tdot.g{ background: #61C454; }
.terminal-title{
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: #6B7280;
  margin-left: 6px;
}

.terminal-body{
  padding: 18px 18px 16px;
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1.65;
}
.terminal-body .req{
  color: #E5E7EB;
  margin-bottom: 10px;
}
.terminal-body .method{
  color: #61C454;
  font-weight: 600;
}
.terminal-body .line{ color: #8B92A3; }
.terminal-body .line.ind{ padding-left: 16px; }
.terminal-body .str{ color: #E9C46A; }
.terminal-body .str.ok{ color: #61C454; }
.terminal-body .num{ color: #7FB2E5; }
.status-line{
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255,255,255,0.1);
  color: #61C454;
  font-size: 0.9rem;
}

@media (max-width: 900px){
  .hero-inner{ grid-template-columns: 1fr; gap: 56px; }
  .hero-visual{ order: -1; flex-direction: column; align-items: center; }
  .photo-frame{ margin-left: 0; margin-bottom: -50px; z-index: 2; }
  .terminal-card{ margin-top: 70px; width: 100%; max-width: 380px; }
}

@media (max-width: 480px){
  .hero{ padding: 56px 20px 72px; }
  .photo-frame{ width: 180px; height: 180px; }
}

/* ============================================
   SECTIONS
============================================ */
.section{
  position: relative;
  z-index: 1;
  padding: 88px 32px;
}
.section.alt{ background: var(--paper-alt); }

.section-inner{
  max-width: 1120px;
  margin: 0 auto;
}

.section h2{
  font-size: clamp(1.7rem, 2.8vw, 2.2rem);
  font-weight: 600;
  margin-bottom: 22px;
}

.lead{
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 68ch;
  margin-bottom: 40px;
}

/* Stats */
.stat-row{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  border-top: 1px solid var(--line);
  padding-top: 32px;
}
.stat{ display: flex; flex-direction: column; gap: 6px; }
.stat-num{
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--steel);
}
.stat-label{
  font-size: 0.85rem;
  color: var(--slate);
}

@media (max-width: 780px){
  .stat-row{ grid-template-columns: repeat(2, 1fr); }
}

/* Skills */
.skill-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.skill-card{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.skill-card:hover{
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.skill-card h3{
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 14px;
}

.chips{ display: flex; flex-wrap: wrap; gap: 8px; }
.chip{
  font-size: 0.8rem;
  padding: 6px 12px;
  background: var(--sage-soft);
  color: var(--steel-deep);
  border-radius: 20px;
  font-weight: 500;
}
.chip.mono{
  font-family: var(--font-mono);
  font-size: 0.95rem;
  background: var(--paper-alt);
  color: var(--ink-soft);
  border: 1px solid var(--line);
}

@media (max-width: 900px){
  .skill-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px){
  .skill-grid{ grid-template-columns: 1fr; }
}

/* Projects */
.project-list{
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.project-card{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.project-card:hover{
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.project-head{
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.project-head h3{ font-size: 1.3rem; }
.project-tag{
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--amber);
}
.project-card > p{
  color: var(--ink-soft);
  margin-bottom: 16px;
}
.project-points{
  margin-bottom: 20px;
}
.project-points li{
  position: relative;
  padding-left: 18px;
  color: var(--ink-soft);
  font-size: 0.94rem;
  margin-bottom: 6px;
}
.project-points li::before{
  content: "→";
  position: absolute;
  left: 0;
  color: var(--steel);
}
.project-footer{
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.repo-link{
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--steel);
  transition: color 0.15s ease;
}
.repo-link:hover{ color: var(--steel-deep); text-decoration: underline; }

/* Timeline */
.timeline{
  position: relative;
  padding-left: 32px;
  border-left: 2px solid var(--line);
}
.tl-item{
  position: relative;
  padding-bottom: 40px;
}
.tl-item:last-child{ padding-bottom: 0; }
.tl-marker{
  position: absolute;
  left: -38px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--steel);
  border: 3px solid var(--paper-alt);
}
.tl-date{
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--amber);
  display: block;
  margin-bottom: 6px;
}
.tl-content h3{
  font-size: 1.15rem;
  margin-bottom: 4px;
}
.tl-org{
  color: var(--slate);
  font-size: 0.9rem;
  margin-bottom: 8px;
}
.tl-content p:last-child{
  color: var(--ink-soft);
  max-width: 62ch;
}

/* Contact */
.contact-section{
  text-align: left;
}
.contact-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}
.contact-card{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.18s ease;
}
.contact-card:hover{
  border-color: var(--steel);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.contact-label{
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--slate);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.contact-value{
  font-size: 0.92rem;
  font-weight: 500;
  word-break: break-word;
}

@media (max-width: 780px){
  .contact-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px){
  .contact-grid{ grid-template-columns: 1fr; }
}

/* Footer */
.footer{
  border-top: 1px solid var(--line);
  padding: 28px 32px;
}
.footer-inner{
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--slate);
}