/* ==========================================================================
   Locpear — base
   ========================================================================== */

@font-face {
  font-family: 'Noto Sans';
  font-style: normal;
  font-weight: 100 900;
  font-display: block;
  src: url('fonts/NotoSans-VF.woff2') format('woff2-variations'),
       url('fonts/NotoSans-VF.woff2') format('woff2');
}

@font-face {
  font-family: 'Noto Sans';
  font-style: italic;
  font-weight: 100 900;
  font-display: block;
  src: url('fonts/NotoSans-Italic-VF.woff2') format('woff2-variations'),
       url('fonts/NotoSans-Italic-VF.woff2') format('woff2');
}

:root {
  --font-main: 'Noto Sans', Arial, sans-serif;
  --color-text: #000000;
  --color-bg: #ffffff;
  --color-bg-elevated: #ffffff;
  --color-accent: #ff8562;
  --color-accent-dark: #ff855d;
  --color-muted: #666666;
  --color-border: #eeeeee;
  --color-invert: #000000;
  --color-invert-text: #ffffff;
  --color-card-shadow: rgba(0, 0, 0, 0.04);
  --container-width: 1200px;
}

[data-theme="dark"] {
  --color-text: #f2f2f2;
  --color-bg: #121212;
  --color-bg-elevated: #1c1c1c;
  --color-accent: #ff9c7d;
  --color-accent-dark: #ff9c7d;
  --color-muted: #a8a8a8;
  --color-border: #333333;
  --color-invert: #f2f2f2;
  --color-invert-text: #121212;
  --color-card-shadow: rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-main);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  transition: background-color 0.25s ease, color 0.25s ease;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

strong, b {
  font-weight: 700;
}

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

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.container--narrow {
  max-width: 760px;
}

.container--testimonials {
  max-width: 980px;
}

section {
  padding: 60px 0;
}

/* ==========================================================================
   Header / nav
   ========================================================================== */

.site-header {
  width: 100%;
  padding: 40px 20px 0;
}

.site-header__inner {
  max-width: var(--container-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-header__logo {
  display: none;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 60px;
}

.site-nav a {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 0;
  transition: color 0.2s ease-in-out;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--color-accent-dark);
  text-decoration: none;
}

.site-nav--mobile {
  display: none;
  flex-direction: column;
  align-items: center;
  width: 100%;
  background: var(--color-bg);
  padding: 10px 0 0;
}

.site-nav--mobile a {
  padding: 12px 0;
  width: auto;
  text-align: center;
  border-bottom: 1px solid var(--color-border);
}

.site-header.is-open .site-nav--mobile {
  display: flex;
}

.menu-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 20px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.menu-burger span {
  display: block;
  height: 2px;
  width: 100%;
  background-color: var(--color-text);
  transition: transform 0.25s ease-in-out, opacity 0.25s ease-in-out, background-color 0.25s ease;
}

.site-header.is-open .menu-burger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.site-header.is-open .menu-burger span:nth-child(2) {
  opacity: 0;
}
.site-header.is-open .menu-burger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding-top: 90px;
  padding-bottom: 30px;
  text-align: center;
}

.hero__title {
  font-size: 34px;
  line-height: 1.35;
  font-weight: 800;
  margin: 0 0 20px;
}

.hero__descr {
  font-size: 20px;
  line-height: 1.55;
  letter-spacing: 0.3px;
  margin: 0;
}

.hero__easter-egg {
  color: var(--color-bg);
  font-size: 14px;
  line-height: 14px;
  transition: color 0.25s ease;
}

/* ==========================================================================
   CV download button
   ========================================================================== */

.cv-download {
  padding-top: 20px;
  padding-bottom: 0;
  text-align: center;
}

.cv-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  border: 2px solid var(--color-invert);
  border-radius: 8px;
  font-weight: 600;
  font-size: 18px;
  color: var(--color-text);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.cv-btn:hover,
.cv-btn:focus-visible {
  background-color: var(--color-invert);
  color: var(--color-invert-text);
  text-decoration: none;
}

.cv-btn__icon {
  font-size: 22px;
}

/* ==========================================================================
   Portfolio / ticker
   ========================================================================== */

