:root {
  color-scheme: light;
  --ink: #171526;
  --muted: #676279;
  --violet: #6342f5;
  --violet-dark: #3b247e;
  --paper: #f7f5fc;
  --white: #ffffff;
  --line: rgba(45, 37, 75, 0.14);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(247, 245, 252, 0.79), rgba(247, 245, 252, 0.98)),
    repeating-linear-gradient(90deg, transparent 0, transparent calc(8.333vw - 1px), rgba(45, 37, 75, 0.05) calc(8.333vw - 1px), rgba(45, 37, 75, 0.05) 8.333vw);
  color: var(--ink);
}

a { color: inherit; text-decoration: none; }
.ambient { position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; }
.ambient-one { top: -18rem; right: -13rem; width: 42rem; height: 42rem; background: radial-gradient(circle, rgba(164, 139, 255, 0.28), transparent 67%); }
.ambient-two { top: 42rem; left: -20rem; width: 40rem; height: 40rem; background: radial-gradient(circle, rgba(99, 66, 245, 0.13), transparent 68%); }

.site-header, main, footer { width: min(100% - 3rem, 78rem); margin-inline: auto; }
.site-header { display: flex; align-items: center; justify-content: space-between; padding-top: 1.75rem; }

.wordmark {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border-radius: 0.85rem;
  background: var(--ink);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  transition: transform 180ms ease, background-color 180ms ease;
}

.wordmark:hover { transform: rotate(-4deg); background: var(--violet); }
nav, .contact-links { display: flex; align-items: center; gap: 1.5rem; }
nav a, footer a, .text-link { position: relative; font-size: 0.9rem; font-weight: 650; }

