:root {
  --ink: #17201b;
  --muted: #607064;
  --line: #d9e2da;
  --paper: #f7f4ec;
  --surface: #ffffff;
  --forest: #1f6b4f;
  --lime: #b9dc5b;
  --coral: #df6b52;
  --gold: #f2b84b;
  --teal: #3aa69b;
  --shadow: 0 24px 80px rgba(30, 45, 35, 0.14);
  font-family: "Inter", "Noto Sans TC", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 72px);
  background: rgba(247, 244, 236, 0.86);
  border-bottom: 1px solid rgba(23, 32, 27, 0.08);
  backdrop-filter: blur(18px);
  transition: box-shadow 180ms ease, background 180ms ease;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 30px rgba(23, 32, 27, 0.08);
}

.brand,
.nav,
.hero-actions,
.tags {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #fff;
  background: var(--forest);
  border-radius: 8px;
}

.nav {
  gap: 8px;
}

.nav a {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.nav a:hover {
  color: var(--forest);
}

.section-band,
.section,
.intro,
.contact {
  padding-right: clamp(20px, 5vw, 72px);
  padding-left: clamp(20px, 5vw, 72px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.85fr);
  gap: clamp(36px, 6vw, 90px);
  align-items: center;
  min-height: min(760px, calc(100vh - 74px));
  padding-top: 56px;
  padding-bottom: 72px;
}

.hero-content,
.hero-visual,
.project-copy {
  min-width: 0;
}

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  color: var(--coral);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 900px;
  margin-bottom: 24px;
  font-size: clamp(44px, 7vw, 88px);
  line-height: 0.98;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.1;
  letter-spacing: 0;
}

h3 {
  font-size: 24px;
  line-height: 1.2;
}

.hero-copy {
  max-width: 660px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.8;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  font-weight: 800;
}

.button.primary {
  color: #fff;
  background: var(--ink);
}

.button.secondary {
  color: var(--ink);
  background: transparent;
}

.hero-visual {
  position: relative;
  min-height: 520px;
}

.device-frame {
  overflow: hidden;
  height: 430px;
  margin-top: 40px;
  background: #14231b;
  border: 10px solid #26352d;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.browser-bar {
  display: flex;
  gap: 7px;
  padding: 15px;
  background: #314239;
}

.browser-bar span {
  width: 10px;
  height: 10px;
  background: var(--gold);
  border-radius: 50%;
}

.browser-bar span:nth-child(2) {
  background: var(--coral);
}

.browser-bar span:nth-child(3) {
  background: var(--teal);
}

.dashboard-preview {
  display: grid;
  grid-template-columns: 112px 1fr;
  height: calc(100% - 40px);
}

.dashboard-preview aside {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px 18px;
  color: #e7f4ea;
  background: #203429;
}

