/* ─────────────────────────────────────────
   FONTS
───────────────────────────────────────── */
@font-face {
  font-family: 'KreKeTanBubble';
  src: url('../assets/fonts/KreKeTanBubble.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'KreKeTanBubbleLarge';
  src: url('../assets/fonts/KreKeTanBubbleLarge.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ─────────────────────────────────────────
   TOKENS
───────────────────────────────────────── */
:root {
  --paper:           #FAF9F5;
  --ink:             #1A1A1A;
  --muted:           #6B6B6B;
  --border:          #D8D8D2;
  --surface:         #FFFFFF;
  --coral:           #D85A30;
  --line:            #E4E2DB;
  --dark-bg:         #16161A;
  --dark-card:       #202027;
  --dark-card-bd:    #2E2E36;
  --dark-muted:      #A8A59C;
  --dark-light:      #F4F1EA;
  --coral-light:     #F0997B;

  --font-body:       'Inter', sans-serif;
  --font-display:    'KreKeTanBubbleLarge', sans-serif;
  --font-badge:      'KreKeTanBubble', sans-serif;

  --container-width: 1080px;
  --header-h:        68px;
}

/* ─────────────────────────────────────────
   RESET & BASE
───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
strong { font-weight: 700; }

/* ─────────────────────────────────────────
   LAYOUT
───────────────────────────────────────── */
.container {
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: 32px;
}

/* ─────────────────────────────────────────
   TYPOGRAPHY PRIMITIVES
───────────────────────────────────────── */

/* Coral uppercase label — used as section anchors */
.label {
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 12px;
}

/* Section subheading */
.subheading {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 38px;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 24px;
}

.body-muted {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
}

.body-muted-sm {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.coral { color: var(--coral); }
.coral-light { color: var(--coral-light); }

/* ─────────────────────────────────────────
   BUTTONS
───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  border-radius: 6px;
  padding: 15px 30px;
  cursor: pointer;
  transition: opacity 0.15s ease;
  white-space: nowrap;
}

.btn:hover { opacity: 0.85; }

.btn-dark {
  background: var(--ink);
  color: #FFFFFF;
  border: 1px solid var(--ink);
}

.btn-outlined {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}

.btn-outlined-dark {
  background: transparent;
  color: var(--dark-light);
  border: 1px solid rgba(244, 241, 234, 0.3);
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
}

/* ─────────────────────────────────────────
   DIVIDER
───────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

/* ─────────────────────────────────────────
   CARD PLACEHOLDER
───────────────────────────────────────── */
.card-placeholder {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  width: 100%;
  height: 100%;
}

.card-sm {
  height: 280px;
  border-radius: 18px;
}

/* ─────────────────────────────────────────
   TAG PILLS
───────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  line-height: 29px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 39px;
  padding: 0 12px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ─────────────────────────────────────────
   HEADER
───────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  overflow: visible;
}

.header-inner {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 0;
}

.logo {
  font-family: var(--font-body);
  font-weight: 900;
  font-size: 16px;
  color: var(--ink);
  flex-shrink: 0;
}

.logo span { color: var(--coral); opacity: 1; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-left: auto;
  margin-right: auto;
}

.main-nav a {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  transition: opacity 0.15s ease;
}

.main-nav a:hover,
.main-nav a.active { opacity: 0.7; }

.header-inner .btn-dark {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 6px;
}

/* Peeplet character */
.hero-image-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
}

.hero-right {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--border);
}

.peeplet-group {
  position: absolute;
  right: 0;
  bottom: 100%;
  width: 68px;
  height: 68px;
  pointer-events: none;
  z-index: 10;
}

.peeplet-mobile {
  display: none;
  bottom: 0;
  right: max(20px, calc((100% - var(--container-width)) / 2 + 20px));
  transform: translateY(50%);
  height: 48px;
}

.peeplet-state {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  display: none;
}

/* ─────────────────────────────────────────
   HERO / ABOUT
───────────────────────────────────────── */
.section-hero {
  position: relative;
  padding: 84px 0;
  border-bottom: 1px solid var(--line);
}

.hero-top {
  display: grid;
  grid-template-columns: 1.42fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.hero-left {
  display: flex;
  flex-direction: column;
}

.hero-headline {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 81px;
  line-height: 82px;
  color: var(--ink);
  margin-bottom: 8px;
}

.hero-short-bio {
  margin-bottom: 24px;
  max-width: 580px;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  align-items: center;
}

.hero-right {
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--border);
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 40% 46%;
  transform: scale(1.52);
  transform-origin: 40% 46%;
  display: block;
}

/* About detail */
.hero-about {
  padding-top: 40px;
}

.hero-about-header {
  margin-bottom: 24px;
}

.hero-about-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* ─────────────────────────────────────────
   EXPERIENCE
───────────────────────────────────────── */
.section-experience {
  padding: 84px 0;
  border-bottom: 1px solid var(--line);
}

.exp-list {
  margin-top: 0;
}

.exp-entry {
  display: grid;
  grid-template-columns: 276px 1fr;
  gap: 0;
  padding: 24px 0;
}

.exp-entry:first-child { padding-top: 0; }

.section-experience .divider { margin: 0; }

.exp-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 40px;
}

.exp-dates {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  line-height: 16px;
  color: var(--muted);
}

.exp-company {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  line-height: 29px;
  text-transform: uppercase;
  color: var(--coral);
  letter-spacing: 0.02em;
}

.exp-body { padding-left: 0; }

.exp-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 18px;
  color: var(--ink);
  margin-bottom: 20px;
}

