:root{
  --bg-void:#060A10;
  --bg-panel:#0D1420;
  --bg-panel-2:#111C2B;
  --accent:#33E1FF;
  --accent-soft:rgba(51,225,255,0.14);
  --accent-blue:#5B8CFF;
  --text-primary:#E7F3F7;
  --text-muted:#7C93A8;
  --text-dim:#4B5F70;
  --border:rgba(51,225,255,0.14);
  --border-strong:rgba(51,225,255,0.32);
  --status-green:#4ADE80;
  --radius:10px;
  --mono:'JetBrains Mono', ui-monospace, monospace;
  --display:'Space Grotesk', var(--mono), sans-serif;
  --body:'IBM Plex Sans', system-ui, sans-serif;
}

*{box-sizing:border-box; margin:0; padding:0;}
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; scroll-behavior:auto !important;}
}

body{
  background:var(--bg-void);
  color:var(--text-primary);
  font-family:var(--body);
  line-height:1.6;
  background-image:
    radial-gradient(ellipse 900px 600px at 15% -10%, rgba(51,225,255,0.08), transparent 60%),
    radial-gradient(ellipse 700px 500px at 100% 10%, rgba(91,140,255,0.06), transparent 60%),
    linear-gradient(var(--bg-void), var(--bg-void));
  overflow-x:hidden;
  overflow-wrap:break-word;
}
html{overflow-x:hidden; max-width:100vw;}

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

::selection{background:var(--accent); color:#04141a;}

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:3px;
  border-radius:4px;
}

.wrap{max-width:1300px; margin:0 auto; padding:0 24px;}

.grid-texture{
  position:fixed; inset:0; z-index:0; pointer-events:none;
  background-image:
    linear-gradient(rgba(51,225,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(51,225,255,0.035) 1px, transparent 1px);
  background-size:42px 42px;
  mask-image:radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 90%);
}

