/* ============================================================
   Pallav Pradhan — Portfolio
   Dark, fintech x data aesthetic · fluid motion everywhere
   ============================================================ */

:root {
  --bg: #060910;
  --bg-2: #0a0e18;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --border-2: rgba(255, 255, 255, 0.16);
  --text: #e9edf5;
  --muted: #aeb8cc;
  --muted-2: #8b95ad;
  --teal: #14e8a4;
  --cyan: #22d3ee;
  --blue: #5b7cfa;
  --violet: #a78bfa;
  --grad: linear-gradient(100deg, var(--teal) 0%, var(--cyan) 45%, var(--blue) 100%);
  --grad-soft: linear-gradient(100deg, rgba(20,232,164,.14), rgba(91,124,250,.14));
  --shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(20, 232, 164, 0.25); color: #fff; }

/* scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--teal), var(--blue));
  border-radius: 99px;
  border: 2px solid var(--bg);
}

.container { width: min(1200px, 92vw); margin-inline: auto; }

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.muted { color: var(--muted); }

/* Justified body copy — clean alignment on every paragraph */
p,
.job-points li,
.about-quote,
.c-line, .contact-lines a {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* ---------- Background layers ---------- */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, black 30%, transparent 75%);
}

.bg-glow {
  position: fixed;
  z-index: 0;
  width: 55vw;
  height: 55vw;
  max-width: 780px;
  max-height: 780px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.5;
  pointer-events: none;
}
.glow-1 {
  top: -18%;
  left: -12%;
  background: radial-gradient(circle, rgba(20, 232, 164, 0.16), transparent 65%);
  animation: glowDrift 22s ease-in-out infinite alternate;
}
.glow-2 {
  top: 40%;
  right: -15%;
  background: radial-gradient(circle, rgba(91, 124, 250, 0.16), transparent 65%);
  animation: glowDrift 26s ease-in-out infinite alternate-reverse;
}
@keyframes glowDrift {
  to { transform: translate(6vw, 4vh) scale(1.12); }
}

/* ---------- Preloader ---------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--bg);
  display: grid;
  place-items: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.preloader.done { opacity: 0; visibility: hidden; }
.preloader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.preloader-ring {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--teal);
  border-right-color: var(--blue);
  animation: spin 0.9s linear infinite;
}
.preloader-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 4px;
  color: var(--muted);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Custom cursor ---------- */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 998;
}
.cursor-dot {
  width: 6px; height: 6px;
  background: var(--teal);
  transform: translate(-50%, -50%);
  transition: width .2s, height .2s;
}
.cursor-ring {
  width: 34px; height: 34px;
  border: 1.5px solid rgba(20, 232, 164, 0.4);
  transform: translate(-50%, -50%);
  transition: width .3s var(--ease), height .3s var(--ease), border-color .3s, background .3s;
}
body.hovering .cursor-ring {
  width: 52px; height: 52px;
  border-color: var(--teal);
  background: rgba(20, 232, 164, 0.08);
}
@media (hover: none) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 0;
  transition: padding 0.4s var(--ease), background 0.4s, backdrop-filter 0.4s;
}
.nav.scrolled {
  padding: 12px 0;
  background: rgba(6, 9, 16, 0.72);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  width: min(1200px, 92vw);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 24px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}
.logo-mark {
  position: relative;
  width: 42px; height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--grad);
  padding: 2px;
  box-shadow: 0 8px 24px -8px rgba(20, 232, 164, 0.5);
}
.logo-mark img {
  position: relative;
  z-index: 1;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 15%;
  border-radius: 50%;
  display: block;
}
.logo-text {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.logo-dot { color: var(--teal); }

.nav-links {
  display: flex;
  gap: 6px;
  margin-left: auto;
}
.nav-link {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 99px;
  transition: color 0.3s, background 0.3s;
}
.nav-link:hover { color: var(--text); }
.nav-link.active {
  color: var(--text);
  background: var(--panel);
}
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 16px; height: 2px;
  transform: translateX(-50%);
  border-radius: 99px;
  background: var(--grad);
}

.nav-cta { white-space: nowrap; }

