/* ==========================================
   SMUtils Modern Dark Theme
   Mobile-First Responsive Design
   ========================================== */

:root {
  /* Dark Theme Color Palette */
  --bg-primary: #0a0a0a;
  --bg-secondary: #1a1a1a;
  --bg-accent: #252525;
  --text-primary: #e0e0e0;
  --text-secondary: #a0a0a0;
  --text-muted: #707070;
  --accent-primary: #00d4ff;
  --accent-secondary: #0099cc;
  --accent-hover: #00e5ff;
  --border-color: #333333;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  
  /* Typography */
  --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Courier New', monospace;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;
  
  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 250ms ease-in-out;
  --transition-slow: 400ms ease-in-out;
}

/* ==========================================
   Skip to Content Link
   ========================================== */

.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  background: var(--accent-primary);
  color: var(--bg-primary);
  padding: 0.5rem 1rem;
  z-index: 1000;
  transform: translateY(-100%);
  transition: transform var(--transition-fast);
}

.skip-link:focus {
  transform: translateY(0);
}

/* ==========================================
   Reset & Base Styles
   ========================================== */

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

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

body {
  font-family: var(--font-primary);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================
   Typography
   ========================================== */

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

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

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

p {
  margin-bottom: var(--spacing-sm);
  color: var(--text-secondary);
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

/* ==========================================
   Navigation
   ========================================== */

nav {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  background-color: rgba(26, 26, 26, 0.95);
}

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

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

.logo-image {
  height: 40px;
  width: auto;
  display: block;
}

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

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--spacing-md);
  align-items: center;
}

.nav-menu li a {
  color: var(--text-secondary);
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
  transition: color var(--transition-fast);
}

.nav-menu li a:hover {
  color: var(--text-primary);
}

.nav-menu li a.active {
  color: var(--accent-primary);
}

.nav-menu li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-primary);
  transition: width var(--transition-normal);
}

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

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }
  
  .nav-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0;
    margin-top: var(--spacing-sm);
  }
  
  .nav-menu.active {
    display: flex;
  }
  
  .nav-menu li {
    width: 100%;
    text-align: center;
    border-top: 1px solid var(--border-color);
  }
  
  .nav-menu li a {
    display: block;
    padding: var(--spacing-sm);
  }
}

/* ==========================================
   Main Content Container
   ========================================== */

main {
  flex: 1;
  width: 100%;
}

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

.container-narrow {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--spacing-md);
}

/* ==========================================
   Hero Section
   ========================================== */

.hero {
  padding: var(--spacing-xl) var(--spacing-md);
  text-align: center;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  border-bottom: 1px solid var(--border-color);
}

.hero h1 {
  margin-bottom: var(--spacing-sm);
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  max-width: 700px;
  margin: 0 auto var(--spacing-md);
}

.hero-subtitle {
  color: var(--accent-primary);
  font-weight: 500;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
}

/* ==========================================
   Sections
   ========================================== */

section {
  padding: var(--spacing-lg) 0;
}

.section-title {
  text-align: center;
  margin-bottom: var(--spacing-lg);
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  margin: var(--spacing-sm) auto 0;
  border-radius: 2px;
}

/* ==========================================
   Cards & Grid Layouts
   ========================================== */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
}

.card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: var(--spacing-md);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-primary);
}

.card h3 {
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
}

.card p {
  flex: 1;
  font-size: 0.95rem;
}

.card-footer {
  margin-top: var(--spacing-sm);
  padding-top: var(--spacing-sm);
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

/* ==========================================
   Buttons & Links
   ========================================== */

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: var(--accent-primary);
  color: var(--bg-primary);
  font-weight: 600;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
  font-size: 1rem;
}

.btn:hover {
  background-color: var(--accent-hover);
  color: var(--bg-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

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

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

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

/* ==========================================
   Download Items
   ========================================== */

.download-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.download-item {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: var(--spacing-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--spacing-md);
  transition: all var(--transition-normal);
}

.download-item:hover {
  border-color: var(--accent-primary);
  background-color: var(--bg-accent);
  transform: translateX(4px);
}

.download-info h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.download-info p {
  margin-bottom: 0;
  font-size: 0.9rem;
}

.download-meta {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: 0.5rem;
}

.tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: var(--bg-accent);
  color: var(--accent-primary);
  border-radius: 4px;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  border: 1px solid var(--border-color);
}

/* ==========================================
   Portfolio Items
   ========================================== */

.portfolio-item {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: all var(--transition-normal);
}

.portfolio-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-primary);
}

.portfolio-image {
  width: 100%;
  aspect-ratio: 16/10;
  background-color: var(--bg-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 3rem;
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
}

.portfolio-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.portfolio-content {
  padding: var(--spacing-md);
}

.portfolio-content h3 {
  margin-bottom: var(--spacing-xs);
}

.portfolio-content p {
  margin-bottom: var(--spacing-sm);
  font-size: 0.95rem;
}

/* ==========================================
   Contact Section
   ========================================== */

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
}

.contact-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: var(--spacing-md);
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  transition: all var(--transition-normal);
}

.contact-card:hover {
  border-color: var(--accent-primary);
  background-color: var(--bg-accent);
}

.contact-icon {
  font-size: 2rem;
  color: var(--accent-primary);
  width: 60px;
  text-align: center;
}

.contact-details h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.contact-details p {
  margin-bottom: 0;
}

/* ==========================================
   Contact Form
   ========================================== */

