:root {
  --light: #f4f6f9;
  --dark: #20242a;
  --text: #202327;
  --muted: #666e78;
  --border: #e2e7ee;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background: #fff;
  overflow-x: hidden;
}

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

.container {
  width: min(1110px, 92vw);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.header-row {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.logo {
  position: relative;
  --logo-roll-distance: 168px;
  display: inline-flex;
  align-items: center;
  min-width: 40px;
  line-height: 1;
}

.logo-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #f0f4fb;
  background: radial-gradient(circle at 30% 30%, #586173 0%, #3f4756 50%, #2d3340 100%);
  border: 1px solid #2a313d;
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.18),
    inset 0 -2px 4px rgba(0, 0, 0, 0.28),
    0 1px 0 rgba(255, 255, 255, 0.45);
}

.logo.is-rolling .logo-badge {
  animation: logo-roll-right 4.8s cubic-bezier(0.22, 1, 0.36, 1) 1;
}

.logo-name {
  position: absolute;
  left: 52px;
  top: 50%;
  transform: translate(-6px, -50%);
  opacity: 0;
  white-space: nowrap;
  pointer-events: none;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #3b5478;
}

.logo.is-rolling .logo-name {
  opacity: 1;
}

.menu-toggle {
  display: none;
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  border-radius: 0;
  padding: 0;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-direction: column;
  cursor: pointer;
  margin-right: -6px;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: #222833;
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1), opacity 220ms ease;
}

body.nav-open .menu-toggle span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

body.nav-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

body.nav-open .menu-toggle span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.site-nav a {
  font-size: 0.9rem;
  text-transform: lowercase;
  color: var(--muted);
}

.nav-label {
  display: none;
}

.hero {
  padding: 36px 0 92px;
  perspective: 1200px;
}

.split-face {
  --split: 0.5;
  --hero-shift: 0;
  --hero-progress: 0;
  min-height: 540px;
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: linear-gradient(
    90deg,
    #ecf1f7 0%,
    #ecf1f7 calc(var(--split) * 100%),
    #23272d calc(var(--split) * 100%),
    #23272d 100%
  );
  transform: translateY(calc(var(--hero-progress) * -14px)) scale(calc(1 - (var(--hero-progress) * 0.02)));
  transition: --split 260ms ease, transform 380ms cubic-bezier(0.22, 1, 0.36, 1);
}

.split-face::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(
      circle at calc((var(--hero-shift) * 35%) + 50%) 50%,
      rgba(91, 159, 255, 0.22) 0%,
      rgba(91, 159, 255, 0.1) 30%,
      rgba(91, 159, 255, 0) 65%
    ),
    linear-gradient(
      90deg,
      rgba(88, 129, 185, calc((var(--hero-shift) * -1 + 1) * 0.08)) 0%,
      rgba(88, 129, 185, 0) 50%,
      rgba(73, 101, 140, calc((var(--hero-shift) + 1) * 0.08)) 100%
    );
  mix-blend-mode: soft-light;
  opacity: 1;
}

.panel {
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 38px;
  z-index: 1;
}

.panel-left {
  background: transparent;
  justify-content: flex-start;
}

.panel-left .panel-copy {
  animation: designer-reveal 820ms cubic-bezier(0.22, 1, 0.36, 1) 1;
}

.panel-right {
  background: transparent;
  justify-content: flex-end;
}

.panel-copy {
  max-width: 320px;
  will-change: transform;
}

