:root {
  --background: #fff8eb;
  --foreground: #1b1b1b;
  --card: #fff2c7;
  --primary: #ffc81e;
  --muted-foreground: #575757;
  --accent: #3ea76d;
  --nav-height: 72px;
  --footer-height: 72px;
}

html.dark {
  --background: #080b14;
  --foreground: #f5f7ff;
  --card: #10182b;
  --primary: #ffc81e;
  --muted-foreground: #8f9ab8;
  --accent: #3e8f67;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: "Patrick Hand", "Segoe UI", Helvetica, Arial, sans-serif;
}

h1, h2, h3 {
  margin: 0;
  font-family: "Patrick Hand", "Segoe UI", Helvetica, Arial, sans-serif;
  letter-spacing: 0.02em;
  line-height: 1.26;
}

.markdown-like {
  line-height: 1.74;
  font-size: 18px;
  flex: 1;
  display: flex;
  width: 100%;
}

.markdown-like p,
.markdown-like li {
  line-height: 1.7;
}

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

.section {
  padding: calc(var(--nav-height) + 20px) 0 28px;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  transition: 0.25s ease;
}

.navbar.scrolled {
  background: color-mix(in srgb, var(--background) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--foreground);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: var(--nav-height);
  padding: 10px 0;
}

.brand {
  text-decoration: none;
  color: var(--primary);
  font-family: "Patrick Hand", "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-desktop a,
.nav-mobile a {
  text-decoration: none;
  color: var(--foreground);
  font-family: "Google Sans", "Product Sans", "Segoe UI", sans-serif;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 12px;
}

.nav-desktop a.is-active,
.nav-mobile a.is-active {
  background: var(--primary);
  color: #111;
}

.nav-desktop a.is-active {
  border: 2px solid var(--foreground);
  box-shadow: 2px 2px 0 var(--foreground);
  transform: rotate(-1.4deg);
}

.nav-mobile a.is-active {
  border: 2px solid var(--foreground);
  box-shadow: 2px 2px 0 var(--foreground);
  transform: rotate(-1.2deg);
  transform-origin: left center;
}

.nav-desktop a:hover,
.nav-mobile a:hover {
  background: var(--primary);
  color: #111;
}

.nav-mobile-actions {
  display: none;
  gap: 8px;
}

.nav-mobile {
  border-top: 3px solid var(--foreground);
  border-bottom: 3px solid var(--foreground);
  background: var(--background);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 4%;
}

.nav-mobile[hidden] {
  display: none !important;
}

.hero-section {
  min-height: calc(100vh - var(--nav-height) - var(--footer-height));
  padding-top: calc(var(--nav-height) + 16px);
  padding-bottom: 24px;
  display: grid;
  align-items: center;
}

.hero-inner {
  display: block;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  align-items: center;
  gap: 44px;
}

.hero-left {
  text-align: left;
}

.hero-right {
  display: flex;
  justify-content: flex-end;
}

.photo-wrap {
  position: relative;
}

.profile-photo {
  width: 320px;
  height: 320px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--foreground);
  box-shadow: 10px 10px 0 var(--foreground);
}

.float-emoji {
  position: absolute;
  font-size: 2rem;
  animation: float 2.5s ease-in-out infinite;
}

.float-top {
  top: -10px;
  right: -12px;
}

.float-bottom {
  bottom: -8px;
  left: -14px;
  animation-delay: 0.4s;
}

.hero-name {
  font-size: clamp(2.2rem, 7vw, 4.8rem);
}

.hero-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-weight: 700;
}

.hero-exp-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  border: 2px solid var(--foreground);
  background: #ffffff;
  color: #111111;
  box-shadow: 2px 2px 0 var(--foreground);
  font-family: "Google Sans", "Product Sans", "Segoe UI", sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

html.dark .hero-exp-badge {
  background: #f5f7ff;
  color: #0f1424;
}

.hero-tagline {
  margin: 12px 0 0;
  max-width: 620px;
  color: var(--muted-foreground);
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.hero-bio {
  margin: 14px 0 0;
  color: var(--muted-foreground);
  line-height: 1.6;
  max-width: 620px;
}

.skills-list,
.social-links,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  column-gap: 6px;
  row-gap: 28px;
  align-items: flex-start;
}

.hero-actions > *,
.social-links > * {
  margin: 2px;
}

.hero-actions {
  margin-top: 34px;
}

.social-links {
  margin-top: 34px;
}

#quickLinks {
  margin-top: 36px;
}

.section-head {
  text-align: center;
  margin-bottom: 36px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.doodle-underline {
  position: relative;
  display: inline-block;
}

.doodle-underline::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 8px;
  bottom: -8px;
  background: var(--primary);
  border-radius: 999px;
  transform: skewX(-14deg);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  max-width: 900px;
  margin: 0 auto;
}

.stack-list {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  gap: 20px;
}

