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

:root {
  --primary: #0066cc;
  --secondary: #0052a3;
  --accent: #0091ff;
  --bg: #ffffff;
  --text: #1a1a1a;
  --text-light: #666666;
  --white: #ffffff;
  --border: #e0e0e0;
  --blue-light: #f0f5ff;
  --blue-hover: #0052a3;
  --card-bg: linear-gradient(135deg, #fafbfc 0%, #f5f7fa 100%);
  --card-hover-bg: linear-gradient(135deg, #e6f2ff 0%, #cce5ff 100%);
  --shadow: rgba(0, 102, 204, 0.15);
  --shadow-hover: rgba(0, 102, 204, 0.2);
}

/* Dark Mode Variables */
html.dark-mode {
  --primary: #3d9eff;
  --secondary: #2b7fd9;
  --accent: #5db0ff;
  --bg: #0f0f0f;
  --text: #e5e5e5;
  --text-light: #b0b0b0;
  --white: #e5e5e5;
  --border: #2a2a2a;
  --blue-light: #1a2332;
  --blue-hover: #2b7fd9;
  --card-bg: linear-gradient(135deg, #1a1a1a 0%, #242424 100%);
  --card-hover-bg: linear-gradient(135deg, #242424 0%, #2a2a2a 100%);
  --shadow: rgba(0, 0, 0, 0.3);
  --shadow-hover: rgba(0, 0, 0, 0.5);
}

html.dark-mode body {
  background-color: #0f0f0f;
}

html.dark-mode navbar {
  background: linear-gradient(135deg, #1a1a1a 0%, #242424 100%);
  border-bottom-color: #2a2a2a;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-user-select: none;
  user-select: none;
}

/* LOADING SCREEN */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeOut 0.8s ease-out 2.5s forwards;
  overflow: hidden;
}

.loading-screen::before {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  background: 
    radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  animation: backgroundShift 8s ease-in-out infinite;
}

@keyframes backgroundShift {
  0%, 100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(50px, 50px);
  }
}

.loading-container {
  text-align: center;
  color: white;
  position: relative;
  z-index: 10;
}

.game-area {
  position: relative;
  width: 400px;
  height: 250px;
  background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, rgba(0,0,0,0.1) 100%);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  margin-bottom: 40px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.game-area::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
}

.game-character {
  position: absolute;
  font-size: 50px;
  left: 50px;
  bottom: 50px;
  animation: characterWalk 2s ease-in-out infinite;
  filter: drop-shadow(0 0 10px rgba(255,255,255,0.5));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-character i {
  font-size: 50px;
  width: 1em;
  height: 1em;
  line-height: 1;
}

@keyframes characterWalk {
  0%, 100% {
    left: 50px;
    transform: scaleX(1);
  }
  50% {
    left: 250px;
    transform: scaleX(1);
  }
}

.obstacle {
  position: absolute;
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
  border-radius: 10px;
  bottom: 50px;
  width: 30px;
  height: 60px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.obstacle-1 {
  right: 350px;
  animation: obstacleMove 4s linear infinite;
}

.obstacle-2 {
  right: 200px;
  animation: obstacleMove 4s linear infinite 1.3s;
}

.obstacle-3 {
  right: 50px;
  animation: obstacleMove 4s linear infinite 2.6s;
}

@keyframes obstacleMove {
  0% {
    right: 400px;
    opacity: 1;
  }
  100% {
    right: -50px;
    opacity: 0.3;
  }
}

.star {
  position: absolute;
  font-size: 24px;
  animation: starFloat 3s ease-in-out infinite;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.star i {
  font-size: 24px;
  width: 1em;
  height: 1em;
  line-height: 1;
}

.star-1 {
  left: 80px;
  top: 30px;
  animation-delay: 0s;
}

.star-2 {
  right: 100px;
  top: 60px;
  animation-delay: 0.5s;
}

.star-3 {
  left: 250px;
  top: 20px;
  animation-delay: 1s;
}

@keyframes starFloat {
  0%, 100% {
    transform: translateY(0) scale(1);
    opacity: 0.5;
  }
  50% {
    transform: translateY(-20px) scale(1.2);
    opacity: 1;
  }
}

.particles {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: white;
  border-radius: 50%;
  animation: particleFloat 2s ease-out forwards;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

@keyframes particleFloat {
  0% {
    transform: translateY(0) translateX(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) translateX(var(--tx)) scale(0);
    opacity: 0;
  }
}

.loading-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.loading-text {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 1px;
  animation: textGlow 1.5s ease-in-out infinite;
}

@keyframes textGlow {
  0%, 100% {
    color: white;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  }
  50% {
    color: #e0f4ff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
  }
}

.loading-bar {
  width: 300px;
  height: 8px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.loading-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #4facfe 0%, #00f2fe 50%, #43e97b 100%);
  border-radius: 10px;
  animation: barProgress 2.5s ease-in-out forwards;
  box-shadow: 0 0 10px rgba(79, 172, 254, 0.8);
}

@keyframes barProgress {
  0% {
    width: 0%;
  }
  100% {
    width: 100%;
  }
}

.loading-percentage {
  font-size: 24px;
  font-weight: 700;
  color: white;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

@keyframes fadeOut {
  0% {
    opacity: 1;
    pointer-events: auto;
  }
  100% {
    opacity: 0;
    pointer-events: none;
  }
}

/* NAVBAR */
navbar {
  display: block;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  box-shadow: 0 4px 15px rgba(0, 102, 204, 0.2);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 3px solid var(--accent);
}

nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
  gap: 20px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.btn-dark-mode {
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.2);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 16px;
  position: relative;
  overflow: hidden;
}

.btn-dark-mode:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.1) rotate(15deg);
}

.btn-dark-mode.toggle-animate {
  animation: toggleSpin 0.3s ease;
}

@keyframes toggleSpin {
  0% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(180deg) scale(1.2);
  }
  100% {
    transform: rotate(360deg) scale(1);
  }
}

html.dark-mode .btn-dark-mode {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

html.dark-mode .btn-dark-mode:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.btn-dark-mode {
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.2);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 16px;
  position: relative;
  overflow: hidden;
}

.btn-dark-mode:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.1) rotate(15deg);
}

.btn-dark-mode.toggle-animate {
  animation: toggleSpin 0.3s ease;
}

@keyframes toggleSpin {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.2); }
  100% { transform: rotate(360deg) scale(1); }
}

html.dark-mode .btn-dark-mode {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

html.dark-mode .btn-dark-mode:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-logout {
  background: #dc3545;
  color: var(--white);
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.2);
}

.btn-logout:hover {
  background: #c82333;
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.nav-brand {
  font-size: 26px;
  font-weight: bold;
  color: var(--white);
  text-decoration: none;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  letter-spacing: 1px;
  display: flex;
  align-items: center;
}

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

.nav-menu a {
  text-decoration: none;
  color: var(--white);
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  padding: 8px 12px;
  border-radius: 6px;
  display: flex;
  align-items: center;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--white);
  background-color: rgba(255, 255, 255, 0.15);
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
  transform: scaleX(1);
}

/* CONTAINER */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* SECTION */
section {
  padding: 60px 0;
}

section h2 {
  font-size: 32px;
  margin-bottom: 40px;
  color: var(--primary);
  position: relative;
  display: inline-block;
}

section h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
}

