:root {
  --bg: #18181b;
  --bg-2: #232326;
  --surface: rgba(255, 255, 255, 0.04);
  --text: #d4d4d8;
  --text-heading: #f4f4f5;
  --text-muted: #a1a1aa;
  --accent: #dc2626;
  --accent-2: #b91c1c;
  --border: rgba(255, 255, 255, 0.1);
  --radius: 10px;
  --max-width: 1040px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Noto Sans TC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
.hero-title,
.logo,
.section-title {
  font-family: "Noto Serif TC", "Songti SC", "SimSun", serif;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: 92%;
  max-width: var(--max-width);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(24, 24, 27, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: 0.08em;
}

.logo:hover {
  text-decoration: none;
}

.main-nav {
  display: flex;
  gap: 2rem;
}

.main-nav a {
  color: var(--text);
  font-size: 0.95rem;
  position: relative;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.25s ease;
}

.main-nav a:hover {
  color: var(--text-heading);
  text-decoration: none;
}

.main-nav a:hover::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-heading);
  font-size: 1.5rem;
  cursor: pointer;
}

.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 4rem 0;
}

.hero-ink {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(220, 38, 38, 0.12), transparent 35%),
    radial-gradient(circle at 80% 70%, rgba(220, 38, 38, 0.08), transparent 40%);
  filter: blur(60px);
  pointer-events: none;
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}

.hero-content {
  flex: 1;
  min-width: 0;
}

.hero-avatar {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--accent);
  box-shadow: 0 0 40px rgba(220, 38, 38, 0.35);
  flex-shrink: 0;
}

.hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-subtitle {
  color: var(--accent);
  font-size: 1rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  font-weight: 500;
}

.hero-title {
  font-size: clamp(4rem, 12vw, 8rem);
  color: var(--text-heading);
  margin: 0 0 1.5rem;
  line-height: 1;
  letter-spacing: 0.08em;
}

.hero-tagline {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  max-width: 680px;
  color: var(--text);
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.hero-domain {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 500;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 24px rgba(220, 38, 38, 0.3);
}

.btn-primary:hover {
  background: var(--accent-2);
  box-shadow: 0 0 32px rgba(220, 38, 38, 0.4);
}

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

.btn-secondary:hover {
  background: rgba(220, 38, 38, 0.1);
}

.section {
  padding: 5.5rem 0;
}

.section-alt {
  background: var(--bg-2);
}

.section-title {
  font-size: 2rem;
  color: var(--text-heading);
  margin-bottom: 2.5rem;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 1.1rem;
  border-radius: 50%;
  font-family: "Noto Sans TC", sans-serif;
  font-weight: 600;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.profile-card h3 {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0 0 0.5rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  font-family: "Noto Sans TC", sans-serif;
}

.profile-card p {
  color: var(--text-heading);
  margin: 0;
  font-weight: 600;
  font-size: 1.05rem;
}

.profile-summary p {
  max-width: 780px;
  color: var(--text);
  margin-bottom: 1rem;
}

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

.domain-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: transform 0.2s, border-color 0.2s;
}

.domain-card:hover {
  transform: translateY(-4px);
  border-color: rgba(220, 38, 38, 0.5);
}

.domain-card h3 {
  color: var(--text-heading);
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.domain-card ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--text);
}

.domain-card li {
  margin-bottom: 0.6rem;
  line-height: 1.6;
}

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

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.project-card h3 {
  color: var(--text-heading);
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.project-card p {
  color: var(--text);
  margin-bottom: 0;
  line-height: 1.7;
}

.interests {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2rem;
}

.interest-item h3 {
  color: var(--text-heading);
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.interest-item p {
  color: var(--text);
  margin: 0;
  line-height: 1.7;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin-top: 1.25rem;
}

.contact-list li {
  margin-bottom: 0.75rem;
}

.site-footer {
  padding: 2.5rem 0;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 720px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--bg);
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 1rem;
  }

  .main-nav.open {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .hero {
    min-height: 75vh;
  }

  .hero-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;
  }

  .hero-avatar {
    width: 140px;
    height: 140px;
  }

  .hero-actions {
    width: 100%;
  }

  .btn {
    width: 100%;
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 4rem 0;
  }
}
