/* Design system carried over from the original Wix site (decentco.info):
   black header, #191919 page, #E5E5E4 text, #787878 secondary, Barlow + light sans, pill buttons.
   Single scrolling page; content runs (almost) edge to edge with a small gutter, like the original. */
:root {
  --header: #000000;
  --bg: #191919;
  --panel: #000000;
  --ink: #e5e5e4;
  --muted: #9a9a98;
  --grey: #787878;
  --line: #2e2e2d;
  --gutter: clamp(16px, 2.4vw, 40px);
  --nav-h: 52px;
  --latin: "Barlow", "Avenir Next", "Avenir", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink);
  font: 300 15px/1.9 var(--latin), "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  letter-spacing: .03em;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-weight: 200; letter-spacing: .08em; line-height: 1.4; }
::selection { background: var(--ink); color: var(--bg); }

/* header — centered logo / name / slogan */
.site-header { background: var(--header); display: flex; justify-content: center; padding: 40px 16px 8px; }
.brand { display: flex; flex-direction: column; align-items: center; text-decoration: none; text-align: center; }
.brand img { width: 90px; height: auto; margin-bottom: 18px; }
.brand strong { font-weight: 400; font-size: clamp(30px, 4vw, 42px); letter-spacing: .08em; line-height: 1.3; }
.brand small { font-size: 14px; letter-spacing: .12em; color: var(--ink); margin-top: 6px; }

/* sticky nav */
.topnav {
  position: sticky; top: 0; z-index: 5; height: var(--nav-h);
  background: rgba(0,0,0,.92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--line);
}
.topnav-links { display: flex; gap: 32px; font-size: 14px; letter-spacing: .14em; }
.topnav-links a { text-decoration: none; color: var(--ink); opacity: .8; padding: 2px 0; border-bottom: 1px solid transparent; transition: .2s; }
.topnav-links a:hover, .topnav-links a.active { opacity: 1; border-bottom-color: var(--ink); }
.lang {
  position: absolute; right: var(--gutter);
  font-size: 12px; letter-spacing: .12em; text-decoration: none; color: var(--muted);
  border: 1px solid var(--grey); border-radius: 100px; padding: 3px 14px; transition: .2s;
}
.lang:hover { color: var(--ink); border-color: var(--ink); }

main { flex: 1; width: 100%; }

/* buttons — outlined pill */
.btn {
  display: inline-block; padding: 9px 30px; border: 1px solid var(--grey); border-radius: 100px;
  text-decoration: none; font-size: 14px; letter-spacing: .14em; color: var(--muted); transition: .2s;
}
.btn:hover { border-color: var(--ink); color: var(--bg); background: var(--ink); }
.btn.ghost { border-color: var(--line); }

/* hero — edge to edge: image half, black panel half */
.hero { display: grid; grid-template-columns: 1fr 1fr; background: var(--panel); margin: 80px var(--gutter) 0; min-height: min(72vh, 720px); }
.hero-img { width: 100%; height: 100%; object-fit: cover; }
.hero-text { display: flex; flex-direction: column; justify-content: center; padding: 56px clamp(28px, 9vw, 140px); }
.hero h1 { font-size: clamp(20px, 1.8vw, 24px); font-weight: 300; margin: 0 0 22px; }
.hero p { color: var(--ink); opacity: .85; margin: 0 0 40px; max-width: 460px; }
.hero .btn { align-self: flex-start; }

/* generic section */
.block { padding: 110px var(--gutter) 0; }
.section-title { font-size: 26px; text-align: center; margin: 0 0 48px; color: var(--muted); }

/* works grid */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); }
.card { text-align: center; text-decoration: none; }
.card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; transition: opacity .25s; }
.card:hover img { opacity: .8; }
.card h3 { font-size: 18px; margin: 22px 0 0; color: var(--muted); }
.card:hover h3 { color: var(--ink); }
.date, .sub { color: var(--grey); font-size: 13px; letter-spacing: .1em; margin: 4px 0 0; }

