:root {
  --bg: #ffffff;
  --bg-alt: #f6f7f9;
  --text: #1a1f2b;
  --text-muted: #5b6472;
  --accent: #2563eb;
  --accent-soft: #eff4ff;
  --border: #e5e8ee;
  --shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
  --radius: 14px;
}

html[data-theme="dark"] {
  --bg: #0f1420;
  --bg-alt: #151b2a;
  --text: #e6eaf2;
  --text-muted: #9aa5b8;
  --accent: #60a5fa;
  --accent-soft: #1c2842;
  --border: #262e40;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Noto Sans SC", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition: background 0.3s ease, color 0.3s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: 0.5px;
}

.brand-dot {
  color: var(--accent);
}

.main-nav {
  display: flex;
  gap: 28px;
}

.main-nav a {
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: var(--accent);
}

.theme-toggle {
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.theme-toggle:hover {
  transform: rotate(20deg);
  border-color: var(--accent);
}

/* ---------- Hero ---------- */
.hero {
  padding: 120px 0 100px;
  text-align: center;
  background:
    radial-gradient(600px 300px at 20% 10%, var(--accent-soft), transparent 60%),
    radial-gradient(600px 300px at 80% 20%, var(--accent-soft), transparent 60%);
}

.hero-kicker {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.hero-name {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  margin: 12px 0 8px;
  line-height: 1.1;
}

.hero-role {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.hero-bio {
  max-width: 560px;
  margin: 0 auto 36px;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 35%, transparent);
}

.btn-primary:hover {
  transform: translateY(-2px);
}

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

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Sections ---------- */
.section {
  padding: 90px 0;
}

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

.section-tag {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin-bottom: 6px;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 40px;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: start;
}

.about-text {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.about-facts {
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 8px 24px;
  box-shadow: var(--shadow);
}

.about-facts li {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px dashed var(--border);
}

.about-facts li:last-child {
  border-bottom: none;
}

.about-facts span {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ---------- Skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.skill-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.skill-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.skill-icon {
  font-size: 1.6rem;
  display: block;
  margin-bottom: 12px;
}

.skill-card h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.skill-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* ---------- Projects ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.project-thumb {
  height: 160px;
  display: grid;
  place-items: center;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent);
  background: linear-gradient(135deg, var(--accent-soft), transparent);
}

.project-card h3 {
  padding: 20px 24px 0;
  font-size: 1.1rem;
}

.project-card p {
  padding: 6px 24px 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.project-links {
  padding: 16px 24px 22px;
  display: flex;
  gap: 18px;
}

.project-link {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
}

/* ---------- Contact ---------- */
.contact-inner {
  text-align: center;
}

.contact-desc {
  color: var(--text-muted);
  max-width: 460px;
  margin: 0 auto 32px;
}

.contact-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

.contact-link {
  padding: 12px 24px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  font-weight: 600;
  font-size: 0.92rem;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

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

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

.footer-inner {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* ---------- Reveal Animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .main-nav {
    gap: 16px;
  }

  .hero {
    padding: 90px 0 70px;
  }

  .section {
    padding: 64px 0;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 480px) {
  .main-nav a:nth-child(2),
  .main-nav a:nth-child(3) {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  html {
    scroll-behavior: auto;
  }
}
