/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-primary: #080c14;
  --bg-secondary: #0f1525;
  --bg-card: #151d30;
  --bg-card-hover: #1c2744;
  --bg-input: #0d1321;
  --border-color: #1e2d4a;
  --border-accent: #2a4a8a;
  --text-primary: #eef2ff;
  --text-secondary: #a8b8d8;
  --text-muted: #6b7da6;
  --accent: #3b82f6;
  --accent-light: #60a5fa;
  --accent-dark: #1d4ed8;
  --accent-glow: rgba(59, 130, 246, 0.25);
  --green: #10b981;
  --green-glow: rgba(16, 185, 129, 0.25);
  --purple: #8b5cf6;
  --purple-glow: rgba(139, 92, 246, 0.25);
  --red: #ef4444;
  --orange: #f59e0b;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow: 0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.6);
  --transition: 0.25s ease;
  --max-width: 1200px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }

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

ul, ol { padding-left: 1.5em; }

h1, h2, h3, h4, h5, h6 { line-height: 1.25; font-weight: 700; color: var(--text-primary); }

.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* === NAVIGATION === */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(8, 12, 20, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition);
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav-brand { display: flex; align-items: center; gap: 12px; }
.nav-logo {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), var(--purple));
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800; color: #fff;
}
.nav-name { font-size: 20px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.02em; }
.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; padding: 0; }
.nav-links a {
  color: var(--text-secondary); font-size: 15px; font-weight: 500;
  padding: 6px 0; border-bottom: 2px solid transparent; transition: all var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--text-primary); border-bottom-color: var(--accent); }
.nav-cta {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff !important; padding: 10px 22px !important;
  border-radius: var(--radius-sm); font-weight: 600 !important;
  border-bottom: none !important; transition: all var(--transition) !important;
}
.nav-cta:hover { box-shadow: 0 0 24px var(--accent-glow); transform: translateY(-1px); }

/* === HERO === */
.hero {
  padding: 160px 0 100px;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, #1e3a5f 0%, transparent 60%),
              radial-gradient(ellipse 60% 50% at 80% 50%, #2a1a5e 0%, transparent 50%),
              var(--bg-primary);
  position: relative; overflow: hidden;
}
.hero-content { max-width: 700px; }
.hero-badge {
  display: inline-block; padding: 6px 16px;
  background: rgba(59, 130, 246, 0.12); border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 50px; color: var(--accent-light); font-size: 13px; font-weight: 600;
  margin-bottom: 28px; letter-spacing: 0.04em;
}
.hero h1 {
  font-size: clamp(38px, 5.5vw, 62px); font-weight: 800;
  letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 24px;
}
.hero h1 span { background: linear-gradient(135deg, var(--accent-light), var(--purple)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero p {
  font-size: 18px; color: var(--text-secondary); line-height: 1.7;
  max-width: 560px; margin-bottom: 36px;
}
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; border-radius: var(--radius-sm); font-size: 16px;
  font-weight: 600; cursor: pointer; transition: all var(--transition);
  border: none; text-decoration: none; font-family: inherit;
}
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-dark)); color: #fff; box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35); }
.btn-primary:hover { box-shadow: 0 6px 28px rgba(59, 130, 246, 0.5); transform: translateY(-2px); color: #fff; }
.btn-secondary { background: transparent; color: var(--text-primary); border: 1px solid var(--border-accent); }
.btn-secondary:hover { background: rgba(59, 130, 246, 0.08); border-color: var(--accent); }
.btn-lg { padding: 16px 36px; font-size: 17px; }

/* === SECTIONS === */
section { padding: 100px 0; }
.section-label {
  display: inline-block; padding: 5px 14px;
  background: rgba(139, 92, 246, 0.1); border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 50px; color: var(--purple); font-size: 13px; font-weight: 600;
  margin-bottom: 16px; letter-spacing: 0.05em; text-transform: uppercase;
}
.section-title {
  font-size: clamp(28px, 4vw, 42px); font-weight: 800;
  letter-spacing: -0.02em; margin-bottom: 16px;
}
.section-subtitle { font-size: 17px; color: var(--text-secondary); max-width: 600px; margin-bottom: 48px; }

/* === SERVICES GRID === */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.service-card {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius-lg); padding: 36px 32px;
  transition: all var(--transition); position: relative; overflow: hidden;
}
.service-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--purple));
  opacity: 0; transition: opacity var(--transition);
}
.service-card:hover { border-color: var(--border-accent); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.service-card:hover::before { opacity: 1; }
.service-icon {
  width: 52px; height: 52px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin-bottom: 20px;
}
.service-icon.blue { background: rgba(59, 130, 246, 0.12); color: var(--accent-light); }
.service-icon.green { background: rgba(16, 185, 129, 0.12); color: var(--green); }
.service-icon.purple { background: rgba(139, 92, 246, 0.12); color: var(--purple); }
.service-icon.orange { background: rgba(245, 158, 11, 0.12); color: var(--orange); }
.service-icon.red { background: rgba(239, 68, 68, 0.12); color: var(--red); }
.service-icon.cyan { background: rgba(6, 182, 212, 0.12); color: #06b6d4; }
.service-card h3 { font-size: 20px; margin-bottom: 10px; }
.service-card p { color: var(--text-secondary); font-size: 15px; line-height: 1.7; }

/* === STATS === */
.stats-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; text-align: center; }
.stat-item { padding: 20px; }
.stat-number {
  font-size: clamp(36px, 5vw, 52px); font-weight: 800;
  background: linear-gradient(135deg, var(--accent-light), var(--purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  line-height: 1.1; margin-bottom: 8px;
}
.stat-label { color: var(--text-muted); font-size: 15px; font-weight: 500; }

/* === ABOUT === */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-visual {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius-xl); padding: 40px;
  position: relative; overflow: hidden;
}
.about-visual::after {
  content: ''; position: absolute; bottom: -40px; right: -40px;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
}
.about-diagram { display: flex; flex-direction: column; gap: 16px; }
.about-node {
  background: var(--bg-primary); border: 1px solid var(--border-color);
  border-radius: var(--radius); padding: 16px 20px;
  display: flex; align-items: center; gap: 14px;
  font-weight: 600; font-size: 15px; position: relative;
}
.about-node .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.about-node .dot.blue { background: var(--accent); box-shadow: 0 0 10px var(--accent-glow); }
.about-node .dot.green { background: var(--green); box-shadow: 0 0 10px var(--green-glow); }
.about-node .dot.purple { background: var(--purple); box-shadow: 0 0 10px var(--purple-glow); }
.about-text h2 { margin-bottom: 20px; }
.about-text p { color: var(--text-secondary); font-size: 16px; margin-bottom: 16px; line-height: 1.75; }

/* === TECH STACK === */
.tech-stack-section { background: var(--bg-secondary); }
.tech-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.tech-item {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius); padding: 24px 20px; text-align: center;
  transition: all var(--transition);
}
.tech-item:hover { border-color: var(--border-accent); box-shadow: var(--shadow); transform: translateY(-2px); }
.tech-item .tech-icon { font-size: 32px; margin-bottom: 10px; }
.tech-item .tech-name { font-weight: 600; font-size: 14px; color: var(--text-primary); }

/* === CONTACT === */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.contact-info { display: flex; flex-direction: column; gap: 24px; }
.contact-card {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius-lg); padding: 24px;
  display: flex; align-items: flex-start; gap: 16px;
  transition: all var(--transition);
}
.contact-card:hover { border-color: var(--border-accent); }
.contact-card-icon {
  width: 44px; height: 44px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
  background: rgba(59, 130, 246, 0.12); color: var(--accent-light);
}
.contact-card h4 { font-size: 15px; margin-bottom: 4px; }
.contact-card p { color: var(--text-secondary); font-size: 14px; }
.contact-form { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-xl); padding: 40px; }
.contact-form h3 { margin-bottom: 24px; font-size: 22px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; color: var(--text-secondary); }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 12px 16px;
  background: var(--bg-input); border: 1px solid var(--border-color);
  border-radius: var(--radius-sm); color: var(--text-primary);
  font-size: 15px; font-family: inherit; transition: border-color var(--transition);
  outline: none;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15); }