/* HERO */
.hero {
  background: linear-gradient(135deg, #0066cc 0%, #0091ff 50%, #0052a3 100%);
  background-size: 200% 200%;
  color: var(--white);
  padding: 80px 0;
  text-align: center;
  -webkit-user-select: none;
  user-select: none;
  position: relative;
  overflow: hidden;
  animation: heroGradient 10s ease infinite;
}

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

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: heroPattern 20s linear infinite;
  opacity: 0.3;
}

@keyframes heroPattern {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(50px, 50px);
  }
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 80% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  animation: heroLight 8s ease-in-out infinite;
}

@keyframes heroLight {
  0%, 100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.6;
  }
}

.hero-content {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 30px;
  border: 4px solid var(--white);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  padding: 5px;
  animation: avatarFloat 3s ease-in-out infinite, avatarFadeIn 1s ease-out;
  position: relative;
}

@keyframes avatarFloat {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
}

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

.hero-avatar::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  z-index: -1;
  animation: avatarGlow 2s ease-in-out infinite;
  opacity: 0;
}

@keyframes avatarGlow {
  0%, 100% {
    opacity: 0;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.1);
  }
}

.hero h1 {
  font-size: 48px;
  margin-bottom: 10px;
  color: var(--white);
  animation: titleSlideIn 0.8s ease-out 0.3s backwards, titleGlowPulse 4s ease-in-out infinite;
}

@keyframes titleSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes titleGlowPulse {
  0%, 100% {
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3), 0 0 40px rgba(255, 255, 255, 0.1);
  }
  50% {
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.5), 0 0 60px rgba(255, 255, 255, 0.2);
  }
}

.hero .job-title {
  font-size: 20px;
  opacity: 0.9;
  margin-bottom: 30px;
  animation: fadeInUp 1s ease-out 0.5s backwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 0.9;
    transform: translateY(0);
  }
}

.hero .bio {
  font-size: 16px;
  line-height: 1.8;
  opacity: 0.95;
  animation: fadeInUp 1s ease-out 0.7s backwards;
}

/* Hero Avatar Hover Effects */
.hero-avatar:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
  animation: avatarFloat 3s ease-in-out infinite, avatarRotateHover 0.6s ease-in-out;
}

@keyframes avatarRotateHover {
  0% {
    transform: scale(1.1) rotate(0deg);
  }
  25% {
    transform: scale(1.1) rotate(-5deg);
  }
  50% {
    transform: scale(1.1) rotate(5deg);
  }
  75% {
    transform: scale(1.1) rotate(-3deg);
  }
  100% {
    transform: scale(1.1) rotate(5deg);
  }
}

.hero-avatar:hover::before {
  animation: avatarGlowActive 1s ease-in-out infinite;
}

@keyframes avatarGlowActive {
  0%, 100% {
    opacity: 0.7;
    transform: scale(1.2);
  }
  50% {
    opacity: 0.3;
    transform: scale(1.4);
  }
}

/* SECTION HEADER */
.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-subtitle {
  font-size: 18px;
  color: var(--text-light);
  margin-top: 10px;
}

/* CONTENT GRID */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  -webkit-user-select: none;
  user-select: none;
}

/* MODERN CARD DESIGN */
.modern-card {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 16px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

html.dark-mode .modern-card {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.modern-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--secondary));
  opacity: 0;
  transition: opacity 0.4s ease;
}

.modern-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 102, 204, 0.25);
  background: linear-gradient(135deg, #e6f2ff 0%, #cce5ff 100%);
  border-color: rgba(0, 102, 204, 0.3);
}

.modern-card:hover::before {
  opacity: 1;
}

.card-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 24px;
  margin-bottom: 20px;
  box-shadow: 0 4px 15px rgba(0, 102, 204, 0.2);
}

.modern-card h3 {
  font-size: 22px;
  margin-bottom: 15px;
  color: var(--primary);
  font-weight: 700;
}

.modern-list {
  list-style: none;
  padding: 0;
}

.modern-list li {
  padding: 12px 0;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 15px;
  line-height: 1.5;
}

.modern-list li:last-child {
  border-bottom: none;
}

.list-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 45px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--white);
  border-radius: 8px;
  font-weight: 600;
  font-size: 12px;
  flex-shrink: 0;
}

/* CARD SPECIFIC COLORS */
.card-about {
  border-top-color: #0066cc;
}

