/* =====================================================
   Arti Shelar — Portfolio Stylesheet
   Single consolidated file (base → layout → components → utilities → animations)
   ===================================================== */

/* ---------- Base: variables ---------- */
:root {
  /* Brand */
  --primary: #0ea5e9;
  --primary-light: #38bdf8;
  --primary-soft: #7dd3fc;

  /* Background */
  --bg-dark: #101d34;
  --bg-light: #22385a;

  /* Text */
  --text-main: #ffffff;
  --text-muted: #cbd5e1;

  /* Glass */
  --glass-bg: rgba(14, 165, 233, 0.08);
  --glass-border: rgba(14, 165, 233, 0.15);

  /* Shadows */
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 0 20px rgba(14, 165, 233, 0.25);
}

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

/* ---------- Base: typography ---------- */
/* Fonts are loaded once via <link> in index.html's <head> — do not
   re-import them here, it would duplicate the request and block
   CSS parsing while it downloads. */

html {
  overflow-x: hidden;
  width: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  font-family: 'Poppins', sans-serif;
  color: var(--text-main);
  background: linear-gradient(135deg, var(--bg-dark), var(--bg-light));
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  overflow-x: hidden;
  width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

.font-poppins { font-family: 'Poppins', sans-serif; }
.font-playfair { font-family: 'Playfair Display', serif; }

/* ---------- Scroll reveal utility ---------- */
.reveal-el {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-el.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger project & skill cards slightly as they enter */
.projects-grid .project-card.reveal-el { transition-delay: 0s; }
.projects-grid .project-card.reveal-el:nth-child(2) { transition-delay: 0.12s; }
.projects-grid .project-card.reveal-el:nth-child(3) { transition-delay: 0.24s; }

.skills-list .skill-card.reveal-el:nth-child(2) { transition-delay: 0.12s; }
.skills-list .skill-card.reveal-el:nth-child(3) { transition-delay: 0.24s; }

.timeline-item.reveal-el:nth-child(2) { transition-delay: 0.12s; }
.timeline-item.reveal-el:nth-child(3) { transition-delay: 0.24s; }

/* ---------- Hero badge icon spacing ---------- */
.hero-badge i {
  margin-right: 0.4em;
  font-size: 0.85em;
}

/* ---------- Layout: navigation ---------- */
.navigation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1100;

  display: flex;
  justify-content: center;
  gap: clamp(0.75rem, 2.4vw, 2.75rem);
  padding: 1rem 0;

  background-color: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #374151;
}

.navigation.active {
  right: 0;
}

.navigation a {
  text-decoration: none;
  color: var(--text-main);
  transition: 0.3s ease;
  font-size: clamp(0.8rem, 1.4vw, 1rem);
  white-space: nowrap;
}

.navigation a:hover {
  background: rgba(14, 165, 233, 0.25);
  color: #ffffff;
  border-radius: 8px;
  padding: 6px 10px;
}

.navigation a.active {
  color: #ffffff;
  background: rgba(14, 165, 233, 0.35);
  border-radius: 8px;
  padding: 6px 10px;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1200;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--text-main);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

body.nav-open {
  overflow: hidden;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: 0.3s ease;
  z-index: 1000;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ---------- Layout: hero ---------- */
.hero {
  position: relative;
  background: transparent !important;
  padding: 140px 0 90px;
  text-align: center;
  overflow: hidden;
}

/* Ambient glow standing in for the old portrait — signature element */
.hero::before {
  content: "";
  position: absolute;
  top: -160px;
  left: 50%;
  transform: translateX(-50%);
  width: 640px;
  height: 640px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.28), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
  z-index: -1;
}

.hero-branches {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(90%, 800px);
  height: auto;
  max-height: 60%;
  pointer-events: none;
  z-index: -1;
  opacity: 0.55;
}

.hero-branches path {
  fill: none;
  stroke: #38bdf8;
  stroke-width: 1.5;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.7));
  opacity: 0.5;
}

.hero-content {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  animation: hero-fade-in 0.9s ease forwards;
}