.form-group textarea { resize: vertical; min-height: 120px; }

/* === FOOTER === */
.footer {
  background: var(--bg-secondary); border-top: 1px solid var(--border-color);
  padding: 60px 0 30px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand p { color: var(--text-muted); font-size: 14px; margin-top: 12px; line-height: 1.7; }
.footer-col h4 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 16px; color: var(--text-muted); }
.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: var(--text-secondary); font-size: 14px; }
.footer-col ul li a:hover { color: var(--text-primary); }
.footer-bottom {
  border-top: 1px solid var(--border-color); padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
}
.footer-bottom p { color: var(--text-muted); font-size: 13px; }

/* === PAGE HEADER (for subpages) === */
.page-header {
  padding: 140px 0 60px;
  background: radial-gradient(ellipse 60% 50% at 50% -20%, #1e3a5f 0%, transparent 60%),
              var(--bg-primary);
  text-align: center; border-bottom: 1px solid var(--border-color);
}
.page-header h1 { font-size: clamp(32px, 4.5vw, 50px); margin-bottom: 12px; }
.page-header p { color: var(--text-secondary); font-size: 17px; }

/* === CONTENT PAGE === */
.content-section { padding: 80px 0; }
.content-card {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius-xl); padding: 48px; max-width: 900px;
  margin: 0 auto;
}
.content-card h2 {
  font-size: 24px; margin-top: 40px; margin-bottom: 14px;
  padding-top: 24px; border-top: 1px solid var(--border-color);
}
.content-card h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.content-card h3 { font-size: 18px; margin-top: 28px; margin-bottom: 10px; color: var(--accent-light); }
.content-card p { color: var(--text-secondary); font-size: 15px; line-height: 1.8; margin-bottom: 16px; }
.content-card ul, .content-card ol { color: var(--text-secondary); font-size: 15px; line-height: 1.8; margin-bottom: 16px; }

/* === 404 PAGE === */
.error-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 40px 24px;
  background: radial-gradient(ellipse 60% 50% at 50% 30%, #1e3a5f 0%, transparent 60%),
              var(--bg-primary);
}
.error-code {
  font-size: clamp(100px, 18vw, 180px); font-weight: 900;
  line-height: 1; letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--accent-light), var(--purple), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 16px;
}
.error-page h2 { font-size: 28px; margin-bottom: 12px; }
.error-page p { color: var(--text-secondary); font-size: 17px; max-width: 500px; margin: 0 auto 32px; }

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .about-grid, .contact-grid, .footer-grid { grid-template-columns: 1fr; }
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 14px; }
  .nav-cta { padding: 8px 16px !important; font-size: 13px !important; }
  section { padding: 60px 0; }
  .hero { padding: 120px 0 60px; }
  .content-card { padding: 28px; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .hero-buttons { flex-direction: column; }
  .btn { justify-content: center; }
  .services-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .tech-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-bottom { flex-direction: column; text-align: center; }
}
