/* Import modern typography from Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&family=Fira+Code:wght@400;500&display=swap");

/* CSS Custom Properties for Design Tokens */
:root {
  --bg-primary: #08090d;
  --bg-secondary: #0f111a;
  --bg-tertiary: #171b26;
  --card-bg: rgba(23, 27, 38, 0.4);
  --card-border: rgba(255, 255, 255, 0.05);
  --card-border-hover: rgba(6, 182, 212, 0.3);

  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-indigo: #6366f1;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --font-sans: "Inter", sans-serif;
  --font-display: "Outfit", sans-serif;
  --font-mono: "Fira Code", monospace;

  --glow-cyan: 0 0 20px rgba(6, 182, 212, 0.15);
  --glow-emerald: 0 0 20px rgba(16, 185, 129, 0.15);

  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius: 12px;
  --max-width: 1200px;
}

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

html {
  scroll-behavior: smooth;
  /* Accounts for fixed header height */
  scroll-padding-top: 4.5rem;
  font-size: 16px;
  overflow-x: hidden;
  background-color: var(--bg-primary);
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
  max-width: 100%;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

/* Background Cyber Grid / Ambient Glows */
.network-flow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: -2;
  background-image:
    linear-gradient(rgba(6, 182, 212, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6, 182, 212, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: data-flow 20s linear infinite;
  pointer-events: none;
}

@keyframes data-flow {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(50px);
  }
}

.ambient-glow-1 {
  position: absolute;
  top: 10%;
  left: -10vw;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(
    circle,
    rgba(6, 182, 212, 0.08) 0%,
    rgba(0, 0, 0, 0) 70%
  );
  z-index: -1;
  pointer-events: none;
}

.ambient-glow-2 {
  position: absolute;
  top: 50%;
  right: -10vw;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(
    circle,
    rgba(16, 185, 129, 0.05) 0%,
    rgba(0, 0, 0, 0) 70%
  );
  z-index: -1;
  pointer-events: none;
}

/* Typography Utilities */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: normal;
}

h1 {
  font-size: 3rem;
  line-height: 1.1;
}

h2 {
  font-size: 2.25rem;
  margin-bottom: 1rem;
  text-align: center;
  position: relative;
}

h2 .gradient-text {
  background: linear-gradient(
    135deg,
    var(--text-primary) 30%,
    var(--text-secondary) 100%
  );
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

p {
  color: var(--text-secondary);
}

.gradient-text {
  background: linear-gradient(
    135deg,
    var(--accent-cyan) 0%,
    var(--accent-emerald) 100%
  );
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-top: -0.5rem;
  margin-bottom: 1.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Layout Containers */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
}

section {
  padding: 1rem 0;
  position: relative;
  scroll-margin-top: 0.5rem;
}

/* Header & Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(8, 9, 13, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
  transition: var(--transition-smooth);
}

.nav-container {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  height: 4.5rem;
  gap: 1.5rem;
}

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  grid-column: 1;
  color: #3252ba;
}

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

nav {
  grid-column: 2;
  display: flex;
  justify-content: center;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

nav a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  transition: var(--transition-smooth);
}

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

.header-cta {
  grid-column: 3;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.availability-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.35rem 0.75rem;
  border-radius: 50px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: var(--accent-emerald);
  white-space: nowrap;
}

.availability-badge .pulse-dot {
  width: 6px;
  height: 6px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }

  70% {
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--border-radius);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--accent-cyan) 0%,
    var(--accent-emerald) 100%
  );
  color: #171b26;
  border: none;
  box-shadow: var(--glow-cyan);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.3);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  border: 1px solid var(--card-border);
}

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

/* Hero Section */
.hero {
  padding-top: 10rem;
  padding-bottom: 6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-tagline {
  font-family: var(--font-mono);
  color: var(--accent-cyan);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1.5rem;
}

.hero h1 {
  max-width: 900px;
  margin-bottom: 1.5rem;
}

.hero h1 .highlight {
  position: relative;
  display: inline-block;
}

.hero-description {
  font-size: 1.25rem;
  max-width: 700px;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 4rem;
}

/* Terminal Component (Hero) */
.terminal-window {
  width: 100%;
  max-width: 800px;
  background: #0b0c10;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  text-align: left;
}

.terminal-header {
  background: #14161f;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--card-border);
}

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

.t-btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.t-close {
  background-color: #ef4444;
}

.t-min {
  background-color: #eab308;
}

.t-max {
  background-color: #22c55e;
}

.terminal-title {
  margin-left: 2rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.terminal-body {
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-primary);
  height: 280px;
  overflow-y: hidden;
  overflow-x: hidden;
}

.t-line {
  margin-bottom: 0.5rem;
}

.t-prompt {
  color: var(--accent-emerald);
}

.t-output {
  color: var(--text-secondary);
  padding-left: 1.25rem;
}

.t-cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background-color: var(--accent-cyan);
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* Stats Section */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  padding: 2rem;
  text-align: center;
  transition: var(--transition-smooth);
}

.stat-card:hover {
  transform: translateY(-5px);
  border-color: var(--card-border-hover);
  box-shadow: var(--glow-cyan);
}

.stat-number {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Expertise Grid */
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.expertise-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  padding: 2.5rem;
  transition: var(--transition-smooth);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.expertise-card:hover {
  transform: translateY(-5px);
  border-color: var(--card-border-hover);
  box-shadow: var(--glow-cyan);
}

.expertise-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: rgba(6, 182, 212, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  margin-bottom: 1.5rem;
}

.expertise-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.expertise-card p {
  margin-bottom: 1.5rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
}

/* Case Studies */
.case-studies-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.case-card {
  box-sizing: border-box;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 320px;
  transition: var(--transition-smooth);
}

.case-card:hover {
  transform: translateY(-5px);
  border-color: var(--card-border-hover);
  box-shadow: var(--glow-cyan);
}

.case-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-emerald);
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
}

