:root {
  --bg: #0b1120;
  --bg-soft: #101827;
  --panel: rgba(17, 24, 39, 0.78);
  --panel-strong: #111827;
  --panel-alt: #0f172a;
  --text: #e5eefb;
  --text-soft: #b6c2d1;
  --border: rgba(148, 163, 184, 0.22);
  --primary: #7c66ff;
  --primary-strong: #9c8aff;
  --secondary: #2dd4bf;
  --blue: #60a5fa;
  --purple: #a78bfa;
  --green: #34d399;
  --shadow: 0 20px 50px rgba(2, 6, 23, 0.45);
}

body.light {
  --bg: #f5f7fb;
  --bg-soft: #edf3ff;
  --panel: rgba(255, 255, 255, 0.78);
  --panel-strong: #ffffff;
  --panel-alt: #eef4ff;
  --text: #111827;
  --text-soft: #475569;
  --border: rgba(148, 163, 184, 0.2);
  --primary: #4f46e5;
  --primary-strong: #312e81;
  --secondary: #14b8a6;
  --blue: #2563eb;
  --purple: #7c3aed;
  --green: #10b981;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background:
    radial-gradient(circle at top left, rgba(124, 102, 255, 0.18), transparent 28%),
    radial-gradient(circle at bottom right, rgba(45, 212, 191, 0.08), transparent 25%),
    linear-gradient(180deg, #0b1220 0%, #0d1727 100%);
  color: var(--text);
  transition: background 0.25s ease, color 0.25s ease;
}

body.light {
  background:
    radial-gradient(circle at top left, rgba(124, 102, 255, 0.1), transparent 28%),
    radial-gradient(circle at bottom right, rgba(45, 212, 191, 0.08), transparent 25%),
    linear-gradient(180deg, #f8fafc 0%, #eef4fb 100%);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.section {
  padding: 5rem 0;
}

.muted-section {
  background: rgba(15, 23, 42, 0.32);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

body.light .muted-section {
  background: rgba(226, 232, 240, 0.42);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: #101827;
  border-bottom: 1px solid var(--border);
}

body.light .topbar {
  background: rgba(245, 247, 251, 0.8);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  gap: 1rem;
}

.brand {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  color: #dbe7f5;
  font-size: 0.95rem;
}

.nav-links a {
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: #ffffff;
}

body.light .nav-links {
  color: var(--text-soft);
}

body.light .nav-links a:hover {
  color: var(--text);
}

.theme-toggle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--panel-strong);
  color: var(--text);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.hero {
  padding-top: 5.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  align-items: center;
  gap: 2.5rem;
}

.eyebrow,
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.1);
  color: var(--primary);
  border: 1px solid rgba(79, 70, 229, 0.14);
  font-weight: 700;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin-top: 1.35rem;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.06;
  letter-spacing: -0.06em;
  max-width: 680px;
}

.hero-copy p {
  margin-top: 1.25rem;
  max-width: 620px;
  color: var(--text-soft);
  font-size: 1.06rem;
  line-height: 1.75;
}

.hero-actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.9rem 1.4rem;
  border-radius: 14px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #6d5ef8);
  color: white;
  box-shadow: 0 12px 28px rgba(79, 70, 229, 0.25);
}

.btn-secondary {
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
}

.hero-card {
  position: relative;
  display: grid;
  gap: 1rem;
}

.mini-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1.3rem 1.4rem;
  box-shadow: var(--shadow);
}

.mini-card .label {
  display: block;
  color: var(--text-soft);
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mini-card strong {
  font-size: 1.1rem;
  line-height: 1.5;
}

.about-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 2rem;
  align-items: center;
}

.about-grid h2,
.section-head h2,
.contact-box h2 {
  margin-top: 0.9rem;
  font-size: clamp(2rem, 3vw, 3rem);
  letter-spacing: -0.05em;
}

.about-grid p {
  color: var(--text-soft);
  font-size: 1.02rem;
  line-height: 1.9;
}

.section-head {
  margin-bottom: 2rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
}

.project-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1.6rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.project-badge {
  display: inline-flex;
  align-self: flex-start;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.project-badge.blue {
  background: rgba(37, 99, 235, 0.12);
  color: var(--blue);
}

.project-badge.purple {
  background: rgba(124, 58, 237, 0.12);
  color: var(--purple);
}

.project-badge.green {
  background: rgba(16, 185, 129, 0.12);
  color: var(--green);
}

.project-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
}

.project-card p {
  color: var(--text-soft);
  line-height: 1.7;
  margin-bottom: 1.1rem;
}

.project-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.3rem;
  display: grid;
  gap: 0.65rem;
  color: var(--text);
}

.project-card li::before {
  content: '•';
  color: var(--primary);
  margin-right: 0.6rem;
  font-weight: 700;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: auto;
}

.project-tags span,
.tech-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 600;
}

.tech-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.contact-box {
  background: linear-gradient(135deg, rgba(18, 27, 41, 0.96), rgba(11, 17, 32, 0.96));
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 1.5rem;
  align-items: center;
}

body.light .contact-box {
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(236, 253, 250, 0.96));
}

.contact-form-wrap {
  width: 100%;
}

.contact-form {
  display: grid;
  gap: 0.9rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  padding: 1.1rem;
  box-shadow: var(--shadow);
}

body.light .contact-form {
  background: rgba(255, 255, 255, 0.82);
  border-color: var(--border);
}

.contact-form label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  padding: 0.85rem 0.9rem;
  background: rgba(148, 163, 184, 0.12);
  color: var(--text);
  font: inherit;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #d4deeb;
  opacity: 1;
}

body.light .contact-form input,
body.light .contact-form textarea {
  border-color: rgba(100, 116, 139, 0.28);
  background: rgba(255, 255, 255, 0.82);
}

body.light .contact-form input::placeholder,
body.light .contact-form textarea::placeholder {
  color: #64748b;
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: rgba(79, 70, 229, 0.7);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.contact-form .btn {
  border: none;
  margin-top: 0.5rem;
  cursor: pointer;
  font-size: 1rem;
}

.footer {
  padding: 1.6rem 0 2.2rem;
  color: var(--text-soft);
}

.footer-inner {
  border-top: 1px solid var(--border);
  padding-top: 1.4rem;
  text-align: center;
}

@media (max-width: 900px) {
  .hero-grid,
  .about-grid,
  .projects-grid,
  .contact-box {
    grid-template-columns: 1fr;
    display: grid;
  }

  .nav {
    flex-wrap: wrap;
    justify-content: center;
    padding: 0.75rem 0;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero-card {
    max-width: 520px;
    margin: 0 auto;
  }

}

@media (max-width: 600px) {
  .section {
    padding: 4rem 0;
  }

  .hero-copy h1 {
    font-size: 2.5rem;
  }

  .hero-actions,
  .contact-links {
    flex-direction: column;
    align-items: stretch;
  }

  .btn,
  .contact-links a {
    width: 100%;
  }
}
