:root {
  --ink: #192543;
  --blue: #53c8f4;
  --blue-deep: #2459ba;
  --cream: #fff8e9;
  --sun: #ffc944;
  --coral: #ff7876;
  --pink: #ffb9d2;
  --green: #5ed59b;
  --paper: #ffffff;
  --line: #1c2b4c;
  --shadow: 6px 7px 0 var(--line);
  --radius: 28px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: "Nunito", "Trebuchet MS", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
}

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

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

h1,
h2,
h3,
.logo,
.button,
.sticker,
.doodle-label {
  font-family: "Fredoka", "Arial Rounded MT Bold", sans-serif;
}

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

h2 {
  margin-bottom: 0.9rem;
  font-size: clamp(2.15rem, 4vw, 3.1rem);
  line-height: 1.05;
}

.container {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-160%);
}

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

.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  border-bottom: 2px solid rgba(28, 43, 76, 0.12);
  background: rgba(255, 248, 233, 0.94);
  backdrop-filter: blur(10px);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 1.55rem;
  font-weight: 600;
}

.logo span {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  border: 3px solid var(--line);
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 3px 3px 0 var(--line);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3.4vw, 40px);
  font-weight: 800;
}

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

.nav-contact {
  padding: 9px 23px;
  border: 3px solid var(--line);
  border-radius: 999px;
  background: var(--sun);
  box-shadow: 3px 3px 0 var(--line);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.nav-contact:hover {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--line);
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 690px;
  padding: 72px 0 110px;
  background:
    radial-gradient(circle at 10% 14%, rgba(255, 255, 255, 0.54) 0 5%, transparent 5.2%),
    linear-gradient(180deg, #50c4ef 0%, #74d6f6 100%);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.8fr;
  align-items: center;
  gap: clamp(45px, 7vw, 92px);
}

.sticker {
  display: inline-flex;
  margin: 0 0 20px;
  padding: 7px 19px;
  border: 3px solid var(--line);
  border-radius: 999px;
  background: var(--sun);
  box-shadow: 3px 4px 0 var(--line);
  font-size: 1.05rem;
  transform: rotate(-3deg);
}

.hero h1 {
  margin-bottom: 18px;
  font-size: clamp(3.75rem, 7.4vw, 5.8rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.96;
}

.highlight {
  position: relative;
  display: inline-block;
  color: var(--paper);
  text-shadow: 3px 3px 0 var(--blue-deep);
}

.highlight::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -7px;
  bottom: -3px;
  left: -7px;
  height: 15px;
  border-radius: 10px;
  background: var(--sun);
  transform: rotate(-1deg);
}

.hero-text {
  max-width: 550px;
  margin-bottom: 30px;
  color: #153760;
  font-size: clamp(1.08rem, 1.7vw, 1.2rem);
  font-weight: 700;
}

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

.button {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border: 3px solid var(--line);
  border-radius: 999px;
  font-size: 1.06rem;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.button:hover {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 var(--line);
}

.button-primary {
  background: var(--sun);
  box-shadow: 5px 5px 0 var(--line);
}

.button-secondary {
  background: var(--paper);
  box-shadow: 5px 5px 0 var(--line);
}

.portrait-wrap {
  position: relative;
  justify-self: center;
  padding-bottom: 30px;
}

.portrait-card {
  width: min(350px, 80vw);
  padding: 11px;
  border: 4px solid var(--line);
  border-radius: 32px;
  background: var(--paper);
  box-shadow: 9px 10px 0 var(--line);
  transform: rotate(3deg);
}

.portrait-card img {
  width: 100%;
  height: 430px;
  border-radius: 20px;
  object-fit: cover;
  object-position: center center;
}

.doodle-label {
  position: absolute;
  right: -18px;
  bottom: -12px;
  padding: 8px 22px;
  border: 3px solid var(--line);
  border-radius: 9px;
  background: var(--sun);
  font-size: 1.04rem;
  font-weight: 700;
  transform: rotate(-5deg);
}

.spark {
  position: absolute;
  color: var(--sun);
  font-size: 2.8rem;
  text-shadow: 2px 2px 0 var(--line);
}

.spark-one {
  top: 5px;
  right: -30px;
}

.spark-two {
  top: 58px;
  right: -58px;
  font-size: 1.75rem;
}

.cloud {
  position: absolute;
  height: 39px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.86);
}

.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  bottom: 0;
  border-radius: 50%;
  background: inherit;
}

.cloud-left {
  top: 82px;
  left: -18px;
  width: 122px;
}

.cloud-left::before {
  left: 31px;
  width: 58px;
  height: 58px;
}

.cloud-left::after {
  left: 75px;
  width: 42px;
  height: 47px;
}

.cloud-right {
  right: 4%;
  bottom: 118px;
  width: 134px;
}

.cloud-right::before {
  left: 22px;
  width: 58px;
  height: 63px;
}

.cloud-right::after {
  left: 70px;
  width: 51px;
  height: 51px;
}