.case-card h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.case-card p {
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

/* Interactive ROI Calculator Section */
.calculator-panel {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  background: linear-gradient(
    135deg,
    rgba(23, 27, 38, 0.6) 0%,
    rgba(15, 17, 26, 0.8) 100%
  );
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 3.5rem;
  box-shadow: var(--glow-cyan);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.calc-inputs {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.calc-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.calc-group label {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
}

.calc-val {
  color: var(--accent-cyan);
  font-weight: 700;
}

.range-slider {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 50px;
  outline: none;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-cyan);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
  transition: transform 0.1s;
}

.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.select-input {
  background: var(--bg-tertiary);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  width: 100%;
  max-width: 100%;
}

.select-input:focus {
  border-color: var(--accent-cyan);
}

.calc-results {
  background: rgba(8, 9, 13, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.calc-results-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 2rem;
  text-align: center;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 1rem;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.result-label {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.result-value {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent-emerald);
}

.result-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 1.5rem;
}

/* Timeline (Work Experience) */
.timeline-container {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.timeline-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--bg-tertiary);
  transform: translateX(-50%);
  z-index: 1;
}

.timeline-item {
  position: relative;
  margin-bottom: 4rem;
  width: 50%;
  z-index: 2;
}

.timeline-item:nth-child(even) {
  left: 50%;
  padding-left: 3rem;
}

.timeline-item:nth-child(odd) {
  left: 0;
  padding-right: 3rem;
  text-align: right;
}

.timeline-badge {
  position: absolute;
  top: 1.5rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--bg-primary);
  border: 3px solid var(--accent-cyan);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
  transition: var(--transition-smooth);
}

.timeline-item:nth-child(even) .timeline-badge {
  left: -8px;
}

.timeline-item:nth-child(odd) .timeline-badge {
  right: -8px;
}

.timeline-content {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  padding: 2rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  text-align: left;
}

.timeline-content:hover {
  border-color: var(--card-border-hover);
  box-shadow: var(--glow-cyan);
}

.timeline-content:hover .timeline-badge {
  background-color: var(--accent-cyan);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-cyan);
  margin-bottom: 0.5rem;
}

.timeline-content h3 {
  font-size: 1.3rem;
  margin-bottom: 0.25rem;
}

.timeline-company {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

/* Collapsible Experience Details */
.timeline-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0, 1, 0, 1);
  font-size: 0.9rem;
  border-top: 1px solid transparent;
  padding-top: 0;
  margin-top: 0;
}

.timeline-details ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.timeline-details li {
  position: relative;
  padding-left: 1.25rem;
  color: var(--text-secondary);
}

.timeline-details li::before {
  content: "⚡";
  position: absolute;
  left: 0;
  top: 0.1rem;
  color: var(--accent-cyan);
  font-size: 0.8rem;
}

.timeline-content.active .timeline-details {
  max-height: 1000px;
  border-top: 1px solid var(--card-border);
  padding-top: 1.25rem;
  margin-top: 1.25rem;
  transition: max-height 0.6s ease-in-out;
}

.timeline-toggle-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1rem;
  transition: var(--transition-smooth);
}

.timeline-toggle-btn::after {
  content: "→";
  display: inline-block;
  transition: transform 0.3s;
}

.timeline-content.active .timeline-toggle-btn::after {
  transform: rotate(90deg);
}

.timeline-content.active .timeline-toggle-btn {
  color: var(--accent-cyan);
}

/* Contact & Scheduling Section */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: start;
}

.contact-info h3 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.contact-info p {
  margin-bottom: 2.5rem;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  padding: 1.25rem;
  text-decoration: none;
  color: var(--text-primary);
  transition: var(--transition-smooth);
}

.contact-card:hover {
  transform: translateX(5px);
  border-color: var(--card-border-hover);
  box-shadow: var(--glow-cyan);
}

.contact-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: rgba(6, 182, 212, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  font-size: 1.2rem;
}

.contact-text h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.contact-text p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  word-break: break-word;
}

