* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

html {
  scroll-behavior: smooth;
}

/* Dot Grid full-screen background canvas */
#dot-grid-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  display: block;
}

:root {
  /* Light Mode - Professional UI Colors */
  --primary: #3B82F6;
  /* Figma-like blue */
  --primary-light: #60A5FA;
  --secondary: #8B5CF6;
  /* Adobe purple */
  --accent: #10B981;
  /* Positive green */
  --bg: #F9FAFB;
  /* Light neutral */
  --card: #FFFFFF;
  --text: #111827;
  --text-light: #6B7280;
  --gradient: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
  --transition-time: 0.5s;
}

.dark-mode {
  /* Dark Mode - Design Tool Aesthetic */
  --primary: #8B5CF6;
  /* Soft purple */
  --primary-light: #A78BFA;
  --secondary: #3B82F6;
  /* Blue */
  --accent: #10B981;
  /* Consistent green */
  --bg: #0F172A;
  /* Deep navy */
  --card: #1E293B;
  --text: #F8FAFC;
  --text-light: #94A3B8;
  --gradient: linear-gradient(135deg, #8B5CF6 0%, #3B82F6 100%);
}

body {
  background: var(--bg);
  color: var(--text);
  transition:
    background var(--transition-time) ease,
    color var(--transition-time) ease;
  overflow-x: hidden;
  cursor: auto;
  /* Restore default cursor */
}

/* FIGMA LOADER STYLES */
#figma-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-family: 'Poppins', sans-serif;
}

.dark-mode #figma-loader {
  background: #0F172A;
}

#figma-loader .toolbar {
  width: 300px;
  height: 40px;
  background: #F0F0F0;
  border-radius: 8px;
  margin-bottom: 20px;
  animation: shimmer 2s infinite;
}

.dark-mode #figma-loader .toolbar {
  background: #1E293B;
}

#figma-loader .artboard {
  width: 300px;
  height: 180px;
  background: #F8F8F8;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

.dark-mode #figma-loader .artboard {
  background: #1E293B;
}

#figma-loader .shape {
  position: absolute;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 4px;
  animation: float 3s ease-in-out infinite;
}

#figma-loader .shape:nth-child(1) {
  width: 80px;
  height: 60px;
  top: 30px;
  left: 40px;
}

#figma-loader .shape:nth-child(2) {
  width: 120px;
  height: 40px;
  top: 100px;
  left: 60px;
  animation-delay: 0.5s;
}

#figma-loader .progress-container {
  width: 300px;
  height: 4px;
  background: #F0F0F0;
  border-radius: 2px;
  margin-top: 20px;
  overflow: hidden;
}

.dark-mode #figma-loader .progress-container {
  background: #1E293B;
}

#figma-loader .progress-bar {
  height: 100%;
  width: 0;
  background: var(--gradient);
  animation: progress 2.5s ease-out forwards;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes progress {
  0% {
    width: 0;
  }

  100% {
    width: 100%;
  }
}

/* ENHANCED BUTTON STYLES */
.buttons a {
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
}

.btn-shimmer::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(to bottom right,
      rgba(255, 255, 255, 0) 45%,
      rgba(255, 255, 255, 0.3) 50%,
      rgba(255, 255, 255, 0) 55%);
  transform: rotate(30deg);
  transition: all 0.7s ease;
  opacity: 0;
}

.btn-shimmer:hover::after {
  left: 100%;
  opacity: 1;
}

/* ENHANCED SOCIAL ICONS */
.social-icon {
  transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.social-icon:hover {
  transform: scale(1.2) translateY(-5px);
}

/* ENHANCED SKILL CARDS */
.skill-item {
  animation: float 4s ease-in-out infinite;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  transform: translateZ(0);
  will-change: transform;
}

.skill-item:hover {
  animation: none;
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15) !important;
}

/* ENHANCED HEADER ANIMATIONS */
header {
  animation: fadeInDown 0.8s ease-out both;
}

#logo {
  transition: all 0.3s ease;
}

#logo:hover {
  animation: pulse 1.5s infinite;
}

