@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Space+Grotesk:wght@500;700&display=swap");

:root {
  --bg: #050816;
  --bg-alt: #0b1020;
  --panel: #15171c;
  --line: rgba(180, 183, 195, 0.2);
  --text: #ffffff;
  --muted: #b4b7c3;
  --accent: #3b82f6;
  --accent-2: #7c3aed;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

body.light {
  --bg: #f3f5f8;
  --bg-alt: #ffffff;
  --panel: #ffffff;
  --line: #d7deea;
  --text: #17202b;
  --muted: #4d627a;
  --accent: #0ea87b;
  --accent-2: #dd7c3d;
  --shadow: 0 18px 40px rgba(18, 27, 40, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 15%, rgba(59, 130, 246, 0.14), transparent 38%),
    radial-gradient(circle at 88% 85%, rgba(124, 58, 237, 0.16), transparent 38%),
    linear-gradient(180deg, var(--bg), var(--bg-alt));
  background-size: 120% 120%;
  animation: gradientShift 18s ease-in-out infinite;
  font-family: "Inter", "Segoe UI", sans-serif;
  line-height: 1.6;
}

h1,
h2,
h3,
.brand {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(14px);
}

.nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-shadow: 0 0 14px rgba(59, 130, 246, 0.35);
  animation: logoGlow 5s ease-in-out infinite;
}

.brand img {
  width: 36px;
  height: 36px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.btn-sm {
  padding: 0.5rem 0.85rem;
  font-size: 0.82rem;
}

.site-menu {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-menu a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.site-menu a:hover,
.site-menu a:focus-visible {
  color: var(--text);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  width: 42px;
  height: 42px;
  padding: 0;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: var(--text);
}

.theme-toggle {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  align-items: center;
  padding: 5.5rem 0 4rem;
}

.hero-banner-wrap {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-banner {
  display: block;
  width: 100%;
  height: auto;
}

.eyebrow {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.82rem;
  color: var(--muted);
  background: color-mix(in srgb, var(--panel) 78%, transparent);
}

h1 {
  margin: 1rem 0;
  font-size: clamp(2.1rem, 6vw, 4.5rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.lead {
  color: var(--muted);
  font-size: 1.06rem;
  max-width: 58ch;
}

.actions {
  margin-top: 1.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 14px;
  padding: 0.82rem 1.12rem;
  font-size: 0.94rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(110deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 26px rgba(59, 130, 246, 0.34);
}

.btn-secondary {
  background: var(--panel);
  border-color: var(--line);
}

.hero-visual {
  min-height: 300px;
}

.section {
  padding: 4rem 0;
}

.section-alt {
  background: color-mix(in srgb, var(--bg-alt) 70%, transparent);
  border-top: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
}

.section-title {
  margin: 0 0 0.4rem;
  font-size: clamp(1.65rem, 3vw, 2.1rem);
}

.section-subtitle {
  margin: 0 0 1.8rem;
  color: var(--muted);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
}

.product-grid,
.build-grid,
.project-grid,
.expertise-grid {
  display: grid;
  gap: 1rem;
}

.product-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.build-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.project-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.expertise-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.product-card,
.build-card,
.project-card,
.expertise-card,
.open-source-card,
.contact-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.2rem;
  background: rgba(21, 23, 28, 0.92);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.product-card:hover,
.build-card:hover,
.project-card:hover,
.expertise-card:hover,
.open-source-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.34);
}

.card-label,
.timeline-meta,
.repo-meta {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.product-card h3,
.build-card h3,
.project-card h3,
.expertise-card h3,
.contact-card h3 {
  margin: 0.2rem 0 0.45rem;
  font-size: 1.12rem;
}

.product-card p,
.build-card p,
.project-card p,
.expertise-card p,
.contact-card p {
  margin: 0;
  color: var(--muted);
}

.product-card a,
.project-card a,
.text-link {
  display: inline-block;
  margin-top: 0.8rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 0.95rem;
  padding: 1rem 0;
}

.timeline-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 33px;
  bottom: -5px;
  width: 2px;
  background: var(--line);
}

.timeline-dot {
  margin-top: 0.45rem;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(59, 130, 246, 0.95);
  background: rgba(59, 130, 246, 0.22);
}

.timeline-item h3 {
  margin: 0;
}

.timeline-item p {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.contact-layout {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr 1fr;
  align-items: start;
}

.contact-card {
  display: grid;
  gap: 0.55rem;
}

.contact-list {
  display: grid;
  gap: 0.5rem;
}

.project-status {
  display: inline-flex;
  margin-top: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  color: var(--text);
  font-size: 0.8rem;
  background: rgba(59, 130, 246, 0.14);
}

.build-card {
  display: grid;
  place-items: center;
  text-align: center;
  min-height: 108px;
}

.build-card h3 {
  margin: 0;
  font-size: 1rem;
}

.expertise-card ul {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.expertise-card li {
  margin: 0.32rem 0;
}

.research-note {
  margin-bottom: 1.2rem;
  border-left: 3px solid rgba(59, 130, 246, 0.65);
  padding-left: 0.9rem;
}

.selected-tech {
  margin-top: 0.7rem;
  font-size: 0.86rem;
  color: var(--muted);
}

.about-text {
  max-width: 70ch;
}

.contact-card label {
  font-size: 0.9rem;
  color: var(--muted);
}

.contact-card input,
.contact-card textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel) 65%, transparent);
  color: var(--text);
  font: inherit;
}

.contact-card button {
  margin-top: 0.4rem;
  border: 0;
  cursor: pointer;
}

.site-footer {
  border-top: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  padding: 2rem 0;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-row p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.contact-links a {
  text-decoration: none;
  color: var(--muted);
}

.contact-links a:hover {
  color: var(--text);
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 {
  transition-delay: 0.09s;
}

.delay-2 {
  transition-delay: 0.16s;
}

.not-found {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
}

.not-found-card {
  width: min(560px, 100%);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 2rem;
  text-align: center;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
}

.not-found-card h1 {
  margin-top: 0;
  font-size: clamp(2.3rem, 8vw, 4rem);
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes gradientShift {
  0%,
  100% {
    background-position: 0% 30%;
  }

  50% {
    background-position: 100% 70%;
  }
}

@keyframes logoGlow {
  0%,
  100% {
    text-shadow: 0 0 8px rgba(59, 130, 246, 0.25);
  }

  50% {
    text-shadow: 0 0 18px rgba(124, 58, 237, 0.35);
  }
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 4rem;
  }

  .product-grid,
  .project-grid,
  .build-grid,
  .expertise-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .menu-toggle {
    display: block;
  }

  .site-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: min(320px, 92vw);
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.9rem;
    background: color-mix(in srgb, var(--bg-alt) 95%, transparent);
  }

  .site-menu.open {
    display: flex;
  }

  .nav-actions {
    margin-left: auto;
    gap: 0.5rem;
  }

  .nav-actions > a {
    display: none;
  }

  .site-menu a {
    margin: 0;
  }

  .product-grid,
  .build-grid,
  .project-grid,
  .expertise-grid {
    grid-template-columns: 1fr;
  }

  .footer-row {
    flex-direction: column;
  }
}