@keyframes hero-fade-in {
  from {
    opacity: 0;
    transform: translateY(35px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-badge {
  display: inline-block;
  padding: 0.4rem 1.1rem;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7dd3fc;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.3);
  border-radius: 9999px;
  backdrop-filter: blur(12px);
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.2;
  color: #38bdf8;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.hero h1 span {
  color: #7dd3fc;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.hero p {
  color: #cbd5e1;
  margin: 1rem 0 0.5rem;
  font-size: 1.2rem;
  max-width: 560px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.hero .buttons {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.hero .buttons a {
  text-decoration: none;
  padding: 0.75rem 1.75rem;
  margin: 0.4rem 0.5rem;
  border-radius: 14px;
  font-weight: bold;
  transition: all 0.4s ease;
}

.hero .buttons .primary {
  background-color: #0ea5e9;
  color: #fff;
  box-shadow: 0 4px 20px rgba(14, 165, 233, 0.4);
}

.hero .buttons .primary:hover {
  background-color: #0284c7;
  transform: translateY(-3px);
  box-shadow: 0 0 16px #38bdf8, 0 0 32px #0ea5e9;
}

.hero .buttons .secondary {
  border: 2px solid #0ea5e9;
  color: #fff;
  background: rgba(14, 165, 233, 0.06);
}

.hero .buttons .secondary:hover {
  background-color: #0ea5e9;
  transform: translateY(-3px);
  box-shadow: 0 0 16px #7dd3fc, 0 0 32px #38bdf8;
}

/* ---------- Hero: split layout (text + holographic sphere) ---------- */
.hero-flex {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(2rem, 6vw, 5rem);
}

.hero-flex .hero-content {
  margin: 0;
  flex: 1 1 420px;
  min-width: 0;
}

.hero-visual {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Component: Holographic Sphere ---------- */
.holo-sphere {
  position: relative;
  width: clamp(200px, 22vw, 300px);
  height: clamp(200px, 22vw, 300px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.holo-glow {
  position: absolute;
  inset: -20%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.35), rgba(14, 165, 233, 0.12) 45%, transparent 72%);
  filter: blur(6px);
  animation: holo-pulse 4.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes holo-pulse {
  0%, 100% { opacity: 0.6; transform: scale(0.94); }
  50%      { opacity: 1;   transform: scale(1.06); }
}

.holo-core {
  position: relative;
  width: 68%;
  height: 68%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(224, 247, 255, 0.9), rgba(125, 211, 252, 0.35) 30%, rgba(14, 165, 233, 0.18) 55%, rgba(15, 23, 42, 0.4) 78%);
  box-shadow:
    inset 0 0 30px rgba(14, 165, 233, 0.5),
    inset 8px 8px 24px rgba(255, 255, 255, 0.15),
    0 0 35px rgba(56, 189, 248, 0.55),
    0 0 70px rgba(14, 165, 233, 0.3);
  border: 1px solid rgba(125, 211, 252, 0.5);
  overflow: hidden;
  animation: holo-float 6s ease-in-out infinite;
}

@keyframes holo-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

.holo-meridians {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent calc(12.5% - 1px),
    rgba(224, 247, 255, 0.55) 12.5%,
    transparent calc(12.5% + 1px)
  );
  mix-blend-mode: screen;
  opacity: 0.55;
  animation: holo-spin 9s linear infinite;
}

.holo-latitudes {
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  background-image: repeating-linear-gradient(
    0deg,
    transparent 0,
    transparent calc(16.6% - 1px),
    rgba(125, 211, 252, 0.4) 16.6%,
    transparent calc(16.6% + 1px)
  );
  mix-blend-mode: screen;
  opacity: 0.4;
  animation: holo-spin-reverse 13s linear infinite;
}

@keyframes holo-spin {
  from { transform: rotate(0deg) scaleX(1); }
  50%  { transform: rotate(180deg) scaleX(0.35); }
  to   { transform: rotate(360deg) scaleX(1); }
}

@keyframes holo-spin-reverse {
  from { transform: rotate(360deg) scaleY(1); }
  50%  { transform: rotate(180deg) scaleY(0.35); }
  to   { transform: rotate(0deg) scaleY(1); }
}

.holo-shine {
  position: absolute;
  top: 12%;
  left: 18%;
  width: 34%;
  height: 22%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.85), transparent 70%);
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.8;
  animation: holo-shine-drift 6s ease-in-out infinite;
}

@keyframes holo-shine-drift {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(6%, 4%); }
}

.holo-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  border: 1px solid rgba(125, 211, 252, 0.55);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.35);
  pointer-events: none;
}

.ring-a {
  width: 92%;
  height: 92%;
  transform: translate(-50%, -50%) rotateX(78deg) rotate(0deg);
  animation: holo-ring-spin 10s linear infinite;
}

.ring-b {
  width: 108%;
  height: 108%;
  border-color: rgba(14, 165, 233, 0.4);
  transform: translate(-50%, -50%) rotateX(78deg) rotate(90deg);
  animation: holo-ring-spin 16s linear infinite reverse;
}

@keyframes holo-ring-spin {
  from { transform: translate(-50%, -50%) rotateX(78deg) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotateX(78deg) rotate(360deg); }
}

.holo-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: holo-orbit-spin linear infinite;
}

.orbit-1 { width: 88%;  height: 88%;  animation-duration: 7s; }
.orbit-2 { width: 104%; height: 104%; animation-duration: 11s; animation-direction: reverse; }
.orbit-3 { width: 122%; height: 122%; animation-duration: 15s; }
.orbit-4 { width: 138%; height: 138%; animation-duration: 19s; animation-direction: reverse; }

@keyframes holo-orbit-spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}

.holo-particle {
  position: absolute;
  top: 0;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, #f0faff 0%, #7dd3fc 45%, transparent 75%);
  box-shadow:
    0 0 8px 2px rgba(56, 189, 248, 0.8),
    0 0 16px 4px rgba(14, 165, 233, 0.4);
  animation: holo-twinkle 2.4s ease-in-out infinite;
}

.orbit-2 .holo-particle { animation-delay: 0.6s; }
.orbit-3 .holo-particle { animation-delay: 1.2s; }
.orbit-4 .holo-particle { animation-delay: 1.8s; }

@keyframes holo-twinkle {
  0%, 100% { opacity: 0.4; transform: translateX(-50%) scale(0.8); }
  50%      { opacity: 1;   transform: translateX(-50%) scale(1.3); }
}

@media (prefers-reduced-motion: reduce) {
  .holo-glow, .holo-core, .holo-meridians, .holo-latitudes,
  .holo-shine, .ring-a, .ring-b,
  .holo-orbit, .holo-particle {
    animation: none !important;
  }
}

@media (max-width: 900px) {
  .hero-flex {
    flex-direction: column;
  }

  .hero-visual {
    order: -1;
  }

  .holo-sphere {
    width: clamp(160px, 45vw, 220px);
    height: clamp(160px, 45vw, 220px);
  }
}

