/* ===== Tokens ===== */
:root{
  --bg: #0a0f1a;
  --bg-elevated: #0e1522;
  --line: rgba(148,172,210,0.18);
  --line-strong: rgba(148,172,210,0.4);
  --text: #e4e9f2;
  --text-muted: #8f9db5;
  --silver: #c7cedd;
  --accent: #38bdf8;
  --radius: 3px;
  --container: 980px;
  --ff-body: 'Noto Sans TC', 'Microsoft JhengHei', sans-serif;
  --ff-mono: 'IBM Plex Mono', 'Courier New', monospace;
}

*,*::before,*::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff-body);
  line-height: 1.75;
}
img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }
h1,h2,h3{ margin: 0; }
p{ margin: 0; }
.container{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Header ===== */
.site-header{
  position: sticky;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.nav-bar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand{
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-mark{
  width: 32px;
  height: 32px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: block;
}
.brand-mark img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.brand-text{
  font-family: var(--ff-mono);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.brand-text small{
  font-family: var(--ff-body);
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0;
}

.nav-links{ display: flex; gap: 32px; }
.nav-links a{
  font-family: var(--ff-mono);
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: color 0.15s ease;
}
.nav-links a:hover{ color: var(--accent); }

.nav-toggle{
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--line);
  cursor: pointer;
}
.nav-toggle span{
  display: block;
  height: 1px;
  margin: 0 8px;
  background: var(--silver);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle.open span:nth-child(1){ transform: translateY(6px) rotate(45deg); }
.nav-toggle.open span:nth-child(2){ opacity: 0; }
.nav-toggle.open span:nth-child(3){ transform: translateY(-6px) rotate(-45deg); }

/* ===== Buttons ===== */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 26px;
  border-radius: var(--radius);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.btn-primary{
  background: var(--accent);
  color: #04101c;
}
.btn-primary:hover{ background: #5ecbfa; }
.btn-line{
  border-color: var(--line-strong);
  color: var(--text);
}
.btn-line:hover{ border-color: var(--accent); color: var(--accent); }

/* ===== Hero ===== */
.hero{ padding: 90px 0 84px; border-bottom: 1px solid var(--line); }
.hero-content{
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  align-items: center;
  gap: 56px;
}
.tag{
  font-family: var(--ff-mono);
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}
.hero-text h1{
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  font-weight: 900;
  line-height: 1.4;
  color: var(--text);
}
.hero-desc{
  margin-top: 22px;
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 50ch;
}
.hero-desc strong{ color: var(--silver); }
.hero-actions{
  margin-top: 32px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.hero-media{ display: flex; justify-content: center; }
.hero-frame{
  display: block;
  width: min(260px, 100%);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  overflow: hidden;
}
.hero-frame img{ width: 100%; height: 100%; object-fit: cover; }

/* ===== Section shared ===== */
section{ padding: 84px 0; }
.section-head{
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 36px;
}
.section-index{
  font-family: var(--ff-mono);
  color: var(--accent);
  font-size: 0.95rem;
  letter-spacing: 0.1em;
}
.section-title{
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
}
.section-sub{
  color: var(--text-muted);
  max-width: 60ch;
  font-size: 0.98rem;
  margin-top: -16px;
  margin-bottom: 36px;
}

/* ===== Services ===== */
.services{ background: var(--bg-elevated); border-bottom: 1px solid var(--line); }
.service-list{ border-top: 1px solid var(--line); }
.service-row{
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.service-num{
  font-family: var(--ff-mono);
  color: var(--text-muted);
  font-size: 0.95rem;
}
.service-body h3{
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.service-body p{ color: var(--text-muted); font-size: 0.95rem; max-width: 64ch; }

/* ===== About ===== */
.about-grid{
  display: grid;
  grid-template-columns: 0.55fr 1fr;
  gap: 56px;
  align-items: start;
}
.about-media{ display: flex; justify-content: center; }
.about-frame{
  display: block;
  width: min(220px, 100%);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  overflow: hidden;
}
.about-frame img{ width: 100%; height: 100%; object-fit: cover; }
.about-text p{ color: var(--text-muted); font-size: 0.98rem; max-width: 64ch; }
.lead-line{
  margin: 28px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}
.lead-line dt{
  font-family: var(--ff-mono);
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.lead-line dd{ margin: 0; color: var(--text); }
.lead-line dd a{ color: var(--accent); }
.lead-line dd a:hover{ text-decoration: underline; }

/* ===== Contact ===== */
.contact{ background: var(--bg-elevated); }
.contact-list{ margin: 0; border-top: 1px solid var(--line); }
.contact-row{
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.contact-row dt{
  font-family: var(--ff-mono);
  color: var(--text-muted);
  font-size: 0.85rem;
}
.contact-row dd{ margin: 0; }
.contact-row a{
  color: var(--accent);
  font-weight: 600;
}
.contact-row a:hover{ text-decoration: underline; }

/* ===== Footer ===== */
.site-footer{
  padding: 28px 0;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-family: var(--ff-mono);
  font-size: 0.8rem;
}
.footer-grid{
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ===== Responsive ===== */
@media (max-width: 860px){
  .hero-content{ grid-template-columns: 1fr; text-align: center; }
  .hero-desc{ margin-left: auto; margin-right: auto; }
  .hero-actions{ justify-content: center; }
  .hero-media{ order: -1; margin-bottom: 8px; }
  .hero-frame{ width: 180px; }

  .about-grid{ grid-template-columns: 1fr; text-align: center; }
  .about-text p{ max-width: 56ch; margin-left: auto; margin-right: auto; }
  .lead-line{ text-align: left; }
}

@media (max-width: 700px){
  .nav-toggle{ display: flex; }
  .nav-links{
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .nav-links.open{ max-height: 220px; }
  .nav-links a{ padding: 14px 24px; border-top: 1px solid var(--line); width: 100%; }
  .hero{ padding: 64px 0 56px; }
  section{ padding: 56px 0; }
  .contact-row{ grid-template-columns: 1fr; gap: 4px; }
  .service-row{ grid-template-columns: 1fr; gap: 6px; }
}
