/* ========== RESET & BASE ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

:root {
  --cyan:    #00e5ff;
  --violet:  #9b5de5;
  --magenta: #f72585;
  --bg:      #0a0a1a;
  --bg2:     #0f0f28;
  --bg3:     #14142f;
  --card:    #12122a;
  --border:  #ffffff18;
  --text:    #c8c8e0;
  --text-dim:#7070a0;
  --white:   #ffffff;
  --grad:    linear-gradient(135deg, var(--cyan), var(--violet), var(--magenta));
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: 'Space Grotesk', sans-serif; color: var(--white); }

a { color: var(--cyan); text-decoration: none; transition: opacity .2s; }
a:hover { opacity: .75; }

/* ========== GRADIENT UTILITIES ========== */
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.grad-border {
  border: 1px solid transparent;
  background: linear-gradient(var(--card), var(--card)) padding-box,
              var(--grad) border-box;
}

/* ========== NAVBAR ========== */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 5%;
  height: 64px;
  background: rgba(10,10,26,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background .3s;
}
.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem; font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  font-size: .9rem; font-weight: 500; color: var(--text);
  transition: color .2s;
}
.nav-links a:hover { color: var(--cyan); }
.nav-cta {
  background: var(--grad); color: #fff !important;
  padding: .45rem 1.1rem; border-radius: 20px;
  font-weight: 600; font-size: .85rem;
}
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.hamburger span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s; }

/* ========== HERO ========== */
#hero {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 120px 5% 80px;
  position: relative;
  overflow: hidden;
}
.hero-glow {
  position: absolute; width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(ellipse, #9b5de530 0%, transparent 70%);
  top: 50%; left: 50%; transform: translate(-50%,-50%);
  pointer-events: none;
}
.hero-photo {
  width: 130px; height: 130px; border-radius: 50%; object-fit: cover;
  border: 3px solid transparent;
  background: linear-gradient(var(--bg), var(--bg)) padding-box,
              var(--grad) border-box;
  margin-bottom: 1.5rem;
  position: relative; z-index: 1;
}
#hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: .75rem;
  position: relative; z-index: 1;
}
.hero-tagline {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-dim);
  margin-bottom: .5rem;
  position: relative; z-index: 1;
}
.hero-subtitle {
  font-size: .95rem; color: var(--text-dim);
  margin-bottom: 2rem;
  position: relative; z-index: 1;
}
.hero-btns {
  display: flex; gap: 1rem; flex-wrap: wrap;
  justify-content: center; margin-bottom: 2.5rem;
  position: relative; z-index: 1;
}
.btn-primary {
  padding: .7rem 1.8rem; border-radius: 30px;
  background: var(--grad);
  color: #fff; font-weight: 600; font-size: .95rem;
  border: none; cursor: pointer; transition: opacity .2s, transform .2s;
}
.btn-primary:hover { opacity: .85; transform: translateY(-2px); }
.btn-outline {
  padding: .7rem 1.8rem; border-radius: 30px;
  background: transparent;
  color: var(--white); font-weight: 600; font-size: .95rem;
  border: 1px solid var(--border); cursor: pointer;
  transition: border-color .2s, transform .2s;
}
.btn-outline:hover { border-color: var(--cyan); color: var(--cyan); transform: translateY(-2px); }
.hero-socials {
  display: flex; gap: 1.2rem;
  position: relative; z-index: 1;
}
.hero-socials a {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  transition: border-color .2s, transform .2s;
  color: var(--text);
}
.hero-socials a:hover { border-color: var(--cyan); color: var(--cyan); transform: translateY(-3px); }
.hero-socials svg { width: 18px; height: 18px; fill: currentColor; }

/* ========== SECTIONS ========== */
section { padding: 90px 5%; }
section:nth-child(even) { background: var(--bg2); }

.section-label {
  font-size: .8rem; font-weight: 700; letter-spacing: .15em;
  text-transform: uppercase; color: var(--cyan);
  margin-bottom: .75rem;
}
.section-title {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700; margin-bottom: 1rem;
}
.section-divider {
  width: 60px; height: 3px; border-radius: 2px;
  background: var(--grad); margin-bottom: 2.5rem;
}