.card-about .card-icon {
  background: linear-gradient(135deg, #0066cc, #0052a3);
}

.card-education {
  border-top-color: #ff6b6b;
}

.card-education .card-icon {
  background: linear-gradient(135deg, #ff6b6b, #ff5252);
}

.card-education .list-badge {
  background: linear-gradient(135deg, #ff6b6b, #ff5252);
}

.card-skills {
  border-top-color: #4ecdc4;
}

.card-skills .card-icon {
  background: linear-gradient(135deg, #4ecdc4, #44b3aa);
}

.card-experience {
  border-top-color: #ffd93d;
}

.card-experience .card-icon {
  background: linear-gradient(135deg, #ffd93d, #ffcc1d);
  color: #333;
}

.card-experience .list-badge {
  background: linear-gradient(135deg, #ffd93d, #ffcc1d);
  color: #333;
}

.card-achievement {
  border-top-color: #6bcf7f;
}

.card-achievement .card-icon {
  background: linear-gradient(135deg, #6bcf7f, #5ab96e);
}

/* CARD HOVER SPECIFIC COLORS */
.card-about:hover {
  background: linear-gradient(135deg, #e6f2ff 0%, #cce5ff 100%);
  box-shadow: 0 20px 40px rgba(0, 102, 204, 0.3);
  border-color: rgba(0, 102, 204, 0.4);
}

.card-about:hover::before {
  background: linear-gradient(90deg, #0066cc, #00d4ff, #0066cc);
}

.card-education:hover {
  background: linear-gradient(135deg, #ffe6e6 0%, #ffd6d6 100%);
  box-shadow: 0 20px 40px rgba(255, 107, 107, 0.3);
  border-color: rgba(255, 107, 107, 0.4);
}

.card-education:hover::before {
  background: linear-gradient(90deg, #ff6b6b, #ff8787, #ff6b6b);
}

.card-skills:hover {
  background: linear-gradient(135deg, #e6f9f8 0%, #ccf2f0 100%);
  box-shadow: 0 20px 40px rgba(78, 205, 196, 0.3);
  border-color: rgba(78, 205, 196, 0.4);
}

.card-skills:hover::before {
  background: linear-gradient(90deg, #4ecdc4, #6fddd6, #4ecdc4);
}

.card-experience:hover {
  background: linear-gradient(135deg, #fff9e6 0%, #fff3cc 100%);
  box-shadow: 0 20px 40px rgba(255, 217, 61, 0.3);
  border-color: rgba(255, 217, 61, 0.4);
}

.card-experience:hover::before {
  background: linear-gradient(90deg, #ffd93d, #ffe066, #ffd93d);
}

.card-achievement:hover {
  background: linear-gradient(135deg, #e6f9ea 0%, #ccf2d6 100%);
  box-shadow: 0 20px 40px rgba(107, 207, 127, 0.3);
  border-color: rgba(107, 207, 127, 0.4);
}

.card-achievement:hover::before {
  background: linear-gradient(90deg, #6bcf7f, #85d995, #6bcf7f);
}

/* CV Section Styles */
#cv-section {
  padding: 60px 0;
  background: linear-gradient(135deg, #0066cc 0%, #00d4ff 100%);
  background-size: 200% 200%;
  position: relative;
  overflow: hidden;
  animation: gradientShift 8s ease infinite;
}

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

#cv-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.1;
  animation: patternMove 20s linear infinite;
}

@keyframes patternMove {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(60px, 60px);
  }
}

.cv-banner {
  position: relative;
  z-index: 1;
}

.cv-banner-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 40px 50px;
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 0.8s ease-out;
  transition: all 0.3s ease;
}

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

.cv-banner-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.4);
}

.cv-icon {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  animation: floating 3s ease-in-out infinite;
  position: relative;
}

@keyframes floating {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.cv-icon::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.cv-icon i {
  font-size: 36px;
  color: white;
  animation: iconRotate 4s ease-in-out infinite;
}

@keyframes iconRotate {
  0%, 100% {
    transform: rotate(0deg) scale(1);
  }
  25% {
    transform: rotate(-5deg) scale(1.05);
  }
  75% {
    transform: rotate(5deg) scale(1.05);
  }
}

.cv-text {
  flex: 1;
  color: white;
  animation: textFadeIn 1s ease-out 0.3s backwards;
}

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

.cv-text h2 {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 10px 0;
  color: white;
  animation: titleGlow 3s ease-in-out infinite;
}

@keyframes titleGlow {
  0%, 100% {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  }
  50% {
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.6), 0 0 30px rgba(255, 255, 255, 0.4);
  }
}

.cv-text p {
  font-size: 16px;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  animation: textFadeIn 1s ease-out 0.5s backwards;
}

.btn-cv-banner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 35px;
  background: white;
  color: #0066cc;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
  white-space: nowrap;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
  animation: buttonBounce 2s ease-in-out infinite;
}

@keyframes buttonBounce {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.03);
  }
}

.btn-cv-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 102, 204, 0.2), transparent);
  transition: left 0.5s ease;
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  50%, 100% {
    left: 100%;
  }
}

.btn-cv-banner:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
  color: #0052a3;
  animation: none;
}

.btn-cv-banner:hover::before {
  animation: shimmerFast 0.6s;
}

@keyframes shimmerFast {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

.btn-cv-banner i {
  transition: transform 0.3s ease;
  position: relative;
  z-index: 1;
}

.btn-cv-banner:hover i {
  transform: translateX(5px);
  animation: arrowBounce 0.6s ease-in-out infinite;
}

@keyframes arrowBounce {
  0%, 100% {
    transform: translateX(5px);
  }
  50% {
    transform: translateX(10px);
  }
}

/* Responsive CV Section */
@media (max-width: 992px) {
  .cv-banner-content {
    flex-direction: column;
    text-align: center;
    padding: 30px 25px;
  }
  
  .cv-text h2 {
    font-size: 24px;
  }
  
  .cv-text p {
    font-size: 14px;
  }
}

@media (max-width: 576px) {
  .cv-icon {
    width: 60px;
    height: 60px;
  }
  
  .cv-icon i {
    font-size: 28px;
  }
  
  .cv-text h2 {
    font-size: 20px;
  }
  
  .btn-cv-banner {
    padding: 12px 25px;
    font-size: 14px;
  }
}

.card-photo {
  background: transparent;
  padding: 0;
  border: none;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-photo:hover {
  box-shadow: 0 20px 50px rgba(0, 102, 204, 0.3);
  border-color: rgba(0, 102, 204, 0.3);
  background: transparent;
}

.profile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 16px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-photo:hover .profile-photo {
  transform: scale(1.05);
}

.skill-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 12px;
}

.skill-tag {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--white);
  padding: 10px 16px;
  border-radius: 10px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.2);
  cursor: default;
}

.skill-tag:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 102, 204, 0.3);
}

/* ABOUT */
.about-text {
  font-size: 16px;
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 20px;
}

/* ADMIN PANEL */
.admin-container {
  background: var(--white);
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  max-width: 1100px;
}

.admin-container h2 {
  margin-bottom: 30px;
  color: var(--primary);
}

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

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

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
}

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

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.button {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--white);
  border: none;
  padding: 12px 30px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.button:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
  border-color: rgba(99, 102, 241, 0.5);
}

.button:hover::before {
  left: 100%;
}

.button:active {
  transform: translateY(-1px) scale(0.98);
}

.button i {
  margin-right: 6px;
  transition: transform 0.3s ease;
}

.button:hover i {
  transform: scale(1.1);
}

.button-group {
  display: flex;
  gap: 15px;
}

.button-secondary {
  background: linear-gradient(135deg, #6b7280, #4b5563);
  color: #ffffff;
  border: 1px solid rgba(107, 114, 128, 0.3);
  padding: 12px 30px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.button-secondary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.button-secondary:hover {
  background: linear-gradient(135deg, #4b5563, #374151);
  box-shadow: 0 8px 20px rgba(75, 85, 99, 0.4);
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(107, 114, 128, 0.5);
}

.button-secondary:hover::before {
  left: 100%;
}

.button-secondary:active {
  transform: translateY(-1px) scale(0.98);
}

.button-secondary i {
  margin-right: 6px;
  transition: transform 0.3s ease;
}

.button-secondary:hover i {
  transform: rotate(-10deg) scale(1.1);
}

.button-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 12px 30px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.button-danger::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.button-danger:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.5);
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(239, 68, 68, 0.6);
  animation: dangerPulse 1s ease-in-out infinite;
}

.button-danger:hover::before {
  left: 100%;
}

.button-danger:active {
  transform: translateY(-1px) scale(0.98);
  animation: none;
}

.button-danger i {
  margin-right: 6px;
  transition: transform 0.3s ease;
}

.button-danger:hover i {
  transform: scale(1.15) rotate(-5deg);
  animation: shake 0.5s ease;
}

@keyframes dangerPulse {
  0%, 100% {
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.5);
  }
  50% {
    box-shadow: 0 8px 30px rgba(239, 68, 68, 0.7);
  }
}

@keyframes shake {
  0%, 100% { transform: scale(1.15) rotate(-5deg); }
  25% { transform: scale(1.15) rotate(-8deg); }
  75% { transform: scale(1.15) rotate(-2deg); }
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--white);
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}

/* ADMIN TABS */
.admin-tabs {
  display: flex;
  gap: 10px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 30px;
}

.tab-btn {
  background: none;
  border: none;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
}

.tab-btn:hover {
  color: var(--primary);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* PROJECTS TABLE */
.projects-table-container {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.projects-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
}

.projects-table thead {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--white);
}

.projects-table thead th {
  padding: 15px;
  text-align: left;
  font-weight: 500;
  font-size: 14px;
}

.projects-table tbody td {
  padding: 12px 15px;
  border-bottom: 1px solid var(--border);
}

.projects-table tbody tr:hover {
  background: var(--blue-light);
}

.project-actions {
  display: flex;
  gap: 8px;
}

.btn-edit, .btn-delete {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-edit {
  background: #3b82f6;
  color: var(--white);
}

.btn-edit:hover {
  background: #2563eb;
}

.btn-delete {
  background: #ef4444;
  color: var(--white);
}

.btn-delete:hover {
  background: #dc2626;
}

.projects-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.projects-header h3 {
  color: var(--primary);
  margin: 0;
}

/* PROJECT MODAL */
.project-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.project-modal-overlay.show {
  display: block;
}

.project-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  z-index: 1001;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
}

