/* ============================================================
   PORTFOLIO — REFACTORED UI/UX
   Senior Design Audit: Glassmorphism · Micro-interactions · Refined Typography
   ============================================================ */

/* --- DESIGN TOKENS (CSS Variables) --- */
:root {
  /* Spacing Scale */
  --space-xs:   4px;
  --space-sm:   8px;
  --space-md:   16px;
  --space-lg:   32px;
  --space-xl:   64px;
  --space-2xl:  96px;

  /* Color Palette */
  --color-bg-deep:       #060f1a;
  --color-bg-mid:        #081b29;
  --color-bg-surface:    #0d2238;
  --color-bg-card:       rgba(13, 34, 56, 0.6);
  --color-accent:        rgb(41, 126, 206);
  --color-accent-bright: rgb(70, 160, 245);
  --color-accent-glow:   rgba(41, 126, 206, 0.35);
  --color-accent-subtle: rgba(41, 126, 206, 0.12);
  --color-text-primary:  #f0f4f8;
  --color-text-secondary:#a8bfd0;
  --color-border-glass:  rgba(255, 255, 255, 0.08);
  --color-border-accent: rgba(41, 126, 206, 0.3);

  /* Typography */
  --font-display: 'Montserrat', sans-serif;
  --font-body:    'Poppins', sans-serif;

  /* Radii */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  /* Transitions */
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- GOOGLE FONTS IMPORT --- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600;700;800;900&family=Poppins:wght@300;400;500;600&display=swap');

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Selective transition — not on 'all' (performance) */
a, button, .btn-box a, .project-box, .skills-box, .badge, .navbar a {
  transition: var(--transition-base);
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--color-bg-deep);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ============================================================
   ANIMATED BACKGROUND GRADIENT (Slow / Atmospheric)
   ============================================================ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(15, 40, 70, 0.7) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(8, 27, 41, 0.9) 0%, transparent 70%),
    linear-gradient(135deg, #060f1a 0%, #081b29 40%, #0a2035 70%, #060f1a 100%);
  background-size: 400% 400%;
  animation: atmosphericShift 25s ease infinite;
}

@keyframes atmosphericShift {
  0%   { background-position: 0% 0%; }
  33%  { background-position: 100% 30%; }
  66%  { background-position: 20% 100%; }
  100% { background-position: 0% 0%; }
}

/* ============================================================
   HEADER & NAVIGATION
   ============================================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 16px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  transition: var(--transition-slow);
}

.header.scrolled {
  background: rgba(6, 15, 26, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--color-border-glass);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.logo {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text-primary);
  text-decoration: none;
  letter-spacing: 0.5px;
}

.navbar a {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-decoration: none;
  margin-left: 36px;
  letter-spacing: 0.3px;
  position: relative;
  padding-bottom: 4px;
}

.navbar a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--color-accent);
  transition: width var(--transition-base);
}

.navbar a:hover,
.navbar a.active {
  color: var(--color-accent-bright);
  transform: none; /* override old scale */
}

.navbar a:hover::after,
.navbar a.active::after {
  width: 100%;
}

/* ============================================================
   HOME SECTION
   ============================================================ */
#home {
  height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 10%;
  background: transparent;
  position: relative;
}

/* Subtle dot-grid texture overlay */
#home::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(41, 126, 206, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

.home-content {
  max-width: 580px;
  position: relative;
  z-index: 2;
}

.home-content h1 {
  font-family: var(--font-display);
  font-size: clamp(42px, 5vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1px;
  color: var(--color-text-primary);
}

.home-content h3 {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.5vw, 26px);
  font-weight: 600;
  color: var(--color-accent);
  margin-top: var(--space-sm);
  letter-spacing: 0.2px;
}

.home-content p {
  font-size: 15px;
  color: var(--color-text-secondary);
  margin: var(--space-lg) 0;
  max-width: 480px;
  font-style: italic;
  border-left: 2px solid var(--color-accent-glow);
  padding-left: var(--space-md);
  line-height: 1.8;
}

