:root {
  --bg: #0a0a0f;
  --bg2: #111118;
  --bg3: #1a1a24;
  --accent: #00ff88;
  --text: #ffffff;
  --muted: #a8ffcc;
  --border: rgba(255,255,255,0.08);
  --mono: 'Space Mono', monospace;
  --sans: 'Noto Sans TC', sans-serif;
  --nav-h: 64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  zoom: 1.3;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  overflow-x: hidden;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 3rem;
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

.nav-logo {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--accent);
  letter-spacing: 0.05em;
  cursor: pointer;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.2s;
  cursor: pointer;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

/* ── SECTIONS ── */
section {
  min-height: 100vh;
  padding: calc(var(--nav-h) + 4rem) 3rem 5rem;
  position: relative;
}

/* ── HOME ── */
#home {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding-top: var(--nav-h);
  overflow: hidden;
}

.home-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 100%);
  pointer-events: none;
}

.home-glow {
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,255,136,0.08) 0%, transparent 70%);
  top: 50%; left: 30%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.home-content {
  position: relative;
  max-width: 800px;
  animation: fadeUp 0.8s ease both;
}

.home-tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.home-tag::before {
  content: '';
  display: block;
  width: 32px; height: 1px;
  background: var(--accent);
}

.home-name {
  font-family: var(--mono);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.home-name .highlight {
  color: transparent;
  -webkit-text-stroke: 1px var(--accent);
}

.home-desc {
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: 2.5rem;
}

.home-btns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ── BUTTONS ── */
.btn {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.85rem 2rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #000;
  font-weight: 700;
}

.btn-primary:hover {
  background: #00cc6e;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,255,136,0.25);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn-full { width: 100%; }

/* ── SCROLL HINT ── */
.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  cursor: pointer;
  animation: bounce 2s ease infinite;
  transition: color 0.2s;
}

.scroll-hint:hover { color: var(--accent); }

.scroll-hint::after {
  content: '';
  display: block;
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--muted), transparent);
}

/* ── SECTION SHARED ── */
.section-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.section-num {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.15em;
}

.section-title {
  font-family: var(--mono);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-line {
  flex: 1;
  height: 1px;
  background: var(--border);
  max-width: 200px;
}

/* ── ABOUT ── */
#about { background: var(--bg2); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  max-width: 1100px;
  margin-bottom: 4rem;
}

.about-text p {
  font-size: 1rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.9;
  margin-bottom: 1.2rem;
}

.about-text p span { color: var(--text); }

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-content: start;
}

.stat-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  transition: border-color 0.2s;
}

.stat-card:hover { border-color: rgba(0,255,136,0.3); }

.stat-num {
  font-family: var(--mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}

/* ── SKILLS ── */
.skills-section { max-width: 1100px; }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.skill-group {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
}

.skill-group-title {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.skill-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.skill-tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 0.35rem 0.75rem;
  border-radius: 3px;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  letter-spacing: 0.05em;
  transition: all 0.2s;
}

.skill-tag:hover { border-color: var(--accent); color: var(--accent); }

/* ── PROJECTS ── */
#projects { background: var(--bg); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  max-width: 1100px;
}

.project-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,255,136,0.05) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}

.project-card:hover {
  border-color: rgba(0,255,136,0.35);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

.project-card:hover::before { opacity: 1; }

.project-card--empty {
  border-style: dashed;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 220px;
  cursor: default;
}

.project-card--empty:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--border);
}

.project-card-plus {
  font-family: var(--mono);
  font-size: 2rem;
  color: var(--border);
  margin-bottom: 1rem;
}

.project-card-more {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.1em;
}

.project-num {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 0.2em;
  margin-bottom: 1rem;
}

