/* ═══════════════════════════════════════════════════
   SYNTHETIX ARCH  v4  — Miguel González Portfolio
   KEY FIXES:
   · Hero elements start VISIBLE (JS sets opacity:0 then
     transitions to 1 — never depends on CSS forwards fill)
   · Canvas z-index:0, hero content z-index:2 — no occlusion
   · Chatbox panel uses position:fixed, not absolute
   · Responsive: 4 breakpoints 1200/960/600/380px
   · Material Symbols for edu & chatbox icons
═══════════════════════════════════════════════════ */

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

/* ── TOKENS ── */
:root {
  --bg:         #0a0e16;
  --bg-low:     #0f131c;
  --bg-card:    #151a24;
  --bg-high:    #1a202b;
  --bg-highest: #202632;
  --teal:       #00FFD1;
  --teal-dim:   #00e9bf;
  --teal-pale:  rgba(0,255,209,.08);
  --white:      #ebedfa;
  --muted:      #a7abb6;
  --outline-v:  rgba(255,255,255,.07);
  --font-h:     'Space Grotesk', sans-serif;
  --font-b:     'Inter', sans-serif;
  --nav-h:      68px;
  --ease:       cubic-bezier(.16,1,.3,1);
}
[data-theme="light"] {
  --bg:         #f0f4ff;
  --bg-low:     #e8edf7;
  --bg-card:    #dde3f0;
  --bg-high:    #d0d8eb;
  --bg-highest: #c4cde4;
  --teal:       #007a62;
  --teal-dim:   #005a47;
  --teal-pale:  rgba(0,122,98,.08);
  --white:      #0f131c;
  --muted:      #3a4050;
  --outline-v:  rgba(0,0,0,.08);
}

/* ── CURSOR (desktop pointer only) ── */
@media (hover:hover) and (pointer:fine) {
  * { cursor: none; }
  #cursor {
    width:10px; height:10px; border-radius:50%;
    background:var(--teal); position:fixed; z-index:9999;
    pointer-events:none; transform:translate(-50%,-50%);
    transition:transform .08s,width .2s,height .2s;
    mix-blend-mode:difference;
  }
  #cursor-ring {
    width:34px; height:34px; border-radius:50%;
    border:1px solid rgba(0,255,209,.45); position:fixed; z-index:9998;
    pointer-events:none; transform:translate(-50%,-50%);
    transition:left .15s var(--ease),top .15s var(--ease),width .25s,height .25s;
  }
  #cursor.cursor-grow  { width:18px; height:18px; }
  #cursor-ring.ring-grow { width:56px; height:56px; }
}
@media not all and (hover:hover) { #cursor,#cursor-ring { display:none !important; } }

/* ── BASE ── */
html { scroll-behavior:smooth; overflow-x:hidden; }
body { font-family:var(--font-b); background:var(--bg); color:var(--white); line-height:1.6; overflow-x:hidden; transition:background .4s,color .4s; }
.container { max-width:1240px; margin:0 auto; padding:0 2rem; position:relative; z-index:2; }

/* ── LOADER ── */
#loader {
  position:fixed; inset:0; background:#000; z-index:10000;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:18px;
  transition:opacity .5s,visibility .5s;
}
.loader-text { font-family:var(--font-h); font-size:.62rem; font-weight:600; letter-spacing:.28em; text-transform:uppercase; color:var(--teal); }
.loader-bar-wrap { width:180px; height:1px; background:rgba(255,255,255,.07); position:relative; overflow:hidden; }
.loader-bar { position:absolute; inset:0; background:linear-gradient(90deg,transparent,var(--teal),transparent); animation:loaderSweep 1.1s ease-in-out forwards; }
@keyframes loaderSweep { 0%{width:0;left:0} 50%{width:60%;left:20%} 100%{width:0;left:100%} }

/* ════════════════════
   NAV
════════════════════ */
.nav {
  position:fixed; top:0; left:0; right:0; height:var(--nav-h);
  display:flex; align-items:center; justify-content:space-between;
  padding:0 2rem; z-index:1000; transition:background .4s,border-color .4s;
}
.nav.scrolled { background:rgba(10,14,22,.92); backdrop-filter:blur(18px); -webkit-backdrop-filter:blur(18px); border-bottom:1px solid var(--outline-v); }
[data-theme="light"] .nav.scrolled { background:rgba(240,244,255,.92); }
.nav__logo { font-family:var(--font-h); font-size:1.1rem; font-weight:700; color:var(--teal); flex-shrink:0; }
.nav__links { display:flex; gap:1.6rem; list-style:none; }
.nav__link { font-size:.68rem; font-weight:600; letter-spacing:.1em; text-transform:uppercase; color:var(--muted); text-decoration:none; position:relative; transition:color .2s; white-space:nowrap; }
.nav__link::after { content:''; position:absolute; bottom:-3px; left:0; width:0; height:1px; background:var(--teal); transition:width .3s var(--ease); }
.nav__link:hover { color:var(--white); }
.nav__link:hover::after { width:100%; }
.nav__controls { display:flex; align-items:center; gap:.9rem; flex-shrink:0; }
.lang-toggle { display:flex; align-items:center; gap:.3rem; font-size:.65rem; font-weight:700; letter-spacing:.06em; }
.lang-toggle__opt { color:var(--muted); transition:color .2s; }
.lang-toggle__opt.active { color:var(--teal); }
.lang-toggle__sep { opacity:.3; }
.theme-toggle { display:flex; align-items:center; gap:.35rem; background:none; border:none; font-size:.75rem; }
.theme-toggle__track { width:32px; height:17px; background:var(--bg-high); border-radius:9px; position:relative; border:1px solid var(--outline-v); }
.theme-toggle__thumb { position:absolute; top:2px; left:2px; width:11px; height:11px; border-radius:50%; background:var(--teal); transition:transform .22s var(--ease); }
[data-theme="light"] .theme-toggle__thumb { transform:translateX(15px); }
.theme-toggle__icon { opacity:.5; }
.nav__burger { display:none; flex-direction:column; gap:5px; background:none; border:none; padding:6px; }
.nav__burger span { display:block; width:20px; height:1.5px; background:var(--muted); transition:all .3s; }
.nav__burger.open span:nth-child(1) { transform:rotate(45deg) translate(4.5px,4.5px); }
.nav__burger.open span:nth-child(2) { opacity:0; }
.nav__burger.open span:nth-child(3) { transform:rotate(-45deg) translate(4.5px,-4.5px); }

