* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

:root {
  /* Color Palette */
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --success-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);

  --bg-primary: #0a0e27;
  --bg-secondary: #1a1d35;
  --bg-tertiary: #252946;
  --bg-card: rgba(255, 255, 255, 0.05);

  --text-primary: #ffffff;
  --text-secondary: #b8b9c4;
  --text-muted: #6c6d7e;

  --accent-purple: #667eea;
  --accent-pink: #f5576c;
  --accent-blue: #4facfe;
  --accent-cyan: #00f2fe;

  /* Profile page specific colors */
  --accent-color: #ffb74d;
  --accent-secondary: #ff6b9d;
  --card-bg: rgba(27, 27, 27, 0.95);
  --shadow-color: rgba(0, 0, 0, 0.3);

  /* Shadows & Effects */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 16px 64px rgba(0, 0, 0, 0.4);

  --glow-purple: 0 0 30px rgba(102, 126, 234, 0.5);
  --glow-pink: 0 0 30px rgba(245, 87, 108, 0.5);
  --glow-blue: 0 0 30px rgba(79, 172, 254, 0.5);

  /* Spacing */
  --container-width: 1200px;
  --section-padding: 100px 0;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  /* Prevent text size adjustment on orientation change */
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  /* Enable smooth scrolling on iOS */
  -webkit-overflow-scrolling: touch;
}

/* ANIMATED BACKGROUND */

.background-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  background: linear-gradient(135deg, #0a0e27 0%, #1a1d35 50%, #252946 100%);
}

.bubble {
  position: absolute;
  bottom: -100px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(102, 126, 234, 0.3),
    rgba(102, 126, 234, 0.05)
  );
  animation: rise 15s infinite ease-in;
  opacity: 0;
}

.bubble:nth-child(1) {
  width: 80px;
  height: 80px;
  left: 10%;
  animation-delay: 0s;
  animation-duration: 12s;
}

.bubble:nth-child(2) {
  width: 120px;
  height: 120px;
  left: 25%;
  animation-delay: 2s;
  animation-duration: 15s;
}

.bubble:nth-child(3) {
  width: 60px;
  height: 60px;
  left: 50%;
  animation-delay: 4s;
  animation-duration: 18s;
}

.bubble:nth-child(4) {
  width: 100px;
  height: 100px;
  left: 70%;
  animation-delay: 1s;
  animation-duration: 14s;
}

.bubble:nth-child(5) {
  width: 90px;
  height: 90px;
  left: 85%;
  animation-delay: 3s;
  animation-duration: 16s;
}

.bubble:nth-child(6) {
  width: 110px;
  height: 110px;
  left: 40%;
  animation-delay: 5s;
  animation-duration: 13s;
}

@keyframes rise {
  0% {
    bottom: -100px;
    opacity: 0;
    transform: translateX(0) scale(1);
  }
  10% {
    opacity: 0.6;
  }
  50% {
    opacity: 0.4;
    transform: translateX(100px) scale(1.2);
  }
  100% {
    bottom: 110vh;
    opacity: 0;
    transform: translateX(-100px) scale(0.8);
  }
}

/* HEADER & NAVIGATION */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background: rgba(10, 14, 39, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1000;
  transition: all var(--transition-normal);
}

.header.scrolled {
  height: 70px;
  box-shadow: var(--shadow-lg);
}

.main-nav {
  max-width: var(--container-width);
  margin: 0 auto;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 700;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: transform var(--transition-normal);
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.logo:hover {
  transform: scale(1.05);
}

.logo i {
  font-size: 28px;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: rotate 3s linear infinite;
}

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

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 8px;
}

.main-nav a {
  text-decoration: none;
  color: var(--text-secondary);
  padding: 10px 24px;
  border-radius: 12px;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.5px;
  position: relative;
  transition: all var(--transition-normal);
  overflow: hidden;
}

.main-nav a::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary-gradient);
  opacity: 0;
  transition: opacity var(--transition-normal);
  z-index: -1;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--text-primary);
  transform: translateY(-2px);
}

.main-nav a:hover::before,
.main-nav a.active::before {
  opacity: 0.2;
}

/* Scroll Progress Bar */
.scroll-progress {
  position: fixed;
  top: 80px;
  left: 0;
  height: 3px;
  background: var(--primary-gradient);
  width: 0%;
  z-index: 1001;
  transition: width 0.1s ease;
  box-shadow: var(--glow-purple);
}

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

.hero::before {
  content: "";
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(102, 126, 234, 0.15),
    transparent 70%
  );
  top: -200px;
  right: -200px;
  animation: pulse 8s ease-in-out infinite;
}

.hero::after {
  content: "";
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(245, 87, 108, 0.1), transparent 70%);
  bottom: -150px;
  left: -150px;
  animation: pulse 10s ease-in-out infinite reverse;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.7;
  }
}

.hero-content {
  max-width: var(--container-width);
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  z-index: 1;
}

.hero-text {
  animation: fadeInLeft 1s ease-out;
}

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

.hero-title {
  font-size: 64px;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 24px;
  letter-spacing: -2px;
}

.gradient-text {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 3s ease infinite;
  background-size: 200% 200%;
}

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