/* ENHANCED SECTION ANIMATIONS */
section {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

section.reveal-section {
  opacity: 1;
  transform: translateY(0);
}

/* KEYFRAMES FOR ANIMATIONS */
@keyframes fadeInDown {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {

  0%,
  100% {
    text-shadow: 0 0 0 rgba(59, 130, 246, 0);
  }

  50% {
    text-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
  }
}

#tsparticles {
  position: fixed;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: auto;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background: var(--gradient);
  z-index: 1000;
  transition: width 0.1s ease;
}

/* REACTION BITS - PILL NAV FLOATING HEADER STYLES */
header.pill-header {
  position: fixed;
  top: 16px;
  left: 0;
  right: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 0 16px;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}

.pill-nav-container {
  pointer-events: auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  max-width: 980px;
  padding: 5px 18px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 9999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.dark-mode .pill-nav-container {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 1px 3px rgba(0, 0, 0, 0.3);
}

.pill-nav {
  justify-self: center;
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(0, 0, 0, 0.04);
  padding: 3px;
  border-radius: 9999px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.dark-mode .pill-nav {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.pill-active-bg {
  position: absolute;
  top: 3px;
  left: 0px;
  height: calc(100% - 6px);
  width: 0px;
  background: var(--gradient);
  border-radius: 9999px;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.pill-nav a {
  position: relative;
  z-index: 2;
  color: var(--text);
  font-weight: 500;
  font-size: 0.83rem;
  padding: 5px 10px;
  border-radius: 9999px;
  text-decoration: none;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.pill-nav a.active,
.pill-nav a.pill-hovered {
  color: #ffffff !important;
}

.pill-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 4px;
}

#logo {
  justify-self: start;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.03em;
  cursor: pointer;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.logo-letter {
  display: inline-block;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

.logo-letter.stana-animate {
  animation: stanaEffect 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes stanaEffect {
  0% {
    transform: translateY(0) scale(1) rotate(0deg);
    color: var(--primary);
    text-shadow: 0 0 0 rgba(59, 130, 246, 0);
  }

  25% {
    transform: translateY(-8px) scale(1.2) rotate(-5deg);
    color: var(--secondary);
    text-shadow: 0 0 15px rgba(59, 130, 246, 0.8);
  }

  50% {
    transform: translateY(-12px) scale(1.3) rotate(5deg);
    color: var(--accent);
    text-shadow: 0 0 25px rgba(246, 114, 128, 0.9);
  }

  75% {
    transform: translateY(-6px) scale(1.1) rotate(-2deg);
    color: var(--secondary);
    text-shadow: 0 0 20px rgba(139, 92, 246, 0.7);
  }

  100% {
    transform: translateY(0) scale(1) rotate(0deg);
    color: var(--primary);
    text-shadow: 0 0 0 rgba(59, 130, 246, 0);
  }
}

/* Staggered animation delays for each letter */
.logo-letter:nth-child(1).stana-animate {
  animation-delay: 0s;
}

.logo-letter:nth-child(2).stana-animate {
  animation-delay: 0.05s;
}

.logo-letter:nth-child(3).stana-animate {
  animation-delay: 0.1s;
}

.logo-letter:nth-child(4).stana-animate {
  animation-delay: 0.15s;
}

.logo-letter:nth-child(5).stana-animate {
  animation-delay: 0.2s;
}

.logo-letter:nth-child(6).stana-animate {
  animation-delay: 0.25s;
}

.logo-letter:nth-child(7).stana-animate {
  animation-delay: 0.3s;
}

.logo-letter:nth-child(8).stana-animate {
  animation-delay: 0.35s;
}

.logo-letter:nth-child(9).stana-animate {
  animation-delay: 0.4s;
}

.logo-letter:nth-child(10).stana-animate {
  animation-delay: 0.45s;
}

/* Enhanced hover effect */
#logo:hover .logo-letter {
  transform: translateY(-2px);
  text-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
  transition: all 0.2s ease;
}

.theme-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 1.15rem;
  padding: 5px 8px;
  cursor: pointer;
  transition: color 0.2s, transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-btn:hover {
  transform: scale(1.1);
}

/* Mobile Menu Styles */
.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  font-size: 1.2rem;
  color: var(--primary);
  cursor: pointer;
  z-index: 1000;
  padding: 5px 8px;
  border-radius: 8px;
  transition: all 0.3s ease;
  align-items: center;
  justify-content: center;
}

.mobile-menu-btn:hover {
  background: rgba(59, 130, 246, 0.1);
  transform: scale(1.05);
}

/* Tablet Scale (993px to 1100px) */
@media (max-width: 1100px) and (min-width: 993px) {
  header.pill-header {
    top: 12px;
    padding: 0 12px;
  }

  .pill-nav-container {
    max-width: 95%;
    padding: 4px 14px;
  }

  #logo {
    font-size: 1.15rem;
  }

  .pill-nav a {
    font-size: 0.78rem;
    padding: 4px 8px;
  }
}

/* Mobile & Tablet Breakpoint (< 992px) */
@media (max-width: 992px) {
  header.pill-header {
    top: 8px;
    padding: 0 10px;
  }

  .pill-nav-container {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 4px 12px 4px 16px !important;
    max-width: 100% !important;
  }

  #logo {
    font-size: 1.1rem;
  }

  .pill-nav {
    display: none !important;
  }

  .mobile-menu-btn {
    display: flex !important;
    font-size: 1.1rem;
    padding: 4px 6px;
  }

  .theme-btn {
    font-size: 1.1rem;
    padding: 4px 6px;
  }
}

/* Extra Small Mobile (< 480px) */
@media (max-width: 480px) {
  header.pill-header {
    top: 6px;
    padding: 0 6px;
  }

  .pill-nav-container {
    padding: 3px 10px 3px 12px !important;
  }

  #logo {
    font-size: 0.98rem;
  }

  .theme-btn,
  .mobile-menu-btn {
    font-size: 1.0rem;
    padding: 3px 5px;
  }
}

.menu-close-btn {
  background: none;
  border: none;
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 1001;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  transition: background 0.2s;
}

.menu-close-btn:hover {
  background: rgba(59, 130, 246, 0.08);
}

.staircase-close-icon svg {
  display: block;
  width: 28px;
  height: 28px;
  stroke: var(--primary, #3B82F6);
}

/* REACT BITS - STAGGERED MENU STYLES */
/* (dot-grid-bg rule is defined near the top of this file) */

/* Staggered menu wrapper — must be fixed to viewport, above everything */
.staggered-menu-wrapper,
.fixed-wrapper {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9000;
  pointer-events: none;
  overflow: hidden;
}

/* Only allow interaction when open */
.staggered-menu-wrapper[data-open] {
  pointer-events: auto;
}

.sm-prelayers {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 50vw;
  max-width: 320px;
  min-width: 220px;
  pointer-events: none;
  z-index: 9005;
}

.sm-prelayer {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 100%;
  transform: translate3d(100%, 0, 0);
  visibility: hidden;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.staggered-menu-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 50vw;
  max-width: 320px;
  min-width: 220px;
  height: 100vh;
  background: var(--card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  padding: 4.5em 1.4em 2em 1.5em;
  overflow-y: auto;
  z-index: 9010;
  pointer-events: auto;
  transform: translate3d(100%, 0, 0);
  visibility: hidden;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.25);
}

.staggered-menu-wrapper[data-open] .sm-prelayer,
.staggered-menu-wrapper[data-open] .staggered-menu-panel {
  visibility: visible;
}

.dark-mode .staggered-menu-panel {
  background: rgba(15, 23, 42, 0.95);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.sm-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: var(--primary);
  font-size: 1rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 20;
}

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

.sm-panel-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 1rem;
}

.sm-panel-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.sm-panel-list[data-numbering] {
  counter-reset: smItem;
}

.sm-panel-itemWrap {
  position: relative;
  overflow: hidden;
  line-height: 1.2;
}

.sm-panel-item {
  position: relative;
  color: var(--text);
  font-weight: 700;
  font-size: clamp(1.1rem, 3.8vw, 1.6rem);
  cursor: pointer;
  line-height: 1.2;
  letter-spacing: -0.5px;
  text-transform: uppercase;
  display: inline-block;
  text-decoration: none;
  padding-right: 1.4em;
  transition: color 0.3s ease;
}

.sm-panel-item:hover {
  color: var(--primary);
}

.sm-panel-itemLabel {
  display: inline-block;
  will-change: transform;
  transform-origin: 50% 100%;
}

.sm-panel-list[data-numbering] .sm-panel-item::after {
  counter-increment: smItem;
  content: counter(smItem, decimal-leading-zero);
  position: absolute;
  top: 0.1em;
  right: 0.1em;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--secondary);
  letter-spacing: 0;
  pointer-events: none;
  user-select: none;
  opacity: var(--sm-num-opacity, 0);
  transition: opacity 0.3s ease;
}

@media (max-width: 768px) {
  .sm-prelayers,
  .staggered-menu-panel {
    width: 75vw;
    max-width: 340px;
    min-width: 240px;
    right: 0 !important;
    left: auto !important;
  }
}

@media (max-width: 400px) {
  .sm-prelayers,
  .staggered-menu-panel {
    width: 85vw;
    max-width: none;
  }
}

/* Overlay */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  z-index: 8999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.menu-overlay.active {
  opacity: 1;
  pointer-events: all;
}

section {
  padding: 100px 10% 80px;
  opacity: 0;
  transform: translateY(40px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

section.reveal-section {
  animation: slideUp 0.8s ease forwards;
}

@keyframes slideUp {
  0% {
    opacity: 0;
    transform: translateY(40px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.glass-box {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 50px;
  width: 150%;
  max-width: 1200px;
  margin: 0 auto;
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.1);
  transition: all var(--transition-time) ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark-mode .glass-box {
  background: rgba(30, 41, 59, 0.5);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Section-specific adjustments */
#home .glass-box {
  padding: 40px;
  text-align: center;
}

#contact .glass-box {
  padding-bottom: 60px;
}

.section-content-spacing {
  margin-top: 30px;
}

@media (max-width: 768px) {
  .glass-box {
    padding: 30px;
    width: 95%;
  }
}

#home {
  text-align: center;
}

#home img {
  width: 320px;
  height: 320px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  object-fit: cover;
  margin-bottom: 20px;
  transition: all 0.3s ease;
  box-shadow:
    0 0 20px 5px rgba(59, 130, 246, 0.6),
    0 0 40px 10px rgba(139, 92, 246, 0.4);
  animation:
    float 3s ease-in-out infinite,
    pulse-glow 4s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse-glow {

  0%,
  100% {
    box-shadow:
      0 0 20px 5px rgba(59, 130, 246, 0.6),
      0 0 40px 10px rgba(139, 92, 246, 0.4);
  }

  50% {
    box-shadow:
      0 0 30px 10px rgba(59, 130, 246, 0.8),
      0 0 50px 15px rgba(139, 92, 246, 0.6);
  }
}

.typed-text {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary);
  margin-top: 10px;
  height: 32px;
  display: inline-block;
  overflow: hidden;
  vertical-align: middle;
}

#home p {
  margin: 15px auto;
  max-width: 600px;
  color: var(--text);
  padding-top: 10px;
}

.buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.buttons a {
  margin: 10px;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-weight: 600;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
}

.resume-btn {
  background: var(--gradient);
  color: white;
  border: none;
}

.resume-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(to bottom right,
      rgba(255, 255, 255, 0.3) 0%,
      rgba(255, 255, 255, 0) 60%);
  transform: rotate(30deg);
  transition: all 0.5s ease;
}

.hire-btn {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.hire-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(to bottom right,
      rgba(255, 255, 255, 0.2) 0%,
      rgba(255, 255, 255, 0) 60%);
  transform: rotate(30deg);
  transition: all 0.5s ease;
}

.resume-btn:hover,
.hire-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.resume-btn:hover::after,
.hire-btn:hover::after {
  left: 100%;
}

.section-title {
  font-size: 28px;
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient);
  border-radius: 2px;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
  position: relative;
  overflow: hidden;
}