/* ════════════════════
   HERO
   Elements start VISIBLE — JS sets opacity:0
   before animating in. If JS fails, content shows.
════════════════════ */
.hero {
  position:relative; overflow:hidden;
  min-height:100vh; display:flex; flex-direction:column; justify-content:center;
  padding-top:var(--nav-h);
}
/* Subtle data-grid overlay */
.hero::after {
  content:''; position:absolute; inset:0; pointer-events:none; z-index:0;
  background-image:
    linear-gradient(rgba(0,255,209,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,209,.028) 1px, transparent 1px);
  background-size:60px 60px;
  mask-image:radial-gradient(ellipse 80% 60% at 50% 50%, black 40%, transparent 100%);
  -webkit-mask-image:radial-gradient(ellipse 80% 60% at 50% 50%, black 40%, transparent 100%);
}
[data-theme="light"] .hero::after { opacity:.4; }

/* Canvas: z-index 0, content sits above at z-index 2 */
#neuralCanvas {
  position:absolute; top:0; left:0;
  display:block; pointer-events:none;
  z-index:0;
  /* opacity set to 1 — canvas draws itself */
}

.hero__blob {
  position:absolute; border-radius:50%;
  filter:blur(90px); pointer-events:none;
  z-index:0; /* behind content */
  animation:blobFloat 8s ease-in-out infinite alternate;
}
.hero__blob--1 { width:700px; height:700px; background:radial-gradient(circle,rgba(0,255,209,.22) 0%,transparent 70%); top:-200px; right:-80px; opacity:.85; }
.hero__blob--2 { width:500px; height:500px; background:radial-gradient(circle,rgba(26,55,90,.7) 0%,transparent 70%); bottom:0; left:-80px; opacity:.85; animation-delay:-4s; }
@keyframes blobFloat { from{transform:scale(1) translate(0,0)} to{transform:scale(1.07) translate(25px,-25px)} }

.code-float { position:absolute; font-family:'Courier New',monospace; font-size:.68rem; color:var(--teal); opacity:0; white-space:nowrap; pointer-events:none; user-select:none; z-index:1; animation:codeFloat linear infinite; }
@keyframes codeFloat { 0%{transform:translateY(0);opacity:0} 8%{opacity:.065} 90%{opacity:.065} 100%{transform:translateY(-90px);opacity:0} }

.hero__inner {
  position:relative; z-index:2; /* always above canvas */
  max-width:1240px; margin:0 auto; width:100%; padding:0 2rem;
  display:grid; grid-template-columns:1fr 280px; gap:5rem; align-items:center;
}