.team-name {
  display: block;
  background: var(--secondary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 40px;
  line-height: 1.8;
}

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

.btn {
  padding: 16px 32px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: inherit;
  z-index: -1;
  transition: transform var(--transition-normal);
}

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

.btn-primary {
  background: var(--primary-gradient);
  color: white;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(102, 126, 234, 0.6);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-3px);
}

/* Hero Image */
.hero-image-container {
  position: relative;
  animation: fadeInRight 1s ease-out;
}

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

.image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 30px;
  overflow: hidden;
  animation: float 6s ease-in-out infinite;
}

/* Interactive Photo Enhancements */
#interactivePhotoWrapper {
  cursor: default;
}

#maskCanvas,
#hoverCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 30px;
}

#photoHint {
  animation: fadeIn 1s ease 2s both;
}

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

#hoverLabel {
  animation: slideUp 0.3s ease;
  pointer-events: none;
}

@keyframes slideUp {
  from {
    transform: translate(-50%, 10px);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

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

.team-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.image-wrapper:hover .team-photo {
  transform: scale(1.1);
}

.image-border {
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  background: var(--primary-gradient);
  border-radius: 32px;
  z-index: -1;
  animation: borderRotate 10s linear infinite;
}

@keyframes borderRotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.image-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80%;
  height: 80%;
  background: var(--primary-gradient);
  filter: blur(60px);
  opacity: 0.3;
  transform: translate(-50%, -50%);
  z-index: -2;
  animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {
  0%,
  100% {
    opacity: 0.3;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(1.1);
  }
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  animation: bounce 2s ease-in-out infinite;
}

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

.mouse {
  width: 28px;
  height: 45px;
  border: 2px solid var(--text-secondary);
  border-radius: 20px;
  position: relative;
}

.wheel {
  width: 4px;
  height: 10px;
  background: var(--text-secondary);
  border-radius: 2px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll 2s ease-in-out infinite;
}

@keyframes scroll {
  0% {
    top: 8px;
    opacity: 1;
  }
  100% {
    top: 25px;
    opacity: 0;
  }
}

/* SECTION STYLES */

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 40px;
}

.section-header {
  text-align: center;
  margin-bottom: 80px;
  animation: fadeInUp 0.8s ease-out;
}

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

.section-tag {
  display: inline-block;
  padding: 8px 24px;
  background: rgba(102, 126, 234, 0.1);
  border: 1px solid rgba(102, 126, 234, 0.3);
  border-radius: 50px;
  color: var(--accent-purple);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.section-title {
  font-size: 48px;
  font-weight: 800;
  margin-bottom: 16px;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.title-underline {
  width: 80px;
  height: 4px;
  background: var(--primary-gradient);
  margin: 0 auto;
  border-radius: 2px;
}

/* ABOUT GROUP SECTION */
.about-group {
  padding: var(--section-padding);
  position: relative;
}

.about-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
  margin-bottom: 80px;
}

.about-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 40px 32px;
  transition: all var(--transition-normal);
  animation: fadeInUp 0.8s ease-out backwards;
}

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

.about-card:nth-child(2) {
  animation-delay: 0.2s;
}

.about-card:nth-child(3) {
  animation-delay: 0.3s;
}

.about-card:hover {
  transform: translateY(-10px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(102, 126, 234, 0.5);
  box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3);
}

.card-icon {
  width: 70px;
  height: 70px;
  background: var(--primary-gradient);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-bottom: 24px;
  box-shadow: var(--glow-purple);
  transition: transform var(--transition-normal);
}

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

.about-card h3 {
  font-size: 24px;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.about-card p {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 15px;
}

/* Stats Container */
.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 48px 32px;
}

.stat-item {
  text-align: center;
  animation: fadeInUp 0.8s ease-out backwards;
}

.stat-item:nth-child(1) {
  animation-delay: 0.4s;
}

.stat-item:nth-child(2) {
  animation-delay: 0.5s;
}

.stat-item:nth-child(3) {
  animation-delay: 0.6s;
}

.stat-item:nth-child(4) {
  animation-delay: 0.7s;
}

.stat-number {
  font-size: 56px;
  font-weight: 800;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* MEMBERS SECTION */

.members-section {
  padding: var(--section-padding);
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(102, 126, 234, 0.05) 100%
  );
}

.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 40px;
}

/* 3D Flip Card */
.member-card {
  perspective: 1000px;
  height: 520px;
  animation: fadeInUp 0.8s ease-out backwards;
}

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

.member-card:nth-child(2) {
  animation-delay: 0.2s;
}

.member-card:nth-child(3) {
  animation-delay: 0.3s;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s;
  transform-style: preserve-3d;
  cursor: pointer;
}

.member-card:hover .card-inner {
  transform: rotateY(180deg);
}

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 24px;
  overflow: hidden;
}

.card-front {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
}

