/* ============================================================
   DevHaus — Main Stylesheet
   Modern gradient IT agency theme · Dark/Light mode
   ============================================================ */

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

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

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
ul {
  list-style: none;
}
button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* ── CSS Custom Properties ────────────────────────────────── */
:root {
  --primary: #6366f1;
  --primary-light: #818cf8;
  --primary-dark: #4f46e5;
  --secondary: #06b6d4;
  --accent: #8b5cf6;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;

  --gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
  --gradient-alt: linear-gradient(135deg, #06b6d4 0%, #6366f1 100%);
  --gradient-text: linear-gradient(135deg, #6366f1, #06b6d4);
  --gradient-hero: linear-gradient(
    135deg,
    #0f0f1a 0%,
    #1a0a2e 50%,
    #0a1a2e 100%
  );

  /* Light mode defaults */
  --bg: #f8fafc;
  --bg-alt: #f1f5f9;
  --bg-card: #ffffff;
  --bg-nav: rgba(248, 250, 252, 0.92);
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.2);
  --radius: 0.75rem;
  --radius-lg: 1.25rem;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg: #0d0d1a;
  --bg-alt: #13131f;
  --bg-card: #1a1a2e;
  --bg-nav: rgba(13, 13, 26, 0.92);
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --border: #2d2d4a;
  --shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 60px rgba(99, 102, 241, 0.15);
}

/* ── Typography ───────────────────────────────────────────── */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
}
h2 {
  font-size: clamp(1.8rem, 4vw, 2.75rem);
}
h3 {
  font-size: 1.375rem;
}
h4 {
  font-size: 1.125rem;
}
p {
  color: var(--text-muted);
  line-height: 1.75;
}

.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  padding: 0.4rem 0.9rem;
  border-radius: 99px;
  margin-bottom: 1rem;
}

.section-title {
  margin-bottom: 0.75rem;
}
.section-desc {
  max-width: 600px;
  margin: 0 auto 3rem;
  text-align: center;
}

/* ── Layout Helpers ───────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 5rem 0;
}

.text-center {
  text-align: center;
}
.flex {
  display: flex;
}
.grid {
  display: grid;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.75rem;
  border-radius: 99px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: rgba(255, 255, 255, 0.15);
  transition: opacity var(--transition);
}
.btn:hover::before {
  opacity: 1;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
}

.btn-outline {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
}
.btn-outline:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

.btn-ghost {
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-sm {
  padding: 0.55rem 1.2rem;
  font-size: 0.875rem;
}
.btn-lg {
  padding: 1rem 2.25rem;
  font-size: 1.05rem;
}

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    border-color var(--transition);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border-color: rgba(99, 102, 241, 0.3);
}

.card-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius);
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 1.25rem;
  flex-shrink: 0;
}

/* ── Navbar ───────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg-nav);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: all var(--transition);
  height: 70px;
  display: flex;
  align-items: center;
}

.navbar.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow);
}

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

.nav-brand {
  font-size: 1.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition);
}
.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  background: rgba(99, 102, 241, 0.08);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all var(--transition);
}
.theme-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
}

#iconSun {
  display: none;
}
#iconMoon {
  display: block;
}
[data-theme="light"] #iconSun {
  display: block;
}
[data-theme="light"] #iconMoon {
  display: none;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
}
.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}
.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 70px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
  z-index: -2;
}
[data-theme="light"] .hero-bg {
  background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 50%, #eff6ff 100%);
}

/* Animated orbs */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  animation: floatOrb 8s ease-in-out infinite;
  z-index: -1;
}
.orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #6366f1, transparent);
  top: -150px;
  right: -150px;
}
.orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #06b6d4, transparent);
  bottom: -100px;
  left: 10%;
  animation-delay: -3s;
}
.orb-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, #8b5cf6, transparent);
  top: 40%;
  left: 40%;
  animation-delay: -6s;
}

