/* ============================================
   ACADEMIC PORTFOLIO — Avhishek Biswas
   Deep blue / dark gray / white palette
   ============================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --navy:       #0a1628;
  --navy-light: #111d33;
  --blue:       #1a5276;
  --blue-accent: #2980b9;
  --blue-bright: #3498db;
  --slate:      #2c3e50;
  --gray-dark:  #34495e;
  --gray-mid:   #7f8c8d;
  --gray-light: #bdc3c7;
  --off-white:  #ecf0f1;
  --white:      #ffffff;
  --gold:       #f1c40f;
  --font-main:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono:  'JetBrains Mono', 'Fira Code', monospace;
  --max-width:  1100px;
  --section-py: 5.5rem;
  --transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-main);
  color: var(--slate);
  background: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  color: var(--blue-accent);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--blue-bright); }

img { max-width: 100%; display: block; }

::selection {
  background: var(--blue-accent);
  color: var(--white);
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--navy);
}

.section-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--blue-accent);
  border-radius: 2px;
}

.section-subtitle {
  color: var(--gray-mid);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
  font-weight: 400;
}

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

.section {
  padding: var(--section-py) 0;
}

.section--alt {
  background: #f7f9fc;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.6rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  transition: all var(--transition);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
}

.btn--primary {
  background: var(--blue-accent);
  color: var(--white);
  border-color: var(--blue-accent);
}
.btn--primary:hover {
  background: var(--blue-bright);
  border-color: var(--blue-bright);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26, 82, 118, 0.25);
}

.btn--outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.5);
}
.btn--outline:hover {
  background: var(--white);
  color: var(--navy);
  border-color: var(--white);
  transform: translateY(-2px);
}

.btn--outline-dark {
  background: transparent;
  color: var(--blue-accent);
  border-color: var(--blue-accent);
}
.btn--outline-dark:hover {
  background: var(--blue-accent);
  color: var(--white);
  transform: translateY(-2px);
}

.btn--small {
  padding: 0.5rem 1.1rem;
  font-size: 0.82rem;
}

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 0;
  transition: all 0.4s ease;
}

.navbar.scrolled {
  background: rgba(10, 22, 40, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.6rem 0;
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar__logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
}
.navbar__logo span {
  color: var(--blue-bright);
}

.navbar__links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.navbar__links a {
  color: rgba(255,255,255,0.75);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color var(--transition);
  position: relative;
}

.navbar__links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--blue-bright);
  transition: width var(--transition);
}

.navbar__links a:hover,
.navbar__links a.active {
  color: var(--white);
}
.navbar__links a:hover::after,
.navbar__links a.active::after {
  width: 100%;
}

.navbar__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.navbar__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  margin: 5px 0;
  transition: all 0.3s ease;
  border-radius: 2px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 40%, var(--blue) 100%);
  overflow: hidden;
  text-align: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse 600px 600px at 20% 50%, rgba(41, 128, 185, 0.12) 0%, transparent 70%),
    radial-gradient(ellipse 400px 400px at 80% 30%, rgba(52, 152, 219, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

/* Subtle grid pattern */
.hero::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  padding: 0 1.5rem;
}

.hero__label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--blue-bright);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
  opacity: 0.9;
}

.hero__name {
  font-size: clamp(2.5rem, 6vw, 4.2rem);
  color: var(--white);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  line-height: 1.1;
}

.hero__title {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: rgba(255,255,255,0.7);
  font-weight: 400;
  max-width: 650px;
  margin: 0 auto 1rem;
  line-height: 1.6;
}

.hero__affiliation {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 2rem;
}

.hero__buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.hero__social {
  display: flex;
  gap: 1.2rem;
  justify-content: center;
}

.hero__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.6);
  font-size: 1.1rem;
  transition: all var(--transition);
}

.hero__social a:hover {
  border-color: var(--blue-bright);
  color: var(--blue-bright);
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.25);
}

