/* ============================================================
   S. M. Yonus Saiedy — Personal Portfolio
   Theme: clean, modern, professional · light + dark
   ============================================================ */

:root{
  --bg:           #f7f8fb;
  --bg-soft:      #ffffff;
  --bg-alt:       #f1f3f8;
  --card:         #ffffff;
  --line:         #e6e9f0;
  --text:         #0f172a;
  --text-soft:    #475569;
  --muted:        #94a3b8;
  --primary:      #2563eb;
  --primary-2:    #1d4ed8;
  --primary-soft: #dbeafe;
  --accent:       #06b6d4;
  --ok:           #16a34a;
  --warn:         #f59e0b;
  --danger:       #ef4444;
  --shadow:       0 10px 30px -10px rgba(15,23,42,.15);
  --shadow-sm:    0 4px 14px -6px rgba(15,23,42,.12);
  --r-sm: 8px;
  --r:    14px;
  --r-lg: 22px;
  --container: 1180px;
  --hd-h: 70px;
  --font: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
}

[data-theme="dark"]{
  --bg:           #0b1020;
  --bg-soft:      #0f1530;
  --bg-alt:       #0c1226;
  --card:         #121a36;
  --line:         #1f2a4d;
  --text:         #e6ecff;
  --text-soft:    #b6c0e0;
  --muted:        #7f8bb2;
  --primary:      #60a5fa;
  --primary-2:    #3b82f6;
  --primary-soft: #1e2b55;
  --accent:       #22d3ee;
  --shadow:       0 14px 40px -12px rgba(0,0,0,.55);
  --shadow-sm:    0 6px 18px -8px rgba(0,0,0,.45);
}

*{ box-sizing:border-box; margin:0; padding:0; }
html{ scroll-behavior:smooth; }
body{
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x:hidden;
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; transition:color .25s; }
a:hover{ color: var(--primary); }
button{ font-family:inherit; cursor:pointer; border:none; background:transparent; color:inherit; }
ul{ list-style:none; }

