:root{
  --bg: #0b0d10;
  --bg-alt: #101317;
  --bg-raise: #14181d;
  --text: #f2f0ea;
  --text-muted: #8890a0;
  --text-dim: #565d6b;
  --line: #22262c;
  --accent: #e8a33d;
  --accent-2: #4fd1c5;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --maxw: 1080px;
}

*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto;}
  *{animation-duration:0.001ms !important; animation-iteration-count:1 !important; transition-duration:0.001ms !important;}
}

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

a{color:inherit; text-decoration:none;}
ul{margin:0; padding:0; list-style:none;}
img{max-width:100%; display:block;}
::selection{ background:var(--accent); color:#0b0d10; }

.wrap{ max-width:var(--maxw); margin:0 auto; padding:0 28px; }
.mono{ font-family:var(--mono); }

.eyebrow{
  font-family:var(--mono);
  font-size:12.5px;
  letter-spacing:0.08em;
  color:var(--accent);
  text-transform:lowercase;
  display:flex;
  align-items:center;
  gap:10px;
}
.eyebrow::before{ content:""; width:16px; height:1px; background:var(--accent); display:inline-block; }

.idx{ font-family:var(--mono); color:var(--text-dim); font-size:13px; }

h1,h2,h3{ font-family:var(--sans); font-weight:800; letter-spacing:-0.02em; margin:0; }

/* ---------- NAV ---------- */
header.nav{
  position:fixed; top:0; left:0; right:0; z-index:100;
  background:rgba(11,13,16,0.86);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
}
.nav-inner{
  max-width:var(--maxw); margin:0 auto; padding:16px 28px;
  display:flex; align-items:center; justify-content:space-between;
}
.brand{ font-family:var(--mono); font-weight:700; font-size:14px; letter-spacing:0.02em; }
.brand span{ color:var(--accent); }
nav.links{ display:flex; gap:26px; }
nav.links a{
  font-family:var(--mono); font-size:13px; color:var(--text-muted);
  transition:color .15s ease; position:relative; white-space:nowrap;
}
nav.links a:hover, nav.links a.active{ color:var(--text); }
nav.links a.active{ color:var(--accent); }
.nav-cta{
  font-family:var(--mono); font-size:12.5px; border:1px solid var(--line);
  padding:8px 14px; border-radius:3px; color:var(--text);
  transition:border-color .15s ease, background .15s ease; white-space:nowrap;
}
.nav-cta:hover{ border-color:var(--accent); background:rgba(232,163,61,0.08); }
.menu-btn{ display:none; background:none; border:none; color:var(--text); font-family:var(--mono); font-size:20px; cursor:pointer; }

@media (max-width:860px){
  nav.links{
    position:fixed; top:57px; left:0; right:0; bottom:0; background:var(--bg);
    flex-direction:column; padding:32px 28px; gap:22px;
    transform:translateY(-8px); opacity:0; pointer-events:none;
    transition:opacity .2s ease, transform .2s ease; overflow-y:auto;
  }
  nav.links.open{ opacity:1; pointer-events:auto; transform:translateY(0); }
  nav.links a{ font-size:16px; }
  .nav-cta{ display:none; }
  .menu-btn{ display:block; }
}

/* ---------- PAGE HERO (subpages) ---------- */
.page-hero{
  padding:150px 0 60px;
  border-bottom:1px solid var(--line);
}
.page-hero .idx-row{ display:flex; align-items:center; gap:14px; margin-bottom:22px; }
.page-hero h1{ font-size:clamp(32px,6vw,58px); line-height:1.05; margin-bottom:14px; }
.page-hero .sub{ font-family:var(--mono); color:var(--accent-2); font-size:clamp(13px,1.8vw,16px); margin-bottom:20px; }
.page-hero p.lede{ color:var(--text-muted); font-size:16px; max-width:60ch; }
.breadcrumb{ font-family:var(--mono); font-size:12px; color:var(--text-dim); margin-bottom:18px; }
.breadcrumb a{ color:var(--text-muted); }
.breadcrumb a:hover{ color:var(--accent); }

/* ---------- HOME HERO ---------- */
.hero{ padding:170px 0 100px; border-bottom:1px solid var(--line); position:relative; }
.hero .idx-row{ display:flex; align-items:center; gap:14px; margin-bottom:26px; }
.hero h1{ font-size:clamp(38px, 7vw, 74px); line-height:1.02; margin-bottom:10px; }
.hero .role{ font-family:var(--mono); color:var(--accent-2); font-size:clamp(14px,2vw,18px); margin-bottom:26px; }
.hero .role::after{
  content:""; display:inline-block; width:8px; height:16px; background:var(--accent-2);
  margin-left:6px; vertical-align:middle; animation:blink 1.1s steps(1) infinite;
}
@keyframes blink{ 50%{ opacity:0; } }
.hero-grid{ display:grid; grid-template-columns:1.3fr 1fr; gap:60px; align-items:start; margin-top:36px; }
.hero p.lede{ color:var(--text-muted); font-size:16.5px; max-width:52ch; }
.hero-actions{ display:flex; gap:14px; margin-top:30px; flex-wrap:wrap; }
.btn{ font-family:var(--mono); font-size:13px; padding:12px 20px; border-radius:3px; display:inline-block; transition:all .15s ease; }
.btn-primary{ background:var(--accent); color:#0b0d10; font-weight:700; }
.btn-primary:hover{ background:#f2b25a; }
.btn-ghost{ border:1px solid var(--line); color:var(--text); }
.btn-ghost:hover{ border-color:var(--accent-2); color:var(--accent-2); }

.hero-panel{
  border:1px solid var(--line); border-radius:6px; background:var(--bg-alt);
  padding:20px; font-family:var(--mono); font-size:12.5px; color:var(--text-muted);
}
.hero-panel .dots{ display:flex; gap:6px; margin-bottom:16px; }
.hero-panel .dots span{ width:9px; height:9px; border-radius:50%; background:var(--line); display:block; }
.hero-panel .line{ margin-bottom:6px; white-space:pre-wrap; }
.hero-panel .k{ color:var(--accent-2); }
.hero-panel .v{ color:var(--text); }

/* ---------- HERO IMAGE ---------- */
.hero-image {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.hero-image img {
  width: 100%;
  max-width: 750px;
  height: auto;
  display: block;
  filter: none !important;
  mix-blend-mode: normal !important;
  background: transparent;
  margin: 0 auto;
}
.hero-image .code-tag {
  position: absolute;
  bottom: 20px;
  left: 0;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent-2);
}

@media (max-width:800px){
  .hero{ padding:120px 0 60px; }
  .hero-grid{ grid-template-columns:1fr; gap:34px; }
  .page-hero{ padding:120px 0 50px; }
}

/* ---------- SECTION SHELL ---------- */
section.block{ padding:90px 0; border-bottom:1px solid var(--line); }
section.block.alt{ background:var(--bg-alt); }
section.block.tight{ padding:60px 0; }
.block-head{ display:flex; justify-content:space-between; align-items:flex-end; gap:20px; margin-bottom:50px; flex-wrap:wrap; }
.block-head h2{ font-size:clamp(26px,4vw,38px); margin-top:10px; }
.block-head p{ color:var(--text-muted); max-width:46ch; font-size:15px; margin-top:10px; }

/* ---------- STATS ---------- */
.stats{
  display:grid; grid-template-columns:repeat(4,1fr); gap:1px; background:var(--line);
  border:1px solid var(--line); border-radius:6px; overflow:hidden; margin-top:50px;
}
.stat{ background:var(--bg); padding:26px 22px; }
.stat .num{ font-family:var(--mono); font-size:clamp(24px,3.4vw,34px); color:var(--accent); font-weight:700; }
.stat .label{ color:var(--text-muted); font-size:13px; margin-top:6px; }
@media (max-width:700px){ .stats{ grid-template-columns:repeat(2,1fr); } }

/* ---------- ABOUT PERSONAL ---------- */
.about-cols{ display:grid; grid-template-columns:repeat(3,1fr); gap:30px; margin-top:50px; }
.about-card{ border:1px solid var(--line); border-radius:6px; padding:26px; background:var(--bg); }
.about-card .tag{ font-family:var(--mono); font-size:11.5px; color:var(--accent-2); letter-spacing:0.06em; text-transform:uppercase; margin-bottom:12px; display:block; }
.about-card p{ color:var(--text-muted); font-size:14.5px; }
@media (max-width:800px){ .about-cols{ grid-template-columns:1fr; } }

/* ---------- CAREER LOG ---------- */
.log{ margin-top:20px; border-left:1px solid var(--line); padding-left:0; }
.log-entry{ position:relative; padding:30px 0 30px 40px; border-bottom:1px solid var(--line); }
.log-entry:last-child{ border-bottom:none; }
.log-entry::before{
  content:""; position:absolute; left:-5.5px; top:38px; width:10px; height:10px;
  border-radius:50%; background:var(--bg-alt); border:2px solid var(--accent);
}
.log-entry.current::before{ background:var(--accent); }
.log-meta{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; font-family:var(--mono); font-size:12px; color:var(--text-dim); margin-bottom:10px; }
.log-hash{ color:var(--accent-2); }
.log-tag{ border:1px solid var(--line); padding:2px 8px; border-radius:20px; color:var(--text-muted); }
.log-entry h3{ font-size:20px; margin-bottom:2px; }
.log-role{ color:var(--accent); font-family:var(--mono); font-size:13.5px; margin-bottom:14px; display:block; }
.log-entry p{ color:var(--text-muted); font-size:14.5px; max-width:70ch; }
.log-entry ul{ margin-top:12px; }
.log-entry ul li{ color:var(--text-muted); font-size:14px; padding-left:16px; position:relative; margin-bottom:6px; }
.log-entry ul li::before{ content:"›"; position:absolute; left:0; color:var(--accent-2); }

/* ---------- PROJECTS ---------- */
.proj-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:26px; margin-top:50px; }
.proj-card{
  border:1px solid var(--line); border-radius:8px; padding:30px; background:var(--bg);
  display:flex; flex-direction:column; gap:14px; transition:border-color .15s ease, transform .15s ease;
}
.proj-card:hover{ border-color:var(--accent); transform:translateY(-2px); }
.proj-top{ display:flex; justify-content:space-between; align-items:flex-start; }
.proj-card h3{ font-size:22px; }
.proj-period{ font-family:var(--mono); font-size:12px; color:var(--text-dim); white-space:nowrap; }
.proj-card p{ color:var(--text-muted); font-size:14.5px; }
.proj-tags{ display:flex; gap:8px; flex-wrap:wrap; margin-top:auto; padding-top:10px; }
.proj-tags span{ font-family:var(--mono); font-size:11px; color:var(--accent-2); border:1px solid var(--line); padding:4px 9px; border-radius:20px; }
.proj-link{ font-family:var(--mono); font-size:12.5px; color:var(--accent); margin-top:6px; }
@media (max-width:800px){ .proj-grid{ grid-template-columns:1fr; } }

/* ---------- PROJECT DETAIL ---------- */
.detail-meta{ display:flex; gap:22px; flex-wrap:wrap; margin-top:26px; }
.detail-meta div{ font-family:var(--mono); font-size:12.5px; color:var(--text-dim); }
.detail-meta div span{ color:var(--text); display:block; font-size:14px; margin-top:4px; }
.detail-section{ margin-bottom:56px; }
.detail-section:last-child{ margin-bottom:0; }
.detail-section h2{ font-size:clamp(22px,3vw,30px); margin-bottom:18px; }
.detail-section p{ color:var(--text-muted); font-size:15.5px; max-width:75ch; margin-bottom:14px; }
.chip-list{ display:flex; gap:10px; flex-wrap:wrap; margin-top:18px; }
.chip-list a, .chip-list span{
  font-family:var(--mono); font-size:12.5px; border:1px solid var(--line); color:var(--text-muted);
  padding:8px 16px; border-radius:20px; transition:border-color .15s ease, color .15s ease;
}
.chip-list a:hover{ border-color:var(--accent); color:var(--accent); }
.resp-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:14px; margin-top:20px; }
.resp-grid div{
  border:1px solid var(--line); border-radius:6px; padding:16px 18px; color:var(--text-muted); font-size:14px;
  background:var(--bg-alt);
}
@media (max-width:800px){ .resp-grid{ grid-template-columns:1fr; } }
.next-proj{
  display:flex; justify-content:space-between; align-items:center; padding:26px 0; flex-wrap:wrap; gap:14px;
}
.next-proj a{ font-family:var(--mono); font-size:13.5px; color:var(--text-muted); transition:color .15s ease; }
.next-proj a:hover{ color:var(--accent); }

/* ---------- SKILLS ---------- */
.skills-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:0; margin-top:40px; border-top:1px solid var(--line); }
.skill-row{ display:flex; align-items:baseline; gap:16px; padding:18px 0; border-bottom:1px solid var(--line); }
.skill-row:nth-child(odd){ padding-right:30px; }
.skill-row:nth-child(even){ padding-left:30px; }
.skill-row .n{ font-family:var(--mono); color:var(--accent); font-size:13px; }
.skill-row .t{ font-size:15px; }
@media (max-width:800px){ .skills-grid{ grid-template-columns:1fr; } .skill-row:nth-child(even){ padding-left:0; } }

