/* ============ Design tokens ============ */
:root{
  --bg:#0a0e14;
  --bg-elevated:#111823;
  --bg-elevated-2:#161f2c;
  --border:#22303f;
  --text:#e8eef4;
  --text-muted:#8b9bab;
  --accent:#00ADD8;
  --accent-strong:#39d0f5;
  --accent-soft:rgba(0,173,216,.12);
  --danger:#f97316;
  --radius:14px;
  --shadow:0 10px 30px rgba(0,0,0,.35);
  --font-sans:'Inter',system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
  --font-mono:'JetBrains Mono',ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  color-scheme: dark;
}

:root[data-theme="light"]{
  --bg:#f6f8fb;
  --bg-elevated:#ffffff;
  --bg-elevated-2:#eef2f7;
  --border:#dde4ec;
  --text:#0e151d;
  --text-muted:#57677a;
  --accent:#007a99;
  --accent-strong:#00647c;
  --accent-soft:rgba(0,122,153,.10);
  --shadow:0 10px 30px rgba(20,30,45,.08);
  color-scheme: light;
}

@media (prefers-color-scheme: light){
  :root:not([data-theme="dark"]){
    --bg:#f6f8fb;
    --bg-elevated:#ffffff;
    --bg-elevated-2:#eef2f7;
    --border:#dde4ec;
    --text:#0e151d;
    --text-muted:#57677a;
    --accent:#007a99;
    --accent-strong:#00647c;
    --accent-soft:rgba(0,122,153,.10);
    --shadow:0 10px 30px rgba(20,30,45,.08);
    color-scheme: light;
  }
}

*{box-sizing:border-box; margin:0; padding:0;}
html{scroll-behavior:smooth;}
body{
  background:var(--bg);
  color:var(--text);
  font-family:var(--font-sans);
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
  transition:background .25s ease, color .25s ease;
  overflow-x:hidden;
}

.wrap{
  width:100%;
  max-width:1080px;
  margin:0 auto;
  padding:0 24px;
}

a{color:inherit; text-decoration:none;}
ul{list-style:none;}
button{font:inherit; cursor:pointer; background:none; border:none; color:inherit;}

.icon{
  width:18px; height:18px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.accent{color:var(--accent);}

.noise-overlay{
  position:fixed; inset:0; pointer-events:none; z-index:0;
  background-image:radial-gradient(circle at 20% 20%, var(--accent-soft), transparent 40%),
                    radial-gradient(circle at 80% 60%, var(--accent-soft), transparent 45%);
  opacity:.6;
}

/* ============ Topbar ============ */
.topbar{
  position:sticky; top:0; z-index:50;
  background:var(--bg);
  background:color-mix(in srgb, var(--bg) 85%, transparent);
  -webkit-backdrop-filter:blur(10px);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--border);
}
.topbar-inner{
  display:flex; align-items:center; justify-content:space-between;
  height:64px;
}
.brand{
  display:flex; align-items:center; gap:8px;
  font-family:var(--font-mono); font-weight:700; font-size:1.05rem;
}
.brand-mark{color:var(--accent);}
.nav{display:flex; gap:28px;}
.nav-link{
  font-size:.92rem; color:var(--text-muted); font-weight:500;
  position:relative; padding:4px 0;
  transition:color .2s ease;
}
.nav-link:hover, .nav-link.is-active{color:var(--text);}
.nav-link.is-active::after{
  content:""; position:absolute; left:0; right:0; bottom:-2px; height:2px;
  background:var(--accent); border-radius:2px;
}
.topbar-actions{display:flex; align-items:center; gap:8px;}
.icon-btn{
  display:flex; align-items:center; justify-content:center;
  width:38px; height:38px; border-radius:10px;
  border:1px solid var(--border);
  color:var(--text-muted);
  transition:all .2s ease;
}
.icon-btn:hover{color:var(--text); border-color:var(--accent);}
.icon-sun{display:none;}
:root[data-theme="light"] .icon-sun{display:block;}
:root[data-theme="light"] .icon-moon{display:none;}

.hamburger{
  display:none; flex-direction:column; gap:4px;
  width:38px; height:38px; align-items:center; justify-content:center;
}
.hamburger span{width:20px; height:2px; background:var(--text); border-radius:2px; transition:.25s;}