.nav-progress {
  position: absolute;
  bottom: -1px; left: 0;
  height: 2px;
  width: 100%;
  transform-origin: left;
  transform: scaleX(0);
  background: var(--grad);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  padding: 13px 24px;
  border-radius: 99px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.3s var(--ease), box-shadow 0.3s, background 0.3s, border-color 0.3s;
}
.btn-primary {
  background: var(--grad);
  color: #04121c;
  box-shadow: 0 12px 32px -10px rgba(20, 232, 164, 0.55);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 44px -10px rgba(20, 232, 164, 0.7);
}
.btn-ghost {
  color: var(--text);
  border-color: var(--border-2);
  background: var(--panel);
}
.btn-ghost:hover {
  transform: translateY(-3px);
  border-color: var(--teal);
  background: rgba(20, 232, 164, 0.06);
}
.btn-block { width: 100%; justify-content: center; }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  z-index: 1;
}
#particles {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 40px;
  align-items: center;
  padding: 140px 0 80px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(44px, 6.5vw, 78px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}
.hero-title .hello {
  display: block;
  font-size: 0.42em;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
  margin-bottom: 6px;
}
.hero-title .name { font-weight: 700; }
.hero-title .cred {
  font-size: 0.32em;
  font-weight: 500;
  color: var(--muted);
  vertical-align: middle;
}

.hero-sub {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.2vw, 26px);
  font-weight: 600;
  min-height: 40px;
  margin-bottom: 8px;
}
.hero-tag {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 18px;
  letter-spacing: 0.02em;
}
.role-static { color: var(--muted); font-weight: 500; }
.role-fixed {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.role-typed {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.typed-cursor {
  color: var(--teal);
  animation: blink 1s step-end infinite;
  -webkit-text-fill-color: var(--teal);
}
@keyframes blink { 50% { opacity: 0; } }

.hero-desc {
  max-width: 560px;
  color: var(--muted);
  font-size: 17.5px;
  line-height: 1.7;
  margin-bottom: 32px;
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.hero-social {
  display: flex;
  gap: 10px;
}
.hero-social a {
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  transition: color 0.3s, border-color 0.3s, transform 0.3s var(--ease), background 0.3s;
}
.hero-social a:hover {
  color: #04121c;
  background: var(--teal);
  border-color: var(--teal);
  transform: translateY(-4px);
}

/* On desktop/laptop: mail & phone are display-only — no click affordance */
body.is-desktop .hero-social a[data-contact],
body.is-desktop .contact-lines a[data-contact] {
  cursor: default;
}
body.is-desktop .hero-social a[data-contact] {
  color: var(--muted);
  background: var(--panel);
  border-color: var(--border);
}
body.is-desktop .hero-social a[data-contact]:hover {
  color: var(--muted);
  background: var(--panel);
  border-color: var(--border);
  transform: none;
}
body.is-desktop .contact-lines a[data-contact] {
  color: var(--muted);
}
body.is-desktop .contact-lines a[data-contact]:hover {
  color: var(--muted);
}
body.is-desktop .contact-lines a[data-contact] .c-ico {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
}

/* Desktop: tooltip that reveals the email/phone on click (no app opens) */
.contact-tip {
  position: fixed;
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-direction: column;
  background: #0c1220;
  border: 1px solid var(--border-2);
  border-radius: 14px;
  padding: 14px 18px;
  box-shadow: var(--shadow);
  animation: tipIn 0.25s var(--ease);
}
.contact-tip strong {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.contact-tip .tip-val {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--teal);
  cursor: pointer;
  user-select: all;
}
.contact-tip .tip-val::after {
  content: " — click to copy";
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 400;
  color: var(--muted-2);
}
.contact-tip.copied .tip-val { color: var(--text); }
.contact-tip.copied .tip-val::after { content: ""; }
@keyframes tipIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* right-side hero card */
.hero-card {
  position: relative;
  border: 1px solid var(--border-2);
  background: linear-gradient(160deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015));
  border-radius: 22px;
  padding: 30px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}
.hero-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 22px;
  padding: 1px;
  background: linear-gradient(140deg, rgba(20,232,164,0.6), transparent 35%, transparent 65%, rgba(91,124,250,0.6));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.hero-card h3 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}
.hero-card-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.hero-card-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14.5px;
  color: var(--text);
}
.hero-card-list li span {
  flex: none;
  width: 30px; height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--grad-soft);
  border: 1px solid var(--border);
  font-size: 14px;
}
.hero-card-list strong { font-weight: 600; }
.hero-card-list small { display: block; color: var(--muted-2); font-size: 12.5px; }