.card-back {
  background: var(--primary-gradient);
  transform: rotateY(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

/* Member Image */
.member-image-wrapper {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
}

.member-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

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

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(102, 126, 234, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0;
  transition: opacity var(--transition-normal);
  color: white;
  font-weight: 600;
  font-size: 16px;
}

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

.image-overlay i {
  font-size: 32px;
}

/* Member Info */
.member-info {
  padding: 32px 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.member-name {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.member-role,
.member-id {
  color: var(--text-secondary);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.member-role i,
.member-id i {
  color: var(--accent-purple);
}

.member-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.tag {
  padding: 6px 14px;
  background: rgba(102, 126, 234, 0.15);
  border: 1px solid rgba(102, 126, 234, 0.3);
  border-radius: 50px;
  font-size: 12px;
  color: var(--accent-purple);
  font-weight: 600;
}

/* Card Back */
.card-back-content {
  text-align: center;
  color: white;
}

.quote-icon {
  font-size: 48px;
  opacity: 0.3;
  margin-bottom: 24px;
}

.member-quote {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 32px;
  font-style: italic;
}

.profile-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: white;
  color: var(--accent-purple);
  text-decoration: none;
  border-radius: 12px;
  font-weight: 600;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-md);
}

.profile-link:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* FOOTER */

.footer {
  background: var(--bg-secondary);
  padding: 60px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

.footer-section h4 {
  font-size: 20px;
  margin-bottom: 20px;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-section p {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 14px;
}

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

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

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

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

.footer-bottom {
  padding: 24px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 14px;
}

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

.social-links a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: var(--text-secondary);
  transition: all var(--transition-normal);
}

.social-links a:hover {
  background: var(--primary-gradient);
  border-color: transparent;
  color: white;
  transform: translateY(-3px);
  box-shadow: var(--glow-purple);
}

/* BACK TO TOP BUTTON */

.back-to-top {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 50px;
  height: 50px;
  background: var(--primary-gradient);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-lg);
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: var(--glow-purple);
}

/* RESPONSIVE DESIGN */

@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 60px;
  }

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

  .hero-buttons {
    justify-content: center;
  }

  .hero-title {
    font-size: 52px;
  }

  .section-title {
    font-size: 40px;
  }
}

@media (max-width: 768px) {
  .main-nav {
    padding: 0 24px;
  }

  .main-nav ul {
    gap: 4px;
  }

  .main-nav a {
    padding: 8px 16px;
    font-size: 12px;
  }

  .hero {
    padding: 100px 24px 60px;
  }

  .hero-title {
    font-size: 40px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .container {
    padding: 0 24px;
  }

  .section-header {
    margin-bottom: 48px;
  }

  .section-title {
    font-size: 32px;
  }

  .members-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .back-to-top {
    bottom: 24px;
    right: 24px;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 20px;
  }

  .logo i {
    font-size: 24px;
  }

  .hero-title {
    font-size: 32px;
  }

  .btn {
    padding: 12px 24px;
    font-size: 14px;
  }

  .stat-number {
    font-size: 40px;
  }

  .member-card {
    height: 480px;
  }

  .member-image-wrapper {
    height: 250px;
  }
}

/* ANIMATIONS & TRANSITIONS */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Smooth Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-gradient);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-gradient);
}

/* Selection */
::selection {
  background: var(--accent-purple);
  color: white;
}

::-moz-selection {
  background: var(--accent-purple);
  color: white;
}

/* MUTE BUTTON FOR SOUND EFFECTS */

#muteToggle {
  position: fixed;
  bottom: 110px;
  right: 40px;
  width: 50px;
  height: 50px;
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 2px solid var(--accent-color);
  border-radius: 12px;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-lg);
  z-index: 999;
}

#muteToggle:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: var(--glow-purple);
  background: rgba(255, 255, 255, 0.1);
}

#muteToggle:active {
  transform: translateY(-1px) scale(1);
}

@media (max-width: 768px) {
  #muteToggle {
    bottom: 90px;
    right: 24px;
    width: 45px;
    height: 45px;
    font-size: 20px;
  }
}

/* PROFILE PAGE STYLES (from original styles.css) */

body {
  overflow-x: hidden;
}

.scroll-container {
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  background: linear-gradient(
    135deg,
    var(--bg-primary) 0%,
    var(--bg-secondary) 50%,
    var(--bg-tertiary) 100%
  );
  transition: background 0.5s ease;
  /* Enable smooth scrolling on iOS */
  -webkit-overflow-scrolling: touch;
}

.scroll-container::-webkit-scrollbar {
  display: none;
}

/* Enhanced Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  backdrop-filter: blur(20px);
  background: var(--card-bg);
  width: 100%;
  height: 60px;
  z-index: 1000;
  box-shadow: 0 4px 20px var(--shadow-color);
  transition: all 0.3s ease;
}

.main-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
  padding: 0 40px;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 10px;
}

.main-nav a {
  text-decoration: none;
  color: var(--text-primary);
  padding: 10px 25px;
  transition: all 0.3s ease;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  font-weight: 500;
}

.main-nav a::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.main-nav a:hover::before {
  width: 80%;
}

.main-nav a:hover {
  background: rgba(255, 183, 77, 0.1);
  transform: translateY(-2px);
}

/* Scroll Progress Indicator */
.scroll-progress {
  position: fixed;
  top: 60px;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--accent-color),
    var(--accent-secondary)
  );
  z-index: 1001;
  transition: width 0.1s ease;
}

/* Enhanced Hero Section */
.hero-section {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  min-height: 100vh;
  margin-top: 60px;
  background-color: transparent;
  scroll-snap-align: start;
  position: relative;
  overflow: hidden;
}