/* project sections — copy + offset-framed image, alternating sides */
.project { padding: 120px var(--gutter) 0; }
.project-intro { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; margin-bottom: 48px; }
.project.flip .project-text { order: 2; }
.project-text { padding: 0 clamp(0px, 3vw, 48px); }
.project-text h2 { font-size: clamp(26px, 2.6vw, 34px); margin: 0; color: var(--muted); }
.project-body { margin: 22px 0 30px; }
.project-body p { margin: 0 0 12px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 0; }
.framed { position: relative; margin: 0 16px 16px 0; }
.framed::before { content: ""; position: absolute; inset: 16px -16px -16px 16px; background: var(--ink); opacity: .9; }
.framed img { position: relative; width: 100%; aspect-ratio: 3/2; object-fit: cover; }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.g-item { overflow: hidden; }
.g-item img { width: 100%; aspect-ratio: 1; object-fit: cover; cursor: zoom-in; transition: transform .4s, opacity .25s; }
.g-item:hover img { transform: scale(1.03); opacity: .9; }

/* team — circular portraits */
.team { display: flex; justify-content: center; gap: clamp(48px, 10vw, 160px); flex-wrap: wrap; }
.member { margin: 0; text-align: center; width: 240px; }
.member img { width: 240px; height: 240px; border-radius: 50%; object-fit: cover; }
.member figcaption { margin-top: 22px; display: flex; flex-direction: column; gap: 4px; }
.member strong { font-weight: 400; font-size: 17px; letter-spacing: .12em; color: var(--muted); }
.member span { color: var(--grey); font-size: 13px; letter-spacing: .08em; }

/* contact */
.contact { padding-bottom: 120px; text-align: center; }
.contact-text { color: var(--muted); margin: -24px 0 40px; }
.contact-list { display: grid; grid-template-columns: repeat(3, minmax(0, 300px)); justify-content: center; gap: var(--gutter); }
.contact-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none;
  background: var(--panel); padding: 36px 20px; border: 1px solid var(--line); transition: border-color .2s;
}
.contact-item:hover { border-color: var(--grey); }
.contact-item svg { width: 28px; height: 28px; color: var(--ink); margin-bottom: 6px; }
.c-label { font-size: 12px; letter-spacing: .2em; color: var(--grey); text-transform: uppercase; }
.c-value { font-size: 16px; letter-spacing: .04em; word-break: break-all; }

.site-footer {
  background: var(--header); text-align: center; color: var(--grey);
  font-size: 13px; letter-spacing: .08em; padding: 32px 16px;
}

/* lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.95); display: flex; align-items: center; justify-content: center; z-index: 10; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 92vw; max-height: 88vh; object-fit: contain; }
.lightbox button { position: absolute; background: none; border: 0; color: var(--ink); font-size: 40px; cursor: pointer; padding: 12px 18px; line-height: 1; }
.lb-close { top: 8px; right: 8px; }
.lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 4px; top: 50%; transform: translateY(-50%); }

@media (max-width: 860px) {
  .site-header { padding-top: 32px; }
  .brand img { width: 72px; }
  .topnav { justify-content: flex-start; padding-left: var(--gutter); }
  .topnav-links { gap: 18px; font-size: 13px; letter-spacing: .08em; }
  .hero { grid-template-columns: 1fr; margin-top: 32px; min-height: 0; }
  .hero-img { aspect-ratio: 4/3; }
  .hero-text { padding: 32px 24px 40px; }
  .block { padding-top: 80px; }
  .project { padding-top: 80px; }
  .grid { grid-template-columns: 1fr; gap: 40px; }
  .project-intro { grid-template-columns: 1fr; gap: 36px; }
  .project.flip .project-text { order: 0; }
  .project-text { padding: 0; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .member, .member img { width: 200px; }
  .member img { height: 200px; }
  .contact-list { grid-template-columns: 1fr; }
}