.home-img {
  width: 500px;
  height: 500px;
  border-radius: 50%;
  object-fit: cover;
  position: absolute;
  top: 50%;
  left: 190%;
  transform: translate(-50%, -50%);
  border: 2px solid var(--color-border-accent);
  box-shadow:
    0 0 0 8px var(--color-accent-subtle),
    0 0 60px var(--color-accent-glow),
    0 24px 64px rgba(0, 0, 0, 0.5);
  z-index: 2;
  animation: heroFloat 8s ease-in-out infinite;
}

@keyframes heroFloat {
  0%, 100% { transform: translate(-50%, -50%) translateY(0px); }
  50%       { transform: translate(-50%, -50%) translateY(-14px); }
}

/* ============================================================
   ABOUT SECTION
   ============================================================ */
#about {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 100px 10%;
  overflow: hidden;
}

/* Glassmorphism card for about content */
.about-content {
  position: relative;
  z-index: 2;
  max-width: 560px;
  background: rgba(13, 34, 56, 0.45);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid var(--color-border-glass);
  border-radius: var(--radius-xl);
  padding: 40px 44px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.about-img {
  width: 420px;
  height: 420px;
  border-radius: 50%;
  object-fit: cover;
  position: absolute;
  top: 50%;
  right: 100%;
  left: auto;
  transform: translate(-50%, -50%);
  border: 2px solid var(--color-border-accent);
  box-shadow:
    0 0 0 8px var(--color-accent-subtle),
    0 0 80px rgba(41, 126, 206, 0.2),
    0 24px 64px rgba(0, 0, 0, 0.5);
}

.about-content h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 3.5vw, 44px);
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.15;
}

.about-content h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--color-accent);
}

.about-content p {
  font-size: 15px;
  color: var(--color-text-secondary);
  line-height: 1.8;
}

.about-content .btn-box {
  position: relative;
  margin-top: var(--space-sm);
  display: flex;
  justify-content: flex-start;
  width: 100%;
  height: 50px;
}

/* Ambient glow blob — decorative */
#about .glow-blob {
  position: absolute;
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(41, 126, 206, 0.15) 0%, transparent 70%);
  filter: blur(60px);
  border-radius: 50%;
  top: 15%;
  right: 8%;
  pointer-events: none;
  animation: blobDrift 12s ease-in-out infinite;
}

@keyframes blobDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%       { transform: translate(-30px, 20px) scale(1.1); }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-box {
  display: flex;
  gap: var(--space-md);
  width: 345px;
  height: 50px;
}

.btn-box a {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0 var(--space-lg);
  height: 100%;
  background: var(--color-accent);
  border: 1.5px solid var(--color-accent);
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  overflow: hidden;
  transition: var(--transition-spring);
}

.btn-box a::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.btn-box a:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px var(--color-accent-glow), 0 4px 12px rgba(0,0,0,0.3);
  background: var(--color-accent-bright);
  border-color: var(--color-accent-bright);
}

.btn-box a:hover::before {
  opacity: 1;
}

/* ============================================================
   SOCIAL ICONS
   ============================================================ */
.home-sci,
.footer-sci {
  display: flex;
  gap: var(--space-sm);
  margin: var(--space-md) 0;
}

.home-sci a,
.footer-sci a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 42px;
  height: 42px;
  background: var(--color-accent-subtle);
  border: 1px solid var(--color-border-accent);
  border-radius: 50%;
  font-size: 18px;
  color: var(--color-accent);
  text-decoration: none;
  transition: var(--transition-spring);
}

.home-sci a:hover,
.footer-sci a:hover {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 24px var(--color-accent-glow);
}

/* ============================================================
   EXPERIENCE SECTION
   ============================================================ */
#projects.experience {
  background: transparent;
  padding: var(--space-2xl) 0;
}

.experience-content {
  text-align: center;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.experience-content h1,
.projects-content h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 4.5vw, 56px);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.1;
}

.experience-content h3 {
  font-size: 22px;
  font-weight: 600;
  color: var(--color-accent);
}

.experience-content p {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin: var(--space-md) 0;
}