/* ---------- SOCIETIES / FREELANCE CARDS ---------- */
.soc-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:26px; margin-top:50px; }
.soc-card{ border:1px solid var(--line); border-radius:8px; padding:28px; background:var(--bg-alt); }
.soc-card h3{ font-size:19px; margin-bottom:2px; }
.soc-role{ font-family:var(--mono); color:var(--accent-2); font-size:13px; }
.soc-period{ font-family:var(--mono); color:var(--text-dim); font-size:12px; margin:8px 0 12px; }
.soc-card p{ color:var(--text-muted); font-size:14px; }
@media (max-width:800px){ .soc-grid{ grid-template-columns:1fr; } }

/* ---------- CONTACT ---------- */
.contact-panel{
  border:1px solid var(--line); border-radius:8px; padding:50px; background:var(--bg-alt);
  margin-top:40px; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:30px;
}
.contact-panel h2{ font-size:clamp(24px,4vw,34px); max-width:16ch; }
.contact-links{ display:flex; flex-direction:column; gap:14px; }
.contact-links a{
  font-family:var(--mono); font-size:15px; color:var(--text); border-bottom:1px solid var(--line);
  padding-bottom:4px; transition:color .15s ease, border-color .15s ease;
}
.contact-links a:hover{ color:var(--accent); border-color:var(--accent); }
.contact-links span{ color:var(--text-dim); font-size:11px; font-family:var(--mono); display:block; margin-bottom:2px;}

