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

:root {
  --bg:      #0B1120;
  --bg2:     #111827;
  --bg3:     #1a2338;
  --text:    #EEF0F4;
  --muted:   #8892A4;
  --accent:  #00D4C8;
  --accent2: #0099FF;
  --border:  rgba(255,255,255,0.07);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

/* ── SCROLL BOUNCE-IN ── */
@keyframes bounceIn {
  0%   { opacity: 0; transform: translateY(40px) scale(0.95); }
  55%  { opacity: 1; transform: translateY(-8px) scale(1.02); }
  75%  { transform: translateY(4px) scale(0.99); }
  90%  { transform: translateY(-2px) scale(1.005); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes bounceInLeft {
  0%   { opacity: 0; transform: translateX(-40px) scale(0.95); }
  55%  { opacity: 1; transform: translateX(8px) scale(1.02); }
  75%  { transform: translateX(-4px) scale(0.99); }
  90%  { transform: translateX(2px) scale(1.005); }
  100% { opacity: 1; transform: translateX(0) scale(1); }
}

.bounce-target {
  opacity: 0;
  transform: translateY(40px) scale(0.95);
}
.bounce-target.bounced {
  animation: bounceIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.bounce-left {
  opacity: 0;
  transform: translateX(-40px) scale(0.95);
}
.bounce-left.bounced {
  animation: bounceInLeft 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.delay-1 { animation-delay: 0.05s !important; }
.delay-2 { animation-delay: 0.12s !important; }
.delay-3 { animation-delay: 0.19s !important; }
.delay-4 { animation-delay: 0.26s !important; }
.delay-5 { animation-delay: 0.33s !important; }
.delay-6 { animation-delay: 0.40s !important; }

/* ── POP SPRING ── */
@keyframes popSpring {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.07); }
  65%  { transform: scale(0.97); }
  82%  { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.pop-hover { transition: box-shadow 0.2s, border-color 0.2s; }
.pop-hover:hover { box-shadow: 0 8px 30px rgba(0,212,200,0.12); }
.pill-pop { transition: color 0.18s, border-color 0.18s, background 0.18s; display: inline-block; }
.do-pop { animation: popSpring 0.45s cubic-bezier(0.22, 1, 0.36, 1); }

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.1rem 2.5rem;
  background: rgba(11,17,32,0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: 1.15rem;
  color: var(--accent); letter-spacing: -0.02em;
}
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  color: var(--muted); text-decoration: none;
  font-size: 0.85rem; font-weight: 500; letter-spacing: 0.04em;
  text-transform: uppercase; transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

/* ── HERO ── */
#hero {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 8rem 2.5rem 5rem;
  max-width: 900px; margin: 0 auto;
}
.hero-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem; color: var(--accent);
  margin-bottom: 1.4rem; letter-spacing: 0.06em;
  animation: bounceIn 0.7s 0.1s cubic-bezier(0.22,1,0.36,1) both;
}
.hero-eyebrow span { opacity: 0.5; margin: 0 0.4rem; }
h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 800; line-height: 1.05;
  letter-spacing: -0.03em; margin-bottom: 1.2rem;
  animation: bounceIn 0.75s 0.2s cubic-bezier(0.22,1,0.36,1) both;
}
h1 em { font-style: normal; color: var(--accent); }
.hero-sub {
  font-size: 1.1rem; color: var(--muted);
  max-width: 540px; line-height: 1.7; margin-bottom: 2.5rem;
  animation: bounceIn 0.7s 0.35s cubic-bezier(0.22,1,0.36,1) both;
}
.hero-ctas {
  display: flex; gap: 1rem; flex-wrap: wrap;
  animation: bounceIn 0.7s 0.48s cubic-bezier(0.22,1,0.36,1) both;
}
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  border-radius: 6px; font-size: 0.9rem; font-weight: 600;
  text-decoration: none; cursor: pointer;
  font-family: 'Inter', sans-serif; border: none;
}
.btn-primary { background: var(--accent); color: var(--bg); transition: background 0.2s; }
.btn-primary:hover { background: #00bab0; }
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--border); transition: border-color 0.2s, color 0.2s;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.terminal-line {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem; color: var(--muted);
  margin-top: 3rem; padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 0.6rem;
  animation: bounceIn 0.7s 0.6s cubic-bezier(0.22,1,0.36,1) both;
}
.terminal-line::before { content: '$'; color: var(--accent); }
#typed-text { color: var(--text); }
.cursor {
  display: inline-block; width: 2px; height: 1em;
  background: var(--accent); animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
}
@keyframes blink { 50% { opacity: 0; } }

/* ── SECTIONS ── */
section {
  max-width: 900px; margin: 0 auto;
  padding: 5rem 2.5rem;
  border-top: 1px solid var(--border);
}
.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem; color: var(--accent);
  letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 0.6rem;
}
h2 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700; letter-spacing: -0.02em;
  margin-bottom: 2.5rem;
}

/* ── ABOUT ── */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.about-text p { color: var(--muted); line-height: 1.8; margin-bottom: 1rem; }
.about-text p strong { color: var(--text); }
.about-stats { display: flex; flex-direction: column; gap: 1.2rem; }
.stat-card {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 10px; padding: 1.3rem 1.5rem; cursor: default;
}
.stat-num { font-family: 'Syne', sans-serif; font-size: 2rem; font-weight: 800; color: var(--accent); }
.stat-label { font-size: 0.82rem; color: var(--muted); margin-top: 0.2rem; }

