
:root {
  --neon-blue: #00aaff;
  --neon-blue-light: #1493ff;
  --neon-blue-dark: #0b72d9;
  --bg-dark: #0a0e14;
  --bg-card: rgba(13, 17, 23, 0.6);
  --bg-card-hover: rgba(20, 147, 255, 0.08);
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --glass-border: rgba(0, 170, 255, 0.12);
  --glass-bg: rgba(13, 17, 23, 0.65);
  --glow: 0 0 24px rgba(0, 170, 255, 0.25);
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== Canvas Background ===== */
#mesh-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 25px; left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1000px;
  padding: 15px 35px;
  background: rgba(10, 15, 20, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 9999;
  transition: all 0.5s ease-in-out;
  box-shadow: 0 4px 30px rgb(0, 0, 0);
}

.navbar.scrolled {
  background: rgba(10, 14, 20, 0);
  box-shadow: 0 4px 30px rgba(7, 38, 75, 0.418);
  backdrop-filter: blur(10px);
}

.nav-logo {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--neon-blue);
  text-decoration: none;
  letter-spacing: -0.5px;
  text-shadow: 0 0 24px rgba(0, 170, 255, 0.35);
  transition: text-shadow 0.3s ease;
}

.nav-logo:hover {
  text-shadow: 0 0 32px rgba(0, 170, 255, 0.6);
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  position: relative;
  transition: color 0.3s ease;
  padding: 4px 0;
  letter-spacing: 0.2px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--neon-blue);
  border-radius: 2px;
  transition: width 0.3s ease;
  box-shadow: 0 0 12px rgba(0, 170, 255, 0.6);
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Mobile Menu Toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  z-index: 110;
  background: none;
  border: none;
}

.mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform-origin: center;
}

.mobile-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100vh;
  background: rgba(10, 14, 20, 0.97);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  z-index: 105;
  padding: 100px 40px 40px;
  transition: right 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border-left: 1px solid var(--glass-border);
}

.mobile-menu.open {
  right: 0;
}

.mobile-menu a {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 500;
  padding: 18px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: color 0.3s ease, padding-left 0.3s ease;
}

.mobile-menu a:hover {
  color: var(--neon-blue);
  padding-left: 14px;
}

.mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 104;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.mobile-overlay.visible {
  opacity: 1;
}

/* ===== Sections ===== */
section {
  position: relative;
  z-index: 1;
  padding: 120px 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  text-align: center;
  position: relative;
  letter-spacing: -1px;
  margin-bottom: 58px;
}

.section2-title {
  font-size: 2.2rem;
  font-weight: 800;
  text-align: center;
  position: relative;
  letter-spacing: -1px;
}

