:root {
  --primary: #0a192f;
  --primary-light: #1e3a5f;
  --gold: #c9a84c;
  --gold-light: #e8d48b;
  --gold-dark: #a88a2e;
  --white: #ffffff;
  --off-white: #f8f9fc;
  --light-gray: #eaeef5;
  --text: #2d3436;
  --text-light: #636e72;
  --glass-bg: rgba(255, 255, 255, 0.15);
  --glass-border: rgba(255, 255, 255, 0.25);
  --shadow: 0 8px 32px rgba(10, 25, 47, 0.1);
  --shadow-hover: 0 12px 48px rgba(10, 25, 47, 0.2);
  --nav-bg: rgba(255, 255, 255, 0.85);
  --card-bg: #ffffff;
  --section-bg: #ffffff;
  --footer-bg: #0a192f;
  --footer-text: #ffffff;
  --placeholder-bg: #f1f3f8;
  --input-bg: #ffffff;
  --input-border: #d1d8e0;
  --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

[data-theme="dark"] {
  --primary: #0a192f;
  --primary-light: #1e3a5f;
  --gold: #d4af37;
  --gold-light: #f0d060;
  --gold-dark: #b8962e;
  --white: #0f0f1a;
  --off-white: #1a1a2e;
  --light-gray: #16213e;
  --text: #e4e6eb;
  --text-light: #b0b3b8;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 12px 48px rgba(0, 0, 0, 0.5);
  --nav-bg: rgba(15, 15, 26, 0.9);
  --card-bg: #1a1a2e;
  --section-bg: #0f0f1a;
  --footer-bg: #050510;
  --footer-text: #e4e6eb;
  --placeholder-bg: #1e1e32;
  --input-bg: #1a1a2e;
  --input-border: #2d2d4a;
}

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

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--section-bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background 0.5s ease, color 0.5s ease;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--primary); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dark); }

#loading-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#loading-screen.hidden { opacity: 0; visibility: hidden; }

.loader {
  width: 50px; height: 50px;
  border: 3px solid rgba(201, 168, 76, 0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-tag {
  display: inline-block;
  padding: 6px 20px;
  border-radius: 50px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 16px;
  font-family: 'Playfair Display', serif;
}

.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.section-divider span {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-dark), var(--gold));
  border-radius: 2px;
  display: block;
}

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.glass:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--primary);
  box-shadow: 0 4px 15px rgba(201, 168, 76, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(201, 168, 76, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--gold);
}
.btn-outline:hover {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--primary);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 10px 22px;
  font-size: 0.85rem;
}

/* Navigation */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0;
  transition: var(--transition);
}
#navbar.scrolled {
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.1);
  border-bottom: 1px solid var(--glass-border);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--text);
  text-decoration: none;
  font-family: 'Playfair Display', serif;
}
.nav-logo span { color: var(--gold); }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-link {
  text-decoration: none;
  color: var(--text-light);
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}
.nav-link:hover,
.nav-link.active {
  color: var(--gold);
  background: rgba(201, 168, 76, 0.1);
}

.theme-toggle {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text);
  width: 42px; height: 42px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  margin-left: 8px;
}
.theme-toggle:hover {
  background: var(--gold);
  color: var(--primary);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  width: 28px;
  height: 3px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 120px 24px 60px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(201, 168, 76, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(10, 25, 47, 0.05) 0%, transparent 50%);
  z-index: 0;
}

.hero-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}
.particle {
  position: absolute;
  width: 4px; height: 4px;
  background: var(--gold);
  border-radius: 50%;
  opacity: 0;
  animation: floatParticle 8s infinite ease-in-out;
}
@keyframes floatParticle {
  0% { opacity: 0; transform: translateY(0) scale(0); }
  20% { opacity: 0.6; }
  80% { opacity: 0.6; }
  100% { opacity: 0; transform: translateY(-100vh) scale(1); }
}

.hero-content {
  text-align: center;
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-image-wrapper {
  position: relative;
  width: 200px; height: 200px;
  margin: 0 auto 40px;
}

.hero-image-glide {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark), var(--gold));
  animation: rotateGlide 4s linear infinite;
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #fff calc(100% - 2px));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #fff calc(100% - 2px));
}
@keyframes rotateGlide {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hero-image {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255,255,255,0.2);
  position: relative;
  z-index: 1;
  box-shadow: 0 0 40px rgba(201, 168, 76, 0.2);
}

