@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@500;700&family=Noto+Sans+TC:wght@400;500;600;700;800&display=swap');

:root { --paper:#f8f3e9; --green:#69c596; --line:rgba(255,255,255,.32); }
* { box-sizing:border-box; }
html, body { height:100%; }
body { min-width:320px; margin:0; color:var(--paper); background:#121816; font-family:"Noto Sans TC",sans-serif; }
a { color:inherit; }

.landing { position:relative; isolation:isolate; display:grid; grid-template-rows:auto 1fr auto; width:100%; height:100svh; min-height:570px; overflow:hidden; padding:clamp(1rem,2.7vw,2.5rem); }
.background-photo, .photo-shade { position:absolute; z-index:-2; inset:0; }
.background-photo { background:#161914 url('/assets/teacher-maker-studio.png') center 12% / 94% auto no-repeat; }
.photo-shade { z-index:-1; background:linear-gradient(90deg,rgba(5,12,11,.84) 0%,rgba(7,13,12,.6) 35%,rgba(7,13,12,.12) 66%,rgba(0,0,0,.24) 100%),linear-gradient(0deg,rgba(4,11,10,.82) 0%,transparent 42%); }

header { display:flex; align-items:center; justify-content:space-between; gap:1rem; font:700 clamp(.57rem,.75vw,.72rem)/1 "JetBrains Mono",monospace; letter-spacing:.1em; }
.brand { display:inline-flex; align-items:center; gap:.55rem; text-decoration:none; }
.brand span { display:grid; width:2rem; height:2rem; place-items:center; border:1px solid var(--green); color:var(--green); font-size:1rem; }
.brand:hover { color:var(--green); }
header p { display:flex; align-items:center; gap:.45rem; margin:0; color:#d5e4d9; }
header p i { width:.45rem; height:.45rem; border-radius:50%; background:var(--green); box-shadow:0 0 .8rem var(--green); }

.intro { align-self:center; max-width:33rem; padding-top:clamp(1rem,6vh,5rem); }
.eyebrow { margin:0 0 1rem; color:#bae9d0; font:700 clamp(.62rem,.85vw,.76rem)/1.5 "JetBrains Mono",monospace; letter-spacing:.1em; }
h1 { margin:0 0 1.1rem; font-size:clamp(3rem,7vw,6.8rem); letter-spacing:-.08em; line-height:.9; text-shadow:0 4px 18px rgba(0,0,0,.22); }
h1 em { color:var(--green); font-style:normal; }
.intro > p:last-child { max-width:none; margin:0; color:#eff0e9; font-size:clamp(.95rem,1.15vw,1.1rem); line-height:1.85; text-shadow:0 2px 8px rgba(0,0,0,.32); white-space:nowrap; }

.project-panel { width:min(100%,1090px); align-self:end; border:1px solid var(--line); background:rgba(6,16,14,.69); box-shadow:0 .9rem 2.5rem rgba(0,0,0,.24); backdrop-filter:blur(11px); }
.panel-title { display:flex; align-items:center; gap:1.2rem; min-height:2.1rem; padding:0 .8rem; border-bottom:1px solid rgba(255,255,255,.23); color:#d7e9dd; font:700 clamp(.55rem,.7vw,.67rem)/1 "JetBrains Mono",monospace; letter-spacing:.08em; }
.panel-title span:nth-child(2) { color:var(--green); }
.panel-title small { margin-left:auto; color:#9cb6a6; font:500 inherit; }
.project-grid { display:grid; grid-template-columns:repeat(3,1fr); }
.project-grid a { display:flex; align-items:center; gap:.55rem; min-width:0; min-height:3.25rem; padding:.55rem .7rem; border-right:1px solid rgba(255,255,255,.17); text-decoration:none; transition:background .18s ease,color .18s ease; }
.project-grid a:nth-child(3n) { border-right:0; }
.project-grid a:nth-child(-n+3) { border-bottom:1px solid rgba(255,255,255,.17); }
.project-grid a:hover, .project-grid a:focus-visible { color:var(--green); background:rgba(105,197,150,.14); outline:none; }
.project-grid b { color:var(--green); font:700 .62rem/1 "JetBrains Mono",monospace; }
.project-grid span { min-width:0; flex:1; overflow:hidden; font-size:clamp(.69rem,.85vw,.82rem); font-weight:700; line-height:1.35; text-overflow:ellipsis; white-space:nowrap; }
.project-grid small { display:block; overflow:hidden; color:#b6c9bc; font:500 clamp(.48rem,.61vw,.59rem)/1.4 "JetBrains Mono",monospace; text-overflow:ellipsis; white-space:nowrap; }
.project-grid i { color:#dcece1; font-size:.85rem; font-style:normal; }

@media (max-width:740px) {
  .landing { min-height:540px; padding:1rem; }
  .background-photo { background-position:52% 40%; background-size:cover; }
  .photo-shade { background:linear-gradient(90deg,rgba(4,12,10,.72),rgba(4,12,10,.2)),linear-gradient(0deg,rgba(3,10,9,.89) 0%,rgba(3,10,9,.12) 63%); }
  header p { font-size:.52rem; }
  .brand { font-size:.72rem; }
  .brand span { width:1.7rem; height:1.7rem; }
  .intro { align-self:start; padding-top:clamp(2.4rem,8vh,4.4rem); }
  .eyebrow { margin-bottom:.65rem; font-size:.56rem; }
  h1 { margin-bottom:.7rem; font-size:clamp(2.7rem,13vw,4.2rem); }
  .intro > p:last-child { max-width:16rem; font-size:.84rem; line-height:1.65; white-space:normal; }
  .panel-title { gap:.65rem; min-height:1.85rem; padding:0 .55rem; font-size:.5rem; }
  .panel-title small { display:none; }
  .project-grid { grid-template-columns:1fr; }
  .project-grid a { min-height:2.1rem; gap:.4rem; padding:.26rem .45rem; border-right:0; border-bottom:1px solid rgba(255,255,255,.17); }
  .project-grid a:nth-child(3n) { border-right:0; }
  .project-grid a:nth-child(-n+3) { border-bottom:1px solid rgba(255,255,255,.17); }
  .project-grid a:last-child { border-bottom:0; }
  .project-grid b { font-size:.5rem; }
  .project-grid span { font-size:.61rem; }
  .project-grid small { font-size:.42rem; }
  .project-grid i { font-size:.7rem; }
}

@media (max-height:630px) and (min-width:741px) {
  .landing { min-height:0; padding:1rem 2rem; }
  .intro { padding-top:1rem; }
  .eyebrow { margin-bottom:.5rem; }
  h1 { margin-bottom:.55rem; font-size:clamp(3rem,6vw,4.7rem); }
  .intro > p:last-child { font-size:.9rem; }
  .project-grid a { min-height:2.7rem; }
  .panel-title { min-height:1.9rem; }
}

@media (prefers-reduced-motion:reduce) {
  * { scroll-behavior:auto!important; transition:none!important; }
}