.panel h1 {
  margin: 0;
  font-size: clamp(2.5rem, 5vw, 4.35rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.panel p {
  margin: 14px 0 0;
  line-height: 1.52;
  font-size: 0.99rem;
}

.dynamic-text {
  --text-cut: 100%;
  color: transparent;
  -webkit-text-fill-color: transparent;
  background-image: linear-gradient(
    90deg,
    #2f4f78 0%,
    #2f4f78 var(--text-cut),
    #ffffff var(--text-cut),
    #ffffff 100%
  );
  background-clip: text;
  -webkit-background-clip: text;
}

.dynamic-text-right {
  --text-cut: 0%;
}

.panel-right h1.dynamic-text-right {
  font-family: "JetBrains Mono", "Fira Code", "Inter", sans-serif;
  letter-spacing: -0.02em;
  font-weight: 700;
  font-variant-ligatures: contextual;
}

.panel-right p.dynamic-text-right {
  font-family: "JetBrains Mono", "Fira Code", "Inter", sans-serif;
  font-size: 0.92em;
  line-height: 1.6;
  letter-spacing: -0.01em;
  font-weight: 500;
  font-variant-ligatures: contextual;
}

.panel-right h1.dynamic-text-right.is-code-typing::after {
  content: "";
  display: inline-block;
  width: 0.11em;
  height: 0.9em;
  margin-left: 0.12em;
  vertical-align: -0.08em;
  background: var(--coder-cursor-color, #f4f7fc);
  border-radius: 1px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
  animation: code-cursor-blink 900ms steps(1, end) infinite;
}

.section-light {
  background: #fff;
  padding: 76px 0;
}

.section-light .split-content {
  gap: 0;
}

.section-dark {
  background: var(--dark);
  color: #fff;
  padding: 74px 0;
}

.section-contact {
  background: var(--light);
  padding: 76px 0;
}

.split-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
  align-items: center;
}

.text-col h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.1rem);
  letter-spacing: -0.03em;
}

.text-col p {
  margin: 12px 0 0;
  line-height: 1.7;
  color: var(--muted);
}

.text-col .intro {
  color: #2f3844;
  font-weight: 600;
}

.media-col img {
  width: 100%;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.about-photo {
  aspect-ratio: 4 / 5;
  object-fit: contain;
  object-position: center;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  background: transparent;
  box-shadow: none !important;
  filter: none !important;
}

.section-title h2 {
  margin: 0 0 18px;
  font-size: clamp(1.45rem, 2.7vw, 2rem);
}

.work-grid {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.work-card {
  background: #2b3038;
  border: 1px solid #3b424f;
  border-radius: 6px;
  overflow: hidden;
}

.work-card img {
  width: 100%;
  height: 214px;
  object-fit: cover;
  display: block;
}

.work-card iframe,
.work-placeholder {
  width: 100%;
  height: 214px;
  display: block;
  border: 0;
  background: #1f242c;
}

.work-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #9fb2cd;
}

.work-copy {
  padding: 14px;
}

.work-copy h3 {
  margin: 0;
  font-size: 1rem;
  color: #f7f8fa;
}

.work-copy p {
  margin: 6px 0 0;
  font-size: 0.9rem;
  color: #b7c0cd;
}

.work-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.86rem;
  font-weight: 600;
  color: #d8e4f6;
}

.bmky-hero {
  padding: 64px 0;
}

.bmky-hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: center;
}

.bmky-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.03em;
}