.exp-bullets {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.exp-bullets li {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 18px;
  line-height: 29px;
  color: var(--muted);
  padding-left: 20px;
  position: relative;
}

.exp-bullets li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--muted);
}

/* ─────────────────────────────────────────
   GAME STUDIO (dark section)
───────────────────────────────────────── */
.section-game-studio {
  background: var(--dark-bg);
  padding: 84px 0;
}

.studio-header {
  margin-bottom: 32px;
}

.studio-label {
  display: block;
  font-family: var(--font-badge);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 12px;
}

.studio-heading {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 40px;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: var(--dark-light);
  margin-bottom: 24px;
}

.body-muted-dark {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 18px;
  line-height: 29px;
  color: var(--dark-muted);
  max-width: 675px;
}

/* Game cards — horizontal scroll showing 3 at a time on desktop */
.game-cards {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  flex-wrap: nowrap;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.game-cards::-webkit-scrollbar { display: none; }

.game-card {
  flex: 0 0 344px;
  min-width: 344px;
  background: var(--dark-card);
  border: 1px solid var(--dark-card-bd);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Phone device area */
.game-card-top {
  position: relative;
  height: 601px;
  background: #26262E;
  flex-shrink: 0;
  overflow: hidden;
}

.game-device {
  position: absolute;
  left: 31px;
  top: 31px;
  width: 282px;
  height: 570px;
  z-index: 1;
}

.game-phone-shell {
  display: block;
  width: 282px;
  height: 570px;
}

.game-screenshot {
  position: absolute;
  left: 38px;
  top: 77px;
  width: 268px;
  height: 478px;
  object-fit: cover;
  border-radius: 4px;
  z-index: 2;
}

.game-card-info {
  padding: 16px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.game-platform {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  line-height: 29px;
  color: var(--coral-light);
  background: #26262E;
  border-radius: 39px;
  padding: 0 12px;
  align-self: flex-start;
}

.game-title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 18px;
  color: var(--surface);
}

.game-tagline {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 13px;
  color: var(--dark-light);
}

/* ─────────────────────────────────────────
   OTHER WORK
───────────────────────────────────────── */
.section-other-work {
  padding: 84px 0;
  border-bottom: 1px solid var(--line);
}

/* Cubloids */
.cubloids-layout {
  display: grid;
  grid-template-columns: 1.42fr 1fr;
  gap: 24px;
  align-items: start;
  margin-bottom: 84px;
}

.section-other-work .divider {
  margin: 84px 0;
}

.cubloids-left {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.eyebrow-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.studio-label-light {
  display: block;
  font-family: var(--font-badge);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--coral);
}

.cubloids-heading {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 40px;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: var(--ink);
}

.cubloids-img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--border);
  display: block;
}

/* Freelance */
.freelance-header {
  margin-bottom: 24px;
}

.freelance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.freelance-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cubloids-left .btn,
.freelance-card .btn {
  align-self: flex-start;
}

.freelance-title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
}

.freelance-img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--border);
  display: block;
}