/* Hero elements — visible by default, JS will animate them */
.avail-badge {
  display:inline-flex; align-items:center; gap:.5rem;
  border:1px solid rgba(0,255,209,.25); border-radius:2px;
  padding:.38rem .85rem; font-size:.58rem; font-weight:700;
  letter-spacing:.12em; text-transform:uppercase; color:var(--teal);
  margin-bottom:1.4rem; width:fit-content; background:rgba(0,255,209,.03);
}
.avail-badge__dot { width:5px; height:5px; border-radius:50%; background:var(--teal); animation:pulse 2s infinite; }
.hero__pre { font-size:.58rem; font-weight:600; letter-spacing:.2em; text-transform:uppercase; color:var(--muted); margin-bottom:.7rem; display:flex; align-items:center; gap:.75rem; }
.hero__pre::before { content:""; display:block; width:28px; height:1px; background:var(--teal); flex-shrink:0; }
.hero__name { font-family:var(--font-h); font-size:clamp(3.5rem,8.5vw,8rem); line-height:.95; font-weight:700; letter-spacing:-.05em; margin-bottom:1rem; }
.hero__name .line1 { color:var(--white); display:block; }
.hero__name .line2 { display:block; font-family:'Playfair Display',Georgia,serif; font-style:italic; font-weight:700; background:linear-gradient(90deg,var(--teal) 0%,#2EFFF3 55%,var(--teal-dim) 100%); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; background-size:200%; animation:gradientShift 4s ease infinite; }
@keyframes gradientShift { 0%,100%{background-position:0%} 50%{background-position:100%} }
.hero__tagline { font-size:.6rem; font-weight:700; letter-spacing:.18em; text-transform:uppercase; color:var(--teal); margin-bottom:1.1rem; padding-top:1.2rem; border-top:1px solid var(--outline-v); width:fit-content; }
.hero__type-wrap { font-size:1rem; color:var(--muted); margin-bottom:2rem; min-height:1.6rem; }
#typewriter { color:var(--white); font-weight:500; }
.cursor-blink { display:inline-block; width:2px; height:.95em; background:var(--teal); margin-left:2px; vertical-align:text-bottom; animation:blink .8s step-end infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }
.hero__stats { display:flex; gap:2rem; margin-bottom:2.4rem; }
.hero__stat-num { font-family:var(--font-h); font-size:1.85rem; font-weight:700; color:var(--white); line-height:1; display:block; }
.hero__stat-accent { color:var(--teal); }
.hero__stat-label { font-size:.56rem; font-weight:600; letter-spacing:.1em; text-transform:uppercase; color:var(--muted); margin-top:.18rem; }
.hero__stat-divider { width:1px; background:var(--outline-v); align-self:stretch; }
.hero__cta-group { display:flex; gap:.75rem; flex-wrap:wrap; align-items:center; }
.btn-mag { position:relative; display:inline-block; }

/* ── BUTTONS ── */
.btn { display:inline-flex; align-items:center; justify-content:center; gap:.45rem; font-family:var(--font-h); font-size:.68rem; font-weight:700; letter-spacing:.1em; text-transform:uppercase; text-decoration:none; padding:.82rem 1.9rem; border:none; border-radius:2px; position:relative; overflow:hidden; transition:box-shadow .3s,transform .2s; }
.btn--primary { background:var(--teal); color:#003d2f; }
.btn--primary::before { content:''; position:absolute; inset:0; background:linear-gradient(90deg,transparent,rgba(255,255,255,.18),transparent); transform:translateX(-100%); transition:transform .5s var(--ease); }
.btn--primary:hover::before { transform:translateX(100%); }
.btn--primary:hover { box-shadow:0 0 28px rgba(0,255,209,.4); }
.btn--ghost { background:rgba(32,38,50,.55); color:var(--teal); border:1px solid rgba(0,255,209,.2); backdrop-filter:blur(10px); }
.btn--ghost:hover { border-color:var(--teal); box-shadow:0 0 18px rgba(0,255,209,.14); color:var(--white); }
.btn--full { width:100%; }
.btn--cv { background:transparent; color:var(--muted); border:1px solid var(--outline-v); font-family:var(--font-h); font-size:.68rem; font-weight:600; letter-spacing:.08em; text-transform:uppercase; text-decoration:none; padding:.82rem 1.4rem; border-radius:2px; display:inline-flex; align-items:center; gap:.45rem; transition:color .25s,border-color .25s,background .25s; cursor:pointer; }
.btn--cv:hover { color:var(--white); border-color:rgba(255,255,255,.2); background:rgba(255,255,255,.04); }

/* Hero photo */
.hero__photo-wrap { position:relative; z-index:2; }
.hero__photo-glass { background:rgba(21,26,36,.6); backdrop-filter:blur(18px); -webkit-backdrop-filter:blur(18px); border-radius:4px; padding:.7rem; border:1px solid rgba(0,255,209,.2); box-shadow:0 0 55px rgba(0,255,209,.08),0 28px 70px rgba(0,0,0,.5); position:relative; }
.hero__photo-glass::before { content:''; position:absolute; inset:-1px; border-radius:4px; background:linear-gradient(135deg,rgba(0,255,209,.38),transparent 40%,transparent 60%,rgba(0,255,209,.18)); pointer-events:none; z-index:0; }
.hero__photo { width:100%; aspect-ratio:2/3; object-fit:cover; border-radius:2px; display:block; position:relative; z-index:1; filter:grayscale(20%); transition:filter .4s; }
.hero__photo:hover { filter:grayscale(0%); }
.hero__photo-overlay { position:absolute; bottom:.7rem; left:.7rem; right:.7rem; z-index:2; display:flex; justify-content:space-between; align-items:flex-end; gap:.45rem; }
.hero__photo-tag { background:rgba(10,14,22,.85); backdrop-filter:blur(8px); border:1px solid rgba(0,255,209,.2); border-radius:2px; padding:.38rem .7rem; font-size:.58rem; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--teal); }
.hero__photo-status { background:rgba(0,255,209,.12); border:1px solid rgba(0,255,209,.3); border-radius:2px; padding:.38rem .55rem; font-size:.55rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--teal); display:flex; align-items:center; gap:.28rem; }
.hero__photo-status::before { content:''; width:5px; height:5px; border-radius:50%; background:var(--teal); animation:pulse 2s infinite; }
.float-label { position:absolute; background:rgba(21,26,36,.85); backdrop-filter:blur(10px); border:1px solid rgba(0,255,209,.15); border-radius:2px; padding:.45rem .7rem; font-family:'Courier New',monospace; font-size:.58rem; color:var(--teal); z-index:3; animation:floatLabel 3s ease-in-out infinite alternate; }
.float-label--1 { top:18px; right:-38px; }
.float-label--2 { bottom:78px; left:-48px; animation-delay:-1.5s; }
@keyframes floatLabel { from{transform:translateY(0)} to{transform:translateY(-9px)} }
.hero__scroll { position:absolute; bottom:1.8rem; left:50%; transform:translateX(-50%); display:flex; flex-direction:column; align-items:center; gap:.45rem; font-size:.52rem; font-weight:600; letter-spacing:.2em; text-transform:uppercase; color:var(--muted); z-index:2; }
.scroll-mouse { width:17px; height:26px; border:1px solid rgba(0,255,209,.28); border-radius:8px; display:flex; justify-content:center; padding-top:4px; }
.scroll-mouse::before { content:''; width:3px; height:5px; background:var(--teal); border-radius:2px; animation:scrollDot 1.8s ease-in-out infinite; }
@keyframes scrollDot { 0%,100%{transform:translateY(0);opacity:1} 80%{transform:translateY(7px);opacity:0} }

/* ── TICKER ── */
.ticker { background:var(--bg-low); border-top:1px solid var(--outline-v); border-bottom:1px solid var(--outline-v); padding:.7rem 0; overflow:hidden; position:relative; z-index:2; }
.ticker__track { display:flex; width:max-content; animation:tickerScroll 28s linear infinite; }
.ticker:hover .ticker__track { animation-play-state:paused; }
.ticker__item { display:flex; align-items:center; gap:1.4rem; padding:0 1.4rem; font-size:.6rem; font-weight:700; letter-spacing:.12em; text-transform:uppercase; color:var(--muted); white-space:nowrap; transition:color .2s; }
.ticker__item:hover { color:var(--teal); }
.ticker__sep { color:var(--teal); opacity:.35; }
@keyframes tickerScroll { from{transform:translateX(0)} to{transform:translateX(-50%)} }

/* ── SECTIONS ── */
.section { padding:6rem 0; position:relative; }
.section--alt { background:var(--bg-low); }
.pulse-line { position:absolute; top:0; left:0; right:0; height:1px; background:linear-gradient(90deg,transparent,var(--teal),transparent); opacity:.12; }
.pulse-line::after { content:''; position:absolute; top:0; left:-200px; width:200px; height:1px; background:linear-gradient(90deg,transparent,var(--teal),transparent); animation:pulseLineSweep 4s ease-in-out infinite; opacity:.55; }
@keyframes pulseLineSweep { 0%{left:-200px} 100%{left:100%} }
.section__header { margin-bottom:3.5rem; position:relative; }
.section__num { position:absolute; right:0; top:-1rem; font-family:var(--font-h); font-size:7rem; font-weight:700; line-height:1; color:var(--white); opacity:.04; letter-spacing:-.04em; user-select:none; pointer-events:none; }
.section__pre { display:block; font-size:.58rem; font-weight:600; letter-spacing:.2em; text-transform:uppercase; color:var(--teal); margin-bottom:.45rem; }
.section__title { font-family:var(--font-h); font-size:clamp(2rem,4.5vw,3.2rem); font-weight:700; letter-spacing:-.04em; color:var(--white); line-height:1.05; }
.section__title em { font-family:'Playfair Display',Georgia,serif; font-style:italic; }

/* ── ABOUT ── */
.about__badge {
  display:inline-flex; align-items:center; gap:.5rem; margin-bottom:1.4rem;
  padding:.38rem .9rem; border-radius:2px;
  background:rgba(0,255,209,.05); border:1px solid rgba(0,255,209,.18);
  font-size:.62rem; font-weight:600; letter-spacing:.08em; text-transform:uppercase; color:var(--teal);
  max-width:100%; flex-wrap:wrap;
}
.about__badge-dot { width:6px; height:6px; border-radius:50%; background:var(--teal); animation:pulse 2s infinite; flex-shrink:0; }
.about__badge-sep { opacity:.4; }
.about__grid { display:grid; grid-template-columns:1.4fr 1fr; gap:4rem; align-items:start; }
.about__lead { font-size:1.2rem; font-weight:300; line-height:1.75; color:var(--white); margin-bottom:1.4rem; letter-spacing:-.01em; }
.about__body { font-size:.875rem; line-height:1.85; color:var(--muted); margin-bottom:.9rem; }
.about__tags { display:flex; flex-wrap:wrap; gap:.45rem; margin-top:1.4rem; }
.tag { font-size:.58rem; font-weight:700; letter-spacing:.07em; text-transform:uppercase; padding:.3rem .7rem; border-radius:2px; background:var(--bg-high); color:var(--muted); border:1px solid var(--outline-v); transition:background .2s,color .2s,border-color .2s; }
.tag:hover { background:var(--teal-pale); color:var(--teal); border-color:rgba(0,255,209,.2); }
.about__stats { display:flex; flex-direction:column; gap:.7rem; }
.stat-card { background:var(--bg-card); border-radius:4px; padding:1.6rem 1.9rem; border:1px solid transparent; transition:background .25s,border-color .25s,transform .25s; position:relative; overflow:hidden; }
.stat-card::before { content:''; position:absolute; top:0; left:0; right:0; height:1px; background:linear-gradient(90deg,transparent,var(--teal),transparent); opacity:0; transition:opacity .3s; }
.stat-card:hover { background:var(--bg-high); border-color:rgba(0,255,209,.1); transform:translateX(4px); }
.stat-card:hover::before { opacity:1; }
.stat-card__num { font-family:var(--font-h); font-size:2.1rem; font-weight:700; color:var(--teal); display:block; line-height:1; margin-bottom:.35rem; }
.stat-card__label { font-size:.62rem; font-weight:600; letter-spacing:.1em; text-transform:uppercase; color:var(--muted); }

/* ── TIMELINE ── */
.timeline { display:flex; flex-direction:column; }
.timeline__item { display:grid; grid-template-columns:44px 1fr; gap:0 1.4rem; }
.timeline__track { display:flex; flex-direction:column; align-items:center; padding-top:.22rem; }
.timeline__dot { width:10px; height:10px; border-radius:50%; background:var(--teal); flex-shrink:0; box-shadow:0 0 0 3px rgba(0,255,209,.18),0 0 14px rgba(0,255,209,.28); }
.timeline__line { width:1px; flex:1; background:linear-gradient(180deg,var(--teal) 0%,rgba(0,255,209,.04) 100%); margin-top:.5rem; min-height:40px; }
.timeline__item:last-child .timeline__line { display:none; }
.timeline__card { background:var(--bg-card); border-radius:4px; padding:1.9rem; margin-bottom:1.4rem; border:1px solid var(--outline-v); position:relative; overflow:hidden; transition:border-color .3s,transform .3s; }
.timeline__card::before { content:''; position:absolute; top:0; left:0; bottom:0; width:2px; background:linear-gradient(180deg,var(--teal),transparent); opacity:0; transition:opacity .3s; }
.timeline__card:hover { border-color:rgba(0,255,209,.14); transform:translateX(4px); }
.timeline__card:hover::before { opacity:1; }
.timeline__header { display:flex; gap:.9rem; margin-bottom:.9rem; align-items:flex-start; }
.timeline__logo-wrap { width:42px; height:42px; background:var(--bg-high); border-radius:4px; display:flex; align-items:center; justify-content:center; flex-shrink:0; overflow:hidden; padding:5px; }
.timeline__logo { width:100%; height:100%; object-fit:contain; }
.timeline__logo-fallback { font-size:.58rem; font-weight:700; color:var(--muted); }
.timeline__role { font-family:var(--font-h); font-size:1.2rem; font-weight:700; color:var(--white); letter-spacing:-.02em; }
.timeline__company { font-size:.72rem; color:var(--muted); margin:.22rem 0; }
.timeline__date { font-size:.58rem; font-weight:700; letter-spacing:.07em; text-transform:uppercase; color:var(--teal); background:rgba(0,255,209,.07); padding:.18rem .55rem; border-radius:2px; display:inline-block; border:1px solid rgba(0,255,209,.14); }
.timeline__desc { font-size:.82rem; color:var(--muted); line-height:1.75; margin-bottom:.9rem; }
.timeline__bullets { list-style:none; display:flex; flex-direction:column; gap:.45rem; }
.timeline__bullets li { font-size:.78rem; color:var(--muted); padding-left:1.2rem; position:relative; line-height:1.6; }
.timeline__bullets li::before { content:'▸'; position:absolute; left:0; color:var(--teal); font-size:.62rem; }

/* ── TECH ECOSYSTEM ── */
.tech-ecosystem { padding:1.6rem; background:var(--bg-card); border-radius:4px; border:1px solid var(--outline-v); }
.tech-eco__row { display:flex; flex-wrap:wrap; gap:.55rem; }
.tech-eco__badge {
  font-size:.65rem; font-weight:700; letter-spacing:.07em; text-transform:uppercase;
  padding:.35rem .85rem; border-radius:3px;
  background:var(--bg-high); color:var(--muted); border:1px solid var(--outline-v);
  transition:background .2s,color .2s,border-color .2s,transform .2s; cursor:default;
}
.tech-eco__badge:hover { background:rgba(0,255,209,.07); color:var(--teal); border-color:rgba(0,255,209,.22); transform:translateY(-2px); }
.tech-eco__badge--accent { background:rgba(0,255,209,.06); color:var(--teal); border-color:rgba(0,255,209,.18); }
.tech-eco__badge--accent:hover { background:rgba(0,255,209,.12); }

/* ── SKILLS ── */
.skills__grid { display:grid; grid-template-columns:1fr 1fr; gap:.9rem; margin-bottom:2rem; }
.skill-group { background:var(--bg-card); border-radius:4px; padding:1.9rem; border:1px solid var(--outline-v); transition:border-color .3s; }
.skill-group:hover { border-color:rgba(0,255,209,.1); }
.skill-group__title { font-size:.58rem; font-weight:700; letter-spacing:.15em; text-transform:uppercase; color:var(--teal); margin-bottom:1.4rem; }
.skill-bar { margin-bottom:1.2rem; }
.skill-bar:last-child { margin-bottom:0; }
.skill-bar__header { display:flex; justify-content:space-between; margin-bottom:.35rem; }
.skill-bar__name { font-size:.78rem; font-weight:500; color:var(--white); }
.skill-bar__pct { font-size:.62rem; font-weight:600; color:var(--teal); font-family:var(--font-h); }
.skill-bar__track { height:3px; background:rgba(255,255,255,.05); border-radius:2px; overflow:hidden; }
.skill-bar__fill { height:100%; width:0; background:linear-gradient(90deg,var(--teal),#2EFFF3); border-radius:2px; transition:width 1.4s cubic-bezier(.4,0,.2,1); position:relative; }
.skill-bar__fill::after { content:''; position:absolute; right:0; top:50%; transform:translateY(-50%); width:6px; height:6px; border-radius:50%; background:#fff; box-shadow:0 0 7px var(--teal); opacity:0; transition:opacity .3s 1.4s; }
.skill-bar.animated .skill-bar__fill::after { opacity:1; }
.soft-skills__title { font-size:.58rem; font-weight:700; letter-spacing:.15em; text-transform:uppercase; color:var(--teal); margin-bottom:.9rem; }
.soft-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:.7rem; }
.soft-card { background:var(--bg-card); border-radius:4px; padding:1.1rem 1.4rem; display:flex; align-items:center; gap:.7rem; border:1px solid var(--outline-v); transition:background .2s,border-color .2s,transform .25s; }
.soft-card:hover { background:var(--bg-high); border-color:rgba(0,255,209,.1); transform:translateY(-3px); }
.soft-card__icon { color:var(--teal); flex-shrink:0; }
.soft-card span { font-size:.78rem; color:var(--muted); }

/* ── EDUCATION — Material Symbol badges ── */
.edu__grid { display:grid; grid-template-columns:1fr 1fr; gap:.75rem; margin-bottom:2.4rem; }
.edu-card { background:var(--bg-card); border-radius:4px; padding:1.9rem; display:flex; gap:1.1rem; border:1px solid var(--outline-v); transition:border-color .3s,transform .3s; position:relative; overflow:hidden; }
.edu-card::after { content:''; position:absolute; inset:0; background:linear-gradient(135deg,rgba(0,255,209,.025),transparent 55%); opacity:0; transition:opacity .3s; }
.edu-card:hover { border-color:rgba(0,255,209,.14); transform:translateY(-3px); }
.edu-card:hover::after { opacity:1; }
.edu-card__badge {
  width:40px; height:40px; flex-shrink:0; margin-top:2px;
  background:rgba(0,255,209,.1); border:1px solid rgba(0,255,209,.22);
  border-radius:4px; display:flex; align-items:center; justify-content:center; color:var(--teal);
}
.edu-card__badge .material-symbols-outlined { font-size:20px; font-variation-settings:'FILL' 0,'wght' 300,'GRAD' 0,'opsz' 24; }
.edu-card__type { font-size:.58rem; font-weight:700; letter-spacing:.12em; text-transform:uppercase; color:var(--teal); display:block; margin-bottom:.35rem; }
.edu-card__title { font-family:var(--font-h); font-size:.95rem; font-weight:600; color:var(--white); margin-bottom:.22rem; line-height:1.3; }
.edu-card__inst { font-size:.7rem; color:var(--muted); margin-bottom:.7rem; }
.edu-card__desc { font-size:.76rem; color:var(--muted); line-height:1.7; }
.certs-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:.7rem; }
.cert-card { background:var(--bg-card); border-radius:4px; padding:1.1rem 1.4rem; display:flex; gap:.9rem; align-items:center; border:1px solid var(--outline-v); transition:background .2s,border-color .2s; }
.cert-card:hover { background:var(--bg-high); border-color:rgba(0,255,209,.1); }
.cert-card__logo-wrap { width:36px; height:36px; border-radius:3px; background:var(--bg-high); display:flex; align-items:center; justify-content:center; flex-shrink:0; overflow:hidden; padding:4px; }
.cert-card__logo { width:100%; height:100%; object-fit:contain; }
.cert-card__title { font-size:.7rem; font-weight:600; color:var(--white); line-height:1.3; }
.cert-card__date { font-size:.58rem; color:var(--muted); display:block; margin-top:.18rem; }

/* ── PROJECTS ── */
.projects__grid { display:grid; grid-template-columns:repeat(3,1fr); gap:1.1rem; }
.project-card {
  background:var(--bg-card); border-radius:4px; padding:1.9rem;
  border:1px solid var(--outline-v); position:relative; overflow:hidden;
  transition:border-color .3s var(--ease),transform .3s var(--ease),box-shadow .3s;
  display:flex; flex-direction:column; gap:.9rem; cursor:default;
}
.project-card::before {
  content:''; position:absolute; top:0; left:0; right:0; height:2px;
  background:linear-gradient(90deg,transparent,var(--teal),transparent);
  transform:scaleX(0); transition:transform .45s var(--ease);
}
.project-card:hover { border-color:rgba(0,255,209,.2); transform:translateY(-5px); box-shadow:0 20px 50px rgba(0,0,0,.35),0 0 0 1px rgba(0,255,209,.06); }
.project-card:hover::before { transform:scaleX(1); }
.project-card__top { display:flex; justify-content:space-between; align-items:flex-start; }
.project-card__icon {
  width:46px; height:46px; border-radius:4px; flex-shrink:0;
  background:rgba(0,255,209,.08); border:1px solid rgba(0,255,209,.2);
  display:flex; align-items:center; justify-content:center; color:var(--teal);
}
.project-card__links { display:flex; gap:.4rem; }
.project-card__context {
  font-size:.52rem; font-weight:700; letter-spacing:.1em; text-transform:uppercase;
  padding:.22rem .55rem; border-radius:2px;
  background:var(--bg-high); color:var(--muted); border:1px solid var(--outline-v);
  align-self:center;
}
.project-card__link {
  width:32px; height:32px; border-radius:3px; background:var(--bg-high);
  border:1px solid var(--outline-v); display:flex; align-items:center;
  justify-content:center; color:var(--muted); text-decoration:none;
  transition:color .2s,border-color .2s,background .2s; cursor:pointer;
}
.project-card__link:hover { color:var(--teal); border-color:rgba(0,255,209,.3); background:var(--bg-highest); }
.project-card__title { font-family:var(--font-h); font-size:1.05rem; font-weight:700; color:var(--white); letter-spacing:-.025em; line-height:1.25; }
.project-card__desc { font-size:.8rem; color:var(--muted); line-height:1.78; flex:1; }
.project-card__stack { display:flex; flex-wrap:wrap; gap:.35rem; margin-top:auto; padding-top:.35rem; }
.project-tag {
  font-size:.56rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase;
  padding:.22rem .6rem; border-radius:2px;
  background:rgba(0,255,209,.07); color:var(--teal); border:1px solid rgba(0,255,209,.16);
}

/* ── CONTACT ── */
.contact__grid { display:grid; grid-template-columns:1fr 1fr; gap:5rem; align-items:start; }
.contact__lead { font-size:.95rem; color:var(--muted); line-height:1.8; margin-bottom:1.9rem; }
.contact__items { display:flex; flex-direction:column; gap:.7rem; margin-bottom:1.9rem; }
.contact__item { display:flex; align-items:center; gap:.7rem; font-size:.85rem; color:var(--muted); text-decoration:none; transition:color .2s; }
.contact__item:hover { color:var(--teal); }
.contact__item-icon { font-size:.95rem; }
.social-links { display:flex; gap:.7rem; flex-wrap:wrap; }
.social-link { display:flex; align-items:center; gap:.45rem; padding:.48rem .95rem; border-radius:2px; border:1px solid var(--outline-v); font-size:.62rem; font-weight:600; letter-spacing:.06em; text-decoration:none; color:var(--muted); transition:all .2s; }
.social-link:hover { border-color:var(--teal); color:var(--teal); background:rgba(0,255,209,.04); }
.contact__form { display:flex; flex-direction:column; gap:1.2rem; }
.form-group { display:flex; flex-direction:column; gap:.35rem; }
.form-group label { font-size:.58rem; font-weight:700; letter-spacing:.12em; text-transform:uppercase; color:var(--muted); }
.form-group input,.form-group textarea { background:transparent; border:none; border-bottom:1px solid var(--outline-v); padding:.75rem 0; font-family:var(--font-b); font-size:.88rem; color:var(--white); outline:none; resize:none; transition:border-color .3s; }
.form-group input:focus,.form-group textarea:focus { border-bottom-color:var(--teal); }
.form-group input::placeholder,.form-group textarea::placeholder { color:rgba(167,171,182,.35); }

/* ── FOOTER ── */
.footer { background:#000; padding:1.9rem 0; border-top:1px solid var(--outline-v); }
.footer .container { display:flex; justify-content:space-between; align-items:center; }
.footer__copy { font-size:.62rem; color:var(--muted); letter-spacing:.04em; }
.footer__social { display:flex; gap:.9rem; }
.footer__social a { color:var(--muted); transition:color .2s; }
.footer__social a:hover { color:var(--teal); }

/* ════════════════════
   CHATBOX — fixed position, Material Icons
════════════════════ */
.chatbox { position:fixed; bottom:1.5rem; right:1.5rem; z-index:900; }

.chatbox__toggle {
  width:56px; height:56px; border-radius:50%;
  background:linear-gradient(135deg,var(--teal),#00b89a);
  border:none; color:#003d2f;
  display:flex; align-items:center; justify-content:center;
  position:relative;
  box-shadow:0 4px 18px rgba(0,255,209,.42);
  transition:transform .22s var(--ease),box-shadow .22s;
  animation:chatRing 3s ease-out infinite;
}
.chatbox__toggle:hover { transform:scale(1.08); box-shadow:0 6px 28px rgba(0,255,209,.58); }
@keyframes chatRing {
  0%  { box-shadow:0 4px 18px rgba(0,255,209,.42),0 0 0 0 rgba(0,255,209,.35); }
  65% { box-shadow:0 4px 18px rgba(0,255,209,.42),0 0 0 12px rgba(0,255,209,0); }
  100%{ box-shadow:0 4px 18px rgba(0,255,209,.42),0 0 0 0 rgba(0,255,209,0); }
}
.chatbox__toggle .material-symbols-outlined { font-size:24px; font-variation-settings:'FILL' 1,'wght' 400,'GRAD' 0,'opsz' 24; }
.chatbox__icon-close { display:none; }
.chatbox.open .chatbox__icon-open  { display:none; }
.chatbox.open .chatbox__icon-close { display:flex; }
.chatbox.open .chatbox__toggle     { animation:none; }

.chatbox__badge { position:absolute; top:-3px; right:-3px; width:18px; height:18px; border-radius:50%; background:#ff5252; color:#fff; border:2px solid var(--bg); font-size:.52rem; font-weight:700; display:flex; align-items:center; justify-content:center; }
.chatbox__badge.hidden { display:none; }

/* Panel: position:fixed so it is never clipped by a parent */
.chatbox__panel {
  position:fixed;
  bottom:90px; right:1.5rem;
  width:min(360px, calc(100vw - 2rem));
  background:var(--bg-card); border-radius:12px;
  border:1px solid var(--outline-v);
  box-shadow:0 16px 55px rgba(0,0,0,.6);
  overflow:hidden; display:none; flex-direction:column;
}
.chatbox.open .chatbox__panel { display:flex; animation:panelIn .28s var(--ease); }
@keyframes panelIn { from{opacity:0;transform:scale(.94) translateY(10px)} to{opacity:1;transform:none} }

.chatbox__header { display:flex; align-items:center; gap:.7rem; padding:.95rem 1.15rem; background:linear-gradient(135deg,rgba(0,255,209,.07),transparent); border-bottom:1px solid var(--outline-v); }
.chatbox__avatar { width:36px; height:36px; border-radius:50%; background:linear-gradient(135deg,var(--teal),#00b89a); display:flex; align-items:center; justify-content:center; font-size:.62rem; font-weight:700; color:#003d2f; flex-shrink:0; box-shadow:0 0 0 2px rgba(0,255,209,.25); }
.chatbox__header-name { font-size:.82rem; font-weight:600; color:var(--white); }
.chatbox__status { font-size:.6rem; color:var(--teal); display:flex; align-items:center; gap:.3rem; }
.chatbox__status::before { content:''; width:6px; height:6px; border-radius:50%; background:var(--teal); animation:pulse 2s infinite; }
.chatbox__close-btn { margin-left:auto; background:none; border:none; color:var(--muted); width:28px; height:28px; border-radius:50%; display:flex; align-items:center; justify-content:center; transition:background .2s,color .2s; }
.chatbox__close-btn:hover { background:var(--bg-highest); color:var(--white); }
.chatbox__close-btn .material-symbols-outlined { font-size:17px; font-variation-settings:'FILL' 0,'wght' 300,'GRAD' 0,'opsz' 24; }
.chatbox__messages { padding:.9rem; min-height:140px; max-height:230px; overflow-y:auto; display:flex; flex-direction:column; gap:.55rem; scrollbar-width:thin; scrollbar-color:rgba(255,255,255,.08) transparent; }
.chatbox__messages::-webkit-scrollbar { width:3px; }
.chatbox__messages::-webkit-scrollbar-thumb { background:rgba(255,255,255,.08); border-radius:2px; }
.chatbox__message { max-width:88%; padding:.6rem .85rem; border-radius:10px; font-size:.76rem; line-height:1.52; animation:msgIn .18s var(--ease); }
@keyframes msgIn { from{opacity:0;transform:translateY(5px)} to{opacity:1;transform:none} }
.chatbox__message--bot { background:var(--bg-high); color:var(--white); align-self:flex-start; border-bottom-left-radius:3px; }
.chatbox__message--bot strong { font-weight:600; color:var(--teal); }
.chatbox__message--bot em { font-style:italic; opacity:.9; }
.chatbox__message--bot code { background:rgba(255,255,255,.08); padding:.1em .35em; border-radius:3px; font-size:.72rem; font-family:monospace; }
.chatbox__message--bot a { color:var(--teal); text-decoration:underline; text-underline-offset:2px; }
.chatbox__message--bot a:hover { opacity:.8; }
.chatbox__message--bot ul { margin:.3rem 0; padding-left:1.1rem; }
.chatbox__message--bot li { margin-bottom:.15rem; }
.chatbox__message--user { background:linear-gradient(135deg,var(--teal),#00d4ae); color:#003d2f; align-self:flex-end; font-weight:500; border-bottom-right-radius:3px; }
.chatbox__input-row { display:flex; gap:.45rem; padding:.7rem .95rem; background:var(--bg-high); border-top:1px solid var(--outline-v); align-items:center; }
.chatbox__input { flex:1; background:var(--bg-card); border:1px solid var(--outline-v); border-radius:18px; padding:.48rem .85rem; font-family:var(--font-b); font-size:.76rem; color:var(--white); outline:none; transition:border-color .2s; }
.chatbox__input:focus { border-color:rgba(0,255,209,.28); }
.chatbox__input::placeholder { color:rgba(167,171,182,.45); }
/* Typing indicator */
.chatbox__typing { display:flex; align-items:center; gap:4px; padding:.7rem .85rem !important; }
.chatbox__typing span { width:6px; height:6px; border-radius:50%; background:var(--muted); display:block; animation:typingDot 1.2s ease-in-out infinite; }
.chatbox__typing span:nth-child(2) { animation-delay:.2s; }
.chatbox__typing span:nth-child(3) { animation-delay:.4s; }
@keyframes typingDot { 0%,80%,100%{transform:scale(.8);opacity:.4} 40%{transform:scale(1.1);opacity:1} }

.chatbox__send { width:32px; height:32px; border-radius:50%; background:var(--teal); border:none; display:flex; align-items:center; justify-content:center; color:#003d2f; flex-shrink:0; transition:transform .2s,box-shadow .2s; }
.chatbox__send:hover { transform:scale(1.1); box-shadow:0 0 10px rgba(0,255,209,.38); }
.chatbox__send .material-symbols-outlined { font-size:16px; font-variation-settings:'FILL' 1,'wght' 500,'GRAD' 0,'opsz' 24; }

/* ── SCROLL REVEAL ── */
.reveal { opacity:0; transform:translateY(28px); transition:opacity .7s var(--ease),transform .7s var(--ease); }
.reveal.visible { opacity:1; transform:none; }
.reveal--delay  { transition-delay:.15s; }
.reveal--delay2 { transition-delay:.3s; }

/* ── SHARED ANIMATIONS ── */
@keyframes pulse { 0%,100%{box-shadow:0 0 0 0 rgba(0,255,209,.5)} 50%{box-shadow:0 0 0 5px rgba(0,255,209,0)} }

/* ════════════════════════
   RESPONSIVE — ≤960px TABLET
════════════════════════ */
@media (max-width:960px) {
  .nav { padding:0 1.25rem; }
  .nav__links { display:none; position:fixed; top:var(--nav-h); left:0; right:0; background:rgba(10,14,22,.97); backdrop-filter:blur(18px); -webkit-backdrop-filter:blur(18px); padding:1.4rem 1.25rem; flex-direction:column; gap:.9rem; border-bottom:1px solid var(--outline-v); z-index:999; }
  .nav__links.open { display:flex; }
  .nav__burger { display:flex; }

  .hero__inner { grid-template-columns:1fr; gap:2.5rem; padding:2rem 1.25rem 3rem; text-align:center; }
  .avail-badge { margin:0 auto 1.4rem; }
  .hero__stats { justify-content:center; }
  .hero__cta-group { justify-content:center; }
  .hero__photo-wrap { display:flex; justify-content:center; order:-1; }
  .hero__photo-glass { max-width:200px; }
  .float-label { display:none; }

  .about__grid { grid-template-columns:1fr; gap:2.5rem; }
  .skills__grid { grid-template-columns:1fr; }
  .edu__grid { grid-template-columns:1fr; }
  .certs-grid { grid-template-columns:1fr 1fr; }
  .contact__grid { grid-template-columns:1fr; gap:3rem; }
  .soft-grid { grid-template-columns:1fr 1fr; }
}

/* ════════════════════════
   RESPONSIVE — ≤600px MOBILE
════════════════════════ */
@media (max-width:600px) {
  :root { --nav-h:58px; }
  .nav { padding:0 1rem; }
  .nav__logo { font-size:.95rem; }
  .container { padding:0 1rem; }
  .section { padding:3.5rem 0; }

  .hero__inner { padding:1.5rem 1rem 2.5rem; gap:2rem; }
  .hero__name { font-size:clamp(2.8rem,13vw,4rem); line-height:.92; }
  .hero__photo-glass { max-width:200px; }
  .hero__stats { flex-wrap:wrap; gap:1.1rem; }
  .hero__stat-divider { display:none; }
  .hero__cta-group { flex-direction:column; width:100%; }
  .hero__cta-group .btn-mag, .hero__cta-group .btn { width:100%; }

  .section__title { font-size:1.55rem; }
  .about__stats { gap:.5rem; }
  .stat-card { padding:1.2rem 1.4rem; }
  .timeline__item { grid-template-columns:30px 1fr; gap:0 .9rem; }
  .timeline__card { padding:1.2rem; }
  .edu__grid { grid-template-columns:1fr; }
  .certs-grid { grid-template-columns:1fr; }
  .soft-grid { grid-template-columns:1fr; }
  .contact__grid { gap:2.5rem; }
  .footer .container { flex-direction:column; gap:.7rem; text-align:center; }

  /* Chatbox mobile */
  .chatbox { bottom:.9rem; right:.9rem; }
  .chatbox__panel { bottom:76px; right:0; width:calc(100vw - 1.8rem); border-radius:12px; }
  .chatbox__messages { max-height:calc(100svh - 300px); min-height:120px; }
}

/* ════════════════════════
   RESPONSIVE — ≤380px SMALL
════════════════════════ */
@media (max-width:380px) {
  .hero__name { font-size:2.3rem; }
  .nav__controls { gap:.5rem; }
  .theme-toggle__icon { display:none; }
  .lang-toggle { font-size:.6rem; }
}

/* ════════════════════════
   RESPONSIVE — Projects
════════════════════════ */
@media (max-width:960px) {
  .projects__grid { grid-template-columns:1fr 1fr; }
}
@media (max-width:600px) {
  .projects__grid { grid-template-columns:1fr; gap:.7rem; }
  .project-card { padding:1.4rem; }
}

/* ════════════════════════
   CURSOR POINTER — Interactives
════════════════════════ */
a, button,
.lang-toggle__opt,
.tag, .soft-card, .stat-card,
.social-link, .contact__item,
.project-card__link, .theme-toggle,
.nav__burger { cursor: pointer; }

/* ════════════════════════
   CONTACT ICON — SVG support
════════════════════════ */
.contact__item-icon {
  display:flex; align-items:center; justify-content:center;
  width:20px; flex-shrink:0; color:var(--teal);
}

/* ════════════════════════
   THEME TOGGLE — SVG icons
════════════════════════ */
.theme-toggle__icon {
  display:flex; align-items:center; justify-content:center;
  opacity:.55; color:var(--muted);
}

/* ════════════════════════
   LIGHT MODE — Contrast fixes
════════════════════════ */
[data-theme="light"] .project-card { box-shadow:0 2px 12px rgba(0,0,0,.06); }
[data-theme="light"] .project-card:hover { box-shadow:0 16px 40px rgba(0,0,0,.12),0 0 0 1px rgba(0,122,98,.08); }
[data-theme="light"] .project-tag { background:rgba(0,122,98,.08); border-color:rgba(0,122,98,.2); }
[data-theme="light"] .about__lead { color:var(--white); }
[data-theme="light"] .timeline__card { box-shadow:0 2px 8px rgba(0,0,0,.05); }
[data-theme="light"] .edu-card { box-shadow:0 2px 8px rgba(0,0,0,.05); }

/* ════════════════════════
   PREFERS-REDUCED-MOTION
════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  #neuralCanvas { display:none; }
  .ticker__track { animation:none; }
  .hero__blob { animation:none; }
  .code-float { opacity:.065; animation:none; }
  .avail-badge__dot,
  .hero__photo-status::before,
  .chatbox__status::before,
  .chatbox__toggle { animation:none !important; }
  .loader-bar { animation:none; width:100%; }
  .pulse-line::after { animation:none; }
  .hero__name .line2 { animation:none; background-position:0%; }
}
