/* ========================================== */
/* CSS VARIABLES & ROOT */
/* ========================================== */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f7fafd;
  --bg-card: #ffffff;
  --text-primary: #111111;
  --text-secondary: #666666;
  --text-tertiary: #444444;
  --navbar-bg: rgba(250, 250, 250, 0.9);
  --navbar-shadow: rgba(0, 0, 0, 0.08);
  --card-shadow: rgba(182, 182, 182, 0.1);
  --card-shadow-hover: rgba(117, 117, 117, 0.18);
  --gradient-start: #00e1ff;
  --gradient-end: #0077ff;
  --border-color: #e0e0e0;
  --accent-color: #0077ff;
  --particle-color: rgba(0, 119, 255, 0.6);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --bg-card: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-tertiary: #888888;
    --navbar-bg: rgba(15, 15, 15, 0.9);
    --navbar-shadow: rgba(255, 255, 255, 0.05);
    --card-shadow: rgba(0, 0, 0, 0.3);
    --card-shadow-hover: rgba(0, 0, 0, 0.5);
    --border-color: #2a2a2a;
    --particle-color: rgba(0, 225, 255, 0.4);
  }
}

/* ========================================== */
/* GLOBAL STYLES */
/* ========================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: "Segoe UI", Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

body.loading {
  overflow: hidden !important;
  position: fixed !important;
  width: 100% !important;
  height: 100% !important;
  top: 0 !important;
  left: 0 !important;
}

/* ========================================== */
/* PARTICLE BACKGROUND */
/* ========================================== */
#particleCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ========================================== */
/* SPLASH SCREEN */
/* ========================================== */
#splash-screen {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, #0f172a, #020617);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 9999;
  color: #fff;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#splash-screen.fade-out {
  opacity: 0;
  visibility: hidden;
}

#splash-screen .logo {
  text-align: center;
  animation: popIn 0.8s ease-out forwards;
}

#splash-screen h1 {
  font-size: 3rem;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

#splash-screen h1 span {
  color: #38bdf8;
}

#splash-screen p {
  font-size: 1rem;
  opacity: 0.7;
  animation: pulse 1.5s ease-in-out infinite;
}

/* ========================================== */
/* NAVBAR */
/* ========================================== */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--navbar-bg);
  padding: 0 40px;
  box-shadow: 0 2px 8px var(--navbar-shadow);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  transition: all 0.3s ease, transform 0.3s ease;
}

.navbar.navbar-hidden {
  transform: translateY(-100%);
}

.navbar.scrolled {
  background: rgba(250, 250, 250, 0.7);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

@media (prefers-color-scheme: dark) {
  .navbar.scrolled {
    background: rgba(15, 15, 15, 0.7);
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.03);
  }
}

.logo img {
  height: 80px;
  width: auto;
  transition: transform 0.3s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 119, 255, 0.3));
}

.logo img:hover {
  transform: scale(1.05) rotate(-2deg);
}

.navbar ul {
  list-style: none;
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
}

.navbar ul li a {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 1rem;
  padding: 10px 18px;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
}

.navbar ul li a::after {
  content: "";
  position: absolute;
  bottom: 5px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient-start);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.navbar ul li a:hover::after,
.navbar ul li a.active::after {
  width: 80%;
}

.navbar ul li a:hover,
.navbar ul li a.active {
  background: rgba(0, 119, 255, 0.1);
  color: var(--accent-color);
}

.btn-github a {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: #fff;
  padding: 10px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 119, 255, 0.3);
  transition: all 0.3s ease;
}

.btn-github a:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 119, 255, 0.4);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

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