.scheduling-panel {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 3rem;
  text-align: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.calendar-preview-icon {
  font-size: 3rem;
  color: var(--accent-cyan);
  margin-bottom: 1.5rem;
}

.scheduling-panel h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.scheduling-panel p {
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

/* Footer */
footer {
  border-top: 1px solid var(--card-border);
  padding: 3rem 0;
  background-color: #050608;
  color: var(--text-secondary);
}

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

.footer-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: var(--transition-smooth);
}

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

/* Modal for Scheduling */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(8, 9, 13, 0.9);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  width: 90%;
  max-width: 800px;
  height: 600px;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal.active .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 2rem;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: none;
  z-index: 1010;
  transition: var(--transition-smooth);
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  width: 100%;
  height: 100%;
}

.modal-body iframe {
  width: 100%;
  height: 100%;
  border: none;
}

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

@media (max-width: 1200px) {
  nav ul {
    gap: 0.75rem;
  }

  nav a {
    font-size: 0.85rem;
  }
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  html {
    font-size: 15px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .case-studies-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .calculator-panel {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 2.5rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

@media (max-width: 1300px) {
  /* Header Navigation */
  .nav-container {
    display: flex;
    justify-content: space-between;
    max-width: 100vw;
  }

  .availability-badge {
    display: none;
  }

  .header-cta {
    gap: 0.5rem;
  }

  .btn {
    padding: 0.5rem 0.85rem;
    font-size: 0.85rem;
  }

  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    z-index: 100;
  }

  .mobile-menu-toggle svg {
    stroke: #f8fafc !important;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    display: block !important;
  }

  nav[aria-label="Main Navigation"] ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 4.5rem;
    left: 0;
    right: 0;
    height: calc(100vh - 4.5rem);
    background: rgba(15, 17, 26, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 2rem 1rem;
    border-bottom: 1px solid var(--card-border);
    z-index: 99;
  }

  nav[aria-label="Main Navigation"] ul.active {
    display: flex;
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 2.25rem;
  }

  h2 {
    font-size: 1.8rem;
  }

  .nav-container {
    padding: 0 0.5rem;
    gap: 0.5rem;
    max-width: 100vw;
  }

  .logo {
    font-size: 1.25rem;
  }

  .availability-badge {
    display: none;
  }

  .hero {
    padding-top: 8rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .case-studies-grid {
    grid-template-columns: 1fr;
  }

  .calculator-panel {
    padding: 1.5rem;
    gap: 1.5rem;
  }

  .calc-results {
    padding: 1.5rem;
  }

  .timeline-line {
    left: 20px;
  }

  .timeline-item,
  .timeline-item:nth-child(even),
  .timeline-item:nth-child(odd) {
    width: 100%;
    left: 0;
    padding-left: 3rem !important;
    padding-right: 0 !important;
    text-align: left !important;
  }

  .timeline-badge {
    left: 12px !important;
    right: auto !important;
  }

  .footer-content {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }
}

/* --- Carousel Styles --- */
.carousel-container {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  padding: 0 50px;
}

.carousel-track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 1rem;
  padding-top: 1rem;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.carousel-track::-webkit-scrollbar {
  display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.carousel-track {
  -ms-overflow-style: none;
  /* IE and Edge */
  scrollbar-width: none;
  /* Firefox */
}

.carousel-track .case-card {
  width: calc(33.333% - 0.667rem);
  flex: 0 0 auto;
  scroll-snap-align: start;
}

@media (max-width: 1024px) {
  .carousel-track .case-card {
    width: calc(50% - 0.5rem);
  }
}

@media (max-width: 767px) {
  .carousel-track .case-card {
    width: 100%;
  }
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.carousel-btn:hover {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

.carousel-btn.prev {
  left: 0;
}

.carousel-btn.next {
  right: 0;
}

@media (max-width: 1024px) {
  .carousel-container {
    padding: 0 40px;
  }

  .carousel-btn {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
    background: rgba(26, 29, 36, 0.9);
  }
}

@media (max-width: 480px) {
  .stats-grid {
    gap: 1rem;
  }

  .stat-card {
    padding: 1.25rem 0.5rem;
  }

  .stat-number {
    font-size: 2.25rem;
  }

  .stat-label {
    font-size: 0.75rem;
  }

  .carousel-container {
    padding: 0 24px;
  }

  .carousel-btn {
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
    background: rgba(26, 29, 36, 0.85);
  }

  .carousel-btn.prev {
    left: 2px;
  }

  .carousel-btn.next {
    right: 2px;
  }

  .scheduling-panel {
    padding: 2rem 1.5rem;
  }
}

/* Adjustments for extra small screens (e.g. iPhone SE, Galaxy Fold) */
@media (max-width: 360px) {
  header .logo {
    font-size: 1.1rem;
  }

  .nav-container {
    padding: 0 0.25rem;
    gap: 0.25rem;
  }

  .header-cta {
    gap: 0.25rem;
  }

  .btn {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
  }
}
