@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Manrope:wght@400;500;600;700&display=swap');

:root {
  color-scheme: light;
  --bg: #fcf9f8;
  --surface: #ffffff;
  --surface-soft: #f6f3f2;
  --surface-strong: #ebe7e7;
  --surface-inset: #f0edec;
  --text: #171717;
  --text-soft: #5a6273;
  --text-muted: #7c8598;
  --line: rgba(115, 118, 136, 0.2);
  --line-strong: rgba(115, 118, 136, 0.38);
  --primary: #0041c8;
  --primary-strong: #0055ff;
  --primary-soft: rgba(0, 65, 200, 0.1);
  --accent: #0f172a;
  --shadow: 0 24px 60px rgba(17, 24, 39, 0.08);
  --shadow-soft: 0 10px 30px rgba(17, 24, 39, 0.06);
  --radius-sm: 16px;
  --radius-md: 24px;
  --radius-lg: 32px;
  --container: 1180px;
  --transition: 220ms ease;
}

html.dark {
  color-scheme: dark;
  --bg: #0b1020;
  --surface: #11172a;
  --surface-soft: #151d34;
  --surface-strong: #1b2540;
  --surface-inset: #0f1527;
  --text: #edf2ff;
  --text-soft: #b7c0d9;
  --text-muted: #8190b2;
  --line: rgba(143, 163, 208, 0.16);
  --line-strong: rgba(143, 163, 208, 0.28);
  --primary: #7da2ff;
  --primary-strong: #5f87ff;
  --primary-soft: rgba(125, 162, 255, 0.12);
  --accent: #f8fafc;
  --shadow: 0 28px 72px rgba(0, 0, 0, 0.35);
  --shadow-soft: 0 16px 42px rgba(0, 0, 0, 0.24);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Manrope', sans-serif;
  background:
    radial-gradient(circle at top left, rgba(0, 85, 255, 0.09), transparent 28%),
    radial-gradient(circle at top right, rgba(0, 65, 200, 0.06), transparent 24%),
    var(--bg);
  color: var(--text);
  transition: background-color var(--transition), color var(--transition);
}

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

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

button,
input,
textarea {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
}

.container {
  width: min(var(--container), calc(100% - 2rem));
  margin: 0 auto;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: 100%;
  height: 3px;
  background: color-mix(in srgb, var(--surface-strong) 60%, transparent);
}

.scroll-progress__bar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-strong));
  transition: width 140ms linear;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 90;
  backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--line);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 82px;
}

.brand {
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-soft);
  padding-bottom: 0.2rem;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--text);
  border-color: var(--primary);
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.icon-button,
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  color: var(--text);
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
}

.icon-button:hover,
.theme-toggle:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
}

.theme-toggle {
  position: relative;
  width: 52px;
  min-width: 52px;
  height: 52px;
  padding: 0;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: inset 0 0 0 1px var(--line);
}

.theme-toggle__sun,
.theme-toggle__moon {
  position: absolute;
  inset: 0;
  margin: auto;
  display: block;
  transition: opacity 240ms ease, transform 320ms ease, filter 240ms ease;
}

.theme-toggle__sun {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #f6b73c;
  box-shadow:
    0 0 0 6px rgba(246, 183, 60, 0.14),
    0 -12px 0 -9px #f6b73c,
    0 12px 0 -9px #f6b73c,
    12px 0 0 -9px #f6b73c,
    -12px 0 0 -9px #f6b73c,
    8px 8px 0 -9px #f6b73c,
    -8px -8px 0 -9px #f6b73c,
    8px -8px 0 -9px #f6b73c,
    -8px 8px 0 -9px #f6b73c;
}

.theme-toggle__moon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #d8e4ff;
  box-shadow: inset -7px 0 0 0 #7d9cff;
  opacity: 0;
  transform: scale(0.45) rotate(-45deg);
}

.theme-toggle__label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html.dark .theme-toggle__sun {
  opacity: 0;
  transform: scale(0.45) rotate(45deg);
  filter: blur(1px);
}