.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.4);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.4), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ---------- About ---------- */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 4rem;
  align-items: start;
}

.about__photo-wrapper {
  position: relative;
}

.about__photo {
  width: 100%;
  max-width: 340px;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(10, 22, 40, 0.12);
}

.about__photo-wrapper::after {
  content: '';
  position: absolute;
  top: 20px;
  left: 20px;
  right: -20px;
  bottom: -20px;
  border: 2px solid var(--blue-accent);
  border-radius: 12px;
  z-index: -1;
  opacity: 0.3;
}

.about__text p {
  margin-bottom: 1rem;
  color: var(--gray-dark);
  font-size: 1rem;
}

.about__interests {
  margin-top: 1.5rem;
}

.about__interests h4 {
  font-size: 0.95rem;
  color: var(--navy);
  margin-bottom: 0.8rem;
  font-weight: 600;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
}

.tag-list li {
  background: rgba(26, 82, 118, 0.08);
  color: var(--blue);
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
  transition: all var(--transition);
}

.tag-list li:hover {
  background: var(--blue-accent);
  color: var(--white);
}

/* ---------- Research Highlights ---------- */
.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.8rem;
}

.research-card {
  background: var(--white);
  border-radius: 12px;
  padding: 2rem;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 4px 20px rgba(10, 22, 40, 0.05);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.research-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue-accent), var(--blue-bright));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.research-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(10, 22, 40, 0.1);
}

.research-card:hover::before {
  transform: scaleX(1);
}

.research-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(26, 82, 118, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
  font-size: 1.4rem;
  color: var(--blue-accent);
}

.research-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.7rem;
  color: var(--navy);
}

.research-card p {
  font-size: 0.92rem;
  color: var(--gray-dark);
  line-height: 1.65;
}

.research-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.2rem;
}

.research-card__tags span {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 12px;
  background: rgba(26, 82, 118, 0.06);
  color: var(--blue);
  letter-spacing: 0.02em;
}

.research-card__links {
  margin-top: 1.2rem;
}

.research-card__links .btn {
  font-size: 0.78rem;
}

/* ---------- Projects ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 4px 20px rgba(10, 22, 40, 0.05);
  transition: all var(--transition);
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 48px rgba(10, 22, 40, 0.12);
}

.project-card__image {
  height: 200px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.project-card__image-icon {
  font-size: 3rem;
  color: rgba(255,255,255,0.15);
  transition: transform var(--transition);
}

.project-card:hover .project-card__image-icon {
  transform: scale(1.1);
}

.project-card__body {
  padding: 1.8rem;
}

.project-card__body h3 {
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
  color: var(--navy);
}

.project-card__body p {
  font-size: 0.9rem;
  color: var(--gray-dark);
  line-height: 1.6;
  margin-bottom: 1.2rem;
}

.project-card__tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.2rem;
}

.project-card__tech span {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 10px;
  background: rgba(26, 82, 118, 0.06);
  color: var(--blue);
}

.project-card__links {
  display: flex;
  gap: 0.8rem;
}

/* ---------- Publications ---------- */
.pub-list {
  max-width: 850px;
}

.pub-item {
  padding: 1.8rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: all var(--transition);
}

.pub-item:last-child { border-bottom: none; }

.pub-item:hover {
  padding-left: 1rem;
}

.pub-item__type {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.6rem;
}

.pub-item__type--journal {
  background: rgba(26, 82, 118, 0.1);
  color: var(--blue);
}

.pub-item__type--conference,
.pub-item__type--accepted {
  background: rgba(39, 174, 96, 0.1);
  color: #27ae60;
}

.pub-item__type--workshop {
  background: rgba(142, 68, 173, 0.1);
  color: #8e44ad;
}

.pub-item__type--submitted {
  background: rgba(230, 126, 34, 0.1);
  color: #e67e22;
}

.pub-item h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--navy);
  line-height: 1.45;
}

.pub-item__authors {
  font-size: 0.88rem;
  color: var(--gray-mid);
  margin-bottom: 0.3rem;
}