.section-title::before {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
  border-radius: 2px;
  animation: waterFlow 2.5s ease-in-out infinite;
  z-index: 1;
}

#about p {
  font-size: 16px;
  color: var(--text);
  line-height: 1.7;
  text-align: justify;
  text-justify: inter-word;
  margin-bottom: 15px;
  hyphens: auto;
}

/* Improved paragraph spacing */
#about .glass-box p+p {
  margin-top: 1em;
}

/* Mobile adjustment */
@media (max-width: 768px) {
  #about p {
    text-align: left;
    hyphens: none;
  }
}

/* ===== UPDATED SKILLS SECTION ===== */
#skills .glass-box {
  max-width: 1200px;
  padding: 50px;
  width: 100%;
  /* Fixed from 150% */
  margin: 0 auto;
  box-sizing: border-box;
  /* Added */
}

.skills-container {
  width: 100%;
  max-width: 1000px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 25px;
  margin: 30px auto 0;
  padding: 0 20px;
  /* Added equal padding */
  box-sizing: border-box;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .skills-container {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

@media (max-width: 768px) {
  #skills .glass-box {
    width: 95%;
    padding: 30px;
  }

  .skills-container {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    padding: 0 15px;
  }
}

@media (max-width: 480px) {
  .skills-container {
    grid-template-columns: 1fr;
    padding: 0 10px;
  }
}

/* ===== END OF UPDATED SECTION ===== */

.skill-item {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 15px;
  padding: 30px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  min-height: 220px;
}

.dark-mode .skill-item {
  background: rgba(30, 41, 59, 0.5);
}

.skill-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border-color: var(--primary);
}

.skill-icon {
  width: 60px;
  height: 60px;
  margin-bottom: 15px;
  object-fit: contain;
}

.skill-title {
  font-size: 18px;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 10px;
}

.skill-description {
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.5;
}

/* ===== PROJECTS SECTION ===== */
/* 3D CIRCULAR GALLERY STYLES */
.circular-gallery-wrapper {
  position: relative;
  width: 100%;
  margin: 30px 0 25px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08), inset 0 0 30px rgba(255, 255, 255, 0.02);
  overflow: hidden;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.dark-mode .circular-gallery-wrapper {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.6), rgba(30, 41, 59, 0.3));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), inset 0 0 40px rgba(0, 0, 0, 0.2);
}