/* Animated Background Particles */
.hero-section::before,
.hero-section::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.4;
}

.hero-section::before {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--accent-color), transparent);
  top: 10%;
  left: 5%;
  animation: float 8s ease-in-out infinite;
}

.hero-section::after {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--accent-secondary), transparent);
  bottom: 20%;
  right: 10%;
  animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(50px, -50px) scale(1.1);
  }
}

/* Bio Content */
#bio-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  width: 50%;
  padding: 0 60px;
  color: var(--text-primary);
  animation: slideInLeft 1s ease-out;
}

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

.greeting-box {
  padding: 20px 30px;
  margin-bottom: 30px;
  border-radius: 15px;
  background: linear-gradient(
    135deg,
    var(--accent-color),
    var(--accent-secondary)
  );
  box-shadow: 0 10px 40px rgba(255, 183, 77, 0.3);
  transform-origin: left;
  animation: popIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

.main-greeting {
  font-size: 70px;
  font-weight: 900;
  color: white;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
  letter-spacing: 5px;
}

.self-intro {
  font-size: 32px;
  line-height: 1.5;
  animation: fadeInUp 1s ease-out 0.5s both;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

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

.cta-button {
  margin-top: 40px;
  padding: 15px 40px;
  font-size: 18px;
  font-weight: 600;
  color: white;
  background: linear-gradient(
    135deg,
    var(--accent-color),
    var(--accent-secondary)
  );
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(255, 107, 157, 0.4);
  transition: all 0.3s ease;
  animation: fadeInUp 1s ease-out 0.8s both;
}

.cta-button:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 15px 40px rgba(255, 107, 157, 0.6);
}

.cta-button:active {
  transform: translateY(-2px) scale(1.02);
}

/* Avatar Wrapper */
.avatar-wrapper--medium {
  width: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  animation: fadeIn 1.5s ease-out;
  /* Prevent unwanted touch actions */
  touch-action: pan-y pinch-zoom;
  -webkit-touch-callout: none;
}

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

/* Enhanced Avatar */
.avatar {
  position: relative;
  width: 350px;
  height: 400px;
  transition: transform 0.3s ease;
  animation: avatarEntrance 1.5s ease-out;
  cursor: pointer;
  /* Prevent text selection and improve touch */
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  /* Enable GPU acceleration for smooth animations */
  will-change: transform;
  /* Prevent tap highlight on mobile */
  -webkit-tap-highlight-color: transparent;
}

@keyframes avatarEntrance {
  0% {
    opacity: 0;
    transform: scale(0.5) rotateY(180deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotateY(0deg);
  }
}

.avatar:hover {
  transform: scale(1.05);
}

.avatar.clicked {
  animation: celebrate 0.6s ease;
}

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

/* Head with breathing */
.head {
  position: absolute;
  width: 220px;
  height: 280px;
  background: #f4c6a8;
  border-radius: 50% 50% 45% 45% / 60% 60% 40% 40%;
  top: 60px;
  left: 65px;
  border: 3px solid #d4a574;
  box-shadow: inset -10px 10px 20px rgba(0, 0, 0, 0.1);
  animation: breathe 4s ease-in-out infinite;
}

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

/* Hair */
.hair-main {
  position: absolute;
  width: 200px;
  height: 110px;
  background: #2c1810;
  border-radius: 50% 50% 0 0;
  top: 45px;
  left: 75px;
  z-index: 1;
  animation: hairSway 3s ease-in-out infinite;
}

@keyframes hairSway {
  0%,
  100% {
    transform: translateX(0) rotate(0deg);
  }
  50% {
    transform: translateX(3px) rotate(1deg);
  }
}

.hair-side-left {
  position: absolute;
  width: 50px;
  height: 80px;
  background: #2c1810;
  border-radius: 50% 0 0 50%;
  top: 90px;
  left: 55px;
  z-index: 1;
}

.hair-side-right {
  position: absolute;
  width: 50px;
  height: 80px;
  background: #2c1810;
  border-radius: 0 50% 50% 0;
  top: 90px;
  right: 55px;
  z-index: 1;
}

/* Neck & Collar */
.neck {
  position: absolute;
  width: 70px;
  height: 60px;
  background: #f4c6a8;
  top: 320px;
  left: 140px;
  border-radius: 0 0 10px 10px;
  border: 3px solid #d4a574;
  border-top: none;
}

.collar {
  position: absolute;
  width: 120px;
  height: 30px;
  background: #2c3e50;
  top: 360px;
  left: 115px;
  border-radius: 0 0 10px 10px;
  border: 3px solid #1a252f;
}

/* Eyebrows */
.eyebrow {
  position: absolute;
  width: 50px;
  height: 8px;
  background: #2c1810;
  border-radius: 50%;
  z-index: 2;
  transition: transform 0.3s ease;
}

.eyebrow.left {
  top: 145px;
  left: 100px;
  transform: rotate(-10deg);
}

.eyebrow.right {
  top: 145px;
  right: 100px;
  transform: rotate(10deg);
}

.avatar:hover .eyebrow {
  animation: eyebrowRaise 0.5s ease;
}

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

/* Eyes */
.eyes {
  position: absolute;
  width: 160px;
  height: 50px;
  top: 165px;
  left: 95px;
  display: flex;
  justify-content: space-between;
  z-index: 2;
}

.eye {
  position: relative;
  width: 55px;
  height: 45px;
  background: white;
  border-radius: 50%;
  border: 2px solid #333;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.eye.blinking {
  height: 5px;
  transition: height 0.1s ease;
}

.pupil {
  position: absolute;
  width: 26px;
  height: 26px;
  background: #1a5490;
  border-radius: 50%;
  top: 9px;
  left: 14px;
  transition: all 0.2s ease, width 0.3s ease, height 0.3s ease;
}

.avatar:hover .pupil {
  width: 30px;
  height: 30px;
  top: 7px;
  left: 12px;
}

.pupil::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  background: #000;
  border-radius: 50%;
  top: 6px;
  left: 6px;
}

.pupil::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
  top: 4px;
  left: 6px;
  opacity: 0.9;
}