/* ── SKILLS ── */
.skill-group { margin-bottom: 2rem; }
.skill-group-label {
  font-size: 0.78rem; color: var(--muted);
  font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; margin-bottom: 0.8rem;
}
.skill-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pill {
  padding: 0.38rem 0.9rem; border-radius: 100px;
  font-size: 0.82rem; font-weight: 500;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--muted); cursor: default;
}
.pill:hover { border-color: var(--accent); color: var(--accent); }
.pill.highlight { border-color: rgba(0,212,200,0.3); color: var(--accent); background: rgba(0,212,200,0.06); }

/* ── TIMELINE ── */
.timeline { position: relative; }
.timeline::before {
  content: ''; position: absolute; left: 0; top: 0.5rem; bottom: 0;
  width: 1px; background: var(--border);
}
.tl-item { padding-left: 2rem; margin-bottom: 2.8rem; position: relative; }
.tl-item::before {
  content: ''; position: absolute; left: -4px; top: 0.45rem;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--bg);
}
.tl-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: nowrap; gap: 1rem; }
.tl-role { font-family: 'Syne', sans-serif; font-size: 1.05rem; font-weight: 700; flex: 1; min-width: 0; }
.tl-period {
  font-family: 'JetBrains Mono', monospace; font-size: 0.72rem;
  color: var(--accent); white-space: nowrap; flex-shrink: 0;
  background: rgba(0,212,200,0.08); border: 1px solid rgba(0,212,200,0.2);
  border-radius: 4px; padding: 0.25rem 0.6rem;
}
.tl-company { font-size: 0.85rem; color: var(--muted); margin: 0.2rem 0 0.8rem; }
.tl-bullets { list-style: none; }
.tl-bullets li {
  font-size: 0.9rem; color: var(--muted);
  padding: 0.2rem 0 0.2rem 1rem; position: relative; line-height: 1.7;
}
.tl-bullets li::before { content: '→'; position: absolute; left: 0; color: var(--accent); font-size: 0.75rem; top: 0.28rem; }

/* ── PROJECTS ── */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.2rem; }
.proj-card {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.6rem;
  display: flex; flex-direction: column; cursor: default;
}
.proj-card:hover { border-color: rgba(0,212,200,0.35); }
.proj-icon {
  width: 36px; height: 36px; border-radius: 8px;
  background: rgba(0,212,200,0.1); border: 1px solid rgba(0,212,200,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; margin-bottom: 1rem;
}
.proj-name { font-family: 'Syne', sans-serif; font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }
.proj-desc { font-size: 0.85rem; color: var(--muted); line-height: 1.6; flex: 1; }
.proj-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1rem; }
.proj-tag {
  font-size: 0.72rem; padding: 0.2rem 0.6rem;
  background: rgba(0,153,255,0.08); color: var(--accent2);
  border-radius: 4px; border: 1px solid rgba(0,153,255,0.2);
}
.proj-link {
  display: inline-flex; align-items: center; gap: 0.3rem;
  margin-top: 0.8rem; font-size: 0.8rem; color: var(--accent);
  text-decoration: none; opacity: 0.8; transition: opacity 0.2s;
}
.proj-link:hover { opacity: 1; }

/* ── CERTS ── */
.certs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.cert-card {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 10px; padding: 1.2rem 1.4rem;
  display: flex; gap: 0.8rem; align-items: flex-start; cursor: default;
}
.cert-icon { font-size: 1.1rem; margin-top: 0.1rem; }
.cert-name { font-size: 0.85rem; font-weight: 500; color: var(--text); line-height: 1.4; }

/* ── CONTACT ── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.contact-text p { color: var(--muted); line-height: 1.8; margin-bottom: 1.5rem; }
.contact-links { display: flex; flex-direction: column; gap: 0.8rem; }
.contact-link {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.9rem 1.2rem;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 8px; text-decoration: none; color: var(--text);
  font-size: 0.88rem; transition: border-color 0.2s, color 0.2s;
}
.contact-link:hover { border-color: var(--accent); color: var(--accent); }
.contact-link-icon { font-size: 1rem; width: 20px; text-align: center; }

/* ── CONTACT FORM ── */
.contact-form { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 0.8rem; }
.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 8px; padding: 0.75rem 1rem;
  color: var(--text); font-family: 'Inter', sans-serif; font-size: 0.9rem;
  outline: none; transition: border-color 0.2s; resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--accent); }
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--muted); }
.form-status { font-size: 0.85rem; margin-top: 0.4rem; min-height: 1.2em; }
.form-status.success { color: var(--accent); }
.form-status.error   { color: #ff6b6b; }

/* ── FOOTER ── */
footer {
  text-align: center; padding: 2.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted); font-size: 0.8rem;
  font-family: 'JetBrains Mono', monospace;
}
footer span { color: var(--accent); }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  nav { padding: 1rem 1.2rem; }
  .nav-links { display: none; }
  #hero, section { padding-left: 1.2rem; padding-right: 1.2rem; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .bounce-target, .bounce-left,
  .hero-eyebrow, h1, .hero-sub, .hero-ctas, .terminal-line {
    animation: none !important; opacity: 1 !important; transform: none !important;
  }
}