/* ========================================== */
/* HERO SECTION */
/* ========================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 140px 20px 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(0, 225, 255, 0.1), transparent);
  top: -300px;
  right: -300px;
  animation: float 10s ease-in-out infinite;
  filter: blur(40px);
}

.hero::after {
  content: "";
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 119, 255, 0.15), transparent);
  bottom: -200px;
  left: -200px;
  animation: float 12s ease-in-out infinite reverse;
  filter: blur(50px);
}

.hero-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  width: 100%;
  gap: 60px;
  position: relative;
  z-index: 2;
}

.hero-text {
  flex: 1;
  animation: slideInLeft 0.8s ease-out;
}

.hero-text h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end), #ff00ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
  animation: gradientShift 5s ease infinite;
  background-size: 200% 200%;
}

.hero-text p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.hero-image {
  flex: 0 0 auto;
  animation: slideInRight 0.8s ease-out;
  position: relative;
}

.hero-image img {
  width: 350px;
  height: 350px;
  object-fit: cover;
  border-radius: 20px;
  border: 5px solid var(--bg-card);
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

/* ========================================== */
/* BUTTONS */
/* ========================================== */
.btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: #fff;
  padding: 14px 32px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 119, 255, 0.3);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 119, 255, 0.5);
}

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--accent-color);
  padding: 14px 32px;
  border: 2px solid var(--accent-color);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: var(--accent-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 119, 255, 0.3);
}

.btn-outline {
  display: inline-block;
  background: transparent;
  color: var(--text-primary);
  padding: 12px 28px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-outline:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
  transform: translateY(-2px);
}

/* ========================================== */
/* ABOUT SECTION */
/* ========================================== */
.about {
  background: var(--bg-secondary);
  padding: 100px 20px;
  position: relative;
  z-index: 1;
}

.about-container {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
  gap: 80px;
}

.about-image img {
  width: 320px;
  height: 320px;
  object-fit: cover;
  border-radius: 50%;
  border: 6px solid var(--bg-card);
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.about-text {
  flex: 1;
  max-width: 600px;
}

.about-text h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: var(--text-primary);
  position: relative;
  display: inline-block;
}

.about-text h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
  border-radius: 2px;
}

.about-text p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.8;
}

.about-text ul {
  list-style: none;
  padding: 0;
}

.about-text ul li {
  padding: 10px 0 10px 30px;
  color: var(--text-tertiary);
  font-size: 1.05rem;
  transition: all 0.3s ease;
  position: relative;
}

.about-text ul li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent-color);
  font-weight: bold;
  transition: all 0.3s ease;
}

.about-text ul li:hover {
  color: var(--accent-color);
  transform: translateX(10px);
}

.about-text ul li:hover::before {
  transform: translateX(5px);
}

.about-cta {
  display: flex;
  gap: 15px;
  margin-top: 30px;
  flex-wrap: wrap;
}

/* ========================================== */
/* SKILLS SECTION */
/* ========================================== */
.skills {
  padding: 80px 20px;
  background: var(--bg-secondary);
  text-align: center;
  position: relative;
  z-index: 1;
}

.skills h2 {
  font-size: 2.5rem;
  color: var(--accent-color);
  margin-bottom: 50px;
  font-weight: 700;
}

.skills-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.skill-card {
  background: var(--bg-card);
  border-radius: 16px;
  box-shadow: 0 4px 20px var(--card-shadow);
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.skill-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 119, 255, 0.1), transparent);
  transition: left 0.5s;
}

.skill-card:hover::before {
  left: 100%;
}

.skill-card:hover {
  transform: translateY(-10px) scale(1.05);
  box-shadow: 0 12px 40px var(--card-shadow-hover);
  border-color: var(--accent-color);
}

.skill-card img {
  width: 64px;
  height: 64px;
  margin-bottom: 15px;
  transition: transform 0.3s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.skill-card:hover img {
  transform: scale(1.15) rotate(5deg);
}

.skill-card span {
  font-size: 1.1rem;
  color: var(--text-primary);
  font-weight: 600;
}

/* ========================================== */
/* PORTFOLIO SECTION */
/* ========================================== */
.portfolio-section {
  padding: 100px 20px;
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.background-blur {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(80px) brightness(0.6);
  transition: opacity 0.6s ease-in-out;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
}

.background-blur.active {
  opacity: 0.4;
}

.portfolio-section > *:not(.background-blur) {
  position: relative;
  z-index: 1;
}

.portfolio-section h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 15px;
  text-align: center;
}

.portfolio-section > p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 60px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  max-width: 1400px;
  margin: 0 auto;
}