/* ---------- Layout: sections ---------- */
.section {
  max-width: 1100px;
  margin: 5rem auto;
  margin-left: auto;
  margin-right: auto;
  padding: 2.5rem 2rem;
  background: rgba(14, 165, 233, 0.06);
  backdrop-filter: blur(24px);
  border-radius: 42px 18px 42px 16px;
  box-shadow:
    0 12px 40px rgba(14, 165, 233, 0.2),
    inset 0 0 1px rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(14, 165, 233, 0.22);
  position: relative;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.section::before {
  content: "";
  display: block;
  height: 1px;
  margin-bottom: 3rem;
  background: linear-gradient(to right, transparent, #0ea5e9, transparent);
  opacity: 0.5;
}

.section:hover {
  transform: translateY(-6px);
  box-shadow:
    0 18px 60px rgba(14, 165, 233, 0.4),
    0 0 20px rgba(14, 165, 233, 0.2);
  border-color: rgba(14, 165, 233, 0.3);
}

.section h2 {
  font-size: 2.75rem;
  color: #0ea5e9;
  margin-bottom: 1.5rem;
  font-weight: 600;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* About */
.about-section {
  max-width: 1100px;
  margin: 0 auto;
  font-family: 'Poppins', sans-serif;
}

/* Contact */
.social-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.social-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: rgba(14, 165, 233, 0.06);
  border: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.social-icon-wrap i {
  position: relative;
  z-index: 2;
  font-size: 1.5rem;
  color: #7dd3fc;
  transition: color 0.3s ease, transform 0.3s ease;
}

.social-icon-wrap:hover,
.social-icon-wrap:focus-visible {
  background: rgba(14, 165, 233, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
}

.social-icon-wrap:hover i,
.social-icon-wrap:focus-visible i {
  color: #ffffff;
  transform: scale(1.15);
  text-shadow: 0 0 6px #7dd3fc;
}

/* Firefly that drifts in to greet a hovered/focused icon */
.social-firefly {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle, #e0f7ff 0%, #7dd3fc 45%, transparent 75%);
  box-shadow:
    0 0 8px 2px rgba(56, 189, 248, 0.7),
    0 0 16px 5px rgba(14, 165, 233, 0.35);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.4);
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.social-icon-wrap:hover .social-firefly,
.social-icon-wrap:focus-visible .social-firefly {
  opacity: 1;
  animation: firefly-orbit 1.8s ease-in-out infinite;
}

@keyframes firefly-orbit {
  0%   { transform: translate(-50%, -50%) translate(0, -24px) scale(0.9); }
  25%  { transform: translate(-50%, -50%) translate(22px, 0) scale(1.1); }
  50%  { transform: translate(-50%, -50%) translate(0, 24px) scale(0.9); }
  75%  { transform: translate(-50%, -50%) translate(-22px, 0) scale(1.1); }
  100% { transform: translate(-50%, -50%) translate(0, -24px) scale(0.9); }
}

.contact-hint {
  margin-top: 0.9rem;
  font-size: 0.82rem;
  color: #93c5fd;
  font-style: italic;
}

/* Toast confirming the email was copied */
.copy-toast {
  position: fixed;
  left: 50%;
  bottom: 2.5rem;
  transform: translateX(-50%) translateY(12px);
  background: rgba(6, 20, 35, 0.95);
  color: #e0f2fe;
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 0.65rem 1.2rem;
  border-radius: 999px;
  font-size: 0.85rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 3000;
}

.copy-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .social-icon-wrap:hover .social-firefly,
  .social-icon-wrap:focus-visible .social-firefly {
    animation: none;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Achievements */
.achievements {
  max-width: 1100px;
  margin: 4rem auto;
  padding: 2rem;
  background: rgba(14, 165, 233, 0.1);
  border-radius: 36px 14px 36px 14px;
  box-shadow: 0 10px 40px rgba(14, 165, 233, 0.2);
  font-family: 'Poppins', sans-serif;
  color: #a5b4fc;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.achievements:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 50px rgba(14, 165, 233, 0.35);
}

.achievements h2 {
  font-size: 2.75rem;
  color: #0ea5e9;
  margin-bottom: 2rem;
  font-weight: 600;
  text-align: center;
}

/* ---------- Achievements: medal cards ---------- */
.medal-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 2.5rem;
  max-width: 1100px;
  margin: 1.75rem auto 0;
  justify-items: stretch;
}

.medal-card {
  position: relative;
  width: 100%;
  max-width: 270px;
  margin: 0 auto;
  color: #dbeafe;
  transition: transform 0.3s ease;
}

.medal-card:hover {
  transform: translateY(-8px);
}

.medal-card-body {
  position: relative;
  background: rgba(14, 165, 233, 0.15);
  border: 1px solid rgba(14, 165, 233, 0.32);
  border-radius: 20px;
  padding: 2.75rem 1.5rem 1.75rem;
  text-align: center;
  overflow: hidden;
  box-shadow: 0 6px 22px rgba(14, 165, 233, 0.16);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.medal-card:hover .medal-card-body {
  box-shadow: 0 16px 44px rgba(14, 165, 233, 0.35);
  border-color: rgba(14, 165, 233, 0.5);
}

.medal-card-body::after {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 60%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transform: skewX(-20deg);
  transition: left 0.7s ease;
  pointer-events: none;
}

.medal-card:hover .medal-card-body::after {
  left: 150%;
}

.medal-badge {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #78350f;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 0 0 4px var(--bg-dark), 0 0 20px rgba(245, 158, 11, 0.6);
  z-index: 2;
}

.medal-title {
  margin-top: 1.4rem;
  font-size: 1.1rem;
  color: #7dd3fc;
  font-weight: 700;
  line-height: 1.3;
}

.medal-sub {
  font-size: 0.85rem;
  color: #94a3b8;
  font-style: italic;
  margin: 0.4rem 0;
}

.medal-detail {
  font-size: 0.92rem;
  color: #dbeafe;
  margin-bottom: 0.9rem;
  line-height: 1.4;
}

.medal-year {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #04121b;
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  padding: 0.3rem 0.85rem;
  border-radius: 9999px;
}

.medal-placeholder .medal-card-body {
  border-style: dashed;
  border-color: rgba(148, 163, 184, 0.4);
  background: rgba(148, 163, 184, 0.05);
}

.medal-placeholder .medal-badge {
  background: linear-gradient(135deg, #94a3b8, #64748b);
  color: #1e293b;
  box-shadow: 0 0 0 4px var(--bg-dark), 0 0 16px rgba(148, 163, 184, 0.4);
}

.medal-placeholder .medal-title,
.medal-placeholder .medal-sub,
.medal-placeholder .medal-detail {
  color: #94a3b8;
}

.medal-placeholder .medal-year {
  background: rgba(100, 116, 139, 0.35);
  color: #cbd5e1;
}

/* ---------- Certifications: gallery + lightbox ---------- */
.certifications-section {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.cert-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 1.75rem;
  margin-top: 2rem;
}

.cert-card {
  background: rgba(14, 165, 233, 0.14);
  border-radius: 18px;
  padding: 1.25rem;
  border: 1px solid rgba(14, 165, 233, 0.28);
  box-shadow: 0 4px 24px rgba(14, 165, 233, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
  color: #e0f2fe;
}

.cert-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 36px rgba(14, 165, 233, 0.3);
}

.cert-thumb {
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1rem;
  cursor: pointer;
}

.cert-thumb-border {
  position: relative;
  aspect-ratio: 4 / 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.25rem;
  background:
    radial-gradient(circle at 50% 15%, rgba(56, 189, 248, 0.22), transparent 60%),
    linear-gradient(160deg, #0c4a6e, #082f49 60%, #0e7490);
  border: 2px solid rgba(125, 211, 252, 0.35);
}

.cert-thumb-border::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px dashed rgba(125, 211, 252, 0.35);
  border-radius: 6px;
  pointer-events: none;
}

.cert-seal {
  font-size: 2.1rem;
  color: #fbbf24;
  filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.6));
}

.cert-thumb-name {
  position: relative;
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  color: #e0f2fe;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
}

.cert-thumb-issuer {
  position: relative;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7dd3fc;
}

.cert-name {
  font-size: 1.05rem;
  color: #e0f2fe;
  margin-bottom: 0.4rem;
}

.cert-issuer {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.btn-view-cert {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: #0ea5e9;
  background: none;
  border: 1px solid rgba(14, 165, 233, 0.35);
  border-radius: 9999px;
  padding: 0.5rem 1.1rem;
  cursor: pointer;
  transition: color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}

.btn-view-cert:hover {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  color: #04121b;
  transform: translateY(-2px);
}

/* Lightbox */
.cert-modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.cert-modal.is-open {
  display: flex;
}

.cert-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 10, 20, 0.75);
  backdrop-filter: blur(4px);
}

.cert-modal-content {
  position: relative;
  max-width: 480px;
  width: 100%;
  background: #0f172a;
  border: 1px solid rgba(14, 165, 233, 0.3);
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: certModalIn 0.3s ease;
  color: #e0f2fe;
}

@keyframes certModalIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

.cert-modal-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(14, 165, 233, 0.3);
  background: rgba(14, 165, 233, 0.1);
  color: #e0f2fe;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.cert-modal-close:hover {
  background: rgba(14, 165, 233, 0.3);
}

.cert-modal-thumb {
  margin-bottom: 1.25rem;
  border-radius: 14px;
  overflow: hidden;
  cursor: default;
}

.cert-modal-content h3 {
  color: #7dd3fc;
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
}

#cert-modal-issuer-line {
  color: #94a3b8;
  font-size: 0.9rem;
}

.timeline {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding-left: 2.5rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: linear-gradient(to bottom, rgba(56, 189, 248, 0.7), rgba(14, 165, 233, 0.15));
  border-radius: 2px;
}

.timeline-item {
  position: relative;
}

.timeline-dot {
  position: absolute;
  left: -2.5rem;
  top: 0.6rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #0ea5e9;
  border: 3px solid #0f172a;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.3), 0 0 12px rgba(14, 165, 233, 0.6);
}

/* ---------- Extracurricular: icon badges ---------- */
.timeline.timeline-icons {
  padding-left: 3.5rem;
}

.timeline.timeline-icons::before {
  left: 18px;
}

.timeline.timeline-icons .timeline-item {
  margin-bottom: 1.75rem;
}

.timeline-badge {
  position: absolute;
  left: -3.5rem;
  top: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0ea5e9, #0891b2);
  border: 3px solid #0f172a;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.3), 0 0 14px rgba(14, 165, 233, 0.6);
  color: #f0f9ff;
  font-size: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-item:hover .timeline-badge {
  transform: scale(1.12);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.4), 0 0 18px rgba(14, 165, 233, 0.8);
}

.info-category-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #04121b;
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  border-radius: 9999px;
  padding: 0.3rem 0.8rem;
  margin-bottom: 0.8rem;
}

