/* =========================================================
   Israt Jahan Mim – Portfolio
   ========================================================= */
:root {
  --navy: #14304f;
  --navy-2: #1f3a5f;
  --teal: #0e7c86;
  --teal-2: #13a3a8;
  --teal-soft: #e7f3f4;
  --sand: #f6f3ee;
  --ink: #1c2530;
  --muted: #5b6774;
  --line: #dde7ea;
  --white: #ffffff;
  --radius: 18px;
  --shadow: 0 18px 40px -22px rgba(20, 48, 79, .35);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Manrope", "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
p { margin: 0 0 1em; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px; border-radius: 999px;
  font-weight: 700; font-size: 15px; letter-spacing: .01em;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  border: 2px solid transparent; cursor: pointer;
}
.btn:hover { transform: translateY(-2px); }
.btn--solid { background: var(--teal); color: var(--white); box-shadow: 0 12px 24px -12px rgba(14,124,134,.7); }
.btn--solid:hover { background: #0b6a73; }
.btn--ghost { border-color: var(--navy-2); color: var(--navy-2); }
.btn--ghost:hover { background: var(--navy-2); color: var(--white); }
.btn--light { background: var(--white); color: var(--navy); }
.btn--small { padding: 9px 18px; font-size: 14px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.nav.is-scrolled { border-color: var(--line); box-shadow: 0 8px 24px -20px rgba(0,0,0,.4); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav__brand { display: flex; align-items: center; gap: 12px; font-weight: 800; color: var(--navy); }
.nav__mark {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: var(--navy); color: var(--white); font-size: 13px; letter-spacing: .06em;
}
.nav__menu { display: flex; align-items: center; gap: 28px; }
.nav__menu a:not(.btn) { font-weight: 600; font-size: 15px; color: var(--muted); position: relative; }
.nav__menu a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--teal); transition: width .25s;
}
.nav__menu a:not(.btn):hover, .nav__menu a.is-active { color: var(--navy); }
.nav__menu a:not(.btn):hover::after, .nav__menu a.is-active::after { width: 100%; }
.nav__toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; padding: 10px; }
.nav__toggle span { display: block; height: 2px; background: var(--navy); margin: 5px 0; border-radius: 2px; transition: transform .3s, opacity .3s; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 72px 0 96px;
  background:
    radial-gradient(1000px 500px at 85% 10%, rgba(19,163,168,.14), transparent 60%),
    radial-gradient(700px 400px at 0% 100%, rgba(31,58,95,.08), transparent 60%),
    var(--sand);
  overflow: hidden;
}
.hero__inner { display: grid; grid-template-columns: 1.25fr .9fr; gap: 64px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px; border-radius: 999px; background: var(--white);
  font-size: 13px; font-weight: 700; color: var(--teal); letter-spacing: .03em;
  box-shadow: 0 6px 18px -12px rgba(0,0,0,.3);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal-2); box-shadow: 0 0 0 4px rgba(19,163,168,.2); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(19,163,168,0); } }
.hero h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(42px, 6vw, 72px); color: var(--navy);
  margin: 22px 0 10px; letter-spacing: -.02em;
}
.hero__role { font-size: clamp(17px, 2vw, 21px); font-weight: 700; color: var(--teal); margin-bottom: 18px; }
.hero__lead { font-size: 17px; color: var(--muted); max-width: 560px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 28px; }
.hero__contact { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 28px; }
.hero__contact a { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--navy-2); }
.hero__contact a:hover { color: var(--teal); }
.hero__contact svg { color: var(--teal); }