.portfolio {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 5vh;
  padding-bottom: 170px;
}

.portfolio-promo-block {
  text-align: center;
  width: 100%;
  padding: 20px 10px 50px;
  flex: 0 0 auto;
}

.promo-line-1 {
  font-weight: bold;
  line-height: 1.2;
  margin-bottom: 12px;
  font-size: 32px;
}

.promo-line-2 {
  font-weight: normal;
  line-height: 1.4;
  color: var(--color-muted);
  font-size: 16px;
}

@media screen and (min-width: 641px) {
  .promo-line-1 { font-size: 48px; }
  .promo-line-2 { font-size: 24px; }
}

.portfolio-content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 0;
}

.ticker-wrap {
  overflow: hidden;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  position: relative;
  touch-action: pan-y;
  flex: 0 0 auto;
  margin-top: 6vh;
}
.ticker-wrap.is-dragging { cursor: grabbing; }

.ticker-track {
  display: flex;
  gap: 16px;
  will-change: transform;
}

.game-card {
  flex-shrink: 0;
  width: 330px;
  height: 330px;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
  display: block;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.game-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 0.35s ease;
  pointer-events: none;
}

.game-card .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: background 0.35s ease;
  border-radius: 12px;
}

.game-card .overlay-content {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease 0.05s, transform 0.3s ease 0.05s;
  position: absolute;
  inset: 0;
}

.game-card .title-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
}

.game-card .meta-wrap {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  text-align: center;
}

.game-card .game-title {
  font-family: 'Noto Sans', sans-serif;
  font-size: 38px;
  font-weight: 270;
  color: #fff;
  letter-spacing: 0.01em;
  margin: 0;
  line-height: 1;
  text-align: center;
}

.game-card .game-meta {
  font-family: 'Noto Sans', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: rgba(255,255,255,0.85);
  margin: 0;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.5;
}

@media (hover: hover) {
  .game-card:hover img { filter: blur(3px) brightness(0.7); }
  .game-card:hover .overlay { background: rgba(0,0,0,0.32); }
  .game-card:hover .overlay-content { opacity: 1; transform: translateY(0); }
}

.game-card.tapped img { filter: blur(3px) brightness(0.7); }
.game-card.tapped .overlay { background: rgba(0,0,0,0.32); }
.game-card.tapped .overlay-content { opacity: 1; transform: translateY(0); }

@media (max-width: 768px) {
  .portfolio {
    min-height: 0;
    padding-top: 40px;
    padding-bottom: 100px;
  }
  .portfolio-promo-block {
    padding-bottom: 8vh;
  }
  .ticker-wrap {
    margin-top: 0;
  }
  .game-card { width: 270px; height: 270px; cursor: default; }
  .game-card .game-title { font-size: 25px; }
  .game-card .meta-wrap { bottom: 14px; }
}

@media (max-width: 768px) and (max-height: 550px) {
  .portfolio {
    padding-top: 20px;
    padding-bottom: 90px;
  }
  .portfolio-promo-block {
    padding-bottom: 4vh;
  }
  .promo-line-1 { font-size: 26px; }
  .promo-line-2 { font-size: 14px; }
  .game-card { width: 150px; height: 150px; }
  .game-card .game-title { font-size: 16px; }
}

@media (max-width: 768px) and (max-height: 400px) {
  .portfolio {
    padding-top: 12px;
    padding-bottom: 90px;
  }
  .portfolio-promo-block {
    padding-bottom: 10px;
  }
  .promo-line-1 { font-size: 20px; margin-bottom: 4px; }
  .promo-line-2 { font-size: 12px; }
  .game-card { width: 100px; height: 100px; }
  .game-card .game-title { font-size: 12px; }
  .game-card .game-meta { font-size: 9px; }
}

/* ==========================================================================
   Testimonials
   ========================================================================== */

.testimonials {
  padding-top: 75px;
  padding-bottom: 45px;
}

.carousel {
  position: relative;
  padding: 0 56px;
}

.carousel__viewport {
  overflow: hidden;
  transition: height 0.35s ease;
}

