:root {
  --bg: #030304;
  --bg-soft: #0a0a0d;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-strong: rgba(255, 255, 255, 0.078);
  --line: rgba(255, 255, 255, 0.13);
  --line-strong: rgba(168, 144, 255, 0.44);
  --text: #f7f4ee;
  --muted: #aaa7a2;
  --soft: #ddd7cc;
  --blue: #6aa7ff;
  --purple: #b69cff;
  --warm: #f2eadf;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", "Noto Sans TC", sans-serif;
  background:
    linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(180deg, #020203 0%, #09090c 44%, #030304 100%);
  background-size: 44px 44px, 44px 44px, auto;
  color: var(--text);
  line-height: 1.7;
  letter-spacing: 0;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(106, 167, 255, 0.13), transparent 34%),
    linear-gradient(245deg, rgba(182, 156, 255, 0.12), transparent 38%),
    linear-gradient(180deg, transparent 0%, rgba(3, 3, 4, 0.74) 58%);
  content: "";
}

body.nav-open {
  overflow: hidden;
}

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

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(3, 3, 4, 0.76);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  width: min(1180px, calc(100% - 40px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--text);
}

.brand-mark {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 4px;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  box-shadow: 0 0 28px rgba(106, 167, 255, 0.38);
}

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

.nav-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  transition: color 180ms ease, background 180ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

.nav-links .nav-cta {
  color: #fff;
  background: rgba(182, 156, 255, 0.12);
  border: 1px solid rgba(182, 156, 255, 0.36);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: var(--text);
  transition: transform 200ms ease;
}

.section {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 92px 0;
  scroll-margin-top: 90px;
}

.hero {
  min-height: calc(100vh - 72px);
  display: grid;
  align-items: center;
  padding-top: 58px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 18px;
  align-items: stretch;
}

.hero-copy,
.hero-panel,
.card,
.flow-card,
.tool-card,
.work-card,
.availability-panel,
.contact-card {
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.066), rgba(255, 255, 255, 0.026)),
    rgba(4, 4, 6, 0.74);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.hero-copy {
  padding: clamp(32px, 6vw, 64px);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

.hero-copy::after {
  position: absolute;
  right: -16%;
  bottom: -20%;
  width: 58%;
  height: 58%;
  background: linear-gradient(135deg, rgba(106, 167, 255, 0.16), rgba(182, 156, 255, 0.08));
  filter: blur(52px);
  opacity: 0.72;
  content: "";
}

.hero-copy > * {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 16px;
  color: #c7b9ff;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.hero-tags span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--soft);
  font-size: 0.82rem;
  font-weight: 700;
}

.profile-lead {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  margin-bottom: 28px;
}

.avatar-frame {
  position: relative;
  width: 132px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(106, 167, 255, 0.18), rgba(182, 156, 255, 0.14)),
    #121217;
}

.avatar-frame::after {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  content: "";
}

.avatar-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-info .eyebrow {
  margin-bottom: 12px;
}

.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.profile-meta div {
  min-height: 42px;
  display: grid;
  align-content: center;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.042);
}

.profile-meta dt {
  color: #c7b9ff;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.1;
}

.profile-meta dd {
  margin: 0;
  color: var(--soft);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.3;
}

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