/* Nose */
.nose {
  position: absolute;
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-bottom: 35px solid #d4a574;
  top: 215px;
  left: 163px;
  z-index: 2;
  opacity: 0.5;
  filter: blur(2px);
}

.nose-tip {
  position: absolute;
  width: 18px;
  height: 12px;
  background: #d4a574;
  border-radius: 50%;
  top: 245px;
  left: 166px;
  z-index: 2;
  opacity: 0.6;
}

/* Mouth */
.mouth {
  position: absolute;
  width: 70px;
  height: 22px;
  top: 275px;
  left: 140px;
  z-index: 2;
  transition: all 0.4s ease;
}

.mouth.smiling {
  height: 35px;
  top: 270px;
}

.upper-lip {
  position: absolute;
  width: 70px;
  height: 10px;
  background: #c97064;
  border-radius: 50% 50% 0 0;
  top: 0;
  transition: all 0.3s ease;
}

.lower-lip {
  position: absolute;
  width: 70px;
  height: 14px;
  background: #d88073;
  border-radius: 0 0 50% 50%;
  top: 8px;
  transition: all 0.3s ease;
}

.mouth.smiling .lower-lip {
  border-radius: 0 0 80px 80px;
  height: 22px;
}

/* Jaw shadow */
.jaw-shadow {
  position: absolute;
  width: 180px;
  height: 60px;
  background: radial-gradient(ellipse, rgba(180, 140, 100, 0.3), transparent);
  top: 280px;
  left: 85px;
  border-radius: 50%;
}

/* Ears */
.ear {
  position: absolute;
  width: 35px;
  height: 50px;
  background: #f4c6a8;
  border-radius: 50%;
  border: 2px solid #d4a574;
}

.ear.left {
  top: 175px;
  left: 50px;
  transform: rotate(-10deg);
}

.ear.right {
  top: 175px;
  right: 50px;
  transform: rotate(10deg);
}

.ear-inner {
  position: absolute;
  width: 15px;
  height: 25px;
  background: #e6b494;
  border-radius: 50%;
  top: 12px;
  left: 10px;
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0.7;
  animation: bounce 2s ease-in-out infinite;
}

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

.scroll-indicator i {
  color: var(--text-primary);
  font-size: 30px;
}

.scroll-indicator span {
  color: var(--text-primary);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Enhanced Personal Details Section */
#personal-details {
  width: 100%;
  min-height: 100vh;
  padding: 80px 60px 60px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  scroll-snap-align: start;
  animation: fadeIn 1s ease-out;
}

.profile-title {
  text-align: center;
  font-size: 60px;
  color: #2c3e50;
  margin-bottom: 60px;
  position: relative;
  animation: slideDown 0.8s ease-out;
}

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

.profile-title::after {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--accent-color),
    var(--accent-secondary)
  );
  border-radius: 2px;
}

.about-section {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 60px;
  align-items: start;
}

/* Enhanced Cards */
.about-me-box,
.detail-box {
  background: white;
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  animation: fadeInUp 0.8s ease-out;
}

.about-me-box:hover,
.detail-box:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.about-me,
.detail-title {
  font-size: 32px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 25px;
  position: relative;
  padding-left: 20px;
}

.about-me::before,
.detail-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 80%;
  background: linear-gradient(
    180deg,
    var(--accent-color),
    var(--accent-secondary)
  );
  border-radius: 3px;
}

.main-about-me {
  font-size: 18px;
  line-height: 1.8;
  color: #555;
}

/* Avatar in profile section */
.avatar-wrapper--small {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.avatar--small {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid white;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
  transition: all 0.4s ease;
  animation: fadeIn 1s ease-out 0.3s both;
}

.avatar--small:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 20px 60px rgba(255, 183, 77, 0.4);
}

/* Detail List */
.detail-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px 25px;
}

.detail-list dt {
  font-weight: 700;
  color: #2c3e50;
  display: flex;
  align-items: center;
  gap: 10px;
}

.detail-list dt::before {
  content: "▸";
  color: var(--accent-color);
  font-size: 18px;
}

.detail-list dd {
  color: #666;
  display: flex;
  align-items: center;
}

