/* ==========================================================================
   Economists - Style.css
   Modern technology company website
   ========================================================================== */

/* CSS Variables */
:root {
  --bg-dark: #0a0a0f;
  --bg-medium: #12121a;
  --bg-light: #1a1a24;
  --fg: #e8e8f0;
  --muted: #6b6b80;
  --accent: #00d4aa;
  --accent-secondary: #ff6b6b;
  --card: #16161f;
  --border: #2a2a3a;
  --radius: 8px;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0s !important;
    transition-duration: 0s !important;
  }
}

body {
  font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
  background: var(--bg-dark);
  color: var(--fg);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

@media (prefers-reduced-motion: reduce) {
  a {
    transition: none;
  }
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--fg);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo .accent {
  color: var(--accent);
}

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

.nav-links a {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.5px;
  position: relative;
}

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

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

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

.download-btn {
  padding: 0.6rem 1.2rem;
  background: var(--accent);
  color: var(--bg-dark);
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 212, 170, 0.3);
}

.download-btn:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}

/* ========================================
   NAVIGATION OVERLAY (Mobile backdrop)
   ======================================== */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Mobile Nav Hamburger Button */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.hamburger:hover {
  background: rgba(0, 212, 170, 0.12);
  border-color: var(--accent);
}

.hamburger span {
  width: 22px;
  height: 2px;
  background: var(--fg);
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease, background-color 0.3s ease;
}

@media (prefers-reduced-motion: reduce) {
  .hamburger span {
    transition: none;
  }
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  background: var(--accent);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  background: var(--accent);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 2rem 2rem;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse 80% 50% at 20% 20%, rgba(0, 212, 170, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(255, 107, 107, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 900px;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: -2px;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.hero h1 .accent {
  color: var(--accent);
}

.hero p {
  font-size: 1.25rem;
  color: var(--muted);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.875rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  border: none;
}

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

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 212, 170, 0.4);
}

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

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}