.profile-upload-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 40px; height: 40px;
  background: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  cursor: pointer;
  z-index: 2;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.profile-upload-btn:hover {
  transform: scale(1.1);
}

.hero-title {
  font-size: 3.2rem;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 20px;
  line-height: 1.2;
  font-family: 'Playfair Display', serif;
  background: linear-gradient(135deg, var(--text), var(--gold-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-light);
  max-width: 650px;
  margin: 0 auto 36px;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-scroll-indicator {
  margin-top: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-light);
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: bounceDown 2s infinite;
}
.hero-scroll-indicator i {
  font-size: 1.2rem;
  color: var(--gold);
}
@keyframes bounceDown {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(8px); }
  60% { transform: translateY(4px); }
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 32px;
}

.about-card {
  padding: 40px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--glass-border);
}
.info-item:last-child { border-bottom: none; }
.info-item i {
  width: 24px;
  color: var(--gold);
  font-size: 1.1rem;
}
.info-item span {
  font-weight: 500;
}

.about-description {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--text-light);
}

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

.skill-category {
  padding: 36px 28px;
  text-align: center;
}

.skill-icon {
  width: 60px; height: 60px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--primary);
}

.skill-category h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 18px;
  color: var(--text);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.skill-tags span {
  padding: 6px 16px;
  border-radius: 50px;
  background: rgba(201, 168, 76, 0.12);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid rgba(201, 168, 76, 0.2);
  transition: var(--transition);
}
.skill-tags span:hover {
  background: var(--gold);
  color: var(--primary);
  transform: translateY(-2px);
}

/* Certifications */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
  max-width: 500px;
  margin: 0 auto;
}

.cert-card {
  padding: 40px;
  text-align: center;
}

.cert-badge {
  font-size: 3rem;
  color: var(--gold);
  margin-bottom: 16px;
}

.cert-card h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.cert-org {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.cert-status {
  display: inline-block;
  padding: 6px 20px;
  border-radius: 50px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.cert-placeholder {
  margin-top: 20px;
  padding: 24px;
  border: 2px dashed var(--glass-border);
  border-radius: 16px;
  background: var(--placeholder-bg);
}
.cert-placeholder i {
  font-size: 2.5rem;
  color: var(--gold);
  margin-bottom: 12px;
}
.cert-placeholder p {
  color: var(--text-light);
  margin-bottom: 12px;
}

.upload-btn-sm {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 50px;
  background: var(--gold);
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.upload-btn-sm:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(201, 168, 76, 0.3);
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.project-card {
  padding: 36px 28px;
}

.project-icon {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--primary);
  margin-bottom: 20px;
}

.project-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.project-card p {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 20px;
  line-height: 1.7;
}

.project-uploads {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.upload-area {
  width: 100%;
  padding: 24px;
  border: 2px dashed var(--glass-border);
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--placeholder-bg);
}
.upload-area:hover {
  border-color: var(--gold);
  background: rgba(201, 168, 76, 0.05);
}
.upload-area i {
  font-size: 1.5rem;
  color: var(--gold);
  display: block;
  margin-bottom: 8px;
}
.upload-area span {
  font-size: 0.85rem;
  color: var(--text-light);
}

.project-media {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.project-media img,
.project-media video {
  width: 80px; height: 80px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid var(--glass-border);
  transition: var(--transition);
}
.project-media video { width: 80px; height: 80px; }
.project-media img:hover,
.project-media video:hover {
  transform: scale(1.05);
  border-color: var(--gold);
}

/* Gallery */
.gallery-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 40px;
}

.gallery-filter {
  padding: 10px 24px;
  border-radius: 50px;
  border: 2px solid var(--glass-border);
  background: transparent;
  color: var(--text-light);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}
.gallery-filter:hover,
.gallery-filter.active {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--primary);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.gallery-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--placeholder-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  border: 2px dashed var(--glass-border);
  min-height: 220px;
}
.gallery-item:hover {
  border-color: var(--gold);
}
.gallery-item i {
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 8px;
}
.gallery-item span {
  font-size: 0.8rem;
  color: var(--text-light);
}
.gallery-item img,
.gallery-item video {
  width: 100%; height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

/* Resume */
.resume-container {
  padding: 40px;
  max-width: 800px;
  margin: 0 auto;
}

.resume-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}
.resume-actions h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}
.resume-actions h3 i {
  color: var(--gold);
  margin-right: 10px;
}