.info-category-tag.cat-volunteering { background: linear-gradient(135deg, #34d399, #10b981); }
.info-category-tag.cat-opensource   { background: linear-gradient(135deg, #a78bfa, #8b5cf6); }
.info-category-tag.cat-robotics     { background: linear-gradient(135deg, #fb923c, #f97316); }

/* Filter transitions reused from Skills section */
.timeline-item.is-hidden {
  display: none;
}

.timeline-item.is-filtering-in {
  animation: skillCardIn 0.45s ease forwards;
}

@media (max-width: 640px) {
  .timeline.timeline-icons {
    padding-left: 3rem;
  }
  .timeline.timeline-icons::before {
    left: 15px;
  }
  .timeline-badge {
    left: -3rem;
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
  }
}

/* Projects */
.project-section {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 1.75rem;
  margin-top: 1.75rem;
}

.projects-featured {
  margin-top: 2rem;
}

.project-card.featured {
  position: relative;
  max-width: 100%;
  border-color: rgba(14, 165, 233, 0.35);
  box-shadow: 0 8px 40px rgba(14, 165, 233, 0.3);
}

.project-card.featured h3 {
  font-size: 2rem;
}

.featured-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0f172a;
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  padding: 0.3rem 0.8rem;
  border-radius: 9999px;
  margin-bottom: 0.9rem;
}

.project-points {
  list-style-type: disc !important;
  margin: 0 0 1rem 1.5rem;
  padding: 0;
  color: #cbd5e1;
}

.project-points li {
  margin-bottom: 0.4rem;
  line-height: 1.4;
}

/* ---------- Components: cards ---------- */

/* ---------- About: Forest Journal ---------- */
.journal {
  max-width: 700px;
  margin: 0 auto;
}

.journal-page {
  position: relative;
  text-align: left;
  padding: 2.75rem 2.5rem 2.5rem 3.4rem;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(224, 247, 255, 0.045) 0px,
      rgba(224, 247, 255, 0.045) 1px,
      transparent 1px,
      transparent 2.5rem
    ),
    rgba(14, 165, 233, 0.14);
  border: 1px solid rgba(14, 165, 233, 0.3);
  border-radius: 4px 28px 4px 28px;
  box-shadow: 0 10px 40px rgba(14, 165, 233, 0.16), inset 0 0 1px rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.journal-page:hover {
  box-shadow: 0 16px 52px rgba(14, 165, 233, 0.26);
  border-color: rgba(14, 165, 233, 0.38);
}

/* Notebook margin rule */
.journal-page::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 2.1rem;
  width: 1px;
  background: rgba(56, 189, 248, 0.3);
}

/* Dog-eared page corner */
.journal-fold {
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 32px 32px 0;
  border-color: transparent rgba(6, 20, 35, 0.75) transparent transparent;
}

.journal-fold::after {
  content: "";
  position: absolute;
  top: -32px;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 0 32px 32px;
  border-color: transparent transparent rgba(56, 189, 248, 0.18) transparent;
}

.journal-entry-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: #7dd3fc;
  margin-bottom: 0.85rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.journal-entry-title i {
  font-size: 0.95rem;
  color: #38bdf8;
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.6));
}

.journal-entry-text {
  font-size: 1.05rem;
  line-height: 1.85;
  color: #dbeafe;
  margin: 0;
}

.journal-words {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.6rem;
  margin: 0;
  padding: 0;
}

.journal-words li {
  position: relative;
  padding-left: 1.1rem;
  font-size: 1.05rem;
  font-weight: 500;
  color: #e0f2fe;
}

.journal-words li::before {
  content: "✦";
  position: absolute;
  left: 0;
  top: 0.15em;
  font-size: 0.7rem;
  color: #38bdf8;
}

.journal-divider {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 1.75rem 0;
}

.journal-divider::before,
.journal-divider::after {
  content: "";
  flex: 1;
  border-top: 1px dashed rgba(56, 189, 248, 0.4);
}

.journal-divider span {
  font-size: 0.95rem;
  filter: drop-shadow(0 0 4px rgba(56, 189, 248, 0.5));
}

@media (max-width: 600px) {
  .journal-page {
    padding: 2.25rem 1.5rem 2.1rem 2.2rem;
  }

  .journal-page::before {
    left: 1.2rem;
  }
}

/* ---------- About: journal page-turn carousel ---------- */
.journal-slides {
  position: relative;
  display: grid;
  min-height: 9.5rem;
}

.journal-slides .journal-entry {
  grid-column: 1;
  grid-row: 1;
  opacity: 0;
  transform: translateX(18px);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.journal-slides .journal-entry.is-active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
  position: relative;
  z-index: 2;
}

.journal-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  margin-top: 1.75rem;
  padding-top: 1.4rem;
  border-top: 1px dashed rgba(56, 189, 248, 0.25);
}

.journal-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #7dd3fc;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.journal-arrow:hover,
.journal-arrow:focus-visible {
  background: rgba(14, 165, 233, 0.22);
  color: #ffffff;
  transform: scale(1.08);
}

.journal-dots {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.journal-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(125, 211, 252, 0.3);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.journal-dot:hover {
  background: rgba(125, 211, 252, 0.6);
}

.journal-dot.is-active {
  background: #38bdf8;
  transform: scale(1.3);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.7);
}

/* ---------- Experience ---------- */
.experience-section h2 {
  margin-bottom: 0.5rem;
}

.exp-card {
  position: relative;
  max-width: 560px;
  margin: 2.25rem auto 0;
  padding: 2rem 2.25rem 2rem 3.1rem;
  background: rgba(14, 165, 233, 0.14);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(14, 165, 233, 0.28);
  border-radius: 16px;
  box-shadow: 0 6px 24px rgba(14, 165, 233, 0.12);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.exp-card:hover {
  box-shadow: 0 8px 30px rgba(14, 165, 233, 0.18);
  border-color: rgba(14, 165, 233, 0.3);
}

/* Growing vine — animates in once the card scrolls into view */
.exp-vine {
  position: absolute;
  left: 1.4rem;
  top: 2.2rem;
  bottom: 2.2rem;
  width: 2px;
  background: rgba(56, 189, 248, 0.14);
  border-radius: 2px;
}

.exp-vine-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  background: linear-gradient(to bottom, #38bdf8, #0ea5e9);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
  transition: height 1.3s cubic-bezier(0.22, 0.9, 0.32, 1);
}

.exp-card.reveal-visible .exp-vine-fill {
  height: 100%;
}

.exp-vine-node {
  position: absolute;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7dd3fc;
  box-shadow: 0 0 8px rgba(125, 211, 252, 0.9);
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.4s ease;
}

.exp-vine-node-1 { top: 0%; }
.exp-vine-node-2 { top: 50%; }
.exp-vine-node-3 { top: 100%; }

.exp-card.reveal-visible .exp-vine-node-1 { transition-delay: 0.3s; }
.exp-card.reveal-visible .exp-vine-node-2 { transition-delay: 0.75s; }
.exp-card.reveal-visible .exp-vine-node-3 { transition-delay: 1.2s; }

.exp-card.reveal-visible .exp-vine-node {
  transform: translate(-50%, -50%) scale(1);
}

.exp-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.exp-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(14, 165, 233, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #7dd3fc;
  font-size: 1rem;
}

.exp-header-text {
  flex: 1;
  min-width: 0;
}

.exp-role {
  font-size: 1.15rem;
  font-weight: 700;
  color: #f0faff;
  margin: 0 0 0.2rem;
}

.exp-company {
  margin: 0;
  color: #a5d8ff;
  font-size: 0.92rem;
}

.exp-mode {
  color: #7dd3fc;
  font-style: italic;
}

.exp-date {
  flex-shrink: 0;
  font-size: 0.82rem;
  color: #93c5fd;
  font-style: italic;
  white-space: nowrap;
}

.exp-divider {
  height: 1px;
  margin: 1.4rem 0;
  background: linear-gradient(to right, rgba(56, 189, 248, 0.35), rgba(56, 189, 248, 0.08));
}

.exp-block-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #38bdf8;
  margin-bottom: 0.7rem;
}

.exp-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0;
  margin: 0;
}