.circular-gallery {
  width: 100%;
  height: 520px;
  position: relative;
  perspective: 1200px;
  overflow: hidden;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.circular-gallery:active {
  cursor: grabbing;
}

.cg-track {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  transform-style: preserve-3d;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 3D Project Cards */
.cg-card {
  position: absolute;
  width: 440px;
  height: 400px;
  border-radius: 20px;
  background: var(--card-bg, rgba(255, 255, 255, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.4s ease, border-color 0.4s ease, filter 0.4s ease;
  will-change: transform, opacity;
  transform-style: preserve-3d;
}

.dark-mode .cg-card {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.cg-card.active {
  border-color: var(--primary, #3B82F6);
  box-shadow: 0 20px 50px rgba(59, 130, 246, 0.25), 0 0 20px rgba(59, 130, 246, 0.2);
}

.cg-card-image {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: #0f172a;
}

.cg-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.cg-card:hover .cg-card-image img {
  transform: scale(1.06);
}

.cg-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.85) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  padding: 16px 20px;
}

.cg-tag-badge {
  background: rgba(59, 130, 246, 0.25);
  color: #60A5FA;
  border: 1px solid rgba(96, 165, 250, 0.4);
  backdrop-filter: blur(8px);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cg-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.cg-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-color, #0f172a);
  margin-bottom: 8px;
  line-height: 1.3;
}

.dark-mode .cg-card-title {
  color: #f8fafc;
}

.cg-card-desc {
  font-size: 0.88rem;
  color: var(--text-light, #64748b);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
}

.dark-mode .cg-card-desc {
  color: #94a3b8;
}

.cg-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 12px;
}

.cg-card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary, #3B82F6);
  text-decoration: none;
  transition: gap 0.3s ease, color 0.3s ease;
}

.cg-card-link:hover {
  gap: 12px;
  color: #2563EB;
}

/* Navigation Buttons */
.cg-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  color: #1e293b;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: all 0.3s ease;
}

.dark-mode .cg-nav-btn {
  background: rgba(15, 23, 42, 0.8);
  border-color: rgba(255, 255, 255, 0.15);
  color: #f8fafc;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.cg-nav-btn:hover {
  background: var(--primary, #3B82F6);
  color: #ffffff;
  border-color: var(--primary, #3B82F6);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
}

.cg-prev {
  left: 24px;
}

.cg-next {
  right: 24px;
}

/* Control Bar */
.cg-controls {
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  pointer-events: none;
  z-index: 20;
}

.cg-drag-hint {
  font-size: 0.78rem;
  color: var(--text-light, #64748b);
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.75;
}

.dark-mode .cg-drag-hint {
  color: #94a3b8;
}

.cg-dots {
  display: flex;
  gap: 8px;
  pointer-events: auto;
}

.cg-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
}

.cg-dot.active {
  width: 28px;
  border-radius: 12px;
  background: var(--primary, #3B82F6);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.5);
}

/* Responsive Scaling */
@media (max-width: 992px) {
  .circular-gallery {
    height: 480px;
  }

  .cg-card {
    width: 380px;
    height: 370px;
  }

  .cg-card-image {
    height: 190px;
  }
}

@media (max-width: 768px) {
  .circular-gallery {
    height: 440px;
  }

  .cg-card {
    width: 310px;
    height: 350px;
  }

  .cg-card-image {
    height: 170px;
  }

  .cg-prev {
    left: 12px;
  }

  .cg-next {
    right: 12px;
  }

  .cg-controls {
    padding: 0 16px;
  }

  .cg-drag-hint {
    display: none;
  }
}

@media (max-width: 480px) {
  .circular-gallery {
    height: 400px;
  }

  .cg-card {
    width: 270px;
    height: 330px;
  }

  .cg-card-image {
    height: 150px;
  }
}

/* PROJECTS SECTION - UPDATED */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-top: 40px;
}

@media (max-width: 768px) {
  .project-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.project-card {
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-card:hover {
  transform: translateY(-5px);
}

.card-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

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

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover .image-overlay {
  opacity: 1;
}

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

.view-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: var(--primary);
  color: white !important;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  transform: translateY(20px);
  opacity: 0;
}

.project-card:hover .view-button {
  transform: translateY(0);
  opacity: 1;
}

.view-button:hover {
  background: white;
  color: var(--primary) !important;
}

.card-content {
  padding: 20px;
}

.card-content h3 {
  margin-bottom: 10px;
  color: var(--primary);
}

.card-content p {
  color: var(--text-light);
  margin-bottom: 15px;
  line-height: 1.6;
}

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

.tech-tags span {
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

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

/* Design Philosophy Section */
.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.philosophy-card {
  background: rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border-radius: 15px;
  padding: 30px;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: float 4s ease-in-out infinite;
  transform: translateZ(0);
  will-change: transform;
}

.dark-mode .philosophy-card {
  background: var(--card);
  color: var(--text);
  border: 2px solid transparent;
}

.dark-mode .philosophy-card:hover {
  background: var(--card);
  animation: none;
  border-color: var(--primary);
  box-shadow: 0 15px 30px rgba(59, 130, 246, 0.18) !important;
}

.philosophy-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
  border-color: var(--primary);
  animation: none;
}

.philosophy-card i {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 20px;
}

.philosophy-card h3 {
  color: var(--primary);
  margin-bottom: 15px;
}

.philosophy-card p {
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.6;
}

/* Contact Section */
#contact {
  position: relative;
  padding-bottom: 120px;
}

#contact .contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  width: 100%;
  max-width: 1200px;
}

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

.contact-method {
  display: flex;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.3);
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark-mode .contact-method {
  background: rgba(30, 41, 59, 0.5);
}

.contact-method:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  border-color: var(--primary);
}

.contact-icon {
  font-size: 1.5rem;
  color: var(--primary);
  margin-right: 20px;
  min-width: 50px;
  height: 50px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-details {
  flex-grow: 1;
}

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

.contact-details p,
.contact-details a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.3s ease;
}

.contact-details a:hover {
  color: var(--primary);
}

.contact-form-container {
  background: rgba(255, 255, 255, 0.3);
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark-mode .contact-form-container {
  background: rgba(30, 41, 59, 0.5);
}

.contact-form-container:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

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

.form-group {
  position: relative;
}

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

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.5);
  font-size: 16px;
  transition: all 0.3s ease;
}

.dark-mode .contact-form input,
.dark-mode .contact-form textarea {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.dark-mode .contact-form input:focus,
.dark-mode .contact-form textarea:focus {
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

.submit-btn {
  background: var(--gradient);
  color: white;
  border: none;
  padding: 15px 25px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  margin-top: 10px;
  position: relative;
  overflow: hidden;
}

.submit-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(to bottom right,
      rgba(255, 255, 255, 0.3) 0%,
      rgba(255, 255, 255, 0) 60%);
  transform: rotate(30deg);
  transition: all 0.3s ease;
}

.submit-btn:hover::after {
  left: 100%;
}

/* Social Icons */
.social-links {
  display: flex;
  justify-content: center;
  margin-top: 40px;
  gap: 20px;
}

.social-icon {
  position: relative;
  display: inline-block;
}

.social-icon i {
  font-size: 1.8rem;
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.social-icon:hover i {
  transform: scale(1.2) translateY(-5px);
  filter: brightness(1.1);
}

/* Enhanced Back to Top Button with Smooth Scroll */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--gradient);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 99;
  cursor: pointer;
  transform: translateY(20px);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.5);
  background: linear-gradient(135deg, #3B82F6, #1D4ED8);
}

.back-to-top:active {
  transform: scale(0.95);
  transition: transform 0.1s ease;
}

footer {
  text-align: center;
  padding: 12px 0 10px 0;
  background: rgba(224, 240, 255, 0.7);
  /* border-top: 1px solid rgba(0,0,0,0.1); */
}

.dark-mode footer {
  background: rgba(15, 23, 42, 0.7);
  /* border-top: 1px solid rgba(255,255,255,0.1); */
}

footer p {
  margin-top: 15px;
  color: var(--text-light);
}

/* Design System Badge */
.design-system-badge {
  position: fixed;
  bottom: 20px;
  right: 90px;
  background: var(--card);
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 100;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.design-system-badge span {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
  #contact .contact-container {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .contact-info {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .contact-method {
    width: calc(50% - 10px);
  }
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }

  nav {
    display: none;
  }

  header {
    padding: 15px 5%;
  }

  section {
    padding: 80px 5% 60px;
  }

  #home img {
    width: 200px;
    height: 200px;
  }

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

  .project-card {
    height: auto;
  }

  .project-card:hover img {
    height: 160px;
  }

  .project-card .content {
    position: relative;
  }

  .project-card:hover .content {
    position: relative;
    background: rgba(255, 255, 255, 0.9);
  }

  .dark-mode .project-card:hover .content {
    background: rgba(30, 41, 59, 0.9);
  }

  .project-links {
    position: relative;
    bottom: auto;
    opacity: 1;
    padding: 20px 0 0;
    justify-content: flex-start;
  }

  /* Contact section mobile adjustments */
  .contact-method {
    width: 100%;
  }

  .contact-icon {
    font-size: 1.2rem;
    min-width: 40px;
    height: 40px;
    margin-right: 15px;
  }

  .contact-details h3 {
    margin-bottom: 5px;
  }

  .buttons a {
    padding: 10px 18px;
    font-size: 14px;
  }

  /* Improve touch targets */
  .mobile-menu-btn,
  .theme-btn,
  .back-to-top {
    min-height: 44px;
    min-width: 44px;
  }

  /* Prevent zoom on input focus */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  textarea {
    font-size: 16px !important;
  }
}

@media (max-width: 480px) {
  .contact-method {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .contact-icon {
    margin-right: 0;
    margin-bottom: 15px;
  }

  .contact-details h3 {
    margin-bottom: 5px;
  }

  .buttons a {
    padding: 10px 18px;
    font-size: 14px;
  }
}

/* --- Section Entrance Animation --- */
section,
.glass-box,
.project-card,
.philosophy-card,
.skill-item {
  opacity: 0;
  transform: translateY(40px) scale(0.98);
  transition: all 0.7s cubic-bezier(.16, 1, .3, 1);
}

section.visible,
.glass-box.visible,
.project-card.visible,
.philosophy-card.visible,
.skill-item.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* --- Button Glow & Ripple --- */
.resume-btn,
.hire-btn,
.submit-btn {
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: box-shadow 0.3s, background 0.3s;
  border-radius: 2rem;
}

/* Reduce neon/glow spread for main action buttons */
.resume-btn,
.hire-btn,
.submit-btn {
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.18), 0 0 8px 2px var(--primary);
}

.resume-btn:hover,
.hire-btn:hover,
.submit-btn:hover {
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.22), 0 0 12px 2px var(--primary);
  border-radius: 2rem;
}

.resume-btn::after,
.hire-btn::after,
.submit-btn::after {
  width: 120%;
  height: 120%;
  opacity: 0.10;
}

.resume-btn:active::after,
.hire-btn:active::after,
.submit-btn:active::after {
  opacity: 0.5;
  transform: scale(1.2);
}

/* --- Skill Icon Float --- */
.skill-icon {
  animation: floatIcon 3s ease-in-out infinite;
  transition: transform 0.3s, box-shadow 0.3s;
}

@keyframes floatIcon {
  0% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }

  100% {
    transform: translateY(0);
  }
}

.skill-item:hover .skill-icon {
  transform: scale(1.15) rotate(-6deg);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.18);
}

/* --- Project Card Tilt --- */
.project-card {
  transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
  transform: perspective(600px) rotateY(8deg) scale(1.03);
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.18);
}

/* --- Social Icon Bounce --- */
.social-icon {
  transition: transform 0.3s, box-shadow 0.3s;
}

.social-icon:hover {
  transform: scale(1.2) translateY(-5px);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.18);
}

