:root {
  --ink: #1f1b17;
  --ink-soft: #2f2a25;
  --paper: #f7f3ec;
  --paper-alt: #fff8ef;
  --paper-strong: #efe5d6;
  --accent: #c2a169;
  --accent-strong: #af8a4b;
  --accent-cool: #4f7770;
  --accent-rose: #b8796b;
  --muted: #6f6a62;
  --shadow-sm: 0 10px 20px rgba(24, 22, 19, 0.08);
  --shadow-md: 0 20px 40px rgba(24, 22, 19, 0.14);
  --shadow-lg: 0 30px 70px rgba(24, 22, 19, 0.18);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --transition: 0.3s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Noto Sans TC", "Chiron GoRound TC", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
}

html {
  scroll-behavior: smooth;
}

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

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

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

p {
  color: var(--muted);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Chiron GoRound TC", "Noto Sans TC", sans-serif;
  color: var(--ink);
}

section {
  padding: 110px 0;
  position: relative;
}

.text-muted,
.text-secondary {
  color: var(--muted) !important;
}

.btn {
  border-radius: 999px;
  padding: 12px 28px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.btn-hero {
  background: var(--accent);
  color: var(--ink);
  box-shadow: 0 12px 30px rgba(194, 161, 105, 0.35);
}

.btn-hero:hover {
  background: #d4b47c;
  transform: translateY(-2px);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #f9f4ec;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-soft {
  background: var(--paper-strong);
  color: var(--ink);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.btn-soft:hover {
  background: #ffffff;
}

.section-head {
  margin-bottom: 50px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent-cool);
}

.section-head h2 {
  font-size: clamp(2rem, 2.8vw, 3rem);
  margin: 14px 0 18px;
}

.section-head p {
  max-width: 640px;
  margin: 0 auto;
}

.section-head:not(.text-center) p {
  margin-left: 0;
}

.hero-shell {
  position: relative;
  background: linear-gradient(130deg, #1c1916 0%, #2b2722 45%, #1a1815 100%);
  color: #f9f4ec;
  overflow: hidden;
}

.hero-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 15% 20%, rgba(194, 161, 105, 0.18), transparent 50%),
    radial-gradient(circle at 80% 10%, rgba(79, 119, 112, 0.18), transparent 55%),
    radial-gradient(circle at 60% 80%, rgba(176, 121, 107, 0.16), transparent 55%);
  opacity: 0.8;
  pointer-events: none;
}

header {
  position: sticky;
  top: 0;
  z-index: 1000;
}

header .navbar {
  padding: 16px 0;
  background: rgba(20, 18, 16, 0.68);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: var(--transition);
}

header .navbar.scrolled {
  background: rgba(16, 15, 13, 0.92);
  box-shadow: var(--shadow-sm);
}

header .navbar .nav-link {
  color: rgba(255, 255, 255, 0.85);
  position: relative;
  transition: color 0.3s ease;
}

header .navbar .nav-link.active,
header .navbar .nav-link:hover {
  color: #ffffff;
}

header .navbar .nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

header .navbar .nav-link:hover::after,
header .navbar .nav-link.active::after {
  width: 100%;
}

header .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.2);
}

header .navbar-toggler-icon {
  filter: invert(1);
}

.search-capsule {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  padding: 4px 6px;
  transition: all 0.3s ease;
  max-width: 320px;
}

.search-capsule:focus-within {
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 20px rgba(194, 161, 105, 0.2);
}

.search-capsule .form-control {
  font-size: 0.95rem;
  color: #ffffff !important;
  box-shadow: none;
}

.search-capsule .form-control::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.search-capsule .input-group-text {
  color: rgba(255, 255, 255, 0.6);
}

.search-capsule .btn-search {
  background: var(--accent);
  color: var(--ink);
  border-radius: 999px;
  font-weight: 700;
  padding: 6px 18px;
  font-size: 0.9rem;
  margin: 2px;
  border: none;
  transition: all 0.3s ease;
}

.search-capsule .btn-search:hover {
  background: #f5efe5;
}

.hero {
  position: relative;
  padding: 140px 0 120px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 18px;
}

.eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(194, 161, 105, 0.6);
}

.hero h1 {
  font-size: clamp(2.8rem, 4.2vw, 4.6rem);
  color: #ffffff;
  margin-bottom: 20px;
  line-height: 1.1;
}

.hero .lead {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.2rem;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  backdrop-filter: blur(8px);
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: #ffffff;
  display: block;
}

.stat-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

.hero-visual {
  position: relative;
  max-width: 460px;
  margin-left: auto;
}

.hero-visual img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 12%;
  max-height: 520px;
}

.hero-visual-card {
  position: absolute;
  left: 24px;
  bottom: -24px;
  background: #ffffff;
  color: var(--ink);
  padding: 20px 24px;
  border-radius: var(--radius-md);
  width: 72%;
  box-shadow: var(--shadow-md);
  animation: float-card 10s ease-in-out infinite;
}

.hero-visual-card h3 {
  margin: 8px 0 10px;
}

.hero-visual-card p {
  color: var(--muted);
}

.hero-visual-chip {
  position: absolute;
  top: 20px;
  right: -12px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(6px);
  font-size: 0.9rem;
}

.mono {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-cool);
}

.hero-ornament {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.7;
}

.hero-ornament-1 {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(194, 161, 105, 0.55), transparent 70%);
  top: -140px;
  right: -120px;
  animation: float 18s ease-in-out infinite;
}

.hero-ornament-2 {
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(79, 119, 112, 0.5), transparent 70%);
  bottom: -120px;
  left: -100px;
  animation: float 22s ease-in-out infinite reverse;
}

