:root {
  /* High-End Tech Color Palette */
  --primary: #00f2ea; /* Neon Cyan */
  --primary-glow: rgba(0, 242, 234, 0.4);
  --secondary: #00d2ad; /* Teal/Emerald */
  --accent: #00f2ea;
  --btn-text: #070b1b;

  /* Dark Tech Theme */
  --bg-dark: #070b1b;
  --bg-card: rgba(11, 17, 32, 0.6);
  --bg-card-hover: rgba(11, 17, 32, 0.8);
  --primary-dark: #00cec9;
  --bg-nav: rgba(7, 11, 27, 0.8);
  --bg-footer: rgba(7, 11, 27, 0.95);
  --bg-surface: #111827;
  --bg-blur: blur(12px);
  --card-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  --card-shadow-hover: 0 40px 80px -20px rgba(0, 0, 0, 0.6);

  /* Text Highlights */
  --text-primary: #ffffff;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;

  /* UI Elements */
  --border: rgba(255, 255, 255, 0.05);
  --border-light: rgba(255, 255, 255, 0.03);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --glow: 0 0 20px var(--primary-glow);

  /* Typography */
  --font-heading: "Poppins", sans-serif;
  --font-body: "Poppins", sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg-dark: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-card-hover: #ffffff;
  --bg-nav: rgba(248, 250, 252, 0.9);
  --bg-surface: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --border: rgba(15, 23, 42, 0.08);
  --border-light: rgba(15, 23, 42, 0.04);
  --primary: #00b8b2;
  --primary-glow: rgba(0, 184, 178, 0.1);
  --bg-footer: rgba(248, 250, 252, 0.9);
  --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  --card-shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.1);
  --btn-text: #ffffff;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  overflow-wrap: break-word; /* Prevent long word overflow globally */
  transition: var(--transition-base);
  /* Force dynamic viewport height for better mobile support */
  min-height: 100dvh;
}

/* Colorful Main Scrollbar */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
  border-left: 1px solid rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary), var(--secondary));
  border-radius: 6px;
  border: 2px solid var(--bg-dark);
  transition: var(--transition-base);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--secondary), var(--primary));
  box-shadow: 0 0 15px var(--primary-glow);
  border-color: rgba(0, 242, 234, 0.2);
}

/* Firefox Scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--bg-dark);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.2rem, 8vw, 4.5rem);
}

h2 {
  font-size: clamp(1.8rem, 6vw, 3.2rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

p {
  font-size: 1rem;
  margin-bottom: var(--space-md);
}

.section-header {
  margin-bottom: 4rem;
  text-align: center;
}

.section-tag {
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  margin-bottom: 1rem;
  display: block;
  text-align: center;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 2.5rem;
  text-align: center;
  position: relative;
  padding-bottom: 1rem;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
}

.section-title span.dimmed {
  opacity: 0.4;
  display: inline;
}

[data-theme="light"] .section-title span.dimmed {
  opacity: 0.6; /* Slightly darker for contrast on white */
  color: var(--text-muted);
}

.section-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 650px;
  line-height: 1.7;
  text-align: center;
  margin: 0 auto 3rem;
}

@media (max-width: 1024px) {
  .section-info-side {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .contact-methods {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Left align only these */
    width: 100%;
    max-width: fit-content;
    margin: 0 auto 2rem;
  }

  .contact-socials {
    justify-content: center;
  }
}

/* Utilities */
.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-muted-outline {
  -webkit-text-stroke: 1px var(--border);
  color: transparent;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 5vw, 4rem);
  width: 100%;
}

section {
  padding: var(--space-3xl) 0;
  position: relative;
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0.8rem 0;
  background: rgba(7, 11, 27, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 242, 234, 0.1);
  transition:
    transform 0.3s var(--transition-base),
    background 0.3s var(--transition-base);
}

.nav-hidden {
  transform: translateY(-100%);
  box-shadow: none;
}

[data-theme="light"] nav {
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(0, 184, 178, 0.1);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -1px;
}

.nav-links {
  display: flex;
  gap: var(--space-xl);
  list-style: none;
}

.nav-links a {
  color: var(--text-primary);
  opacity: 0.8;
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  transition: var(--transition-base);
  position: relative;
  padding: 0.2rem 0;
}

[data-theme="light"] .nav-links a {
  opacity: 0.9;
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-links a.active,
.mobile-menu ul li a.active {
  color: var(--primary);
  opacity: 1;
  font-weight: 700;
  text-shadow: 0 0 10px var(--primary-glow);
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--primary-glow);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

/* btn-contact removed */

#theme-toggle {
  position: relative;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-primary);
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s var(--transition-base);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] #theme-toggle {
  background: rgba(15, 23, 42, 0.03);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