/* ─────────────────────────────────────────
   SKILLS & TOOLS
───────────────────────────────────────── */
.section-skills {
  padding: 84px 0;
  border-bottom: 1px solid var(--line);
}

.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.skills-category {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
  margin-bottom: 24px;
}

/* ─────────────────────────────────────────
   INTERESTS
───────────────────────────────────────── */
.section-interests {
  padding: 84px 0;
  border-bottom: 1px solid var(--line);
}

.interests-intro {
  margin-bottom: 48px;
  max-width: 580px;
}

.interests-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px 24px;
}

.interest-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.interest-title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
}

/* ─────────────────────────────────────────
   CONTACT & FOOTER
───────────────────────────────────────── */
.section-contact {
  background: var(--dark-bg);
}

.contact-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 84px 0;
  gap: 0;
}

.label-coral-sm {
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 12px;
}

.contact-heading {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 30px;
  color: var(--dark-light);
  margin-bottom: 32px;
}

.contact-sub {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 18px;
  line-height: 24px;
  color: var(--dark-muted);
  margin-bottom: 16px;
}

.contact-email {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 18px;
  color: var(--coral-light);
  transition: opacity 0.15s ease;
  margin-bottom: 12px;
}

.contact-email:hover { opacity: 0.8; }

.contact-location {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 13px;
  color: var(--dark-muted);
  margin-bottom: 40px;
}

.contact-socials {
  display: flex;
  gap: 16px;
  align-items: center;
}