.bmky-cover {
  width: 100%;
  max-height: 420px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.bmky-lead {
  margin: 0;
  font-size: 1rem;
  line-height: 1.75;
  color: #2f3844;
}

.bmky-points {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.bmky-point {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}

.bmky-point h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: #20242a;
}

.bmky-point p {
  margin: 0;
  color: #566070;
  line-height: 1.6;
  font-size: 0.92rem;
}

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

.bmky-feature-card {
  background: #2b3038;
  border: 1px solid #3b424f;
  border-radius: 8px;
  padding: 16px;
}

.bmky-feature-card h3 {
  margin: 0 0 8px;
  color: #f7f8fa;
  font-size: 1rem;
}

.bmky-feature-card p {
  margin: 0;
  color: #b7c0cd;
  line-height: 1.6;
  font-size: 0.9rem;
}

.bmky-gallery {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.bmky-shot {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.bmky-shot img {
  width: 100%;
  display: block;
}

.bmky-shot figcaption {
  padding: 10px;
  font-size: 0.84rem;
  color: #465062;
  text-align: center;
  border-top: 1px solid var(--border);
}

.contact-form {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 6px;
  padding: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.88rem;
  color: #2f3844;
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid #d8dee8;
  border-radius: 6px;
  padding: 10px 12px;
  font: inherit;
}

.field textarea {
  min-height: 122px;
  resize: vertical;
}

.submit-btn {
  margin-top: 14px;
  border: 0;
  background: #2c323c;
  color: #fff;
  border-radius: 999px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.form-status-message {
  margin: 12px 0 0;
  font-size: 0.9rem;
  font-weight: 600;
}

.form-status-message.success {
  color: #1f8f4e;
}

.form-status-message.error {
  color: #b33a33;
}

.site-footer {
  border-top: 1px solid var(--border);
}

.footer-row {
  min-height: 72px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.footer-row p,
.footer-row a {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: #2c323c;
  transition: transform 180ms ease, color 180ms ease;
}

.footer-social a:hover {
  transform: translateY(-1px);
  color: #1f242c;
}

.footer-social svg {
  width: 18px;
  height: 18px;
}

.back-to-top-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid #cfd7e4;
  color: #2f3f56;
  background: #f7f9fc;
  transition: transform 180ms ease, background-color 180ms ease, color 180ms ease;
}

.back-to-top-arrow:hover {
  transform: translateY(-2px);
  background: #eaf0fa;
  color: #23344d;
}

.back-to-top-arrow svg {
  width: 18px;
  height: 18px;
}

.scroll-section {
  opacity: 1;
  transform: none;
  filter: none;
}

.js-scroll-animations .scroll-section {
  opacity: 0;
  transform: translateY(46px) scale(0.985);
  filter: blur(6px);
  transition:
    opacity 780ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 780ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 780ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--section-delay, 0ms);
}

.js-scroll-animations .scroll-section.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

@media (max-width: 920px) {
  .hero {
    min-height: 75vh;
    padding: 14px 0 24px;
    display: flex;
    align-items: stretch;
  }

  .menu-toggle {
    display: flex;
  }

  .site-nav {
    display: flex;
    position: absolute;
    top: 72px;
    right: 0;
    left: 0;
    min-height: calc(100vh - 72px);
    padding: 20px 22px 28px;
    background: rgba(247, 249, 252, 0.97);
    backdrop-filter: blur(8px);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-14px);
    transition: opacity 280ms ease, transform 320ms cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 280ms;
    pointer-events: none;
    z-index: 30;
  }

  .site-nav::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -120px;
    width: 180vmax;
    height: 180vmax;
    border-radius: 45%;
    transform: translate(-50%, -50%) scale(0.08);
    background:
      radial-gradient(circle at 50% 50%, rgba(120, 168, 236, 0.36) 0%, rgba(120, 168, 236, 0.18) 42%, rgba(120, 168, 236, 0) 72%),
      radial-gradient(circle at 52% 56%, rgba(72, 111, 165, 0.26) 0%, rgba(72, 111, 165, 0) 62%);
    opacity: 0;
    pointer-events: none;
    z-index: 0;
  }

  .site-nav a {
    position: relative;
    z-index: 1;
  }

  .site-nav a {
    font-size: 1.35rem;
    line-height: 1.1;
    color: #1f2632;
    font-weight: 700;
    letter-spacing: -0.02em;
  }

  .site-nav .nav-label {
    display: block;
    position: relative;
    z-index: 1;
    width: min(320px, 90%);
    margin-top: 6px;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6e7a8b;
    text-align: left;
    font-weight: 700;
  }

  .site-nav .nav-label-languages {
    margin-top: 12px;
    padding-top: 14px;
    border-top: 1px solid rgba(109, 128, 156, 0.28);
  }

  .site-nav .lang-link {
    font-size: 1rem;
    font-weight: 600;
    color: #3c4b61;
    min-width: 64px;
    text-align: center;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid #cbd4e3;
    background: #eef3fb;
  }

  .site-nav a:not(.lang-link) {
    width: min(320px, 90%);
    text-align: center;
  }

  .site-nav.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 280ms ease, transform 320ms cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0s;
    pointer-events: auto;
  }

  .site-nav.open::before {
    animation: nav-wave 820ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  .split-face {
    min-height: clamp(420px, 75vh, 760px);
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
    background: linear-gradient(
      180deg,
      #ecf1f7 0%,
      #ecf1f7 calc(var(--split) * 100%),
      #23272d calc(var(--split) * 100%),
      #23272d 100%
    );
    transform: none;
    transition: none;
  }

  .js-scroll-animations .scroll-section {
    transform: translateY(24px);
    filter: blur(2px);
    transition-duration: 460ms;
  }

  .panel {
    min-height: 0;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 28px 20px;
  }

  .panel-copy {
    width: min(100%, 420px);
    max-width: 100%;
    height: 100%;
    display: grid;
    align-content: center;
  }

  .panel-left .panel-copy {
    transform: translateY(0);
  }

  .panel-right .panel-copy {
    transform: translateY(0);
  }

  .panel h1 {
    font-size: clamp(2rem, 9vw, 2.9rem);
    overflow-wrap: anywhere;
  }

  .panel p {
    font-size: 0.95rem;
    line-height: 1.45;
  }

  .split-face::after {
    background:
      radial-gradient(
        circle at calc((var(--hero-shift) * 25%) + 50%) 52%,
        rgba(114, 175, 255, 0.26) 0%,
        rgba(114, 175, 255, 0.12) 34%,
        rgba(114, 175, 255, 0) 70%
      ),
      linear-gradient(
        90deg,
        rgba(96, 136, 189, calc((var(--hero-shift) * -1 + 1) * 0.12)) 0%,
        rgba(96, 136, 189, 0) 50%,
        rgba(79, 111, 155, calc((var(--hero-shift) + 1) * 0.12)) 100%
      );
  }

  .split-face.is-dragging {
    transition: none;
  }

  .dynamic-text {
    background-image: linear-gradient(
      180deg,
      #2f4f78 0%,
      #2f4f78 var(--text-cut),
      #ffffff var(--text-cut),
      #ffffff 100%
    );
  }

  .split-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .section-light .split-content {
    gap: 0;
  }

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

  .bmky-hero-grid,
  .bmky-points,
  .bmky-feature-grid,
  .bmky-gallery {
    grid-template-columns: 1fr;
  }

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

  .footer-row {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 600px) {
  .hero {
    min-height: 75vh;
    padding: 12px 0 16px;
  }

  .split-face {
    min-height: clamp(380px, 75vh, 620px);
    grid-template-rows: 1fr 1fr;
  }

  .panel {
    min-height: auto;
    padding: 22px 16px;
  }

  .panel-left .panel-copy {
    transform: translateY(0);
  }

  .panel-right .panel-copy {
    transform: translateY(0);
  }

  .panel h1 {
    font-size: clamp(1.65rem, 10vw, 2.3rem);
    line-height: 1.08;
  }

  .panel p {
    margin-top: 10px;
    font-size: 0.9rem;
  }

  .section-light,
  .section-dark,
  .section-contact {
    padding: 52px 0;
  }

  .work-card img,
  .work-card iframe,
  .work-placeholder {
    height: 172px;
  }

  .work-copy {
    padding: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .split-face,
  .scroll-section,
  .logo.is-rolling .logo-badge {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    filter: none !important;
  }
}

@keyframes nav-wave {
  0% {
    transform: translate(-50%, -50%) scale(0.08);
    opacity: 0;
  }
  18% {
    opacity: 0.65;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
  }
}

@keyframes logo-roll-right {
  0% {
    transform: translateX(0) rotate(0deg);
  }
  12% {
    transform: translateX(var(--logo-roll-distance)) rotate(360deg);
  }
  84% {
    transform: translateX(var(--logo-roll-distance)) rotate(360deg);
  }
  100% {
    transform: translateX(0) rotate(720deg);
  }
}

@keyframes code-cursor-blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

@keyframes designer-reveal {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
    filter: blur(3px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