#theme-toggle:hover {
  background: var(--bg-surface);
  border-color: var(--primary);
  box-shadow: 0 0 20px var(--primary-glow);
  transform: translateY(-2px);
}

#theme-toggle i {
  position: absolute;
  font-size: 1.2rem;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Icon Animations */
[data-theme="dark"] .toggle-sun {
  transform: translateY(0) rotate(0deg);
  opacity: 1;
  color: #fbbf24; /* Sun Amber */
}

[data-theme="dark"] .toggle-moon {
  transform: translateY(40px) rotate(180deg);
  opacity: 0;
}

[data-theme="light"] .toggle-sun {
  transform: translateY(-40px) rotate(-180deg);
  opacity: 0;
}

[data-theme="light"] .toggle-moon {
  transform: translateY(0) rotate(0deg);
  opacity: 1;
  color: var(--primary);
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 1001;
  width: 35px;
  height: 35px;
  align-items: center;
  justify-content: center;
  transition: var(--transition-base);
}

.mobile-menu {
  position: fixed;
  top: 80px; /* Positioned below navbar */
  right: -110%; /* Move to right side and hide */
  left: auto; /* Reset left property */
  width: 260px; /* Fixed width for box look */
  height: auto; /* Auto height for content */
  max-height: 80vh;
  background: rgba(7, 11, 27, 0.95);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid var(--border);
  border-radius: 24px; /* Rounded corners for box look */
  padding: 2.5rem 1.5rem;
  box-shadow: -20px 20px 60px rgba(0, 0, 0, 0.5); /* Shadow on left/bottom */
  display: flex;
  align-items: flex-start; /* Align items to top-left of box */
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}

.mobile-menu.active {
  right: 20px; /* Slide in from right with offset */
  left: auto;
  box-shadow: -20px 20px 60px rgba(0, 0, 0, 0.5);
}

.mobile-menu ul {
  list-style: none;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Light Mode Overrides for Mobile Menu */
[data-theme="light"] .mobile-menu {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: -15px 15px 40px rgba(0, 0, 0, 0.1);
  border-color: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .mobile-menu ul li a {
  color: var(--text-primary);
}

[data-theme="light"] .mobile-theme-btn {
  background: rgba(0, 0, 0, 0.05);
}

.mobile-menu ul li a {
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition-base);
  position: relative;
}

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

.mobile-menu ul li a:hover::after {
  width: 100%;
}

.mobile-menu ul li a:hover {
  color: var(--primary);
  transform: translateX(5px);
}

#theme-toggle:hover,
.mobile-theme-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Mobile Theme Button Styling */
.mobile-theme-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: 10px;
  display: flex; /* Flex to align text and icons */
  align-items: center;
  justify-content: center;
  cursor: pointer;
  width: fit-content;
  max-width: 160px; /* Limit width */
  margin: 0.5rem auto 0;
  position: relative;
  overflow: hidden;
  font-size: 0.85rem;
  transition: all 0.3s var(--transition-base);
}

/* Dynamic Theme Text Control */
.theme-label-light,
.theme-label-dark {
  display: none;
}

/* If current theme is DARK, show 'Light Mode' text */
[data-theme="dark"] .theme-label-light {
  display: inline-block;
  margin-right: 8px;
  font-weight: 500;
}

/* If current theme is LIGHT, show 'Dark Mode' text */
[data-theme="light"] .theme-label-dark {
  display: inline-block;
  margin-right: 8px;
  font-weight: 500;
}

/* Tablet/Intermediate Desktop Spacing */
@media (max-width: 1100px) {
  .nav-links {
    gap: 1rem; /* Tightened for iPad Mini */
  }
  .nav-right {
    gap: 0.8rem;
  }
  .nav-links a {
    font-size: 0.85rem; /* Smaller font for intermediate screens */
  }
}

/* Hide desktop theme toggle on small screens (e.g. < 767px where mobile menu appears) */
@media (max-width: 767px) {
  .nav-actions #theme-toggle {
    display: none;
  }
}

/* Hero Section */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  background: var(--bg-dark);
  position: relative;
  overflow: hidden;
}

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

[data-theme="light"] #hero {
  background: #f8fafc;
}

.hero-container {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  align-items: center;
}

@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }

  .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    text-align: center;
  }

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

.hero-tagline {
  justify-content: flex-start;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: clamp(
    1.8rem,
    5vw,
    3.5rem
  ); /* Increased size to match user request */
  font-weight: 700;
  margin-top: 0.5rem;
  color: var(--secondary); /* Optional: distinct color */
}