.pub-item__venue {
  font-size: 0.88rem;
  color: var(--gray-dark);
  font-style: italic;
  margin-bottom: 0.6rem;
}

.pub-item__links {
  display: flex;
  gap: 0.6rem;
}

.pub-review {
  margin-top: 2rem;
  padding: 1.5rem;
  background: rgba(26, 82, 118, 0.04);
  border-radius: 10px;
  border: 1px solid rgba(26, 82, 118, 0.08);
}

.pub-review h4 {
  font-size: 0.95rem;
  color: var(--navy);
  margin-bottom: 0.6rem;
  font-weight: 600;
}

.pub-review h4 i {
  color: var(--blue-accent);
  margin-right: 0.4rem;
}

.pub-review p {
  font-size: 0.88rem;
  color: var(--gray-dark);
  line-height: 1.65;
}

/* ---------- Research Impact ---------- */
.impact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.impact-card {
  background: var(--white);
  border-radius: 12px;
  padding: 1.8rem;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 4px 20px rgba(10, 22, 40, 0.05);
  transition: all var(--transition);
  text-align: center;
}

.impact-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(10, 22, 40, 0.1);
}

.impact-card__number {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--blue-accent);
  line-height: 1.1;
  margin-bottom: 0.3rem;
  letter-spacing: -0.02em;
}

.impact-card__label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.7rem;
}

.impact-card p {
  font-size: 0.82rem;
  color: var(--gray-mid);
  line-height: 1.55;
}

/* ---------- Technical Skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.skills-card {
  background: #f7f9fc;
  border-radius: 12px;
  padding: 1.8rem;
  border: 1px solid rgba(0,0,0,0.04);
  transition: all var(--transition);
}

.skills-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(10, 22, 40, 0.08);
}

.skills-card__icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(26, 82, 118, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.2rem;
  color: var(--blue-accent);
}

.skills-card h3 {
  font-size: 1rem;
  color: var(--navy);
  margin-bottom: 0.8rem;
  font-weight: 700;
}

.skills-card ul {
  list-style: none;
  padding: 0;
}

.skills-card ul li {
  font-size: 0.85rem;
  color: var(--gray-dark);
  padding: 0.25rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  line-height: 1.5;
}

.skills-card ul li:last-child {
  border-bottom: none;
}

/* ---------- Experience ---------- */
.timeline {
  position: relative;
  max-width: 800px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--blue-accent), rgba(26, 82, 118, 0.1));
}

.timeline__item {
  position: relative;
  padding-left: 2.5rem;
  padding-bottom: 2.5rem;
}

.timeline__item:last-child { padding-bottom: 0; }

.timeline__item::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--blue-accent);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--blue-accent);
}

.timeline__date {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--blue-accent);
  letter-spacing: 0.03em;
  margin-bottom: 0.3rem;
}

.timeline__item h3 {
  font-size: 1.1rem;
  color: var(--navy);
  margin-bottom: 0.2rem;
}

.timeline__item h4 {
  font-size: 0.95rem;
  color: var(--gray-mid);
  font-weight: 500;
  margin-bottom: 0.6rem;
}

.timeline__item p {
  font-size: 0.9rem;
  color: var(--gray-dark);
  line-height: 1.6;
}

.timeline__item ul {
  margin-top: 0.5rem;
  padding-left: 1.2rem;
}

.timeline__item ul li {
  font-size: 0.9rem;
  color: var(--gray-dark);
  margin-bottom: 0.3rem;
  line-height: 1.55;
}

/* ---------- Education ---------- */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.edu-card {
  background: var(--white);
  border-radius: 12px;
  padding: 2rem;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 4px 20px rgba(10, 22, 40, 0.05);
  transition: all var(--transition);
  position: relative;
}

.edu-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 35px rgba(10, 22, 40, 0.1);
}

.edu-card__degree {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.3rem;
}