.container{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ================= TOPBAR ================= */
.topbar{
  position: fixed; top:0; left:0; right:0;
  height: var(--hd-h);
  background: color-mix(in srgb, var(--bg-soft) 85%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  z-index: 1000;
  transition: box-shadow .25s, background .25s;
}
.topbar.scrolled{ box-shadow: var(--shadow-sm); }
.nav{ display:flex; align-items:center; justify-content:space-between; height:100%; }

.brand{ display:flex; align-items:center; gap:.6rem; font-weight:700; }
.brand-mark{
  width:38px; height:38px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color:#fff; border-radius:10px;
  display:grid; place-items:center;
  font-size:.95rem; letter-spacing:.5px;
  box-shadow: var(--shadow-sm);
}
.brand-text{ font-size:1.05rem; }

.nav-links{ display:flex; gap:.4rem; align-items:center; }
.nav-links a{
  padding:.55rem .9rem;
  border-radius: 999px;
  font-weight:500; font-size:.93rem;
  color: var(--text-soft);
}
.nav-links a:hover{ background: var(--primary-soft); color: var(--primary); }

.nav-actions{ display:flex; gap:.5rem; align-items:center; }
.lang-switch{
  display:flex; gap:0;
  background: var(--bg-alt);
  border:1px solid var(--line);
  border-radius:999px; padding:3px;
}
.lang-btn{
  padding:.35rem .7rem;
  border-radius:999px;
  font-weight:600; font-size:.8rem;
  color: var(--text-soft);
}
.lang-btn.active{ background: var(--primary); color:#fff; }

.theme-toggle, .menu-toggle{
  width:38px; height:38px;
  border-radius:10px;
  display:grid; place-items:center;
  background: var(--bg-alt);
  border:1px solid var(--line);
  color: var(--text-soft);
  transition: all .2s;
}
.theme-toggle:hover, .menu-toggle:hover{ color: var(--primary); border-color: var(--primary); }
.menu-toggle{ display:none; }

/* ================= HERO ================= */
.hero{
  position:relative;
  padding: calc(var(--hd-h) + 4rem) 0 0;
  overflow:hidden;
}
.hero-bg{
  position:absolute; inset:0;
  background:
    radial-gradient(circle at 12% 10%, color-mix(in srgb, var(--primary) 25%, transparent), transparent 45%),
    radial-gradient(circle at 88% 0%,  color-mix(in srgb, var(--accent) 22%, transparent), transparent 50%),
    radial-gradient(circle at 50% 95%, color-mix(in srgb, var(--primary) 12%, transparent), transparent 50%);
  z-index:-1;
}
.hero-grid{
  display:grid; grid-template-columns: 1.2fr .85fr;
  gap: 3rem; align-items:center;
  padding-bottom: 3rem;
}
.hero-eyebrow{
  display:inline-block;
  background: var(--primary-soft);
  color: var(--primary);
  padding:.35rem .9rem;
  border-radius:999px;
  font-weight:600; font-size:.85rem;
  margin-bottom:1rem;
}
.hero-name{
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight:800; line-height:1.05;
  letter-spacing:-.02em;
  margin-bottom:.6rem;
}
.accent{
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip:text;
  background-clip:text;
  color: transparent;
}
.hero-title{
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight:500;
  color: var(--text-soft);
  margin-bottom:1.4rem;
  min-height: 1.8em;
}
.hero-lead{
  font-size:1.05rem;
  color: var(--text-soft);
  max-width: 540px;
  margin-bottom:1.6rem;
}
.hero-meta{
  display:flex; flex-wrap:wrap; gap:1rem 1.6rem;
  margin-bottom:2rem;
  color: var(--text-soft);
  font-size:.93rem;
}
.hero-meta i{ color: var(--primary); margin-right:.35rem; }
.hero-meta .ok{ color: var(--ok); }

.hero-cta{ display:flex; flex-wrap:wrap; gap:.8rem; margin-bottom:2rem; }
.btn{
  display:inline-flex; align-items:center; gap:.6rem;
  padding:.85rem 1.4rem;
  border-radius:999px;
  font-weight:600; font-size:.95rem;
  transition: all .25s ease;
  border:1px solid transparent;
  white-space: nowrap;
}
.btn-primary{ background: var(--primary); color:#fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover{ background: var(--primary-2); transform: translateY(-2px); color:#fff; box-shadow: var(--shadow); }
.btn-ghost{
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}
.btn-ghost:hover{ border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }

.hero-socials{ display:flex; gap:.6rem; }
.hero-socials a{
  width:42px; height:42px;
  border-radius:12px;
  background: var(--bg-soft);
  border:1px solid var(--line);
  display:grid; place-items:center;
  color: var(--text-soft);
  transition: all .25s;
}
.hero-socials a:hover{ color:#fff; background: var(--primary); border-color: var(--primary); transform: translateY(-3px); }

.hero-photo-wrap{ position:relative; display:grid; place-items:center; }
.hero-photo{
  position:relative;
  width: 320px; height: 320px;
  border-radius: 50%;
  padding: 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: var(--shadow);
}
.hero-photo img{
  width:100%; height:100%;
  border-radius:50%;
  object-fit:cover; object-position: center 22%;
  border: 6px solid var(--bg-soft);
}
.photo-ring{
  position:absolute; inset:-18px;
  border-radius:50%;
  border: 1.5px dashed color-mix(in srgb, var(--primary) 45%, transparent);
  animation: spin 30s linear infinite;
}
.photo-dot{
  position:absolute;
  width:56px; height:56px;
  border-radius:18px;
  background: var(--card);
  border:1px solid var(--line);
  display:grid; place-items:center;
  font-size:1.4rem; color: var(--primary);
  box-shadow: var(--shadow-sm);
  animation: float 4s ease-in-out infinite;
}
.dot-1{ top:5%;  left:-10%; animation-delay:0s;   }
.dot-2{ top:18%; right:-12%; animation-delay:1s;  color: var(--accent); }
.dot-3{ bottom:18%; left:-14%; animation-delay:2s; color:#0078d4; }
.dot-4{ bottom:5%; right:-8%; animation-delay:3s; color: var(--ok); }

@keyframes spin { from { transform:rotate(0deg);} to { transform:rotate(360deg);} }
@keyframes float{ 0%,100%{transform:translateY(0);} 50%{transform:translateY(-12px);} }

.hero-stats{
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}
.hero-stats-grid{
  display:grid; grid-template-columns: repeat(4, 1fr);
  padding: 1.5rem 0;
  gap: 1rem;
}
.stat{
  display:flex; align-items:baseline; gap:.4rem;
  flex-wrap: wrap;
  justify-content: center;
  text-align: center;
}
.stat b{
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight:800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip:text;
  background-clip:text;
  color: transparent;
}
.stat span{ color: var(--text-soft); font-size:.92rem; }

/* ================= SECTIONS ================= */
.section{ padding: 5rem 0; }
.section-alt{ background: var(--bg-soft); }

.section-head{
  text-align:center;
  max-width: 720px;
  margin: 0 auto 3rem;
}
.section-tag{
  font-family: var(--mono);
  color: var(--primary);
  font-size:.85rem;
  font-weight:600;
  letter-spacing: 1px;
  text-transform: uppercase;
  display:inline-block;
  margin-bottom: .8rem;
}
.section-head h2{
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  font-weight:800;
  letter-spacing:-.02em;
  margin-bottom:.6rem;
}
.section-sub{ color: var(--text-soft); font-size:1.05rem; }

/* ================= ABOUT ================= */
.about-grid{
  display:grid; grid-template-columns: 1.4fr .8fr; gap: 2.5rem;
  align-items: start;
}
.about-text p{ color: var(--text-soft); margin-bottom: 1rem; }
.about-text b{ color: var(--text); }

.info-grid{
  margin-top:1.6rem;
  display:grid; grid-template-columns: repeat(2, 1fr);
  gap:.85rem 1.5rem;
}
.info-grid > div{
  display:flex; flex-direction:column;
  border-left: 3px solid var(--primary);
  padding-left: .8rem;
}
.info-grid span{ color: var(--muted); font-size:.78rem; text-transform:uppercase; letter-spacing:.6px; }
.info-grid b{ font-weight:600; color: var(--text); }

.about-aside{
  background: var(--card);
  border:1px solid var(--line);
  padding: 1.6rem;
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
}
.about-aside h3{
  font-size:1rem; font-weight:700;
  margin-bottom: 1rem;
  display:flex; align-items:center; gap:.5rem;
}
.about-aside h3 i{ color: var(--primary); }
.lang-row{
  display:grid; grid-template-columns: 110px 1fr 90px;
  align-items:center; gap:.7rem;
  margin-bottom:.7rem; font-size:.9rem;
}
.lang-row b{ text-align:right; color: var(--text-soft); font-weight:600; }
.bar{
  height:8px; border-radius:999px;
  background: var(--bg-alt);
  overflow:hidden;
}
.bar i{
  display:block; height:100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius:999px;
}
.bullets li{
  position: relative;
  padding-left: 1.3rem;
  margin-bottom:.5rem;
  color: var(--text-soft); font-size:.95rem;
}
.bullets li::before{
  content:""; position:absolute; left:0; top:.55em;
  width:7px; height:7px; border-radius:50%;
  background: var(--primary);
}

/* ================= SKILLS ================= */
.skills-grid{
  display:grid; grid-template-columns: repeat(3, 1fr); gap:1.4rem;
}
.skill-card{
  background: var(--card);
  border:1px solid var(--line);
  padding:1.6rem; border-radius: var(--r);
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.skill-card:hover{
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: color-mix(in srgb, var(--primary) 40%, var(--line));
}
.skill-icon{
  width:54px; height:54px; border-radius:14px;
  display:grid; place-items:center;
  font-size:1.4rem; margin-bottom: 1rem;
}
.ic-blue{   background: #dbeafe; color:#2563eb; }
.ic-cyan{   background: #cffafe; color:#0e7490; }
.ic-green{  background: #dcfce7; color:#15803d; }
.ic-purple{ background: #ede9fe; color:#7c3aed; }
.ic-orange{ background: #ffedd5; color:#c2410c; }
.ic-red{    background: #fee2e2; color:#b91c1c; }
[data-theme="dark"] .ic-blue{   background: #1e3a8a40; color:#93c5fd; }
[data-theme="dark"] .ic-cyan{   background: #0e749040; color:#67e8f9; }
[data-theme="dark"] .ic-green{  background: #15803d40; color:#86efac; }
[data-theme="dark"] .ic-purple{ background: #7c3aed40; color:#c4b5fd; }
[data-theme="dark"] .ic-orange{ background: #c2410c40; color:#fdba74; }
[data-theme="dark"] .ic-red{    background: #b91c1c40; color:#fca5a5; }
.skill-card h3{ font-size:1.1rem; font-weight:700; margin-bottom:.6rem; }
.skill-card ul li{
  padding:.4rem 0;
  font-size:.93rem;
  color: var(--text-soft);
  border-bottom:1px dashed var(--line);
}
.skill-card ul li:last-child{ border:none; }
.skill-card ul li::before{
  content:"\f00c";
  font-family: "Font Awesome 6 Free"; font-weight:900;
  color: var(--ok); margin-right:.5rem; font-size:.75rem;
}

.tech-pills{
  margin-top: 2.2rem;
  display:flex; flex-wrap:wrap; gap:.5rem; justify-content:center;
}
.tech-pills span{
  background: var(--bg-alt);
  border:1px solid var(--line);
  padding:.35rem .9rem;
  border-radius:999px;
  font-size:.82rem; color: var(--text-soft); font-weight:500;
  transition: all .2s;
}
.tech-pills span:hover{ background: var(--primary); color:#fff; border-color: var(--primary); transform: translateY(-2px); }

/* ================= TIMELINE ================= */
.timeline{
  position:relative;
  max-width: 920px;
  margin: 0 auto;
}
.timeline::before{
  content:""; position:absolute;
  top:0; bottom:0; left: 26px;
  width:2px; background: var(--line);
}
.t-item{ position:relative; padding-left: 70px; margin-bottom: 2rem; }
.t-dot{
  position:absolute; left:0; top:0;
  width:54px; height:54px; border-radius:50%;
  background: var(--card);
  border:2px solid var(--primary);
  color: var(--primary);
  display:grid; place-items:center;
  font-size:1.1rem;
  box-shadow: var(--shadow-sm);
  z-index:2;
}
.t-card{
  background: var(--card);
  border:1px solid var(--line);
  padding: 1.4rem 1.6rem;
  border-radius: var(--r);
  transition: transform .25s, box-shadow .25s;
}
.t-card:hover{ transform: translateY(-3px); box-shadow: var(--shadow); }
.t-soft{ background: var(--bg-alt); }
.t-head{
  display:flex; flex-wrap:wrap; gap:.5rem 1rem;
  align-items:baseline; justify-content:space-between;
  margin-bottom:.3rem;
}
.t-head h3{ font-size:1.1rem; font-weight:700; }
.muted{ color: var(--muted); font-weight:500; font-size:.85em; }
.t-date{
  font-family: var(--mono);
  font-size: .82rem;
  background: var(--primary-soft);
  color: var(--primary);
  padding:.25rem .7rem;
  border-radius:999px;
  white-space:nowrap;
}
.t-comp{ color: var(--text-soft); font-weight:500; margin-bottom:.8rem; font-size:.95rem; }
.t-card ul{ margin: .5rem 0; }
.t-card ul li{
  position: relative;
  padding-left:1.1rem;
  margin-bottom:.3rem;
  color: var(--text-soft);
  font-size:.93rem;
}
.t-card ul li::before{
  content:""; position:absolute; left:.1rem; top:.7em;
  width:5px; height:5px; border-radius:50%;
  background: var(--primary);
}
.t-tags{ display:flex; flex-wrap:wrap; gap:.4rem; margin-top:.8rem; }
.t-tags span{
  font-size:.75rem;
  background: var(--bg-alt);
  border:1px solid var(--line);
  color: var(--text-soft);
  padding:.2rem .6rem;
  border-radius:6px;
  font-family: var(--mono);
}

/* ================= EDUCATION ================= */
.edu-grid{
  display:grid; grid-template-columns: repeat(2, 1fr); gap:1.6rem;
}
.edu-card{
  background: var(--card);
  border:1px solid var(--line);
  border-radius: var(--r);
  padding:1.8rem;
  position:relative;
  transition: transform .25s, box-shadow .25s;
}
.edu-card:hover{ transform: translateY(-4px); box-shadow: var(--shadow); }
.edu-icon{
  width:56px; height:56px; border-radius:14px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color:#fff; display:grid; place-items:center;
  font-size:1.3rem; margin-bottom:1rem;
}
.edu-date{
  font-family: var(--mono); font-size:.82rem;
  color: var(--primary);
  background: var(--primary-soft);
  padding:.25rem .7rem; border-radius:6px;
  display:inline-block; margin-bottom:.5rem;
}
.edu-card h3{ font-size:1.25rem; font-weight:700; margin-bottom:.3rem; }
.edu-school{ color: var(--text-soft); font-weight:500; margin-bottom:.6rem; }
.edu-focus{ color: var(--text-soft); margin-bottom:.8rem; font-size:.95rem; }
.edu-card ul li{
  position:relative;
  padding-left: 1.2rem;
  color: var(--text-soft);
  font-size:.93rem;
  margin-bottom:.4rem;
}
.edu-card ul li::before{
  content:"\f00c";
  font-family: "Font Awesome 6 Free"; font-weight:900;
  color: var(--ok);
  position:absolute; left:0; top:.05em;
  font-size:.8rem;
}

/* ================= PROJECTS ================= */
.projects-grid{
  display:grid; grid-template-columns: repeat(2, 1fr); gap:1.4rem;
}
.proj-card{
  background: var(--card);
  border:1px solid var(--line);
  border-radius: var(--r);
  padding:1.6rem;
  transition: transform .25s, box-shadow .25s, border-color .25s;
  position:relative;
  overflow:hidden;
}
.proj-card::before{
  content:""; position:absolute; top:0; left:0; right:0; height:3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0); transform-origin: left;
  transition: transform .35s ease;
}
.proj-card:hover::before{ transform: scaleX(1); }
.proj-card:hover{ transform: translateY(-4px); box-shadow: var(--shadow); }
.proj-head{
  width:50px; height:50px; border-radius:12px;
  background: var(--primary-soft);
  color: var(--primary);
  display:grid; place-items:center;
  font-size:1.3rem;
  margin-bottom:1rem;
}
.proj-card h3{ font-size:1.15rem; font-weight:700; margin-bottom:.6rem; }
.proj-card p{ color: var(--text-soft); margin-bottom:.8rem; }

/* ================= DOWNLOADS ================= */
.dl-grid{
  display:grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap:1rem;
  max-width: 920px; margin: 0 auto;
}
.dl-card{
  background: var(--card);
  border:1px solid var(--line);
  border-radius: var(--r);
  padding: 1.1rem 1.2rem;
  display:flex; align-items:center; gap:1rem;
  transition: all .25s;
}
.dl-card > i:first-child{
  font-size:2rem; color: var(--danger);
}
.dl-card .fa-file-word{ color: #2563eb; }
.dl-card div{ flex:1; display:flex; flex-direction:column; line-height:1.3; }
.dl-card b{ font-weight:700; }
.dl-card span{ font-size:.82rem; color: var(--muted); }
.dl-card .arr{ color: var(--muted); transition: transform .25s; }
.dl-card:hover{ border-color: var(--primary); transform: translateY(-3px); box-shadow: var(--shadow); }
.dl-card:hover .arr{ color: var(--primary); transform: translateY(3px); }

/* ================= CONTACT ================= */
.contact-grid{
  display:grid; grid-template-columns: .8fr 1.2fr; gap:2rem;
  align-items:start;
}
.contact-info{
  background: var(--card);
  border:1px solid var(--line);
  border-radius: var(--r);
  padding:2rem;
}
.contact-info h3{ font-size:1.3rem; font-weight:700; margin-bottom:.6rem; }
.contact-info > p{ color: var(--text-soft); margin-bottom:1.4rem; }
.contact-list li{
  display:flex; align-items:flex-start; gap:1rem;
  margin-bottom:1rem;
}
.contact-list i{
  width:42px; height:42px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius:12px;
  display:grid; place-items:center; flex-shrink:0;
}
.contact-list span{ display:flex; flex-direction:column; line-height:1.4; padding-top:.2rem; }
.contact-list b{ font-size:.78rem; text-transform:uppercase; color: var(--muted); letter-spacing:.6px; font-weight:600; }

.contact-form{
  background: var(--card);
  border:1px solid var(--line);
  border-radius: var(--r);
  padding:2rem;
}
.contact-form .row{ display:grid; grid-template-columns: 1fr 1fr; gap:1rem; }
.contact-form label{ display:flex; flex-direction:column; margin-bottom:1rem; }
.contact-form label > span{
  font-size:.82rem; font-weight:600;
  color: var(--text-soft); margin-bottom:.4rem;
}
.contact-form input, .contact-form textarea{
  font-family: inherit; font-size:.95rem;
  background: var(--bg);
  border:1px solid var(--line);
  border-radius: var(--r-sm);
  padding:.8rem 1rem;
  color: var(--text);
  transition: border-color .2s, box-shadow .2s;
}
.contact-form input:focus, .contact-form textarea:focus{
  outline:none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}
.contact-form textarea{ resize: vertical; }
.contact-form .hint{
  font-size:.82rem; color: var(--muted);
  margin-top:.8rem;
}

/* ================= FOOTER ================= */
.footer{
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  padding-top: 3rem;
}
.foot-grid{
  display:grid; grid-template-columns: 1.4fr 1fr 1fr; gap:2rem;
  padding-bottom: 2rem;
}
.footer h4{
  font-size:.92rem; text-transform:uppercase; letter-spacing:.8px;
  margin-bottom:1rem; color: var(--text);
}
.footer a{ display:block; color: var(--text-soft); margin-bottom:.5rem; font-size:.93rem; }
.footer a:hover{ color: var(--primary); }
.footer .brand{ margin-bottom:.6rem; }
.foot-bottom{
  border-top:1px solid var(--line);
  padding: 1rem 0;
  font-size:.85rem; color: var(--muted);
}
.row-sb{ display:flex; justify-content:space-between; flex-wrap:wrap; gap:.6rem; }

/* ================= TO TOP ================= */
.to-top{
  position:fixed; bottom: 2rem; right:2rem;
  width:48px; height:48px;
  border-radius:50%;
  background: var(--primary);
  color:#fff;
  display:grid; place-items:center;
  box-shadow: var(--shadow);
  opacity:0; pointer-events:none;
  transform: translateY(20px);
  transition: opacity .25s, transform .25s, background .2s;
  z-index: 90;
}
.to-top.show{ opacity:1; transform:translateY(0); pointer-events:auto; }
.to-top:hover{ background: var(--primary-2); color:#fff; }

/* ================= REVEAL ON SCROLL ================= */
.reveal{ opacity:0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in{ opacity:1; transform: translateY(0); }

/* ================= TYPEWRITER CURSOR ================= */
.typewriter::after{
  content:'|';
  display:inline-block;
  color: var(--primary);
  animation: blink 1s steps(2, start) infinite;
  margin-left: 4px;
}
@keyframes blink{ to{ visibility:hidden; } }

/* ================= WHATSAPP ================= */
.btn-whatsapp{
  background: #25d366; color:#fff;
  box-shadow: 0 4px 14px -4px rgba(37, 211, 102, .55);
}
.btn-whatsapp:hover{ background:#1ebe5b; color:#fff; transform: translateY(-2px); }

.wa-float{
  position: fixed; bottom: 2rem; left: 2rem;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: grid; place-items: center;
  font-size: 1.6rem;
  box-shadow: 0 12px 30px -8px rgba(37, 211, 102, .55), 0 0 0 0 rgba(37, 211, 102, .7);
  z-index: 90;
  animation: wapulse 2.2s ease-out infinite;
  transition: transform .25s, background .25s;
}
.wa-float:hover{ background:#1ebe5b; color:#fff; transform: scale(1.08); }
@keyframes wapulse{
  0%   { box-shadow: 0 12px 30px -8px rgba(37,211,102,.55), 0 0 0 0   rgba(37,211,102,.55); }
  70%  { box-shadow: 0 12px 30px -8px rgba(37,211,102,.55), 0 0 0 18px rgba(37,211,102,0); }
  100% { box-shadow: 0 12px 30px -8px rgba(37,211,102,.55), 0 0 0 0   rgba(37,211,102,0); }
}

.form-actions{ display:flex; flex-wrap:wrap; gap:.6rem; align-items:center; }

/* ================= RESPONSIVE ================= */
@media (max-width: 980px){
  .hero-grid{ grid-template-columns: 1fr; gap:2rem; padding-top: 1rem; }
  .hero-photo-wrap{ order:-1; }
  .hero-photo{ width:240px; height:240px; }
  .hero-stats-grid{ grid-template-columns: repeat(2, 1fr); }
  .about-grid{ grid-template-columns: 1fr; }
  .skills-grid{ grid-template-columns: repeat(2, 1fr); }
  .edu-grid, .projects-grid{ grid-template-columns: 1fr; }
  .contact-grid{ grid-template-columns: 1fr; }
  .foot-grid{ grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px){
  .nav-links{
    position:fixed; top: var(--hd-h); left:0; right:0;
    flex-direction:column; gap:0;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--line);
    padding: .5rem 1rem 1rem;
    transform: translateY(-200%);
    transition: transform .3s ease;
    box-shadow: var(--shadow);
  }
  .nav-links.open{ transform: translateY(0); }
  .nav-links a{ width:100%; padding: .8rem 1rem; border-radius: var(--r-sm); }
  .menu-toggle{ display:grid; }
  .brand-text{ display:none; }

  .section{ padding: 3.5rem 0; }
  .hero{ padding-top: calc(var(--hd-h) + 2rem); }
  .hero-name{ font-size: 2.2rem; }
  .skills-grid{ grid-template-columns: 1fr; }
  .contact-form .row{ grid-template-columns: 1fr; }
  .info-grid{ grid-template-columns: 1fr; }
  .foot-grid{ grid-template-columns: 1fr; }
  .lang-switch{ display: none; }
  .hero-meta{ gap: .6rem 1.2rem; }
  .t-item{ padding-left: 50px; }
  .timeline::before{ left: 16px; }
  .t-dot{ width:36px; height:36px; font-size:.85rem; left: -2px; top: 6px; }
  .t-head{ flex-direction: column; align-items: flex-start; }
}

@media (max-width: 460px){
  .hero-photo{ width:200px; height:200px; }
  .photo-dot{ width: 40px; height: 40px; font-size: 1rem; }
  .hero-stats-grid{ grid-template-columns: 1fr 1fr; }
}

/* 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; }
}