@media (max-width: 1024px) {
  .hero-tagline {
    justify-content: center;
  }
}

.cursor {
  display: inline-block;
  color: var(--primary);
  margin-left: 4px;
  animation: blink 0.8s infinite;
  font-weight: 300;
}

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

.hero-description {
  line-height: 1.8;
  text-align: left;
}

@media (max-width: 1024px) {
  .hero-description {
    text-align: center;
    margin: 0 auto 3rem;
  }
}

.hero-btns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
  width: fit-content;
}

.hero-btns .btn {
  padding: 0.8rem 1.5rem;
  font-size: 0.8rem;
  width: 100%; /* Fill grid cell */
}

@media (max-width: 1024px) {
  .hero-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin: 0 auto;
    width: 100%;
    max-width: 600px;
  }
  .hero-btns .btn {
    width: auto;
    min-width: 200px;
  }
}

@media (max-width: 767px) {
  .hero-btns {
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
  }
  .hero-btns .btn {
    width: 100%;
    max-width: 320px;
  }
}

/* Hero Image & Blob Styles */
.hero-image {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.blob-wrapper {
  position: relative;
  width: 100%;
  max-width: 450px;
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .blob-wrapper {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.blob-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 0 20px var(--primary-glow);
}

/* Redesigned Buttons */
.btn {
  padding: 0.9rem 2.2rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  transition: var(--transition-base);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  letter-spacing: 0.5px;
}

.btn-solid {
  background: var(--primary);
  color: var(--btn-text);
  border: 1px solid var(--primary);
}

.btn-gradient {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--btn-text);
  border: 1px solid transparent;
}

.btn-outline {
  border: 1px solid rgba(0, 242, 234, 0.3);
  color: var(--primary);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -10px var(--primary-glow);
  border-color: var(--primary);
}

.btn-gradient,
.btn-solid {
  position: relative;
  overflow: hidden;
}

.btn-gradient::after,
.btn-solid::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transform: rotate(45deg);
  transition: 0.5s;
  pointer-events: none;
}

.btn-gradient:hover::after,
.btn-solid:hover::after {
  left: 100%;
}

.btn-outline:hover {
  background: rgba(0, 242, 234, 0.05);
}

/* Sub-page Basics */
.subpage-hero {
  padding: clamp(100px, 10vh, 120px) 0 10px;
  background: transparent;
  text-align: center;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 15vh;
}

.subpage-hero .hero-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin: 0;
  color: var(--text-primary);
  text-align: center;
  width: 100%;
  position: relative;
  padding-bottom: 1.5rem;
  animation: heroFadeIn 0.6s cubic-bezier(0.2, 0, 0.2, 1) forwards;
}

.subpage-hero .hero-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
}

.text-colorful {
  background: linear-gradient(
    135deg,
    var(--primary),
    #00f2ea,
    #00d2ad,
    var(--secondary)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 15px rgba(0, 242, 234, 0.2));
  display: inline-block;
}

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

.subpage-hero .section-tag,
.subpage-hero .hero-description {
  display: none;
}

.subpage-hero::after {
  display: none;
}

.subpage-content {
  padding: 10px 0 80px;
}

@media (max-width: 1024px) {
  .subpage-hero {
    padding: 120px 0 40px;
  }
}

/* Contact Section */
/* Contact Section */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.contact-info-side .section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 2rem;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 3rem 0;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: var(--transition-base);
}

.contact-method:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  transform: translateX(5px);
}

.contact-link {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-base);
  display: block;
}

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