.form-grid{ display:grid; grid-template-columns:1fr 1fr; gap:18px; margin-top:40px; }
.form-grid .full{ grid-column:1/-1; }
.form-grid label{ font-family:var(--mono); font-size:12px; color:var(--text-dim); display:block; margin-bottom:8px; }
.form-grid input, .form-grid textarea{
  width:100%; background:var(--bg); border:1px solid var(--line); border-radius:4px; color:var(--text);
  padding:12px 14px; font-family:var(--sans); font-size:14px; outline:none; transition:border-color .15s ease;
}
.form-grid input:focus, .form-grid textarea:focus{ border-color:var(--accent); }
.form-note{ font-family:var(--mono); font-size:12px; color:var(--text-dim); margin-top:16px; }
@media (max-width:700px){ .form-grid{ grid-template-columns:1fr; } }

/* ---------- FOOTER ---------- */
footer{ padding:36px 0; }
.footer-inner{
  display:flex; justify-content:space-between; align-items:center; font-family:var(--mono);
  font-size:12px; color:var(--text-dim); flex-wrap:wrap; gap:10px;
}
.footer-links{ display:flex; gap:18px; }
.footer-links a:hover{ color:var(--accent); }

/* reveal on scroll */
.reveal{ opacity:0; transform:translateY(14px); transition:opacity .5s ease, transform .5s ease; }
.reveal.in{ opacity:1; transform:translateY(0); }