/* --- Heading Gradient & Underline --- */
.section-title {
  background: linear-gradient(90deg, #3B82F6, #8B5CF6, #10B981);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-fill-color: transparent;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  display: block;
  width: 100%;
  height: 4px;
  margin: 0.5rem auto 0 auto;
  background: linear-gradient(90deg, #3B82F6, #8B5CF6, #10B981);
  border-radius: 2px;
  animation: underlineGrow 1s cubic-bezier(.16, 1, .3, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
}

.section-title::before {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
  border-radius: 2px;
  animation: waterFlow 2.5s ease-in-out infinite;
  z-index: 1;
}

@keyframes waterFlow {
  0% {
    width: 0;
    opacity: 0;
    transform: translateY(0);
  }

  20% {
    width: 100%;
    opacity: 1;
    transform: translateY(0);
  }

  80% {
    width: 100%;
    opacity: 1;
    transform: translateY(0);
  }

  100% {
    width: 0;
    opacity: 0;
    transform: translateY(0);
  }
}

.section-title.visible::after {
  animation: underlineGrow 1s cubic-bezier(.16, 1, .3, 1), waterRipple 3s ease-in-out infinite;
}

@keyframes waterRipple {
  0% {
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
    transform: scale(1);
  }

  50% {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.6), 0 0 30px rgba(139, 92, 246, 0.3);
    transform: scale(1.05);
  }

  100% {
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
    transform: scale(1);
  }
}

/* Dark mode watery effects */
.dark-mode .section-title::after {
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.6);
}

.dark-mode .section-title::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

.dark-mode .section-title.visible::after {
  animation: underlineGrow 1s cubic-bezier(.16, 1, .3, 1), waterRippleDark 3s ease-in-out infinite;
}

@keyframes waterRippleDark {
  0% {
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.6);
    transform: scale(1);
  }

  50% {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.8), 0 0 30px rgba(139, 92, 246, 0.5);
    transform: scale(1.05);
  }

  100% {
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.6);
    transform: scale(1);
  }
}

@keyframes underlineGrow {
  0% {
    width: 0;
    opacity: 0;
  }

  100% {
    width: 100%;
    opacity: 1;
  }
}

/* --- Staggered Animation for Child Elements --- */
.skills-container .skill-item {
  transition-delay: 0.1s;
}

.skills-container .skill-item:nth-child(2) {
  transition-delay: 0.2s;
}

.skills-container .skill-item:nth-child(3) {
  transition-delay: 0.3s;
}

.skills-container .skill-item:nth-child(4) {
  transition-delay: 0.4s;
}

.skills-container .skill-item:nth-child(5) {
  transition-delay: 0.5s;
}

.skills-container .skill-item:nth-child(6) {
  transition-delay: 0.6s;
}

.skills-container .skill-item:nth-child(7) {
  transition-delay: 0.7s;
}

.skills-container .skill-item:nth-child(8) {
  transition-delay: 0.8s;
}

.project-grid .project-card {
  transition-delay: 0.1s;
}

.project-grid .project-card:nth-child(2) {
  transition-delay: 0.2s;
}

.project-grid .project-card:nth-child(3) {
  transition-delay: 0.3s;
}

.philosophy-grid .philosophy-card {
  transition-delay: 0.1s;
}

.philosophy-grid .philosophy-card:nth-child(2) {
  transition-delay: 0.2s;
}

.philosophy-grid .philosophy-card:nth-child(3) {
  transition-delay: 0.3s;
}

/* --- Animate Glass Boxes --- */
.glass-box {
  transition: all 0.7s cubic-bezier(.16, 1, .3, 1);
}

/* --- Animated Explore Button in Project Card --- */
.project-card .view-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  background: linear-gradient(90deg, #3B82F6 60%, #8B5CF6 100%);
  color: #fff;
  border: none;
  border-radius: 2rem;
  font-weight: 600;
  font-size: 1rem;
  box-shadow: 0 2px 12px rgba(59, 130, 246, 0.12);
  cursor: pointer;
  overflow: hidden;
  z-index: 1;
  transition: transform 0.2s, box-shadow 0.3s, background 0.3s;
}

.project-card .view-button::before {
  content: '';
  position: absolute;
  left: -75%;
  top: 0;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.1) 100%);
  transform: skewX(-20deg);
  transition: left 0.5s cubic-bezier(.16, 1, .3, 1);
  z-index: 2;
  pointer-events: none;
}

.project-card .view-button:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 4px 24px #3B82F6aa, 0 0 32px #8B5CF655;
  background: linear-gradient(90deg, #8B5CF6 0%, #3B82F6 100%);
}

.project-card .view-button:hover::before {
  left: 120%;
}

.project-card .view-button span {
  position: relative;
  z-index: 3;
  transition: color 0.2s;
}

.project-card .view-button i {
  position: relative;
  z-index: 3;
  transition: transform 0.3s;
}

.project-card .view-button:hover i {
  transform: translateX(4px) scale(1.2) rotate(12deg);
}

.project-card .view-button,
.project-card .view-button:hover,
.project-card .view-button:focus {
  color: #fff !important;
}

.project-card .view-button span,
.project-card .view-button:hover span {
  color: #fff !important;
}

/* Ensure your toggle button and icons have these classes/IDs */
#theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.6rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  outline: none;
  transition: color 0.4s;
}

.toggle-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  position: relative;
}

.theme-icon {
  transition: transform 0.6s cubic-bezier(.4, 0, .2, 1), opacity 0.4s, color 0.4s;
  filter: drop-shadow(0 0 4px var(--primary));
  opacity: 1;
}

.theme-icon[style*="display:none"] {
  opacity: 0;
}

/* Rolling animation for both icons */
#theme-toggle.toggling .theme-icon {
  animation: roll-spin 0.6s cubic-bezier(.4, 0, .2, 1);
}

@keyframes roll-spin {
  0% {
    transform: rotate(0deg) scale(1);
    filter: drop-shadow(0 0 4px var(--primary));
  }

  60% {
    transform: rotate(360deg) scale(1.3);
    filter: drop-shadow(0 0 16px var(--accent));
  }

  100% {
    transform: rotate(360deg) scale(1);
    filter: drop-shadow(0 0 4px var(--primary));
  }
}

.nav-underline-flow {
  position: absolute;
  left: 0;
  bottom: -4px;
  height: 6px;
  width: 0;
  background: linear-gradient(90deg, var(--primary), var(--secondary)), #ff0;
  border-radius: 3px;
  box-shadow: 0 0 16px 2px var(--primary), 0 0 8px 0 var(--secondary);
  opacity: 0.95;
  pointer-events: none;
  transition: left 0.35s cubic-bezier(.4, 0, .2, 1), width 0.35s cubic-bezier(.4, 0, .2, 1), background 0.4s, box-shadow 0.4s;
  z-index: 10;
}

.nav-links {
  position: relative;
  /* Ensure the underline is positioned correctly */
}

.section-header h2 span {
  opacity: 0;
  display: inline-block;
  transform: translateY(16px);
  transition: opacity 0.18s cubic-bezier(.4, 0, .2, 1), transform 0.3s cubic-bezier(.4, 0, .2, 1);
}

.section-header h2 span.revealed {
  opacity: 1;
  transform: none;
}

#philosophy {
  background: linear-gradient(120deg, rgba(59, 130, 246, 0.04) 0%, rgba(139, 92, 246, 0.04) 100%);
  padding: 80px 0 60px 0;
}

.philosophy-enhanced {
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.10);
  border-radius: 2rem;
  padding: 48px 32px 36px 32px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
}

.philosophy-subtitle {
  text-align: center;
  font-size: 1.15rem;
  color: var(--muted);
  margin-bottom: 36px;
  font-style: italic;
}

.philosophy-subtitle span {
  color: var(--primary);
  font-style: normal;
  font-weight: 600;
}

/* Projects Enhanced Section */
.projects-enhanced {
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.10);
  border-radius: 2rem;
  padding: 48px 32px 36px 32px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
}

