:root {
  --ink: #0c1525;
  --muted: #687284;
  --paper: #f4f1ea;
  --line: rgba(12, 21, 37, .16);
  --blue: #2e5bff;
  --lime: #c9ff5a;
  --white: #ffffff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "Noto Sans TC", sans-serif; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
.shell { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }
.noise { position: fixed; inset: 0; pointer-events: none; opacity: .04; z-index: 20; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E"); }

.nav-wrap { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line); background: rgba(244, 241, 234, .88); backdrop-filter: blur(18px); }
.nav { min-height: 72px; display: flex; align-items: center; justify-content: space-between; }
.brand { font: 500 12px "IBM Plex Mono", monospace; letter-spacing: .08em; }
.brand span { display: inline-grid; width: 34px; height: 34px; margin-right: 9px; place-items: center; color: white; background: var(--ink); border-radius: 50%; }
.nav-links { display: flex; gap: 32px; font-size: 14px; }
.nav-links a { position: relative; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -7px; height: 2px; background: var(--blue); transition: right .25s; }
.nav-links a:hover::after, .nav-links a:focus-visible::after { right: 0; }

.hero { min-height: calc(100vh - 72px); padding: 86px 0 70px; display: grid; grid-template-columns: 1.35fr .65fr; gap: 72px; align-items: center; }
.eyebrow, .section-index, .project-meta, .panel-top { font: 500 11px "IBM Plex Mono", monospace; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow { display: flex; align-items: center; gap: 10px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 5px rgba(46,91,255,.12); }
h1 { max-width: 760px; margin: 27px 0 30px; font-size: clamp(52px, 7.5vw, 104px); line-height: .95; letter-spacing: -.075em; }
h1 em { color: var(--blue); font-style: normal; }
.intro { max-width: 620px; color: #4f5a6c; font-size: 17px; line-height: 1.9; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 38px; }
.button { display: inline-flex; min-height: 50px; padding: 0 22px; align-items: center; justify-content: center; gap: 20px; border: 1px solid var(--ink); font-size: 14px; font-weight: 600; transition: transform .2s, box-shadow .2s; }
.button.primary { color: white; background: var(--ink); }
.button.ghost { background: transparent; }
.button:hover { transform: translateY(-3px); box-shadow: 5px 5px 0 var(--lime); }

.hero-panel { min-height: 530px; padding: 24px; color: white; background: var(--ink); display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.panel-top { display: flex; justify-content: space-between; color: #96a0b0; }
.radar { width: 280px; aspect-ratio: 1; margin: 5px auto; position: relative; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; display: grid; place-items: center; background: repeating-radial-gradient(circle, transparent 0 30px, rgba(255,255,255,.045) 31px 32px); }
.orbit { position: absolute; border: 1px solid rgba(201,255,90,.28); border-radius: 50%; }
.orbit.one { inset: 24px; }.orbit.two { inset: 60px; }.orbit.three { inset: 98px; }
.radar-line { position: absolute; width: 50%; height: 1px; left: 50%; top: 50%; transform-origin: left center; background: linear-gradient(90deg, var(--lime), transparent); animation: scan 4s linear infinite; }
.radar-core { width: 62px; height: 62px; display: grid; place-items: center; color: var(--ink); background: var(--lime); border-radius: 50%; font: 600 19px "IBM Plex Mono", monospace; z-index: 2; }
@keyframes scan { to { transform: rotate(360deg); } }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(255,255,255,.18); }
.metrics div { padding: 22px 8px 0; border-right: 1px solid rgba(255,255,255,.18); }
.metrics div:last-child { border: 0; }
.metrics strong, .metrics span { display: block; }.metrics strong { font: 500 26px "IBM Plex Mono", monospace; }.metrics span { margin-top: 5px; color: #9aa4b5; font-size: 11px; }

.section { padding: 120px 0; }
.section-heading { padding-bottom: 38px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: end; gap: 30px; }
.section-heading h2, .about h2 { margin: 10px 0 0; font-size: clamp(38px, 5vw, 68px); letter-spacing: -.055em; line-height: 1.05; }
.section-heading > p { max-width: 350px; margin: 0 0 8px; color: var(--muted); line-height: 1.7; }
.section-index { color: var(--blue); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 28px 0; }
.filter { padding: 9px 17px; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font: inherit; font-size: 13px; }
.filter.active, .filter:hover { color: white; background: var(--ink); border-color: var(--ink); }
.project-grid { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.project-card { min-height: 410px; padding: 30px; position: relative; display: flex; flex-direction: column; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background .25s, color .25s; }
.project-card.feature { grid-column: 1 / -1; min-height: 390px; }
.project-card:hover { color: white; background: var(--blue); }
.project-number { color: var(--muted); font: 400 12px "IBM Plex Mono", monospace; }
.project-card:hover .project-number, .project-card:hover .project-meta { color: rgba(255,255,255,.65); }
.project-content { margin-top: auto; max-width: 770px; }
.project-meta { display: flex; gap: 20px; color: var(--blue); }
.project-card h3 { max-width: 760px; margin: 14px 0; font-size: clamp(26px, 3vw, 42px); letter-spacing: -.035em; }
.project-card p { max-width: 720px; color: var(--muted); line-height: 1.8; }
.project-card:hover p { color: rgba(255,255,255,.74); }
.tags { padding: 0; margin: 25px 0 0; display: flex; flex-wrap: wrap; gap: 7px; list-style: none; }
.tags li { padding: 6px 10px; border: 1px solid var(--line); border-radius: 3px; font: 400 10px "IBM Plex Mono", monospace; }
.project-card:hover .tags li { border-color: rgba(255,255,255,.35); }
.project-open { width: 42px; height: 42px; position: absolute; top: 24px; right: 24px; border: 1px solid var(--line); background: transparent; border-radius: 50%; cursor: pointer; font-size: 18px; color: inherit; }
.project-card:hover .project-open { background: var(--lime); color: var(--ink); border-color: var(--lime); }
.project-card.hidden { display: none; }

.skills-section { color: white; background: var(--ink); }
.section-heading.light { border-color: rgba(255,255,255,.17); }
.section-heading.light > p { color: #9ca6b6; }
.skill-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 55px; }
.skill-column { min-height: 290px; padding: 28px; border: 1px solid rgba(255,255,255,.16); border-right: 0; }
.skill-column:last-child { border-right: 1px solid rgba(255,255,255,.16); }
.skill-no { color: var(--lime); font: 500 12px "IBM Plex Mono", monospace; }
.skill-column h3 { margin: 75px 0 20px; font-size: 24px; }
.skill-column p { color: #9fa9b9; line-height: 2; font: 400 13px "IBM Plex Mono", monospace; }

.about { display: grid; grid-template-columns: .45fr 1fr; gap: 80px; align-items: start; }
.about-mark { width: min(100%, 360px); aspect-ratio: 1; display: grid; place-items: center; color: var(--paper); background: var(--blue); font: 600 clamp(70px, 12vw, 150px) "IBM Plex Mono", monospace; border-radius: 50%; }
.about-copy { padding-top: 30px; }
.about-copy > p:last-child { max-width: 700px; margin-top: 38px; color: var(--muted); font-size: 17px; line-height: 2; }
footer { border-top: 1px solid var(--line); }
.footer-inner { min-height: 100px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font: 400 11px "IBM Plex Mono", monospace; }

.project-dialog { width: min(680px, calc(100% - 32px)); padding: 44px; color: var(--ink); background: var(--paper); border: 0; box-shadow: 0 24px 100px rgba(0,0,0,.35); }
.project-dialog::backdrop { background: rgba(5,10,18,.75); backdrop-filter: blur(6px); }
.dialog-close { width: 40px; height: 40px; position: absolute; right: 18px; top: 18px; border: 1px solid var(--line); border-radius: 50%; background: transparent; cursor: pointer; font-size: 24px; }
.dialog-kicker { color: var(--blue); font: 500 11px "IBM Plex Mono", monospace; letter-spacing: .12em; }
.project-dialog h2 { max-width: 560px; margin: 18px 0 28px; font-size: 34px; letter-spacing: -.04em; }
.dialog-body { color: var(--muted); line-height: 1.9; }
.dialog-body strong { color: var(--ink); }
.dialog-body ul { padding-left: 20px; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 850px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 60px; }
  .hero-panel { min-height: 460px; }
  .project-grid, .skill-grid { grid-template-columns: 1fr; }
  .project-card.feature { grid-column: auto; }
  .skill-column { border-right: 1px solid rgba(255,255,255,.16); border-bottom: 0; }
  .skill-column:last-child { border-bottom: 1px solid rgba(255,255,255,.16); }
  .about { grid-template-columns: 1fr; }
  .about-mark { max-width: 280px; }
}
@media (max-width: 580px) {
  .shell { width: min(100% - 28px, 1180px); }
  .nav { min-height: 64px; }.nav-links { gap: 14px; font-size: 12px; }.brand { font-size: 0; }.brand span { margin: 0; font-size: 12px; }
  .hero { min-height: auto; padding: 50px 0 70px; }
  h1 { font-size: 51px; }
  .hero-panel { min-height: 430px; padding: 18px; }.radar { width: 230px; }
  .section { padding: 80px 0; }.section-heading { align-items: start; flex-direction: column; }.section-heading > p { font-size: 14px; }
  .project-card { min-height: 440px; padding: 22px; }.project-meta { gap: 10px; flex-direction: column; }.project-open { top: 18px; right: 18px; }
  .about { gap: 35px; }.about-mark { max-width: 220px; }.project-dialog { padding: 34px 24px; }
  .footer-inner { align-items: flex-start; justify-content: center; flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