.edu-card__school {
  font-size: 0.95rem;
  color: var(--blue-accent);
  font-weight: 500;
  margin-bottom: 0.3rem;
}

.edu-card__date {
  font-size: 0.82rem;
  color: var(--gray-mid);
  margin-bottom: 0.8rem;
}

.edu-card p {
  font-size: 0.9rem;
  color: var(--gray-dark);
  line-height: 1.6;
}

/* ---------- Service & Outreach ---------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.8rem;
}

.service-card {
  background: #f7f9fc;
  border-radius: 12px;
  padding: 2rem;
  border: 1px solid rgba(0,0,0,0.04);
  transition: all var(--transition);
}

.service-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(10, 22, 40, 0.08);
}

.service-card__icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(26, 82, 118, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.2rem;
  color: var(--blue-accent);
}

.service-card h3 {
  font-size: 1.05rem;
  color: var(--navy);
  margin-bottom: 0.8rem;
  font-weight: 700;
}

.service-card ul {
  list-style: none;
  padding: 0;
}

.service-card ul li {
  font-size: 0.88rem;
  color: var(--gray-dark);
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  line-height: 1.55;
}

.service-card ul li:last-child {
  border-bottom: none;
}

/* ---------- Contact ---------- */
.contact {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 40%, var(--blue) 100%);
  color: var(--white);
  text-align: center;
}

.contact .section-title {
  color: var(--white);
}

.contact .section-title::after {
  left: 50%;
  transform: translateX(-50%);
}

.contact .section-subtitle {
  color: rgba(255,255,255,0.6);
}

.contact__email {
  font-size: 1.3rem;
  color: var(--white);
  font-weight: 600;
  display: inline-block;
  margin-bottom: 2rem;
  padding-bottom: 0.3rem;
  border-bottom: 2px solid rgba(255,255,255,0.2);
  transition: border-color var(--transition);
}

.contact__email:hover {
  color: var(--white);
  border-color: var(--blue-bright);
}

.contact__social {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 3rem;
}

.contact__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.7);
  font-size: 1.2rem;
  transition: all var(--transition);
}

.contact__social a:hover {
  border-color: var(--blue-bright);
  color: var(--blue-bright);
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.footer-note {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.35);
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* ---------- Fade-in animation ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Mobile nav ---------- */
.mobile-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100vh;
  background: var(--navy);
  z-index: 999;
  padding: 5rem 2rem 2rem;
  transition: right 0.35s ease;
  box-shadow: -10px 0 30px rgba(0,0,0,0.3);
}

.mobile-nav.open {
  right: 0;
}

.mobile-nav a {
  display: block;
  color: rgba(255,255,255,0.8);
  font-size: 1.05rem;
  font-weight: 500;
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: color var(--transition);
}

.mobile-nav a:hover {
  color: var(--blue-bright);
}

.mobile-nav__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 1.5rem;
  cursor: pointer;
}

.overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 998;
}

.overlay.active { display: block; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .about__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .about__photo-wrapper {
    display: flex;
    justify-content: center;
  }

  .about__photo {
    max-width: 260px;
  }

  .about__photo-wrapper::after {
    display: none;
  }

  .about__interests {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .tag-list {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  :root {
    --section-py: 4rem;
  }

  .navbar__links {
    display: none;
  }

  .navbar__toggle {
    display: block;
  }

  .hero__name {
    font-size: 2.2rem;
  }

  .section-title {
    font-size: 1.7rem;
  }

  .research-grid,
  .project-grid,
  .impact-grid {
    grid-template-columns: 1fr;
  }

  .edu-grid,
  .skills-grid,
  .service-grid {
    grid-template-columns: 1fr;
  }

  .hero__buttons {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .hero__name {
    font-size: 1.8rem;
  }

  .research-card,
  .project-card__body,
  .edu-card,
  .impact-card,
  .skills-card {
    padding: 1.4rem;
  }

  .impact-card__number {
    font-size: 1.8rem;
  }
}