.projects-subtitle {
  text-align: center;
  font-size: 1.15rem;
  color: var(--muted);
  margin-bottom: 36px;
  font-style: italic;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.philosophy-grid {
  display: flex;
  gap: 32px;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
}

.philosophy-card {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 1.5rem;
  box-shadow: 0 4px 24px rgba(59, 130, 246, 0.08);
  padding: 32px 24px 28px 24px;
  flex: 1 1 260px;
  min-width: 240px;
  max-width: 340px;
  text-align: center;
  transition: transform 0.4s cubic-bezier(.4, 0, .2, 1), box-shadow 0.4s;
  position: relative;
  opacity: 0;
  transform: translateY(40px) scale(0.98);
  animation: philosophyFadeIn 1s forwards;
}

.philosophy-card:nth-child(1) {
  animation-delay: 0.1s;
}

.philosophy-card:nth-child(2) {
  animation-delay: 0.3s;
}

.philosophy-card:nth-child(3) {
  animation-delay: 0.5s;
}

@keyframes philosophyFadeIn {
  to {
    opacity: 1;
    transform: none;
  }
}

.philosophy-card:hover {
  transform: translateY(-8px) scale(1.04);
  box-shadow: 0 12px 36px rgba(59, 130, 246, 0.16);
}

.philosophy-icon {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 18px;
  animation: philosophyIconFloat 2.5s ease-in-out infinite alternate;
}

@keyframes philosophyIconFloat {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(-10px);
  }
}

.philosophy-card h3 {
  font-size: 1.25rem;
  color: var(--primary);
  margin-bottom: 12px;
  font-weight: 700;
}

.philosophy-card p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.philosophy-card .highlight {
  color: var(--accent);
  font-weight: 600;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Remove SVG background styles */
.philosophy-bg-svg {
  display: none !important;
}

/* Revert philosophy card hover and icon glow to simpler state */
.philosophy-card {
  border: none;
  box-shadow: 0 4px 24px rgba(59, 130, 246, 0.08);
  background: rgba(255, 255, 255, 0.85);
  transition: transform 0.5s cubic-bezier(.22, .61, .36, 1), box-shadow 0.5s cubic-bezier(.22, .61, .36, 1), background 0.3s;
}

.philosophy-card:hover {
  border: none;
  box-shadow: 0 12px 36px rgba(59, 130, 246, 0.16), 0 2px 16px 0 rgba(139, 92, 246, 0.10);
  background: rgba(255, 255, 255, 0.97);
  transform: translateY(-8px) scale(1.035);
}

.philosophy-icon {
  filter: none;
  transition: none;
}

.philosophy-card:hover .philosophy-icon {
  filter: none;
}

.philosophy-card {
  animation: float 4s ease-in-out infinite;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  transform: translateZ(0);
  will-change: transform;
}

.philosophy-card:hover {
  animation: none;
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15) !important;
}

.philosophy-icon {
  animation: floatIcon 4s ease-in-out infinite;
  transition: color 0.3s, transform 0.3s;
}

.philosophy-card:hover .philosophy-icon {
  animation: none;
  transform: scale(1.08);
  color: var(--secondary);
}

@keyframes floatIcon {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

@media (max-width: 900px) {
  .philosophy-grid {
    flex-direction: column;
    gap: 24px;
    align-items: center;
  }

  .philosophy-card {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
  }

  .philosophy-bg-svg {
    width: 98vw;
    top: 10px;
  }

  /* Project cards tablet/mobile centering */
  .project-grid {
    justify-items: center;
    grid-template-columns: 1fr;
    max-width: 450px;
    margin: 0 auto;
  }

  .project-card {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
  }
}

/* Enhanced Contact Section Styles */
.contact-enhanced {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(16px);
  border-radius: 2rem;
  padding: 48px 32px;
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.10);
}

.contact-subtitle {
  text-align: center;
  font-size: 1.15rem;
  color: var(--text-light);
  margin-bottom: 40px;
  font-weight: 400;
}

.contact-split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

/* Contact Info Section */
.contact-info-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 1.5rem;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.3s cubic-bezier(.4, 0, .2, 1);
  border: 2px solid transparent;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.08);
}

.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(59, 130, 246, 0.15);
  border-color: var(--primary);
}

.contact-icon-wrapper {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.4rem;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.contact-card:hover .contact-icon-wrapper {
  transform: scale(1.1) rotate(5deg);
}

.contact-details h3 {
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 4px;
  font-weight: 600;
}

.contact-details a,
.contact-details p {
  color: var(--text-light);
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.3s ease;
}

.contact-details a:hover {
  color: var(--primary);
}

/* Social Section */
.social-section h3 {
  font-size: 1.2rem;
  color: var(--text);
  margin-bottom: 16px;
  font-weight: 600;
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.social-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 1rem;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.3s cubic-bezier(.4, 0, .2, 1);
  border: 2px solid transparent;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.08);
}

.social-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
  border-color: var(--primary);
}

.social-card i {
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.social-card:hover i {
  transform: scale(1.2);
}

.social-card span {
  font-size: 0.9rem;
  font-weight: 500;
}

/* Social Brand Colors */
.social-card[href*="linkedin"]:hover {
  border-color: #0A66C2;
  color: #0A66C2;
}

.social-card[href*="dribbble"]:hover {
  border-color: #EA4C89;
  color: #EA4C89;
}

.social-card[href*="github"]:hover {
  border-color: #181717;
  color: #181717;
}

.social-card[href*="behance"]:hover {
  border-color: #1769FF;
  color: #1769FF;
}

/* Contact Form Section */
.contact-form-section {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 1.5rem;
  padding: 32px;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.08);
}

.modern-contact-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-group {
  position: relative;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 16px 0 8px 0;
  border: none;
  background: transparent;
  font-size: 1rem;
  color: var(--text);
  outline: none;
  resize: vertical;
}

.form-group label {
  position: absolute;
  left: 0;
  top: 16px;
  color: var(--text-light);
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(.4, 0, .2, 1);
  pointer-events: none;
  background: transparent;
}

.form-group input:focus+label,
.form-group input:not(:placeholder-shown)+label,
.form-group textarea:focus+label,
.form-group textarea:not(:placeholder-shown)+label {
  top: 0;
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
}

.form-line {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: #e5e7eb;
  transition: all 0.3s cubic-bezier(.4, 0, .2, 1);
}

.form-group input:focus~.form-line,
.form-group textarea:focus~.form-line {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  height: 3px;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.submit-btn-enhanced {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border: none;
  border-radius: 1rem;
  padding: 16px 32px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(.4, 0, .2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.submit-btn-enhanced:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}

.submit-btn-enhanced i {
  transition: all 0.4s cubic-bezier(.4, 0, .2, 1);
  position: relative;
  z-index: 1;
}

.submit-btn-enhanced:hover i {
  transform: translateX(6px) rotate(15deg);
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.5));
}

.submit-btn-enhanced span {
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
}

.submit-btn-enhanced:hover span {
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

/* Particle Effect Around Form */
.contact-form-section::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background: linear-gradient(45deg, transparent 30%, rgba(59, 130, 246, 0.1) 50%, transparent 70%);
  border-radius: 1.5rem;
  z-index: -1;
  animation: particleGlow 4s ease-in-out infinite;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.contact-form-section:hover::before {
  opacity: 1;
}

@keyframes particleGlow {

  0%,
  100% {
    transform: rotate(0deg);
  }

  50% {
    transform: rotate(180deg);
  }
}

/* Enhanced Error States */
.form-group.error {
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-5px);
  }

  75% {
    transform: translateX(5px);
  }
}