/* Enhanced Footer */
footer {
  min-height: auto;
  scroll-snap-align: start;
  background: #1a1a1a;
}

.contact-card {
  padding: 80px 60px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  max-width: 1400px;
  margin: 0 auto;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 25px;
  padding: 20px;
  border-radius: 15px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.contact-item:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(10px);
}

.icon-wrapper {
  width: 55px;
  height: 55px;
  background: linear-gradient(
    135deg,
    var(--accent-color),
    var(--accent-secondary)
  );
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

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

.icon-wrapper i {
  color: white;
  font-size: 24px;
}

.contact-info .primary {
  color: white;
  font-size: 20px;
  font-weight: 600;
  display: block;
  margin-bottom: 5px;
}

.contact-info .secondary {
  color: #aaa;
  font-size: 16px;
}

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

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

/* Social Icons */
.social-icons {
  display: flex;
  gap: 20px;
  margin-top: 30px;
}

.social-icon {
  width: 55px;
  height: 55px;
  background: #2a2a2a;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  position: relative;
  overflow: hidden;
}

.social-icon::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    var(--accent-color),
    var(--accent-secondary)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.social-icon:hover::before {
  opacity: 1;
}

.social-icon:hover {
  transform: translateY(-8px) rotate(5deg) scale(1.1);
  box-shadow: 0 15px 30px rgba(255, 183, 77, 0.4);
}

.social-icon i {
  color: white;
  font-size: 24px;
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease;
}

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

.right-section h2 {
  color: white;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 20px;
}

.right-section p {
  color: #aaa;
  font-size: 16px;
  line-height: 1.8;
}

/* Tooltip */
.tooltip {
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%) scale(0);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 8px 15px;
  border-radius: 8px;
  font-size: 14px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: all 0.3s ease;
}

.tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.9);
}

.social-icon:hover .tooltip {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* Copy notification */
.copy-notification {
  position: fixed;
  top: 100px;
  right: 30px;
  background: linear-gradient(135deg, #4caf50, #45a049);
  color: white;
  padding: 15px 25px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(76, 175, 80, 0.4);
  font-weight: 600;
  opacity: 0;
  transform: translateX(400px);
  transition: all 0.4s ease;
  z-index: 2000;
}

.copy-notification.show {
  opacity: 1;
  transform: translateX(0);
}

/* ===================================================================
   RESPONSIVE DESIGN - MEDIA QUERIES
   =================================================================== */

/* Large Tablets and Small Desktops (1024px and below) */
@media (max-width: 1024px) {
  :root {
    --container-width: 100%;
  }

  .main-nav {
    padding: 0 30px;
  }

  .about-section {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  #bio-content,
  .avatar-wrapper--medium {
    width: 100%;
  }

  .hero-section {
    flex-direction: column;
    padding: 100px 30px 60px;
  }

  #bio-content {
    text-align: center;
    align-items: center;
    padding: 0 30px;
  }

  .avatar-wrapper--medium .avatar {
    /* Scale avatar proportionally for large tablet */
    transform: scale(0.857); /* 300/350 = 0.857 */
    transform-origin: center center;
  }

  .avatar-wrapper--medium .avatar:hover {
    transform: scale(0.9); /* Slightly larger on hover */
  }

  .avatar-wrapper--medium .avatar.clicked {
    animation: celebrateLargeTablet 0.6s ease;
  }

  @keyframes celebrateLargeTablet {
    0%,
    100% {
      transform: scale(0.9) rotate(0deg);
    }
    25% {
      transform: scale(0.943) rotate(-5deg);
    }
    75% {
      transform: scale(0.943) rotate(5deg);
    }
  }

  .avatar-wrapper--small .avatar--small {
    width: 200px;
    height: 200px;
  }
}

/* Tablets (768px and below) */
@media (max-width: 768px) {
  /* Navigation */
  .header {
    height: 70px;
  }

  .main-nav {
    padding: 0 20px;
  }

  .main-nav ul {
    gap: 4px;
  }

  .main-nav a {
    padding: 8px 16px;
    font-size: 13px;
  }

  .scroll-progress {
    top: 70px;
  }

  /* Hero Section */
  .hero-section {
    padding: 80px 20px 50px;
    min-height: 100vh;
  }

  .main-greeting {
    font-size: 50px;
    letter-spacing: 3px;
  }

  .self-intro {
    font-size: 24px;
    line-height: 1.4;
  }

  #bio-content {
    padding: 0 20px;
  }

  .greeting-box {
    padding: 15px 25px;
  }

  .cta-button {
    padding: 12px 30px;
    font-size: 16px;
  }

  .avatar-wrapper--medium .avatar {
    /* Scale avatar proportionally for tablet */
    transform: scale(0.8); /* 280/350 = 0.8 */
    transform-origin: center center;
  }

  .avatar-wrapper--medium .avatar:hover {
    transform: scale(0.84); /* Slightly larger on hover */
  }

  .avatar-wrapper--medium .avatar.clicked {
    animation: celebrateTablet 0.6s ease;
  }

  @keyframes celebrateTablet {
    0%,
    100% {
      transform: scale(0.84) rotate(0deg);
    }
    25% {
      transform: scale(0.88) rotate(-5deg);
    }
    75% {
      transform: scale(0.88) rotate(5deg);
    }
  }

  /* Personal Details Section */
  #personal-details {
    padding: 60px 30px 40px;
  }

  .profile-title {
    font-size: 45px;
    margin-bottom: 40px;
  }

  .about-section {
    gap: 30px;
  }

  .about-me-box,
  .detail-box {
    padding: 30px;
  }

  .about-me,
  .detail-title {
    font-size: 26px;
  }

  .main-about-me {
    font-size: 16px;
  }

  .avatar-wrapper--small .avatar--small {
    width: 180px;
    height: 180px;
  }

  .detail-list {
    gap: 15px 20px;
  }

  /* Footer/Contact Section */
  .contact-card {
    grid-template-columns: 1fr;
    padding: 40px 30px;
    gap: 40px;
  }

  .left-section {
    order: 2;
  }

  .right-section {
    order: 1;
  }

  .right-section h2 {
    font-size: 24px;
  }

  .right-section p {
    font-size: 15px;
  }

  .social-icons {
    justify-content: center;
  }

  /* Scroll Indicator */
  .scroll-indicator {
    bottom: 30px;
  }

  .scroll-indicator i {
    font-size: 24px;
  }

  .scroll-indicator span {
    font-size: 12px;
  }

  /* Copy Notification */
  .copy-notification {
    right: 20px;
    top: 90px;
    padding: 12px 20px;
    font-size: 14px;
  }

  /* Mute Button */
  #muteToggle {
    width: 45px;
    height: 45px;
    font-size: 18px;
    bottom: 15px;
    right: 15px;
  }
}

