:root {
  --font-mono: "Ubuntu Mono", monospace;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

[data-theme="dark"] {
  --bg: #080808;
  --bg-secondary: #111;
  --bg-section: #0c0c0c;
  --text: #ffffff;
  --text-secondary: #a0a0a0;
  --text-muted: #555;
  --accent: #555;
  --border: rgba(255, 255, 255, 0.08);
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-hover: rgba(255, 255, 255, 0.07);
  --card-border: rgba(255, 255, 255, 0.1);
  --card-border-hover: rgba(255, 255, 255, 0.3);
  --header-bg: rgba(8, 8, 8, 0.9);
  --gradient-1: #161616;
  --gradient-2: #101010;
  --gradient-3: #0d0d0d;
  --gradient-4: #121212;
  --logo-from: #fff;
  --logo-to: #444;
}

[data-theme="light"] {
  --bg: #fafafa;
  --bg-secondary: #f0f0f0;
  --bg-section: #ffffff;
  --text: #1a1a1a;
  --text-secondary: #666;
  --text-muted: #aaa;
  --accent: #888;
  --border: rgba(0, 0, 0, 0.08);
  --card-bg: rgba(0, 0, 0, 0.02);
  --card-hover: rgba(0, 0, 0, 0.04);
  --card-border: rgba(0, 0, 0, 0.1);
  --card-border-hover: rgba(0, 0, 0, 0.2);
  --header-bg: rgba(250, 250, 250, 0.9);
  --gradient-1: #e8e8e8;
  --gradient-2: #f0f0f0;
  --gradient-3: #fafafa;
  --gradient-4: #f5f5f5;
  --logo-from: #1a1a1a;
  --logo-to: #888;
}

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

html {
  scroll-behavior: smooth;
}

body {
  color: var(--text);
  font-family: var(--font-sans);
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: linear-gradient(125deg, var(--gradient-1), var(--gradient-2), var(--gradient-3), var(--gradient-4));
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  transition: background 0.3s, color 0.3s;
}

::selection {
  background: var(--text);
  color: var(--bg);
}

::-webkit-scrollbar {
  width: 6px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 3px;
}

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

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

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 10%;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

.logo {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
  transition: opacity 0.3s;
}

.logo:hover {
  opacity: 0.7;
}

nav {
  display: flex;
  gap: 2rem;
}

nav a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.3s;
  cursor: pointer;
  letter-spacing: 0.5px;
  position: relative;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--text);
  transition: width 0.3s;
}

nav a:hover {
  color: var(--text);
}

nav a:hover::after {
  width: 100%;
}

.header-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.icon-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  transition: all 0.3s;
  font-family: var(--font-mono);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
}

.icon-btn:hover {
  color: var(--text);
  border-color: var(--text-secondary);
  background: var(--card-bg);
}

#menu-toggle {
  display: none;
}

main {
  flex: 1;
  position: relative;
  z-index: 1;
}

section {
  padding: 5rem 10%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

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

.section-header h2 {
  font-family: var(--font-mono);
  font-size: 2rem;
  color: var(--text);
  margin-bottom: 1rem;
}

.divider {
  width: 60px;
  height: 3px;
  background: var(--text);
  margin: 0 auto;
  opacity: 0.3;
  border-radius: 2px;
}

/* Home Section */
#home {
  min-height: 100vh;
  align-items: center;
  text-align: center;
  padding-top: 20vh;
}

.home-content {
  animation: fadeInUp 1.2s ease-out;
  user-select: none;
}

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

#main-display {
  font-family: var(--font-mono);
  font-size: clamp(5rem, 15vw, 10rem);
  margin: 0;
  padding: 10px;
  background: linear-gradient(to bottom, var(--logo-from), var(--logo-to));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -10px;
  line-height: 1;
}

.subtitle {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  color: var(--text-secondary);
  margin: 1rem 0 0.5rem;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.tagline {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 0.8rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s;
  font-family: var(--font-sans);
  cursor: pointer;
  border: none;
}

.btn.primary {
  background: var(--text);
  color: var(--bg);
}

.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(255, 255, 255, 0.1);
}

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

.btn.secondary:hover {
  border-color: var(--text-secondary);
  transform: translateY(-2px);
}

/* About Section */
#about {
  background: var(--bg-section);
  transition: background 0.3s;
}

.about-content {
  display: flex;
  gap: 4rem;
  align-items: center;
  max-width: 1000px;
  margin: 0 auto;
}

.about-text {
  flex: 1;
}

.about-text p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 2rem;
  border-left: 1px solid var(--border);
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
}

.stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 0.3rem;
}

/* Products Section */
#products {
  background: var(--bg-section);
  transition: background 0.3s;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.product-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 1.8rem;
  border-radius: 16px;
  transition: all 0.4s;
  cursor: pointer;
  opacity: 1;
  transform: translateY(0);
}

.product-card.hidden {
  display: none;
}

.product-card:hover {
  background: var(--card-hover);
  border-color: var(--card-border-hover);
  transform: translateY(-6px);
}

.product-tag {
  display: inline-block;
  color: var(--tag-color, var(--text-muted));
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 0.8rem;
  font-family: var(--font-mono);
}

.product-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.6rem;
  color: var(--text);
}

.product-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.product-links {
  display: flex;
  gap: 1rem;
}

.product-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.3s;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.product-links a:hover {
  color: var(--text);
}

/* Contact Section */
.contact-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.contact-content > p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 2rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  width: 100%;
  max-width: 350px;
  transition: all 0.3s;
  font-size: 1rem;
}

.contact-item i {
  font-size: 1.3rem;
  color: var(--text-secondary);
  width: 24px;
  text-align: center;
  transition: color 0.3s;
}

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

.contact-item:hover i {
  color: var(--text);
}

/* Footer */
footer {
  padding: 2rem 10%;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
  z-index: 1;
  user-select: none;
}

/* Mobile Nav Overlay */
.nav-open {
  overflow: hidden;
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

@media (max-width: 768px) {
  header {
    padding: 0.8rem 5%;
  }

  nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 300px;
    height: 100vh;
    background: var(--bg);
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    gap: 1.5rem;
    transition: right 0.3s ease;
    border-left: 1px solid var(--border);
    z-index: 999;
  }

  nav.active {
    right: 0;
  }

  nav a {
    font-size: 1.1rem;
  }

  #menu-toggle {
    display: flex;
  }

  section {
    padding: 4rem 5%;
  }

  .about-content {
    flex-direction: column;
    gap: 2rem;
  }

  .about-stats {
    flex-direction: row;
    border-left: none;
    border-top: 1px solid var(--border);
    padding: 2rem 0 0;
    width: 100%;
    justify-content: center;
  }

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

  .subtitle {
    font-size: 1rem;
  }

  .tagline {
    font-size: 0.95rem;
  }
}

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

  .header-actions {
    gap: 0.3rem;
  }

  .icon-btn {
    padding: 0.3rem 0.5rem;
    min-width: 32px;
    min-height: 32px;
    font-size: 0.8rem;
  }

  #main-display {
    letter-spacing: -5px;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 250px;
    text-align: center;
  }

  .contact-links {
    width: 100%;
  }

  .contact-item {
    max-width: 100%;
  }
}