.project-modal.show {
  display: block;
}

.project-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  border-bottom: 1px solid var(--border);
}

.project-modal-header h3 {
  color: var(--primary);
  margin: 0;
}

.btn-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-light);
  cursor: pointer;
  transition: color 0.2s ease;
}

.btn-close:hover {
  color: var(--primary);
}

.project-form {
  padding: 30px;
}

/* SUCCESS MESSAGE */
.success-message {
  background: #d1fae5;
  color: #065f46;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: none;
}

.success-message.show {
  display: block;
}

/* FOOTER */
footer {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: var(--white);
  text-align: center;
  padding: 12px 0;
  margin-top: 60px;
  box-shadow: 0 -4px 15px rgba(0, 102, 204, 0.2);
  border-top: 3px solid var(--accent);
  font-size: 14px;
}

/* PASSWORD MODAL */
.blur-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  z-index: 1999;
}

.password-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease;
}

.password-modal.show {
  display: flex;
}

.password-modal-content {
  background: var(--white);
  padding: 40px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  max-width: 400px;
  animation: slideUp 0.4s ease;
}

.password-modal-content h2 {
  margin-bottom: 20px;
  color: var(--primary);
}

.password-modal-content p {
  margin-bottom: 20px;
  color: var(--text-light);
}

.password-input-group {
  margin-bottom: 20px;
}

.password-modal-content input {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--border);
  border-radius: 6px;
  font-size: 16px;
  font-family: 'Courier New', monospace;
  letter-spacing: 2px;
}

.password-modal-content input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.password-button-group {
  display: flex;
  gap: 10px;
}

.password-button-group button {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.password-button-group .btn-submit {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--white);
}

.password-button-group .btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}

.password-button-group .btn-cancel {
  background: var(--border);
  color: var(--text);
}

.password-button-group .btn-cancel:hover {
  background: #cbd5e1;
}

.password-error {
  color: #dc2626;
  font-size: 14px;
  margin-top: 10px;
  display: none;
}

.password-error.show {
  display: block;
  animation: shake 0.4s ease;
}

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

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideDown {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

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

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

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 20%, 30%, 40%, 50%, 60%, 70%, 80%, 90% { transform: translateX(-5px); }
  15%, 25%, 35%, 45%, 55%, 65%, 75%, 85%, 95% { transform: translateX(5px); }
}

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

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 10px rgba(99, 102, 241, 0.3); }
  50% { box-shadow: 0 0 20px rgba(99, 102, 241, 0.6); }
}

@keyframes fadeInDelay {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scrollReveal {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Apply animations to elements */
.hero-avatar {
  animation: slideUp 0.6s ease;
}

.hero h1 {
  animation: slideDown 0.6s ease 0.1s both;
}

.hero .job-title {
  animation: slideDown 0.6s ease 0.2s both;
}

.hero .bio {
  animation: slideDown 0.6s ease 0.3s both;
}

section h2 {
  animation: slideLeft 0.6s ease;
}

.section-card {
  animation: slideUp 0.6s ease;
  animation-fill-mode: both;
}

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

/* SCROLL ANIMATION */
.section-card.scroll-hidden {
  opacity: 0;
  transform: translateY(30px);
}

.section-card.scroll-visible {
  animation: scrollReveal 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.section-card.scroll-visible:nth-child(1) { animation-delay: 0s; }
.section-card.scroll-visible:nth-child(2) { animation-delay: 0.1s; }
.section-card.scroll-visible:nth-child(3) { animation-delay: 0.2s; }
.section-card.scroll-visible:nth-child(4) { animation-delay: 0.3s; }
.section-card.scroll-visible:nth-child(5) { animation-delay: 0.4s; }

.skill-tag {
  animation: slideUp 0.4s ease;
  animation-fill-mode: both;
  transition: all 0.3s ease;
}

.skill-tag:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.nav-menu a {
  position: relative;
  overflow: hidden;
}

.nav-menu a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--primary);
  transition: left 0.3s ease;
  z-index: -1;
  opacity: 0.1;
}

.nav-menu a:hover::before {
  left: 0;
}

.button {
  position: relative;
  overflow: hidden;
}

.button::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;
}

.button:active::before {
  width: 300px;
  height: 300px;
}

.success-message {
  animation: slideDown 0.4s ease;
}

.form-group input,
.form-group textarea {
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  animation: glow 0.6s ease infinite;
}

/* PROJECTS SECTION */
#projects-section {
  background: linear-gradient(135deg, rgba(0, 102, 204, 0.05) 0%, rgba(145, 158, 233, 0.05) 100%);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  -webkit-user-select: none;
  user-select: none;
}

.project-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0, 102, 204, 0.1);
  height: 100%;
}

.project-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 20px 40px rgba(0, 102, 204, 0.2);
  border-color: rgba(0, 102, 204, 0.3);
}

.project-image {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.project-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
  pointer-events: none;
}

.project-card:hover .project-image::after {
  left: 100%;
}

.project-content {
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  flex-grow: 1;
}

.project-content h3 {
  font-size: 20px;
  color: var(--primary);
  margin: 0;
  font-weight: 700;
}

.project-content p {
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
  flex-grow: 1;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-tag {
  background: linear-gradient(135deg, #f0f5ff, #e8f0ff);
  color: var(--primary);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(0, 102, 204, 0.2);
  transition: all 0.3s ease;
}

.tech-tag:hover {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--white);
  border-color: var(--primary);
}

.project-buttons {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.btn-demo,
.btn-github {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid;
  cursor: pointer;
  text-align: center;
}

.btn-demo {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--white);
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.2);
}

.btn-demo:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 102, 204, 0.4);
}

.btn-github {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
  transition: all 0.3s ease;
}

.btn-github:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 102, 204, 0.3);
}

/* CONTACT SECTION */
#contact-section {
  background: linear-gradient(135deg, rgba(0, 102, 204, 0.08) 0%, rgba(145, 158, 233, 0.08) 100%);
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.contact-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  transition: all 0.3s ease;
}

.contact-item:hover {
  transform: translateX(5px);
}

.contact-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 24px;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(0, 102, 204, 0.2);
  transition: all 0.3s ease;
}

.contact-icon i {
  width: 1.2em;
  line-height: 1;
  text-align: center;
}

.contact-item:hover .contact-icon {
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(0, 102, 204, 0.3);
}

.contact-detail h3 {
  font-size: 18px;
  color: var(--primary);
  margin: 0 0 8px 0;
  font-weight: 700;
}

.contact-detail p {
  color: var(--text-light);
  margin: 0;
  font-size: 15px;
}

.contact-detail a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
}

.contact-detail a:hover {
  color: var(--secondary);
  text-decoration: underline;
}

.social-media {
  margin-top: 20px;
  padding-top: 25px;
  border-top: 2px solid rgba(0, 102, 204, 0.1);
}

.social-media h3 {
  font-size: 18px;
  color: var(--primary);
  margin: 0 0 15px 0;
  font-weight: 700;
}

.social-links {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.social-btn {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--white);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.2);
}

.social-btn:hover {
  transform: translateY(-5px) rotate(-5deg);
  box-shadow: 0 10px 25px rgba(0, 102, 204, 0.3);
}