/* hero stat strip */
.hero-stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  border-top: 1px solid var(--border);
  padding-top: 30px;
}
.stat {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.stat-num {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-suffix {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}
.stat-num.static, .stat[data-static] .stat-num {
  font-variant-numeric: tabular-nums;
}
.stat-sub {
  display: block;
  font-size: 11.5px;
  color: var(--muted-2);
  margin-top: 3px;
  letter-spacing: 0.01em;
}

.scroll-ind {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 26px; height: 44px;
  border: 1.5px solid var(--border-2);
  border-radius: 99px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}
.scroll-ind span {
  width: 3px; height: 8px;
  border-radius: 99px;
  background: var(--teal);
  animation: scrollDot 1.6s ease-in-out infinite;
}
@keyframes scrollDot {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(14px); opacity: 0; }
  100% { opacity: 0; }
}

/* ---------- Sections ---------- */
.section {
  position: relative;
  z-index: 1;
  padding: 110px 0;
}
.section-head {
  margin-bottom: 54px;
}
.section-tag {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 14px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

/* reveal-on-scroll */
[data-reveal] {
  opacity: 0;
  transform: translateY(36px);
  transition:
    opacity 0.9s var(--ease),
    transform 0.9s var(--ease),
    filter 0.9s var(--ease);
  filter: blur(6px);
}
[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* ---------- ABOUT ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 50px;
  align-items: start;
}
.about-text p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: 20px;
  max-width: 60ch;
}
.about-text strong { color: var(--text); font-weight: 600; }

.about-card {
  position: relative;
  border: 1px solid var(--border-2);
  border-radius: 22px;
  background: var(--panel);
  padding: 34px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.about-card-glow {
  position: absolute;
  inset: auto;
  width: 300px; height: 300px;
  border-radius: 50%;
  filter: blur(90px);
  background: radial-gradient(circle, rgba(91,124,250,0.35), transparent 70%);
  opacity: 0.55;
  pointer-events: none;
}
.about-avatar {
  position: relative;
  width: 128px;
  height: 128px;
  margin-bottom: 22px;
}
.about-avatar .about-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  border-radius: 50%;
  display: block;
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.6);
}
.about-avatar-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--teal), var(--cyan), var(--blue), var(--violet), var(--teal));
  z-index: -1;
  filter: blur(0px);
  opacity: 0.9;
  animation: ringSpin 8s linear infinite;
}
.about-avatar-ring::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--bg);
}
@keyframes ringSpin {
  to { transform: rotate(360deg); }
}
.about-avatar:hover .about-photo { transform: scale(1.03); }
.about-photo { transition: transform 0.5s var(--ease); }

.about-card h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
}
.focus-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.focus-list li {
  position: relative;
  padding-left: 28px;
  font-size: 15px;
  color: var(--text);
}
.focus-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--teal);
  font-weight: 700;
}
.about-quote {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-style: italic;
  color: var(--muted);
  font-size: 15px;
}