.dashboard-preview aside span,
.preview-grid span,
.order-panel span {
  display: block;
  height: 12px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

.preview-main {
  padding: 26px;
  background:
    linear-gradient(135deg, rgba(185, 220, 91, 0.22), transparent 44%),
    #eef5e9;
}

.preview-chart {
  height: 170px;
  margin-bottom: 18px;
  background:
    linear-gradient(90deg, var(--forest) 18%, transparent 18% 25%, var(--teal) 25% 52%, transparent 52% 58%, var(--coral) 58% 77%, transparent 77% 82%, var(--gold) 82%),
    #dfe9dd;
  border-radius: 12px;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.preview-grid span {
  height: 74px;
  background: #fff;
  border-radius: 12px;
}

.floating-stat {
  position: absolute;
  display: grid;
  width: 126px;
  height: 126px;
  place-items: center;
  padding: 16px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.floating-stat strong {
  font-size: 42px;
  line-height: 1;
}

.floating-stat span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.stat-top {
  top: 0;
  right: 18px;
}

.stat-bottom {
  bottom: 0;
  left: 4px;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.75fr);
  gap: clamp(28px, 6vw, 80px);
  padding-top: 90px;
  padding-bottom: 90px;
  background: var(--surface);
}

.intro p:last-child {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.9;
}

.section {
  padding-top: 96px;
  padding-bottom: 96px;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 34px;
}

.project {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(320px, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: stretch;
  padding: clamp(24px, 4vw, 46px);
  margin-top: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.project-casino {
  background: #18211f;
  color: #f7f4ec;
  border-color: rgba(255, 255, 255, 0.12);
}

.project-copy p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.project-casino .project-copy p,
.project-casino .feature-list {
  color: #c8d3ca;
}

.project-index {
  margin-bottom: 42px;
  color: var(--coral);
  font-weight: 800;
}

.feature-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 26px 0;
  color: var(--muted);
  list-style: none;
}

.feature-list li {
  position: relative;
  padding-left: 22px;
}

.feature-list li::before {
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 8px;
  height: 8px;
  content: "";
  background: var(--lime);
  border-radius: 50%;
}

.tags {
  flex-wrap: wrap;
  gap: 8px;
}

.tags span {
  padding: 8px 10px;
  color: var(--forest);
  background: #edf5e9;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.project-casino .tags span {
  color: #18211f;
  background: var(--lime);
}

.project-note {
  padding: 14px 16px;
  margin: 22px 0 0;
  color: var(--muted);
  background: #f2f7ef;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px !important;
  line-height: 1.8 !important;
}

.tech-stack {
  padding: 16px;
  margin-top: 22px;
  background: #f7faf4;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stack-title {
  margin-bottom: 12px !important;
  color: var(--coral) !important;
  font-size: 12px !important;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.tech-stack dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.tech-stack div {
  min-width: 0;
}

.tech-stack dt {
  margin-bottom: 4px;
  color: #809085;
  font-size: 12px;
  font-weight: 800;
}

.tech-stack dd {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.dark-stack {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.dark-stack .stack-title {
  color: var(--lime) !important;
}

.dark-stack dt {
  color: #8fa59a;
}

.dark-stack dd {
  color: #fff;
}

.demo-access {
  padding: 18px;
  margin-top: 24px;
  color: #dce8df;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
}

.food-demo-access {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.76);
  border-color: rgba(22, 27, 34, 0.1);
}

.demo-access p {
  margin-bottom: 12px;
  color: #c8d3ca;
  font-size: 14px;
  line-height: 1.7;
}

.food-demo-access p {
  color: var(--muted);
}

.demo-title {
  color: var(--lime) !important;
  font-size: 12px !important;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.food-demo-access .demo-title {
  color: var(--coral) !important;
}

.demo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.demo-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  color: #18211f;
  background: var(--lime);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
}

.food-demo-access .demo-link {
  color: #fff;
  background: var(--ink);
}

.demo-credentials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0;
}

.demo-credentials div {
  padding: 10px;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 8px;
}

.demo-credentials dt {
  margin-bottom: 4px;
  color: #8fa59a;
  font-size: 12px;
  font-weight: 800;
}

.demo-credentials dd {
  margin: 0;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.project-visual {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border-radius: 8px;
}

.real-shot {
  display: block;
  min-height: 420px;
  background: #101713;
  border: 12px solid #202b25;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.food-shots {
  display: grid;
  min-height: 520px;
  grid-template-rows: 1fr 0.58fr;
  gap: 14px;
  padding: 14px;
  background: #17201b;
}

.food-shots figure {
  position: relative;
  overflow: hidden;
  margin: 0;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
}

.food-shots img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.food-main-shot img {
  object-position: top center;
}

.food-admin-shot img {
  object-position: left top;
}

.food-shots figcaption {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 7px 10px;
  color: #fff;
  background: rgba(16, 23, 19, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.real-shot img,
.shot-card img,
.phone-shot img,
.desktop-shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.real-shot img {
  object-position: top center;
}

.shot-label {
  position: absolute;
  right: 18px;
  bottom: 18px;
  padding: 8px 12px;
  color: #fff;
  background: rgba(16, 23, 19, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.food-visual {
  background:
    linear-gradient(140deg, rgba(223, 107, 82, 0.28), transparent 42%),
    linear-gradient(320deg, rgba(31, 107, 79, 0.28), transparent 45%),
    #f4d8a8;
}

.menu-card,
.order-panel {
  position: absolute;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(23, 32, 27, 0.08);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(46, 31, 20, 0.16);
}

.menu-card {
  top: 42px;
  left: 42px;
  width: min(280px, calc(100% - 84px));
  padding: 16px;
}

.photo-block {
  display: block;
  height: 160px;
  margin-bottom: 16px;
  background:
    radial-gradient(circle at 35% 38%, #f7f4ec 0 18%, transparent 19%),
    radial-gradient(circle at 62% 54%, #df6b52 0 16%, transparent 17%),
    radial-gradient(circle at 52% 35%, #1f6b4f 0 10%, transparent 11%),
    #f2b84b;
  border-radius: 8px;
}

.menu-card b,
.menu-card small {
  display: block;
}

.menu-card small {
  margin-top: 4px;
  color: var(--muted);
}

.order-panel {
  right: 38px;
  bottom: 38px;
  width: 220px;
  padding: 18px;
}

.order-panel span {
  height: 14px;
  margin-bottom: 12px;
  background: #e5ede4;
}

.order-panel strong {
  display: inline-block;
  margin-top: 6px;
  color: var(--forest);
}

.casino-visual {
  display: grid;
  place-items: center;
  background:
    linear-gradient(145deg, rgba(58, 166, 155, 0.3), transparent 44%),
    linear-gradient(320deg, rgba(242, 184, 75, 0.26), transparent 48%),
    #0e1514;
}

.portfolio-shots {
  display: grid;
  min-height: 660px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: 1fr 0.72fr;
  gap: 16px;
  align-items: stretch;
  padding: 18px;
  place-items: stretch;
}

.portfolio-shots figure {
  position: relative;
  overflow: hidden;
  margin: 0;
  background: #111a18;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.26);
}

.portfolio-shots figcaption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 7px 10px;
  color: #fff;
  background: rgba(14, 21, 20, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.game-shot {
  grid-column: 1 / -1;
  grid-row: 1;
}

.game-shot img {
  object-position: center center;
}

.phone-shot {
  align-self: stretch;
}

.phone-shot img {
  object-position: top center;
}

.home-shot {
  display: grid;
  grid-column: 1;
  grid-row: 2;
  place-items: center;
  padding: 10px;
  background: linear-gradient(180deg, #dff5ff, #8bd6f6);
}

.home-shot img {
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  object-position: top center;
  padding: 0;
  border-radius: 8px;
}

.home-shot figcaption {
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}

.ledger-shot {
  grid-column: 2;
  grid-row: 2;
}

.ledger-shot img {
  object-position: top center;
}

.desktop-shot {
  grid-column: 3;
  grid-row: 2;
}

.admin-shot img {
  object-fit: cover;
  object-position: left top;
}

.game-grid {
  display: grid;
  width: min(420px, 88%);
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.game-grid span {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  color: #fff;
  background: #243530;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  font-size: clamp(24px, 4vw, 42px);
  font-weight: 800;
}

.game-grid span:nth-child(odd) {
  background: var(--coral);
}

.game-grid span:nth-child(2) {
  background: var(--forest);
}

.game-grid span:nth-child(4) {
  color: var(--ink);
  background: var(--gold);
}

.report-strip {
  position: absolute;
  right: 28px;
  bottom: 28px;
  display: flex;
  gap: 7px;
  align-items: end;
  height: 76px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.report-strip i {
  width: 18px;
  background: var(--lime);
  border-radius: 999px 999px 0 0;
}

.report-strip i:nth-child(1) {
  height: 28px;
}

.report-strip i:nth-child(2) {
  height: 48px;
}

.report-strip i:nth-child(3) {
  height: 36px;
}

.report-strip i:nth-child(4) {
  height: 58px;
}

.skill-section {
  background: var(--surface);
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.skill-card {
  min-height: 210px;
  padding: 24px;
  background: #f7f4ec;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.skill-card p {
  color: var(--muted);
  line-height: 1.8;
}

.process {
  background: #eef5e9;
}

.timeline {
  display: grid;
  gap: 14px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 22px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.timeline span {
  color: var(--coral);
  font-weight: 800;
}

.timeline p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.8;
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding-top: 82px;
  padding-bottom: 82px;
  color: #fff;
  background: var(--forest);
}

.contact .section-kicker,
.contact p {
  color: #d8eadb;
}

.contact .button.primary {
  color: var(--ink);
  background: var(--lime);
  border-color: var(--lime);
}

.contact-actions {
  display: grid;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  grid-template-columns: repeat(3, 1fr);
}

.contact-mail {
  color: #fff;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.45);
}

.contact-actions .button {
  gap: 8px;
}

.contact-actions img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.contact-mail img {
  filter: invert(1);
}

.line-link {
  color: #fff;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.45);
}

.footer {
  align-items: center;
  padding: 26px clamp(20px, 5vw, 72px);
  color: var(--muted);
  background: #101713;
  text-align: center;
}

.footer p {
  margin: 0;
  font-size: 14px;
}

.back-to-top {
  position: fixed;
  right: clamp(18px, 3vw, 34px);
  bottom: 96px;
  z-index: 30;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: #fff;
  background: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  box-shadow: 0 14px 38px rgba(16, 23, 19, 0.22);
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}

.back-to-top:hover {
  background: var(--forest);
}

@media (max-width: 960px) {
  .hero,
  .intro,
  .project,
  .contact {
    grid-template-columns: 1fr;
  }

  .project-casino {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .skill-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact {
    justify-items: start;
  }

  .contact-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .site-header {
    align-items: flex-start;
    gap: 12px;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    column-gap: 24px;
    row-gap: 4px;
  }

  .nav a {
    padding: 8px 0;
  }

  .hero {
    padding-top: 42px;
  }

  h1 {
    max-width: calc(100vw - 40px);
    font-size: 32px;
    line-height: 1.1;
  }

  h1,
  h2,
  .hero-copy,
  .intro p,
  .project-copy p,
  .feature-list {
    overflow-wrap: anywhere;
    word-break: break-all;
  }

  .hero-visual {
    min-height: 420px;
  }

  .device-frame {
    height: 330px;
    margin-top: 18px;
  }

  .dashboard-preview {
    grid-template-columns: 80px 1fr;
  }

  .preview-main {
    padding: 16px;
  }

  .preview-chart {
    height: 122px;
  }

  .floating-stat {
    width: 104px;
    height: 104px;
  }

  .floating-stat strong {
    font-size: 34px;
  }

  .section,
  .intro {
    padding-top: 68px;
    padding-bottom: 68px;
  }

  .project {
    padding: 22px;
  }

  .project-visual {
    min-height: 320px;
  }

  .real-shot {
    min-height: 260px;
    border-width: 8px;
  }

  .food-shots {
    min-height: auto;
    grid-template-rows: 240px 170px;
    padding: 10px;
  }

  .portfolio-shots {
    min-height: auto;
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .game-shot,
  .home-shot,
  .ledger-shot,
  .desktop-shot {
    grid-column: auto;
    grid-row: auto;
  }

  .game-shot,
  .desktop-shot {
    aspect-ratio: 16 / 10;
  }

  .phone-shot {
    aspect-ratio: 9 / 14;
  }

  .demo-credentials {
    grid-template-columns: 1fr;
  }

  .tech-stack dl {
    grid-template-columns: 1fr;
  }

  .menu-card {
    top: 24px;
    left: 24px;
    width: calc(100% - 48px);
  }

  .order-panel {
    right: 24px;
    bottom: 24px;
    width: calc(100% - 48px);
  }

  .game-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .timeline li {
    grid-template-columns: 1fr;
  }

  .footer {
    gap: 14px;
    flex-direction: column;
  }

  .back-to-top {
    right: 18px;
    bottom: 72px;
    width: 44px;
    height: 44px;
    font-size: 22px;
  }
}

@media (max-width: 480px) {
  .hero-content,
  .hero-visual,
  .intro > *,
  .section-heading,
  .project-copy {
    max-width: 342px;
  }

  .device-frame {
    width: 100%;
  }

  h1 {
    max-width: 342px;
    font-size: 30px;
  }

  h2 {
    font-size: 28px;
  }
}