/* Tabbed nav */
.nav-experience {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin: var(--space-lg) 0;
  background: rgba(13, 34, 56, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-border-glass);
  border-radius: 50px;
  padding: var(--space-xs) var(--space-sm);
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.nav-experience a {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-decoration: none;
  padding: 8px 20px;
  border-radius: 50px;
  transition: var(--transition-base);
}

.nav-experience a:hover,
.nav-experience a.active {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 4px 16px var(--color-accent-glow);
}

/* ============================================================
   BOXES — EDUCATION / SKILLS / WORK (Glassmorphism Cards)
   ============================================================ */
.boxes-container,
.skills-container,
.work-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch; /* Forces all boxes in a row to the same height */
  gap: var(--space-md);
  margin-top: var(--space-lg);
  padding: 0 var(--space-md);
  width: 100%;
}
.education-box,
.skills-box,
.work-box {
  background: var(--color-bg-card);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid var(--color-border-glass);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-md);
  text-align: center;
  transition: var(--transition-spring);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.education-box {
  min-width: 200px;
  flex-basis: calc(22% - var(--space-md));
}


.skills-box {
  min-width: 240px;
  flex-basis: calc(28% - var(--space-md));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.work-box {
  flex-basis: calc(47% - var(--space-md));
  min-width: 280px;
  text-align: left;
}

.education-box:hover,
.skills-box:hover,
.work-box:hover {
  transform: translateY(-6px);
  border-color: var(--color-border-accent);
  box-shadow:
    0 12px 48px rgba(0, 0, 0, 0.35),
    0 0 0 1px var(--color-border-accent),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.education-box h2,
.skills-box h2,
.work-box h2 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin-bottom: var(--space-sm);
  color: var(--color-text-primary);
}

.education-box p,
.skills-box p {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.6;
}
#education.section.show {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Center the container vertically */
    
    /* FORCE THE TOTAL SECTION HEIGHT */
    height: -39.8rem !important; 
    min-height: -39.8rem !important;
    max-height: -39.8rem !important;
    
    /* REMOVE EXCESS PADDING */
    padding: 0 !important; 
    margin: 20px 0; /* Add a small margin instead of padding */
    overflow: hidden;
}

/* ============================================================
   BADGES / SKILL TAGS
   ============================================================ */
.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(41, 126, 206, 0.1);
  color: rgba(160, 200, 245, 0.9);
  border: 1px solid rgba(41, 126, 206, 0.2);
  padding: 5px 12px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2px;
  transition: var(--transition-base);
}

.badge:hover {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
  transform: scale(1.05);
  box-shadow: 0 4px 14px var(--color-accent-glow);
}

.badge i {
  font-size: 13px;
  vertical-align: middle;
}

/* ============================================================
   PROJECT BOXES — Glassmorphism + Lift & Glow
   ============================================================ */
#project.projects {
  background: transparent;
  padding-bottom: var(--space-2xl);
}

.projects-content {
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg) 0;
}

.projects-content p {
  font-size: 15px;
  color: var(--color-text-secondary);
  margin: var(--space-md) 0 var(--space-lg);
}

.project-boxes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-lg);
  width: 100%;
}

.project-box {
  background: rgba(13, 34, 56, 0.45);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--color-border-glass);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 200px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: var(--transition-spring);
}

/* Top-edge accent line — reveals on hover */
.project-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  opacity: 0;
  transition: opacity var(--transition-base);
}

/* Glow halo — reveals on hover */
.project-box::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  box-shadow: inset 0 0 60px rgba(41, 126, 206, 0);
  transition: box-shadow var(--transition-slow);
  pointer-events: none;
}

.project-box:hover {
  transform: translateY(-10px) scale(1.01);
  border-color: var(--color-border-accent);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(41, 126, 206, 0.25),
    0 0 40px rgba(41, 126, 206, 0.12);
}

.project-box:hover::before {
  opacity: 1;
}

.project-box:hover::after {
  box-shadow: inset 0 0 60px rgba(41, 126, 206, 0.06);
}

.project-box h4 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--space-xs);
  letter-spacing: 0.1px;
}