/* ---------- SKILLS ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.skill-block {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--panel);
  padding: 28px;
  transition: transform 0.4s var(--ease), border-color 0.4s, background 0.4s;
}
.skill-block:hover {
  transform: translateY(-6px);
  border-color: var(--border-2);
  background: var(--panel-2);
}
.block-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.skill {
  display: grid;
  grid-template-columns: 1fr 70px;
  align-items: center;
  gap: 4px 12px;
  margin-bottom: 18px;
}
.skill-label { font-size: 14px; color: var(--text); }
.skill-pct {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--teal);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.skill-bar {
  grid-column: 1 / -1;
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.skill-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: var(--grad);
  transition: width 1.4s var(--ease);
}
.skill-bar.sm { height: 4px; }

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chip {
  font-size: 13px;
  font-weight: 500;
  padding: 7px 15px;
  border-radius: 99px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  transition: all 0.3s var(--ease);
  cursor: default;
}
.chip:hover {
  color: #04121c;
  background: var(--teal);
  border-color: var(--teal);
  transform: translateY(-2px);
}

.lang {
  display: grid;
  grid-template-columns: 70px 1fr 70px;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  font-size: 14px;
}
.lang .skill-pct { font-size: 11.5px; }
.skills-grid p.muted { font-size: 14px; margin-top: 4px; }

/* ---------- Marquee ---------- */
.marquee {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border-block: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  padding: 22px 0;
  mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 38px;
  white-space: nowrap;
  animation: marquee 28s linear infinite;
  will-change: transform;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  text-shadow: 0 0 28px rgba(20, 232, 164, 0.18);
}
/* alternate words get the gradient fill so the strip reads crisp, not washed */
.marquee-track span:nth-of-type(even) {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
}
.marquee-track i { color: var(--teal); font-style: normal; font-size: 10px; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ---------- Experience / Timeline ---------- */
.timeline {
  position: relative;
  padding-left: 40px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 0; top: 6px;
  width: 2px;
  height: calc(100% - 6px);
  background: linear-gradient(var(--teal), var(--blue), transparent);
  opacity: 0.6;
}
.timeline-item {
  position: relative;
  margin-bottom: 34px;
}
.timeline-dot {
  position: absolute;
  left: -40px;
  top: 30px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 2.5px solid var(--teal);
  box-shadow: 0 0 0 5px rgba(20, 232, 164, 0.15);
}
.timeline-item:nth-child(even) .timeline-dot { border-color: var(--blue); box-shadow: 0 0 0 5px rgba(91,124,250,0.15); }

.timeline-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--panel);
  padding: 30px 34px;
  transition: border-color 0.35s, box-shadow 0.35s;
  transform-style: preserve-3d;
}
.timeline-card:hover {
  border-color: var(--border-2);
  box-shadow: var(--shadow);
}
.job-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.job-top h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.job-company {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--teal);
  margin-top: 3px;
}
.timeline-item:nth-child(even) .job-company { color: var(--blue); }
.job-period {
  flex: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  background: var(--panel-2);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 99px;
  white-space: nowrap;
}
.job-loc {
  display: inline-block;
  font-size: 13px;
  color: var(--muted-2);
  margin-bottom: 18px;
}
.job-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 4px;
}
.job-points li {
  position: relative;
  padding-left: 24px;
  color: var(--muted);
  font-size: 15px;
}
.job-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px; height: 8px;
  border-radius: 3px;
  background: var(--grad);
  opacity: 0.85;
}
.highlight {
  margin-top: 22px;
  padding: 18px 20px;
  border-left: 3px solid var(--teal);
  border-radius: 4px 14px 14px 4px;
  background: linear-gradient(90deg, rgba(20, 232, 164, 0.08), transparent 70%);
}
.highlight-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 8px;
}
.highlight p { color: var(--text); font-size: 15px; }

/* ---------- Education ---------- */
.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 30px;
  align-items: start;
}
.edu-item {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 18px;
  align-items: baseline;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel);
  margin-bottom: 14px;
  transition: transform 0.35s var(--ease), border-color 0.35s;
}
.edu-item:hover {
  transform: translateX(8px);
  border-color: var(--border-2);
}
.edu-year {
  font-size: 13px;
  font-weight: 600;
  color: var(--teal);
  font-variant-numeric: tabular-nums;
}
.edu-item h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
}
.edu-item p { color: var(--muted); font-size: 14px; text-align: start; }
.edu-note {
  grid-column: 1 / -1;
  font-size: 12.5px;
  color: var(--muted-2);
}

.cred-head {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  margin: 6px 0 18px;
}
.cred-head:not(:first-child) { margin-top: 34px; }
.cred-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.cred-card {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  padding: 16px 18px;
  transition: transform 0.35s var(--ease), border-color 0.35s, background 0.35s;
}
.cred-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-2);
  background: var(--panel-2);
}
.cred-ico { font-size: 24px; }
.cred-card h4 {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}
.cred-card small { color: var(--muted); font-weight: 500; }