.portfolio-card {
  background: var(--bg-card);
  border-radius: 16px;
  box-shadow: 0 8px 30px var(--card-shadow);
  overflow: hidden;
  transition: all 0.4s ease;
  position: relative;
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.portfolio-card:nth-child(1) { animation-delay: 0.1s; }
.portfolio-card:nth-child(2) { animation-delay: 0.2s; }
.portfolio-card:nth-child(3) { animation-delay: 0.3s; }
.portfolio-card:nth-child(4) { animation-delay: 0.4s; }
.portfolio-card:nth-child(5) { animation-delay: 0.5s; }
.portfolio-card:nth-child(6) { animation-delay: 0.6s; }
.portfolio-card:nth-child(7) { animation-delay: 0.7s; }
.portfolio-card:nth-child(8) { animation-delay: 0.8s; }

.portfolio-card:hover {
  transform: translateY(-15px);
  box-shadow: 0 20px 60px var(--card-shadow-hover);
}

.portfolio-image {
  position: relative;
  overflow: hidden;
  height: 220px;
}

.portfolio-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.portfolio-card:hover .portfolio-image img {
  transform: scale(1.15);
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 225, 255, 0.9), rgba(0, 119, 255, 0.9));
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.portfolio-card:hover .portfolio-overlay {
  opacity: 1;
}

.view-project {
  background: white;
  color: var(--accent-color);
  padding: 12px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.view-project:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.portfolio-content {
  padding: 25px;
}

.portfolio-content h3 {
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-bottom: 12px;
  transition: color 0.3s ease;
}

.portfolio-card:hover .portfolio-content h3 {
  color: var(--accent-color);
}

.portfolio-content p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ========================================== */
/* CERTIFICATES SECTION */
/* ========================================== */
.certificates {
  padding: 100px 20px;
  background: var(--bg-primary);
  position: relative;
  z-index: 1;
}

.certificates .background-blur-cert {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(80px) brightness(0.6);
  transition: opacity 0.6s ease-in-out;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
}

.certificates .background-blur-cert.active {
  opacity: 0.4;
}

.certificates > *:not(.background-blur-cert) {
  position: relative;
  z-index: 1;
}

.certificates-container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.certificates h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 15px;
  position: relative;
  display: inline-block;
}

.certificates h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
  border-radius: 2px;
}

.certificates > p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 60px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.certificates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.certificate-card {
  background: var(--bg-card);
  border-radius: 16px;
  box-shadow: 0 8px 30px var(--card-shadow);
  overflow: hidden;
  transition: all 0.4s ease;
  position: relative;
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.certificate-card:nth-child(1) { animation-delay: 0.1s; }
.certificate-card:nth-child(2) { animation-delay: 0.2s; }
.certificate-card:nth-child(3) { animation-delay: 0.3s; }
.certificate-card:nth-child(4) { animation-delay: 0.4s; }
.certificate-card:nth-child(5) { animation-delay: 0.5s; }
.certificate-card:nth-child(6) { animation-delay: 0.6s; }

.certificate-card:hover {
  transform: translateY(-15px);
  box-shadow: 0 20px 60px var(--card-shadow-hover);
}

.certificate-image {
  position: relative;
  overflow: hidden;
  height: 220px;
}

.certificate-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.certificate-card:hover .certificate-image img {
  transform: scale(1.15);
}

.certificate-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 225, 255, 0.9), rgba(0, 119, 255, 0.9));
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.certificate-card:hover .certificate-overlay {
  opacity: 1;
}