/* ========== ABOUT ========== */
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem;
  align-items: start;
}
.about-text p { margin-bottom: 1rem; font-size: .98rem; }
.about-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
}
.stat-card {
  padding: 1.4rem 1.2rem; border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  transition: border-color .3s, transform .3s;
}
.stat-card:hover { border-color: var(--violet); transform: translateY(-3px); }
.stat-number {
  font-size: 2rem; font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.stat-label { font-size: .8rem; color: var(--text-dim); margin-top: .3rem; }

/* ========== EXPERIENCE TIMELINE ========== */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: ''; position: absolute;
  left: 0; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(to bottom, var(--cyan), var(--magenta));
  border-radius: 2px;
}
.timeline-item {
  position: relative; margin-bottom: 2.5rem; padding-left: 1.5rem;
}
.timeline-dot {
  position: absolute; left: -2.45rem; top: 6px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--cyan);
  transition: border-color .3s;
}
.timeline-item:hover .timeline-dot { border-color: var(--magenta); }
.timeline-card {
  background: var(--card); border-radius: 12px;
  padding: 1.5rem; border: 1px solid var(--border);
  transition: border-color .3s, transform .3s;
}
.timeline-card:hover { border-color: var(--violet); transform: translateX(4px); }
.timeline-header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: .5rem; margin-bottom: .75rem; }
.timeline-role { font-size: 1.05rem; font-weight: 600; color: var(--white); }
.timeline-company { font-size: .9rem; color: var(--cyan); font-weight: 500; }
.timeline-date {
  font-size: .8rem; color: var(--text-dim);
  background: var(--bg2); padding: .3rem .75rem;
  border-radius: 20px; white-space: nowrap;
}
.timeline-desc { font-size: .9rem; color: var(--text); }
.timeline-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.tag {
  font-size: .75rem; padding: .25rem .7rem; border-radius: 20px;
  background: var(--bg3); color: var(--text-dim);
  border: 1px solid var(--border);
}