.exp-list li {
  position: relative;
  padding-left: 1rem;
  color: #dbeafe;
  font-size: 0.95rem;
}

.exp-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #38bdf8;
}

.exp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.exp-tag {
  position: relative;
  padding: 0.32rem 0.8rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.32);
  cursor: help;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.exp-tag:hover,
.exp-tag:focus-visible {
  background: rgba(14, 165, 233, 0.22);
  border-color: rgba(56, 189, 248, 0.5);
  outline: none;
}

.exp-tag::after {
  content: attr(data-tip);
  position: absolute;
  bottom: 135%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: rgba(6, 20, 35, 0.95);
  color: #e0f2fe;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 400;
  white-space: nowrap;
  border: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 5;
}

.exp-tag:hover::after,
.exp-tag:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 520px) {
  .exp-card {
    padding: 1.6rem 1.4rem 1.6rem 2.6rem;
  }

  .exp-vine {
    left: 0.9rem;
  }

  .exp-header {
    flex-wrap: wrap;
  }

  .exp-date {
    margin-left: 3.25rem;
  }

  .exp-tag::after {
    white-space: normal;
    max-width: 10rem;
    text-align: center;
  }
}

/* === Info Box (Education / Internship / Extracurricular) === */
.info-box {
  background: rgba(14, 165, 233, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(14, 165, 233, 0.3);
  border-radius: 28px 12px 28px 12px;
  padding: 1.6rem 2rem;
  text-align: left;
  color: #dbeafe;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.info-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(14, 165, 233, 0.25);
  border-color: rgba(14, 165, 233, 0.4);
}

.info-box-wide {
  max-width: 760px;
  margin: 2rem auto 0;
}

.info-box-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.info-title {
  font-size: 1.25rem;
  color: #7dd3fc;
  font-weight: 700;
  margin: 0;
}

.info-date {
  font-size: 0.85rem;
  color: #a5f3fc;
  font-style: italic;
  white-space: nowrap;
}

.info-details {
  font-size: 1rem;
  color: #cbd5e1;
  margin: 0;
  line-height: 1.5;
}

.info-tech {
  margin-top: 0.8rem;
  font-size: 0.95rem;
  color: #cbd5e1;
}

.inline-link {
  color: #38bdf8;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.inline-link:hover {
  color: #7dd3fc;
}

.project-card {
  background: rgba(14, 165, 233, 0.14);
  border-radius: 26px 10px 26px 10px;
  padding: 2rem;
  backdrop-filter: blur(16px);
  border: 1px solid rgba(14, 165, 233, 0.28);
  box-shadow: 0 4px 30px rgba(14, 165, 233, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: #e0f2fe;
  text-align: left;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 40px rgba(14, 165, 233, 0.4);
}

.project-card h3 {
  font-size: 1.75rem;
  color: #7dd3fc;
  margin-bottom: 0.5rem;
}

.project-card .project-date {
  display: block;
  font-size: 0.9rem;
  color: #a5f3fc;
  margin-bottom: 0.8rem;
}

.project-card p {
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  color: #cbd5e1;
}

.project-card a.btn-view-details {
  display: inline-block;
  text-decoration: none;
  color: #0ea5e9;
  font-weight: 600;
  transition: color 0.3s ease;
}

.project-card a.btn-view-details:hover {
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* ---------- Projects: thumbnail banner ---------- */
.project-thumb {
  position: relative;
  height: 150px;
  margin: -2rem -2rem 1.25rem;
  border-radius: 26px 10px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 30%, rgba(125, 211, 252, 0.35), transparent 60%),
    linear-gradient(135deg, #0c4a6e, #075985 45%, #0e7490);
}

.project-thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: 0.5;
}

.project-thumb i {
  position: relative;
  font-size: 3rem;
  color: #e0f2fe;
  filter: drop-shadow(0 0 14px rgba(125, 211, 252, 0.65));
}

.project-card.featured .project-thumb {
  height: 190px;
}

.project-card.featured .project-thumb i {
  font-size: 3.75rem;
}

/* ---------- Projects: meta row & repo link ---------- */
.project-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.project-card .project-date {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: #a5f3fc;
  margin-bottom: 0;
}

.project-card a.btn-view-details {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: #0ea5e9;
  font-weight: 600;
  border: 1px solid rgba(14, 165, 233, 0.35);
  border-radius: 9999px;
  padding: 0.5rem 1.1rem;
  transition: color 0.3s ease, background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.project-card a.btn-view-details:hover {
  color: #04121b;
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  border-color: transparent;
  text-shadow: none;
  transform: translateY(-2px);
}

/* ---------- Projects: tech stack chips ---------- */
.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.25rem 0 1.25rem;
}

.stack-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: #dbeafe;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.3);
  border-radius: 9999px;
  padding: 0.35rem 0.85rem;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.stack-tag i {
  color: #38bdf8;
  font-size: 0.85rem;
}

.stack-tag:hover {
  background: rgba(14, 165, 233, 0.28);
  border-color: rgba(14, 165, 233, 0.6);
  transform: translateY(-2px);
}

/* ---------- Components: buttons ---------- */
.magnetic {
  display: inline-block;
  transition: transform 0.2s ease;
}

.btn-get-in-touch, .btn-download-resume {
  display: inline-block;
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(14, 165, 233, 0.4);
  transition: all 0.3s ease;
  text-decoration: none;
  text-align: center;
}

.btn-get-in-touch:hover, .btn-download-resume:hover {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  box-shadow: 0 8px 30px rgba(14, 165, 233, 0.6);
  transform: translateY(-3px);
}

.btn-download-resume {
  background: linear-gradient(135deg, #14b8a6, #06b6d4);
  color: white;
  padding: 0.75rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 9999px;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.3);
  transition: all 0.3s ease;
  display: inline-block;
}

.btn-download-resume:hover {
  background: linear-gradient(135deg, #06b6d4, #0ea5e9);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(14, 165, 233, 0.5);
}

/* ---------- Components: skills ---------- */
.skills-list {
  max-width: 1100px;
  margin: 2rem auto 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 2rem;
  justify-content: center;
}

.skill-card {
  background: rgba(14, 165, 233, 0.1);
  backdrop-filter: blur(16px);
  border-radius: 14px 34px 14px 34px;
  padding: 1.5rem 2rem;
  box-shadow: 0 4px 24px rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
  color: #e0f2fe;
}

.skill-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 32px rgba(14, 165, 233, 0.25);
}

.skill-card h3 {
  color: #0ea5e9;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  border-bottom: 2px solid #0ea5e9;
  padding-bottom: 0.5rem;
  margin-bottom: 2rem;
}

.skill-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.skill-item .label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  color: #e0f2fe;
}

.skill-item .bar {
  width: 60%;
  height: 8px;
  background: #334155;
  border-radius: 9999px;
  overflow: hidden;
}

.skill-item .bar-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, #0ea5e9, #38bdf8);
  width: 0;
  transition: width 1.5s ease-in-out;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.skill-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 1rem;
  font-size: 0.9rem;
  color: #dbeafe;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.3);
  border-radius: 9999px;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
  white-space: normal;
}