.view-certificate {
  background: white;
  color: var(--accent-color);
  padding: 12px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.view-certificate:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.certificate-content {
  padding: 25px;
}

.certificate-content h3 {
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-bottom: 12px;
  transition: color 0.3s ease;
}

.certificate-card:hover .certificate-content h3 {
  color: var(--accent-color);
}

.certificate-issuer {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 500;
}

.certificate-date {
  font-size: 0.9rem;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.certificate-date::before {
  content: "📅";
}

/* ========================================== */
/* CERTIFICATE MODAL */
/* ========================================== */
.certificate-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.certificate-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  animation: fadeIn 0.3s ease forwards;
}

.certificate-modal.closing {
  animation: fadeOut 0.3s ease forwards;
}

.certificate-modal.closing .modal-content-wrapper {
  animation: modalSlideDown 0.3s ease forwards;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  animation: backdropFade 0.3s ease forwards;
}

.modal-content-wrapper {
  position: relative;
  background: var(--bg-card);
  border-radius: 20px;
  max-width: 900px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transform: scale(0.8) translateY(50px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 1;
}

.certificate-modal.active .modal-content-wrapper {
  transform: scale(1) translateY(0);
  opacity: 1;
  animation: modalSlideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 30px;
  border-bottom: 2px solid var(--border-color);
  position: sticky;
  top: 0;
  background: var(--bg-card);
  z-index: 10;
}

.modal-header h2 {
  font-size: 1.8rem;
  color: var(--text-primary);
  margin: 0;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 2rem;
  color: var(--text-secondary);
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: var(--bg-secondary);
  color: var(--accent-color);
  transform: rotate(90deg);
}

.modal-body {
  padding: 30px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

.certificate-images-viewer {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.main-image-container {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-secondary);
  box-shadow: 0 8px 30px var(--card-shadow);
}

.main-image-container img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 1;
}

.main-image-container:hover img {
  transform: scale(1.02);
}

.main-image-container.loading {
  position: relative;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
}

.main-image-container.loading::after {
  content: "";
  position: absolute;
  width: 50px;
  height: 50px;
  border: 5px solid var(--border-color);
  border-top-color: var(--accent-color);
  border-radius: 50%;
  animation: spinLoader 0.8s linear infinite;
  z-index: 10;
}

.main-image-container.loading img {
  opacity: 0;
}

.thumbnail-container {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.thumbnail-btn {
  background: var(--bg-secondary);
  border: 3px solid transparent;
  border-radius: 12px;
  padding: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 120px;
  position: relative;
}

.thumbnail-btn img {
  width: 100%;
  height: 70px;
  object-fit: cover;
  border-radius: 6px;
}

.thumbnail-btn span {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.thumbnail-btn:hover {
  border-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--card-shadow-hover);
}

.thumbnail-btn.active {
  border-color: var(--accent-color);
  background: rgba(0, 119, 255, 0.1);
}

.thumbnail-btn.active span {
  color: var(--accent-color);
}

.thumbnail-btn.loading {
  opacity: 0.5;
  pointer-events: none;
}

.thumbnail-btn.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-color);
  border-radius: 50%;
  animation: spinLoader 0.6s linear infinite;
}

.certificate-details {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.detail-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 15px;
  align-items: start;
  padding: 15px 20px;
  background: var(--bg-secondary);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.detail-item:hover {
  background: rgba(0, 119, 255, 0.05);
  transform: translateX(5px);
}

.detail-label {
  font-weight: 600;
  color: var(--accent-color);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-item span:not(.detail-label),
.detail-item p {
  color: var(--text-primary);
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0;
}

.grade-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 16px;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: white;
  border-radius: 20px;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 1px;
  box-shadow: 0 4px 12px rgba(0, 119, 255, 0.3);
}

.detail-item:last-child {
  grid-template-columns: 1fr;
  padding: 0;
  background: transparent;
}

.view-certificate-btn {
  background: white;
  color: var(--accent-color);
  padding: 12px 28px;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.view-certificate-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.modal-content-wrapper::-webkit-scrollbar {
  width: 8px;
}

.modal-content-wrapper::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

.modal-content-wrapper::-webkit-scrollbar-thumb {
  background: var(--accent-color);
  border-radius: 4px;
}

.modal-content-wrapper::-webkit-scrollbar-thumb:hover {
  background: var(--gradient-start);
}

/* ========================================== */
/* CONTACT SECTION */
/* ========================================== */
.contact {
  padding: 100px 20px;
  background: var(--bg-secondary);
  position: relative;
  z-index: 1;
}

.contact-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.contact-info h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.contact-info p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 30px;
  line-height: 1.8;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: var(--bg-card);
  border-radius: 12px;
  box-shadow: 0 4px 12px var(--card-shadow);
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.contact-item:hover {
  transform: translateX(10px);
  border-color: var(--accent-color);
  box-shadow: 0 6px 20px var(--card-shadow-hover);
}

.contact-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.contact-text {
  flex: 1;
}

.contact-text h3 {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 5px;
}

.contact-text p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0;
}

.contact-text a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.3s;
}

.contact-text a:hover {
  color: var(--gradient-start);
}

.contact-form {
  background: var(--bg-card);
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 10px 40px var(--card-shadow);
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-primary);
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.3s ease;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(0, 119, 255, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.submit-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 119, 255, 0.3);
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 119, 255, 0.5);
}