.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: var(--spacing-md);
}

.form-group label {
  display: block;
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: var(--spacing-xs);
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: var(--font-primary);
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
  background-color: var(--bg-accent);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.btn-submit {
  width: 100%;
  position: relative;
  margin-top: var(--spacing-sm);
}

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

.btn-loading {
  display: none;
}

.form-message {
  padding: var(--spacing-sm);
  border-radius: 6px;
  margin-bottom: var(--spacing-sm);
  display: none;
  font-weight: 500;
}

.form-message.success {
  display: block;
  background-color: rgba(0, 212, 100, 0.1);
  border: 1px solid rgba(0, 212, 100, 0.3);
  color: #00d464;
}

.form-message.error {
  display: block;
  background-color: rgba(255, 77, 77, 0.1);
  border: 1px solid rgba(255, 77, 77, 0.3);
  color: #ff4d4d;
}

/* ==========================================
   Footer
   ========================================== */

footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: var(--spacing-lg) var(--spacing-md) var(--spacing-md);
  margin-top: auto;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-lg);
}

.footer-section h3 {
  color: var(--accent-primary);
  margin-bottom: var(--spacing-sm);
  font-size: 1.1rem;
}

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

.footer-section ul li {
  margin-bottom: var(--spacing-xs);
}

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

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

.footer-bottom {
  max-width: 1400px;
  margin: var(--spacing-md) auto 0;
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.social-links {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-sm);
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--bg-accent);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.social-link:hover {
  background-color: var(--accent-primary);
  color: var(--bg-primary);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

/* ==========================================
   Utilities
   ========================================== */

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

.text-muted {
  color: var(--text-muted);
}

.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }

.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }

/* ==========================================
   Animations
   ========================================== */

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

.fade-in {
  animation: fadeIn var(--transition-slow) ease-out;
}

/* ==========================================
   Responsive Design
   ========================================== */

@media (max-width: 768px) {
  .container {
    padding: var(--spacing-sm);
  }
  
  .hero {
    padding: var(--spacing-md) var(--spacing-sm);
  }
  
  section {
    padding: var(--spacing-md) 0;
  }
  
  .card-grid {
    grid-template-columns: 1fr;
  }
  
  .download-item {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
}

@media (max-width: 480px) {
  :root {
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
  }
  
  .nav-container {
    padding: var(--spacing-sm);
  }
}

/* ==========================================
   Cookie Consent Banner
   ========================================== */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--bg-secondary);
  border-top: 2px solid var(--accent-primary);
  padding: var(--spacing-md);
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  transform: translateY(100%);
  transition: transform var(--transition-normal);
}

.cookie-banner.show {
  transform: translateY(0);
}

.cookie-banner-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

.cookie-banner-text {
  flex: 1;
  min-width: 300px;
}

.cookie-banner-text h3 {
  color: var(--text-primary);
  margin-bottom: var(--spacing-xs);
  font-size: 1.1rem;
}

.cookie-banner-text p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: var(--spacing-xs);
}

.cookie-banner-text a {
  color: var(--accent-primary);
  text-decoration: underline;
}

.cookie-banner-text a:hover {
  color: var(--accent-hover);
}

.cookie-banner-buttons {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.cookie-banner-buttons .btn {
  white-space: nowrap;
}

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

.btn-reject:hover {
  background-color: var(--bg-accent);
  color: var(--text-primary);
  border-color: var(--text-muted);
}

@media (max-width: 768px) {
  .cookie-banner-content {
    flex-direction: column;
    align-items: stretch;
  }
  
  .cookie-banner-text {
    min-width: 100%;
  }
  
  .cookie-banner-buttons {
    width: 100%;
    justify-content: stretch;
  }
  
  .cookie-banner-buttons .btn {
    flex: 1;
  }
}

/* ==========================================
   Legal Content Styling
   ========================================== */

.legal-content {
  color: var(--text-secondary);
  line-height: 1.8;
}

.legal-content h2 {
  color: var(--text-primary);
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-sm);
  font-size: 1.5rem;
  border-bottom: 2px solid var(--accent-primary);
  padding-bottom: var(--spacing-xs);
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content h3 {
  color: var(--text-primary);
  margin-top: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
  font-size: 1.2rem;
}

.legal-content p {
  margin-bottom: var(--spacing-sm);
}

.legal-content ul, .legal-content ol {
  margin-left: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
}

.legal-content li {
  margin-bottom: var(--spacing-xs);
}

.legal-content a {
  color: var(--accent-primary);
  text-decoration: underline;
}

.legal-content a:hover {
  color: var(--accent-hover);
}

.legal-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.cookie-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--spacing-md) 0;
  background-color: var(--bg-secondary);
  border-radius: 8px;
  overflow: hidden;
}

.cookie-table thead {
  background-color: var(--bg-accent);
}

.cookie-table th {
  color: var(--text-primary);
  font-weight: 600;
  text-align: left;
  padding: var(--spacing-sm);
  border-bottom: 2px solid var(--accent-primary);
}

.cookie-table td {
  padding: var(--spacing-sm);
  border-bottom: 1px solid var(--border-color);
}

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

.cookie-table tbody tr:hover {
  background-color: var(--bg-accent);
}

@media (max-width: 768px) {
  .cookie-table {
    font-size: 0.9rem;
  }
  
  .cookie-table th,
  .cookie-table td {
    padding: var(--spacing-xs);
  }
}