/* Visual system for Tiyamo: quiet game world, readable portfolio. */
:root {
  --bg: #0b1518;
  --panel: #17282a;
  --line: #38504a;
  --muted: #bdc9c0;
  --accent: #edc27c;
}

body { background: var(--bg); }
.site-header {
  position: sticky;
  top: 0;
  height: 62px;
  background: rgba(10, 20, 22, .94);
  border-bottom-color: #91a99335;
}
.site-header::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #edc27c60 48%, transparent);
  pointer-events: none;
}
.brand { font-size: 22px; letter-spacing: .095em; }
.main-nav { gap: 26px; }
.main-nav > a, .nav-dropdown summary, .language {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
}
.language { gap: 8px; }
.language-icon { display: block; width: 18px; height: 18px; flex: none; }
.resume-link { min-height: 44px; font-size: 13px; }
.dropdown-panel { top: calc(100% + 9px); border-color: #67806b75; box-shadow: 0 20px 50px #0007; }
.dropdown-panel a { font-size: 14px; }
.nav-dropdown[open] summary { color: var(--accent); }

.hero-art {
  top: 62px;
  height: 690px;
  background: #111d1c;
  isolation: isolate;
}
.hero-scene {
  position: absolute;
  inset: 0;
  background: url('/assets/sengoku-hero.webp') center 43% / cover no-repeat;
}
.hero-wallpaper, .hero-leaves {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}
.hero-wallpaper { z-index: 1; }
.hero-leaves {
  z-index: 1;
  pointer-events: none;
}
.hero-wallpaper.is-ready, .hero-leaves.is-ready { opacity: 1; }
.hero-art::after {
  z-index: 2;
  background: radial-gradient(ellipse at 50% 53%, #0b1518a6, #0b151855 42%, transparent 73%),
    linear-gradient(0deg, #0b1518 0%, #0b15181f 28%, transparent 72%);
}
.hero { height: 690px; }
.hero-content { max-width: 780px; transform: translateY(-6px); text-shadow: 0 2px 18px #061010bb; }
.hero-eyebrow { margin-bottom: 22px; font-size: 11px; }
.avatar { width: 112px; height: 112px; margin-bottom: 25px; }
.hero h1 {
  font-size: clamp(52px, 6.4vw, 84px);
  line-height: 1.02;
  letter-spacing: -.058em;
  margin-bottom: 19px;
  text-wrap: balance;
}
.hero-lead { max-width: 620px; font-size: 17px; line-height: 1.65; }
.social-links { margin-top: 20px; gap: 7px; }
.social-links a, .social-links .social-pending { width: 44px; height: 44px; }
.social-links svg { width: 31px; height: 31px; }
.hero-buttons { margin-top: 27px; gap: 14px; }
.button {
  min-height: 48px;
  padding: 13px 21px;
  font-size: 14px;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.button-ghost { border-color: #f3edce90; background: #0e221cc7; }
.button-ghost:hover { border-color: var(--accent); }
.scroll-hint { font-size: 11px; }

.content-section { padding-top: 88px; padding-bottom: 88px; }
#featured { scroll-margin-top: 62px; }
.section-head { margin-bottom: 32px; }
.eyebrow { font-size: 11px; letter-spacing: .16em; }
.section-head h2 { font-size: clamp(38px, 4.7vw, 56px); margin-top: 12px; }
.section-head p { font-size: 15px; line-height: 1.65; }
.section-deco { color: var(--accent); }

/* Work leads; Game and Life sit beside it as two smaller doors. */
.feature-grid {
  grid-template-columns: minmax(0, 1.16fr) minmax(0, 1fr);
  grid-template-rows: repeat(2, minmax(0, 224px));
  gap: 18px;
}
.feature-card {
  overflow: hidden;
  border-color: #5a706543;
  border-radius: 8px;
  background: #16272a;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.feature-card:hover, .feature-card:focus-visible {
  transform: translateY(-4px);
  border-color: #edc27cb0;
  box-shadow: 0 18px 48px #0006;
}
.feature-card.work { grid-row: span 2; display: flex; flex-direction: column; }
.feature-card.work .card-visual {
  flex: 1;
  min-height: 0;
  background: radial-gradient(circle at 55% 42%, #d9b78555, transparent 36%),
    linear-gradient(145deg, #8b745b, #4f5a4e 58%, #253932);
}
.feature-card.work .card-symbol { font-size: clamp(150px, 17vw, 230px); }
.feature-card.work .card-body { min-height: 142px; padding: 29px; align-items: center; }
.feature-card.work .card-body h3 { font-size: 31px; }
.feature-card:not(.work) { display: grid; grid-template-columns: 43% 57%; }
.feature-card:not(.work) .card-visual { height: 100%; }
.feature-card:not(.work) .card-symbol { font-size: 91px; }
.feature-card:not(.work) .card-body {
  min-height: 0;
  height: 100%;
  padding: 27px 23px;
  align-items: end;
}
.card-body h3 { font-size: 24px; margin-bottom: 9px; }
.card-body p { font-size: 14px; line-height: 1.55; }
.card-arrow { width: 34px; height: 34px; font-size: 16px; border-color: #aac09c8c; }
.card-coord, .card-label { font-size: 11px; }
.feature-card.games .card-visual {
  background: radial-gradient(circle at 55% 40%, #c3aed477, transparent 40%),
    linear-gradient(145deg, #73759b, #3a4f69 60%, #25314b);
}
.feature-card.life .card-visual {
  background: radial-gradient(circle at 54% 37%, #f0cf9e66, transparent 40%),
    linear-gradient(145deg, #98735e, #6b5a5e 60%, #373d44);
}

.updates-preview { padding-top: 28px; padding-bottom: 112px; }
.text-link { min-height: 44px; display: inline-flex; align-items: center; font-size: 14px; }
.updates-grid { gap: 18px; }
.update-feature, .update-soon {
  min-height: 204px;
  border-radius: 8px;
  border-color: #5a706543;
  background: linear-gradient(135deg, #1c3535, #152729);
}
.update-feature { transition: border-color .2s ease, transform .2s ease; }
.update-feature:hover { transform: translateY(-3px); border-color: var(--accent); }
.update-feature h3, .update-soon h3 { font-size: 23px; }
.update-feature p, .update-soon p { font-size: 14px; line-height: 1.55; }
.update-soon { border-style: solid; background: #111f22; }
.site-footer p, .footer-copy { font-size: 13px; }

/* Inner pages inherit the same type scale and surface treatment. */
.page-intro { min-height: 350px; background: linear-gradient(115deg, #172827, #395048 55%, #1a2c2b); }
.page-intro-inner { padding-top: 92px; padding-bottom: 80px; }
.page-intro h1 { font-size: clamp(45px, 5.2vw, 70px); text-wrap: balance; }
.page-intro p { font-size: 17px; line-height: 1.65; }
.info-card, .portfolio-card, .work-card, .timeline-entry { border-color: #5a70654d; background: #17282a; }
.info-card { min-height: 245px; padding: 31px; border-radius: 8px; }
.info-card h2 { font-size: 25px; }
.info-card p, .portfolio-copy p, .work-main p, .timeline-entry p, .timeline-next p,
.resume-section p, .page-note p { font-size: 15px; line-height: 1.65; }
.portfolio-card { overflow: hidden; border-radius: 8px; }
.game-link { display: block; transition: transform .2s ease, border-color .2s ease; }
.game-link:hover, .game-link:focus-visible { transform: translateY(-4px); border-color: var(--accent); }
.portfolio-copy { padding: 28px; }
.portfolio-copy h2 { font-size: 25px; }
.work-card { border-radius: 8px; }
.work-main h2 { font-size: 29px; }
.work-meta span, .chip { font-size: 12px; }
.page-note { border-style: solid; border-color: #5a706570; background: #142524; border-radius: 8px; }
.resume-section h2 { font-size: 25px; }

@media (max-width: 1000px) {
  .main-nav { gap: 17px; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto; }
  .feature-card.work { grid-column: 1 / -1; grid-row: auto; display: grid; grid-template-columns: 47% 53%; min-height: 290px; }
  .feature-card.work .card-visual { height: 100%; }
  .feature-card:not(.work) { display: flex; flex-direction: column; }
  .feature-card:not(.work) .card-visual { height: 220px; }
  .feature-card:not(.work) .card-body { min-height: 160px; height: auto; }
}

@media (max-width: 760px) {
  .site-header { height: 58px; }
  .brand { font-size: 19px; }
  .menu-toggle { min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
  .mobile-menu { top: 58px; }
  #featured { scroll-margin-top: 58px; }
  .mobile-menu a { min-height: 44px; display: flex; align-items: center; font-size: 14px; }
  .hero-art { top: 58px; height: 640px; }
  .hero { height: 640px; }
  .hero h1 { font-size: clamp(42px, 8vw, 58px); }
  .hero-lead { font-size: 15px; }
  .section-head h2 { font-size: 42px; }
  .feature-grid { gap: 16px; }
  .content-section { padding-top: 76px; padding-bottom: 76px; }
  .updates-preview { padding-top: 15px; }
  .page-intro p { font-size: 16px; }
}

@media (max-width: 600px) {
  .hero-art, .hero { height: 650px; }
  .hero { padding-left: 18px; padding-right: 18px; }
  .hero-eyebrow { font-size: 10px; line-height: 1.5; }
  .avatar { width: 100px; height: 100px; }
  .hero h1 { font-size: clamp(39px, 10.4vw, 50px); }
  html[lang="zh-CN"] .hero h1 { text-wrap: normal; word-break: keep-all; }
  .hero-lead { font-size: 14px; }
  .social-links { gap: 4px; }
  .social-links a, .social-links .social-pending { width: 44px; height: 44px; }
  .hero-buttons { gap: 10px; }
  .button { padding: 12px 14px; font-size: 12px; gap: 12px; }
  .content-section { padding: 66px 18px; }
  .section-head h2 { font-size: 39px; }
  .section-head p { font-size: 14px; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-card.work { grid-column: auto; display: flex; flex-direction: column; }
  .feature-card.work .card-visual { height: 225px; flex: none; }
  .feature-card.work .card-symbol { font-size: 118px; }
  .feature-card.work .card-body { min-height: 125px; padding: 24px; }
  .feature-card.work .card-body h3 { font-size: 26px; }
  .feature-card:not(.work) .card-visual { height: 205px; }
  .feature-card:not(.work) .card-body { min-height: 122px; padding: 24px; }
  .card-body h3 { font-size: 23px; }
  .card-body p { font-size: 14px; }
  .updates-preview { padding-top: 5px; }
  .update-feature, .update-soon { min-height: 190px; padding: 25px; }
  .page-intro-inner { padding: 72px 20px; }
  .page-intro h1 { font-size: 43px; }
  .page-intro p { font-size: 15px; }
  .info-card, .portfolio-copy { padding: 24px; }
  .work-card { padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-wallpaper, .hero-leaves { display: none; }
  .feature-card, .update-feature, .button { transition: none; }
  .feature-card:hover, .feature-card:focus-visible, .update-feature:hover, .button:hover { transform: none; }
}

/* New icons and controls, kept within the original dark green palette. */
.hero .motion-toggle {
  position: absolute;
  z-index: 3;
  top: 21px;
  right: 33px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid #e9d3aa8a;
  border-radius: 999px;
  background: #142820c9;
  color: #fff4df;
  cursor: pointer;
  backdrop-filter: blur(10px);
  font-size: 12px;
  font-weight: 600;
  touch-action: manipulation;
}
.hero .motion-toggle[hidden] { display: none; }
.motion-toggle svg { display: block; width: 16px; height: 16px; }
.motion-toggle .motion-play-icon,
.motion-toggle[aria-pressed="true"] .motion-pause-icon { display: none; }
.motion-toggle[aria-pressed="true"] .motion-play-icon { display: inline; }
.motion-toggle:hover { background: #29473acb; border-color: #fff0d5; }

.card-visual::after { display: none; }
.card-orbit {
  position: absolute;
  width: 230px;
  height: 230px;
  border: 1px solid #f9eac058;
  border-radius: 50%;
  box-shadow: 0 0 0 33px #f9eac00b, 0 0 0 67px #f9eac008;
}
.card-landscape {
  position: absolute;
  z-index: 1;
  inset: auto 0 0;
  height: 31%;
  background: #0e24269c;
  clip-path: polygon(0 58%, 12% 36%, 23% 55%, 39% 15%, 54% 47%, 66% 19%, 81% 53%, 100% 10%, 100% 100%, 0 100%);
}
.games .card-landscape {
  background: #14283cba;
  clip-path: polygon(0 47%, 9% 47%, 9% 28%, 24% 28%, 24% 64%, 40% 64%, 40% 14%, 60% 14%, 60% 46%, 77% 46%, 77% 28%, 91% 28%, 91% 57%, 100% 57%, 100% 100%, 0 100%);
}
.life .card-landscape { background: #35283198; }
.feature-card .card-symbol {
  z-index: 2;
  display: grid;
  place-items: center;
  width: 140px;
  height: 140px;
  border: 1px solid #ffe5b46f;
  border-radius: 50%;
  background: #102a2d65;
  box-shadow: 0 14px 34px #10201b53;
  text-shadow: none;
  transform: none;
  will-change: transform;
}
.feature-card .card-symbol svg { width: 58px; height: 58px; stroke-width: 1.35; }
.feature-card.work .card-symbol { width: 160px; height: 160px; }
.feature-card.work .card-symbol svg { width: 71px; height: 71px; }
.feature-card:not(.work) .card-symbol { width: 108px; height: 108px; }
.feature-card:not(.work) .card-symbol svg { width: 48px; height: 48px; }
.card-arrow { display: grid; place-items: center; }
.card-arrow svg { width: 18px; height: 18px; }
.text-link svg { display: block; width: 17px; height: 17px; }
.update-icon svg { display: block; width: 43px; height: 43px; stroke-width: 1.35; }
.update-arrow svg { display: block; width: 20px; height: 20px; }
.update-soon { display: flex; flex-direction: column; justify-content: center; }

@media (max-width: 760px) {
  .hero .motion-toggle { top: 16px; right: 20px; }
}
@media (max-width: 600px) {
  .hero .motion-toggle { top: 14px; right: 17px; padding: 0 12px; }
  .hero .motion-toggle .motion-label { display: none; }
  .feature-card.work .card-symbol { width: 120px; height: 120px; }
  .feature-card.work .card-symbol svg { width: 55px; height: 55px; }
  .update-icon svg { width: 29px; height: 29px; }
}