.hero-wave {
  position: absolute;
  right: -4%;
  bottom: -36px;
  left: -4%;
  height: 80px;
  border-radius: 50% 50% 0 0 / 48% 48% 0 0;
  background: var(--cream);
}

.section {
  padding: 75px 0;
}

.section-kicker {
  margin-bottom: 10px;
  color: var(--blue-deep);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.centered {
  text-align: center;
}

.split-card {
  display: grid;
  grid-template-columns: 0.8fr 1fr;
  gap: clamp(30px, 6vw, 75px);
  align-items: center;
  padding: clamp(30px, 5vw, 48px);
  border: 3px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.split-card p:last-child {
  margin-bottom: 0;
  font-size: 1.08rem;
  font-weight: 700;
}

.interests {
  padding-top: 42px;
}

.interest-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 36px;
}

.interest-card {
  padding: 28px 26px 25px;
  border: 3px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 5px 6px 0 var(--line);
  transition: transform 180ms ease;
}

.interest-card:hover {
  transform: translateY(-6px) rotate(-1deg);
}

.interest-card.yellow {
  background: #fff2c4;
}

.interest-card.blue {
  background: #c8efff;
}

.interest-card.pink {
  background: #ffd5e5;
}

.card-icon {
  display: grid;
  width: 57px;
  height: 57px;
  margin-bottom: 19px;
  place-items: center;
  border: 3px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  font-size: 1.55rem;
}

.interest-card h3 {
  margin-bottom: 7px;
  font-size: 1.48rem;
}

.interest-card p {
  margin-bottom: 0;
  font-weight: 700;
}

.projects {
  background: #fffdf6;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 25px;
  margin-bottom: 37px;
}

.section-heading h2 {
  margin-bottom: 0;
}

.heading-note {
  margin-bottom: 10px;
  padding: 7px 16px;
  border: 2px dashed var(--blue-deep);
  border-radius: 999px;
  color: var(--blue-deep);
  font-weight: 800;
  transform: rotate(2deg);
}

.project-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr 0.72fr;
  gap: 24px;
}

.project-card {
  min-height: 284px;
  padding: 31px;
  border: 3px solid var(--line);
  border-radius: var(--radius);
}

.smart-project {
  overflow: hidden;
  padding: 0;
  background: var(--paper);
  box-shadow: var(--shadow);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.smart-project:hover {
  transform: translateY(-5px);
  box-shadow: 8px 12px 0 var(--line);
}

.project-cover {
  width: 100%;
  height: 222px;
  border-bottom: 3px solid var(--line);
  object-fit: cover;
  object-position: center;
}

.project-content {
  padding: 25px 28px 29px;
}

.project-content .project-badge {
  margin-bottom: 15px;
}

.project-link {
  display: inline-block;
  margin-top: 20px;
  color: var(--blue-deep);
  font-weight: 800;
}

.project-card.featured {
  background: var(--green);
  box-shadow: var(--shadow);
}

.project-badge {
  display: inline-flex;
  margin-bottom: 22px;
  padding: 5px 14px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-weight: 800;
}

.project-card h3 {
  margin-bottom: 10px;
  font-size: 1.65rem;
}

.project-card p {
  font-weight: 700;
}

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

.project-tags span {
  padding: 4px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  font-weight: 800;
}

.project-card.soon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--paper);
  box-shadow: 5px 6px 0 var(--line);
}