/* ============ Hero ============ */
.hero{position:relative; padding:88px 0 64px; z-index:1;}
.hero-grid{
  display:grid; grid-template-columns:1.3fr .9fr; gap:48px; align-items:start;
}
.eyebrow{
  font-family:var(--font-mono); color:var(--accent); font-size:.85rem;
  letter-spacing:.04em; margin-bottom:14px;
}
.hero h1{
  font-size:clamp(2.2rem, 5vw, 3.4rem);
  font-weight:800; letter-spacing:-.02em; line-height:1.05;
  margin-bottom:14px;
}
.hero-role{
  font-family:var(--font-mono); font-size:1.15rem; color:var(--text-muted);
  margin-bottom:22px; min-height:1.5em;
}
.cursor{
  display:inline-block; color:var(--accent); margin-left:2px;
  animation:blink 1s step-end infinite;
}
@keyframes blink{50%{opacity:0;}}
.hero-desc{max-width:56ch; color:var(--text-muted); margin-bottom:30px; font-size:1.02rem;}
.hero-desc strong{color:var(--text); font-weight:600;}

.hero-actions{display:flex; flex-wrap:wrap; gap:12px; margin-bottom:22px;}
.btn{
  display:inline-flex; align-items:center; gap:8px;
  padding:11px 18px; border-radius:10px;
  font-weight:600; font-size:.92rem;
  border:1px solid var(--border);
  transition:transform .15s ease, border-color .2s ease, background .2s ease;
}
.btn:hover{transform:translateY(-2px);}
.btn-primary{background:var(--accent); border-color:var(--accent); color:#04141a;}
.btn-primary:hover{background:var(--accent-strong); border-color:var(--accent-strong);}
.btn-ghost{background:var(--bg-elevated); color:var(--text);}
.btn-ghost:hover{border-color:var(--accent); color:var(--accent);}

.hero-links{display:flex; flex-wrap:wrap; gap:18px;}
.hero-links a{font-size:.88rem; color:var(--text-muted); border-bottom:1px dashed var(--border); padding-bottom:1px;}
.hero-links a:hover{color:var(--accent); border-color:var(--accent);}

/* recruiter card */
.recruiter-card{
  background:var(--bg-elevated);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:22px;
  box-shadow:var(--shadow);
}
.recruiter-card-head{
  display:flex; align-items:center; gap:8px;
  font-family:var(--font-mono); font-size:.78rem; text-transform:uppercase;
  letter-spacing:.06em; color:var(--text-muted); margin-bottom:16px;
}
.dot{
  width:8px; height:8px; border-radius:50%; background:#22c55e;
  box-shadow:0 0 0 3px rgba(34,197,94,.2);
}
.fact-list{display:flex; flex-direction:column; gap:12px; margin-bottom:18px;}
.fact-list li{
  display:flex; flex-direction:column; gap:2px;
  padding-bottom:12px; border-bottom:1px solid var(--border);
}
.fact-list li:last-child{border-bottom:none; padding-bottom:0;}
.fact-list span{font-size:.74rem; color:var(--text-muted); text-transform:uppercase; letter-spacing:.04em;}
.fact-list strong{font-size:.92rem; font-weight:600;}
.fact-download{
  display:block; text-align:center; font-size:.85rem; font-weight:600;
  color:var(--accent); padding-top:4px;
}
.fact-download:hover{color:var(--accent-strong);}

.scroll-cue{display:flex; justify-content:center; margin-top:56px;}
.scroll-cue span{
  width:22px; height:36px; border:2px solid var(--border); border-radius:12px; position:relative;
}
.scroll-cue span::before{
  content:""; position:absolute; top:6px; left:50%; width:4px; height:8px;
  background:var(--accent); border-radius:2px; transform:translateX(-50%);
  animation:scrollcue 1.6s ease-in-out infinite;
}
@keyframes scrollcue{0%{opacity:1; top:6px;} 100%{opacity:0; top:16px;}}

/* ============ Sections ============ */
.section{padding:76px 0; position:relative; z-index:1;}
.section-alt{background:var(--bg-elevated);}
.section-title{
  display:flex; align-items:center; gap:12px;
  font-size:clamp(1.5rem,3vw,2rem); font-weight:800; letter-spacing:-.01em;
  margin-bottom:12px;
}
.tag{
  font-family:var(--font-mono); font-size:.78rem; color:var(--accent);
  border:1px solid var(--border); border-radius:6px; padding:3px 8px;
}
.section-sub{color:var(--text-muted); margin-bottom:32px;}

/* about */
.about-grid{display:grid; grid-template-columns:1fr; gap:32px;}
.about-text{max-width:72ch; color:var(--text-muted); font-size:1.02rem; margin-bottom:8px;}
.about-text strong{color:var(--text); font-weight:600;}
.highlight-cards{
  display:grid; grid-template-columns:repeat(4,1fr); gap:16px;
}
.hcard{
  background:var(--bg-elevated); border:1px solid var(--border); border-radius:var(--radius);
  padding:20px; display:flex; flex-direction:column; gap:6px;
  transition:transform .2s ease, border-color .2s ease;
}
.hcard:hover{transform:translateY(-4px); border-color:var(--accent);}
.hcard-num{font-family:var(--font-mono); font-size:1.8rem; font-weight:700; color:var(--accent);}
.hcard-label{font-size:.85rem; color:var(--text-muted);}

/* timeline */
.timeline{position:relative; padding-left:28px;}
.timeline::before{
  content:""; position:absolute; left:5px; top:8px; bottom:8px; width:2px;
  background:var(--border);
}
.tl-item{position:relative; margin-bottom:22px;}
.tl-item:last-child{margin-bottom:0;}
.tl-marker{position:absolute; left:-28px; top:22px;}
.tl-marker span{
  display:block; width:12px; height:12px; border-radius:50%;
  background:var(--bg); border:2px solid var(--accent);
}
.tl-card{
  background:var(--bg-elevated); border:1px solid var(--border); border-radius:var(--radius);
  overflow:hidden; box-shadow:var(--shadow);
}
.tl-header{
  width:100%; display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:20px 22px; text-align:left;
}
.tl-header h3{font-size:1.05rem; font-weight:700;}
.tl-company{color:var(--accent); font-weight:600;}
.tl-meta{color:var(--text-muted); font-size:.85rem; margin-top:4px;}
.chevron{color:var(--text-muted); flex-shrink:0; transition:transform .25s ease;}
.tl-item.is-open .chevron{transform:rotate(180deg);}
.tl-body{
  max-height:0; overflow:hidden; transition:max-height .35s ease, padding .35s ease;
  padding:0 22px;
}
.tl-item.is-open .tl-body{max-height:900px; padding:0 22px 22px;}
.tl-body ul{display:flex; flex-direction:column; gap:10px; margin-bottom:16px;}
.tl-body li{
  position:relative; padding-left:18px; color:var(--text-muted); font-size:.94rem;
}
.tl-body li::before{
  content:""; position:absolute; left:0; top:9px; width:6px; height:6px;
  border-radius:50%; background:var(--accent);
}
.tl-tags{display:flex; flex-wrap:wrap; gap:8px;}
.tl-tags span{
  font-family:var(--font-mono); font-size:.74rem; padding:4px 10px;
  border-radius:20px; background:var(--accent-soft); color:var(--accent); border:1px solid var(--border);
}

/* skills */
.skill-filters{display:flex; flex-wrap:wrap; gap:10px; margin-bottom:24px;}
.chip{
  padding:8px 16px; border-radius:20px; border:1px solid var(--border);
  font-size:.85rem; font-weight:600; color:var(--text-muted);
  transition:all .2s ease;
}
.chip:hover{color:var(--text); border-color:var(--accent);}
.chip.is-active{background:var(--accent); border-color:var(--accent); color:#04141a;}

.skill-grid{display:flex; flex-wrap:wrap; gap:12px;}
.skill-pill{
  padding:12px 18px; border-radius:12px; background:var(--bg-elevated);
  border:1px solid var(--border); font-weight:600; font-size:.92rem;
  transition:transform .2s ease, opacity .2s ease, border-color .2s ease;
}
.skill-pill:hover{transform:translateY(-3px); border-color:var(--accent); color:var(--accent);}
.skill-pill.is-hidden{display:none;}

/* education */
.two-col{display:grid; grid-template-columns:1fr 1fr; gap:48px;}
.edu-card{
  background:var(--bg); border:1px solid var(--border); border-radius:var(--radius); padding:20px;
}
.edu-card h3{font-size:1.02rem; font-weight:700; margin-bottom:6px;}
.cert-list{display:flex; flex-direction:column; gap:12px;}
.cert-list li{
  background:var(--bg); border:1px solid var(--border); border-radius:12px;
  padding:14px 16px; font-size:.92rem; color:var(--text-muted);
  position:relative; padding-left:36px;
}
.cert-list li::before{
  content:"✓"; position:absolute; left:14px; top:14px; color:var(--accent); font-weight:700;
}

/* github highlights */
.icon-fill{fill:currentColor; stroke:none;}
.repo-grid{display:grid; grid-template-columns:repeat(2,1fr); gap:16px;}
.repo-status{color:var(--text-muted); font-size:.92rem;}
.repo-card{
  display:flex; flex-direction:column; gap:10px;
  background:var(--bg-elevated); border:1px solid var(--border); border-radius:var(--radius);
  padding:20px; transition:transform .2s ease, border-color .2s ease;
}
.repo-card:hover{transform:translateY(-4px); border-color:var(--accent);}
.repo-card-head{display:flex; align-items:center; justify-content:space-between; gap:10px;}
.repo-name{display:flex; align-items:center; gap:8px; font-weight:700; font-size:.98rem;}
.repo-name .icon{color:var(--text-muted); flex-shrink:0;}
.repo-arrow{color:var(--text-muted); flex-shrink:0; transition:transform .2s ease, color .2s ease;}
.repo-card:hover .repo-arrow{color:var(--accent); transform:translate(2px,-2px);}
.repo-desc{color:var(--text-muted); font-size:.86rem; flex-grow:1;}
.repo-meta{display:flex; align-items:center; gap:14px; font-size:.8rem; color:var(--text-muted);}
.repo-lang{display:flex; align-items:center; gap:6px;}
.repo-lang-dot{width:9px; height:9px; border-radius:50%; background:var(--accent);}

/* contact */
.contact-grid{display:grid; grid-template-columns:repeat(2,1fr); gap:16px;}
.contact-card{
  display:flex; align-items:center; gap:12px;
  background:var(--bg-elevated); border:1px solid var(--border); border-radius:var(--radius);
  padding:18px 20px; font-weight:600; font-size:.94rem;
  transition:transform .2s ease, border-color .2s ease;
}
.contact-card:hover{transform:translateY(-3px); border-color:var(--accent); color:var(--accent);}
.contact-card .icon{color:var(--accent); flex-shrink:0;}

/* footer */
.footer{border-top:1px solid var(--border); padding:24px 0; position:relative; z-index:1;}
.footer-inner{display:flex; align-items:center; justify-content:space-between;}
.footer p{color:var(--text-muted); font-size:.82rem;}

/* toast */
.toast{
  position:fixed; bottom:24px; left:50%; transform:translateX(-50%) translateY(120%);
  background:var(--bg-elevated); border:1px solid var(--accent); color:var(--text);
  padding:12px 20px; border-radius:10px; font-size:.88rem; font-weight:600;
  box-shadow:var(--shadow); transition:transform .3s ease, opacity .3s ease, visibility .3s ease;
  z-index:100; opacity:0; visibility:hidden;
}
.toast.is-visible{transform:translateX(-50%) translateY(0); opacity:1; visibility:visible;}

/* reveal animation */
.reveal{opacity:0; transform:translateY(16px); transition:opacity .6s ease, transform .6s ease;}
.reveal.is-visible{opacity:1; transform:translateY(0);}

/* ============ Responsive ============ */
@media (max-width:860px){
  .hero-grid{grid-template-columns:1fr;}
  .highlight-cards{grid-template-columns:repeat(2,1fr);}
  .two-col{grid-template-columns:1fr; gap:32px;}
  .repo-grid{grid-template-columns:1fr;}
  .contact-grid{grid-template-columns:1fr;}
}

@media (max-width:700px){
  .nav{
    position:fixed; top:64px; left:0; right:0;
    background:var(--bg-elevated); border-bottom:1px solid var(--border);
    flex-direction:column; padding:16px 24px; gap:16px;
    transform:translateY(-120%); opacity:0; transition:all .25s ease;
    pointer-events:none;
  }
  .nav.is-open{transform:translateY(0); opacity:1; pointer-events:auto;}
  .hamburger{display:flex;}
  .highlight-cards{grid-template-columns:1fr 1fr;}
}

@media (max-width:480px){
  .highlight-cards{grid-template-columns:1fr;}
  .hero-actions{flex-direction:column; align-items:stretch;}
}