.card-contact-photo {
  background: transparent;
  padding: 0;
  border: none;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-contact-photo:hover {
  box-shadow: 0 20px 50px rgba(0, 102, 204, 0.3);
  border-color: rgba(0, 102, 204, 0.3);
  background: transparent;
}

.contact-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 16px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-contact-photo:hover .contact-photo-img {
  transform: scale(1.05);
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav-menu {
    gap: 15px;
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero-avatar {
    width: 120px;
    height: 120px;
  }

  section h2 {
    font-size: 24px;
  }

  .section-card {
    padding: 25px;
  }

  .skill-list {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

  .password-modal-content {
    margin: 20px;
  }

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

  .project-buttons {
    gap: 10px;
  }

  .btn-demo,
  .btn-github {
    padding: 10px 12px;
    font-size: 13px;
  }

  .project-content {
    padding: 20px;
  }

  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .social-links {
    gap: 10px;
  }

  .social-btn {
    width: 45px;
    height: 45px;
    font-size: 18px;
  }
}

h1,
h2 {
  font-family: "Orbitron", sans-serif;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

h1 {
  font-size: clamp(20px, 3vw, 28px);
  color: var(--accent);
}

.job {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 12px;
}

.info p {
  font-size: 13px;
  margin: 6px 0;
  color: var(--muted);
}

.main {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 20px;
}

.section h2 {
  font-size: 16px;
  color: var(--accent);
  margin-bottom: 10px;
}

.editable {
  padding: 10px;
  border-radius: 10px;
  background: rgba(0, 229, 255, 0.05);
  border: 1px dashed rgba(0, 229, 255, 0.3);
  transition: 0.3s;
}

.editable:focus {
  outline: none;
  box-shadow: var(--glow);
  background: rgba(0, 229, 255, 0.1);
}

ul {
  padding-left: 18px;
}

ul li {
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--text);
}

.toolbar {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.toolbar button {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: 0.3s;
  font-size: 12px;
}

.toolbar button:hover {
  background: var(--accent);
  color: #000;
  box-shadow: var(--glow);
}

/* KONTAK SECTION STYLES */
#profilSection {
  display: none;
}

#profilSection.active {
  display: block;
}

#proyekSection {
  display: none;
}

#proyekSection.active {
  display: block;
}

#kontakSection {
  display: none;
}

#kontakSection.active {
  display: block;
}

.kontak-section {
  display: none;
}

.kontak-section.active {
  display: block;
}

.kontak-section-header {
  margin-bottom: 30px;
}

.kontak-section-header h3 {
  font-size: 20px;
  color: var(--primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.social-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 2px solid rgba(0, 102, 204, 0.1);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  color: var(--text);
  -webkit-user-select: none;
  user-select: none;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.checkbox-label::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 102, 204, 0.1), transparent);
  transition: left 0.5s ease;
}

.checkbox-label:hover {
  background: linear-gradient(135deg, #f0f7ff 0%, #e6f2ff 100%);
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 102, 204, 0.15);
}

.checkbox-label:hover::before {
  left: 100%;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
}

.checkbox-label input[type="checkbox"]:checked + i,
.checkbox-label input[type="checkbox"]:checked ~ i {
  color: var(--primary);
}

.checkbox-label i {
  font-size: 20px;
  color: #6b7280;
  transition: all 0.3s ease;
}

.checkbox-label:hover i {
  transform: scale(1.15) rotate(5deg);
  color: var(--primary);
}

.checkbox-label input[type="checkbox"]:checked {
  accent-color: var(--primary);
}

.checkbox-label:has(input[type="checkbox"]:checked) {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--white);
  border-color: var(--primary);
  transform: scale(1.02);
  box-shadow: 0 8px 20px rgba(0, 102, 204, 0.3);
  animation: checkPulse 0.5s ease;
}

@keyframes checkPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1.02); }
}

.checkbox-label:has(input[type="checkbox"]:checked) i {
  color: var(--white);
  transform: scale(1.2);
  animation: iconBounce 0.5s ease;
}

@keyframes iconBounce {
  0%, 100% { transform: scale(1.2); }
  50% { transform: scale(1.3); }
}

.social-field-group {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  padding: 20px;
  border-radius: 10px;
  border: 2px solid rgba(0, 102, 204, 0.1);
  margin-bottom: 15px;
  transition: all 0.3s ease;
  animation: slideDown 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.social-field-group:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.1);
  transform: translateY(-2px);
}

.social-field-group.hidden {
  display: none;
}

.social-field-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 10px;
  font-size: 15px;
}

.social-field-label i {
  font-size: 20px;
}

.required {
  color: #ef4444;
  font-weight: 700;
}

.kontak-divider {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 2px solid var(--border);
}

.form-preview-container {
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.form-preview-container input {
  flex: 1;
}

.form-preview-container input[type="file"] {
  width: 100%;
  padding: 10px;
  border: 1px dashed rgba(0, 102, 204, 0.35);
  border-radius: 10px;
  background: linear-gradient(180deg, #f9fbff 0%, #eef4ff 100%);
  color: var(--text-light);
  cursor: pointer;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.form-preview-container input[type="file"]::file-selector-button {
  margin-right: 12px;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: var(--white);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.form-preview-container input[type="file"]:hover {
  border-color: rgba(0, 102, 204, 0.55);
  box-shadow: 0 8px 20px rgba(0, 102, 204, 0.12);
  transform: translateY(-1px);
}

.form-preview-container input[type="file"]:hover::file-selector-button {
  box-shadow: 0 6px 16px rgba(0, 102, 204, 0.25);
}

.form-preview-container input[type="file"]:active {
  transform: translateY(0);
}

.form-preview-img {
  max-width: 100px;
  max-height: 100px;
  border-radius: 8px;
  display: none;
  border: 2px solid var(--primary);
}

.form-preview-img.show {
  display: block;
}

.form-help-text {
  color: #666;
  display: block;
  margin-top: 5px;
  font-size: 0.875rem;
}

.btn-close {
  background: none;
  border: none;
  color: #666;
  font-size: 20px;
  cursor: pointer;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
}

.btn-close:hover {
  color: var(--primary);
  transform: rotate(90deg);
}

/* ADMIN SPECIFIC STYLES */
.admin-tabs {
  margin-bottom: 30px;
}

.admin-logout {
  display: none;
}

.admin-logout.visible {
  display: inline-block;
}

.lock-icon {
  font-size: 48px;
  color: var(--primary);
  margin-bottom: 20px;
}

.photo-section-heading {
  margin-bottom: 20px;
  color: var(--primary);
}

.button-group-gap {
  gap: 10px;
}

.upload-btn-gradient {
  background: linear-gradient(135deg, #4ecdc4, #44b3aa);
}

.proyek-section {
  display: none;
}

.proyek-section.active {
  display: block;
}

.projects-header-custom {
  margin-bottom: 20px;
}

.projects-header-custom button {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

.table-center {
  text-align: center;
}

.project-preview-img {
  max-width: 150px;
  max-height: 150px;
  margin-top: 10px;
  display: none;
  border-radius: 8px;
  object-fit: cover;
}

.project-preview-img.show {
  display: block;
}

.modal-button-group {
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
}

.modal-button-group button {
  min-width: 120px;
  letter-spacing: 0.3px;
}

.delete-btn-hidden {
  display: none;
}

.delete-btn-hidden.visible {
  display: block;
  animation: fadeInScale 0.4s ease-out;
}

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

/* Modal Buttons Responsive */
@media (max-width: 576px) {
  .modal-button-group {
    flex-direction: column;
    gap: 10px;
  }

  .modal-button-group button {
    width: 100%;
    min-width: 100%;
  }

  .button, .button-secondary, .button-danger {
    padding: 14px 20px;
    font-size: 15px;
  }
}

@media (max-width: 900px) {
  .cv-container {
    grid-template-columns: 1fr;
  }
  
  .kontak-grid {
    grid-template-columns: 1fr;
  }

  .social-checkbox-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }
}

/* ========================================
   MINI GAMES SECTION
   ======================================== */

#games-section {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(145, 158, 233, 0.08) 100%);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  -webkit-user-select: none;
  user-select: none;
}

.game-card {
  background: var(--card-bg);
  border-radius: 16px;
  border: 2px solid var(--border);
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 102, 204, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  position: relative;
}

.game-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--secondary));
  opacity: 0;
  transition: opacity 0.4s ease;
}

.game-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 102, 204, 0.25);
  border-color: var(--primary);
}