/* ---------- NAV / TAB BAR ---------- */
header.tabbar{
  position:sticky; top:0; z-index:50;
  background:rgba(6,10,16,0.85);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--border);
}
.tabbar-inner{
  max-width:1300px; margin:0 auto; padding:0 24px;
  display:flex; align-items:center; gap:24px; height:56px;
}
.brand{
  font-family:var(--mono); font-weight:700; font-size:15px;
  color:var(--accent); display:flex; align-items:center; gap:9px; white-space:nowrap;
}
.brand img{
  width:26px; height:26px; border-radius:50%; object-fit:cover; object-position:top center;
  filter:grayscale(1) contrast(1.1) brightness(0.85);
  border:1px solid var(--border-strong);
}
nav.tabs{display:flex; gap:2px; overflow-x:auto; scrollbar-width:none; flex:1;}
nav.tabs::-webkit-scrollbar{display:none;}
nav.tabs a{
  font-family:var(--mono); font-size:13px; color:var(--text-muted);
  padding:8px 14px; border-bottom:2px solid transparent; white-space:nowrap;
  transition:color .2s ease, border-color .2s ease;
}
nav.tabs a:hover{color:var(--text-primary);}
nav.tabs a.active{color:var(--accent); border-bottom-color:var(--accent);}
.nav-cta{
  font-family:var(--mono); font-size:12px; color:var(--bg-void);
  background:var(--accent); padding:8px 14px; border-radius:6px; white-space:nowrap;
  font-weight:600;
}
.nav-cta:hover{background:#5CEBFF;}

/* ---------- SECTION SHELL ---------- */
main{position:relative; z-index:1;}
.section{padding:110px 0; border-bottom:1px solid rgba(255,255,255,0.04);}
.eyebrow{
  font-family:var(--mono); font-size:13px; color:var(--accent);
  display:flex; align-items:center; gap:10px; margin-bottom:18px;
}
.eyebrow::before{content:''; width:22px; height:1px; background:var(--accent); opacity:.6;}
h2.section-title{
  font-family:var(--display); font-size:clamp(28px,4vw,40px); font-weight:600;
  margin-bottom:44px; letter-spacing:-0.01em;
}
.reveal{opacity:0; transform:translateY(18px); transition:opacity .6s ease, transform .6s ease;}
.reveal.in{opacity:1; transform:translateY(0);}

/* ---------- HERO ---------- */
.hero{padding:90px 0 100px; border-bottom:1px solid rgba(255,255,255,0.04);}
.hero-grid{display:grid; grid-template-columns:1.15fr 0.85fr; gap:56px; align-items:center;}
.hero-kicker{
  font-family:var(--mono); font-size:13px; color:var(--status-green);
  display:flex; align-items:center; gap:8px; margin-bottom:22px;
}
.hero-kicker .dot{width:7px; height:7px; border-radius:50%; background:var(--status-green); box-shadow:0 0 8px var(--status-green); animation:pulse 2s ease-in-out infinite;}
@keyframes pulse{0%,100%{opacity:1;} 50%{opacity:.35;}}
h1{
  font-family:var(--display); font-weight:700; letter-spacing:-0.02em;
  font-size:clamp(34px,5.4vw,54px); line-height:1.08; margin-bottom:18px;
}
h1 .accent{color:var(--accent);}
.hero-sub{color:var(--text-muted); font-size:17px; max-width:480px; margin-bottom:34px;}
.hero-ctas{display:flex; gap:14px; flex-wrap:wrap;}
.btn{
  font-family:var(--mono); font-size:14px; font-weight:600; padding:13px 22px;
  border-radius:8px; display:inline-flex; align-items:center; gap:8px;
  transition:transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  border:1px solid transparent;
}
.btn:hover{transform:translateY(-2px);}
.btn-primary{background:var(--accent); color:#04141a;}
.btn-primary:hover{box-shadow:0 8px 26px -8px rgba(51,225,255,0.55);}
.btn-ghost{background:transparent; color:var(--text-primary); border-color:var(--border-strong);}
.btn-ghost:hover{border-color:var(--accent); color:var(--accent);}

.hero-right{display:flex; flex-direction:column; gap:18px;}

/* editor / window chrome (reused for code block AND photo card) */
.editor{
  background:var(--bg-panel); border:1px solid var(--border); border-radius:12px;
  overflow:hidden; box-shadow:0 30px 60px -30px rgba(0,0,0,0.6);
}
.editor-chrome{
  display:flex; align-items:center; gap:8px; padding:11px 14px;
  background:var(--bg-panel-2); border-bottom:1px solid var(--border);
}
.editor-chrome .tl{width:10px; height:10px; border-radius:50%;}
.tl.r{background:#FF6159;} .tl.y{background:#FFBD2E;} .tl.g{background:#28C840;}
.editor-filename{font-family:var(--mono); font-size:12px; color:var(--text-muted); margin-left:8px;}
.editor-body{padding:22px 20px; font-family:var(--mono); font-size:13.5px; line-height:1.9;}
.ln{color:var(--text-dim); display:inline-block; width:22px; user-select:none;}
.code-key{color:#8FD3FF;}
.code-str{color:var(--accent);}
.code-punc{color:var(--text-muted);}
.code-kw{color:var(--accent-blue);}
#typed-lines .line{opacity:0; white-space:pre-wrap; overflow-wrap:break-word; word-break:break-word;}
.cursor{display:inline-block; width:7px; height:15px; background:var(--accent); margin-left:2px; animation:blink 1s steps(1) infinite; vertical-align:middle;}
@keyframes blink{50%{opacity:0;}}

/* photo card — same window chrome, duotone portrait body */
.id-photo{position:relative; aspect-ratio:4/5; overflow:hidden;}
.id-photo img{
  width:100%; height:100%; object-fit:contain; object-position:center;
  filter:grayscale(1) contrast(1.15) brightness(0.85);
}
.id-photo::after{
  content:''; position:absolute; inset:0;
  background:linear-gradient(165deg, rgba(51,225,255,0.45), rgba(6,10,16,0.92));
  mix-blend-mode:color;
}
.id-photo .corner{position:absolute; width:18px; height:18px; border-color:var(--accent); opacity:.9;}
.id-photo .corner.tl{top:10px; left:10px; border-top:2px solid; border-left:2px solid;}
.id-photo .corner.tr{top:10px; right:10px; border-top:2px solid; border-right:2px solid;}
.id-photo .corner.bl{bottom:10px; left:10px; border-bottom:2px solid; border-left:2px solid;}
.id-photo .corner.br{bottom:10px; right:10px; border-bottom:2px solid; border-right:2px solid;}
.id-badge{
  position:absolute; bottom:12px; left:50%; transform:translateX(-50%);
  background:rgba(6,10,16,0.72); backdrop-filter:blur(4px);
  border:1px solid var(--border-strong); border-radius:20px; padding:5px 13px;
  font-family:var(--mono); font-size:11px; color:var(--text-primary);
  display:flex; align-items:center; gap:7px; white-space:nowrap; z-index:2;
}
.id-badge .dot{width:6px; height:6px; border-radius:50%; background:var(--status-green); box-shadow:0 0 6px var(--status-green); animation:pulse 2s ease-in-out infinite;}

/* ---------- ABOUT ---------- */
.about-grid{display:grid; grid-template-columns:1.3fr 1fr; gap:56px; align-items:start;}
.comment-block{font-family:var(--mono); font-size:14.5px; line-height:2; color:var(--text-muted);}
.comment-block .slug{color:var(--text-dim);}
.comment-block p{font-family:var(--body); color:var(--text-primary); font-size:16px; line-height:1.8; margin:16px 0 0 20px;}
.fact-stack{display:flex; flex-direction:column; gap:14px;}
.fact{
  background:var(--bg-panel); border:1px solid var(--border); border-radius:10px;
  padding:18px 20px; display:flex; align-items:baseline; gap:12px;
}
.fact .num{font-family:var(--display); font-size:26px; font-weight:700; color:var(--accent);}
.fact .label{font-size:14px; color:var(--text-muted);}

/* ---------- EXPERIENCE ---------- */
.timeline{display:flex; flex-direction:column;}
.tl-item{
  display:grid; grid-template-columns:150px 1fr; gap:28px;
  padding:26px 0; border-top:1px solid rgba(255,255,255,0.06);
}
.tl-item:first-child{border-top:none;}
.tl-date{font-family:var(--mono); font-size:12.5px; color:var(--text-dim); padding-top:4px;}
.tl-role{font-family:var(--display); font-size:19px; font-weight:600; margin-bottom:2px;}
.tl-company{font-family:var(--mono); font-size:13px; color:var(--accent); margin-bottom:12px;}
.tl-item ul{display:flex; flex-direction:column; gap:8px;}
.tl-item li{color:var(--text-muted); font-size:14.5px; padding-left:18px; position:relative;}
.tl-item li::before{content:'›'; position:absolute; left:0; color:var(--accent); opacity:.7;}

/* ---------- SKILLS ---------- */
.skills-grid{display:grid; grid-template-columns:repeat(3, 1fr); gap:16px;}
.skill-card{
  background:var(--bg-panel); border:1px solid var(--border); border-radius:10px; padding:20px;
}
.skill-card .prop{font-family:var(--mono); font-size:13px; color:var(--accent-blue); margin-bottom:14px;}
.skill-card .prop::before{content:'.'; color:var(--text-dim);}
.chips{display:flex; flex-wrap:wrap; gap:8px;}
.chip{
  font-family:var(--mono); font-size:12.5px; color:var(--text-muted);
  border:1px solid var(--border); border-radius:6px; padding:5px 10px;
  transition:border-color .2s ease, color .2s ease;
}
.chip:hover{border-color:var(--accent); color:var(--accent);}

/* ---------- PROJECTS ---------- */
.projects-grid{display:grid; grid-template-columns:repeat(2, 1fr); gap:22px;}
.proj-card{
  background:var(--bg-panel); border:1px solid var(--border); border-radius:12px; overflow:hidden;
  transition:border-color .25s ease, transform .25s ease;
}
.proj-card:hover{border-color:var(--border-strong); transform:translateY(-3px);}
.proj-chrome{
  display:flex; align-items:center; gap:8px; padding:10px 12px;
  background:var(--bg-panel-2); border-bottom:1px solid var(--border);
}
.proj-chrome .tl{width:8px; height:8px; border-radius:50%;}
.proj-url{
  font-family:var(--mono); font-size:11px; color:var(--text-dim);
  background:rgba(255,255,255,0.03); border-radius:5px; padding:3px 10px; margin-left:6px;
  flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.proj-visual{
  height:120px; display:flex; align-items:center; justify-content:center; position:relative; overflow:hidden;
  font-family:var(--display); font-weight:700; font-size:15px; color:var(--text-dim);
  letter-spacing:.06em; text-transform:uppercase;
  background:
    repeating-linear-gradient(135deg, rgba(51,225,255,0.05) 0px, rgba(51,225,255,0.05) 1px, transparent 1px, transparent 14px),
    linear-gradient(160deg, var(--bg-panel-2), var(--bg-void));
}
.proj-visual img{position:absolute; inset:0; width:100%; height:100%; object-fit:contain; padding:16px;}
.proj-body{padding:18px 20px 20px;}
.proj-title{font-family:var(--display); font-size:18px; font-weight:600; margin-bottom:6px;}
.proj-desc{color:var(--text-muted); font-size:14px; margin-bottom:14px;}
.proj-tags{display:flex; gap:8px; flex-wrap:wrap; margin-bottom:16px;}
.tag{font-family:var(--mono); font-size:11px; color:var(--accent); border:1px solid var(--border); border-radius:5px; padding:3px 8px;}
.proj-link{font-family:var(--mono); font-size:13px; color:var(--text-primary); display:inline-flex; align-items:center; gap:6px;}
.proj-link:hover{color:var(--accent);}
.proj-link.disabled{color:var(--text-dim); pointer-events:none;}

/* ---------- EDUCATION ---------- */
.edu-grid{display:grid; grid-template-columns:1fr 1fr; gap:20px;}
.edu-card{background:var(--bg-panel); border:1px solid var(--border); border-radius:10px; padding:22px;}
.edu-degree{font-family:var(--display); font-size:17px; font-weight:600; margin-bottom:4px;}
.edu-school{color:var(--text-muted); font-size:14px; margin-bottom:10px;}
.edu-date{font-family:var(--mono); font-size:12px; color:var(--accent);}

/* ---------- CONTACT ---------- */
.contact-grid{display:grid; grid-template-columns:1fr 1fr; gap:56px;}
.contact-form{display:flex; flex-direction:column; gap:14px;}
.field label{font-family:var(--mono); font-size:12px; color:var(--text-muted); display:block; margin-bottom:6px;}
.field input, .field textarea{
  width:100%; background:var(--bg-panel); border:1px solid var(--border); border-radius:8px;
  padding:12px 14px; color:var(--text-primary); font-family:var(--body); font-size:14.5px;
  transition:border-color .2s ease;
}
.field input:focus, .field textarea:focus{border-color:var(--accent); outline:none;}
.field textarea{resize:vertical; min-height:110px;}
.contact-direct{display:flex; flex-direction:column; gap:12px;}
.contact-row{
  display:flex; align-items:center; gap:14px; background:var(--bg-panel);
  border:1px solid var(--border); border-radius:10px; padding:14px 16px;
  transition:border-color .2s ease;
}
.contact-row:hover{border-color:var(--border-strong);}
.contact-row svg{flex-shrink:0; color:var(--accent);}
.contact-row .cr-label{font-size:12px; color:var(--text-dim); font-family:var(--mono);}
.contact-row .cr-value{font-size:14.5px; color:var(--text-primary);}

/* ---------- FOOTER ---------- */
footer.statusbar{
  font-family:var(--mono); font-size:12px; color:var(--text-dim);
  display:flex; justify-content:space-between; align-items:center;
  padding:16px 24px; flex-wrap:wrap; gap:10px;
  background:var(--bg-panel-2); border-top:1px solid var(--border);
}
footer.statusbar .sb-left, footer.statusbar .sb-right{display:flex; align-items:center; gap:16px; flex-wrap:wrap;}

/* ---------- WHATSAPP FLOAT ---------- */
.wa-float{
  position:fixed; bottom:24px; right:24px; z-index:60;
  width:52px; height:52px; border-radius:50%;
  background:var(--accent); display:flex; align-items:center; justify-content:center;
  box-shadow:0 10px 30px -6px rgba(51,225,255,0.5);
  transition:transform .2s ease;
}
.wa-float:hover{transform:scale(1.08);}
.wa-float svg{color:#04141a;}

/* ---------- OVERFLOW SAFETY ----------
   Flex/grid children default to min-width:auto, which stops them
   shrinking below their content's natural width and can push the
   whole layout wider than the screen. Forcing min-width:0 here
   lets text wrap normally instead. */
.hero-grid > *, .hero-right, .editor, .editor-body,
.about-grid > *, .contact-grid > *, .fact, .fact .label,
.contact-row, .contact-row > div, .tl-item, .tl-item > div,
.skill-card, .proj-card, .proj-body{
  min-width:0;
}

/* ---------- RESPONSIVE ---------- */
@media (min-width:861px){
  .id-photo{aspect-ratio:4/3;}
}
@media (max-width:860px){
  .hero-grid, .about-grid, .contact-grid{grid-template-columns:1fr;}
  .skills-grid{grid-template-columns:repeat(2,1fr);}
  .projects-grid{grid-template-columns:1fr;}
  .edu-grid{grid-template-columns:1fr;}
  .section{padding:72px 0;}
  .hero-right{max-width:320px;}
}
@media (max-width:520px){
  .skills-grid{grid-template-columns:1fr;}
  .tl-item{grid-template-columns:1fr; gap:6px;}
  .nav-cta{display:none;}
  .hero-right{max-width:100%;}
  .editor-body{font-size:12px; padding:18px 16px;}
  .wrap{padding:0 18px;}
}

/* ---------- CONTACT (moved from inline styles) ---------- */
.section.no-border{border-bottom:none;}
.contact-title{margin-bottom:16px;}
.contact-intro{color:var(--text-muted); margin-bottom:28px;}
.contact-form .btn-submit{align-self:flex-start; border:none;}