html.dark .theme-toggle__moon {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

html:not(.dark) .theme-toggle__sun {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

html:not(.dark) .theme-toggle__moon {
  opacity: 0;
  transform: scale(0.45) rotate(-45deg);
  filter: blur(1px);
}

.mobile-toggle {
  display: none;
}

.mobile-panel {
  display: none;
  padding: 0 0 1rem;
}

.mobile-panel.is-open {
  display: grid;
  gap: 0.75rem;
}

.mobile-panel .nav-link {
  border: 0;
  padding: 0.55rem 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 1.45rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  letter-spacing: -0.02em;
  transition: transform var(--transition), opacity var(--transition), border-color var(--transition), background var(--transition);
}

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

.btn--primary {
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  box-shadow: 0 14px 34px color-mix(in srgb, var(--primary) 28%, transparent);
}

.btn--ghost {
  color: var(--text);
  border-color: var(--line);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero {
  padding: 5.6rem 0 3rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
  gap: 2rem;
  align-items: end;
}

.hero-title,
.section-title,
.card-title {
  font-family: 'Inter', sans-serif;
  letter-spacing: -0.05em;
}

.hero-title {
  margin: 1rem 0 0.9rem;
  font-size: clamp(3.6rem, 8vw, 7rem);
  line-height: 0.96;
}

.hero-tagline {
  margin: 0 0 1.35rem;
  max-width: 38rem;
  font-family: 'Inter', sans-serif;
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  line-height: 1.45;
  letter-spacing: -0.03em;
  color: var(--text-soft);
}

.hero-copy {
  max-width: 45rem;
  font-size: 1.08rem;
  line-height: 1.85;
  color: var(--text-soft);
}

.hero-actions,
.pill-row,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-visual,
.panel,
.card,
.testimonial,
.timeline-card,
.contact-panel,
.project-feature,
.stats-strip {
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.hero-visual {
  overflow: hidden;
}

.hero-visual__image {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  width: 100%;
}

.hero-visual__badge {
  margin-top: -2.5rem;
  margin-left: 1.2rem;
  width: max-content;
  max-width: calc(100% - 2.4rem);
  padding: 1rem 1.1rem;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--line);
  border-radius: 22px;
  position: relative;
  z-index: 1;
}

.section {
  padding: 3.75rem 0;
}

.section--soft {
  background: color-mix(in srgb, var(--surface-soft) 78%, transparent);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-title {
  margin: 1rem 0 1rem;
  font-size: clamp(2rem, 4vw, 4.5rem);
  line-height: 0.98;
}

.section-copy {
  max-width: 40rem;
  color: var(--text-soft);
  line-height: 1.8;
}

.stats-strip {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: var(--line);
}

.stats-strip > div {
  padding: 1.15rem 1rem;
  background: var(--surface);
}

.stats-value {
  font-family: 'Inter', sans-serif;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.stats-label {
  margin-top: 0.3rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

.grid-2,
.grid-3,
.bento-grid,
.testimonial-grid,
.footer-grid,
.contact-grid {
  display: grid;
  gap: 1.25rem;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3,
.testimonial-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bento-grid {
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
}

.card,
.panel,
.project-card,
.skill-card {
  padding: 1.5rem;
}

.panel--accent {
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 14%, var(--surface)) 0%, var(--surface) 100%);
}

.card-title {
  margin: 0.3rem 0 0.7rem;
  font-size: 1.45rem;
  line-height: 1.08;
}

.muted {
  color: var(--text-soft);
}

.project-feature {
  overflow: hidden;
  padding: 0;
}

.project-feature__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 2rem;
  align-items: stretch;
  padding: 2rem;
}

.project-feature__visual {
  min-height: 100%;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 18%, var(--surface)) 0%, color-mix(in srgb, var(--surface-soft) 90%, transparent) 100%);
}

.project-feature__mock {
  width: 100%;
  height: 100%;
  min-height: 320px;
  display: grid;
  place-items: center;
  font-family: 'Inter', sans-serif;
  font-size: clamp(1.6rem, 3vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  color: color-mix(in srgb, var(--primary) 70%, var(--text));
}

.project-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.project-card {
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  border: 1px solid var(--line);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.project-card__meta,
.split-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-card__cover {
  aspect-ratio: 16 / 11;
  border-radius: 20px;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 18%, var(--surface)) 0%, color-mix(in srgb, var(--surface-soft) 75%, transparent) 100%);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  padding: 1rem;
  display: flex;
  align-items: flex-end;
}

.project-card__cover::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.9;
}

.project-card__cover::after {
  content: '';
  position: absolute;
  inset: auto -10% -35% 30%;
  height: 80%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  filter: blur(8px);
}

.project-card__cover > * {
  position: relative;
  z-index: 1;
}

.project-card__cover--planify::before {
  background:
    linear-gradient(160deg, rgba(125, 162, 255, 0.14), transparent 50%),
    linear-gradient(135deg, #1f2a44 0%, #33456b 52%, #6178ac 100%);
}

.project-card__cover--agrigrow::before {
  background:
    linear-gradient(160deg, rgba(111, 238, 177, 0.12), transparent 45%),
    linear-gradient(135deg, #122e28 0%, #1c5f51 50%, #76b27a 100%);
}

.project-card__cover--microfleet::before {
  background:
    linear-gradient(160deg, rgba(123, 170, 255, 0.14), transparent 45%),
    linear-gradient(135deg, #161f39 0%, #20325e 48%, #4f7de8 100%);
}

.project-card__cover--legal::before {
  background:
    linear-gradient(160deg, rgba(255, 189, 137, 0.12), transparent 45%),
    linear-gradient(135deg, #2c2131 0%, #4c2c5a 50%, #b56d7d 100%);
}

.project-card__cover--survival::before {
  background:
    linear-gradient(160deg, rgba(255, 122, 122, 0.12), transparent 45%),
    linear-gradient(135deg, #2d1620 0%, #5f2345 50%, #d36d8d 100%);
}

.project-card__cover--mindset::before {
  background:
    linear-gradient(160deg, rgba(160, 171, 197, 0.14), transparent 45%),
    linear-gradient(135deg, #18202f 0%, #2b3950 50%, #5b728f 100%);
}

.project-cover__stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.project-cover__stack span {
  padding: 0.34rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.project-cover__window {
  width: 100%;
  border-radius: 16px;
  background: rgba(8, 12, 22, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.75rem;
  backdrop-filter: blur(10px);
}

.project-cover__dots {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.project-cover__dots span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
}

.project-cover__bars {
  display: grid;
  gap: 0.45rem;
}

.project-cover__bars span {
  display: block;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.project-cover__bars span:nth-child(1) { width: 88%; }
.project-cover__bars span:nth-child(2) { width: 66%; }
.project-cover__bars span:nth-child(3) { width: 52%; }

.project-cover__title {
  margin-top: 0.8rem;
  color: white;
  font-family: 'Inter', sans-serif;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.timeline {
  position: relative;
  display: grid;
  gap: 1.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 1.1rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), transparent);
}

.timeline-card {
  position: relative;
  padding: 1.5rem 1.5rem 1.5rem 3.75rem;
}

.timeline-card::before {
  content: '';
  position: absolute;
  top: 1.65rem;
  left: 0.7rem;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--primary) 16%, transparent);
}

.quote-mark {
  font-size: 2rem;
  color: var(--primary);
}

.testimonial {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem;
}

.avatar {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  object-fit: cover;
}

.footer {
  margin-top: 4rem;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-soft) 72%, transparent);
}

.footer-grid {
  grid-template-columns: 1.2fr 1fr 1fr;
  padding: 3rem 0;
}

.footer-title {
  margin-bottom: 0.9rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  color: var(--text-soft);
}

.contact-grid {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: start;
}

.contact-panel {
  padding: 1.75rem;
}

.input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  padding: 1rem 0 0.8rem;
  outline: none;
}

.input:focus {
  border-color: var(--primary);
}

.form-grid {
  display: grid;
  gap: 1.6rem;
}

.repo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.repo-card {
  padding: 1.15rem;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 84%, transparent);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 76%, transparent);
  font-size: 0.78rem;
  color: var(--text-soft);
}

@media (max-width: 1100px) {
  .hero-grid,
  .project-feature__grid,
  .contact-grid,
  .grid-3,
  .testimonial-grid,
  .repo-grid,
  .project-list,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .bento-grid {
    grid-template-columns: 1fr 1fr;
  }

  .bento-grid > :first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .container {
    width: min(var(--container), calc(100% - 1.2rem));
  }

  .topbar__inner {
    min-height: 74px;
  }

  .nav-links,
  .topbar__actions .btn--primary {
    display: none;
  }

  .mobile-toggle {
    display: inline-flex;
  }

  .hero,
  .section {
    padding: 3rem 0;
  }

  .hero-grid,
  .project-feature__grid,
  .grid-2,
  .grid-3,
  .project-list,
  .testimonial-grid,
  .footer-grid,
  .contact-grid,
  .repo-grid {
    grid-template-columns: 1fr;
  }

  .stats-strip {
    grid-template-columns: 1fr 1fr;
  }

  .hero-visual--home {
    display: none;
  }

  .bento-grid {
    grid-template-columns: 1fr;
  }

  .card,
  .panel,
  .project-card,
  .timeline-card,
  .contact-panel {
    padding: 1.2rem;
  }
}

@media (max-width: 560px) {
  .hero-title {
    font-size: 3rem;
  }

  .hero-tagline {
    font-size: 1rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .hero-actions,
  .pill-row,
  .chip-row {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .stats-strip {
    grid-template-columns: 1fr;
  }
}