.form-group.error .form-line {
  background: linear-gradient(90deg, #ef4444, #dc2626) !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.4) !important;
  animation: errorPulse 1s ease-in-out;
}

@keyframes errorPulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

/* Success Animation for Form */
.form-group.success .form-line {
  background: linear-gradient(90deg, #10b981, #059669) !important;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4) !important;
}

/* Loading State for Submit Button */
.submit-btn-enhanced.loading {
  background: linear-gradient(135deg, #6b7280, #4b5563);
  cursor: not-allowed;
}

.submit-btn-enhanced.loading i {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* Dark Mode Enhancements */
.dark-mode .contact-enhanced {
  background: rgba(30, 41, 59, 0.8);
}

.dark-mode .contact-card,
.dark-mode .social-card,
.dark-mode .contact-form-section {
  background: rgba(30, 41, 59, 0.9);
  color: var(--text);
}

.dark-mode .contact-card:hover,
.dark-mode .social-card:hover {
  background: rgba(30, 41, 59, 1);
}

.dark-mode .form-line {
  background: #374151;
}

.dark-mode .form-group input:focus~.form-line,
.dark-mode .form-group textarea:focus~.form-line {
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.5), 0 0 8px rgba(139, 92, 246, 0.4);
}

/* Dark mode for projects section */
.dark-mode .projects-enhanced {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

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

/* Responsive Design */
@media (max-width: 992px) {
  .contact-split-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .social-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .contact-enhanced {
    padding: 32px 20px;
  }

  .contact-card {
    padding: 20px;
  }

  .contact-form-section {
    padding: 24px;
  }

  .social-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Fix mobile form input sizing */
  .form-group input,
  .form-group textarea {
    font-size: 16px;
    /* Prevents zoom on iOS */
    padding: 12px 16px;
  }

  /* Ensure form labels are properly positioned on mobile */
  .form-group label {
    font-size: 14px;
    top: 12px;
  }

  .form-group input:focus+label,
  .form-group textarea:focus+label,
  .form-group input:not(:placeholder-shown)+label,
  .form-group textarea:not(:placeholder-shown)+label {
    top: -8px;
    font-size: 12px;
  }

  /* Philosophy cards mobile centering */
  .philosophy-grid {
    align-items: center;
    justify-content: center;
  }

  .philosophy-card {
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
    text-align: center;
  }

  /* Project cards mobile centering */
  .project-grid {
    justify-items: center;
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  .project-card {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
  }

  /* Hide design system badge on mobile */
  .design-system-badge {
    display: none;
  }
}

@media (max-width: 480px) {
  .contact-card {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .contact-icon-wrapper {
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
  }

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

  /* Additional mobile fixes */
  .contact-enhanced {
    padding: 24px 16px;
  }

  .contact-form-section {
    padding: 20px 16px;
  }

  .submit-btn-enhanced {
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
  }

  /* Fix button spacing on mobile */
  .buttons {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .buttons a {
    width: 100%;
    max-width: 280px;
    text-align: center;
  }

  /* Philosophy cards extra small mobile centering */
  .philosophy-card {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    text-align: center;
  }

  /* Project cards extra small mobile centering */
  .project-grid {
    max-width: 350px;
    margin: 0 auto;
  }

  .project-card {
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
  }
}

/* --- About Me Enhanced Section --- */
.about-enhanced {
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.10);
  border-radius: 2rem;
  padding: 48px 32px 36px 32px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
  margin-bottom: 40px;
}

.about-subtitle {
  text-align: center;
  font-size: 1.15rem;
  color: var(--muted);
  margin-bottom: 36px;
  font-style: italic;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.about-split-layout {
  display: flex;
  gap: 48px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}

.about-profile-section {
  flex: 1 1 320px;
  min-width: 280px;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  animation: fadeInLeft 1.2s cubic-bezier(.4, 0, .2, 1) both;
}

.profile-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 1.5rem;
  box-shadow: 0 4px 24px rgba(59, 130, 246, 0.08);
  padding: 32px 24px 28px 24px;
  text-align: center;
  position: relative;
  margin-bottom: 18px;
  animation: floatCard 4s ease-in-out infinite;
}

.profile-avatar {
  position: relative;
  width: 110px;
  height: 110px;
  margin: 0 auto 18px auto;
  border-radius: 50%;
  overflow: visible;
  z-index: 1;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 24px rgba(59, 130, 246, 0.12);
  position: relative;
  z-index: 2;
}

.avatar-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
  filter: blur(12px);
  opacity: 0.35;
  transform: translate(-50%, -50%) scale(1.1);
  z-index: 1;
  animation: avatarGlowPulse 2.5s infinite alternate;
}

@keyframes avatarGlowPulse {
  0% {
    opacity: 0.25;
    transform: translate(-50%, -50%) scale(1.05);
  }

  100% {
    opacity: 0.45;
    transform: translate(-50%, -50%) scale(1.18);
  }
}

.profile-info h3 {
  font-size: 1.3rem;
  color: var(--primary);
  margin-bottom: 4px;
  font-weight: 700;
}

.profile-title {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 18px;
}

.profile-stats {
  display: flex;
  gap: 18px;
  justify-content: center;
  margin-top: 10px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 70px;
}

.stat-number {
  font-size: 1.25rem;
  color: var(--primary);
  font-weight: 700;
}

.stat-label {
  font-size: 0.92rem;
  color: var(--muted);
}

.expertise-cards {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 10px;
}

.expertise-card {
  background: rgba(246, 246, 255, 0.85);
  border-radius: 1rem;
  box-shadow: 0 2px 12px rgba(59, 130, 246, 0.07);
  padding: 18px 14px 12px 14px;
  text-align: center;
  min-width: 90px;
  max-width: 120px;
  flex: 1 1 90px;
  transition: transform 0.4s, box-shadow 0.4s;
  animation: fadeInUp 1.1s both;
}

.expertise-card:not(:first-child) {
  animation-delay: 0.2s;
}

.expertise-card:not(:first-child):not(:last-child) {
  animation-delay: 0.4s;
}

.expertise-icon {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 8px;
  animation: floatIcon 3s ease-in-out infinite alternate;
}

.expertise-card:hover {
  transform: translateY(-6px) scale(1.05);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.13);
}

.about-story-section {
  flex: 2 1 420px;
  min-width: 320px;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  animation: fadeInRight 1.2s cubic-bezier(.4, 0, .2, 1) both;
}

.story-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.story-paragraph {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s forwards;
}

.story-paragraph:nth-child(1) {
  animation-delay: 0.2s;
}

.story-paragraph:nth-child(2) {
  animation-delay: 0.5s;
}

.story-paragraph:nth-child(3) {
  animation-delay: 0.8s;
}

.paragraph-icon {
  font-size: 1.3rem;
  color: var(--accent);
  margin-top: 4px;
  min-width: 28px;
}

.paragraph-text h4 {
  font-size: 1.08rem;
  color: var(--primary);
  margin-bottom: 4px;
  font-weight: 700;
}

.paragraph-text p {
  color: var(--muted);
  font-size: 1.01rem;
  line-height: 1.7;
}

.journey-timeline {
  margin-top: 32px;
}

.journey-timeline h4 {
  color: var(--primary);
  font-size: 1.1rem;
  margin-bottom: 12px;
  font-weight: 700;
}

.journey-timeline .timeline {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-left: 12px;
  position: relative;
}

.journey-timeline .timeline:before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--primary), var(--secondary));
  border-radius: 2px;
  opacity: 0.18;
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  position: relative;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s forwards;
}

.timeline-item:nth-child(1) {
  animation-delay: 1.1s;
}

.timeline-item:nth-child(2) {
  animation-delay: 1.3s;
}

.timeline-item:nth-child(3) {
  animation-delay: 1.5s;
}

.timeline-dot {
  width: 16px;
  height: 16px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 50%;
  box-shadow: 0 0 8px var(--primary), 0 0 2px var(--secondary);
  margin-top: 4px;
  flex-shrink: 0;
  border: 2px solid #fff;
  z-index: 2;
}

.timeline-content {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 1rem;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.07);
  padding: 12px 18px 8px 18px;
  min-width: 160px;
  max-width: 260px;
  font-size: 0.98rem;
  color: var(--text);
  position: relative;
}