/* Mobile Devices (480px and below) */
@media (max-width: 480px) {
  /* Navigation - Compact mobile version */
  .header {
    height: 60px;
  }

  .main-nav {
    padding: 0 15px;
  }

  .main-nav ul {
    gap: 2px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .main-nav a {
    padding: 6px 12px;
    font-size: 11px;
    white-space: nowrap;
  }

  .scroll-progress {
    top: 60px;
    height: 2px;
  }

  /* Hero Section - Mobile optimized */
  .hero-section {
    padding: 70px 15px 40px;
    min-height: 100vh;
  }

  #bio-content {
    padding: 0 15px;
    width: 100%;
  }

  .greeting-box {
    padding: 12px 20px;
    margin-bottom: 20px;
  }

  .main-greeting {
    font-size: 36px;
    letter-spacing: 2px;
  }

  .self-intro {
    font-size: 18px;
    line-height: 1.5;
  }

  .cta-button {
    padding: 10px 25px;
    font-size: 14px;
    margin-top: 30px;
  }

  /* Avatar - Mobile size with preserved aspect ratio */
  .avatar-wrapper--medium {
    width: 100%;
    margin-top: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Use transform scale to maintain perfect aspect ratio */
  }

  .avatar-wrapper--medium .avatar {
    /* Keep original dimensions but scale the wrapper */
    transform: scale(0.629); /* 220/350 = 0.629 */
    transform-origin: center center;
  }

  .avatar-wrapper--medium .avatar:hover {
    transform: scale(0.66); /* Slightly larger on hover */
  }

  .avatar-wrapper--medium .avatar.clicked {
    /* Maintain scale during click animation */
    animation: celebrateMobile 0.6s ease;
  }

  @keyframes celebrateMobile {
    0%,
    100% {
      transform: scale(0.66) rotate(0deg);
    }
    25% {
      transform: scale(0.69) rotate(-5deg);
    }
    75% {
      transform: scale(0.69) rotate(5deg);
    }
  }

  /* Personal Details Section - Mobile */
  #personal-details {
    padding: 50px 20px 30px;
    min-height: auto;
  }

  .profile-title {
    font-size: 32px;
    margin-bottom: 30px;
  }

  .profile-title::after {
    width: 60px;
    height: 3px;
    bottom: -10px;
  }

  .about-section {
    gap: 25px;
  }

  .about-me-box,
  .detail-box {
    padding: 25px 20px;
  }

  .about-me,
  .detail-title {
    font-size: 22px;
    margin-bottom: 20px;
    padding-left: 15px;
  }

  .about-me::before,
  .detail-title::before {
    width: 4px;
  }

  .main-about-me {
    font-size: 15px;
    line-height: 1.7;
  }

  /* Avatar in details section - Mobile */
  .avatar-wrapper--small .avatar--small {
    width: 150px;
    height: 150px;
    border-width: 3px;
  }

  /* Detail list - Mobile layout */
  .detail-list {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .detail-list dt {
    font-size: 15px;
    margin-bottom: 5px;
  }

  .detail-list dd {
    font-size: 14px;
    padding-left: 28px;
  }

  /* Footer/Contact Section - Mobile */
  footer {
    min-height: auto;
  }

  .contact-card {
    padding: 30px 20px;
    gap: 30px;
  }

  .contact-item {
    flex-direction: row;
    gap: 15px;
    padding: 15px;
  }

  .icon-wrapper {
    width: 45px;
    height: 45px;
    border-radius: 12px;
  }

  .icon-wrapper i {
    font-size: 20px;
  }

  .contact-info .primary {
    font-size: 16px;
  }

  .contact-info .secondary {
    font-size: 14px;
  }

  .right-section h2 {
    font-size: 20px;
    margin-bottom: 15px;
  }

  .right-section p {
    font-size: 14px;
    line-height: 1.6;
  }

  .social-icons {
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
    flex-wrap: wrap;
  }

  .social-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
  }

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

  /* Scroll Indicator - Mobile */
  .scroll-indicator {
    bottom: 20px;
  }

  .scroll-indicator i {
    font-size: 20px;
  }

  .scroll-indicator span {
    font-size: 10px;
    letter-spacing: 1px;
  }

  /* Copy Notification - Mobile */
  .copy-notification {
    right: 15px;
    left: 15px;
    top: 80px;
    padding: 10px 15px;
    font-size: 13px;
    text-align: center;
  }

  /* Mute Button - Mobile */
  #muteToggle {
    width: 40px;
    height: 40px;
    font-size: 16px;
    bottom: 12px;
    right: 12px;
  }

  /* Tooltips - Disable on mobile */
  .tooltip {
    display: none;
  }

  /* Background particles - Reduce on mobile */
  .hero-section::before {
    width: 200px;
    height: 200px;
  }

  .hero-section::after {
    width: 150px;
    height: 150px;
  }
}