/* Grid dots */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    circle,
    rgba(99, 102, 241, 0.15) 1px,
    transparent 1px
  );
  background-size: 40px 40px;
  z-index: -1;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-light);
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  padding: 0.45rem 1rem;
  border-radius: 99px;
  margin-bottom: 1.5rem;
}
.hero-badge .dot {
  width: 8px;
  height: 8px;
  background: var(--primary-light);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.hero-title {
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  max-width: 800px;
}

.hero-desc {
  font-size: 1.125rem;
  max-width: 560px;
  margin-bottom: 2.5rem;
  color: var(--text-muted);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.hero-scroll {
  margin-top: 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.scroll-line {
  width: 1px;
  height: 60px;
  background: var(--gradient);
  animation: scrollLine 2s ease-in-out infinite;
}

/* Typewriter cursor */
.typewriter::after {
  content: "|";
  animation: blink 0.7s step-end infinite;
  color: var(--primary);
}

/* ── Stats Bar ────────────────────────────────────────────── */
.stats-bar {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat-item {
}
.stat-number {
  font-size: 2.5rem;
  font-weight: 900;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 0.25rem;
}
.stat-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* ── Section: Services Preview ────────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.service-card {
  position: relative;
  padding: 2rem;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all var(--transition);
  overflow: hidden;
}
.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient);
  transform: scaleX(0);
  transition: transform var(--transition);
  transform-origin: left;
}
.service-card:hover::before {
  transform: scaleX(1);
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border-color: rgba(99, 102, 241, 0.3);
}

.service-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
  color: #fff;
}

.service-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
  color: var(--text);
}
.service-card p {
  font-size: 0.9rem;
  line-height: 1.65;
}

.service-card .learn-more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: 1.25rem;
  transition: gap var(--transition);
}
.service-card:hover .learn-more {
  gap: 0.75rem;
}

/* Color variants for service icons */
.icon-indigo {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
}
.icon-cyan {
  background: linear-gradient(135deg, #06b6d4, #0284c7);
}
.icon-violet {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}
.icon-emerald {
  background: linear-gradient(135deg, #10b981, #059669);
}
.icon-amber {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}
.icon-rose {
  background: linear-gradient(135deg, #f43f5e, #e11d48);
}

/* ── Section: About / Why Us ──────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.about-visual {
  position: relative;
}

.about-img-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}
.about-img-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient);
  opacity: 0.08;
  z-index: 1;
}

.about-card-float {
  position: absolute;
  bottom: -20px;
  right: -20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow-lg);
  z-index: 2;
}
.about-card-float .count {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.about-card-float .label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.feature-list {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 0.9rem;
  flex-shrink: 0;
}
.feature-item h4 {
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
  color: var(--text);
}
.feature-item p {
  font-size: 0.875rem;
}

/* ── Section: Portfolio Preview ───────────────────────────── */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.portfolio-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition:
    transform var(--transition),
    box-shadow var(--transition);
}
.portfolio-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.portfolio-img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--text-muted);
  position: relative;
  overflow: hidden;
}

.portfolio-img-bg {
  width: 100%;
  aspect-ratio: 16/10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  color: rgba(255, 255, 255, 0.6);
  position: relative;
}

.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: rgba(99, 102, 241, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  opacity: 0;
  transition: opacity var(--transition);
}
.portfolio-card:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-body {
  padding: 1.25rem;
}
.portfolio-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}
.tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 99px;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  border: 1px solid rgba(99, 102, 241, 0.2);
}
.portfolio-body h3 {
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.portfolio-body p {
  font-size: 0.875rem;
}

/* ── Filter Tabs ──────────────────────────────────────────── */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 3rem;
}
.filter-btn {
  padding: 0.55rem 1.25rem;
  border-radius: 99px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--gradient);
  color: #fff;
  border-color: transparent;
}

/* ── Testimonials ─────────────────────────────────────────── */
.testimonials {
  background: var(--bg-alt);
}

.testimonials-slider {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
}
.testimonial-card::before {
  content: "\201C";
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 5rem;
  line-height: 1;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.4;
  font-family: Georgia, serif;
}
.stars {
  color: #f59e0b;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}
.testimonial-card p {
  font-size: 0.925rem;
  line-height: 1.75;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}
.author-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}
.author-title {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── CTA Banner ───────────────────────────────────────────── */
.cta-section {
  background: var(--gradient);
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 6rem 0;
}
.cta-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.cta-section h2 {
  color: #fff;
  margin-bottom: 1rem;
}
.cta-section p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
  max-width: 550px;
  margin-left: auto;
  margin-right: auto;
}
.btn-white {
  background: #fff;
  color: var(--primary);
  font-weight: 700;
}
.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* ── Services Page ────────────────────────────────────────── */
.page-hero {
  padding: 140px 0 80px;
  background: var(--bg-alt);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient);
  opacity: 0.04;
}
.page-hero-title {
  margin-bottom: 0.75rem;
}
.page-hero-desc {
  max-width: 560px;
  margin: 0 auto;
  font-size: 1.1rem;
}

.services-full-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
}

