:root {
  --ink: #1d2433;
  --muted: #697184;
  --line: #dde1ea;
  --paper: #f7f8fb;
  --white: #ffffff;
  --blue: #3157d5;
  --blue-dark: #2345b5;
  --lavender: #edf1ff;
  --radius: 22px;
}

* { box-sizing: border-box; }

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

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "DM Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

.site-shell {
  max-width: 1440px;
  margin: 0 auto;
  background: var(--white);
  overflow: hidden;
}

.nav {
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6.5%;
  border-bottom: 1px solid #edf0f5;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-family: "Manrope", sans-serif;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -1px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  font-size: 14px;
  font-weight: 600;
}

.nav-links a:not(.nav-contact) { color: #4d5669; }
.nav-links a:hover { color: var(--blue); }

.nav-contact {
  padding: 11px 18px;
  color: var(--white);
  background: var(--ink);
  border-radius: 8px;
}

.nav-contact:hover { color: var(--white) !important; background: var(--blue); }

.hero {
  min-height: 620px;
  display: grid;
  grid-template-columns: 54% 46%;
  align-items: center;
  padding: 70px 6.5% 76px;
  border-bottom: 1px solid #edf0f5;
}

.eyebrow,
.section-kicker {
  margin: 0 0 22px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow { display: flex; align-items: center; gap: 10px; }
.eyebrow span {
  width: 7px;
  height: 7px;
  background: #4dce83;
  border-radius: 50%;
  box-shadow: 0 0 0 5px #e7f7ed;
}

.hero h1 {
  max-width: 700px;
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(54px, 6vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.hero h1 strong {
  color: var(--blue);
  font-weight: 800;
}

.hero-text {
  max-width: 590px;
  margin: 28px 0 34px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.55;
}

.hero-actions { display: flex; gap: 12px; }

.button {
  display: inline-flex;
  height: 50px;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 14px;
  font-weight: 700;
  transition: 180ms ease;
}

.button-primary { color: var(--white); background: var(--blue); border-color: var(--blue); }
.button-primary:hover { background: var(--blue-dark); transform: translateY(-2px); }
.button-secondary:hover { border-color: var(--ink); transform: translateY(-2px); }

.hero-visual {
  position: relative;
  min-height: 470px;
  display: grid;
  place-items: center;
}

.hero-visual::before {
  content: "";
  position: absolute;
  width: 390px;
  height: 390px;
  border-radius: 50%;
  background: var(--lavender);
}

.orbit {
  position: absolute;
  border: 1px solid #dfe5f5;
  border-radius: 50%;
}

.orbit-one { width: 420px; height: 420px; }
.orbit-two { width: 335px; height: 335px; border-style: dashed; }

.code-card {
  position: relative;
  z-index: 2;
  width: 330px;
  transform: rotate(-3deg);
  background: #252d40;
  border: 8px solid var(--white);
  border-radius: 18px;
  box-shadow: 0 24px 55px rgba(44, 57, 94, 0.18);
}

.code-card-bar {
  height: 36px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border-bottom: 1px solid #394156;
}

.code-card-bar span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6d7590;
}

.code-card-bar span:first-child { background: #ff7b7b; }
.code-card-bar span:nth-child(2) { background: #ffc85c; }
.code-card-bar span:last-child { background: #67d6a0; }

.code-card pre {
  margin: 0;
  padding: 25px 22px 28px;
  color: #dfe4f2;
  font: 600 17px/1.75 monospace;
}

.code-card b { color: #92a8ff; }
.code-card em { color: #7ed6ae; font-style: normal; }

.float-badge {
  position: absolute;
  z-index: 3;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0 13px;
  background: var(--white);
  border: 1px solid #e7eaf2;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(44, 57, 94, 0.12);
  font-size: 12px;
  font-weight: 800;
}

.badge-java { top: 83px; right: 20px; }
.badge-python { bottom: 70px; right: 5px; }
.badge-react { left: 5px; bottom: 120px; }

.section { padding: 100px 6.5%; }

.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9%;
  background: #fbfcfe;
}

.section-heading h2,
.contact h2 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(42px, 4.6vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.about-copy {
  align-self: end;
  padding-bottom: 4px;
}

.about-copy > p {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.interest-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.interest-list span,
.tags span {
  border: 1px solid var(--line);
  border-radius: 100px;
  color: #5d6678;
  background: var(--white);
  font-size: 12px;
  font-weight: 700;
}

.interest-list span { padding: 8px 11px; }

.projects { background: var(--white); }

.projects-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 44px;
}

.projects-heading > p {
  max-width: 390px;
  margin: 0 0 8px;
  color: var(--muted);
  line-height: 1.6;
}

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

.project-card {
  min-height: 440px;
  display: flex;
  flex-direction: column;
  border: 1px solid #e4e7ef;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  transition: 220ms ease;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: #ccd4e8;
  box-shadow: 0 18px 45px rgba(47, 61, 96, 0.09);
}

.project-featured { background: #f1f4ff; }

.project-top {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid #e7eaf2;
  color: #7b8394;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-number { color: var(--blue); }

.project-icon {
  position: relative;
  height: 180px;
  display: grid;
  place-items: center;
  border-bottom: 1px solid #e7eaf2;
  background: #f8f9fc;
  overflow: hidden;
}

.project-featured .project-icon { background: #edf1ff; }

.os-icon span {
  position: absolute;
  width: 120px;
  height: 120px;
  border: 12px solid #7185da;
  border-radius: 50%;
  opacity: 0.9;
}

.os-icon span:nth-child(1) { transform: translateX(-38px); }
.os-icon span:nth-child(2) { transform: translateX(38px); border-color: #9daaf2; }
.os-icon span:nth-child(3) { width: 96px; height: 96px; border-width: 9px; border-color: #3157d5; }

.vision-icon {
  background:
    linear-gradient(135deg, transparent 48%, rgba(49,87,213,.12) 49%, rgba(49,87,213,.12) 51%, transparent 52%),
    linear-gradient(45deg, #f6f8fc 48%, #edf1ff 49%, #edf1ff 51%, #f6f8fc 52%);
  background-size: 38px 38px;
}

.road-line {
  width: 190px;
  height: 85px;
  border: 18px solid #7e8dab;
  border-left: 0;
  border-right: 0;
  transform: perspective(150px) rotateX(44deg) rotateZ(-8deg);
  clip-path: polygon(0 20%, 100% 0, 100% 100%, 0 80%);
}

.road-line::after {
  content: "";
  display: block;
  width: 100%;
  height: 2px;
  margin-top: 15px;
  background: repeating-linear-gradient(90deg, #fff 0 12px, transparent 12px 22px);
}

.ecg-icon { background: #f4f7ff; }
.ecg-icon svg { width: 70%; }
.ecg-icon path {
  fill: none;
  stroke: #3157d5;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-icon {
  display: flex;
  align-items: end;
  gap: 12px;
  padding-bottom: 42px;
  background: linear-gradient(180deg, #f8f9fc 0, #f3f6fc 100%);
}

.chart-icon span {
  width: 26px;
  border-radius: 6px 6px 2px 2px;
  background: #91a1db;
}
.chart-icon span:nth-child(1) { height: 40px; }
.chart-icon span:nth-child(2) { height: 68px; background: #7186d1; }
.chart-icon span:nth-child(3) { height: 92px; background: #3157d5; }
.chart-icon span:nth-child(4) { height: 58px; background: #7186d1; }
.chart-icon span:nth-child(5) { height: 78px; }

.route-icon { background: #f7f8fc; }
.route-node {
  position: absolute;
  z-index: 2;
  width: 22px;
  height: 22px;
  background: var(--white);
  border: 6px solid var(--blue);
  border-radius: 50%;
  box-shadow: 0 5px 15px rgba(49,87,213,.18);
}
.node-a { left: 18%; top: 55%; }
.node-b { left: 46%; top: 28%; }
.node-c { right: 18%; bottom: 25%; }
.route-line-a,
.route-line-b {
  position: absolute;
  height: 3px;
  background: #9ba9d3;
  transform-origin: left;
}
.route-line-a { width: 140px; left: 23%; top: 63%; transform: rotate(-32deg); }
.route-line-b { width: 118px; left: 51%; top: 39%; transform: rotate(31deg); }

.project-content {
  flex: 1;
  padding: 24px 24px 22px;
}

.project-content h3 {
  margin: 0 0 10px;
  font-family: "Manrope", sans-serif;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.project-content p {
  min-height: 72px;
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.55;
}

.tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tags span { padding: 7px 9px; }

.project-wide {
  grid-column: 1 / -1;
  min-height: 380px;
  display: grid;
  grid-template-columns: 46% 54%;
  grid-template-rows: 56px 1fr;
}
.project-wide .project-top { grid-column: 1 / -1; }
.project-wide .project-icon { height: auto; grid-row: 2; border-bottom: 0; border-right: 1px solid #e7eaf2; }
.project-wide .project-content { grid-row: 2; align-self: center; padding: 42px; }
.project-wide .project-content p { max-width: 520px; min-height: 0; }

.stack { background: #232b3d; color: var(--white); }
.stack .section-kicker { color: #9eaeef; }
.stack-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin-top: 48px;
  border-top: 1px solid #3c4558;
  border-bottom: 1px solid #3c4558;
}

.stack-group {
  min-height: 270px;
  padding: 26px 24px;
  border-right: 1px solid #3c4558;
}
.stack-group:last-child { border-right: 0; }
.stack-group h3 {
  margin: 0 0 20px;
  color: #aebcf1;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.stack-group ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.stack-group li {
  margin: 10px 0;
  color: #edf0f7;
  font-size: 15px;
}

.contact {
  min-height: 440px;
  text-align: center;
  background: var(--lavender);
}
.contact h2 { color: var(--ink); }
.contact-copy {
  max-width: 540px;
  margin: 22px auto 28px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}
.contact-links {
  display: flex;
  justify-content: center;
  gap: 12px;
}
.contact-links a {
  padding: 14px 18px;
  border: 1px solid #ccd4ee;
  border-radius: 9px;
  background: var(--white);
  font-size: 14px;
  font-weight: 700;
}
.contact-links a:first-child { color: var(--white); background: var(--blue); border-color: var(--blue); }

footer {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6.5%;
  color: #7b8394;
  border-top: 1px solid #edf0f5;
  font-size: 12px;
}
.footer-quote { font-style: italic; }

@media (max-width: 980px) {
  .nav-links a:not(.nav-contact) { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero-visual { min-height: 420px; }
  .about { grid-template-columns: 1fr; gap: 36px; }
  .project-grid { grid-template-columns: 1fr; }
  .project-wide { grid-column: auto; }
  .stack-grid { grid-template-columns: repeat(2, 1fr); }
  .stack-group { border-bottom: 1px solid #3c4558; }
}

@media (max-width: 640px) {
  .nav { height: 70px; }
  .brand-mark { width: 38px; height: 38px; }
  .nav-contact { padding: 9px 12px; }
  .hero { min-height: auto; padding-top: 48px; }
  .hero h1 { font-size: 48px; }
  .hero-text { font-size: 17px; }
  .hero-actions { flex-direction: column; }
  .button { width: 100%; }
  .hero-visual { min-height: 370px; transform: scale(.84); margin: -10px -40px; }
  .section { padding: 72px 6.5%; }
  .section-heading h2, .contact h2 { font-size: 42px; }
  .projects-heading { display: block; }
  .projects-heading > p { margin-top: 18px; }
  .project-card { min-height: 420px; }
  .project-wide {
    grid-template-columns: 1fr;
    grid-template-rows: 56px 180px auto;
  }
  .project-wide .project-icon { grid-row: 2; border-right: 0; border-bottom: 1px solid #e7eaf2; }
  .project-wide .project-content { grid-row: 3; padding: 24px; }
  .stack-grid { grid-template-columns: 1fr; }
  .stack-group { min-height: auto; border-right: 0; }
  .contact-links { flex-direction: column; }
  footer { height: auto; min-height: 82px; flex-direction: column; justify-content: center; gap: 6px; text-align: center; }
  footer p { margin: 0; }
}