.carousel__track {
  display: flex;
  align-items: flex-start;
  transition: transform 0.5s cubic-bezier(0.65, 0, 0.35, 1);
  will-change: transform;
}

.carousel__track .t-card {
  flex: 0 0 100%;
  width: 100%;
}

.carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background-color: var(--color-bg-elevated);
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  z-index: 2;
}

.carousel__arrow:hover,
.carousel__arrow:focus-visible {
  background-color: var(--color-invert);
  border-color: var(--color-invert);
  color: var(--color-invert-text);
}

.carousel__arrow--prev { left: 0; }
.carousel__arrow--next { right: 0; }

.carousel__dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

.carousel__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background-color: var(--color-border);
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.carousel__dot:hover {
  background-color: var(--color-muted);
}

.carousel__dot.is-active {
  background-color: var(--color-accent-dark);
  transform: scale(1.2);
}

@media (max-width: 640px) {
  .container--testimonials {
    padding: 0;
  }
  .carousel {
    padding: 0;
  }
  .carousel__arrow {
    width: 38px;
    height: 38px;
    top: auto;
    bottom: 16px;
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  }
  .carousel__arrow--prev { left: 12px; }
  .carousel__arrow--next { right: 12px; }
  .t-card {
    padding: 28px 24px;
    border-radius: 0;
  }
  .t-card__text {
    font-size: 17px;
  }
  .t-card__avatar {
    width: 48px;
    height: 48px;
  }
}

.t-card {
  background-color: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 44px 48px;
  box-shadow: 0 2px 12px var(--color-card-shadow);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.t-card__author {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.t-card__avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.t-card__name {
  font-weight: 700;
  font-size: 18px;
}

.t-card__role {
  font-size: 14.5px;
  color: var(--color-muted);
  line-height: 1.4;
}

.t-card__text {
  font-size: 20px;
  line-height: 1.6;
  margin: 0;
}

/* ==========================================================================
   Contact
   ========================================================================== */

.contact {
  padding-top: 60px;
  padding-bottom: 100px;
  text-align: center;
}

.contact__title {
  font-size: 28px;
  margin: 0 0 12px;
}

.contact__subtitle {
  font-size: 18px;
  color: var(--color-muted);
  margin: 0 0 30px;
}

.contact-mailto-btn {
  display: inline-block;
  padding: 18px 36px;
  border-radius: 8px;
  background-color: var(--color-invert);
  color: var(--color-invert-text);
  font-size: 18px;
  font-weight: 600;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.contact-mailto-btn:hover,
.contact-mailto-btn:focus-visible {
  background-color: var(--color-accent-dark);
  text-decoration: none;
}

/* ==========================================================================
   Back to top
   ========================================================================== */

.back-to-top {
  position: fixed;
  left: 20px;
  bottom: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background-color: #4a4a4a;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, background-color 0.2s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  z-index: 500;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  background-color: var(--color-accent-dark);
}

/* ==========================================================================
   Theme toggle
   ========================================================================== */

.theme-toggle {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background-color: #4a4a4a;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, color 0.2s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  z-index: 500;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  background-color: var(--color-accent-dark);
  color: #ffffff;
}

.theme-toggle__icon {
  position: absolute;
  transition: opacity 0.2s ease, transform 0.3s ease;
}

.theme-toggle__icon--moon {
  opacity: 0;
  transform: rotate(-40deg) scale(0.6);
}

[data-theme="dark"] .theme-toggle__icon--sun {
  opacity: 0;
  transform: rotate(40deg) scale(0.6);
}

[data-theme="dark"] .theme-toggle__icon--moon {
  opacity: 1;
  transform: rotate(0) scale(1);
}

/* ==========================================================================
   Responsive: nav breakpoint
   ========================================================================== */

@media (max-width: 780px) {
  .site-header {
    padding: 20px 20px 0;
  }
  .site-header__inner {
    justify-content: flex-end;
  }
  .site-nav:not(.site-nav--mobile) {
    display: none;
  }
  .menu-burger {
    display: flex;
  }
  .hero {
    min-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 0;
    padding-bottom: 40px;
  }
  .hero__title {
    font-size: 26px;
  }
  .hero__descr {
    font-size: 17px;
  }
}
