:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --card: rgba(255, 255, 255, 0.07);
  --card-border: rgba(255, 255, 255, 0.12);
  --text: #e5e7eb;
  --muted: #94a3b8;
  --primary: #6366f1;
  --secondary: #22c55e;
  --shadow: rgba(0, 0, 0, 0.35);
}

[data-theme="light"] {
  --bg: #f8fafc;
  --bg-soft: #e2e8f0;
  --card: rgba(255, 255, 255, 0.8);
  --card-border: rgba(15, 23, 42, 0.12);
  --text: #0f172a;
  --muted: #475569;
  --primary: #4f46e5;
  --secondary: #16a34a;
  --shadow: rgba(15, 23, 42, 0.12);
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(99, 102, 241, 0.25), transparent 35%),
    radial-gradient(circle at top right, rgba(34, 197, 94, 0.18), transparent 30%),
    var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 7%;
  backdrop-filter: blur(18px);
  background: rgba(2, 6, 23, 0.55);
  border-bottom: 1px solid var(--card-border);
}

[data-theme="light"] .navbar {
  background: rgba(248, 250, 252, 0.72);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 12px 28px rgba(99, 102, 241, 0.35);
}

.nav-links {
  display: flex;
  gap: 24px;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav-links a {
  transition: color 0.25s ease, transform 0.25s ease;
}

.nav-links a:hover {
  color: var(--text);
  transform: translateY(-2px);
}

.theme-toggle {
  width: 42px;
  height: 42px;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  font-size: 1.1rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.theme-toggle:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 12px 30px var(--shadow);
}

.hero {
  position: relative;
  min-height: 88vh;
  display: grid;
  place-items: center;
  padding: 80px 7%;
  text-align: center;
}

.hero-glow {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.28), rgba(34, 197, 94, 0.2));
  filter: blur(40px);
  animation: floatGlow 7s ease-in-out infinite alternate;
}

.hero-content {
  position: relative;
  max-width: 900px;
  animation: fadeUp 0.9s ease both;
}

.eyebrow {
  color: var(--secondary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(2.7rem, 7vw, 5.9rem);
  line-height: 0.95;
  letter-spacing: -0.075em;
  margin-bottom: 24px;
}

.hero-text {
  max-width: 720px;
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.btn:hover {
  transform: translateY(-3px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  box-shadow: 0 18px 45px rgba(99, 102, 241, 0.35);
}

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

.section {
  padding: 90px 7%;
}

.section-header {
  max-width: 740px;
  margin: 0 auto 42px;
  text-align: center;
}

.section-header h2,
.about-card h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: -0.05em;
  margin-bottom: 14px;
}

.section-header p,
.about-card p {
  color: var(--muted);
  line-height: 1.8;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 22px;
}

.card,
.about-card {
  border: 1px solid var(--card-border);
  background: var(--card);
  border-radius: 28px;
  padding: 30px;
  box-shadow: 0 25px 70px var(--shadow);
  backdrop-filter: blur(18px);
}

.card {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
  transform: translateY(-10px);
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 32px 90px var(--shadow);
}

.card-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.22), rgba(34, 197, 94, 0.18));
  font-size: 1.6rem;
  margin-bottom: 22px;
}

.card h3 {
  font-size: 1.35rem;
  margin-bottom: 12px;
}

.card p {
  color: var(--muted);
  line-height: 1.7;
  flex: 1;
}

.card-link {
  margin-top: 22px;
  color: var(--secondary);
  font-weight: 700;
}

.about {
  display: grid;
  place-items: center;
}

.about-card {
  max-width: 900px;
  text-align: center;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 34px 7%;
  color: var(--muted);
  border-top: 1px solid var(--card-border);
}

.footer div {
  display: flex;
  gap: 18px;
}

.footer a {
  transition: color 0.25s ease;
}

.footer a:hover {
  color: var(--text);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(26px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatGlow {
  from {
    transform: translateY(-20px) scale(0.95);
  }

  to {
    transform: translateY(25px) scale(1.08);
  }
}

@media (max-width: 900px) {
  .navbar {
    gap: 16px;
  }

  .nav-links {
    display: none;
  }

/*  .cards {
    grid-template-columns: 1fr;
  }*/

  .footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

.workflow {
    position: relative;
}

.workflow-grid {
    display: grid;
    grid-template-columns: 1.2fr repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.workflow-panel {
    border: 1px solid var(--card-border);
    background: var(--card);
    border-radius: 28px;
    padding: 28px;
    box-shadow: 0 25px 70px var(--shadow);
    backdrop-filter: blur(18px);
}

.workflow-main {
    grid-row: span 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 430px;
}

.panel-label {
    color: var(--secondary);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.workflow-panel h3 {
    font-size: clamp(1.35rem, 2vw, 2rem);
    letter-spacing: -0.04em;
    margin-bottom: 14px;
}

.workflow-panel p {
    color: var(--muted);
    line-height: 1.75;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 22px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.24), rgba(34, 197, 94, 0.18));
    color: var(--text);
    font-weight: 800;
}

.architecture-flow {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 32px;
}

    .architecture-flow span,
    .tech-stack span {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 42px;
        padding: 0 14px;
        border: 1px solid var(--card-border);
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.05);
        color: var(--text);
        font-size: 0.85rem;
        font-weight: 700;
        text-align: center;
    }

[data-theme="light"] .architecture-flow span,
[data-theme="light"] .tech-stack span {
    background: rgba(255, 255, 255, 0.72);
}

.tech-stack {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 980px;
    margin: 34px auto 0;
}

@media (max-width: 1100px) {
    .workflow-grid {
        grid-template-columns: 1fr 1fr;
    }

    .workflow-main {
        grid-column: 1 / -1;
        grid-row: auto;
        min-height: auto;
    }
}

@media (max-width: 700px) {
    .workflow-grid {
        grid-template-columns: 1fr;
    }

    .architecture-flow {
        grid-template-columns: 1fr;
    }
}
