:root {
  --background: #f7f8fc;
  --surface: #ffffff;
  --surface-soft: #eef2f8;
  --text: #111827;
  --text-soft: #5d6675;
  --border: #dfe5ee;
  --primary: #3156e8;
  --primary-dark: #2240bd;
  --accent: #18b89a;
  --dark: #101722;
  --dark-surface: #182130;
  --dark-border: #2b3749;
  --dark-text: #f8fafc;
  --dark-soft-text: #aab5c5;
  --shadow: 0 24px 70px rgba(18, 31, 53, 0.12);
  --small-shadow: 0 10px 34px rgba(18, 31, 53, 0.08);
  --max-width: 1180px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

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

button {
  font: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.08;
  letter-spacing: -0.04em;
}

h1 {
  max-width: 900px;
  margin-bottom: 26px;
  font-size: clamp(3.25rem, 7vw, 6.5rem);
}

h2 {
  margin-bottom: 22px;
  font-size: clamp(2.35rem, 5vw, 4.3rem);
}

h3 {
  margin-bottom: 15px;
  font-size: clamp(1.35rem, 2.5vw, 2rem);
}

p {
  color: var(--text-soft);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.container {
  width: min(calc(100% - 40px), var(--max-width));
  margin-inline: auto;
}

.section {
  padding: 112px 0;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 9px;
  background: var(--text);
  color: white;
  transform: translateY(-170%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  border-bottom: 1px solid transparent;
  background: rgba(247, 248, 252, 0.87);
  backdrop-filter: blur(18px);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.site-header.scrolled {
  border-color: var(--border);
  box-shadow: 0 8px 28px rgba(18, 31, 53, 0.07);
}

.navigation {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  box-shadow: 0 10px 26px rgba(49, 86, 232, 0.25);
}

.brand-text {
  display: grid;
  line-height: 1.2;
}

.brand-text strong {
  font-size: 0.98rem;
}

.brand-text small {
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 700;
}

.site-navigation {
  display: flex;
  align-items: center;
  gap: 27px;
}

.site-navigation > a:not(.nav-button) {
  position: relative;
  color: var(--text-soft);
  font-size: 0.93rem;
  font-weight: 750;
}

.site-navigation > a:not(.nav-button)::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

.site-navigation > a:not(.nav-button):hover {
  color: var(--text);
}

.site-navigation > a:not(.nav-button):hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-button {
  padding: 10px 17px;
  border-radius: 11px;
  background: var(--text);
  color: white;
  font-size: 0.9rem;
  font-weight: 800;
}

.menu-button {
  width: 46px;
  height: 46px;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 13px;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.menu-button span {
  width: 100%;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
  transition:
    transform 180ms ease,
    opacity 180ms ease;
}

.menu-button.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-button.active span:nth-child(2) {
  opacity: 0;
}

.menu-button.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.hero {
  min-height: calc(100vh - 78px);
  display: grid;
  align-items: center;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(380px, 0.85fr);
  gap: 72px;
  align-items: center;
}

.eyebrow {
  margin-bottom: 18px;
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 span {
  display: block;
  background: linear-gradient(105deg, var(--primary), var(--accent));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.hero-description {
  max-width: 700px;
  margin-bottom: 34px;
  font-size: clamp(1.08rem, 2vw, 1.28rem);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
}

.button {
  min-height: 52px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 850;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 14px 32px rgba(49, 86, 232, 0.25);
}

.button-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 18px 40px rgba(49, 86, 232, 0.32);
}

.button-secondary {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}

.button-light {
  background: white;
  color: var(--dark);
}

.hero-facts {
  margin-top: 50px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hero-facts article {
  padding-right: 20px;
  border-right: 1px solid var(--border);
  display: grid;
  gap: 3px;
}

.hero-facts article + article {
  padding-left: 20px;
}

.hero-facts article:last-child {
  border-right: 0;
}

.hero-facts strong {
  font-size: 1.15rem;
}

.hero-facts span {
  color: var(--text-soft);
  font-size: 0.8rem;
}

.hero-visual {
  position: relative;
  min-height: 545px;
  border: 1px solid var(--border);
  border-radius: 38px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(145deg, #f0f4ff, var(--surface));
  box-shadow: var(--shadow);
  isolation: isolate;
}

.visual-glow {
  position: absolute;
  z-index: -2;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  filter: blur(80px);
  opacity: 0.25;
}

.visual-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(49, 86, 232, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(49, 86, 232, 0.07) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at center, black, transparent 75%);
}

.main-visual-card {
  width: min(75%, 350px);
  padding: 33px;
  border: 1px solid rgba(223, 229, 238, 0.75);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.83);
  box-shadow: 0 22px 54px rgba(18, 31, 53, 0.14);
  backdrop-filter: blur(18px);
}

.main-visual-card p {
  margin-bottom: 9px;
  color: var(--primary);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.main-visual-card h2 {
  margin-bottom: 14px;
  font-size: 2.15rem;
}

.main-visual-card span {
  color: var(--text-soft);
  font-size: 0.95rem;
}

.mini-card {
  position: absolute;
  min-width: 128px;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  box-shadow: var(--small-shadow);
}

.mini-card span {
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 900;
}

.mini-card strong {
  font-size: 0.88rem;
}

.mini-card-one {
  top: 14%;
  left: 6%;
}

.mini-card-two {
  right: 5%;
  bottom: 22%;
}

.mini-card-three {
  bottom: 8%;
  left: 12%;
}

.section-light {
  background: var(--surface-soft);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 80px;
}

.about-content {
  font-size: 1.08rem;
}

.about-content p {
  margin-bottom: 24px;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.skills span {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.81rem;
  font-weight: 750;
}

.section-heading {
  max-width: 780px;
}

.section-heading.centered {
  margin: 0 auto 55px;
  text-align: center;
}

.section-heading.centered > p:last-child {
  max-width: 640px;
  margin-inline: auto;
}

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

.capability-card {
  min-height: 330px;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 21px;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  box-shadow: var(--small-shadow);
  transition:
    transform 200ms ease,
    box-shadow 200ms ease,
    border-color 200ms ease;
}

.capability-card:hover {
  border-color: rgba(49, 86, 232, 0.45);
  box-shadow: var(--shadow);
  transform: translateY(-6px);
}

.card-number {
  width: 49px;
  height: 49px;
  margin-bottom: auto;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #edf1ff;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 900;
}

.capability-card p {
  margin-bottom: 0;
}

.project-section {
  background:
    radial-gradient(circle at 90% 10%, rgba(49, 86, 232, 0.2), transparent 28%),
    var(--dark);
  color: var(--dark-text);
}

.project-section p {
  color: var(--dark-soft-text);
}

.project-heading {
  margin-bottom: 48px;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 55px;
  align-items: end;
}

.project-heading p:last-child {
  margin-bottom: 22px;
}

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

.project-card {
  min-height: 430px;
  padding: 29px;
  border: 1px solid var(--dark-border);
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--dark-surface);
  transition:
    border-color 200ms ease,
    transform 200ms ease,
    background 200ms ease;
}

.project-card:hover {
  border-color: rgba(126, 145, 255, 0.65);
  background: #1c2737;
  transform: translateY(-5px);
}

.project-featured {
  grid-column: span 2;
  min-height: 390px;
}

.project-label {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.project-label span {
  color: #748094;
  font-size: 0.78rem;
  font-weight: 900;
}

.project-label p {
  color: #91a2ff;
  font-size: 0.73rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-body {
  max-width: 780px;
}

.project-body h3 {
  font-size: clamp(1.8rem, 3vw, 2.7rem);
}

.project-body ul {
  margin: 24px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}

.project-body li {
  padding: 6px 10px;
  border: 1px solid #354256;
  border-radius: 999px;
  color: #c5cfdd;
  font-size: 0.78rem;
  font-weight: 750;
}

.github-callout {
  margin-top: 20px;
  padding: 35px;
  border: 1px solid var(--dark-border);
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 35px;
  background: linear-gradient(135deg, rgba(49, 86, 232, 0.25), rgba(24, 184, 154, 0.12));
}

.github-callout h3 {
  margin-bottom: 0;
}

.process-grid {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  list-style: none;
}

.process-grid li {
  min-height: 290px;
  padding: 27px 24px;
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

.process-grid li:last-child {
  border-right: 0;
}

.process-grid span {
  display: inline-block;
  margin-bottom: 70px;
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 900;
}

.process-grid p {
  margin-bottom: 0;
  font-size: 0.91rem;
}

.contact-section {
  background:
    radial-gradient(circle at 0% 100%, rgba(24, 184, 154, 0.14), transparent 30%),
    var(--surface-soft);
}

.contact-card {
  padding: 55px;
  border: 1px solid var(--border);
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 55px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.contact-card > div {
  max-width: 700px;
}

.contact-card p:last-child {
  margin-bottom: 0;
}

.site-footer {
  padding: 50px 0;
  background: #0b1018;
  color: white;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.footer-identity {
  display: flex;
  align-items: center;
  gap: 13px;
}

.footer-identity strong {
  display: block;
}

.footer-identity p {
  margin: 2px 0 0;
  color: #8e9bad;
  font-size: 0.84rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
  color: #c9d2de;
  font-size: 0.88rem;
}

.footer-links p {
  margin: 0;
  color: #7f8b9c;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 600ms ease,
    transform 600ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 1040px) {
  .section {
    padding: 90px 0;
  }

  .menu-button {
    display: flex;
  }

  .site-navigation {
    position: fixed;
    top: 79px;
    right: 20px;
    left: 20px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 20px;
    display: grid;
    gap: 5px;
    background: var(--surface);
    box-shadow: var(--shadow);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-12px);
    transition:
      visibility 180ms ease,
      opacity 180ms ease,
      transform 180ms ease;
  }

  .site-navigation.open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
  }

  .site-navigation > a:not(.nav-button) {
    padding: 12px 8px;
  }

  .site-navigation > a:not(.nav-button)::after {
    display: none;
  }

  .nav-button {
    margin-top: 8px;
    text-align: center;
  }

  .hero-grid,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    gap: 60px;
  }

  .hero-visual {
    min-height: 480px;
  }

  .about-grid {
    gap: 42px;
  }

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

  .capability-card {
    min-height: 250px;
  }

  .card-number {
    margin-bottom: 55px;
  }

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

  .process-grid li:nth-child(even) {
    border-right: 0;
  }

  .process-grid li {
    border-bottom: 1px solid var(--border);
  }

  .process-grid li:last-child {
    grid-column: span 2;
    border-bottom: 0;
  }
}

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

  .section {
    padding: 74px 0;
  }

  h1 {
    font-size: clamp(2.8rem, 14vw, 4.5rem);
  }

  .brand-text small {
    display: none;
  }

  .button-row {
    display: grid;
  }

  .button {
    width: 100%;
  }

  .hero-facts {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .hero-facts article,
  .hero-facts article + article {
    padding: 0 0 16px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .hero-facts article:last-child {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .hero-visual {
    min-height: 410px;
    border-radius: 27px;
  }

  .main-visual-card {
    width: 76%;
    padding: 24px;
  }

  .main-visual-card h2 {
    font-size: 1.7rem;
  }

  .mini-card {
    min-width: 105px;
    padding: 10px 11px;
  }

  .mini-card-one {
    top: 7%;
    left: 4%;
  }

  .mini-card-two {
    right: 3%;
    bottom: 17%;
  }

  .mini-card-three {
    bottom: 5%;
    left: 6%;
  }

  .project-heading,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .project-featured {
    grid-column: auto;
  }

  .project-card,
  .project-featured {
    min-height: 430px;
  }

  .github-callout,
  .contact-card {
    padding: 28px;
    align-items: flex-start;
    flex-direction: column;
  }

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

  .process-grid li,
  .process-grid li:last-child {
    grid-column: auto;
    min-height: auto;
    padding: 25px 0;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .process-grid li:last-child {
    border-bottom: 0;
  }

  .process-grid span {
    margin-bottom: 28px;
  }

  .footer-content,
  .footer-links {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
  }
}