.plus {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 19px;
  place-items: center;
  border: 3px dashed var(--line);
  border-radius: 50%;
  color: var(--blue-deep);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.contact {
  padding-bottom: 88px;
}

.contact-card {
  position: relative;
  overflow: hidden;
  padding: clamp(42px, 7vw, 64px) 22px;
  border: 3px solid var(--line);
  border-radius: 38px;
  background: var(--pink);
  box-shadow: var(--shadow);
  text-align: center;
}

.contact-card::before,
.contact-card::after {
  content: "";
  position: absolute;
  width: 130px;
  height: 130px;
  border: 3px solid rgba(28, 43, 76, 0.16);
  border-radius: 50%;
}

.contact-card::before {
  top: -68px;
  left: -44px;
}

.contact-card::after {
  right: -36px;
  bottom: -75px;
}

.contact-card p:not(.section-kicker) {
  margin: 0 auto 27px;
  max-width: 480px;
  font-size: 1.08rem;
  font-weight: 700;
}

.paper-plane {
  position: absolute;
  top: 45px;
  right: clamp(30px, 10%, 122px);
  color: var(--coral);
  font-size: 3.1rem;
  transform: rotate(-11deg);
}

.site-footer {
  padding: 25px 0;
  border-top: 2px solid rgba(28, 43, 76, 0.12);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-weight: 800;
}

.footer-content p {
  margin-bottom: 0;
}

.footer-content a {
  color: var(--blue-deep);
}

.project-page {
  background: #fffdf6;
}

.project-hero {
  padding: 44px 0 90px;
  background:
    radial-gradient(circle at 90% 12%, rgba(255, 201, 68, 0.42) 0 8%, transparent 8.3%),
    linear-gradient(180deg, #d5f4ff 0%, #fff8e9 100%);
}

.back-link {
  display: inline-flex;
  margin-bottom: 36px;
  color: var(--blue-deep);
  font-weight: 800;
}

.project-hero-grid {
  display: grid;
  grid-template-columns: 0.9fr 1fr;
  align-items: center;
  gap: clamp(42px, 7vw, 76px);
}

.project-hero h1 {
  margin-bottom: 23px;
  font-size: clamp(3.8rem, 7vw, 5.6rem);
  letter-spacing: -0.03em;
  line-height: 0.96;
}

.project-hero .highlight {
  color: var(--blue-deep);
  text-shadow: none;
}

.project-intro {
  margin-bottom: 31px;
  font-size: 1.14rem;
  font-weight: 700;
}

.smart-hero-photo {
  position: relative;
  margin: 0;
  padding: 12px;
  border: 4px solid var(--line);
  border-radius: 32px;
  background: var(--paper);
  box-shadow: 9px 10px 0 var(--line);
  transform: rotate(2deg);
}

.smart-hero-photo img {
  width: 100%;
  max-height: 490px;
  border-radius: 19px;
  object-fit: cover;
}

.smart-hero-photo figcaption {
  position: absolute;
  right: -17px;
  bottom: -23px;
  padding: 8px 19px;
  border: 3px solid var(--line);
  border-radius: 10px;
  background: var(--sun);
  font-family: "Fredoka", "Arial Rounded MT Bold", sans-serif;
  font-weight: 700;
  transform: rotate(-5deg);
}

.build-story {
  background: var(--cream);
}

.story-grid {
  display: grid;
  grid-template-columns: 0.82fr 0.82fr 1.16fr;
  gap: 25px;
  margin-top: 40px;
}

.story-card {
  overflow: hidden;
  margin: 0;
  border: 3px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 5px 6px 0 var(--line);
}

.story-card img {
  width: 100%;
  height: 350px;
  border-bottom: 3px solid var(--line);
  object-fit: cover;
}

.story-card.result img {
  object-position: center;
}

.story-card figcaption {
  padding: 19px 21px 24px;
  font-weight: 700;
}

.story-card strong {
  display: block;
  margin-bottom: 5px;
  font-family: "Fredoka", "Arial Rounded MT Bold", sans-serif;
  font-size: 1.35rem;
}

.demo-section {
  background: #d5f4ff;
}

.demo-grid {
  display: grid;
  grid-template-columns: 0.55fr 1fr;
  align-items: center;
  gap: clamp(34px, 5vw, 62px);
}

.demo-copy {
  font-size: 1.09rem;
  font-weight: 700;
}

.demo-video {
  display: block;
  width: 100%;
  border: 4px solid var(--line);
  border-radius: 25px;
  background: var(--ink);
  box-shadow: var(--shadow);
}

.code-section {
  background: #fffdf6;
}

.code-card {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  align-items: center;
  gap: clamp(28px, 5vw, 54px);
  padding: clamp(30px, 5vw, 48px);
  border: 3px solid var(--line);
  border-radius: var(--radius);
  background: #fff2c4;
  box-shadow: var(--shadow);
}

.code-card p:last-child {
  margin-bottom: 0;
  font-size: 1.06rem;
  font-weight: 700;
}

.code-card pre {
  overflow-x: auto;
  margin: 0;
  padding: 24px;
  border: 3px solid var(--line);
  border-radius: 18px;
  background: var(--ink);
  color: #fff9d5;
  font: 700 0.95rem/1.7 "SFMono-Regular", Consolas, monospace;
}

@media (max-width: 850px) {
  .nav {
    min-height: 74px;
  }

  .nav-links a:not(.nav-contact) {
    display: none;
  }

  .hero {
    padding: 55px 0 105px;
  }

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

  .portrait-wrap {
    order: -1;
  }

  .cloud-right {
    display: none;
  }

  .split-card,
  .interest-grid,
  .project-grid,
  .project-hero-grid,
  .story-grid,
  .demo-grid,
  .code-card {
    grid-template-columns: 1fr;
  }

  .project-card {
    min-height: 230px;
  }

  .project-hero {
    padding-top: 30px;
  }

  .smart-hero-photo {
    order: -1;
  }

  .story-card img {
    height: min(88vw, 430px);
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 32px, 1120px);
  }

  .logo {
    font-size: 1.27rem;
  }

  .logo span {
    width: 39px;
    height: 39px;
  }

  .nav-contact {
    padding-inline: 16px;
  }

  .hero h1 {
    font-size: clamp(3.05rem, 17vw, 3.75rem);
  }

  .spark-one,
  .spark-two,
  .paper-plane {
    display: none;
  }

  .section {
    padding: 54px 0;
  }

  .section-heading,
  .footer-content {
    flex-direction: column;
    align-items: start;
  }
}
