@import url('https://fonts.googleapis.com/css2?family=IM+Fell+English:ital@0;1&family=Noto+Serif+TC:wght@300;400;500&display=swap');

/* === 基本設定 === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #f7f4ee;
  --text: #2e2a24;
  --text-muted: #8a8278;
  --text-light: #5a5248;
  --green: #3a6b62;
  --green-mid: #5a9e90;
  --green-light: #7dbfb0;
  --green-pale: rgba(90,150,135,0.08);
  --green-border: rgba(90,140,130,0.22);
  --orange: #c07840;
  --orange-pale: rgba(192,120,64,0.07);
  --orange-border: rgba(192,120,64,0.28);
  --border: rgba(90,140,130,0.18);
  --card-bg: rgba(255,255,255,0.62);
  --font-serif: 'IM Fell English', serif;
  --font-body: 'Noto Serif TC', serif;
  --max: 680px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.8;
  min-height: 100vh;
  position: relative;
}

/* === 背景裝飾 === */
body::before {
  content: '';
  position: fixed;
  top: -100px; right: -100px;
  width: 420px; height: 420px;
  border-radius: 50%;
  border: 0.5px solid rgba(90,150,135,0.07);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  top: -100px; right: -100px;
  width: 280px; height: 280px;
  border-radius: 50%;
  border: 0.5px solid rgba(90,150,135,0.06);
  pointer-events: none;
  z-index: 0;
}

/* === HEADER === */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2.5rem;
  border-bottom: 0.5px solid var(--green-border);
  position: relative;
  z-index: 10;
  background: rgba(247,244,238,0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
}

.site-logo {
  font-family: var(--font-serif);
  font-size: 13px;
  letter-spacing: 0.15em;
  color: var(--green);
  text-transform: uppercase;
  text-decoration: none;
}

.site-logo span {
  display: block;
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--green-light);
  font-style: italic;
  margin-top: 2px;
}

nav ul {
  display: flex;
  gap: 1.8rem;
  list-style: none;
}

nav a {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
  padding-bottom: 2px;
}

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

nav a.active {
  color: var(--green);
  border-bottom: 0.5px solid var(--green-light);
}

/* === MAIN WRAPPER === */
main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 2rem 4rem;
  position: relative;
  z-index: 1;
}

/* === 標題 === */
h1 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: normal;
  color: #1e2e2a;
  line-height: 1.3;
  margin-bottom: 0.4rem;
}

h1 em {
  color: var(--green-mid);
  font-style: italic;
}

h2 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: normal;
  color: var(--green);
  margin: 2.5rem 0 1rem;
  letter-spacing: 0.05em;
}

p {
  color: var(--text-light);
  margin-bottom: 1.1rem;
  font-weight: 300;
  line-height: 2.1;
}

a {
  color: var(--green-mid);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover { color: var(--green); }

/* === 分隔線 === */
.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2rem 0 1.6rem;
}

.divider-line {
  flex: 1;
  height: 0.5px;
  background: var(--border);
}

.divider-dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--orange);
  opacity: 0.6;
}

.divider-label {
  font-size: 9.5px;
  letter-spacing: 0.28em;
  color: var(--text-muted);
  text-transform: uppercase;
  white-space: nowrap;
}

/* === 標籤 === */
.tags {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.tag {
  font-size: 9.5px;
  letter-spacing: 0.13em;
  padding: 3px 12px;
  border: 0.5px solid var(--green-border);
  color: var(--green);
  border-radius: 20px;
  background: var(--green-pale);
}

.tag.og {
  border-color: var(--orange-border);
  color: var(--orange);
  background: var(--orange-pale);
}

/* === EYEBROW === */
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.32em;
  color: var(--orange);
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: block;
}

/* === HERO IMAGE BOX === */
.hero-img {
  width: 100%;
  max-width: 100%;
  height: 220px;
  border: 0.5px solid var(--green-border);
  border-radius: 4px;
  background: rgba(255,255,255,0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  overflow: hidden;
}

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

.hero-img-placeholder {
  text-align: center;
}

.hero-img-placeholder p {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--green-light);
  margin: 0;
}