.resume-btns {
  display: flex;
  gap: 12px;
}

.resume-viewer {
  min-height: 400px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--placeholder-bg);
  border: 2px solid var(--glass-border);
}

.resume-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  color: var(--text-light);
}
.resume-placeholder i {
  font-size: 4rem;
  color: var(--gold);
  margin-bottom: 16px;
}

.resume-viewer iframe {
  width: 100%;
  height: 600px;
  border: none;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 32px;
}

.contact-form {
  padding: 40px;
}

.form-group {
  margin-bottom: 20px;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  border-radius: 12px;
  border: 2px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text);
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  transition: var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(201, 168, 76, 0.1);
}
.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-info {
  padding: 40px;
}
.contact-info h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text);
}
.contact-info p {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-light);
  margin-bottom: 16px;
}
.contact-info p i {
  color: var(--gold);
  width: 20px;
}

.social-links {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}
.social-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 1.2rem;
  text-decoration: none;
  transition: var(--transition);
}
.social-icon:hover {
  background: var(--gold);
  color: var(--primary);
  transform: translateY(-4px);
}

/* Footer */
footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  text-align: center;
  padding: 40px 24px;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
}

.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: var(--transition);
  z-index: 999;
  box-shadow: 0 4px 15px rgba(201, 168, 76, 0.3);
}
.scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.scroll-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(201, 168, 76, 0.4);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  padding: 40px;
}
.lightbox.active {
  opacity: 1;
  visibility: visible;
}
.lightbox img,
.lightbox video {
  max-width: 90%;
  max-height: 90vh;
  border-radius: 12px;
  object-fit: contain;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  transition: var(--transition);
}
.lightbox-close:hover {
  color: var(--gold);
  transform: rotate(90deg);
}

/* Responsive */
@media (max-width: 992px) {
  .hero-title { font-size: 2.5rem; }
  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .resume-actions { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-menu {
    position: fixed;
    top: 0; left: -100%;
    width: 280px; height: 100vh;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 80px 24px 24px;
    gap: 4px;
    transition: var(--transition);
    box-shadow: 4px 0 30px rgba(0,0,0,0.1);
    align-items: stretch;
    z-index: -1;
  }
  .nav-menu.active { left: 0; }

  .nav-link {
    padding: 14px 20px;
    font-size: 1rem;
  }

  .theme-toggle {
    margin: 8px 0 0;
    width: 100%;
    border-radius: 12px;
    justify-content: center;
    padding: 14px;
    height: auto;
  }

  .hero-title { font-size: 2rem; }
  .hero-subtitle { font-size: 1rem; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .hero-buttons .btn { width: 100%; max-width: 280px; justify-content: center; }

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

  .skills-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }

  .gallery-categories {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 12px;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
  }
  .gallery-filter {
    flex-shrink: 0;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

@media (max-width: 480px) {
  .hero-title { font-size: 1.7rem; }
  .hero-image-wrapper { width: 160px; height: 160px; }
  .section { padding: 70px 0; }
  .cert-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Animations on scroll */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--card-bg);
  color: var(--text);
  padding: 16px 28px;
  border-radius: 12px;
  box-shadow: var(--shadow-hover);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
  font-weight: 500;
}
.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.toast i {
  color: var(--gold);
  margin-right: 10px;
}

/* Modal for gallery upload */
.modal {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}
.modal.active {
  opacity: 1;
  visibility: visible;
}
.modal-content {
  background: var(--card-bg);
  padding: 40px;
  border-radius: 24px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  box-shadow: var(--shadow-hover);
}
.modal-content h3 {
  margin-bottom: 20px;
  color: var(--text);
}
.modal-content input[type="file"] {
  margin: 16px 0;
}
.modal-content .btn {
  margin-top: 12px;
}
.modal-close {
  float: right;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-light);
  transition: var(--transition);
}
.modal-close:hover {
  color: var(--gold);
}