/* Small Mobile Devices (360px and below) */
@media (max-width: 360px) {
  .main-greeting {
    font-size: 30px;
  }

  .self-intro {
    font-size: 16px;
  }

  /* Avatar scaling for very small screens */
  .avatar-wrapper--medium .avatar {
    transform: scale(0.571); /* 200/350 = 0.571 */
  }

  .avatar-wrapper--medium .avatar:hover {
    transform: scale(0.6);
  }

  .avatar-wrapper--medium .avatar.clicked {
    animation: celebrateSmallMobile 0.6s ease;
  }

  @keyframes celebrateSmallMobile {
    0%,
    100% {
      transform: scale(0.6) rotate(0deg);
    }
    25% {
      transform: scale(0.629) rotate(-5deg);
    }
    75% {
      transform: scale(0.629) rotate(5deg);
    }
  }

  .profile-title {
    font-size: 28px;
  }

  .about-me,
  .detail-title {
    font-size: 20px;
  }

  .main-about-me {
    font-size: 14px;
  }

  .contact-info .primary {
    font-size: 15px;
  }

  .right-section h2 {
    font-size: 18px;
  }
}

/* MOBILE TOUCH OPTIMIZATIONS */

@media (hover: none) and (pointer: coarse) {
  /* Increase touch target sizes to at least 44x44px (Apple guidelines) */
  .main-nav a,
  .cta-button,
  .social-icon,
  .contact-item,
  #muteToggle {
    min-height: 44px;
    min-width: 44px;
  }

  /* Remove hover effects on touch devices */
  .main-nav a:hover,
  .cta-button:hover,
  .social-icon:hover,
  .contact-item:hover,
  .about-me-box:hover,
  .detail-box:hover,
  .avatar--small:hover {
    transform: none;
  }

  /* Use tap/active states instead */
  .main-nav a:active,
  .cta-button:active,
  .social-icon:active {
    transform: scale(0.95);
  }

  /* Disable scroll snap on touch devices for better control */
  .scroll-container {
    scroll-snap-type: none;
  }

  /* Optimize animations for touch devices */
  .hero-section::before,
  .hero-section::after {
    animation-duration: 12s;
  }
}

/* LANDSCAPE MODE ON MOBILE */

@media (max-width: 768px) and (orientation: landscape) {
  .hero-section {
    min-height: auto;
    padding: 60px 20px 40px;
  }

  #bio-content {
    padding: 0 20px;
  }

  .avatar {
    width: 200px;
    height: 230px;
  }

  .scroll-indicator {
    bottom: 15px;
  }

  .scroll-indicator i {
    font-size: 18px;
  }

  .scroll-indicator span {
    font-size: 10px;
  }
}

/* ACCESSIBILITY IMPROVEMENTS */

/* Ensure focus states are visible for keyboard navigation */
@media (prefers-reduced-motion: no-preference) {
  .main-nav a:focus,
  .cta-button:focus,
  .social-icon:focus,
  .contact-item:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
  }
}

/* Reduce motion for users who prefer it */
@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;
  }
}

/* Mute Toggle Button */
#muteToggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 2px solid var(--accent-color);
  color: white;
  font-size: 20px;
  cursor: pointer;
  z-index: 1000;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

#muteToggle:hover {
  transform: scale(1.1);
  border-color: var(--accent-secondary);
  box-shadow: 0 5px 15px rgba(255, 183, 77, 0.4);
}

/* Sound feedback styles */
.main-nav a,
.cta-button,
.social-icon,
.contact-item,
.avatar,
.avatar--small,
.about-me-box,
.detail-box {
  transition: all 0.3s ease;
  position: relative;
}

/* Add subtle pulse effect on hover with sound */
.main-nav a:hover,
.cta-button:hover,
.social-icon:hover,
.contact-item:hover {
  animation: soundPulse 0.3s ease;
}

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

/* AUDIO HINT ANIMATIONS */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes fadeOutUp {
  from {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  to {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
}
