/* IO Innovation Fund - Clean Shared CSS */
/* Only contains truly shared components */

/* CSS Variables */
:root {
  /* Colors */
  --bg-primary: #0a0a0f;
  --bg-secondary: rgba(10, 10, 15, 0.95);
  --bg-card: rgba(255, 255, 255, 0.05);
  --glass-bg: rgba(255, 255, 255, 0.08);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --accent-primary: #2be2b4;
  --accent-secondary: #00d475;
  --accent-tertiary: #38f9d7;
  --border-color: rgba(255, 255, 255, 0.1);
  --shadow-color: rgba(43, 226, 180, 0.15);

  /* Typography */
  --font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;

  /* Layout */
  --header-height: 70px;
  --container-max-width: 1200px;
  --border-radius: 12px;
  --transition-normal: 0.3s ease;
}

/* Light theme - Enhanced mobile compatibility */
[data-theme="light"],
.light-theme {
  --bg-primary: #ffffff;
  --bg-secondary: rgba(255, 255, 255, 0.95);
  --bg-card: rgba(0, 0, 0, 0.03);
  --glass-bg: rgba(0, 0, 0, 0.05);
  --text-primary: #1a1a1a;
  --text-secondary: rgba(26, 26, 26, 0.7);
  --border-color: rgba(0, 0, 0, 0.1);
  --shadow-color: rgba(43, 226, 180, 0.2);
}

/* Mobile-specific theme overrides */
@media (max-width: 768px) {
  [data-theme="dark"] {
    --glass-bg: rgba(255, 255, 255, 0.12);
    --bg-card: rgba(255, 255, 255, 0.08);
  }

  [data-theme="light"] {
    --glass-bg: rgba(0, 0, 0, 0.08);
    --bg-card: rgba(0, 0, 0, 0.05);
  }
}

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

/* Base styles */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  padding-top: var(--header-height);
  overflow-x: hidden;
}

/* Skip to main content for accessibility */
.skip-to-main {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--accent-primary);
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 10000;
  transition: top 0.3s;
}

.skip-to-main:focus {
  top: 6px;
}

/* Header Styles */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: var(--bg-secondary);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: all var(--transition-normal);
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: var(--font-weight-extrabold);
  background: linear-gradient(
    135deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  transition: all var(--transition-normal);
}

.logo:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 2px 8px var(--shadow-color));
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
  padding: 0.5rem 0;
  position: relative;
  transition: all var(--transition-normal);
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  transition: width var(--transition-normal);
}

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

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Mobile menu button */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  transition: all var(--transition-normal);
}

.mobile-menu-btn span {
  width: 25px;
  height: 3px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-normal);
  transform-origin: center;
}

.mobile-menu-btn:hover span {
  background: var(--accent-primary);
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile overlay */
.mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.mobile-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Theme Toggle */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  color: var(--accent-primary);
  cursor: pointer;
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px var(--shadow-color);
}

.theme-toggle:hover {
  transform: scale(1.1);
  background: var(--accent-primary);
  color: white;
  box-shadow: 0 6px 20px var(--shadow-color);
}

.theme-icon {
  font-size: 1rem;
  transition: all var(--transition-normal);
}

/* Footer */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 2rem 1rem;
  text-align: center;
  margin-top: 4rem;
}

.footer p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.secret-link {
  color: var(--text-secondary);
  text-decoration: none;
  margin: 0 0.5rem;
  font-size: 0.8rem;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.secret-link:hover {
  opacity: 1;
}

/* Container utility */
.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

/* Basic button utility */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
  transition: all var(--transition-normal);
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  color: white;
  box-shadow: 0 4px 15px var(--shadow-color);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--shadow-color);
}

/* Screen reader only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
  :root {
    --header-height: 60px;
  }

  body {
    padding-top: var(--header-height);
  }

  .nav {
    padding: 0 1rem;
  }

  .logo {
    font-size: 1.25rem;
  }

  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: -100%;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background: var(--bg-secondary);
    backdrop-filter: blur(25px);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 0;
    padding: 2rem 0;
    transition: left var(--transition-normal);
    border-right: 1px solid var(--border-color);
  }

  .nav-links.open {
    left: 0;
  }

  .nav-links li {
    width: 100%;
    text-align: center;
  }

  .nav-links a {
    display: block;
    padding: 1rem;
    font-size: 1.1rem;
    width: 100%;
    border-bottom: 1px solid var(--border-color);
  }

  .nav-links a::after {
    display: none;
  }

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

  .nav-actions {
    gap: 0.5rem;
  }

  /* Enhanced mobile theme toggle */
  .theme-toggle {
    width: 36px;
    height: 36px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    transform: translateZ(0);
    will-change: transform;
  }

  /* Force hardware acceleration on mobile for smooth theme transitions */
  .theme-toggle,
  .theme-icon {
    transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
  }

  /* Mobile-specific theme transition optimizations */
  * {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }

  /* Improve mobile theme switching performance */
  body,
  html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  .container {
    padding: 0 1rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.75rem;
  }

  .theme-toggle {
    width: 32px;
    height: 32px;
  }

  .theme-icon {
    font-size: 0.875rem;
  }
}

/* Accessibility improvements */
@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;
  }
}

/* Mobile ripple animation */
@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* Additional mobile optimizations */
.share-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  text-decoration: none;
  transition: all var(--transition-normal);
  backdrop-filter: blur(10px);
}

.share-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--shadow-color);
}

/* Focus styles for accessibility */
*:focus {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

button:focus,
a:focus {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}
