/* ===== 海環系學會網站 · 簡約專業樣式 ===== */

:root {
  --ink: #0f172a;          /* 主文字（近黑藍） */
  --ink-soft: #475569;     /* 次要文字 */
  --line: #e2e8f0;         /* 分隔線 */
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --accent: #0e5a6e;       /* 海洋藍綠 · 點綴色 */
  --accent-soft: #e6f2f4;
  --radius: 14px;
  --maxw: 1080px;
  --shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.05);
  --font: "Noto Sans TC", -apple-system, "PingFang TC", "Microsoft JhengHei", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

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

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 15px; letter-spacing: 1px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name { font-weight: 700; font-size: 16px; }
.brand-sub { font-size: 12px; color: var(--ink-soft); }

.nav { display: flex; gap: 28px; }
.nav a {
  font-size: 15px; color: var(--ink-soft);
  position: relative; padding: 4px 0; transition: color .2s;
}
.nav a:hover { color: var(--accent); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; }

/* ===== Hero ===== */
.hero {
  padding: 96px 0 72px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(1200px 400px at 80% -10%, var(--accent-soft), transparent 60%);
}
.hero h1 {
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 800; letter-spacing: -.5px; line-height: 1.2;
  max-width: 16ch;
}
.hero p {
  margin-top: 20px; font-size: 18px; color: var(--ink-soft);
  max-width: 48ch;
}
.hero-actions { margin-top: 32px; display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font-size: 15px; font-weight: 600; cursor: pointer;
  transition: transform .15s, box-shadow .2s, background .2s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-ghost { border: 1px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ===== Section ===== */
.section { padding: 72px 0; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 36px; flex-wrap: wrap; gap: 8px;
}
.section-head h2 { font-size: 26px; font-weight: 800; letter-spacing: -.3px; }
.section-head .eyebrow {
  font-size: 13px; font-weight: 700; letter-spacing: 2px;
  color: var(--accent); text-transform: uppercase; margin-bottom: 8px;
}

/* ===== News grid ===== */
.news-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px;
}
.card {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg); overflow: hidden;
  transition: transform .18s, box-shadow .25s, border-color .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #cbd5e1; }
.card.featured { grid-column: 1 / -1; }
.card-cover {
  height: 180px; background: var(--accent-soft);
  background-size: cover; background-position: center;
  display: grid; place-items: center; color: var(--accent);
  font-size: 13px; letter-spacing: 2px;
}
.card.featured .card-cover { height: 220px; }
.card-body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.card-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.tag {
  font-size: 12px; font-weight: 700; letter-spacing: .5px;
  padding: 4px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
}
.tag.pin { background: #fef3c7; color: #92600a; }
.date { font-size: 13px; color: var(--ink-soft); }
.card-title { font-size: 19px; font-weight: 700; line-height: 1.45; }
.card.featured .card-title { font-size: 24px; }
.card-summary { margin-top: 12px; color: var(--ink-soft); font-size: 15px; flex: 1; }
.card-more {
  margin-top: 18px; font-size: 14px; font-weight: 600; color: var(--accent);
  display: inline-flex; align-items: center; gap: 6px;
}
.card:hover .card-more { gap: 10px; }

/* ===== About / Contact ===== */
.split { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: start; }
.split p { color: var(--ink-soft); font-size: 16px; }
.info-list { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.info-list li { display: flex; flex-direction: column; gap: 2px; }
.info-list .k { font-size: 13px; letter-spacing: 1px; color: var(--accent); font-weight: 700; }
.info-list .v { font-size: 16px; }
.section.soft { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ===== Footer ===== */
.site-footer { padding: 48px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 18px; }
.footer-note { color: var(--ink-soft); font-size: 14px; }
.social { display: flex; gap: 14px; }
.social a {
  font-size: 14px; color: var(--ink-soft);
  padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; transition: .2s;
}
.social a:hover { border-color: var(--accent); color: var(--accent); }

/* ===== Post detail page ===== */
.post-header { padding: 64px 0 40px; border-bottom: 1px solid var(--line); }
.post-back { font-size: 14px; color: var(--ink-soft); display: inline-flex; gap: 6px; margin-bottom: 22px; }
.post-back:hover { color: var(--accent); }
.post-title { font-size: clamp(26px, 4vw, 40px); font-weight: 800; line-height: 1.25; margin-top: 14px; max-width: 24ch; }
.post-content { padding: 48px 0 80px; }
.post-content .prose { max-width: 70ch; font-size: 17px; color: #1e293b; white-space: pre-wrap; }
.post-cover { height: 320px; border-radius: var(--radius); background: var(--accent-soft); background-size: cover; background-position: center; margin: 32px 0; display:grid; place-items:center; color: var(--accent); letter-spacing:2px; }

/* ===== Responsive ===== */
@media (max-width: 820px) {
  .nav { display: none; }
  .nav.open {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: 68px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 8px 24px 16px;
  }
  .nav.open a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: block; }
  .news-grid { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .hero { padding: 64px 0 52px; }
}