nav a::after, footer a::after, .text-link::after {
  position: absolute;
  right: 0;
  bottom: -0.3rem;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

nav a:hover::after, footer a:hover::after, .text-link:hover::after { transform: scaleX(1); transform-origin: left; }

.hero {
  display: flex;
  min-height: min(47rem, calc(100vh - 4.5rem));
  flex-direction: column;
  justify-content: center;
  padding: clamp(5.5rem, 11vw, 9.5rem) 0 5rem;
}

.kicker, .section-label, .project-topline {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 720;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.kicker { display: flex; align-items: center; gap: 0.8rem; color: var(--violet); }
.kicker::before { width: 2.25rem; height: 1px; background: currentColor; content: ""; }

h1 {
  max-width: 13ch;
  margin: 1.6rem 0 0;
  font-size: clamp(3.4rem, 7.5vw, 7rem);
  font-weight: 640;
  letter-spacing: -0.07em;
  line-height: 0.93;
}

h1 span { color: var(--violet); }

.hero-footer {
  display: grid;
  max-width: 51rem;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 3rem;
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
}

.hero-footer p { max-width: 38rem; margin: 0; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.16rem); line-height: 1.7; }
.text-link { color: var(--violet-dark); white-space: nowrap; }

.impact {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.impact div { display: flex; min-height: 8.5rem; flex-direction: column; justify-content: center; padding: 1.5rem 1.5rem 1.5rem 0; }
.impact div + div { padding-left: 1.5rem; border-left: 1px solid var(--line); }
.impact strong { font-size: clamp(1.55rem, 2.8vw, 2.35rem); font-weight: 640; letter-spacing: -0.045em; }
.impact span { margin-top: 0.45rem; color: var(--muted); font-size: 0.78rem; letter-spacing: 0.04em; }

.work { max-width: 68rem; margin-inline: auto; padding: 7rem 0; }
.section-heading { display: grid; grid-template-columns: 0.65fr 1.35fr; align-items: start; gap: 2rem; margin-bottom: 3.5rem; }
.section-label { color: var(--muted); }

.section-heading h2, .about h2, .contact h2 {
  margin: 0;
  font-size: clamp(2.1rem, 4.4vw, 4.1rem);
  font-weight: 610;
  letter-spacing: -0.058em;
  line-height: 1.02;
}

.project-list { position: relative; height: 31rem; isolation: isolate; container-type: inline-size; }
.project-card {
  position: absolute;
  top: 0;
  bottom: 0;
  width: calc(50% - 0.625rem);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  box-shadow: 0 1rem 3rem rgba(41, 29, 84, 0.08);
  transition: width 360ms cubic-bezier(0.2, 0.72, 0.2, 1), box-shadow 300ms ease;
}
.project-leetin {
  left: 0;
  background:
    radial-gradient(circle at 82% 16%, rgba(151, 129, 255, 0.34), transparent 34%),
    radial-gradient(circle at 16% 88%, rgba(225, 216, 255, 0.75), transparent 37%),
    #ffffff;
}
.project-milky {
  right: 0;
  background:
    radial-gradient(circle at 12% 88%, rgba(226, 157, 235, 0.55), transparent 34%),
    radial-gradient(circle at 88% 18%, rgba(143, 207, 255, 0.55), transparent 40%),
    #eeeaff;
}
.project-card:hover,
.project-card:focus,
.project-card:focus-within {
  z-index: 3;
  width: 88%;
  box-shadow: 0 1.75rem 5rem rgba(41, 29, 84, 0.2);
  outline: none;
}
.project-intro, .project-detail { padding: clamp(1.4rem, 2.5vw, 2.25rem); }
.project-intro {
  position: relative;
  z-index: 1;
  display: flex;
  width: calc(50cqw - 0.625rem);
  height: 100%;
  flex-direction: column;
  border-right: 1px solid transparent;
  transition: border-color 220ms ease;
}
.project-card:hover .project-intro,
.project-card:focus .project-intro,
.project-card:focus-within .project-intro {
  border-color: var(--line);
}
.project-topline { display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); }
.project-number { color: var(--violet); }
.project-intro > div:nth-child(2) { margin: auto 0; }

.product-mark { display: grid; width: 3rem; height: 3rem; place-items: center; margin-bottom: 1.5rem; border-radius: 0.85rem; font-weight: 800; }
.milky-mark { background: rgba(255, 255, 255, 0.76); color: var(--violet-dark); box-shadow: 0 0.4rem 1.3rem rgba(68, 51, 120, 0.1); }
.leetin-mark { border: 1px solid rgba(99, 66, 245, 0.4); background: rgba(255, 255, 255, 0.8); color: var(--violet); }

.project-intro h3 { margin: 0; font-size: clamp(3.2rem, 5vw, 4.4rem); font-weight: 640; letter-spacing: -0.065em; line-height: 0.95; }
.project-role { margin: 1rem 0 0; color: var(--violet-dark); font-size: 0.82rem; font-weight: 690; line-height: 1.5; }
.project-summary { max-width: 31rem; margin: 1.45rem 0 0; color: var(--muted); font-size: 1rem; line-height: 1.65; }
.project-action { align-self: flex-start; border-bottom: 1px solid currentColor; color: var(--violet-dark); font-size: 0.9rem; font-weight: 720; padding-bottom: 0.28rem; }

.project-detail {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: calc(50cqw - 0.625rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateX(1rem);
  transition: opacity 180ms ease 80ms, transform 280ms ease 80ms, visibility 0s linear 360ms;
}
.project-card:hover .project-detail,
.project-card:focus .project-detail,
.project-card:focus-within .project-detail {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  transition-delay: 120ms;
}
.metrics { display: grid; grid-template-columns: repeat(2, 1fr); margin: 0 0 1.5rem; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.metrics div { padding: 0.75rem 0.9rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metrics dt { font-size: clamp(1.05rem, 1.5vw, 1.45rem); font-weight: 680; letter-spacing: -0.04em; }
.metrics dd { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.75rem; line-height: 1.35; }

.highlights { display: grid; gap: 0.7rem; margin: 0; padding: 0; list-style: none; }
.highlights li { position: relative; padding-left: 1rem; color: #454054; font-size: 0.78rem; line-height: 1.45; }
.highlights li::before { position: absolute; top: 0.68rem; left: 0; width: 0.42rem; height: 0.42rem; border-radius: 50%; background: var(--violet); content: ""; }
.stack { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 1.4rem 0 0; padding: 0; list-style: none; }
.stack li, .capabilities li { border: 1px solid rgba(99, 66, 245, 0.18); border-radius: 999px; background: rgba(255, 255, 255, 0.54); color: var(--violet-dark); font-size: 0.68rem; font-weight: 650; padding: 0.4rem 0.62rem; }

.about, .contact { display: grid; grid-template-columns: 0.65fr 1.35fr; gap: 2rem; padding: 7rem 0; border-top: 1px solid var(--line); }
.about-content, .contact > div { max-width: 49rem; }
.about-content p, .contact p { max-width: 43rem; margin: 2rem 0 0; color: var(--muted); font-size: clamp(1.02rem, 1.7vw, 1.24rem); line-height: 1.72; }
.about-content p + p { margin-top: 1rem; }
.capabilities { display: flex; flex-wrap: wrap; gap: 0.55rem; margin: 2rem 0 0; padding: 0; list-style: none; }
.capabilities li { background: var(--white); font-size: 0.78rem; }

.contact { align-items: start; }
.contact h2 { color: var(--violet); }
.contact-links { flex-wrap: wrap; margin-top: 2.25rem; }
.contact-links a { border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, 0.7); font-size: 0.9rem; font-weight: 700; padding: 0.85rem 1.2rem; transition: border-color 180ms ease, color 180ms ease, transform 180ms ease; }
.contact-links a:hover { transform: translateY(-2px); border-color: var(--violet); color: var(--violet); }

footer { display: flex; align-items: center; justify-content: space-between; padding: 2rem 0 3rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.84rem; }
footer p { margin: 0; }
a:focus-visible { border-radius: 0.25rem; outline: 3px solid rgba(99, 66, 245, 0.4); outline-offset: 4px; }

@media (max-width: 60rem) {
  .project-list {
    display: flex;
    height: auto;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
  }
  .project-card,
  .project-card:hover,
  .project-card:focus,
  .project-card:focus-within {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: auto;
    min-width: min(82vw, 29rem);
    height: 31rem;
    flex: 0 0 min(82vw, 29rem);
    scroll-snap-align: start;
  }
  .project-intro,
  .project-card:hover .project-intro,
  .project-card:focus .project-intro,
  .project-card:focus-within .project-intro {
    width: 100%;
    border-right: 0;
  }
  .project-detail { display: none; }
}

@media (max-width: 48rem) {
  .site-header, main, footer { width: min(100% - 2rem, 78rem); }
  nav { gap: 1rem; }
  .hero { min-height: auto; padding: 7rem 0 6rem; }
  .hero-footer, .section-heading, .about, .contact { grid-template-columns: 1fr; }
  .hero-footer { align-items: start; gap: 1.5rem; }
  .impact { grid-template-columns: repeat(2, 1fr); }
  .impact div:nth-child(3) { border-left: 0; }
  .impact div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .work { padding: 6rem 0; }
  .about, .contact { gap: 1.5rem; padding: 5rem 0; }
}

@media (max-width: 30rem) {
  nav a:nth-child(2) { display: none; }
  h1 { font-size: clamp(3.15rem, 15vw, 4.6rem); }
  .impact div { min-height: 7rem; padding: 1rem; }
  .impact div + div { padding-left: 1rem; }
  .project-intro, .project-detail { padding: 1.45rem; }
  .project-topline { font-size: 0.67rem; }
  .metrics div { padding: 0.9rem; }
  footer { align-items: flex-start; flex-direction: column; gap: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