.hero-img-placeholder small {
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

/* === INTRO TEXT === */
.intro {
  text-align: center;
  max-width: 380px;
  margin: 0 auto 1.8rem;
}

/* === 滑動卡片區 === */
.scroll-section {
  margin: 0 -2rem;
  padding: 0 2rem;
}

.scroll-track {
  display: flex;
  gap: 0.9rem;
  overflow-x: auto;
  padding: 0.4rem 2rem 1rem;
  margin: 0 -2rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.scroll-track::-webkit-scrollbar { display: none; }

.scroll-hint {
  text-align: center;
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: rgba(160,144,128,0.55);
  margin: 0.3rem 0 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* === 卡片 === */
.card {
  flex: 0 0 185px;
  border: 0.5px solid var(--green-border);
  border-radius: 4px;
  padding: 1.2rem 1.1rem;
  background: var(--card-bg);
  scroll-snap-align: start;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color 0.2s;
}

.card:hover { border-color: rgba(90,150,135,0.5); }

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(to right, var(--green-mid), var(--green-light));
  opacity: 0;
  transition: opacity 0.2s;
}

.card.og::before {
  background: linear-gradient(to right, var(--orange), #e09a5a);
}

.card:hover::before { opacity: 1; }

.card-img {
  width: 100%;
  height: 95px;
  background: var(--green-pale);
  border-radius: 2px;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  letter-spacing: 0.12em;
  color: rgba(90,150,135,0.38);
  overflow: hidden;
}

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

.card.og .card-img {
  background: var(--orange-pale);
  color: rgba(192,120,64,0.32);
}

.card-num {
  font-family: var(--font-serif);
  font-size: 20px;
  color: rgba(90,150,135,0.18);
  line-height: 1;
  margin-bottom: 0.6rem;
}

.card.og .card-num { color: rgba(192,120,64,0.18); }

.card-badge {
  display: inline-block;
  font-size: 8.5px;
  letter-spacing: 0.14em;
  padding: 2px 7px;
  border-radius: 20px;
  margin-bottom: 0.5rem;
  background: var(--green-pale);
  color: var(--green);
  border: 0.5px solid rgba(90,150,135,0.22);
}

.card.og .card-badge {
  background: var(--orange-pale);
  color: var(--orange);
  border-color: var(--orange-border);
}

.card-title {
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: var(--text);
  margin-bottom: 0.4rem;
  font-weight: 500;
}

.card-desc {
  font-size: 10.5px;
  color: var(--text-muted);
  line-height: 1.9;
  letter-spacing: 0.02em;
}

/* === 作品格線（works / doujin 頁用） === */
.works-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.work-item {
  border: 0.5px solid var(--green-border);
  border-radius: 4px;
  overflow: hidden;
  background: var(--card-bg);
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color 0.2s;
}

.work-item:hover { border-color: rgba(90,150,135,0.5); }

.work-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--green-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  letter-spacing: 0.15em;
  color: rgba(90,150,135,0.4);
  overflow: hidden;
}

.work-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-info {
  padding: 0.8rem 0.9rem;
}

.work-title {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--text);
  margin-bottom: 0.2rem;
  font-weight: 500;
}

.work-meta {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

/* === 攤位資訊表格 === */
.booth-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 12px;
}

.booth-table th {
  text-align: left;
  font-size: 9.5px;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  font-weight: 400;
  padding: 0.5rem 0.8rem;
  border-bottom: 0.5px solid var(--border);
}

.booth-table td {
  padding: 0.8rem;
  border-bottom: 0.5px solid rgba(90,140,130,0.1);
  color: var(--text-light);
  vertical-align: top;
}

.booth-table tr:last-child td { border-bottom: none; }

/* === 關於我頁 === */
.about-grid {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 2rem;
  align-items: start;
  margin: 1.5rem 0;
}

.about-avatar {
  width: 160px;
  aspect-ratio: 1 / 1;
  border: 0.5px solid var(--green-border);
  border-radius: 4px;
  background: var(--green-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  letter-spacing: 0.15em;
  color: rgba(90,150,135,0.4);
  overflow: hidden;
}

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

.social-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.5rem 0;
  border-bottom: 0.5px solid rgba(90,140,130,0.1);
  transition: color 0.2s;
}

.social-link:hover { color: var(--green); }

.social-label {
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--green);
  min-width: 60px;
  text-transform: uppercase;
}

/* === FOOTER === */
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.4rem 2.5rem;
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  border-top: 0.5px solid rgba(90,140,130,0.13);
  margin-top: 2rem;
  position: relative;
  z-index: 1;
}

.footer-links {
  display: flex;
  gap: 1.2rem;
}

.footer-links a {
  color: var(--green-light);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--green); }

/* === 手機版 === */
@media (max-width: 600px) {
  header {
    padding: 1rem 1.2rem;
    flex-wrap: wrap;
    gap: 0.8rem;
  }

  nav ul { gap: 1.2rem; }

  main { padding: 2rem 1.2rem 3rem; }

  h1 { font-size: 1.5rem; }

  .scroll-track {
    padding: 0.4rem 1.2rem 1rem;
    margin: 0 -1.2rem;
  }

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

  .about-avatar {
    width: 120px;
    height: 120px;
  }

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

  footer {
    flex-direction: column;
    gap: 0.8rem;
    text-align: center;
    padding: 1.2rem;
  }
}
