/* ==========================================================================
   OptiDev - Software Development & Linux Administration
   Modern Responsive Design System
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-primary: #0a0d14;
  --bg-secondary: #121824;
  --bg-card: rgba(18, 24, 36, 0.7);
  --bg-card-hover: rgba(26, 35, 52, 0.85);
  
  --accent-cyan: #00f2fe;
  --accent-blue: #4facfe;
  --accent-green: #10b981;
  --accent-purple: #8b5cf6;
  
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-active: rgba(0, 242, 254, 0.4);
  
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  --shadow-glow: 0 0 30px rgba(0, 242, 254, 0.15);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

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

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

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-main);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Dynamic Background Glows */
body::before {
  content: '';
  position: fixed;
  top: -10%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(0, 242, 254, 0.08) 0%, rgba(0,0,0,0) 70%);
  pointer-events: none;
  z-index: -1;
}

body::after {
  content: '';
  position: fixed;
  bottom: -10%;
  right: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, rgba(0,0,0,0) 70%);
  pointer-events: none;
  z-index: -1;
}

/* Container */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Typography Helpers */
.gradient-text {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-green-text {
  background: linear-gradient(135deg, #10b981, #00f2fe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  background: rgba(0, 242, 254, 0.06);
  border: 1px solid rgba(0, 242, 254, 0.2);
  border-radius: var(--radius-full);
  color: var(--accent-cyan);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  .section-title {
    font-size: 1.85rem;
  }
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.125rem;
  max-width: 650px;
  margin: 0 auto 3rem auto;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.25rem 0;
  transition: var(--transition-normal);
}

.navbar.scrolled {
  background: rgba(10, 13, 20, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.85rem 0;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
  font-size: 1.35rem;
  font-weight: 800;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0a0d14;
  font-size: 1.25rem;
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.3);
}

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

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-cyan);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition-normal);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: #040810;
  box-shadow: 0 4px 20px rgba(0, 242, 254, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 242, 254, 0.4);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateY(-2px);
}

/* Hero Section */
.hero {
  padding: 10rem 0 6rem 0;
  position: relative;
  overflow: hidden;
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 1rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-full);
  color: var(--accent-green);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.2); }
  100% { opacity: 1; transform: scale(1); }
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Terminal Card Mockup */
.terminal-card {
  background: rgba(13, 17, 23, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card), var(--shadow-glow);
  overflow: hidden;
  font-family: var(--font-mono);
}

.terminal-header {
  background: rgba(255, 255, 255, 0.04);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.terminal-title {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.terminal-body {
  padding: 1.5rem;
  font-size: 0.875rem;
  line-height: 1.8;
  color: #e6edf3;
}

.cmd-prompt {
  color: var(--accent-cyan);
  margin-right: 0.5rem;
}

.cmd-output {
  color: var(--text-muted);
  margin-left: 1rem;
  margin-bottom: 0.75rem;
}

.cmd-success {
  color: var(--accent-green);
}

/* Stats Section */
.stats-section {
  padding: 3rem 0;
  border-y: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.01);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  text-align: center;
}

.stat-item h3 {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--accent-cyan);
  margin-bottom: 0.3rem;
}

.stat-item p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Services Section */
.services {
  padding: 7rem 0;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  opacity: 0;
  transition: var(--transition-normal);
}

.service-card:hover {
  transform: translateY(-6px);
  background: var(--bg-card-hover);
  border-color: var(--border-active);
  box-shadow: var(--shadow-card);
}

.service-card:hover::before {
  opacity: 1;
}

.service-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: rgba(0, 242, 254, 0.08);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(0, 242, 254, 0.2);
}

.service-card h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

.service-list {
  list-style: none;
}

.service-list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.875rem;
  color: var(--text-main);
  margin-bottom: 0.6rem;
}

.service-list li i {
  color: var(--accent-cyan);
  font-size: 0.8rem;
}

/* Tech Stack Section */
.tech-stack {
  padding: 5rem 0;
  background: rgba(255, 255, 255, 0.015);
  border-y: 1px solid var(--border-color);
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.tech-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  transition: var(--transition-normal);
}

.tech-card i {
  font-size: 2.2rem;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.tech-card span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.tech-card:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-4px);
  background: rgba(0, 242, 254, 0.04);
}

.tech-card:hover i {
  color: var(--accent-cyan);
}

.tech-card:hover span {
  color: var(--text-main);
}

/* Features / Why Choose Us */
.features {
  padding: 7rem 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.feature-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 2rem;
  transition: var(--transition-normal);
}

.feature-box:hover {
  border-color: var(--border-active);
  background: var(--bg-card-hover);
}

.feature-icon {
  font-size: 2rem;
  color: var(--accent-purple);
  margin-bottom: 1rem;
}

.feature-box h4 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.feature-box p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Contact Section */
.contact-section {
  padding: 7rem 0;
  background: relative;
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 3.5rem;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.contact-info h3 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.contact-info p {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.info-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.info-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.2);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.info-content h5 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.info-content p {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin: 0;
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 0.85rem 1.1rem;
  background: rgba(10, 13, 20, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.95rem;
  font-family: var(--font-main);
  transition: var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.2);
}

textarea.form-control {
  resize: vertical;
  min-height: 130px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Alert Message Box */
.form-alert {
  padding: 1rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  display: none;
  align-items: center;
  gap: 0.75rem;
  animation: fadeIn 0.3s ease;
}

.form-alert.success {
  display: flex;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.form-alert.error {
  display: flex;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(0, 0, 0, 0.3);
  border-top-color: #040810;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

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

/* Footer */
.footer {
  background: rgba(6, 9, 14, 0.95);
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  margin-top: 1rem;
  max-width: 320px;
  line-height: 1.6;
}

.footer-col h5 {
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition-fast);
}

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

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Mobile Responsive Adjustments */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

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

  .contact-wrapper {
    grid-template-columns: 1fr;
    padding: 2rem;
  }

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

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(10, 13, 20, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    transform: translateY(-150%);
    transition: var(--transition-normal);
  }

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

  .mobile-toggle {
    display: block;
  }

  .hero-title {
    font-size: 2.3rem;
  }

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