.project-name {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.project-desc {
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.stack-tag {
  font-family: var(--mono);
  font-size: 0.65rem;
  padding: 0.25rem 0.6rem;
  border-radius: 2px;
  background: rgba(0,255,136,0.08);
  color: var(--accent);
  border: 1px solid rgba(0,255,136,0.2);
  letter-spacing: 0.05em;
}

.project-link {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.1em;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s;
}

.project-link::after { content: '→'; transition: transform 0.2s; }
.project-link:hover { color: var(--accent); }
.project-link:hover::after { transform: translateX(4px); }

/* ── CONTACT ── */
#contact {
  background: var(--bg2);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.contact-inner { max-width: 600px; width: 100%; }

.contact-header {
  justify-content: center;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.contact-email {
  font-family: var(--mono);
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  display: block;
  margin: 2rem 0;
  transition: opacity 0.2s;
}

.contact-email:hover { opacity: 0.7; }

.contact-desc {
  font-size: 1rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 3rem;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.social-link {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: all 0.2s;
}

.social-link:hover {
  color: var(--accent);
  border-color: rgba(0,255,136,0.4);
  transform: translateY(-2px);
}

.contact-form {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  margin-top: 2.5rem;
  text-align: left;
}

.form-group { margin-bottom: 1.2rem; }

.form-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.form-input,
.form-textarea {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.75rem 1rem;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-input:focus,
.form-textarea:focus { border-color: rgba(0,255,136,0.4); }

.form-textarea { min-height: 100px; resize: vertical; }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── FOOTER ── */
footer {
  text-align: center;
  padding: 2rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

/* ── MOBILE ── */
@media (max-width: 768px) {
  nav { padding: 0 1.5rem; }
  .nav-links { gap: 0.5rem; }
  .nav-links a { font-size: 0.68rem; }
  section { padding-left: 1.5rem; padding-right: 1.5rem; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .home-name { font-size: 2.8rem; }
}

/* ── HOME LAYOUT ── */
.home-layout {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1100px;
  gap: 4rem;
}

/* ── AVATAR ── */
.avatar-wrap {
  position: relative;
  width: 260px;
  height: 260px;
  flex-shrink: 0;
}

.avatar-box {
  width: 200px;
  height: 200px;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid rgba(0,255,136,0.3);
  background: #111118;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 40px rgba(0,255,136,0.1), inset 0 0 20px rgba(0,255,136,0.04);
}

.avatar-svg { width: 100%; height: 100%; }

.avatar-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.avatar-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px dashed rgba(0,255,136,0.2);
  animation: spin 20s linear infinite;
}

/* ── 漂浮像素 ── */
.pixel {
  position: absolute;
  border-radius: 2px;
  animation: float linear infinite;
}

.p1 { width:8px;  height:8px;  background:#00ff88; opacity:.9; top:10%;  left:5%;   animation-duration:3.2s; animation-delay:0s; }
.p2 { width:5px;  height:5px;  background:#00d4ff; opacity:.7; top:20%;  right:4%;  animation-duration:4.1s; animation-delay:.5s; }
.p3 { width:10px; height:10px; background:#00ff88; opacity:.5; top:70%;  left:2%;   animation-duration:3.7s; animation-delay:1s; }
.p4 { width:4px;  height:4px;  background:#fff;    opacity:.5; top:80%;  right:8%;  animation-duration:5s;   animation-delay:.2s; }
.p5 { width:6px;  height:6px;  background:#00ff88; opacity:.8; top:50%;  left:0%;   animation-duration:4.5s; animation-delay:1.5s; }
.p6 { width:8px;  height:8px;  background:#7c3aed; opacity:.6; top:5%;   right:15%; animation-duration:3.9s; animation-delay:.8s; }
.p7 { width:4px;  height:4px;  background:#00d4ff; opacity:.7; bottom:5%; left:20%; animation-duration:4.8s; animation-delay:.3s; }
.p8 { width:6px;  height:6px;  background:#00ff88; opacity:.4; bottom:8%; right:5%; animation-duration:3.5s; animation-delay:1.2s; }

@keyframes float {
  0%   { transform: translateY(0)   rotate(0deg); }
  50%  { transform: translateY(-18px) rotate(90deg); }
  100% { transform: translateY(0)   rotate(180deg); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
  .home-layout { flex-direction: column-reverse; gap: 2rem; }
  .avatar-wrap { width: 180px; height: 180px; }
  .avatar-box  { width: 140px; height: 140px; }
}

/* ── QUICKCARDS（懶人包） ── */
.quickcard-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 3rem;
  max-width: 1100px;
}

.quickcard {
  font-family: var(--mono);
  font-size: 0.78rem;
  padding: 0.6rem 1.1rem;
  border-radius: 6px;
  background: var(--bg3);
  border: 1px solid rgba(0,255,136,0.2);
  color: var(--text);
  letter-spacing: 0.04em;
  transition: all 0.2s;
  cursor: default;
}

.quickcard:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,255,136,0.1);
}

/* ── ACHIEVE LIST（資訊經歷） ── */
.achieve-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  max-width: 800px;
  padding-left: 0.5rem;
}

.achieve-item {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
}

.achieve-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 0.35rem;
  box-shadow: 0 0 8px rgba(0,255,136,0.6);
}

.achieve-title {
  font-family: var(--mono);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.achieve-sub {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.03em;
}

/* ── FURSONA ── */
#fursona {
  background: var(--bg2);
}

.fursona-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  max-width: 1100px;
  align-items: start;
}

.fursona-img-wrap {
  position: relative;
}

.fursona-img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(0,255,136,0.2);
  display: block;
  object-fit: cover;
}

.fursona-credit {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted);
  text-align: right;
  margin-top: 0.5rem;
  letter-spacing: 0.08em;
}

.fursona-text {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.fursona-quote {
  font-family: var(--mono);
  font-size: 1.1rem;
  color: var(--accent);
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.fursona-text p {
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.8;
}

.fursona-text p span {
  color: var(--text);
}

.fursona-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

@media (max-width: 768px) {
  .fursona-layout { grid-template-columns: 1fr; gap: 2rem; }
  .quickcard { font-size: 0.72rem; }
}