h1 {
  max-width: 820px;
  margin-bottom: 18px;
  color: var(--warm);
  font-size: clamp(2.8rem, 7vw, 6.2rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h1 span {
  display: block;
  color: var(--soft);
  font-size: clamp(1.5rem, 3.8vw, 3rem);
  font-weight: 700;
}

h2 {
  max-width: 820px;
  margin-bottom: 0;
  color: var(--warm);
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 12px;
  font-size: 1.22rem;
  line-height: 1.35;
}

.identity {
  display: grid;
  gap: 4px;
  margin-bottom: 28px;
  padding-left: 18px;
  border-left: 2px solid var(--purple);
}

.identity p {
  margin: 0;
  color: var(--warm);
  font-size: 1.35rem;
  font-weight: 800;
}

.identity span,
.hero-intro,
.section-heading p,
.card p,
.flow-card li,
.tool-card p,
.work-body p,
.availability-panel p,
.contact-card,
.footer {
  color: var(--muted);
}

.hero-intro {
  max-width: 680px;
  margin-bottom: 34px;
  font-size: 1.1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, #f2eadf, #c7b9ff 54%, #6aa7ff);
  border-color: transparent;
  color: #08080a;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.082);
  color: var(--text);
}

.btn-ghost {
  color: var(--soft);
  background: transparent;
}

.hero-panel {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 8px;
}

.signal-card,
.metric-card,
.dialog-card,
.experience-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.large-card {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
  background:
    linear-gradient(140deg, rgba(106, 167, 255, 0.18), transparent 47%),
    linear-gradient(320deg, rgba(182, 156, 255, 0.16), transparent 44%),
    rgba(255, 255, 255, 0.052);
}

.panel-label,
.metric-card span,
.card-index,
.flow-card span,
.work-body span,
.contact-card span {
  color: #c7b9ff;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.large-card strong {
  margin: 16px 0 10px;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1;
  color: var(--warm);
}

.large-card p,
.metric-card p {
  margin-bottom: 0;
  color: var(--soft);
}

.dialog-card {
  padding: 20px;
}

.dialog-card p {
  margin: 8px 0 0;
  color: var(--soft);
}

.experience-card {
  min-height: 100%;
  padding: clamp(24px, 4vw, 36px);
  background:
    linear-gradient(135deg, rgba(106, 167, 255, 0.13), transparent 42%),
    linear-gradient(315deg, rgba(182, 156, 255, 0.12), transparent 38%),
    rgba(255, 255, 255, 0.04);
}

.experience-list {
  display: grid;
  gap: 26px;
}

.experience-item {
  position: relative;
  padding-left: 18px;
}

.experience-item::before {
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, rgba(199, 185, 255, 0.75), rgba(199, 185, 255, 0.06));
  content: "";
}

.experience-item::after {
  position: absolute;
  left: -4px;
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--purple);
  box-shadow: 0 0 22px rgba(182, 156, 255, 0.5);
  content: "";
}

.experience-head {
  margin: 18px 0 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.experience-head h2 {
  margin-bottom: 10px;
  font-size: clamp(2.1rem, 4.6vw, 4.4rem);
}

.experience-head p {
  margin-bottom: 4px;
  color: var(--soft);
  font-size: 1.12rem;
  font-weight: 800;
}

.experience-head time {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.experience-head small {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.6;
}

.experience-item.compact {
  padding-bottom: 2px;
}

.experience-item.compact .experience-head {
  margin-top: 0;
  margin-bottom: 16px;
}

.experience-item.compact .experience-head h2 {
  font-size: clamp(1.55rem, 3vw, 2.25rem);
}

.experience-card ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.experience-card li {
  position: relative;
  padding-left: 18px;
  color: var(--soft);
  font-size: 0.98rem;
  line-height: 1.72;
}

.experience-card li::before {
  position: absolute;
  left: 0;
  top: 0.8em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--purple);
  content: "";
}

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

.metric-card {
  min-height: 148px;
  padding: 18px;
}

.metric-card strong {
  display: block;
  margin: 18px 0 6px;
  color: var(--text);
  font-size: 1.1rem;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  align-items: end;
  margin-bottom: 30px;
}

.bento-grid {
  display: grid;
  gap: 16px;
}

.why-grid {
  grid-template-columns: 1.1fr 1fr 1fr;
}

.card {
  min-height: 250px;
  padding: 26px;
  border-radius: 8px;
  transition: transform 200ms ease, border-color 200ms ease, background 200ms ease;
}

.card:first-child {
  grid-row: span 2;
}

.card:hover,
.tool-card:hover,
.flow-card:hover,
.work-card:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  background: var(--panel-strong);
}

.accent-card {
  background:
    linear-gradient(135deg, rgba(106, 167, 255, 0.14), rgba(182, 156, 255, 0.13)),
    rgba(255, 255, 255, 0.06);
}

.card-index {
  display: inline-block;
  margin-bottom: 80px;
}

.flow-grid,
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.flow-card {
  padding: 26px;
  border-radius: 8px;
  transition: transform 200ms ease, border-color 200ms ease, background 200ms ease;
}

.flow-card.featured {
  border-color: rgba(182, 156, 255, 0.48);
  background:
    linear-gradient(180deg, rgba(182, 156, 255, 0.13), rgba(255, 255, 255, 0.036)),
    rgba(255, 255, 255, 0.055);
}