.project-box p1 {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.project-box p {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.65;
  flex: 1;
  margin: var(--space-sm) 0 var(--space-md);
}

/* Icon badges inside project cards — OCEAN FLOAT on hover */
.project-box .badge {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  width: auto !important;
  height: auto !important;
  margin-right: var(--space-sm);
}

.project-box .badge i {
  font-size: 26px !important;
  color: var(--color-text-secondary);
  transition: color var(--transition-base);
  display: inline-block;
}

/* Ocean float — ONLY triggers when parent card is hovered (micro-interaction) */
.project-box:hover .badge i {
  color: var(--color-accent-bright);
  animation: oceanFloat 4s ease-in-out infinite;
}

.project-box:nth-child(even):hover .badge i {
  animation-duration: 5.5s;
  animation-delay: 0.3s;
}

.project-box:nth-child(3n):hover .badge i {
  animation-duration: 3.5s;
  animation-delay: 0.6s;
}

/* Stagger multiple icons within one card */
.project-box:hover .badge:nth-child(2) i {
  animation-delay: 0.5s;
}

@keyframes oceanFloat {
  0%   { transform: translateY(0) rotate(0deg); }
  25%  { transform: translateY(-7px) rotate(4deg); }
  50%  { transform: translateY(-3px) rotate(-2deg); }
  75%  { transform: translateY(-9px) rotate(3deg); }
  100% { transform: translateY(0) rotate(0deg); }
}
/* ============================================================
   CERTIFICATES SECTION
   ============================================================ */
.certificates-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: var(--space-md);
  margin-top: var(--space-lg);
  padding: 0 var(--space-md);
  width: 100%;
}

.certificate-box {
  background: var(--color-bg-card);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid var(--color-border-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
  flex-basis: calc(28% - var(--space-md));
  min-width: 240px;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: var(--transition-spring);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.certificate-box:hover {
  transform: translateY(-6px);
  border-color: var(--color-border-accent);
  box-shadow:
    0 12px 48px rgba(0, 0, 0, 0.35),
    0 0 0 1px var(--color-border-accent),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Image preview area */
.cert-preview {
  position: relative;
  width: 100%;
  height: 160px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--color-border-glass);
}

.cert-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.certificate-box:hover .cert-img {
  transform: scale(1.06);
}

/* Zoom hint overlay */
.cert-zoom-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 15, 26, 0.55);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.certificate-box:hover .cert-zoom-hint {
  opacity: 1;
}

.cert-zoom-hint i {
  font-size: 2rem;
  color: var(--color-accent-bright);
  filter: drop-shadow(0 0 8px var(--color-accent-glow));
}

/* Text info area */
.cert-info {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.cert-info h2 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: 0.2px;
  line-height: 1.3;
}

.cert-issuer {
  font-size: 12px;
  color: var(--color-text-primary);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cert-id {
  font-size: 11px;
  color: var(--color-text-secondary);
  font-family: monospace;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cert-date {
  font-size: 11px;
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--space-xs);
  padding-top: var(--space-xs);
  border-top: 1px solid var(--color-border-glass);
}

/* Responsive: stack on mobile */
@media (max-width: 600px) {
  .certificate-box {
    flex-basis: 100%;
    min-width: unset;
    max-width: 100%;
  }
}
/* ============================================================
   CERTIFICATE FLOATING VIEWER
   ============================================================ */
.cert-viewer {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 4000;
  width: min(680px, 92vw);
}

.cert-viewer.cert-active {
  display: block;
  animation: certPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes certPop {
  from { opacity: 0; transform: translate(-50%, -48%) scale(0.92); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.cert-viewer-card {
  background: rgba(10, 22, 38, 0.82);
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  border: 1px solid var(--color-border-accent);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(41, 126, 206, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.cert-viewer-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--color-border-glass);
  border-radius: 50%;
  color: var(--color-text-secondary);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-base);
  padding: 0;
}

.cert-viewer-close:hover {
  background: var(--color-accent-subtle);
  border-color: var(--color-border-accent);
  color: var(--color-accent-bright);
  transform: rotate(90deg);
}

.cert-viewer-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-glass);
  display: block;
}

.cert-viewer-caption {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-border-glass);
}

.cert-viewer-name {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-accent);
  margin: 0;
}