.section-title span {
  background: linear-gradient(135deg, var(--neon-blue), #60d5ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section2-title span {
  background: linear-gradient(135deg, var(--neon-blue), #60d5ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}


.section-subtitle {
  margin-bottom: 58px;
  background: linear-gradient(135deg, var(--text-secondary), #849da7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 80px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 22px;
  background: rgba(0, 170, 255, 0.06);
  border: 1px solid rgba(0, 170, 255, 0.18);
  border-radius: 50px;
  font-size: 0.82rem;
  color: var(--neon-blue);
  font-weight: 500;
  margin-bottom: 36px;
  letter-spacing: 0.3px;
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neon-blue);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0, 170, 255, 0.5); }
  50% { opacity: 0.6; box-shadow: 0 0 0 10px rgba(0, 170, 255, 0); }
}

.hero h1 {
  font-size: clamp(2.8rem, 7vw, 4.8rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -2.5px;
  margin-bottom: 24px;
}

.hero h1 .accent {
  background: linear-gradient(135deg, var(--neon-blue), #60d5ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto 48px;
  line-height: 1.7;
  font-weight: 400;
}

.hero-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: 14px;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
  border: none;
  font-family: 'Inter', sans-serif;
}

.btn-primary {
  background: var(--neon-blue);
  color: #fff;
  box-shadow: 0 4px 24px rgba(0, 170, 255, 0.3);
}

.btn-primary:hover {
  background: var(--neon-blue-light);
  box-shadow: 0 6px 32px rgba(0, 170, 255, 0.5);
  transform: translateY(-2px);
}

.btn-glass {
  background: var(--glass-bg);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn-glass:hover {
  background: var(--bg-card-hover);
  border-color: rgba(0, 170, 255, 0.4);
  box-shadow: var(--glow);
  transform: translateY(-2px);
}

.btn svg {
  width: 18px;
  height: 18px;
}

/* ===== Skills ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.skill-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  padding: 36px 20px;
  text-align: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: default;

  transform: translateY(0) scale(1) !important; 
  opacity: 1 !important;

  transition: transform 0.45s ease, background 0.55s ease, border-color 0.65s ease, box-shadow 0.75s ease !important;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.skill-card:hover {
  transform: translateY(-10px) scale(1.02) !important;
  border-color: rgba(0, 170, 255, 0.4);
  background: var(--bg-card-hover);
  box-shadow: var(--glow);
  transform: translateY(-10px);
}

.skill-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 170, 255, 0.08);
  border: 1px solid rgba(0, 170, 255, 0.12);
  color: var(--neon-blue);
  transition: all 0.3s ease;
  overflow: hidden;
  padding: 12px;
}

.skill-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.skill-card:hover .skill-icon {
  background: rgba(0, 170, 255, 0.14);
  box-shadow: 0 0 24px rgba(0, 170, 255, 0.068);
  transform: scale(1.05);
}

.skill-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.skill-card p {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 400;
}

/* ===== Projects ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.project-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  padding: 28px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transform: translateY(0) scale(1) !important; 
  opacity: 1 !important;
  transition: transform 0.45s ease, background 0.55s ease, border-color 0.65s ease, box-shadow 0.75s ease !important;
}

.project-card:hover {
  transform: translateY(-10px) scale(1.02) !important;
  border-color: rgba(0, 170, 255, 0.4) !important;
  background: var(--bg-card-hover) !important;
  box-shadow: var(--glow) !important;
}

.project-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.project-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 170, 255, 0.08);
  border: 1px solid rgba(0, 170, 255, 0.12);
  color: var(--neon-blue);
}

.project-card-icon svg {
  width: 20px;
  height: 20px;
}

.project-stars {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.project-stars svg {
  width: 14px;
  height: 14px;
  color: #f0c040;
}

.project-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.project-card .desc {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 16px;
}

.project-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.project-lang {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lang-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.projects-loading {
  text-align: center;
  padding: 80px 0;
  color: var(--text-secondary);
  grid-column: 1 / -1;
}

.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(0, 170, 255, 0.1);
  border-top-color: var(--neon-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== Contact ===== */
.contact-card {
  max-width: 540px;
  margin: 0 auto;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 48px 40px;
  text-align: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.contact-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.contact-card .desc {
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-size: 0.95rem;
  line-height: 1.6;
}

.contact-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Footer ===== */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 40px 24px;
  border-top: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-size: 0.82rem;
}

/* ===== Cookie ===== */
.cookie-container {
  position: fixed;
  bottom: -100%;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 500px;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(0, 170, 255, 0.2);
  border-radius: 20px;
  padding: 20px;
  z-index: 9999;
  transition: bottom 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.cookie-container.show {
  bottom: 30px;
}

.cookie-content {
  text-align: center;
  color: #fff;
}

.cookie-content p {
  font-size: 0.9rem;
  line-height: 1.5;
}

.cookie-content a {
  display: inline-block;
  color: var(--neon-blue, #00aaff);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 20px;
  opacity: 0.8;
  transition: all 0.3s ease;
  border-bottom: 1px solid transparent
}

.cookie-content a:hover {
  opacity: 1;
  text-shadow: 0 0 8px rgba(0, 170, 255, 0.4);
}

.cookie-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.cookie-btn {
  padding: 10px 25px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.4s ease-in-out;
}

.cookie-btn.accept {
  background: var(--neon-blue, #00aaff);
  color: white;
}

.cookie-btn.accept:hover {
  box-shadow: 0 0 15px rgb(0, 170, 255);
}

.cookie-btn.decline {
  background: transparent;
  color: white;
  border: 1px solid #30363d;
}

.cookie-btn.decline:hover {
  border: 1px solid #ff0000;
  background: rgb(255, 0, 0);
  box-shadow: 0 0 15px rgb(255, 0, 0);
}

.policy-content {
  max-width: 800px;
  margin: 150px auto 100px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 50px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.policy-content h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 30px;
  background: linear-gradient(135deg, var(--neon-blue), #60d5ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.policy-content h2 {
  font-size: 1.4rem;
  color: var(--neon-blue);
  margin: 30px 0 15px;
}

.policy-content p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 15px;
}

.policy-content ul {
  margin-left: 20px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.policy-content li {
  margin-bottom: 10px;
}

.back-home {
  margin-top: 40px;
  display: inline-block;
}

@media (max-width: 768px) {
  .policy-content {
    padding: 30px 20px;
    margin: 100px 20px;
  }
}

/* ===== Reveal Animations ===== */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.93);
  transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

.reveal-blur {
  opacity: 0;
  filter: blur(8px);
  transform: translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              filter 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-blur.visible {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

.stagger-children > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0.05s; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.15s; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.2s; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.25s; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.3s; }
.stagger-children.visible > *:nth-child(7) { transition-delay: 0.35s; }
.stagger-children.visible > *:nth-child(8) { transition-delay: 0.4s; }
.stagger-children.visible > *:nth-child(9) { transition-delay: 0.45s; }
.stagger-children.visible > *:nth-child(10) { transition-delay: 0.5s; }

.stagger-children.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 14px 20px;
  }

  .nav-links {
    display: none;
  }

  .mobile-toggle {
    display: flex;
  }

  .mobile-menu {
    display: block;
  }

  section {
    padding: 80px 20px;
  }

  .section-title {
    font-size: 1.7rem;
    margin-bottom: 40px;
  }

  .section2-title {
    font-size: 1.7rem;
  }

  .hero h1 {
    font-size: 2.4rem;
    letter-spacing: -1px;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .contact-card {
    padding: 32px 24px;
  }

  .contact-buttons {
    flex-direction: column;
    align-items: center;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .skill-card {
    padding: 24px 16px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
  }
}