.footer-bar {
  position: relative;
  height: 80px;
  background: var(--dark-bg);
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-bar p {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 13px;
  color: var(--dark-muted);
}

/* Krekker frog */
.krekker-group {
  position: absolute;
  left: 24px;
  bottom: 100%;
  width: 80px;
  height: 80px;
}

.krekker-state {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
}

/* ─────────────────────────────────────────
   BELOW MAX-WIDTH — 1080px
───────────────────────────────────────── */
@media (max-width: 1080px) {
  .container { padding-inline: 32px; }
}

/* ─────────────────────────────────────────
   TABLET BREAKPOINT  — 768px
───────────────────────────────────────── */
@media (max-width: 768px) {

  /* Container: full width + 32px padding */
  .container {
    padding-inline: 32px;
  }

  /* Body text */
  body { font-size: 16px; }

  /* ── Section padding (all sections) ── */
  .section-hero { padding: 48px 0; }
  .section-experience { padding: 48px 0; }
  .section-game-studio { padding: 48px 0; }
  .section-other-work { padding: 48px 0; }
  .section-skills { padding: 48px 0; }
  .section-interests { padding: 48px 0; }
  .contact-inner { padding: 48px 0; }

  /* ── Header ── */
  .main-nav { display: none; }
  .header-inner .btn-dark { margin-left: auto; }

  /* ── Peeplet: shrink to tablet size ── */
  .peeplet-group { height: 48px; }

  /* ── Hero ── */
  .hero-headline {
    font-size: 44px;
    line-height: 47px;
    margin-bottom: 16px;
  }

  .hero-top {
    grid-template-columns: 1fr 251px;
    gap: 20px;
    margin-bottom: 48px;
  }

  .hero-img {
    height: 100%;
  }

  .hero-short-bio { max-width: none; }

  .hero-about { padding-top: 0; }

  /* ── About ── */
  .subheading {
    font-size: 26px;
    margin-bottom: 16px;
  }

  .hero-about-header { margin-bottom: 16px; }
  .hero-about-cols { gap: 20px; }

  /* ── Experience ── */
  .exp-entry {
    grid-template-columns: 181px 1fr;
    padding: 32px 0;
  }

  .exp-title { font-size: 16px; }

  .exp-bullets li {
    font-size: 14px;
    line-height: 20px;
  }

  /* ── Game Studio ── */
  .studio-header { margin-bottom: 32px; }

  /* ── Cubloids ── */
  .cubloids-layout {
    grid-template-columns: 1fr 251px;
    gap: 20px;
    margin-bottom: 48px;
  }

  .section-other-work .divider { margin: 48px 0; }

  .cubloids-img {
    aspect-ratio: 1;
  }

  /* ── Freelance ── */
  .freelance-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .freelance-img,
  .freelance-card .card-sm {
    height: 373px;
  }

  /* ── Skills ── */
  .skills-grid { gap: 32px; }

  /* ── Interests ── */
  .interests-grid {
    gap: 24px 20px;
  }

}

/* ─────────────────────────────────────────
   NEAR-PHONE BREAKPOINT — 680px
───────────────────────────────────────── */
@media (max-width: 680px) {
  .hero-top {
    grid-template-columns: 1fr;
    margin-bottom: 32px;
  }

  .hero-img { height: 400px; }

  .cubloids-layout {
    grid-template-columns: 1fr;
    margin-bottom: 32px;
  }
}

/* ─────────────────────────────────────────
   MOBILE BREAKPOINT  — 430px
───────────────────────────────────────── */
@media (max-width: 430px) {

  /* Container: 20px side padding */
  .container { padding-inline: 20px; }

  /* Body text */
  body { font-size: 14px; }
  .body-muted { font-size: 14px; line-height: 24px; }
  .body-muted-dark { font-size: 14px; line-height: 24px; }

  /* Labels & subheadings */
  .label { font-size: 10px; }
  .subheading { font-size: 26px; margin-bottom: 16px; }

  /* ── Section padding ── */
  .section-hero        { padding: 32px 0; }
  .section-experience  { padding: 32px 0; }
  .section-game-studio { padding: 32px 0; }
  .section-other-work  { padding: 32px 0; }
  .section-skills      { padding: 32px 0; }
  .section-interests   { padding: 32px 0; }
  .contact-inner       { padding: 32px 0; }

  /* ── Header ── */
  .main-nav { display: none; }
  .header-inner .btn-dark { margin-left: auto; padding: 8px 16px; }

  /* ── Peeplet: swap to bottom-of-section position ── */
  .peeplet-desktop { display: none; }
  .peeplet-mobile  { display: block; }

  /* ── Hero ── */
  .hero-headline {
    font-size: 46px;
    line-height: 46px;
    margin-bottom: 16px;
  }

  /* Single column: image stacks below the text */
  .hero-top {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 32px;
  }

  .hero-img { height: 446px; }
  .hero-short-bio { max-width: none; margin-bottom: 20px; }

  /* Stretch both CTA buttons to equal widths */
  .hero-ctas .btn { flex: 1; }

  /* ── About ── */
  .hero-about { padding-top: 0; }
  .hero-about-header { margin-bottom: 16px; }
  .hero-about-cols { grid-template-columns: 1fr; gap: 16px; }

  /* ── Experience ── */
  .exp-entry {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 32px 0;
  }

  .exp-meta { flex-direction: column; gap: 4px; padding-right: 0; }
  .exp-title { font-size: 16px; margin-bottom: 12px; }
  .exp-bullets li { font-size: 14px; line-height: 24px; }

  /* Collapse extra divider margin so spacing = exp-entry padding only */
  .section-experience .divider { margin: 0; }

  /* ── Game Studio ── */
  .studio-label { font-size: 12px; }
  .studio-heading { font-size: 26px; }
  .studio-header { margin-bottom: 24px; }

  /* Narrower cards (288px vs 344px on desktop) */
  .game-cards { gap: 16px; }
  .game-card { flex: 0 0 288px; min-width: 288px; }
  .game-card-top { height: 509px; }

  .game-device { left: 24px; top: 24px; width: 240px; height: 485px; }
  .game-phone-shell { width: 240px; height: 485px; }
  .game-screenshot { left: 30px; top: 63px; width: 228px; height: 407px; }

  /* ── Cubloids ── */
  .cubloids-layout {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 32px;
  }

  .studio-label-light { font-size: 12px; }
  .cubloids-heading { font-size: 26px; }
  .cubloids-img { height: 350px; }
  .section-other-work .divider { margin: 32px 0; }

  /* ── Freelance ── */
  .freelance-img,
  .freelance-card .card-sm { height: 185px; }

  /* ── Skills ── */
  .skills-grid { grid-template-columns: 1fr; gap: 24px; }

  /* ── Interests ── */
  .interests-intro { max-width: none; margin-bottom: 24px; }
  .interests-grid { grid-template-columns: 1fr; gap: 24px; }
  .interest-card .card-sm { height: 287px; }

  /* ── Contact ── */
  .contact-socials { flex-wrap: wrap; justify-content: center; }

  /* ── Footer ── */
  .footer-bar { height: 60px; }
}