.skill-tag i {
  color: #38bdf8;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.skill-tag:hover {
  background: rgba(14, 165, 233, 0.28);
  border-color: rgba(14, 165, 233, 0.6);
  transform: translateY(-2px);
}

/* ---------- Skills: Filter Bar ---------- */
.skills-filter-bar {
  max-width: 1100px;
  margin: 2rem auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.skills-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  color: #dbeafe;
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.25);
  border-radius: 9999px;
  padding: 0.55rem 1.3rem;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.skills-filter-btn i {
  color: #38bdf8;
  transition: color 0.3s ease;
}

.skills-filter-btn:hover {
  background: rgba(14, 165, 233, 0.18);
  border-color: rgba(14, 165, 233, 0.5);
  transform: translateY(-2px);
}

.skills-filter-btn.is-active {
  background: linear-gradient(135deg, #0ea5e9, #06b6d4);
  border-color: transparent;
  color: #04121b;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.35);
}

.skills-filter-btn.is-active i {
  color: #04121b;
}

/* Fade/scale transition for cards responding to the filter */
.skill-card.is-hidden {
  display: none;
}

.skill-card.is-filtering-in {
  animation: skillCardIn 0.45s ease forwards;
}

@keyframes skillCardIn {
  from { opacity: 0; transform: translateY(14px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- Skills: Flip Cards ---------- */
.skill-card {
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
  perspective: 1500px;
  cursor: pointer;
}

.skill-card-inner {
  position: relative;
  width: 100%;
  min-height: 260px;
  transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
}

.skill-card.is-flipped .skill-card-inner {
  transform: rotateY(180deg);
}

.skill-card-face {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 14px 34px 14px 34px;
  padding: 1.5rem 2rem;
  text-align: center;
  color: #e0f2fe;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  box-sizing: border-box;
}

/* Front sits in normal flow so the card's height grows with its content
   (this is what stopped skill names from spilling outside the card) */
.skill-card-front {
  position: relative;
  width: 100%;
  background: rgba(14, 165, 233, 0.16);
  backdrop-filter: blur(16px);
  box-shadow: 0 4px 24px rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-card:not(.is-flipped):hover .skill-card-front {
  transform: translateY(-6px);
  box-shadow: 0 8px 32px rgba(14, 165, 233, 0.25);
}

.skill-card-front h3 {
  color: #0ea5e9;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  border-bottom: 2px solid #0ea5e9;
  padding-bottom: 0.5rem;
  margin-bottom: 2rem;
}

.skill-card-back {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.28), rgba(6, 182, 212, 0.18));
  border: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 8px 32px rgba(14, 165, 233, 0.3);
  transform: rotateY(180deg);
  gap: 1rem;
}

.skill-back-icon {
  font-size: 2.4rem;
  color: #7dd3fc;
  filter: drop-shadow(0 0 10px rgba(125, 211, 252, 0.6));
}

.skill-card-back p {
  font-size: 1rem;
  line-height: 1.5;
  color: #f0f9ff;
}

.skill-flip-hint {
  margin-top: 1.25rem;
  font-size: 0.75rem;
  color: rgba(224, 242, 254, 0.55);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

@media (max-width: 640px) {
  .skill-card-inner { min-height: 240px; }
}

/* ---------- Utilities ---------- */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

#hero-typewriter::after {
  content: "|";
  display: inline-block;
  margin-left: 2px;
  color: #7dd3fc;
  font-weight: bold;
  animation: blink 0.7s infinite;
}

@keyframes blink {
  0%, 50%, 100% { opacity: 1; }
  25%, 75% { opacity: 0; }
}

.done-typing::after {
  display: none;
}

.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

/* Native replacements for the couple of Tailwind utility classes left
   in the markup (Tailwind CDN script has been removed — it was
   shipping an entire JIT CSS compiler to the browser for ~8 classes). */
.relative { position: relative; }
.z-10 { position: relative; z-index: 10; }

/* ---------- Fireflies (Bioluminescent Forest theme) ---------- */
.fireflies {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.firefly {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle, #e0f7ff 0%, #7dd3fc 45%, transparent 75%);
  box-shadow:
    0 0 8px 2px rgba(56, 189, 248, 0.7),
    0 0 18px 6px rgba(14, 165, 233, 0.35);
  animation-name: firefly-drift;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

@keyframes firefly-drift {
  0%   { transform: translate(0, 0) scale(0.8); opacity: 0.15; }
  20%  { opacity: 0.9; }
  40%  { transform: translate(18px, -24px) scale(1.1); opacity: 0.4; }
  60%  { opacity: 1; }
  80%  { transform: translate(-14px, 16px) scale(0.9); opacity: 0.3; }
  100% { transform: translate(0, 0) scale(0.8); opacity: 0.15; }
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #0ea5e9;
  border-radius: 20px;
}

/* ---------- Responsive: mobile nav ---------- */
@media (max-width: 768px) {

  .menu-toggle {
    display: flex;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
  }

  .navigation {
    position: fixed;
    top: 0;

    left: auto;
    right: -260px;

    width: 260px;
    max-width: 80vw;
    height: 100vh;

    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;

    padding: 80px 30px 2rem 30px;
    gap: 25px;
    overflow-y: auto;

    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(25px);

    transition: right 0.4s ease;
  }

  .navigation.active {
    right: 0;
  }

}

/* ---------- Responsive: general small-screen tightening ---------- */
@media (max-width: 640px) {
  .container {
    padding: 0 1.1rem;
  }

  .section {
    margin: 3.5rem 1rem;
    padding: 2rem 1.25rem;
    border-radius: 28px 14px 28px 14px;
  }

  .about-section,
  .achievements,
  .certifications-section,
  .project-section {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .medal-row {
    gap: 1.5rem;
  }

  .medal-card {
    width: 100%;
    max-width: 320px;
  }
}

@media (max-width: 400px) {
  .journal-page {
    padding: 2rem 1.1rem 1.9rem 1.7rem;
  }

  .exp-card {
    padding-left: 2.3rem;
  }

  .exp-vine {
    left: 0.75rem;
  }
}
/* =====================================================
   Dynamic scroll chrome: progress bar, scrolled header,
   back-to-top button, hero parallax layer
   ===================================================== */

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 1200;
  background: transparent;
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
  transition: width 0.08s linear;
}

/* Header reacts to scroll position */
header {
  transition: box-shadow 0.3s ease;
}

.navigation {
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

header.is-scrolled .navigation {
  background-color: rgba(0, 0, 0, 0.6);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* Only shrink the bar's own padding on desktop, where .navigation is a
   horizontal top bar. On mobile it's a fixed slide-in panel whose padding
   (see the 768px breakpoint) positions the links below the close button
   and away from the edge — that padding must never be touched here. */
@media (min-width: 769px) {
  .navigation {
    transition: background-color 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
  }

  header.is-scrolled .navigation {
    padding: 0.65rem 0;
  }
}

/* Back-to-top button */
.back-to-top {
  position: fixed;
  right: clamp(1rem, 4vw, 2rem);
  bottom: clamp(1rem, 4vw, 2rem);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: rgba(14, 165, 233, 0.18);
  backdrop-filter: blur(10px);
  color: var(--text-main);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1150;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease, background-color 0.2s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover,
.back-to-top:focus-visible {
  background: rgba(14, 165, 233, 0.35);
  box-shadow: var(--shadow-glow);
}

/* Hero visual parallax layer needs a transition for smoothness on non-touch */
.hero-visual {
  will-change: transform;
}

/* Snappier, shorter-travel reveal on small screens so content
   feels responsive rather than sluggish while scrolling */
@media (max-width: 640px) {
  .reveal-el {
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-progress span,
  .back-to-top,
  .reveal-el {
    transition: none;
  }
}
