@font-face {
  font-family: "Inter";
  src: url("./fonts/Inter/Inter-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("./fonts/Inter/InterDisplay-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("./fonts/Inter/InterDisplay-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("./fonts/Inter/InterDisplay-Black.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #12132b;
  --paper: #f6f6fb;
  --white: #ffffff;
  --indigo: #4f52f0;
  --indigo-deep: #3c3fd1;
  --plinth: #dcdeff;
  --line: #cfd0e6;
  --muted: #55567a;
  --on-ink: #c9cae6;
  --on-ink-soft: #a9aad0;
  --radius: 12px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --max: 1160px;
  --header-h: 68px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: clip;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

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

.skip-link {
  position: absolute;
  top: -4rem;
  left: var(--gutter);
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0.75rem;
}

.container {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 246, 251, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.header--scrolled {
  border-bottom-color: var(--line);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.header__logo {
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2rem);
}

.nav__link {
  padding-block: 0.35rem;
  border-bottom: 2px solid transparent;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition:
    color 0.15s,
    border-color 0.15s;
}

.nav__link:hover {
  color: var(--ink);
}

.nav__link[aria-current="true"] {
  color: var(--ink);
  border-bottom-color: var(--indigo);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.5rem;
  border: 1.5px solid transparent;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  transition:
    background-color 0.15s,
    color 0.15s,
    border-color 0.15s;
}

.btn--primary {
  background: var(--indigo);
  color: var(--white);
}

.btn--primary:hover {
  background: var(--indigo-deep);
}

.btn--outline {
  border-color: var(--ink);
  color: var(--ink);
}

.btn--outline:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn--light {
  background: var(--paper);
  color: var(--ink);
}

.btn--light:hover {
  background: var(--plinth);
}

.btn--outline-light {
  border-color: var(--on-ink-soft);
  color: var(--paper);
}

.btn--outline-light:hover {
  border-color: var(--paper);
  background: rgba(246, 246, 251, 0.1);
}

.hero {
  padding-block: clamp(2.5rem, 6vw, 5rem) clamp(4rem, 8vw, 7rem);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero__title {
  font-size: clamp(2.75rem, 6.2vw, 5.25rem);
  font-weight: 900;
  line-height: 0.96;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.hero__lead {
  max-width: 36ch;
  margin-top: 1.5rem;
  font-size: 1.2rem;
  color: var(--muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.hero__status {
  margin-top: 1.25rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.hero__caption {
  max-width: 52ch;
  margin-top: 1.75rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.hero__caption a {
  font-weight: 700;
  color: var(--indigo);
}

.frame {
  overflow: hidden;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 12px 12px 0 var(--plinth);
}

.frame__bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  height: 2.4rem;
  padding-inline: 0.9rem;
  border-bottom: 1.5px solid var(--ink);
  background: var(--paper);
}

.frame__dot {
  flex: none;
  width: 0.62rem;
  height: 0.62rem;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
}

.frame__url {
  flex: 1;
  min-width: 0;
  margin-left: 0.6rem;
  overflow: hidden;
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.frame__viewport {
  height: var(--viewport-h, 360px);
  overflow: hidden;
}

.frame__viewport a {
  display: block;
}

.frame__viewport img {
  width: 100%;
  min-height: var(--viewport-h, 360px);
  object-fit: cover;
  object-position: top;
}

.nowrap {
  white-space: nowrap;
}

.frame--hero {
  --viewport-h: clamp(320px, 40vw, 540px);
}

.frame--medium {
  --viewport-h: clamp(300px, 32vw, 440px);
}

.frame--small {
  --viewport-h: 240px;
  border-width: 1px;
  border-radius: 10px;
  box-shadow: none;
}

.frame--small .frame__bar {
  height: 2rem;
  border-bottom-width: 1px;
}

.section {
  padding-block: clamp(4rem, 9vw, 7.5rem);
}

.section--white {
  background: var(--white);
  border-block: 1px solid var(--line);
}

.section[id] {
  scroll-margin-top: calc(var(--header-h) - 1px);
}

.section__head {
  max-width: 46rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section__title {
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.section__intro {
  max-width: 56ch;
  margin-top: 1rem;
  color: var(--muted);
}

.work {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(3rem, 6vw, 5rem) clamp(1.75rem, 3.5vw, 3rem);
}

.project__title {
  margin-top: 2.25rem;
  font-size: clamp(1.45rem, 2.1vw, 1.8rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.project__text {
  max-width: 48ch;
  margin-top: 0.75rem;
}

.project__facts {
  margin-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.project__facts li {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.97rem;
}

.project__link {
  display: inline-block;
  margin-top: 1.5rem;
  font-weight: 700;
  color: var(--indigo);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
}

.project__link:hover {
  color: var(--indigo-deep);
}

.study {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(2.5rem, 4vw, 3.5rem) clamp(1.5rem, 3vw, 2.5rem);
}

.study__title {
  margin-top: 1.25rem;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.study__title a {
  text-decoration: none;
}

.study__title a:hover {
  color: var(--indigo);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

.study__text {
  margin-top: 0.5rem;
  font-size: 0.97rem;
  color: var(--muted);
}

.study__stack {
  margin-top: 0.75rem;
  font-size: 0.88rem;
  font-weight: 500;
}

.study__more {
  align-self: center;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1.5px dashed var(--line);
  border-radius: 10px;
}

.study__more .study__title {
  margin-top: 0;
}

.about {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

.about__photo {
  overflow: hidden;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 12px 12px 0 var(--plinth);
  aspect-ratio: 1;
}

.about__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about__text {
  max-width: 58ch;
  margin-top: 1.5rem;
}

.about__text p + p {
  margin-top: 1rem;
}

.path {
  display: grid;
  gap: 1.4rem;
  margin-top: 2.5rem;
  padding-left: 1.5rem;
  border-left: 2px solid var(--line);
}

.path__item {
  position: relative;
}

.path__item::before {
  content: "";
  position: absolute;
  top: 0.55rem;
  left: calc(-1.5rem - 6px);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--indigo);
}

.path__title {
  font-weight: 700;
}

.path__text {
  font-size: 0.95rem;
  color: var(--muted);
}

.stack {
  display: grid;
  gap: 1rem;
  max-width: 58ch;
  margin-top: 2.5rem;
}

.stack__row {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.stack__term {
  font-weight: 700;
}

.stack__desc {
  color: var(--muted);
}

.contact {
  background: var(--ink);
  color: var(--paper);
}

.contact__title {
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  font-weight: 900;
  line-height: 0.96;
  letter-spacing: -0.045em;
}

.contact__text {
  max-width: 50ch;
  margin-top: 1.5rem;
  font-size: 1.15rem;
  color: var(--on-ink);
}

.contact__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.25rem;
}

.contact__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  margin-top: 1.75rem;
}

.contact__links a {
  font-weight: 500;
  color: var(--on-ink);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
}

.contact__links a:hover {
  color: var(--paper);
}

.footer {
  background: var(--ink);
  color: var(--on-ink-soft);
  font-size: 0.9rem;
}

.footer__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.5rem;
}

.footer__inner::before {
  content: "";
  position: absolute;
  top: 0;
  right: var(--gutter);
  left: var(--gutter);
  height: 1px;
  background: rgba(246, 246, 251, 0.18);
}

.footer__top {
  color: var(--paper);
}

@media (hover: none) {
  .frame__viewport {
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 1100px) {
  .work {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .hero__grid,
  .about {
    grid-template-columns: minmax(0, 1fr);
  }

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

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

  .frame,
  .about__photo {
    box-shadow: 8px 8px 0 var(--plinth);
  }

  .frame--small {
    box-shadow: none;
  }

  .about__photo {
    max-width: 22rem;
  }
}

@media (max-width: 600px) {
  :root {
    --header-h: 60px;
  }

  .nav {
    gap: 1rem;
    font-size: 0.95rem;
  }

  .hero__actions,
  .contact__actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

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

  .stack__row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.25rem;
  }

  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