.service-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding: 3rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: box-shadow var(--transition);
}
.service-detail:hover {
  box-shadow: var(--shadow-lg);
}
.service-detail.reverse {
  direction: rtl;
}
.service-detail.reverse > * {
  direction: ltr;
}

.service-detail-icon {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #fff;
  margin-bottom: 1.5rem;
}

.service-detail h2 {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}
.service-detail p {
  margin-bottom: 1.5rem;
}

.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.feature-tag {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.8rem;
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.08);
  color: var(--primary);
  border: 1px solid rgba(99, 102, 241, 0.15);
}

.service-visual {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  color: rgba(255, 255, 255, 0.5);
  position: relative;
}
.service-visual .float-badge {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
}

/* Process Steps */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  position: relative;
}
.process-grid::before {
  content: "";
  position: absolute;
  top: 30px;
  left: 15%;
  right: 15%;
  height: 2px;
  background: var(--gradient);
  opacity: 0.3;
}

.process-step {
  text-align: center;
}
.step-num {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  font-weight: 800;
  font-size: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 1;
}
.process-step h4 {
  margin-bottom: 0.5rem;
  color: var(--text);
}

/* Tech Stack */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.25rem;
}
.tech-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  transition: all var(--transition);
}
.tech-item:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}
.tech-item i {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
  display: block;
}
.tech-item span {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* ── Portfolio Page ───────────────────────────────────────── */
.portfolio-full-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.portfolio-item {
  display: none;
}
.portfolio-item.visible {
  display: block;
}

/* ── Contact Page ─────────────────────────────────────────── */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  align-items: start;
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 2rem;
}
.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.contact-info-item .icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  flex-shrink: 0;
}
.contact-info-item h4 {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.contact-info-item p {
  font-size: 0.875rem;
}

/* Form Styles */
.contact-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.form-group {
  margin-bottom: 1.25rem;
}
.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.form-group label .req {
  color: var(--danger);
  margin-left: 0.2rem;
}
.form-control {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.925rem;
  font-family: inherit;
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.form-control::placeholder {
  color: var(--text-muted);
}
select.form-control {
  cursor: pointer;
}
textarea.form-control {
  resize: vertical;
  min-height: 140px;
}

.form-feedback {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  display: none;
}
.form-feedback.success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
  display: block;
}
.form-feedback.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  display: block;
}

.btn-submit {
  width: 100%;
  justify-content: center;
  padding: 1rem;
  font-size: 1rem;
}
.btn-loading {
  opacity: 0.7;
  pointer-events: none;
}

/* ── Footer ───────────────────────────────────────────────── */
.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 5rem 0 2rem;
  position: relative;
  overflow: hidden;
}
.footer-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(
    ellipse at top,
    rgba(99, 102, 241, 0.08),
    transparent 70%
  );
  pointer-events: none;
}

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

.footer-brand {
}
.footer-brand p {
  font-size: 0.9rem;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  max-width: 280px;
}
.footer-brand .nav-brand {
  margin-bottom: 0.75rem;
}

.social-links {
  display: flex;
  gap: 0.75rem;
}
.social-links a {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: all var(--transition);
}
.social-links a:hover {
  background: var(--gradient);
  color: #fff;
  border-color: transparent;
}

.footer-col h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.footer-col ul li a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer-col ul li a:hover {
  color: var(--primary);
}

.footer-contact li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.footer-contact li i {
  color: var(--primary);
  font-size: 0.875rem;
  width: 16px;
}
.footer-contact li a,
.footer-contact li span {
  font-size: 0.875rem;
  color: var(--text-muted);
}
.footer-contact li a:hover {
  color: var(--primary);
}

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

/* ── Admin Panel ──────────────────────────────────────────── */
.admin-body {
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
}
.login-logo {
  text-align: center;
  margin-bottom: 2rem;
}
.login-logo .brand-icon {
  margin: 0 auto 0.75rem;
}
.login-card h2 {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 0.4rem;
}
.login-card .sub {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}
.login-alert {
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  display: none;
}
.login-alert.show {
  display: block;
}
.password-wrap {
  position: relative;
}
.password-wrap .form-control {
  padding-right: 3rem;
}
.toggle-pw {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  transition: color var(--transition);
}
.toggle-pw:hover {
  color: var(--primary);
}

/* Admin Dashboard */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 260px;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
}

.admin-main {
  flex: 1;
  margin-left: 260px;
  padding: 2rem;
}

.admin-sidebar .nav-brand {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-nav {
  flex: 1;
}
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  transition: all var(--transition);
}
.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
}
.sidebar-nav a i {
  width: 20px;
  text-align: center;
}