.submit-btn:active {
  transform: translateY(0);
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 30px;
}

.social-link {
  width: 50px;
  height: 50px;
  background: var(--bg-card);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-color);
  font-size: 1.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px var(--card-shadow);
  text-decoration: none;
}

.social-link:hover {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: white;
  transform: translateY(-5px) rotate(10deg);
  box-shadow: 0 6px 20px rgba(0, 119, 255, 0.4);
}

/* ========================================== */
/* PAGE HEADER */
/* ========================================== */
.page-header {
  padding: 150px 20px 80px;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  text-align: center;
  position: relative;
  z-index: 1;
}

.page-header-content h1 {
  font-size: 3rem;
  margin-bottom: 15px;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-header-content p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
}

/* ========================================== */
/* QUICK LINKS SECTION */
/* ========================================== */
.quick-links {
  padding: 80px 20px;
  background: var(--bg-primary);
  position: relative;
  z-index: 1;
}

.quick-links-container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.quick-links h2 {
  font-size: 2.5rem;
  margin-bottom: 50px;
  color: var(--text-primary);
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.link-card {
  background: var(--bg-card);
  padding: 40px 30px;
  border-radius: 16px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  box-shadow: 0 8px 30px var(--card-shadow);
}

.link-card:hover {
  transform: translateY(-10px);
  border-color: var(--accent-color);
  box-shadow: 0 15px 50px var(--card-shadow-hover);
}

.link-icon {
  font-size: 3rem;
  margin-bottom: 20px;
}

.link-card h3 {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.link-card p {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* ========================================== */
/* BLOG SECTION */
/* ========================================== */
.blog-section {
  padding: 80px 20px;
  background: var(--bg-primary);
  position: relative;
  z-index: 1;
}

.blog-container {
  max-width: 1400px;
  margin: 0 auto;
}

.blog-filters {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 24px;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: 25px;
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: white;
  border-color: transparent;
  transform: translateY(-2px);
}

.blog-search {
  max-width: 600px;
  margin: 0 auto 50px;
}

.blog-search input {
  width: 100%;
  padding: 15px 20px;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.blog-search input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(0, 119, 255, 0.1);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.blog-card {
  background: var(--bg-card);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 30px var(--card-shadow);
  transition: all 0.4s ease;
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.blog-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 50px var(--card-shadow-hover);
}

.blog-image {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.blog-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.blog-card:hover .blog-image img {
  transform: scale(1.1);
}

.blog-category {
  position: absolute;
  top: 15px;
  right: 15px;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: white;
  padding: 6px 15px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.blog-content {
  padding: 25px;
}

.blog-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.blog-content h3 {
  font-size: 1.4rem;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.4;
  transition: color 0.3s;
}

.blog-card:hover h3 {
  color: var(--accent-color);
}

.blog-content > p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

.blog-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.blog-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  background: var(--bg-secondary);
  color: var(--accent-color);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.read-more {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s;
}

.read-more:hover {
  gap: 10px;
}

.blog-pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.page-btn {
  padding: 10px 18px;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.page-btn:hover,
.page-btn.active {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: white;
  border-color: transparent;
}

.no-articles,
.error-message {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
  font-size: 1.2rem;
}

/* ========================================== */
/* BLOG DETAIL PAGE */
/* ========================================== */
.back-to-blog {
  padding: 120px 20px 20px;
  max-width: 900px;
  margin: 0 auto;
}

.back-to-blog a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
}

.back-to-blog a:hover {
  gap: 12px;
}

.article-detail {
  padding: 20px 20px 80px;
  background: var(--bg-primary);
}

.article-container {
  max-width: 900px;
  margin: 0 auto;
}

.article-header {
  text-align: center;
  margin-bottom: 40px;
}

.article-category {
  display: inline-block;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: white;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.article-header h1 {
  font-size: 2.5rem;
  color: var(--text-primary);
  margin-bottom: 20px;
  line-height: 1.3;
}

.article-meta {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  color: var(--text-secondary);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.meta-icon {
  font-size: 1.2rem;
}

.article-image {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 40px;
  box-shadow: 0 10px 40px var(--card-shadow);
}

.article-image img {
  width: 100%;
  height: auto;
  display: block;
}

.article-tags {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.article-content {
  background: var(--bg-card);
  padding: 50px;
  border-radius: 16px;
  box-shadow: 0 8px 30px var(--card-shadow);
  margin-bottom: 50px;
}

.article-content h2 {
  font-size: 2rem;
  color: var(--text-primary);
  margin-top: 40px;
  margin-bottom: 20px;
}

.article-content h3 {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-top: 30px;
  margin-bottom: 15px;
}

.article-content p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.article-content ul,
.article-content ol {
  margin-bottom: 20px;
  padding-left: 30px;
}

.article-content li {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.article-content pre {
  background: var(--bg-secondary);
  padding: 20px;
  border-radius: 12px;
  overflow-x: auto;
  margin-bottom: 20px;
  border: 2px solid var(--border-color);
}

.article-content code {
  font-family: "Courier New", monospace;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.article-content blockquote {
  border-left: 4px solid var(--accent-color);
  padding-left: 20px;
  margin: 30px 0;
  font-style: italic;
  color: var(--text-tertiary);
}

.article-share {
  background: var(--bg-card);
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 8px 30px var(--card-shadow);
  margin-bottom: 50px;
  text-align: center;
}

.article-share h3 {
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.share-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.share-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  color: white;
}

.share-btn.twitter { background: #1da1f2; }
.share-btn.whatsapp { background: #25d366; }
.share-btn.copy { background: #666; }

.share-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.related-articles {
  margin-top: 60px;
}

.related-articles h2 {
  font-size: 2rem;
  color: var(--text-primary);
  margin-bottom: 30px;
  text-align: center;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

.related-card {
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 20px var(--card-shadow);
  transition: all 0.3s ease;
  text-decoration: none;
  display: block;
}

.related-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px var(--card-shadow-hover);
}

.related-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.related-content {
  padding: 20px;
}

.related-content h3 {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.related-content p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
  line-height: 1.5;
}

.read-more-small {
  color: var(--accent-color);
  font-weight: 600;
  font-size: 0.9rem;
}

/* ========================================== */
/* FOOTER */
/* ========================================== */
.footer {
  background: var(--bg-secondary);
  padding: 60px 20px 30px;
  border-top: 1px solid var(--border-color);
  position: relative;
  z-index: 1;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 30px;
}

.footer-section h3 {
  color: var(--text-primary);
  font-size: 1.3rem;
  margin-bottom: 15px;
}

.footer-section p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section ul li {
  margin-bottom: 10px;
}

.footer-section ul li a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-section ul li a:hover {
  color: var(--accent-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
}

.footer p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.footer p strong {
  color: var(--accent-color);
}

/* ========================================== */
/* ANIMATIONS */
/* ========================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes popIn {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  60% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  33% {
    transform: translate(50px, -50px) rotate(5deg) scale(1.1);
  }
  66% {
    transform: translate(-30px, 30px) rotate(-3deg) scale(0.9);
  }
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes backdropFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalSlideUp {
  0% {
    transform: scale(0.8) translateY(50px);
    opacity: 0;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

@keyframes modalSlideDown {
  from {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
  to {
    transform: scale(0.8) translateY(50px);
    opacity: 0;
  }
}

@keyframes spinLoader {
  to { transform: rotate(360deg); }
}

/* ========================================== */
/* RESPONSIVE DESIGN */
/* ========================================== */

/* Tablet - 768px */
@media (max-width: 768px) {
  /* Navbar */
  .menu-toggle {
    display: flex;
  }

  .navbar {
    padding: 15px 20px;
  }

  .navbar ul {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navbar-bg);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    box-shadow: 0 4px 8px var(--navbar-shadow);
  }

  .navbar ul.active {
    max-height: 400px;
  }

  .navbar ul li {
    width: 100%;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
  }

  .navbar ul li a {
    display: block;
    padding: 15px;
  }

  .btn-github {
    margin-left: auto;
  }

  /* Hero */
  .hero-container {
    flex-direction: column;
    text-align: center;
  }

  .hero-text h1 {
    font-size: 2.2rem;
  }

  .hero-image img {
    width: 280px;
    height: 280px;
  }

  /* About */
  .about-container {
    flex-direction: column;
    text-align: center;
    gap: 40px;
  }

  .about-image img {
    width: 250px;
    height: 250px;
  }

  .about-text h2::after {
    left: 50%;
    transform: translateX(-50%);
  }

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

  /* Portfolio & Certificates */
  .portfolio-grid,
  .certificates-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  /* Contact */
  .contact-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .contact-form {
    padding: 30px 20px;
  }

  /* Blog */
  .blog-grid {
    grid-template-columns: 1fr;
  }

  /* Article Detail */
  .article-header h1 {
    font-size: 1.8rem;
  }

  .article-content {
    padding: 30px 25px;
  }

  .article-content h2 {
    font-size: 1.6rem;
  }

  .share-buttons {
    flex-direction: column;
  }

  .share-btn {
    width: 100%;
    justify-content: center;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  /* Buttons */
  .hero-buttons,
  .about-cta {
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary,
  .btn-outline {
    width: 100%;
    text-align: center;
  }

  /* Certificate Modal */
  .modal-content-wrapper {
    width: 95%;
    max-height: 95vh;
  }

  .modal-header {
    padding: 20px;
  }

  .modal-header h2 {
    font-size: 1.4rem;
  }

  .modal-body {
    padding: 20px;
    gap: 20px;
  }

  .thumbnail-container {
    flex-direction: column;
  }

  .thumbnail-btn {
    flex-direction: row;
    min-width: auto;
    width: 100%;
  }

  .thumbnail-btn img {
    width: 80px;
    height: 60px;
  }

  .detail-item {
    grid-template-columns: 1fr !important;
    gap: 8px;
    padding: 12px 15px;
  }

  .detail-label {
    font-size: 0.8rem;
  }

  .grade-badge {
    align-self: flex-start;
  }

  .main-image-container.loading {
    min-height: 300px;
  }

  .main-image-container.loading::after {
    width: 40px;
    height: 40px;
    border-width: 4px;
  }

  /* Page Header */
  .page-header-content h1 {
    font-size: 2.2rem;
  }

  /* Splash Screen */
  #splash-screen h1 {
    font-size: 2.5rem;
  }

  #splash-screen p {
    font-size: 0.9rem;
  }
}

/* Mobile - 480px */
@media (max-width: 480px) {
  /* Hero */
  .hero-text h1 {
    font-size: 1.8rem;
  }

  .hero-text p {
    font-size: 1rem;
  }

  /* Headings */
  .about-text h2,
  .skills h2,
  .portfolio-section h2,
  .certificates h2,
  .contact-info h2 {
    font-size: 2rem;
  }

  /* Social Links */
  .social-links {
    justify-content: center;
  }

  /* Portfolio & Certificates */
  .portfolio-grid,
  .certificates-grid {
    grid-template-columns: 1fr;
  }

  /* Blog */
  .blog-filters {
    flex-direction: column;
  }

  .filter-btn {
    width: 100%;
  }

  .article-content {
    padding: 20px 15px;
  }

  /* Certificate Modal */
  .modal-header h2 {
    font-size: 1.2rem;
  }

  .modal-close {
    font-size: 1.5rem;
    width: 35px;
    height: 35px;
  }

  .modal-body {
    padding: 15px;
  }

  .thumbnail-btn img {
    width: 60px;
    height: 50px;
  }

  .detail-item {
    padding: 10px 12px;
  }

  .main-image-container.loading {
    min-height: 250px;
  }

  .main-image-container.loading::after {
    width: 35px;
    height: 35px;
    border-width: 3px;
  }

  /* Certificates */
  .certificates > p {
    font-size: 1rem;
  }

  /* Splash Screen */
  #splash-screen h1 {
    font-size: 2rem;
  }

  #splash-screen p {
    font-size: 0.85rem;
  }
}