.hero-ornament-3 {
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(176, 121, 107, 0.45), transparent 70%);
  top: 35%;
  right: 12%;
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(18px, -24px);
  }
  100% {
    transform: translate(0, 0);
  }
}

@keyframes float-card {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes portrait-float {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes gallery-glow {
  0% {
    box-shadow: var(--shadow-sm);
  }
  50% {
    box-shadow: 0 18px 32px rgba(24, 22, 19, 0.12);
  }
  100% {
    box-shadow: var(--shadow-sm);
  }
}

.showreel {
  background: var(--paper-strong);
}

.feature-card {
  background: var(--paper-alt);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-md);
  padding: 32px;
  height: 100%;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
  border-color: rgba(194, 161, 105, 0.5);
}

.feature-icon {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: rgba(194, 161, 105, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-strong);
  margin-bottom: 18px;
  font-size: 1.3rem;
}

.path-section {
  background: #ffffff;
}

.path-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-md);
  padding: 28px;
  height: 100%;
  box-shadow: var(--shadow-sm);
}

.path-card .step {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-cool);
}

.latest-section {
  background: var(--paper-alt);
}

.project-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: var(--shadow-sm);
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
}

.project-media {
  position: relative;
  overflow: hidden;
}

.project-media img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.project-card:hover .project-media img {
  transform: scale(1.05);
}

.project-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink);
}

.project-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 12px;
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.project-status .label {
  font-size: 0.75rem;
  color: var(--muted);
  display: block;
}

.project-status .value {
  font-weight: 700;
  color: var(--accent-cool);
}

.about-section {
  background: var(--paper-strong);
}

.about-photo {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  object-position: center;
  background: var(--paper-alt);
  padding: 12px;
  animation: portrait-float 10s ease-in-out infinite;
}

.about-list li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 12px;
  color: var(--ink-soft);
}

.about-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(194, 161, 105, 0.2);
}

.gallery-section {
  background: var(--paper);
}

.gallery-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: var(--shadow-sm);
  height: 100%;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: gallery-glow 10s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

.gallery-card img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.gallery-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
}

.gallery-card:hover img {
  transform: scale(1.05);
}

.gallery-card figcaption {
  padding: 20px 22px 24px;
}

.history-section {
  background: var(--paper-alt);
}

.timeline {
  position: relative;
  margin-top: 40px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(0, 0, 0, 0.08);
}

.timeline-item {
  position: relative;
  padding-left: 64px;
  margin-bottom: 36px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(194, 161, 105, 0.2);
}

.timeline-date {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-cool);
  margin-bottom: 10px;
}

#email {
  background: linear-gradient(135deg, rgba(239, 229, 214, 0.8), rgba(255, 248, 239, 0.9));
}

.subscribe-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0, 0, 0, 0.06);
  max-width: 880px;
  margin: 0 auto;
  width: 100%;
}

.subscribe-form {
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
}

#email .form-control {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px 0 0 999px;
  padding: 12px 16px;
  width: 100%;
  min-width: 0;
}

#email .input-group {
  width: 100%;
  align-items: stretch;
  flex-wrap: nowrap;
}

#email .input-group .btn {
  border-radius: 0 999px 999px 0;
  white-space: nowrap;
  padding: 12px 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
}

.subscribe-feedback {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--accent-cool);
  min-height: 1.2em;
}

.subscribe-feedback.is-error {
  color: var(--accent-rose);
}

footer {
  background: #1b1815;
  color: rgba(255, 255, 255, 0.75);
  padding: 70px 0;
}

footer h4 {
  color: #ffffff;
  margin-bottom: 18px;
}

footer a {
  color: rgba(255, 255, 255, 0.85);
}

footer a:hover {
  color: #ffffff;
}

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

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal .reveal-item {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  transition-delay: var(--delay, 0s);
}

.delay-1 {
  --delay: 0.1s;
}

.delay-2 {
  --delay: 0.2s;
}

.delay-3 {
  --delay: 0.3s;
}

.delay-4 {
  --delay: 0.4s;
}

.reveal.active .reveal-item {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 991px) {
  section {
    padding: 90px 0;
  }

  header .navbar {
    padding: 12px 0;
  }

  .hero {
    padding: 120px 0 90px;
  }

  .hero-visual {
    margin-top: 24px;
    max-width: 100%;
    margin-left: 0;
  }

  .hero-visual-card {
    position: static;
    width: 100%;
    margin-top: 16px;
  }

  .hero-visual-chip {
    position: static;
    display: inline-flex;
    margin-top: 12px;
  }

  .hero-stats {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }
}

@media (max-width: 767px) {
  .hero {
    padding: 110px 0 80px;
  }

  .hero h1 {
    font-size: clamp(2.2rem, 9vw, 3.2rem);
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
    text-align: center;
  }

  .section-head {
    text-align: left;
  }

  .section-head p {
    margin-left: 0;
  }

  .timeline::before {
    left: 12px;
  }

  .timeline-item {
    padding-left: 44px;
  }
}

@media (max-width: 575px) {
  .hero-stats {
    grid-template-columns: 1fr;
  }

  .subscribe-form {
    max-width: 100%;
  }

  .subscribe-card {
    padding: 28px;
  }

  #email .form-control {
    border-radius: 999px;
  }

  #email .input-group .btn {
    border-radius: 999px;
    width: 100%;
  }

  #email .input-group {
    flex-direction: column;
    gap: 12px;
  }
}

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

  html {
    scroll-behavior: auto;
  }
}