.hero__photo { position: relative; justify-self: center; }
.photo-frame {
  position: relative; width: 320px; aspect-ratio: 301 / 362;
  border-radius: 160px 160px 24px 24px; overflow: hidden;
  background: var(--white); border: 8px solid var(--white);
  box-shadow: var(--shadow);
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.hero__photo::before {
  content: ""; position: absolute; inset: 28px -28px -28px 28px; z-index: -1;
  border-radius: 160px 160px 24px 24px; background: var(--teal); opacity: .9;
}
.photo-badge {
  position: absolute; background: var(--white); border-radius: 14px; padding: 12px 16px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; min-width: 150px;
}
.photo-badge strong { font-family: var(--font-display); font-size: 26px; color: var(--teal); line-height: 1; }
.photo-badge span { font-size: 12px; color: var(--muted); font-weight: 600; }
.photo-badge--top { top: 40px; left: -70px; }
.photo-badge--bottom { bottom: 40px; right: -60px; }

/* ---------- Stats ---------- */
.stats { margin-top: -48px; position: relative; z-index: 2; }
.stats__grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--navy); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.stat { padding: 28px 24px; text-align: center; border-right: 1px solid rgba(255,255,255,.1); }
.stat:last-child { border-right: 0; }
.stat strong { display: block; font-family: var(--font-display); font-size: 40px; color: var(--white); line-height: 1.1; }
.stat span { font-size: 13px; color: #b8cfdc; }

/* ---------- Sections ---------- */
.section { padding: 100px 0; }
.section--tint { background: var(--teal-soft); }
.section--dark { background: var(--navy); color: var(--white); }
.section__head { max-width: 720px; margin-bottom: 48px; }
.section__head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section__head h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(30px, 4vw, 44px); color: var(--navy); letter-spacing: -.01em; }
.section--dark .section__head h2 { color: var(--white); }
.kicker { font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--teal); margin-bottom: 12px; }
.kicker--light { color: #7fd3d7; }

/* About */
.about { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; }
.about .section__head { margin-bottom: 0; }
.about__body p { color: var(--muted); font-size: 17px; }
.tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.tags span { padding: 8px 14px; border-radius: 999px; background: var(--teal-soft); color: var(--teal); font-weight: 700; font-size: 13px; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: var(--white); border-radius: var(--radius); padding: 30px;
  border: 1px solid var(--line); transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card__icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: var(--navy); color: var(--white); margin-bottom: 20px; }
.card__icon svg { width: 24px; height: 24px; }
.card h3 { font-size: 19px; color: var(--navy); margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 15px; margin: 0; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 230px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.job { display: grid; grid-template-columns: 230px 1fr; gap: 0; position: relative; padding-bottom: 48px; }
.job:last-child { padding-bottom: 0; }
.job::before {
  content: ""; position: absolute; left: 223px; top: 6px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--white); border: 4px solid var(--teal);
}
.job__meta { padding-right: 32px; display: flex; flex-direction: column; gap: 4px; }
.job__date { font-weight: 800; color: var(--teal); }
.job__place { font-size: 14px; color: var(--muted); }
.pill { align-self: flex-start; margin-top: 8px; padding: 4px 12px; border-radius: 999px; background: var(--teal); color: var(--white); font-size: 12px; font-weight: 700; }
.job__body { padding-left: 40px; }
.job__body h3 { font-family: var(--font-display); font-weight: 600; font-size: 26px; color: var(--navy); }
.job__org { font-weight: 600; color: var(--muted); margin: 6px 0 16px; font-style: italic; }
.job__body ul { margin: 0; padding: 0; list-style: none; }
.job__body li { position: relative; padding-left: 22px; margin-bottom: 8px; color: #3b4652; }
.job__body li::before { content: ""; position: absolute; left: 0; top: 10px; width: 8px; height: 8px; border-radius: 2px; background: var(--teal); }
.highlight {
  margin-top: 20px; padding: 16px 20px; border-radius: 12px;
  background: var(--teal-soft); border-left: 5px solid var(--teal); color: var(--ink);
}
.highlight strong { color: var(--teal); }

/* Volunteer */
.vol { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.vol__item { padding: 32px; border-radius: var(--radius); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); transition: background .25s; }
.vol__item:hover { background: rgba(255,255,255,.1); }
.vol__date { font-weight: 800; font-size: 13px; color: #7fd3d7; letter-spacing: .05em; }
.vol__item h3 { font-family: var(--font-display); font-weight: 600; font-size: 24px; margin: 8px 0 4px; }
.vol__org { font-weight: 600; color: #b8cfdc; }
.vol__item p:last-child { color: #d9e6ee; margin: 0; }

/* Skills */
.skills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.skill-group { padding: 26px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--white); }
.skill-group h3 { font-size: 17px; color: var(--navy); margin-bottom: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { padding: 6px 12px; border-radius: 8px; background: var(--sand); font-size: 13.5px; font-weight: 600; color: #3b4652; }
.langs { margin-top: 40px; padding: 32px; border-radius: var(--radius); background: var(--sand); }
.langs h3 { font-family: var(--font-display); font-weight: 600; font-size: 24px; color: var(--navy); margin-bottom: 20px; }
.lang { margin-bottom: 18px; }
.lang:last-child { margin-bottom: 0; }
.lang__top { display: flex; justify-content: space-between; gap: 12px; font-weight: 700; margin-bottom: 8px; }
.lang__top span:last-child { color: var(--muted); font-weight: 600; font-size: 14px; text-align: right; }
.bar { height: 10px; border-radius: 99px; background: #e4e0d8; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--teal), var(--teal-2)); transition: width 1.2s cubic-bezier(.2,.8,.2,1); }
.langs.is-visible .bar i { width: var(--w); }

/* Certs */
.certs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cert { display: flex; flex-direction: column; background: var(--white); border-radius: var(--radius); padding: 26px; border: 1px solid var(--line); transition: transform .25s, box-shadow .25s; }
.cert:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.cert__tag { align-self: flex-start; font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--teal); background: var(--teal-soft); padding: 4px 10px; border-radius: 6px; }
.cert h3 { font-size: 17px; color: var(--navy); margin: 14px 0 8px; }
.cert p { color: var(--muted); font-size: 14.5px; }
.cert__date { margin-top: auto; font-weight: 700; font-size: 14px; color: var(--navy-2); }

/* Education */
.edu { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 24px; }
.edu__item { padding: 30px; border-radius: var(--radius); border: 1px solid var(--line); display: flex; flex-direction: column; }
.edu__item--main { background: var(--navy); color: var(--white); border: 0; }
.edu__year { font-family: var(--font-display); font-size: 30px; color: var(--teal); font-weight: 600; }
.edu__item--main .edu__year { color: #7fd3d7; }
.edu__item h3 { font-size: 18px; margin: 8px 0 6px; color: var(--navy); }
.edu__item--main h3 { color: var(--white); }
.edu__item p { color: var(--muted); font-size: 15px; }
.edu__item--main p { color: #b8cfdc; }
.edu__score { margin-top: auto; align-self: flex-start; padding: 6px 14px; border-radius: 999px; background: var(--teal-soft); color: var(--teal); font-weight: 800; font-size: 14px; }
.edu__item--main .edu__score { background: var(--teal); color: var(--white); }

.interests { margin-top: 64px; }
.interests h3 { font-family: var(--font-display); font-weight: 600; font-size: 26px; color: var(--navy); margin-bottom: 20px; }
.interests__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.interest { display: flex; gap: 18px; padding: 24px; border-radius: var(--radius); background: var(--sand); }
.interest__icon { width: 48px; height: 48px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: var(--teal); color: var(--white); }
.interest__icon svg { width: 24px; height: 24px; }
.interest strong { color: var(--navy); }
.interest p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }

/* Contact */
.contact { background: linear-gradient(135deg, var(--navy) 0%, #0f4a5c 100%); color: var(--white); }
.contact__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.contact h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(32px, 4vw, 48px); margin-bottom: 16px; }
.contact__text p { color: #cfe0ea; font-size: 17px; margin-bottom: 28px; }
.link-light { display: block; margin-top: 14px; color: #9fdde0; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.contact__cards { display: grid; gap: 14px; }
.ccard {
  display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 14px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  transition: background .2s, transform .2s; word-break: break-word;
}
a.ccard:hover { background: rgba(255,255,255,.15); transform: translateX(4px); }
.ccard__icon { width: 46px; height: 46px; flex-shrink: 0; display: grid; place-items: center; border-radius: 12px; background: var(--teal); }
.ccard small { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: #9fdde0; font-weight: 700; }
.ccard > span:last-child { font-weight: 700; font-size: 16px; min-width: 0; }

/* Footer */
.footer { background: #0c2238; color: #8ea6b8; padding: 24px 0; font-size: 14px; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer p { margin: 0; }
.footer a:hover { color: var(--white); }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .dot { animation: none; }
  .bar i { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .nav__menu { gap: 20px; }
  .cards, .certs, .skills { grid-template-columns: repeat(2, 1fr); }
  .edu { grid-template-columns: 1fr 1fr; }
  .edu__item--main { grid-column: 1 / -1; }
}

@media (max-width: 880px) {
  .nav__toggle { display: block; }
  .nav__menu {
    position: fixed; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); padding: 8px 24px 24px;
    border-bottom: 1px solid var(--line); box-shadow: 0 20px 30px -20px rgba(0,0,0,.3);
    transform: translateY(-120%); transition: transform .35s ease; z-index: -1;
  }
  .nav__menu.is-open { transform: none; }
  .nav__menu a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
  .nav__menu a:not(.btn)::after { display: none; }
  .nav__menu .btn { margin-top: 18px; justify-content: center; }
  .nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .hero { padding: 48px 0 96px; }
  .hero__inner { grid-template-columns: 1fr; gap: 56px; }
  .hero__photo { order: -1; }
  .photo-frame { width: 240px; }
  .photo-badge--top { left: -80px; top: 24px; }
  .photo-badge--bottom { right: -70px; bottom: 24px; }
  .stats__grid { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.1); }
  .about, .contact__inner { grid-template-columns: 1fr; gap: 32px; }
  .vol, .interests__grid { grid-template-columns: 1fr; }

  .timeline::before { left: 7px; }
  .job { grid-template-columns: 1fr; padding-left: 36px; }
  .job::before { left: 0; }
  .job__meta { padding-right: 0; margin-bottom: 10px; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
  .pill { margin-top: 0; }
  .job__body { padding-left: 0; }
}

@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .section { padding: 72px 0; }
  .cards, .certs, .skills, .edu { grid-template-columns: 1fr; }
  .stat { padding: 22px 12px; }
  .stat strong { font-size: 30px; }
  .photo-frame { width: 210px; }
  .photo-badge { min-width: 0; padding: 10px 12px; }
  .photo-badge strong { font-size: 20px; }
  .photo-badge span { font-size: 11px; }
  .photo-badge--top { left: -56px; }
  .photo-badge--bottom { right: -50px; }
  .hero__photo::before { inset: 18px -18px -18px 18px; }
  .hero__actions .btn { width: 100%; justify-content: center; }
  .job__body h3 { font-size: 22px; }
  .langs, .vol__item, .card, .cert, .edu__item { padding: 22px; }
  .lang__top { flex-direction: column; gap: 0; }
  .lang__top span:last-child { text-align: left; }
  .footer__inner { justify-content: center; text-align: center; }
}

/* =========================================================
   MOTION LAYER – modern animations (design unchanged)
   ========================================================= */

/* Scroll progress bar under the nav */
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; pointer-events: none; }
.progress span {
  display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(var(--scroll, 0));
  background: linear-gradient(90deg, var(--teal), var(--teal-2), #7fd3d7);
}

/* Logo mark – gentle shine on hover */
.nav__mark { position: relative; overflow: hidden; transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.nav__brand:hover .nav__mark { transform: rotate(-6deg) scale(1.06); }
.nav__mark::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%);
  transform: translateX(-120%); animation: markShine 5s ease-in-out 1.5s infinite;
}
@keyframes markShine { 0%, 70% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }

/* Hero – drifting background glows */
.hero__inner { position: relative; z-index: 1; }
.hero__blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; pointer-events: none; z-index: 0; }
.hero__blob--a { width: 420px; height: 420px; background: rgba(19,163,168,.28); top: -120px; right: 4%; animation: drift 16s ease-in-out infinite alternate; }
.hero__blob--b { width: 360px; height: 360px; background: rgba(31,58,95,.14); bottom: -140px; left: -80px; animation: drift 20s ease-in-out infinite alternate-reverse; }
@keyframes drift { 0% { transform: translate(0,0) scale(1); } 50% { transform: translate(-40px,30px) scale(1.08); } 100% { transform: translate(30px,-20px) scale(.95); } }

/* Hero – entrance sequence */
@keyframes fadeUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes wordUp { from { opacity: 0; transform: translateY(70%) rotate(3deg); } to { opacity: 1; transform: none; } }
@keyframes photoIn { from { opacity: 0; transform: translateY(30px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes backdropIn { from { opacity: 0; transform: translate(-28px,-28px); } to { opacity: .9; transform: none; } }
@keyframes badgeIn { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }

.hero__text > * { animation: fadeUp .8s cubic-bezier(.2,.8,.2,1) both; }
.hero__text > .eyebrow { animation-delay: .1s; }
.hero__text > h1 { animation: none; }
.hero__text > .hero__role { animation-delay: .65s; }
.hero__text > .hero__lead { animation-delay: .8s; }
.hero__text > .hero__actions { animation-delay: .95s; }
.hero__text > .hero__contact { animation-delay: 1.1s; }
.hero h1 .word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.hero h1 .word > span { display: inline-block; animation: wordUp .9s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(.25s + var(--i) * .12s); }

.photo-frame { animation: photoIn 1s cubic-bezier(.2,.8,.2,1) .3s both; }
.photo-frame img { transition: transform .8s cubic-bezier(.2,.8,.2,1); }
.hero__photo:hover .photo-frame img { transform: scale(1.04); }
.hero__photo::before { animation: backdropIn 1.1s cubic-bezier(.2,.8,.2,1) .5s both, sway 9s ease-in-out 1.6s infinite; }
@keyframes sway { 0%, 100% { translate: 0 0; } 50% { translate: 8px -8px; } }

.photo-badge--top { animation: badgeIn .6s cubic-bezier(.3,1.4,.5,1) 1.1s both, float 5s ease-in-out 1.8s infinite; }
.photo-badge--bottom { animation: badgeIn .6s cubic-bezier(.3,1.4,.5,1) 1.3s both, float 5.5s ease-in-out 2.4s infinite; }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }

.hero__contact svg { transition: transform .3s; }
.hero__contact a:hover svg { transform: rotate(-12deg) scale(1.15); }

/* Buttons – light sweep + arrow nudge */
.btn { position: relative; overflow: hidden; isolation: isolate; }
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 25%, rgba(255,255,255,.35) 50%, transparent 75%);
  transform: translateX(-130%); transition: transform .7s ease;
}
.btn:hover::after { transform: translateX(130%); }
.btn--ghost::after { background: linear-gradient(110deg, transparent 25%, rgba(19,163,168,.25) 50%, transparent 75%); }
.btn svg { transition: transform .3s; }
.btn:hover svg { transform: translateY(3px); }
.btn--light::after { background: linear-gradient(110deg, transparent 25%, rgba(14,124,134,.18) 50%, transparent 75%); }

/* Staggered reveal for grids */
.reveal { transition: opacity .75s cubic-bezier(.2,.8,.2,1), transform .75s cubic-bezier(.2,.8,.2,1), box-shadow .25s, background .25s; }
.card.reveal, .cert.reveal, .skill-group.reveal, .edu__item.reveal { transform: translateY(32px) scale(.97); }
.card.reveal.is-visible, .cert.reveal.is-visible, .skill-group.reveal.is-visible, .edu__item.reveal.is-visible { transform: none; }
.card.is-visible:hover { transform: translateY(-6px); }
.cert.is-visible:hover { transform: translateY(-4px); }

/* Mouse-follow spotlight on cards */
@media (hover: hover) and (pointer: fine) {
  .card, .cert, .skill-group, .edu__item:not(.edu__item--main) {
    background-image: radial-gradient(260px circle at var(--mx, -300px) var(--my, -300px), rgba(19,163,168,.10), transparent 70%);
  }
  .vol__item, .ccard, .edu__item--main {
    background-image: radial-gradient(260px circle at var(--mx, -300px) var(--my, -300px), rgba(127,211,215,.14), transparent 70%);
  }
}

/* Card icons */
.card__icon { transition: transform .45s cubic-bezier(.3,1.4,.5,1), background .3s; }
.card:hover .card__icon { transform: rotate(-8deg) scale(1.1); background: var(--teal); }
.interest__icon, .ccard__icon { transition: transform .45s cubic-bezier(.3,1.4,.5,1); }
.interest:hover .interest__icon { transform: rotate(-10deg) scale(1.1); }
a.ccard:hover .ccard__icon { transform: scale(1.1) rotate(-6deg); }
.interest { transition: transform .3s, box-shadow .3s; }
.interest:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.edu__item { transition: transform .3s, box-shadow .3s; }
.edu__item.is-visible:hover { transform: translateY(-5px); box-shadow: var(--shadow); }

/* Skill chips pop in one by one */
.skill-group .chips span { opacity: 0; transform: translateY(8px) scale(.9); transition: background .2s, color .2s, transform .2s; }
.skill-group.is-visible .chips span { animation: chipIn .5s cubic-bezier(.3,1.4,.5,1) both; animation-delay: calc(.25s + var(--i, 0) * .06s); }
@keyframes chipIn { from { opacity: 0; transform: translateY(8px) scale(.9); } to { opacity: 1; transform: none; } }
.chips span:hover { background: var(--teal); color: var(--white); }
.tags span { transition: transform .25s, background .25s, color .25s; }
.tags span:hover { transform: translateY(-3px); background: var(--teal); color: var(--white); }

/* Timeline – line draws as you scroll, dots pulse in */
.timeline::after {
  content: ""; position: absolute; left: 230px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(var(--teal), var(--teal-2));
  transform-origin: top; transform: scaleY(var(--line, 0));
}
.job::before { z-index: 1; transform: scale(0); transition: transform .5s cubic-bezier(.3,1.4,.5,1) .15s; }
.job.is-visible::before { transform: scale(1); }
.job:first-child.is-visible::before { animation: ring 2.4s ease-out 1s infinite; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(14,124,134,.45); } 80%, 100% { box-shadow: 0 0 0 14px rgba(14,124,134,0); } }
.job__body li { opacity: 0; transform: translateX(-10px); transition: opacity .5s, transform .5s; transition-delay: calc(.2s + var(--i, 0) * .05s); }
.job.is-visible .job__body li { opacity: 1; transform: none; }
.highlight { background-size: 200% 100%; background-image: linear-gradient(100deg, var(--teal-soft) 40%, #d4ecee 50%, var(--teal-soft) 60%); animation: shimmer 6s linear infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* Section headings – subtle underline grows */
.section__head h2 { position: relative; }
.section__head h2::after {
  content: ""; display: block; height: 3px; width: 56px; margin-top: 16px; border-radius: 3px;
  background: linear-gradient(90deg, var(--teal), var(--teal-2));
  transform: scaleX(0); transform-origin: left; transition: transform .9s cubic-bezier(.2,.8,.2,1) .3s;
}
.section__head--center h2::after { margin-left: auto; margin-right: auto; transform-origin: center; }
.section--dark .section__head h2::after, .contact h2::after { background: #7fd3d7; }
.section__head.is-visible h2::after { transform: scaleX(1); }

/* Stats – numbers glow softly once */
.stat strong { transition: text-shadow .6s; }
.stat.is-visible strong { animation: glow 2.2s ease-out .3s 1; }
@keyframes glow { 40% { text-shadow: 0 0 22px rgba(127,211,215,.7); } }
.stat { transition: background .3s, opacity .75s, transform .75s; }
.stat:hover { background: rgba(255,255,255,.05); }

/* Language bars – moving sheen */
.bar i { position: relative; overflow: hidden; }
.bar i::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent);
  transform: translateX(-100%); animation: sheen 3s ease-in-out 1.5s infinite;
}
@keyframes sheen { 0% { transform: translateX(-100%); } 60%, 100% { transform: translateX(100%); } }

/* Back to top arrow bounce */
.footer a { display: inline-block; transition: transform .3s, color .2s; }
.footer a:hover { transform: translateY(-3px); }

@media (max-width: 880px) {
  .timeline::after { left: 7px; }
  .hero__blob--a { width: 280px; height: 280px; }
  .hero__blob--b { width: 240px; height: 240px; }
}

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
  .progress span { transition: none; }
  .skill-group .chips span, .job__body li { opacity: 1; transform: none; transition: none; }
  .job::before { transform: none; transition: none; }
  .timeline::after { transform: scaleY(1); }
  .section__head h2::after { transform: scaleX(1); transition: none; }
  .card.reveal, .cert.reveal, .skill-group.reveal, .edu__item.reveal { transform: none; }
}