.contact-method i {
  color: var(--primary);
  font-size: 1.25rem;
  width: 40px;
  height: 40px;
  background: var(--primary-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.contact-socials {
  display: flex;
  gap: 1.5rem;
  margin-top: 3rem;
}

.contact-socials a {
  color: var(--primary);
  font-size: 1.2rem;
  transition: var(--transition-base);
}

.contact-socials a:hover {
  transform: translateY(-3px);
  opacity: 0.8;
}

.form-card {
  background: var(--bg-card);
  backdrop-filter: var(--bg-blur);
  -webkit-backdrop-filter: var(--bg-blur);
  padding: 3.5rem;
  border-radius: 30px;
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
}

.form-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.contact-form-side .form-group {
  margin-bottom: 1.5rem;
}

.contact-form-side input,
.contact-form-side textarea {
  width: 100%;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.2rem 1.5rem;
  color: var(--text-primary);
  font-family: inherit;
  transition: var(--transition-base);
}

.contact-form-side input:focus,
.contact-form-side textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.char-count {
  display: block;
  text-align: left;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.btn-full {
  width: 100%;
  margin-top: 1rem;
}

.btn-full:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Form Result Messages */
.form-result {
  margin-top: 1.5rem;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s var(--transition-base);
}

.form-result.success,
.form-result.error {
  opacity: 1;
  max-height: 100px;
}

.form-result.success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #22c55e;
}

.form-result.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

[data-theme="light"] .form-result.success {
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
}

[data-theme="light"] .form-result.error {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
}

/* Footer */
footer {
  margin-top: 4rem;
}

.footer-bottom {
  background: var(--bg-footer);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-light);
  padding: 2rem 0;
  color: var(--text-primary);
  margin-top: auto;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
  opacity: 0.8;
  flex-wrap: wrap;
  gap: 1rem;
}

[data-theme="light"] .footer-container {
  opacity: 1;
}

.footer-container p {
  margin: 0;
  text-align: center;
}

/* Back to Top */
.back-to-top {
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: var(--btn-text);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: var(--transition-base);
  z-index: 100;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

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

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

/* Light Mode Back to Top */
[data-theme="light"] .back-to-top {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(0, 184, 178, 0.3);
}

[data-theme="light"] .back-to-top:hover {
  box-shadow: 0 8px 25px rgba(0, 184, 178, 0.4);
}

/* Fixed Bottom Buttons Container */
.fixed-bottom-buttons {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column-reverse; /* Theme toggle on bottom, Back to top above it */
  gap: 1rem;
  z-index: 1000;
  align-items: center;
}

/* Theme Toggle Button at Bottom */
.theme-btn-bottom {
  width: 50px;
  height: 50px;
  background: var(--bg-card);
  backdrop-filter: var(--bg-blur);
  -webkit-backdrop-filter: var(--bg-blur);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  transition: var(--transition-base);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  color: var(--primary);
}

.theme-btn-bottom:hover {
  transform: translateY(-4px);
  box-shadow: var(--glow);
  border-color: var(--primary);
  background: var(--bg-card-hover);
}

.theme-btn-bottom .toggle-sun,
.theme-btn-bottom .toggle-moon {
  position: absolute;
  transition: var(--transition-base);
}

[data-theme="dark"] .theme-btn-bottom .toggle-sun {
  opacity: 0;
  transform: rotate(180deg) scale(0);
}

[data-theme="dark"] .theme-btn-bottom .toggle-moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

[data-theme="light"] .theme-btn-bottom .toggle-sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

[data-theme="light"] .theme-btn-bottom .toggle-moon {
  opacity: 0;
  transform: rotate(-180deg) scale(0);
}

/* Light Mode Theme Button */
[data-theme="light"] .theme-btn-bottom {
  background: var(--bg-card);
  border-color: var(--border);
  box-shadow: 0 4px 15px rgba(0, 184, 178, 0.2);
  color: var(--primary);
}

[data-theme="light"] .theme-btn-bottom:hover {
  box-shadow: 0 8px 25px rgba(0, 184, 178, 0.3);
}

/* Responsive adjustments for bottom buttons */
@media (max-width: 768px) {
  .fixed-bottom-buttons {
    bottom: 1.5rem;
    right: 1.5rem;
    gap: 0.75rem;
  }
  
  .theme-btn-bottom,
  .back-to-top {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .fixed-bottom-buttons {
    bottom: 1rem;
    right: 1rem;
  }
}

/* Fixed Social Sidebar */
.fixed-social-sidebar {
  position: fixed;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  z-index: 100;
}

.fixed-social-sidebar a {
  color: var(--text-secondary);
  font-size: 1.1rem;
  transition: var(--transition-base);
  opacity: 0.6;
}

.fixed-social-sidebar a:hover {
  color: var(--primary);
  opacity: 1;
  transform: translateX(-3px);
  filter: drop-shadow(0 0 8px var(--primary-glow));
}

.fixed-social-sidebar .v-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--primary), transparent);
  margin-top: 0.5rem;
  opacity: 0.3;
}

/* Colorful Scrollbar for Sidebar */
.fixed-social-sidebar::-webkit-scrollbar {
  width: 8px;
}

.fixed-social-sidebar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.fixed-social-sidebar::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 10px;
  transition: var(--transition-base);
}

.fixed-social-sidebar::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  box-shadow: 0 0 10px var(--primary-glow);
}

@media (max-width: 1024px) {
  .fixed-social-sidebar {
    right: 1rem;
    gap: 1rem;
  }
  .fixed-social-sidebar a {
    font-size: 1rem;
  }
}

