:root {
  --bg: #ecf0f1;
  --text: #34495e;
  --primary: #2c3e50;
  --accent: #f39c12;
  --max-width: 1200px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: #ffffff;
}

main {
  width: min(100%, var(--max-width));
  margin: 0 auto;
  padding: 0 1.25rem;
}

section {
  min-height: 80vh;
  display: grid;
  align-items: center;
  padding: clamp(3rem, 8vh, 7rem) 0;
}

.content {
  max-width: 62ch;
}

h1,
h2 {
  color: var(--primary);
  margin: 0 0 0.75rem;
  line-height: 1.1;
}

h1 {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
}

.name-island {
  width: 1.35em;
  height: 1.35em;
  margin-left: 0.25em;
  vertical-align: -0.16em;
  image-rendering: pixelated;
}

.section-horse {
  width: 1.35em;
  height: 1.35em;
  margin-left: 0.26em;
  vertical-align: -0.14em;
  image-rendering: pixelated;
}

h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.25rem);
}

p {
  margin: 0;
  line-height: 1.65;
  font-size: clamp(1rem, 2vw, 1.12rem);
}

h3 {
  margin: 0;
  color: #24384c;
  font-size: clamp(1.02rem, 2vw, 1.2rem);
}

.inline-link {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

#contact .inline-link {
  color: #34495e;
  text-decoration: none;
}

ul {
  margin: 0.55rem 0 0;
  padding-left: 1.2rem;
}

li {
  margin-top: 0.35rem;
  line-height: 1.55;
}

.hero-tagline {
  white-space: nowrap;
  font-size: clamp(1.6rem, 3.2vw, 1.79rem);
  color: #34495e;
}

.worked-with {
  margin-top: 0.85rem;
  font-size: clamp(1.6rem, 3.2vw, 1.79rem);
  color: #34495e;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
}

.worked-with-text {
  white-space: normal;
  overflow-wrap: anywhere;
}

.brand-logos {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.brand-logo {
  height: 3.78rem;
  width: auto;
  display: block;
  object-fit: contain;
}

.xp-list {
  display: grid;
  gap: 0;
}

.xp-item {
  padding: 0.95rem 0;
  border-top: 1px solid #d9e1e8;
}

.xp-item:last-child {
  border-bottom: 1px solid #d9e1e8;
}

.xp-subtitle {
  margin-top: 0.7rem;
  padding-top: 0.9rem;
  border-top: 1px solid #d9e1e8;
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  line-height: 1.1;
  color: var(--primary);
}

#experience-title {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  line-height: 1.1;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 0.62rem;
  margin-top: 0.5rem;
}

.skill-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  border: 1px solid #d8e0e8;
  background: #ffffff;
  color: #2b4054;
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
  line-height: 1.2;
}

.tools-title {
  margin-top: 1.1rem;
  margin-bottom: 0.6rem;
  font-size: clamp(1.6rem, 3.2vw, 2.25rem);
  line-height: 1.1;
  color: var(--primary);
}

.retro-ground {
  width: 100%;
  margin-top: 0.8rem;
}

.retro-grass {
  height: 14px;
  background:
    repeating-linear-gradient(
      90deg,
      #3f9b48 0 8px,
      #2f8538 8px 16px,
      #58b35f 16px 24px
    );
  border-top: 2px solid #5ec567;
  border-bottom: 2px solid #2a6f31;
}

.retro-soil {
  height: 42px;
  background:
    repeating-linear-gradient(
      90deg,
      #a46934 0 10px,
      #91582a 10px 20px,
      #7f4c23 20px 30px
    );
  border-top: 2px solid #6f431f;
}

.retro-character {
  position: fixed;
  left: 0.75rem;
  bottom: 0.65rem;
  width: 44px;
  height: 44px;
  z-index: 25;
  pointer-events: none;
  user-select: none;
}

.retro-character img {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
}

#airplane {
  position: fixed;
  left: 50%;
  top: 10vh;
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  font-size: 1.7rem;
  transform: translate3d(0, 0, 0) rotate(0deg);
  transform-origin: center;
  will-change: transform;
  z-index: 20;
  user-select: none;
  pointer-events: none;
  filter: drop-shadow(0 3px 4px rgba(44, 62, 80, 0.3));
}

#airplane img {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
}

.back-to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  display: inline-block;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  font-size: 0.9rem;
  z-index: 30;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.back-to-top.show {
  opacity: 1;
  transform: translateY(0);
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1024px) {
  main {
    padding-inline: 1rem;
  }

  section {
    min-height: 72vh;
  }
}

@media (max-width: 768px) {
  .hero-tagline {
    white-space: normal;
    font-size: clamp(1.05rem, 4.4vw, 1.25rem);
    line-height: 1.5;
  }

  .worked-with {
    gap: 0.45rem;
    font-size: clamp(1rem, 4vw, 1.22rem);
  }

  .worked-with-text {
    white-space: normal;
  }

  .brand-logos {
    flex-wrap: wrap;
    gap: 0.4rem 0.5rem;
  }

  .brand-logo {
    height: 2.1rem;
  }

  #airplane {
    width: 1.85rem;
    height: 1.85rem;
  }

  .back-to-top {
    right: 0.75rem;
    bottom: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .reveal.visible,
  .back-to-top,
  .back-to-top.show {
    transition: none;
    transform: none;
  }

  #airplane {
    animation: none;
    left: auto;
    right: 0.8rem;
    top: 0.8rem;
    transform: none;
    will-change: auto;
  }
}