.cert-viewer-id {
  font-size: 11px;
  font-family: monospace;
  color: var(--color-text-secondary);
  letter-spacing: 0.3px;
  margin: 0;
}

.cert-viewer-date {
  font-size: 11px;
  color: var(--color-text-secondary);
  margin: 0;
}
/* ============================================================
   TIMELINE (Experience Entries)
   ============================================================ */
.timeline {
  position: relative;
  padding-left: 28px;
  margin-top: var(--space-md);
  text-align: left;
  width: 100%;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 6px;
  width: 2px;
  height: calc(100% - 6px);
  background: linear-gradient(
    to bottom,
    var(--color-accent) 0%,
    rgba(41, 126, 206, 0.1) 100%
  );
}

.timeline-item {
  position: relative;
  margin-bottom: var(--space-lg);
}

.timeline-dot {
  position: absolute;
  left: -26px;
  top: 6px;
  width: 10px;
  height: 10px;
  background: var(--color-bg-deep);
  border: 2px solid var(--color-accent);
  border-radius: 50%;
  z-index: 1;
  transition: var(--transition-base);
}

.timeline-item:hover .timeline-dot {
  background: var(--color-accent);
  box-shadow: 0 0 12px var(--color-accent-glow);
  transform: scale(1.3);
}

.timeline-content h3 {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--space-xs);
}

/* ============================================================
   EXPERIENCE SECTION — Card Font Scaling
   ============================================================ */
#work .skills-box h2 {
  font-size: 14px;
}

#work .timeline-content h3 {
  font-size: 12px;
}

#work .badge {
  font-size: 11px;
  padding: 3px 9px;
}

#work .badge i {
  font-size: 10px;
}

/* ============================================================
   MODAL — Professional Technical Whitepaper Style
   ============================================================ */
.modal {
  display: none;
  position: fixed;
  z-index: 3000;
  inset: 0;
  background: rgba(3, 8, 14, 0.92);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  overflow-y: auto;
  padding: 40px 20px;
}

.modal-content {
  background: rgba(10, 22, 38, 0.88);
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  border: 1px solid var(--color-border-glass);
  border-radius: var(--radius-xl);
  margin: 0 auto;
  padding: 44px 48px;
  width: 92%;
  max-width: 820px;
  position: relative;
  box-shadow:
    0 40px 120px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(41, 126, 206, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: modalReveal 0.4s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

@keyframes modalReveal {
  from { transform: scale(0.88) translateY(24px); opacity: 0; }
  to   { transform: scale(1) translateY(0);        opacity: 1; }
}

.close-modal {
  position: absolute;
  right: 24px;
  top: 20px;
  color: var(--color-text-secondary);
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  transition: var(--transition-base);
}

.close-modal:hover {
  color: var(--color-accent-bright);
  background: var(--color-accent-subtle);
  transform: rotate(90deg);
}

#modalTitle {
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 800;
  color: var(--color-text-primary);
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: var(--space-xs);
  padding-right: 40px;
}

#modalRole {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-accent);
  margin-bottom: var(--space-lg);
}

/* Horizontal rule separator */
#modalRole::after {
  content: '';
  display: block;
  height: 1px;
  background: linear-gradient(90deg, var(--color-border-accent), transparent);
  margin-top: var(--space-md);
}

/* Gallery Grid */
.modal-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
  margin: var(--space-lg) 0;
  padding: var(--space-md);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--color-border-glass);
  border-radius: var(--radius-md);
}

.gallery-img {
  width: 300px;
  height: 300px;
  object-fit: contain;
  background: rgba(13, 34, 56, 0.7);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-glass);
  padding: var(--space-xs);
  transition: var(--transition-spring);
}

.gallery-img:hover {
  transform: scale(1.08);
  border-color: var(--color-border-accent);
  box-shadow: 0 8px 32px var(--color-accent-glow);
}