@media (max-width: 380px) {
  .fixed-social-sidebar {
    display: none;
  }
}

/* Watch/Ultra-Small Screen Support (< 300px) - e.g. Galaxy Fold Folded */
@media (max-width: 320px) {
  /* Hide heavy decorative elements */
  .blob-wrapper,
  .section-title::after,
  .cursor,
  .section-tag {
    display: none !important;
  }

  /* Typography Scaling */
  h1 {
    font-size: 1.4rem !important;
  }
  h2 {
    font-size: 1.25rem !important;
  }
  p,
  .hero-description {
    font-size: 0.85rem !important;
  }

  /* Layout Compactness */
  .container {
    padding: 0 0.75rem !important;
  }
  section {
    padding: 1.5rem 0 !important;
  }

  .btn {
    width: 100% !important;
    padding: 0.7rem 0.5rem !important;
    font-size: 0.75rem !important;
    margin-bottom: 0.5rem;
  }

  /* Navigation simplification */
  .nav-container {
    padding: 0 0.5rem;
  }
  .logo {
    font-size: 1.1rem;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  animation: fadeInUp 0.4s ease-out forwards;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }

  .hero-content {
    order: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-image {
    order: 1;
    margin-bottom: 3rem;
    max-width: min(400px, 80%);
    margin-inline: auto;
  }

  .hero-title,
  .hero-description {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    max-width: 600px;
  }

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

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

  .about-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
    align-items: center;
  }

  .contact-methods {
    align-items: flex-start;
    max-width: fit-content;
    margin: 0 auto 2rem;
  }

  .contact-socials {
    justify-content: center;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
}

@media (max-width: 767px) {
  .nav-links {
    display: none;
  }

  /* Centering Rules for Mobile */
  .hero-container,
  .about-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-text,
  .hero-title,
  .hero-description,
  .about-text {
    text-align: center;
  }

  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-tagline,
  .hero-btns,
  .about-actions,
  .about-footer,
  .section-footer {
    justify-content: center;
  }

  .about-footer,
  .section-footer {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    max-width: 400px;
    margin-inline: auto;
  }

  .hero-image {
    order: 1;
    margin-bottom: 2rem;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .mobile-menu.active {
    display: flex;
  }

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

  .hero-btns {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
    max-width: 400px;
    margin-inline: auto;
  }

  .hero-btns .btn {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }

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

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

  .footer-links {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .footer-container {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
}
/* Mobile Social Icons */
.social-mobile {
  display: none; /* Hidden by default */
  gap: 1.5rem;
  margin-top: 2.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Show social icons on about page */
.about-standalone .social-mobile {
  display: flex;
}

.social-mobile a {
  color: var(--text-secondary);
  font-size: 1.5rem;
  transition:
    transform 0.3s ease,
    color 0.3s ease;
}

.social-mobile a:hover {
  color: var(--primary);
  transform: translateY(-3px);
}

@media (max-width: 768px) {
  .fixed-social-sidebar {
    display: none;
  }

  .social-mobile {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 480px) {
  section {
    padding: var(--space-lg) 0;
  }

  .section-title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
  }

  .hero-name {
    font-size: clamp(2.5rem, 8vw, 3.5rem);
  }

  .btn {
    padding: 0.9rem 2.2rem;
    font-size: 0.9rem;
    width: 100%;
    min-width: 0;
    text-align: center;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }
}
/* Large Displays (iMac, TV, 4K) */
@media (min-width: 2000px) {
  html {
    font-size: 20px; /* Scale up base font size */
  }
  .container {
    max-width: 1800px;
  }
}

/* Foldable Support (e.g. Surface Duo) */
@media (screen-spanning: single-fold-vertical),
  (screen-spanning: dual-screen-vertical) {
  .hero-container,
  .about-container,
  .contact-grid {
    gap: 10vw; /* Increase gap to avoid hinge */
  }
}

/* Optimization for very small screens (Samsung S20, iPhone SE etc) */
@media (max-width: 400px) {
  .container {
    padding: 0 1rem;
  }

  .hero-tagline {
    font-size: clamp(1.4rem, 5vw, 1.8rem);
    flex-wrap: wrap; /* Allow wrapping */
  }

  h1 {
    font-size: 2rem; /* Hard set for safety */
  }

  h2 {
    font-size: 1.75rem;
  }

  .btn {
    padding: 0.8rem 1.5rem;
    width: 100%;
  }

  /* Ensure long words break on small screens */
  h1,
  h2,
  h3,
  p {
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
  }
}
