:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #eef3ff;
  --text: #0f172a;
  --muted: #5e6b85;
  --border: rgba(15, 23, 42, 0.08);
  --primary: #0b3cff;
  --primary-2: #2563eb;
  --primary-3: #49a3ff;
  --shadow: 0 12px 40px rgba(15, 23, 42, 0.04), 0 2px 8px rgba(15, 23, 42, 0.02);
  --shadow-2: 0 16px 36px rgba(37, 99, 235, 0.16);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark {
  --bg: #070d19;
  --surface: #0f172a;
  --surface-2: #15223f;
  --text: #f8fafc;
  --muted: #94a3b8;
  --border: rgba(255, 255, 255, 0.06);
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
  --shadow-2: 0 16px 36px rgba(37, 99, 235, 0.12);
}

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

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

/* --- Global Watermark System --- */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background 0.4s ease, color 0.4s ease;
  overflow-x: hidden;
  position: relative;
}


}

body.dark::before {
  color: rgba(255, 255, 255, 0.015);
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

button {
  font: inherit;
  outline: none;
}

.container {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

.section {
  padding: 100px 0;
}

.section-head {
  text-align: center;
  margin-bottom: 56px;
}

.section-head h2 {
  font-size: clamp(32px, 4.5vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.section-head p {
  max-width: 680px;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

/* --- Header & Navigation --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

body.dark .site-header {
  background: rgba(7, 13, 25, 0.75);
}

.navbar {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.logo img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
}

.logo-text h1 {
  font-size: 19px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo-text p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  color: var(--muted);
  font-weight: 600;
  font-size: 15px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* --- Interactive Elements & Buttons --- */
.btn {
  border: none;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.toggle-btn,
.menu-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.cta-btn {
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  box-shadow: var(--shadow-2);
}

.cta-btn:hover,
.primary-btn:hover {
  opacity: 0.95;
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.25);
}

.toggle-btn:hover,
.menu-btn:hover,
.secondary-btn:hover {
  background: var(--surface-2);
  transform: translateY(-1px);
}

.menu-btn {
  display: none;
  font-size: 20px;
}

.mobile-menu {
  display: none;
  padding: 8px 0 24px;
}

.mobile-menu a {
  display: block;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-weight: 600;
}

main {
  padding-top: 80px;
}

/* --- Hero Section --- */
.hero {
  min-height: calc(100vh - 80px);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 64px;
  padding: 60px 0;
  position: relative;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--primary);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--primary);
}

.hero h2 {
  font-size: clamp(40px, 5.5vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.hero p {
  margin-top: 24px;
  font-size: 18px;
  line-height: 1.75;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 36px;
}

.primary-btn,
.secondary-btn {
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 16px;
}

.primary-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: var(--shadow-2);
}

.secondary-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: var(--shadow);
}

/* --- Metric Stats Cards --- */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.stat:hover {
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, 0.2);
}

.stat strong {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.stat span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

/* --- Hero Feature Panel --- */
.hero-panel {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(11, 60, 255, 0.04), rgba(37, 99, 235, 0.01));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  padding: 40px;
}

.hero-badge {
  position: absolute;
  left: 24px;
  top: 24px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 99px;
  padding: 8px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #0f172a;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

body.dark .hero-badge {
  background: rgba(15, 23, 42, 0.85);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.1);
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-2);
  position: relative;
}

.hero-badge .dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: inherit;
  animation: pulse 2s infinite;
}

.hero-image {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-image img {
  width: 100%;
  max-width: 440px;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-md);
  animation: floatHero 5s ease-in-out infinite;
}

/* --- Card Architecture & Layouts --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  padding: 32px;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.06);
  border-color: rgba(37, 99, 235, 0.15);
}

.card .icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  background: rgba(37, 99, 235, 0.06);
  color: var(--primary);
  font-size: 20px;
  margin-bottom: 24px;
}

.card h3 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.card p {
  color: var(--muted);
  line-height: 1.65;
  font-size: 15px;
}

/* --- Panels & Split Grids --- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 40px;
}

.panel h3 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.panel p {
  color: var(--muted);
  line-height: 1.7;
  font-size: 16px;
}

.list {
  list-style: none;
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.list li {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 500;
  font-size: 14.5px;
}

/* --- Project Grid Cards --- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}

.project-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover img {
  transform: scale(1.03);
}

.project-body {
  padding: 24px;
}

.project-body .tag {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 99px;
  background: rgba(37, 99, 235, 0.06);
  color: var(--primary);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.project-body h3 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 10px;
}

.project-body p {
  color: var(--muted);
  line-height: 1.65;
  font-size: 15px;
}

/* --- Unified Contact Interface --- */
.contact-box {
  background: linear-gradient(135deg, #0b3cff 0%, #1d4ed8 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 56px;
  box-shadow: var(--shadow-2);
  position: relative;
  overflow: hidden;
}

.contact-box h2 {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.contact-box p {
  font-size: 17px;
  line-height: 1.65;
  max-width: 640px;
  opacity: 0.9;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.contact-item {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 20px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: var(--transition);
}

.contact-item:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.contact-item strong {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.8;
}

.contact-item span {
  display: block;
  font-size: 16px;
  font-weight: 600;
}

footer {
  padding: 40px 0;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid var(--border);
}

/* --- Scroll Revelations & Layout Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.215, 0.61, 0.355, 1), transform 0.6s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@keyframes floatHero {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.5; box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.5); }
  70% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 8px rgba(37, 99, 235, 0); }
  100% { transform: scale(0.95); opacity: 0.5; box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

/* --- Advanced Media Queries --- */
@media (max-width: 1120px) {
  .card-grid,
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 980px) {
  .nav-links,
  .site-header .cta-btn {
    display: none;
  }
  
  .menu-btn {  
    display: grid;  
  }  
  
  .mobile-menu.open {  
    display: block;  
  }  
  
  .hero {  
    grid-template-columns: 1fr;  
    text-align: center;  
    gap: 48px;
    padding: 40px 0;
  }  
  
  .hero h2,  
  .hero p {  
    margin-left: auto;  
    margin-right: auto;  
  }  
  
  .hero-actions {  
    justify-content: center;  
  }  
  
  .hero-stats,  
  .split,  
  .contact-grid {  
    grid-template-columns: 1fr;  
  }  
  
  .hero-panel {  
    min-height: auto;
    padding: 32px;
  }  
}

@media (max-width: 720px) {
  .card-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }
  .section {
    padding: 64px 0;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 32px, 1200px);
  }
  
  .navbar {  
    height: 72px;  
  }  
  
  .hero h2 {  
    font-size: 36px;  
  }  
  
  .contact-box {  
    padding: 32px 24px;  
  }  
}