.game-card:hover::before {
  opacity: 1;
}

.game-header {
  padding: 20px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  text-align: center;
}

.game-header h3 {
  margin: 0 0 8px 0;
  font-size: 20px;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.game-header h3 i {
  font-size: 24px;
}

.game-desc {
  margin: 0;
  font-size: 14px;
  opacity: 0.95;
}

.game-canvas {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.5) 0%, rgba(240, 250, 255, 0.5) 100%);
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  margin: 20px;
  border-radius: 12px;
  border: 2px dashed rgba(0, 102, 204, 0.2);
}

html.dark-mode .game-canvas {
  background: linear-gradient(135deg, rgba(40, 40, 40, 0.8) 0%, rgba(50, 50, 50, 0.8) 100%);
  border-color: rgba(61, 158, 255, 0.2);
}

#reactionGame {
  min-height: 400px;
}

.game-canvas::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

/* FLAPPY BIRD GAME */
.bird {
  position: absolute;
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, #ffb500, #ff8c00);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(255, 140, 0, 0.5);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  color: white;
}

.bird i {
  width: 1em;
  height: 1em;
  line-height: 1;
}

.pipe {
  position: absolute;
  width: 60px;
  background: linear-gradient(90deg, #52c41a, #389e0d);
  border: 2px solid #262626;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(82, 196, 26, 0.3);
}

.pipe-top {
  top: 0;
}

.pipe-bottom {
  bottom: 0;
}

/* CLICK SPEED GAME */
.click-counter {
  font-size: 72px;
  font-weight: bold;
  color: var(--primary);
  text-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
  animation: pulse 1s infinite;
}

.click-counter.animate {
  animation: clickPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes clickPop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.3);
  }
  100% {
    transform: scale(1);
  }
}

/* TAP THE BALL */
.ball {
  position: absolute;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  cursor: pointer;
  transition: transform 0.1s ease;
  filter: drop-shadow(0 4px 12px rgba(255, 76, 76, 0.4));
  animation: ballPulse 0.8s ease infinite;
  -webkit-user-select: none;
  user-select: none;
}

.ball:hover {
  transform: scale(1.15);
}

.ball:active {
  transform: scale(0.9);
}

@keyframes ballPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 76, 76, 0.7);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(255, 76, 76, 0);
  }
}

/* MEMORY GAME */
.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 4px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.5) 0%, rgba(240, 250, 255, 0.5) 100%);
  border-radius: 12px;
  border: 2px dashed rgba(0, 102, 204, 0.2);
  position: relative;
  margin: 0px;
  min-height: 400px;
  padding-bottom: 45px;
  width: 100%;
  max-height: 350px;
}

html.dark-mode .memory-grid {
  background: linear-gradient(135deg, rgba(40, 40, 40, 0.8) 0%, rgba(50, 50, 50, 0.8) 100%);
  border-color: rgba(61, 158, 255, 0.2);
}

.memory-card {
  aspect-ratio: 1;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all 0.4s cubic-bezier(0.4, 0.2, 0.2, 1);
  box-shadow: 0 4px 10px rgba(0, 102, 204, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  position: relative;
  transform-style: preserve-3d;
}

.memory-card:hover:not(.matched) {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 102, 204, 0.3);
}

.memory-card.flipped {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(240, 250, 255, 0.9));
  color: var(--text);
  box-shadow: inset 0 4px 12px rgba(0, 102, 204, 0.1);
}

.memory-card.matched {
  background: linear-gradient(135deg, #52c41a, #389e0d);
  color: white;
  box-shadow: 0 8px 20px rgba(82, 196, 26, 0.4);
  animation: matchGlow 0.6s ease;
}

@keyframes matchGlow {
  0%, 100% {
    box-shadow: 0 8px 20px rgba(82, 196, 26, 0.4);
  }
  50% {
    box-shadow: 0 10px 30px rgba(82, 196, 26, 0.7);
  }
}

.memory-card span {
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  width: 100%;
  height: 100%;
}

.memory-card i {
  font-size: 18px;
  width: 1em;
  height: 1em;
  line-height: 1;
}

/* GAME CONTROLS */
.game-controls {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(145, 158, 233, 0.05));
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.btn-game-play {
  padding: 12px 28px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border: none;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.2);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn-game-play::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-game-play:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 102, 204, 0.35);
}

.btn-game-play:hover::before {
  left: 100%;
}

.btn-game-play:active {
  transform: translateY(-1px);
}

.game-score {
  font-weight: 600;
  color: var(--primary);
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 15px;
  background: rgba(0, 102, 204, 0.08);
  border-radius: 20px;
  border: 1px solid rgba(0, 102, 204, 0.2);
}

.game-score span {
  font-size: 18px;
  font-weight: 700;
  color: var(--secondary);
}

/* GAME STATE MESSAGES */
.game-message {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 30px 50px;
  border-radius: 12px;
  text-align: center;
  z-index: 100;
  font-size: 24px;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  animation: messageAppear 0.5s ease;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.game-message i {
  font-size: 48px;
  color: #4ecdc4;
  animation: pulse 1s ease-in-out infinite;
}

@keyframes messageAppear {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* GAME TIMER */
.game-timer {
  position: absolute;
  bottom: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 16px;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  gap: 6px;
  animation: timerPulse 1s ease-in-out infinite;
}

.game-timer::before {
  content: '\f017';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 14px;
}

@keyframes timerPulse {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }
  50% {
    box-shadow: 0 4px 16px rgba(61, 158, 255, 0.5);
  }
}

.game-timer.timer-warning {
  background: rgba(255, 0, 0, 0.85);
  border-color: rgba(255, 100, 100, 0.5);
  animation: timerWarning 0.5s ease-in-out infinite;
}

@keyframes timerWarning {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.5);
  }
  50% {
    box-shadow: 0 4px 20px rgba(255, 0, 0, 0.8);
  }
}