/* Featured Technology Section */
.tech-section {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

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

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.section-header h2 .accent {
  color: var(--accent);
}

.section-header p {
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Tech Cards */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.tech-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.tech-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.tech-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.tech-card .status {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: rgba(0, 212, 170, 0.1);
  color: var(--accent);
  font-size: 0.75rem;
  border-radius: 10px;
  margin-top: 0.5rem;
  font-weight: 500;
}

.tech-card .status.active {
  background: rgba(0, 212, 170, 0.2);
}

/* Projects Page */
.projects-page {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.projects-header {
  text-align: center;
  margin-bottom: 3rem;
}

.projects-header h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.projects-header p {
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Project Grid */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.project-card .image {
  height: 180px;
  background: var(--bg-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 1.25rem;
}

.project-card .content {
  padding: 1.5rem;
}

.project-card .category {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: rgba(0, 212, 170, 0.1);
  color: var(--accent);
  font-size: 0.7rem;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.project-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.project-card p {
  color: var(--muted);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.project-card .status {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.project-card .buttons {
  display: flex;
  gap: 0.5rem;
}

.project-card .btn {
  flex: 1;
}

/* Semelion Page */
.semelion-page {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.ecosystem-hero {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 3rem;
}

.ecosystem-hero h2 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.ecosystem-hero p {
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Downloads Page */
.downloads-page {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.downloads-header {
  text-align: center;
  margin-bottom: 3rem;
}

.downloads-header h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.downloads-header p {
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto auto;
}

/* Download Card */
.download-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.download-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.download-card .version {
  font-size: 0.875rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
  display: block;
}

.download-card .platform {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 1rem;
  display: block;
}

.download-card .description {
  color: var(--muted);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.download-card .requirements {
  color: var(--muted);
  font-size: 0.75rem;
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.download-card .changelog {
  color: var(--accent);
  font-size: 0.75rem;
  cursor: pointer;
  margin-top: 1rem;
  display: block;
}

.download-card .changelog:hover {
  text-decoration: underline;
}

.download-card .changelog.open + .changelog-content {
  display: block;
}

.changelog-content {
  display: none;
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.4;
}

/* About Page */
.about-page {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.about-header {
  text-align: center;
  margin-bottom: 3rem;
}

.about-header h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.philosophy-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}

.philosophy-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

/* Contact Page */
.contact-page {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.contact-header {
  text-align: center;
  margin-bottom: 3rem;
}

.contact-header h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.contact-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.contact-method {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.contact-method:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(0, 212, 170, 0.15);
}

.contact-method .icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 1.25rem;
  background: var(--bg-medium);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--accent);
}

.contact-method h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--fg);
}

.contact-method p {
  color: var(--muted);
  font-size: 0.875rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.contact-method .contact-link {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius);
  background: rgba(0, 212, 170, 0.08);
  border: 1px solid rgba(0, 212, 170, 0.2);
  transition: background 0.2s ease, border-color 0.2s ease;
  word-break: break-all;
}

.contact-method .contact-link:hover {
  background: rgba(0, 212, 170, 0.2);
  border-color: var(--accent);
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .tech-card,
  .project-card,
  .download-card {
    transition: none;
  }
  
  .hamburger span {
    transition: none;
  }
  
  .mobile-nav {
    transition: none;
  }
}

/* Focus States */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

.footer p {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* Nav Logo Image */
.logo-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 4px;
}

/* Creator Profile Card */
.creator-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin: 2.5rem 0;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.creator-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.creator-avatar-wrap {
  position: relative;
  width: 90px;
  height: 90px;
  min-width: 90px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--accent);
  box-shadow: 0 0 16px rgba(0, 212, 170, 0.25);
  background: var(--bg-medium);
}

.creator-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.creator-info h3 {
  font-size: 1.3rem;
  margin-bottom: 0.25rem;
  color: var(--fg);
}

.creator-role {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.creator-bio {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Requirements Accordion & Table */
.req-details {
  margin: 1.5rem 0;
  background: rgba(22, 22, 31, 0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.req-details[open] {
  border-color: var(--accent);
}

.req-summary {
  cursor: pointer;
  user-select: none;
  padding: 1rem 1.25rem;
  background: var(--bg-medium);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  outline: none;
  transition: background 0.2s ease;
}

.req-summary:hover {
  background: rgba(0, 212, 170, 0.08);
}

.req-summary::-webkit-details-marker {
  display: none;
}

.req-summary::after {
  content: '▼';
  font-size: 0.75rem;
  color: var(--accent);
  transition: transform 0.2s ease;
}

.req-details[open] .req-summary::after {
  transform: rotate(180deg);
}

.req-table-wrapper {
  overflow-x: auto;
  padding: 1rem;
}

.req-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

.req-table th {
  padding: 0.75rem 0.85rem;
  background: rgba(0, 0, 0, 0.25);
  color: var(--accent);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.req-table td {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid rgba(42, 42, 58, 0.6);
  color: var(--fg);
}

.req-table tbody tr:last-child td {
  border-bottom: none;
}

.req-table tbody tr:hover {
  background: rgba(0, 212, 170, 0.04);
}

.req-table .model-name {
  font-weight: 600;
  color: #ffffff;
}

/* Button & Link Groups */
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.btn-hf {
  background: rgba(255, 210, 30, 0.1);
  border: 1px solid rgba(255, 210, 30, 0.4);
  color: #ffd21e;
}

.btn-hf:hover {
  background: rgba(255, 210, 30, 0.2);
  border-color: #ffd21e;
  color: #fff;
  box-shadow: 0 4px 15px rgba(255, 210, 30, 0.2);
}

/* Timeline */
.timeline {
  position: relative;
  max-width: 850px;
  margin: 2rem auto 0;
  padding-left: 2rem;
  border-left: 2px solid var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
  padding-left: 1.5rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -2.6rem;
  top: 0.2rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg-dark);
  box-shadow: 0 0 10px rgba(0, 212, 170, 0.5);
}

.timeline-date {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.timeline-title {
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
  color: var(--fg);
}

.timeline-desc {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* ========================================
   MOBILE NAVIGATION – FULL SCREEN OVERLAY
   ======================================== */
@media (max-width: 768px) {
  .nav-container {
    padding: 1rem;
  }

  .hamburger {
    display: flex;
    z-index: 1001;
  }

  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;              /* dynamic viewport height – covers exactly the visible area */
    background: var(--bg-dark);
    padding: 5rem 2rem 2rem;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 999;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;            /* no scrolling – everything fits */
    display: flex !important;
    pointer-events: auto;
    justify-content: center;     /* vertically center all items */
    align-items: center;         /* horizontally center */
    text-align: center;
  }

  .nav-links.active {
    transform: translateX(0);
  }

  /* Make links big but compact enough to fit */
  .nav-links a {
    font-size: 1.4rem;
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    display: inline-block;
    pointer-events: auto;
    letter-spacing: 0.5px;
    color: var(--fg);
    transition: color 0.2s ease, background 0.2s ease;
    border-radius: var(--radius);
  }

  .nav-links a:hover {
    color: var(--accent);
    background: rgba(0, 212, 170, 0.05);
  }

  .nav-links .download-btn {
    display: inline-block;
    padding: 0.7rem 2rem;
    font-size: 1.1rem;
    margin-top: 0.5rem;
    pointer-events: auto;
    background: var(--accent);
    color: var(--bg-dark);
    border-radius: var(--radius);
    width: auto;
    min-width: 180px;
    text-align: center;
    font-weight: 700;
  }

  .nav-links .download-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(0, 212, 170, 0.3);
  }

  .nav-links li {
    margin: 0;
  }

  /* Hero and other responsive tweaks */
  .hero h1 {
    font-size: 2.5rem;
  }

  .section-header h2 {
    font-size: 2rem;
  }

  .tech-grid,
  .project-grid,
  .philosophy-grid,
  .contact-methods {
    grid-template-columns: 1fr;
  }

  .creator-card {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .timeline {
    padding-left: 1.5rem;
  }

  .timeline-dot {
    left: -2.1rem;
  }
}