.timeline-content h5 {
  color: var(--primary);
  font-size: 1.01rem;
  margin-bottom: 2px;
  font-weight: 700;
}

.timeline-content p {
  color: var(--muted);
  font-size: 0.97rem;
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

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

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes floatCard {
  0% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-10px) scale(1.03);
  }

  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes floatIcon {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(-8px);
  }
}

/* Responsive Design */
@media (max-width: 1100px) {
  .about-split-layout {
    flex-direction: column;
    gap: 32px;
  }

  .about-profile-section,
  .about-story-section {
    max-width: 100%;
  }
}

@media (max-width: 700px) {
  .about-enhanced {
    padding: 28px 8px 18px 8px;
  }

  .about-split-layout {
    flex-direction: column;
    gap: 18px;
  }

  .profile-card,
  .expertise-cards,
  .about-story-section,
  .story-content,
  .journey-timeline .timeline,
  .timeline-content {
    max-width: 100%;
  }

  .profile-avatar {
    width: 80px;
    height: 80px;
  }

  .avatar-glow {
    width: 90px;
    height: 90px;
  }
}

/* Dark Mode for About Me */
.dark-mode .about-enhanced {
  background: rgba(30, 41, 59, 0.85);
}

.dark-mode .profile-card,
.dark-mode .timeline-content {
  background: rgba(30, 41, 59, 0.95);
  color: var(--text);
}

.dark-mode .expertise-card {
  background: rgba(51, 65, 85, 0.85);
}

.dark-mode .timeline-content h5,
.dark-mode .profile-info h3,
.dark-mode .journey-timeline h4 {
  color: var(--primary);
}

.dark-mode .about-subtitle,
.dark-mode .profile-title,
.dark-mode .stat-label,
.dark-mode .paragraph-text p,
.dark-mode .timeline-content p {
  color: var(--muted);
}

/* --- About Me Reset Minimal --- */
.about-reset {
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 24px rgba(59, 130, 246, 0.08);
  border-radius: 1.5rem;
  padding: 48px 32px 36px 32px;
  max-width: 700px;
  margin: 0 auto 40px auto;
  text-align: center;
  backdrop-filter: blur(8px);
}

.about-reset .about-subtitle {
  font-size: 1.15rem;
  color: var(--muted);
  margin-bottom: 28px;
  font-style: italic;
}

.about-reset p {
  font-size: 1.08rem;
  color: var(--text);
  margin-bottom: 18px;
  line-height: 1.7;
}

.about-reset .highlight {
  color: var(--primary);
  font-weight: 600;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1.1s 0.2s forwards;
}

@media (max-width: 700px) {
  .about-reset {
    padding: 24px 8px 18px 8px;
  }
}

.dark-mode .about-reset {
  background: rgba(30, 41, 59, 0.92);
}

.dark-mode .about-reset .about-subtitle,
.dark-mode .about-reset p {
  color: var(--muted);
}

.dark-mode .about-reset .highlight {
  color: var(--primary);
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --- Enhanced Footer Styles --- */
.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 40px;
  margin-bottom: 0;
  min-height: 180px;
}

.footer-section {
  flex: 1;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 18px;
  border: none;
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
}

.footer-section h3 {
  color: var(--primary);
  font-size: 1.5rem;
  margin-bottom: 8px;
  font-weight: 800;
  letter-spacing: 1px;
}

.footer-section h4 {
  color: var(--primary);
  font-size: 1.15rem;
  margin-bottom: 8px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.footer-section p {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 10px;
  font-size: 1.08rem;
}

.footer-social {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 8px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(59, 178, 214, 0.13), rgba(246, 114, 128, 0.13));
  color: var(--primary);
  font-size: 1.3rem;
  transition: all 0.3s, box-shadow 0.3s;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(59, 178, 214, 0.10);
  border: 1.5px solid transparent;
}

.footer-social a:hover {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: 0 0 16px 2px var(--primary), 0 2px 12px rgba(59, 178, 214, 0.18);
  border: 1.5px solid var(--primary);
  transform: scale(1.12) rotate(-8deg);
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.footer-section ul li {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
}

.footer-section ul li i {
  margin-right: 8px;
  color: var(--primary);
  width: 16px;
}

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

.footer-section ul li a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.footer-resume-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  font-size: 1.05rem;
  transition: color 0.3s;
}

.footer-resume-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1.5px solid rgba(59, 178, 214, 0.18);
  padding-top: 18px;
  text-align: center;
  margin-top: 0;
  font-size: 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-bottom p {
  margin: 0;
  color: var(--muted);
  font-weight: 500;
}

.footer-back-to-top {
  display: inline-block;
  margin-top: 6px;
  color: var(--primary);
  font-size: 1rem;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

.footer-back-to-top:hover {
  color: var(--accent);
  text-decoration: underline;
}

@media (max-width: 900px) {
  .footer-content {
    flex-direction: column !important;
    gap: 24px !important;
  }

  .footer-section {
    min-width: 0 !important;
    width: 100% !important;
    align-items: center !important;
  }
}

/* --- Custom Cursor Styles --- */
.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: normal;
}

.cursor-dot,
.cursor-ring {
  position: fixed;
  pointer-events: none;
  z-index: 99999;
  transition: transform 0.13s cubic-bezier(.4, 0, .2, 1), opacity 0.2s, background 0.2s, border-color 0.2s;
}

.cursor-dot {
  width: 7px;
  height: 7px;
  background: #111;
  border-radius: 50%;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 4px 1px rgba(0, 0, 0, 0.10);
}

.cursor-ring {
  width: 32px;
  height: 32px;
  border: 1.5px solid #111;
  border-radius: 50%;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  background: transparent;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.dark-mode .cursor-dot {
  background: #fff;
  box-shadow: 0 0 8px 2px rgba(255, 255, 255, 0.18);
}

.dark-mode .cursor-ring {
  border-color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

@media (pointer: coarse),
(max-width: 700px) {
  .custom-cursor {
    display: none !important;
  }
}

/* Remove previous shine effect for .footer-quote */
.footer-quote::after {
  display: none !important;
}

/* Add watery effect to .footer-quote */
.footer-quote {
  position: relative;
  font-weight: 500;
  background: linear-gradient(90deg, #3B82F6, #38bdf8 30%, #818cf8 60%, #a21caf 90%, #3B82F6);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: waterRippleFooter 4s linear infinite;
  text-shadow:
    0 1px 6px rgba(59, 130, 246, 0.18),
    0 2px 12px rgba(129, 140, 248, 0.12);
}

@keyframes waterRippleFooter {
  0% {
    background-position: 300% 0;
  }

  100% {
    background-position: 0 0;
  }
}

/* Hardware Acceleration for Heavy Animations */
.glass-box {
  transform: translateZ(0);
  will-change: transform;
}

/* Contact Form Animations & Styles (Moved from script.js) */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

@keyframes successPulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.02);
  }

  100% {
    transform: scale(1);
  }
}

.form-group.error .form-line {
  background: linear-gradient(90deg, #ef4444, #dc2626) !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.4) !important;
  animation: errorPulse 1s ease-in-out;
}

.form-group.error input,
.form-group.error textarea {
  color: #ef4444;
}

.form-group.success .form-line {
  background: linear-gradient(90deg, #10b981, #059669) !important;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4) !important;
}

/* Reduced Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {

  *,
  ::before,
  ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}