/* Description / body text */
#modalDesc {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.9;
  text-align: left;
  padding: var(--space-md) var(--space-lg);
  border-left: 2px solid var(--color-accent);
  background: rgba(41, 126, 206, 0.04);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-top: var(--space-lg);
}

/* Section sub-headers inside modal */
#modalDesc h3,
.modal-content h3.modal-sub-header {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-accent);
  margin: var(--space-lg) 0 var(--space-sm);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--color-border-accent);
}

/* Tables inside modal */
.modal-table-container {
  margin: var(--space-md) 0;
}

.table-heading {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-accent);
  margin: var(--space-lg) 0 var(--space-sm);
  border-bottom: 1px solid var(--color-border-accent);
  padding-bottom: var(--space-xs);
}

.project-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border-glass);
}

.project-data-table th {
  background: rgba(41, 126, 206, 0.12);
  color: var(--color-accent-bright);
  padding: 12px var(--space-md);
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--color-border-accent);
}

.project-data-table td {
  padding: 11px var(--space-md);
  border-bottom: 1px solid var(--color-border-glass);
  color: var(--color-text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.project-data-table td b {
  color: var(--color-text-primary);
  font-weight: 600;
}

.project-data-table tr:last-child td {
  border-bottom: none;
}

.project-data-table tr:hover td {
  background: rgba(41, 126, 206, 0.05);
  color: var(--color-text-primary);
}

/* ============================================================
   PROJECTS SECTION BACKGROUND (subtle)
   ============================================================ */
#project.projects {
  position: relative;
}

#project.projects::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(41, 126, 206, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  width: 100%;
  background: rgba(6, 15, 26, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--color-border-glass);
  padding: var(--space-lg) var(--space-xl);
  position: relative;
  text-align: center;
  color: var(--color-text-secondary);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-content p {
  font-size: 13px;
  color: var(--color-text-secondary);
}

.footer-sci {
  position: relative;
  bottom: auto;
  margin-top: 0;
}

/* ============================================================
   SECTION ANIMATIONS
   ============================================================ */
.animate-header {
  animation: fadeInDown 0.8s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.animate-section {
  animation: fadeInUp 0.9s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.animate-content {
  animation: fadeIn 1.2s ease both;
}

.animate-footer {
  animation: fadeIn 1s ease both;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Box reveal with stagger (JS-driven, kept compatible) */
.boxes-container .education-box,
.boxes-container .skills-box,
.boxes-container .work-box {
  opacity: 0;
  transform: translateY(16px);
}

.section.show .boxes-container .education-box,
.section.show .skills-container .skills-box,
.section.show .work-container .work-box {
  opacity: 1;
  transform: translateY(0);
  animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* ============================================================
   BANANA CAT — Untouched (personality preserved!)
   ============================================================ */
.banana-cat-track {
  position: absolute;
  bottom: 80px;
  left: -100px;
  width: 100px;
  height: 100px;
  z-index: 100;
  pointer-events: none;
}

.banana-cat {
  width: 85px;
  height: auto;
  transform: scaleX(1); 
  animation: walkAcross 15s linear infinite;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

@keyframes walkAcross {
  0% { 
    transform: translateX(1) scaleX(0); 
  }
  45% { 
    transform: translateX(110vw) scaleX(0); 
  }
  50% { 
    transform: translateX(110vw) scaleX(1); 
  }
  95% { 
    transform: translateX(-100px) scaleX(1); 
  }
  100% { 
    transform: translateX(1) scaleX(0); 
  }
}
/* ============================================================
   GENERAL SECTION LAYOUT
   ============================================================ */
section {
  width: 100%;
  padding: 60px 0;
  overflow: hidden;
  position: relative;
}

.experience-content,
.projects-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ============================================================
   SCROLLBAR (subtle polish)
   ============================================================ */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg-deep);
}

::-webkit-scrollbar-thumb {
  background: rgba(41, 126, 206, 0.3);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent);
}

/* ============================================================
   SELECTION HIGHLIGHT
   ============================================================ */
::selection {
  background: var(--color-accent-glow);
  color: var(--color-text-primary);
}