.skills-grid {
  max-width: 920px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.core-skills-grid {
  max-width: 920px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.core-skill-card {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: start;
}

.core-skill-icon {
  width: 56px;
  height: 56px;
  border: 3px solid var(--foreground);
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-family: "Google Sans", "Product Sans", "Segoe UI", sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  background: var(--primary);
  color: #111;
}

.core-skill-title {
  margin: 0;
  font-size: 1.1rem;
}

.core-skill-desc {
  margin: 6px 0 0;
  color: var(--muted-foreground);
  font-size: 0.95rem;
  line-height: 1.5;
}

.skills-description {
  max-width: 920px;
  margin: 0 auto 18px;
  color: var(--muted-foreground);
}

.skills-subtitle {
  max-width: 920px;
  margin: 18px auto 12px;
  font-size: 1.35rem;
}

.education-head {
  margin-top: 70px;
}

.toon-card,
.toon-card-primary {
  border: 3px solid var(--foreground);
  border-radius: 18px;
  box-shadow: 5px 5px 0 var(--foreground);
  padding: 18px;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.45s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.28s ease;
  --tilt: -1.6deg;
  --card-y: 0px;
  transform: translate3d(0, var(--card-y), 0) rotate(var(--tilt));
  will-change: transform;
}

.toon-card {
  background: var(--card);
}

.toon-card:nth-child(even),
.toon-card-primary:nth-child(even) {
  --tilt: 1.6deg;
}

.projects-grid > .toon-card:nth-child(odd),
.skills-grid > .toon-card:nth-child(odd),
.stack-list > .toon-card:nth-child(odd) {
  --card-y: -4px;
}

.projects-grid > .toon-card:nth-child(even),
.skills-grid > .toon-card:nth-child(even),
.stack-list > .toon-card:nth-child(even) {
  --card-y: 6px;
}

.toon-card:hover {
  transition-delay: 0ms !important;
  transform: translate3d(-2px, calc(var(--card-y) - 3px), 0) rotate(0deg);
  box-shadow: 7px 7px 0 var(--primary);
  border-color: var(--primary);
}

.toon-card-primary:hover {
  transition-delay: 0ms !important;
  transform: translate3d(-2px, calc(var(--card-y) - 3px), 0) rotate(0deg);
}

.toon-card-primary {
  background: var(--primary);
  color: #121212;
}

.toon-btn,
.toon-btn-yellow,
.toon-btn-outline {
  border: 3px solid var(--foreground);
  border-radius: 12px;
  box-shadow: 4px 4px 0 var(--foreground);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  font-family: "Google Sans", "Product Sans", "Segoe UI", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  --btn-tilt: -1.2deg;
  transform: translate3d(0, 0, 0) rotate(var(--btn-tilt));
  transition: transform 0.42s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.36s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.24s ease, color 0.24s ease;
}

.hero-actions > :nth-child(odd),
.social-links > :nth-child(odd),
.project-links > :nth-child(odd),
.nav-mobile-actions > :nth-child(odd),
.nav-desktop > :nth-child(odd) {
  --btn-tilt: -1.4deg;
}

.hero-actions > :nth-child(even),
.social-links > :nth-child(even),
.project-links > :nth-child(even),
.nav-mobile-actions > :nth-child(even),
.nav-desktop > :nth-child(even) {
  --btn-tilt: 1.4deg;
}

.toon-btn-yellow {
  background: var(--primary);
  color: #111;
}

.toon-btn-outline {
  background: var(--background);
  color: var(--foreground);
}

.toon-btn:active,
.toon-btn-yellow:active,
.toon-btn-outline:active {
  transform: translate3d(2px, 2px, 0) rotate(0deg);
  box-shadow: 2px 2px 0 var(--foreground);
}

.toon-btn:hover,
.toon-btn-yellow:hover,
.toon-btn-outline:hover {
  transform: translate3d(-1px, -1px, 0) rotate(0deg);
}

.theme-icon-btn {
  width: 44px;
  height: 44px;
  padding: 0;
  font-size: 1.1rem;
  line-height: 1;
  text-transform: none;
}

.wa-btn svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.hero-actions .wa-btn {
  height: 48px;
  padding: 10px 16px;
  background: #25d366;
  color: #ffffff;
}

.hero-actions .wa-btn:hover,
.hero-actions .wa-btn:active {
  background: #1ebc59;
  color: #ffffff;
}

.social-instagram {
  background: #e1306c;
  color: #ffffff;
}

.social-tiktok {
  background: #000000;
  color: #ffffff;
}

.social-github {
  background: #24292f;
  color: #ffffff;
}

.social-discord {
  background: #5865f2;
  color: #ffffff;
}

.social-icon-btn {
  width: 48px;
  height: 48px;
  padding: 0;
}

.social-icon-btn svg {
  width: 20px;
  height: 20px;
}

.toon-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 2px solid var(--foreground);
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: color-mix(in srgb, var(--primary) 22%, transparent);
}

.project-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.project-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 3px solid var(--foreground);
  border-radius: 12px;
  object-fit: cover;
  margin-bottom: 12px;
  box-shadow: 3px 3px 0 var(--foreground);
}

