html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #050816;
  color: #eaf2ff;
  overflow-x: hidden;
}

/* 星空背景 */
#starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

/* 上方選單 */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 18px 12px;
  background: rgba(5, 8, 22, 0.45);
  backdrop-filter: blur(8px);
  z-index: 1000;
}

.menu {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.menu button {
  background: transparent;
  border: none;
  color: #eaf2ff;
  font-size: 15px;
  cursor: pointer;
  padding: 8px 10px;
  transition: opacity 0.25s ease, transform 0.25s ease, color 0.25s ease;
}

.menu button:hover {
  color: #c9dfff;
  opacity: 0.95;
  transform: translateY(-1px);
}

/* 每一區像一層樓 */
.panel {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 24px 40px;
  box-sizing: border-box;
  scroll-margin-top: 80px;
}

/* 內容區 */
.content {
  width: min(760px, 92%);
  text-align: center;
}

.hero-content {
  text-align: center;
}

.hero .content {
  transform: translateY(-10px);
}

/* 首頁上方 code */
.code-line {
  margin: 0 0 24px;
  font-size: clamp(24px, 4vw, 52px);
  font-family: "Courier New", monospace;
  color: rgba(234, 242, 255, 0.62);
  letter-spacing: 0.5px;
}

/* 標題 */
h1,
h2 {
  margin: 0 0 18px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

h1 {
  font-size: clamp(54px, 9vw, 96px);
  font-weight: 700;
  letter-spacing: 2px;
}

h2 {
  font-size: clamp(30px, 6vw, 48px);
}

/* 內文 */
p {
  margin: 10px 0;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
  color: rgba(234, 242, 255, 0.88);
}

/* 綠色打字效果 */
.typing-line {
  margin: 0;
  font-size: clamp(24px, 4.5vw, 56px);
  font-family: "Courier New", monospace;
  color: #32ff32;
  min-height: 1.4em;
  text-shadow: 0 0 8px rgba(50, 255, 50, 0.18);
}

.cursor {
  display: inline-block;
  margin-left: 2px;
  color: #32ff32;
  animation: blink 0.8s infinite;
}

/* ===== 社交按鈕 ===== */
.social-buttons {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.btn {
  padding: 16px 40px;
  border-radius: 16px;
  text-decoration: none;
  font-size: 20px;
  font-weight: 500;
  border: 2px solid;
  transition: all 0.3s ease;
}

/* GitHub */
.github {
  color: #cfd8dc;
  border-color: #6b7c85;
}

.github:hover {
  background: rgba(255,255,255,0.05);
}

/* LinkedIn */
.linkedin {
  color: #32ff88;
  border-color: #32ff88;
}

.linkedin:hover {
  background: rgba(50,255,136,0.1);
}

/* TryHackMe */
.tryhackme {
  color: #ff7a1a;
  border-color: #ff7a1a;
}

.tryhackme:hover {
  background: rgba(255,122,26,0.1);
}

/* Instagram */
.instagram {
  color: #3db4ff;
  border-color: #3db4ff;
}

.instagram:hover {
  background: rgba(61,180,255,0.1);
}

/* ===== Footer ===== */
footer {
  text-align: center;
  padding: 30px 0;
  font-size: 14px;
  color: rgba(234, 242, 255, 0.6);
}

.btn {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

/* icon 大小 */
.btn i {
  font-size: 20px;
}

@keyframes blink {
  0%, 49% {
    opacity: 1;
  }
  50%, 100% {
    opacity: 0;
  }
}