.award-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.award {
  font-size: 13.5px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.03);
  transition: color 0.3s, border-color 0.3s;
}
.award:hover { color: var(--text); border-color: var(--border-2); }

/* ---------- Contact ---------- */
.contact {
  background:
    radial-gradient(600px 300px at 80% 20%, rgba(20, 232, 164, 0.08), transparent),
    radial-gradient(600px 300px at 20% 80%, rgba(91, 124, 250, 0.08), transparent);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 40px;
  align-items: start;
}
.contact-intro {
  color: var(--muted);
  font-size: 16.5px;
  margin-bottom: 28px;
}
.contact-lines {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.c-line, .contact-lines a {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 15px;
  color: var(--text);
  text-decoration: none;
  transition: color 0.3s;
}
.contact-lines a:hover { color: var(--teal); }
.c-line.plain { color: var(--muted); }
.c-ico {
  flex: none;
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 700;
  color: #04121c;
  background: var(--grad);
}

.contact-form {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--panel);
  padding: 30px;
  backdrop-filter: blur(6px);
}
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.field input,
.field textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  padding: 13px 16px;
  transition: border-color 0.3s, box-shadow 0.3s;
  resize: vertical;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(20, 232, 164, 0.15);
}
.form-note {
  margin-top: 12px;
  font-size: 13.5px;
  color: var(--teal);
  min-height: 18px;
}

/* ---------- Footer ---------- */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 26px 0;
  background: rgba(255, 255, 255, 0.015);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  font-size: 13.5px;
  color: var(--muted-2);
}
.footer a { color: var(--muted); text-decoration: none; transition: color 0.3s; }
.footer a:hover { color: var(--teal); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hero-inner { grid-template-columns: 1fr; gap: 34px; padding: 130px 0 60px; }
  .hero-card { max-width: 620px; }
  .skills-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 820px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; margin-left: auto; }

  .nav-links.open {
    display: flex;
    position: fixed;
    inset: 74px 4vw 40px;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    background: #0c1220;
    border: 1px solid var(--border-2);
    border-radius: 18px;
    padding: 20px;
    margin-left: 0;
    box-shadow: var(--shadow);
  }
  .nav-links.open .nav-link {
    padding: 13px 16px;
    font-size: 16px;
  }

  .hero-inner { padding: 118px 0 50px; }
  .hero-stats { grid-template-columns: 1fr 1fr; gap: 22px; }
  .stat-num { font-size: 34px; }
  .stat-suffix { font-size: 19px; }
  .section { padding: 72px 0; }
  .section-head { margin-bottom: 40px; }
  .about-grid, .edu-grid, .contact-grid { grid-template-columns: 1fr; gap: 30px; }
  .about-card, .cred-card, .contact-form { padding: 24px; }
  .timeline { padding-left: 26px; }
  .timeline-dot { left: -26px; top: 24px; width: 12px; height: 12px; }
  .timeline-card { padding: 24px; }
  .cred-grid { grid-template-columns: 1fr 1fr; }
  .hero-social { gap: 8px; }
  .hero-social a { width: 42px; height: 42px; }
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 520px) {
  .hero-inner { padding: 104px 0 44px; }
  .hero-stats { grid-template-columns: 1fr; gap: 18px; }
  .stat-num { font-size: 30px; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { text-align: center; justify-content: center; }
  .hero-sub { min-height: 34px; }
  .job-top { flex-direction: column; }
  .job-period { align-self: flex-start; }
  .cred-grid { grid-template-columns: 1fr; }
  .edu-item {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 18px;
  }
  .edu-year { font-size: 12px; }
  .timeline-card { padding: 20px 18px; }
  .highlight { padding: 14px 16px; }
  .section-title { font-size: 27px; }
  .hero-title { font-size: 40px; }
  .contact-lines { gap: 12px; }
}

/* ---------- 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;
  }
  /* the skills marquee is requested as a slide, so let it keep running */
  .marquee-track {
    animation-duration: 28s !important;
    animation-iteration-count: infinite !important;
  }
  [data-reveal] { opacity: 1; transform: none; filter: none; }
  .cursor-dot, .cursor-ring { display: none; }
}
