:root{
    --ink:#10171e;
    --ink-2:#18212a;
    --muted:#68727d;
    --paper:#f4f3ef;
    --paper-2:#ebe9e3;
    --white:#ffffff;
    --brand:#b58a58;
    --brand-deep:#8f673a;
    --line:rgba(16,23,30,.12);
    --radius:0;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{font-family:"Noto Sans TC","PingFang TC","Microsoft JhengHei",Arial,sans-serif;color:var(--ink);background:#fff;line-height:1.7}
a{color:inherit}
img{max-width:100%;display:block}
.min-vh-75{min-height:75vh}
.site-nav{background:linear-gradient(180deg,rgba(7,12,17,.94),rgba(7,12,17,.52),transparent);padding:1.15rem 0;transition:.2s ease}
.site-nav .nav-link{color:rgba(255,255,255,.78);font-size:.95rem;padding:.6rem .85rem!important}
.site-nav .nav-link:hover{color:#fff}
.navbar-brand{font-weight:700;letter-spacing:.08em}
.site-logo{height:38px;width:auto;max-width:210px;object-fit:contain}
.hero{min-height:92vh;padding:8rem 0 4rem;color:#fff;background:#141b22;position:relative;overflow:hidden;background-size:cover;background-position:center}
.hero-media{position:absolute;inset:0;z-index:0}
.hero-media:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(8,14,20,.86),rgba(8,14,20,.45))}
.hero-media img{width:100%;height:100%;object-fit:cover}
.hero:before{content:"";position:absolute;inset:0;background-image:linear-gradient(rgba(255,255,255,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.035) 1px,transparent 1px);background-size:48px 48px;mask-image:linear-gradient(to bottom,rgba(0,0,0,.8),transparent)}
.hero:after{content:"";position:absolute;width:56vw;height:56vw;border:1px solid rgba(255,255,255,.08);right:-18vw;bottom:-28vw;transform:rotate(18deg)}
.hero-content{z-index:2}
.hero-kicker{font-size:.84rem;letter-spacing:.12em;color:rgba(255,255,255,.68)}
.hero h1{font-size:clamp(2.65rem,6vw,6.2rem);line-height:1.05;letter-spacing:-.045em;font-weight:700;max-width:1100px}
.hero .lead{max-width:800px;color:rgba(255,255,255,.75);font-size:clamp(1.05rem,1.55vw,1.32rem);line-height:1.9}
.btn-brand{background:var(--brand);border-color:var(--brand);color:#101419;font-weight:700}
.btn-brand:hover{background:#c49a67;border-color:#c49a67;color:#101419}
.section-space{padding:7.5rem 0}
.section-muted{background:var(--paper)}
.section-dark{background:#10171e}
.section-label{font-size:.78rem;letter-spacing:.18em;font-weight:700;color:var(--brand-deep);margin-bottom:.9rem}
.section-label.light{color:#d4b48e}
.display-title{font-size:clamp(2.1rem,4.2vw,4.8rem);letter-spacing:-.045em;line-height:1.08;margin:0}
.section-lead{font-size:clamp(1.08rem,1.6vw,1.35rem);line-height:1.9;color:#2d3640}
.about-points{display:grid;gap:1rem}
.about-points>div{display:grid;grid-template-columns:120px 1fr;gap:1.5rem;padding:1rem 0;border-top:1px solid var(--line)}
.about-points strong{font-weight:700}
.about-points span{color:var(--muted)}
.expertise-item{background:#fff;border-top:2px solid var(--ink);padding:2rem 1.6rem;min-height:300px;display:flex;flex-direction:column;transition:transform .2s ease,box-shadow .2s ease}
.expertise-item:hover{transform:translateY(-4px);box-shadow:0 16px 34px rgba(16,23,30,.07)}
.expertise-index{color:var(--brand-deep);font-weight:700;font-size:.9rem;margin-bottom:auto}
.expertise-item h3{font-size:1.6rem;margin:4rem 0 .7rem}
.expertise-item p{color:var(--muted);margin:0}
.project-visual{aspect-ratio:4/3;background:#192129;position:relative;overflow:hidden}
.project-grid{position:absolute;inset:0;background-image:linear-gradient(rgba(255,255,255,.055) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.055) 1px,transparent 1px);background-size:56px 56px}
.project-visual:after{content:"工程";position:absolute;right:5%;top:5%;color:rgba(255,255,255,.06);font-size:clamp(5rem,13vw,11rem);font-weight:700;writing-mode:vertical-rl}
.project-label{position:absolute;left:2rem;bottom:2rem;color:#fff;font-size:1.25rem}
.project-label small{opacity:.56}
.project-cover{width:100%;aspect-ratio:4/3;object-fit:cover}
.fs-project{font-size:clamp(2rem,3.5vw,3.9rem)}
.project-meta{margin:2rem 0 2.4rem}
.project-meta>div{display:grid;grid-template-columns:100px 1fr;border-top:1px solid var(--line);padding:.85rem 0}
.project-meta dt{font-size:.8rem;color:var(--muted);font-weight:600}
.project-meta dd{margin:0;font-weight:600}
.project-meta.detail>div{grid-template-columns:90px 1fr}
.text-link{font-weight:700;color:var(--ink);text-decoration:none;border-bottom:1px solid var(--ink);padding-bottom:.2rem}
.experience-card{background:#fff;border:1px solid var(--line);padding:2rem;position:relative}
.experience-card h3,.experience-card h2{line-height:1.35}
.experience-card p{color:var(--muted);line-height:1.85}
.experience-role{font-weight:700;margin-bottom:.7rem}
.experience-disclaimer{margin-top:1.5rem;padding-top:1rem;border-top:1px solid var(--line);font-size:.82rem;color:#7d6a53;line-height:1.7}
.experience-image{width:calc(100% + 4rem);margin:-2rem -2rem 1.5rem;aspect-ratio:16/10;object-fit:cover}
.experience-notice{padding:1rem 1.25rem;border-left:3px solid var(--brand);background:#f8f4ee;color:#6b5842}
.approach-list>div{display:grid;grid-template-columns:50px minmax(150px,220px) 1fr;gap:1rem;align-items:center;border-bottom:1px solid rgba(255,255,255,.14);padding:1.5rem 0;color:#fff}
.approach-list span{color:#d4b48e;font-size:.8rem}
.approach-list strong{font-size:1.15rem}
.approach-list small{color:rgba(255,255,255,.58);font-size:.96rem}
.team-card{border:1px solid var(--line);background:#fff}
.team-card img,.team-placeholder{width:100%;aspect-ratio:4/3;object-fit:cover}
.team-placeholder{display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#f5f4f0,#e7e5df);color:var(--muted)}
.news-card{background:#fff;border-top:2px solid var(--ink);padding:2rem;position:relative}
.news-card p{color:var(--muted)}
.news-cover{width:calc(100% + 4rem);margin:-2rem -2rem 1.5rem;aspect-ratio:16/9;object-fit:cover}
.contact-section{background:var(--paper-2)}
.contact-card{background:#fff;padding:2rem}
.contact-card>div,.contact-info-list>div{display:flex;flex-direction:column;border-bottom:1px solid var(--line);padding:1rem 0}
.contact-card>div:last-child,.contact-info-list>div:last-child{border-bottom:0}
.contact-card small,.contact-info-list small{color:var(--muted);letter-spacing:.08em;margin-bottom:.25rem}
.contact-form{background:#fff;border:1px solid var(--line);padding:2rem}
.site-footer{background:#0b1015;color:#fff}
.footer-brand{font-size:1.3rem;font-weight:700;margin-bottom:.5rem}
.public-flash{position:fixed;top:88px;left:50%;transform:translateX(-50%);z-index:1040;max-width:720px}
.page-hero{padding:11rem 0 5rem;background:#111820;color:#fff}
.page-hero h1{font-size:clamp(2.5rem,5vw,5rem);letter-spacing:-.04em;line-height:1.08;max-width:1000px}
.page-hero p{max-width:820px;font-size:1.15rem;line-height:1.9;color:rgba(255,255,255,.68);margin:1.4rem 0 0}
.project-card{border:1px solid var(--line);background:#fff}
.project-card>img,.project-card-placeholder{width:100%;aspect-ratio:16/10;object-fit:cover}
.project-card-placeholder{background:linear-gradient(135deg,#1a222b,#2a3540)}
.empty-state{padding:4rem;border:1px dashed rgba(16,23,30,.25);background:#fafafa;text-align:center;color:var(--muted)}
.project-detail-meta{display:flex;flex-wrap:wrap;gap:.75rem 1.4rem;color:rgba(255,255,255,.68);margin-top:1.5rem}
.project-detail-cover{max-width:1440px;margin:0 auto}
.project-detail-cover img{width:100%;max-height:760px;object-fit:cover}
.case-section{padding:4.5rem 0;border-top:1px solid var(--line)}
.case-copy{font-size:1.12rem;line-height:2;color:#38424c}
.case-image img{width:100%;aspect-ratio:4/3;object-fit:cover}
.case-image figcaption{font-size:.88rem;color:var(--muted);padding:.6rem 0}
.article-cover{max-width:1200px;margin:0 auto}
.article-cover img{width:100%;max-height:680px;object-fit:cover}
.article-body{max-width:840px;margin:0 auto;font-size:1.12rem;line-height:2;color:#303a44}
.map-embed iframe{display:block;width:100%!important;min-height:420px;border:0}
.hp-field{position:absolute!important;left:-10000px!important;width:1px!important;height:1px!important;overflow:hidden!important}

/* Admin */
.admin-login{background:#eef0f2}
.login-card{width:min(100%,460px);background:#fff;padding:2rem;border:1px solid #d9dde1;box-shadow:0 14px 38px rgba(0,0,0,.08)}
.admin-body{background:#f5f6f7}
.admin-sidebar{min-height:calc(100vh - 56px);background:#fff;border-right:1px solid #e1e4e7;display:flex;flex-direction:column;gap:.2rem;position:sticky;top:56px;height:calc(100vh - 56px);overflow:auto}
.admin-sidebar a{padding:.72rem .85rem;text-decoration:none;color:#25303b;border-radius:.35rem;font-size:.94rem}
.admin-sidebar a:hover,.admin-sidebar a.active{background:#eceff1;color:#111820;font-weight:700}
.admin-stat{background:#fff;border:1px solid #e1e4e7;padding:1.5rem;display:flex;flex-direction:column;gap:.45rem;min-height:150px}
.admin-stat small{color:#727b85}
.admin-stat strong{font-size:2rem}
.admin-stat span{color:#727b85}
.admin-panel,.admin-form,.settings-form{background:#fff;border:1px solid #e1e4e7;padding:1.5rem}
.admin-form,.settings-form{max-width:1080px}
.admin-thumb{max-height:80px;max-width:180px;object-fit:contain;border:1px solid #ddd;padding:.25rem;background:#fff}
.admin-preview{max-width:260px;max-height:180px;object-fit:cover;border:1px solid #ddd}
.admin-avatar{width:52px;height:52px;object-fit:cover;border-radius:50%;background:#eef0f2}
.admin-project-thumb{width:92px;height:62px;object-fit:cover;background:#eef0f2}
.gallery-admin-image{width:100%;aspect-ratio:4/3;object-fit:cover}
.media-card{background:#fff;border:1px solid #e1e4e7;height:100%}
.media-card img{width:100%;aspect-ratio:1/1;object-fit:cover}
.message-meta>div{display:grid;grid-template-columns:130px 1fr;padding:.7rem 0;border-bottom:1px solid #eceff1}
.message-meta dt{color:#6f7881;font-weight:600}
.message-meta dd{margin:0}
.message-body{white-space:normal;line-height:1.9;color:#303a44}
.table>thead th{white-space:nowrap;color:#606a74;font-size:.86rem;font-weight:700}
.form-label{font-weight:600}

@media(max-width:991.98px){
    .site-nav{background:#10171e}
    .section-space{padding:5rem 0}
    .approach-list>div{grid-template-columns:40px 1fr}
    .approach-list small{grid-column:2}
    .admin-sidebar{min-height:auto;height:auto;position:static;border-right:0;border-bottom:1px solid #e1e4e7}
    .page-hero{padding:9rem 0 4rem}
    .about-points>div{grid-template-columns:1fr;gap:.2rem}
}
@media(max-width:767.98px){
    .hero{min-height:86vh;padding:8rem 0 3rem}
    .hero h1{font-size:clamp(2.45rem,12vw,4rem)}
    .expertise-item{min-height:240px}
    .expertise-item h3{margin-top:2.5rem}
    .project-label{left:1.25rem;bottom:1.25rem}
    .contact-form,.contact-card,.admin-form,.settings-form,.admin-panel{padding:1.2rem}
    .page-hero h1{font-size:2.7rem}
    .message-meta>div{grid-template-columns:1fr;gap:.2rem}
}
@media(max-width:575.98px){
    .section-space{padding:4rem 0}
    .display-title{font-size:2.35rem}
    .hero-kicker{font-size:.76rem;line-height:1.8}
    .experience-card{padding:1.35rem}
    .experience-image{width:calc(100% + 2.7rem);margin:-1.35rem -1.35rem 1.3rem}
    .news-card{padding:1.35rem}
    .news-cover{width:calc(100% + 2.7rem);margin:-1.35rem -1.35rem 1.3rem}
    .page-hero{padding:8rem 0 3.5rem}
    .page-hero h1{font-size:2.35rem}
}

/* Homepage visitor counter */
.visitor-counter{
    position:fixed;
    left:1rem;
    bottom:max(1rem,env(safe-area-inset-bottom));
    z-index:1030;
    pointer-events:none;
    display:flex;
    align-items:center;
    gap:.65rem;
    padding:.58rem .78rem;
    background:rgba(11,16,21,.84);
    color:#fff;
    border:1px solid rgba(255,255,255,.16);
    backdrop-filter:blur(8px);
    box-shadow:0 8px 24px rgba(0,0,0,.18);
    font-size:.76rem;
    letter-spacing:.06em;
}
.visitor-counter span{color:rgba(255,255,255,.7)}
.visitor-counter strong{font-size:.9rem;letter-spacing:.04em}
@media(max-width:575.98px){
    .visitor-counter{left:.65rem;bottom:max(.65rem,env(safe-area-inset-bottom));padding:.48rem .62rem;font-size:.7rem;gap:.5rem}
    .visitor-counter strong{font-size:.82rem}
}