.project-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 2px solid var(--foreground);
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  color: #121212;
}

.project-title,
.item-title {
  font-family: "Patrick Hand", "Segoe UI", Helvetica, Arial, sans-serif;
  font-weight: 700;
}

.project-desc,
.item-desc {
  color: var(--muted-foreground);
  margin: 10px 0;
}

.project-links,
.item-links,
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.item-company {
  font-family: "Patrick Hand", "Segoe UI", Helvetica, Arial, sans-serif;
  font-weight: 700;
  color: var(--primary);
}

.item-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted-foreground);
}

.contact-wrap {
  max-width: 760px;
}

.contact-banner {
  text-align: center;
  margin-bottom: 18px;
}

.contact-form {
  display: grid;
  gap: 12px;
}

input,
textarea {
  width: 100%;
  border-radius: 12px;
  border: 3px solid var(--foreground);
  box-shadow: 3px 3px 0 var(--foreground);
  background: var(--background);
  color: var(--foreground);
  padding: 11px 12px;
  font: inherit;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 3px 3px 0 var(--primary);
}

.footer {
  border-top: 3px solid var(--foreground);
  padding: 20px 0;
  text-align: center;
  color: var(--muted-foreground);
  min-height: var(--footer-height);
  margin-top: auto;
}

.reveal {
  opacity: 0;
  transition-property: opacity;
  transition-duration: 0.55s;
  transition-timing-function: ease;
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal.in-view {
  opacity: 1;
}

.route-section {
  display: none;
  opacity: 0;
  transition: opacity 0.28s ease;
  min-height: calc(100vh - var(--nav-height) - var(--footer-height));
}

.route-section.is-visible {
  display: block;
  width: 100%;
}

.route-section.is-entering {
  opacity: 1;
}

.wa-dialog {
  width: min(560px, 92vw);
  border: 3px solid var(--foreground);
  border-radius: 16px;
  padding: 0;
  background: var(--background);
  color: var(--foreground);
  box-shadow: 8px 8px 0 var(--foreground);
}

.wa-dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.wa-dialog-inner {
  padding: 16px;
  display: grid;
  gap: 12px;
}

.wa-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.toon-card.reveal,
.toon-card-primary.reveal {
  transition:
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.28s ease,
    opacity 0.55s ease;
  transition-delay: 0ms, 0ms, 0ms, var(--reveal-delay, 0ms);
}

.wobble {
  animation: wobble 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(7deg);
  }
}

@keyframes wobble {
  0%, 100% {
    transform: rotate(-2deg);
  }
  50% {
    transform: rotate(2deg);
  }
}

@media (max-width: 860px) {
  :root {
    --nav-height: 64px;
  }

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

  .hero-left {
    order: 2;
    text-align: center;
  }

  .hero-right {
    order: 1;
    justify-content: center;
  }

  .profile-photo {
    width: 230px;
    height: 230px;
    box-shadow: 7px 7px 0 var(--foreground);
  }

  .skills-list,
  .social-links,
  .hero-actions {
    justify-content: center;
  }

  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .core-skills-grid {
    grid-template-columns: 1fr;
  }

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

  .nav-desktop {
    display: none;
  }

  .nav-mobile-actions {
    display: flex;
  }

  .nav-inner {
    padding: 10px 0;
  }

  .brand {
    font-size: 1.3rem;
  }

  .nav-mobile-actions .toon-btn-outline {
    padding: 8px 10px;
    font-size: 0.72rem;
    border-width: 2px;
  }

  .nav-mobile {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    padding: 12px 16px 16px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  }

  .nav-mobile a {
    display: block;
    width: 100%;
    margin: 2px 0;
  }

  .hero-section {
    padding-top: calc(var(--nav-height) + 12px);
  }
}

@media (max-width: 560px) {
  .container {
    width: min(1100px, 94%);
  }

  .hero-actions .toon-btn-yellow,
  .hero-actions .toon-btn-outline {
    width: 100%;
  }

  .profile-photo {
    width: 190px;
    height: 190px;
    box-shadow: 6px 6px 0 var(--foreground);
  }

  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .core-skill-card {
    grid-template-columns: 46px 1fr;
    gap: 10px;
  }

  .core-skill-icon {
    width: 46px;
    height: 46px;
    font-size: 0.72rem;
    border-width: 2px;
  }

  .social-links .toon-btn-outline,
  .social-links .toon-btn-yellow {
    width: 100%;
  }

  .social-links .social-icon-btn {
    width: 48px;
    height: 48px;
    padding: 0;
    display: inline-flex;
  }

  .hero-actions,
  .social-links,
  #quickLinks {
    margin-top: 20px;
  }

}