.badge-count {
  margin-left: auto;
  font-size: 0.75rem;
  background: var(--danger);
  color: #fff;
  border-radius: 99px;
  padding: 0.1rem 0.5rem;
  font-weight: 700;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.admin-header h1 {
  font-size: 1.5rem;
  margin: 0;
}
.admin-header p {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin: 0;
}

.stats-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.stat-card .icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #fff;
  flex-shrink: 0;
}
.stat-card .value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}
.stat-card .label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 0.2rem;
}

.messages-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.table-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.table-header h3 {
  font-size: 1rem;
  margin: 0;
}

.search-input {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.875rem;
  width: 220px;
  transition: border-color var(--transition);
  outline: none;
  font-family: inherit;
}
.search-input:focus {
  border-color: var(--primary);
}

table {
  width: 100%;
  border-collapse: collapse;
}
thead th {
  padding: 0.875rem 1.25rem;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
  white-space: nowrap;
}
tbody td {
  padding: 1rem 1.25rem;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: top;
}
tbody tr:last-child td {
  border-bottom: none;
}
tbody tr:hover td {
  background: rgba(99, 102, 241, 0.03);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.7rem;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.status-unread {
  background: rgba(99, 102, 241, 0.12);
  color: var(--primary);
}
.status-read {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-muted);
}
.status-replied {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}

.action-btns {
  display: flex;
  gap: 0.4rem;
}
.action-btn {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--bg);
  cursor: pointer;
  transition: all var(--transition);
}
.action-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform var(--transition);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.4);
}
.modal-overlay.open .modal {
  transform: translateY(0);
}
.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h3 {
  font-size: 1.1rem;
  margin: 0;
}
.modal-close {
  color: var(--text-muted);
  font-size: 1.1rem;
}
.modal-close:hover {
  color: var(--danger);
}
.modal-body {
  padding: 1.5rem;
}
.detail-row {
  margin-bottom: 1rem;
}
.detail-row label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.35rem;
}
.detail-row p {
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  white-space: pre-wrap;
}

/* ── Animations ───────────────────────────────────────────── */
@keyframes floatOrb {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(30px, -30px) scale(1.05);
  }
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.85);
  }
}
@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}
@keyframes scrollLine {
  0% {
    opacity: 1;
    transform: scaleY(1) translateY(0);
  }
  50% {
    opacity: 0;
    transform: scaleY(0.5) translateY(30px);
  }
  51% {
    opacity: 0;
    transform: scaleY(0.5) translateY(-10px);
  }
  100% {
    opacity: 1;
    transform: scaleY(1) translateY(0);
  }
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}
.reveal.from-left {
  transform: translateX(-40px);
}
.reveal.from-right {
  transform: translateX(40px);
}
.reveal.visible {
  opacity: 1;
  transform: translate(0);
}
.reveal-delay-1 {
  transition-delay: 0.1s;
}
.reveal-delay-2 {
  transition-delay: 0.2s;
}
.reveal-delay-3 {
  transition-delay: 0.3s;
}
.reveal-delay-4 {
  transition-delay: 0.4s;
}
.reveal-delay-5 {
  transition-delay: 0.5s;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .about-visual {
    order: -1;
  }
  .tech-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .process-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .process-grid::before {
    display: none;
  }
  .stats-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .service-detail {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .service-detail.reverse {
    direction: ltr;
  }
  .admin-main {
    padding: 1.5rem;
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }
  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg-nav);
    backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 1.5rem;
    gap: 0.25rem;
    transform: translateY(-110%);
    transition: transform var(--transition);
    border-bottom: 1px solid var(--border);
    z-index: 999;
  }
  .nav-links.open {
    transform: translateY(0);
  }
  .nav-link {
    padding: 0.75rem 1rem;
    width: 100%;
  }
  .nav-actions .btn-sm {
    display: none;
  }

  h1 {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .services-grid {
    grid-template-columns: 1fr;
  }
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
  .portfolio-full-grid {
    grid-template-columns: 1fr;
  }
  .testimonials-slider {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .footer-brand {
    grid-column: 1/-1;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
  .contact-layout {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    display: none;
  }
  .admin-main {
    margin-left: 0;
  }
  .tech-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
  .stats-cards {
    grid-template-columns: 1fr 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .tech-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-cta {
    flex-direction: column;
    width: 100%;
  }
  .hero-cta .btn {
    justify-content: center;
    width: 100%;
  }
  section {
    padding: 3.5rem 0;
  }
}