/* ========== SKILLS ========== */
.skills-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.skills-group h3 { font-size: 1rem; margin-bottom: 1rem; color: var(--text-dim); font-weight: 500; }
.pills { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 2rem; }
.pill {
  font-size: .82rem; padding: .4rem .9rem; border-radius: 20px;
  border: 1px solid transparent;
  transition: transform .2s;
  cursor: default;
}
.pill:hover { transform: translateY(-2px); }
.pill-cyan { background: #00e5ff15; color: var(--cyan); border-color: #00e5ff40; }
.pill-violet { background: #9b5de515; color: var(--violet); border-color: #9b5de540; }
.pill-magenta { background: #f7258515; color: var(--magenta); border-color: #f7258540; }
/* ---------- Skills Through Time (interactive timeline) ---------- */
.stl-title { font-size: 1rem; margin-bottom: 1rem; }
.skill-tl {
  --label-w: 162px;
  --tl-dim: #9d9dc8;
  position: relative;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 1.25rem 1.25rem 1rem;
  outline: none; touch-action: pan-y; user-select: none;
}
.skill-tl:focus-visible { box-shadow: 0 0 0 2px var(--cyan); }

.stl-readout { display: flex; align-items: center; gap: .9rem; min-height: 3rem; margin-bottom: .8rem; }
.stl-year {
  font-family: 'Space Grotesk', sans-serif; font-size: 2.2rem; font-weight: 700; line-height: 1;
  font-variant-numeric: tabular-nums;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stl-meta { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.stl-role { color: var(--white); font-size: .85rem; font-weight: 500; }
.stl-count { color: var(--tl-dim); font-size: .75rem; }

.stl-legend { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.stl-chip {
  display: inline-flex; align-items: center; gap: .4rem;
  font: inherit; font-size: .72rem; color: var(--tl-dim);
  background: transparent; border: 1px solid var(--border); border-radius: 999px;
  padding: .2rem .65rem; cursor: pointer; transition: color .2s, border-color .2s;
}
.stl-chip::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 6px var(--c); }
.stl-chip:hover, .stl-chip:focus-visible { color: var(--white); border-color: var(--c); outline: none; }

.stl-plot { position: relative; }
.stl-row { display: grid; grid-template-columns: var(--label-w) 1fr; align-items: center; height: 26px; transition: opacity .25s; }
.stl-gap { margin-top: 8px; }
.stl-label {
  font-size: .75rem; color: var(--text); text-align: right; padding-right: .75rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .25s;
}
.stl-track { position: relative; height: 100%; }
.stl-track::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px dashed #ffffff12; }
.stl-bar {
  position: absolute; top: 50%; height: 10px; width: 0; transform: translateY(-50%);
  border-radius: 999px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 20%, transparent), var(--c));
  box-shadow: 0 0 14px color-mix(in srgb, var(--c) 40%, transparent);
  transition: width .7s cubic-bezier(.2, .8, .2, 1), height .2s;
}
.stl-head {
  position: absolute; right: -5px; top: 50%; width: 10px; height: 10px; transform: translateY(-50%);
  border-radius: 50%; background: #fff; box-shadow: 0 0 10px 2px var(--c);
}
.stl-row[data-group="new"] .stl-head::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid var(--c); animation: stl-pulse 1.8s ease-out infinite;
}
@keyframes stl-pulse { from { transform: scale(.6); opacity: 1; } to { transform: scale(2.2); opacity: 0; } }

.stl-row.is-future .stl-label { color: #ffffff30; }
.stl-row.is-future .stl-head { opacity: 0; }
.skill-tl.has-hot .stl-row:not(.is-hot) { opacity: .28; }
.stl-row.is-hot .stl-bar { height: 14px; }
.stl-row.is-hot .stl-label { color: var(--white); }

.stl-scrub {
  position: absolute; top: -6px; bottom: 0; width: 0; pointer-events: none;
  left: calc(var(--label-w) + (100% - var(--label-w)) * var(--p, 1));
  border-left: 1px solid #ffffff70; opacity: .35;
  transition: left .7s cubic-bezier(.2, .8, .2, 1), opacity .2s;
}
.skill-tl.scrubbing .stl-scrub { opacity: 1; }
.skill-tl.scrubbing .stl-bar, .skill-tl.scrubbing .stl-scrub { transition-duration: .08s; }

.stl-axis { position: relative; height: 1.5rem; margin: .5rem 0 0 var(--label-w); border-top: 1px solid var(--border); }
.stl-tick {
  position: absolute; top: .3rem; transform: translateX(-50%);
  font-size: .68rem; color: var(--tl-dim); font-variant-numeric: tabular-nums;
}
.stl-tick:first-child { transform: none; }
.stl-tick:last-child { transform: translateX(-100%); }
.stl-hint { font-size: .7rem; color: var(--tl-dim); text-align: center; margin-top: .6rem; }

.stl-tip {
  position: absolute; left: 0; top: 0; z-index: 5; pointer-events: none;
  display: flex; flex-direction: column; gap: .2rem; max-width: 240px;
  background: #0a0a1af0; border: 1px solid var(--c, var(--border)); border-radius: 10px;
  padding: .6rem .8rem; font-size: .75rem; line-height: 1.45; color: var(--text);
  box-shadow: 0 8px 24px #00000080; opacity: 0; transition: opacity .15s;
}
.stl-tip.show { opacity: 1; }
.stl-tip strong { color: var(--white); font-size: .85rem; }
.stl-since { color: var(--c); font-weight: 600; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

@media (max-width: 680px) {
  .skill-tl { --label-w: 112px; padding: 1rem .8rem .9rem; }
  .stl-label { font-size: .7rem; padding-right: .5rem; }
  .stl-year { font-size: 1.8rem; }
}
@media (prefers-reduced-motion: reduce) {
  .stl-bar, .stl-scrub { transition: none; }
  .stl-row[data-group="new"] .stl-head::after { animation: none; }
}

/* ========== EDUCATION ========== */
.edu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.2rem; }
.edu-card {
  background: var(--card); border-radius: 12px; padding: 1.5rem;
  border: 1px solid var(--border);
  transition: border-color .3s, transform .3s;
}
.edu-card:hover { border-color: var(--violet); transform: translateY(-4px); }
.edu-icon {
  width: 42px; height: 42px; border-radius: 10px;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem; font-size: 1.2rem;
}
.edu-degree { font-size: .95rem; font-weight: 600; color: var(--white); margin-bottom: .3rem; }
.edu-school { font-size: .85rem; color: var(--cyan); margin-bottom: .3rem; }
.edu-year { font-size: .8rem; color: var(--text-dim); }
.edu-highlight { font-size: .8rem; color: var(--text); margin-top: .5rem; }

/* ========== PROJECTS ========== */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.project-card {
  background: var(--card); border-radius: 14px; padding: 1.8rem;
  border: 1px solid var(--border);
  transition: border-color .3s, transform .3s;
  display: flex; flex-direction: column;
}
.project-card:hover { border-color: var(--magenta); transform: translateY(-5px); }
.project-icon {
  width: 54px; height: 54px; border-radius: 12px; margin-bottom: 1.2rem;
  object-fit: cover;
}
.project-icon-placeholder {
  width: 54px; height: 54px; border-radius: 12px; margin-bottom: 1.2rem;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
}
.project-card h3 { font-size: 1.05rem; margin-bottom: .6rem; }
.project-card p { font-size: .88rem; color: var(--text); flex: 1; margin-bottom: 1.2rem; }
.project-card p:not(:last-of-type) { flex: 0 0 auto; margin-bottom: .8rem; }  /* multi-paragraph cards: only the last paragraph stretches */
.project-link {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .85rem; font-weight: 600; color: var(--cyan);
  transition: gap .2s;
}
.project-link:hover { gap: .7rem; }

/* ========== ARTICLES ========== */
.articles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.article-card {
  background: var(--card); border-radius: 14px; padding: 1.8rem;
  border: 1px solid var(--border);
  transition: border-color .3s, transform .3s;
}
.article-card:hover { border-color: var(--violet); transform: translateY(-4px); }
.article-brand {
  display: flex; align-items: center; gap: .6rem;
  margin-bottom: 1rem;
}
.article-brand-img {
  width: 32px; height: 32px; border-radius: 8px; object-fit: cover;
}
.article-brand-name { font-size: .8rem; color: var(--text-dim); font-weight: 500; }
.article-card h3 { font-size: 1rem; margin-bottom: .6rem; }
.article-card p { font-size: .87rem; color: var(--text); margin-bottom: 1.2rem; }
.article-link {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .83rem; font-weight: 600; color: var(--violet);
}
.article-link:hover { opacity: .75; }

/* ========== VOLUNTEERING ========== */
.volunteer-list { display: flex; flex-direction: column; gap: 1rem; }
.volunteer-item {
  background: var(--card); border-radius: 12px; padding: 1.2rem 1.5rem;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: .5rem;
  transition: border-color .3s;
}
.volunteer-item:hover { border-color: var(--cyan); }
.volunteer-role { font-size: .95rem; font-weight: 500; color: var(--white); }
.volunteer-org { font-size: .85rem; color: var(--cyan); }
.volunteer-year { font-size: .82rem; color: var(--text-dim); white-space: nowrap; }

/* ========== CERTIFICATIONS ========== */
.cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.cert-card {
  background: var(--card); border-radius: 14px; padding: 1.8rem;
  border: 1px solid var(--border);
  transition: border-color .3s, transform .3s;
  display: flex; flex-direction: column; gap: .8rem;
}
.cert-card:hover { border-color: var(--cyan); transform: translateY(-4px); }
.cert-badge {
  width: 52px; height: 52px; border-radius: 12px;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; flex-shrink: 0;
}
.cert-issuer { font-size: .8rem; color: var(--cyan); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.cert-title { font-size: 1rem; font-weight: 600; color: var(--white); line-height: 1.3; }
.cert-date { font-size: .8rem; color: var(--text-dim); }
.cert-desc { font-size: .87rem; color: var(--text); flex: 1; }

/* ========== FOOTER ========== */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 3rem 5%;
  text-align: center;
}
.footer-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem; font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: .5rem;
}
.footer-tagline { font-size: .88rem; color: var(--text-dim); margin-bottom: 1.5rem; }
.footer-socials { display: flex; gap: 1.2rem; justify-content: center; margin-bottom: 2rem; }
.footer-socials a {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim); transition: border-color .2s, color .2s;
}
.footer-socials a:hover { border-color: var(--cyan); color: var(--cyan); }
.footer-socials svg { width: 17px; height: 17px; fill: currentColor; }
.footer-copy { font-size: .8rem; color: var(--text-dim); }

/* ========== SCROLL ANIMATIONS ========== */
.fade-in { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.fade-in.visible { opacity: 1; transform: none; }

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .skills-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  nav { padding: 0 4%; }
  .nav-links { display: none; flex-direction: column; gap: 0;
    position: fixed; top: 64px; left: 0; right: 0;
    background: rgba(10,10,26,.97); padding: 1.5rem 5%;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-links li { padding: .65rem 0; border-bottom: 1px solid var(--border); }
  .hamburger { display: flex; }
  .hero-btns { flex-direction: column; align-items: center; }
  .about-stats { grid-template-columns: 1fr 1fr; }
  .edu-grid, .projects-grid, .articles-grid { grid-template-columns: 1fr; }
  section { padding: 60px 5%; }
}