.flow-card ul {
  display: grid;
  gap: 10px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.flow-card li {
  position: relative;
  padding-left: 18px;
}

.flow-card li::before {
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--purple);
  content: "";
}

.tool-matrix {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.tool-card {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-radius: 8px;
  transition: transform 200ms ease, border-color 200ms ease, background 200ms ease;
}

.tool-card:nth-child(1),
.tool-card:nth-child(4) {
  grid-column: span 2;
}

.tool-card:nth-child(2),
.tool-card:nth-child(3),
.tool-card:nth-child(5),
.tool-card:nth-child(6),
.tool-card:nth-child(7) {
  grid-column: span 2;
}

.work-card {
  overflow: hidden;
  border-radius: 8px;
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.work-media {
  aspect-ratio: 16 / 10;
  background:
    linear-gradient(135deg, rgba(106, 167, 255, 0.18), rgba(182, 156, 255, 0.12)),
    #111114;
}

.work-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}

.work-body {
  padding: 22px;
}

.work-body h3 {
  min-height: 64px;
}

.work-body .tools {
  color: var(--soft);
  font-size: 0.92rem;
}

.work-body a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  color: #fff;
  font-weight: 800;
  border-bottom: 1px solid rgba(182, 156, 255, 0.72);
}

.portfolio-gallery {
  column-count: 3;
  column-gap: 16px;
  margin-top: 24px;
}

.portfolio-gallery figure {
  display: inline-block;
  width: 100%;
  margin: 0 0 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.26);
  break-inside: avoid;
  transition: transform 200ms ease, border-color 200ms ease;
}

.portfolio-gallery figure:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
}

.portfolio-gallery img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.availability-panel {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: end;
  padding: clamp(28px, 5vw, 48px);
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(106, 167, 255, 0.12), transparent 42%),
    rgba(255, 255, 255, 0.055);
}

.contact-section {
  padding-top: 56px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 420px);
  gap: 24px;
  align-items: stretch;
}

.contact-card {
  display: grid;
  gap: 0;
  border-radius: 8px;
  overflow: hidden;
}

.contact-card a,
.contact-card p {
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 2px;
  margin: 0;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  transition: background 180ms ease;
}

.contact-card a:hover,
.contact-card a:focus-visible {
  background: rgba(182, 156, 255, 0.1);
  outline: none;
}

.footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.92rem;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 650ms ease, transform 650ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .hero-grid,
  .availability-panel,
  .contact-grid {
    grid-template-columns: 1fr;
  }

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

  .card:first-child {
    grid-row: auto;
  }

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

  .tool-card:nth-child(n) {
    grid-column: auto;
  }

  .portfolio-gallery {
    column-count: 2;
  }
}

@media (max-width: 720px) {
  .nav-wrap,
  .section,
  .footer {
    width: min(100% - 28px, 1180px);
  }

  .nav-toggle {
    display: block;
  }

  .nav-toggle[aria-expanded="true"] span:first-child {
    transform: translateY(3.5px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] span:last-child {
    transform: translateY(-3.5px) rotate(-45deg);
  }

  .nav-links {
    position: fixed;
    left: 14px;
    right: 14px;
    top: 78px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(12, 14, 20, 0.96);
    box-shadow: var(--shadow);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    width: 100%;
    justify-content: center;
  }

  .hero {
    min-height: auto;
    padding-top: 42px;
  }

  .section {
    padding: 68px 0;
  }

  .hero-copy {
    padding: 28px 20px;
  }

  h1 {
    font-size: clamp(2.8rem, 15vw, 4.2rem);
  }

  h2 {
    font-size: clamp(1.8rem, 9vw, 2.7rem);
  }

  .hero-actions,
  .profile-lead,
  .metrics-grid,
  .why-grid,
  .flow-grid,
  .tool-matrix,
  .works-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    display: grid;
  }

  .profile-lead {
    align-items: start;
  }

  .avatar-frame {
    width: 116px;
  }

  .btn {
    width: 100%;
  }

  .section-heading {
    display: block;
  }

  .large-card {
    min-height: 250px;
  }

  .card-index {
    margin-bottom: 44px;
  }

  .work-body h3 {
    min-height: auto;
  }

  .portfolio-gallery {
    column-count: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