/* SIMON SAYS GAME */
.simon-canvas {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  padding: 40px;
  background: linear-gradient(135deg, rgba(30, 30, 30, 0.5), rgba(40, 40, 40, 0.5));
  border-radius: 12px;
  min-height: 400px;
  position: relative;
  overflow: hidden;
  margin: 20px;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.simon-button {
  border-radius: 15px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.simon-button:hover:not(.active) {
  transform: scale(1.05);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.simon-button:active {
  transform: scale(0.95);
}

.simon-button.active {
  transform: scale(1.1);
  box-shadow: 0 0 40px currentColor;
  filter: brightness(1.5);
}

.simon-button.flash {
  animation: simonFlash 0.4s ease;
}

@keyframes simonFlash {
  0%, 100% {
    filter: brightness(1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  }
  50% {
    filter: brightness(1.8);
    box-shadow: 0 0 50px currentColor;
  }
}

.simon-red {
  background: linear-gradient(135deg, #ff4444, #cc0000);
  color: #ff4444;
}

.simon-blue {
  background: linear-gradient(135deg, #4444ff, #0000cc);
  color: #4444ff;
}

.simon-green {
  background: linear-gradient(135deg, #44ff44, #00cc00);
  color: #44ff44;
}

.simon-yellow {
  background: linear-gradient(135deg, #ffff44, #cccc00);
  color: #ffff44;
}

/* REACTION TIME GAME */
.reaction-waiting {
  background: linear-gradient(135deg, #ff6b6b, #ee5a52);
  transition: all 0.3s ease;
}

.reaction-ready {
  background: linear-gradient(135deg, #51cf66, #40c057);
  transition: all 0.3s ease;
}

.reaction-message {
  font-size: 28px;
  font-weight: 700;
  color: white;
  text-align: center;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  padding: 20px;
  -webkit-user-select: none;
  user-select: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  height: 100%;
}

.reaction-message i {
  font-size: 64px;
  animation: reactionBounce 1s ease-in-out infinite;
}

@keyframes reactionBounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .games-grid {
    grid-template-columns: 1fr;
  }
  
  .game-canvas,
  .memory-grid,
  .simon-canvas {
    min-height: 300px;
    margin: 15px;
  }
  
  .game-controls {
    padding: 15px;
  }
  
  .memory-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 12px;
    padding-bottom: 50px;
  }
  
  .memory-card {
    font-size: 28px;
  }
  
  .memory-card i {
    font-size: 26px;
  }
  
  .click-counter {
    font-size: 48px;
  }
  
  .simon-canvas {
    padding: 25px;
    gap: 12px;
  }
  
  .game-timer {
    font-size: 14px;
    padding: 6px 12px;
  }
  
  .reaction-message {
    font-size: 22px;
  }
  
  .reaction-message i {
    font-size: 48px;
  }
}

@media (max-width: 480px) {
  .games-grid {
    gap: 20px;
  }
  
  .game-card {
    border-radius: 12px;
  }
  
  .game-header {
    padding: 15px;
  }
  
  .game-header h3 {
    font-size: 18px;
  }
  
  .memory-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 10px;
    padding-bottom: 45px;
  }
  
  .memory-card {
    font-size: 20px;
  }
  
  .memory-card i {
    font-size: 20px;
  }
  
  .game-timer {
    bottom: 10px;
    right: 10px;
    font-size: 13px;
    padding: 6px 12px;
  }
  
  .simon-canvas {
    padding: 20px;
    gap: 10px;
    min-height: 280px;
  }
  
  .btn-game-play {
    padding: 10px 20px;
    font-size: 14px;
  }
  
  .game-score {
    font-size: 13px;
    padding: 6px 12px;
  }
  
  .reaction-message {
    font-size: 18px;
    padding: 15px;
  }
  
  .reaction-message i {
    font-size: 40px;
  }
}

html.dark-mode .game-card {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

html.dark-mode .game-card:hover {
  box-shadow: 0 20px 40px rgba(61, 158, 255, 0.25);
}

html.dark-mode .game-header {
  background: linear-gradient(135deg, #3d9eff, #2b7fd9);
}

html.dark-mode .game-controls {
  background: linear-gradient(135deg, rgba(61, 158, 255, 0.08), rgba(75, 120, 200, 0.08));
  border-color: #2a2a2a;
}

html.dark-mode .btn-game-play {
  box-shadow: 0 4px 12px rgba(61, 158, 255, 0.2);
}

html.dark-mode .btn-game-play:hover {
  box-shadow: 0 8px 20px rgba(61, 158, 255, 0.35);
}

html.dark-mode .game-score {
  color: #5db0ff;
  background: rgba(61, 158, 255, 0.1);
  border-color: rgba(61, 158, 255, 0.2);
}

html.dark-mode .game-timer {
  background: rgba(20, 20, 20, 0.9);
  border-color: rgba(61, 158, 255, 0.3);
}

html.dark-mode .simon-canvas {
  background: linear-gradient(135deg, rgba(20, 20, 20, 0.7), rgba(30, 30, 30, 0.7));
  border-color: rgba(61, 158, 255, 0.2);
}

html.dark-mode .reaction-waiting {
  background: linear-gradient(135deg, #ff6b6b, #ee5a52);
}

html.dark-mode .reaction-ready {
  background: linear-gradient(135deg, #51cf66, #40c057);
}

html.dark-mode .game-score span {
  color: #7ec8ff;
}

html.dark-mode .memory-card {
  background: linear-gradient(135deg, #3d9eff, #2b7fd9);
  border-color: rgba(61, 158, 255, 0.3);
  box-shadow: 0 6px 16px rgba(61, 158, 255, 0.2);
}

html.dark-mode .memory-card.flipped {
  background: linear-gradient(135deg, rgba(50, 50, 50, 0.9), rgba(60, 60, 60, 0.9));
  box-shadow: inset 0 4px 12px rgba(61, 158, 255, 0.1);
}

/* ========================================
   DARK MODE STYLES
   ======================================== */

/* Hero Section Dark Mode */
html.dark-mode .hero {
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 50%, #1a1a1a 100%);
}

html.dark-mode .hero-avatar {
  border-color: #3d9eff;
  box-shadow: 0 10px 30px rgba(61, 158, 255, 0.3);
}

/* CV Section Dark Mode */
html.dark-mode #cv-section {
  background: linear-gradient(135deg, #1a2a3a 0%, #0f1f2f 100%);
}

html.dark-mode .cv-banner-content {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

html.dark-mode .cv-icon {
  background: rgba(61, 158, 255, 0.2);
}

html.dark-mode .btn-cv-banner {
  background: #3d9eff;
  color: #0f0f0f;
}

html.dark-mode .btn-cv-banner:hover {
  background: #5db0ff;
  color: #0f0f0f;
}

/* Profile Cards Hover Dark Mode */
html.dark-mode .card-about:hover {
  background: linear-gradient(135deg, #1a2a3a 0%, #0f1f2f 100%);
  box-shadow: 0 20px 40px rgba(61, 158, 255, 0.4);
  border-color: rgba(61, 158, 255, 0.5);
}

html.dark-mode .card-education:hover {
  background: linear-gradient(135deg, #3a1a1a 0%, #2f0f0f 100%);
  box-shadow: 0 20px 40px rgba(255, 107, 107, 0.4);
  border-color: rgba(255, 107, 107, 0.5);
}

html.dark-mode .card-skills:hover {
  background: linear-gradient(135deg, #1a3a38 0%, #0f2f2d 100%);
  box-shadow: 0 20px 40px rgba(78, 205, 196, 0.4);
  border-color: rgba(78, 205, 196, 0.5);
}

html.dark-mode .card-experience:hover {
  background: linear-gradient(135deg, #3a3a1a 0%, #2f2f0f 100%);
  box-shadow: 0 20px 40px rgba(255, 217, 61, 0.4);
  border-color: rgba(255, 217, 61, 0.5);
}

html.dark-mode .card-achievement:hover {
  background: linear-gradient(135deg, #1a3a1f 0%, #0f2f14 100%);
  box-shadow: 0 20px 40px rgba(107, 207, 127, 0.4);
  border-color: rgba(107, 207, 127, 0.5);
}

/* Projects Section Dark Mode */
html.dark-mode .project-card {
  background: var(--card-bg);
  border-color: var(--border);
}

html.dark-mode .project-card:hover {
  background: var(--card-hover-bg);
  border-color: var(--primary);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

/* Contact Section Dark Mode */
html.dark-mode .contact-item {
  background: var(--card-bg);
  border-color: var(--border);
}

html.dark-mode .contact-icon {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

html.dark-mode .contact-detail h3 {
  color: var(--text);
}

html.dark-mode .contact-detail a {
  color: var(--primary);
}

/* Social Media Dark Mode */
html.dark-mode .social-link {
  background: rgba(61, 158, 255, 0.1);
  border-color: rgba(61, 158, 255, 0.2);
  color: var(--text);
}

html.dark-mode .social-link:hover {
  background: rgba(61, 158, 255, 0.2);
  border-color: var(--primary);
}

/* Footer Dark Mode */
html.dark-mode footer {
  background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
  border-top-color: #2a2a2a;
}

html.dark-mode footer p {
  color: var(--text-light);
}

/* Section Headers Dark Mode */
html.dark-mode .section-header h2 {
  color: var(--primary);
}

html.dark-mode .section-subtitle {
  color: var(--text-light);
}

/* Skill Tags Dark Mode */
html.dark-mode .skill-tag {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #ffffff;
}

/* List Badges Dark Mode */
html.dark-mode .list-badge {
  background: var(--primary);
  color: #ffffff;
}

/* Form Inputs Dark Mode */
html.dark-mode input,
html.dark-mode textarea,
html.dark-mode select {
  background: #1a1a1a;
  border-color: var(--border);
  color: var(--text);
}

html.dark-mode input:focus,
html.dark-mode textarea:focus,
html.dark-mode select:focus {
  border-color: var(--primary);
  background: #242424;
}

/* Buttons Dark Mode */
html.dark-mode .btn-primary {
  background: var(--primary);
  color: #ffffff;
}

html.dark-mode .btn-primary:hover {
  background: var(--secondary);
}

/* Admin Panel Dark Mode */
html.dark-mode .admin-container {
  background: var(--card-bg);
}

html.dark-mode .stat-card {
  background: var(--card-bg);
  border-color: var(--border);
}

html.dark-mode .stat-card:hover {
  background: var(--card-hover-bg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Table Dark Mode */
html.dark-mode table {
  background: var(--card-bg);
}

html.dark-mode th {
  background: #1a1a1a;
  color: var(--text);
  border-color: var(--border);
}

html.dark-mode td {
  border-color: var(--border);
  color: var(--text);
}

html.dark-mode tbody tr:hover {
  background: rgba(61, 158, 255, 0.1);
}

/* CV Banner Button Dark Mode */
html.dark-mode .btn-cv-banner {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(61, 158, 255, 0.3);
}

html.dark-mode .btn-cv-banner:hover {
  box-shadow: 0 15px 40px rgba(61, 158, 255, 0.4);
}

/* Projects Table Dark Mode */
html.dark-mode .projects-table {
  background: var(--card-bg);
}

html.dark-mode .projects-table th {
  background: #1a1a1a;
  color: var(--text);
}

html.dark-mode .projects-table td {
  color: var(--text);
  border-color: var(--border);
}

html.dark-mode .projects-table tbody tr:hover {
  background: rgba(61, 158, 255, 0.1);
}

/* Project Modal Dark Mode */
html.dark-mode .project-modal {
  background: var(--card-bg);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

html.dark-mode .project-modal-header {
  border-bottom-color: var(--border);
}

html.dark-mode .project-modal-content h3 {
  color: var(--text);
}

/* Password Modal Dark Mode */
html.dark-mode .password-modal-content {
  background: var(--card-bg);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

html.dark-mode .password-modal-content h2 {
  color: var(--primary);
}

html.dark-mode .password-modal-content p {
  color: var(--text);
}

html.dark-mode .password-modal-content input {
  background: #1a1a1a;
  border-color: var(--border);
  color: var(--text);
}

/* Button Secondary Dark Mode */
html.dark-mode .button-secondary {
  background: linear-gradient(135deg, #3a3a3a, #2a2a2a);
  color: #e5e5e5;
  border-color: rgba(255, 255, 255, 0.1);
}

html.dark-mode .button-secondary:hover {
  background: linear-gradient(135deg, #4a4a4a, #3a3a3a);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.15);
}

/* Button Danger Dark Mode */
html.dark-mode .button-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border-color: rgba(239, 68, 68, 0.4);
}

html.dark-mode .button-danger:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.6);
  border-color: rgba(239, 68, 68, 0.7);
}

/* Form Labels Dark Mode */
html.dark-mode label {
  color: var(--text);
}

html.dark-mode .form-help-text,
html.dark-mode small {
  color: var(--text-light);
}

/* Tab Buttons Dark Mode */
html.dark-mode .tab-btn {
  color: var(--text-light);
}

html.dark-mode .tab-btn:hover {
  color: var(--primary);
}

html.dark-mode .tab-btn.active {
  color: var(--primary);
}

/* Admin Tabs Border Dark Mode */
html.dark-mode .admin-tabs {
  border-bottom-color: var(--border);
}

/* Projects Table Container Dark Mode */
html.dark-mode .projects-table-container {
  border-color: var(--border);
}

/* Success Message Dark Mode */
html.dark-mode .success-message {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #ffffff;
}

/* Social Media Cards Dark Mode */
html.dark-mode .checkbox-label {
  background: linear-gradient(135deg, #1a1a1a 0%, #242424 100%);
  border-color: rgba(61, 158, 255, 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

html.dark-mode .checkbox-label:hover {
  background: linear-gradient(135deg, #242424 0%, #2a2a2a 100%);
  border-color: var(--primary);
  box-shadow: 0 6px 16px rgba(61, 158, 255, 0.3);
}

html.dark-mode .checkbox-label i {
  color: #9ca3af;
}

html.dark-mode .checkbox-label:hover i {
  color: var(--primary);
}

html.dark-mode .checkbox-label:has(input[type="checkbox"]:checked) {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-color: var(--primary);
  box-shadow: 0 8px 20px rgba(61, 158, 255, 0.4);
}

html.dark-mode .checkbox-label:has(input[type="checkbox"]:checked) i {
  color: #ffffff;
}

html.dark-mode .social-field-group {
  background: linear-gradient(135deg, #1a1a1a 0%, #242424 100%);
  border-color: rgba(61, 158, 255, 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

html.dark-mode .social-field-group:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(61, 158, 255, 0.2);
}

html.dark-mode .social-section-title {
  color: var(--primary);
}

html.dark-mode .kontak-divider h3 {
  color: var(--text);
}

/* Smooth Transitions for Dark Mode */
body,
navbar,
.modern-card,
.hero,
#cv-section,
.project-card,
.contact-item,
input,
textarea,
select,
button {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
