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

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--bg-color);
  color: var(--text-primary);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-weight: 300;
  line-height: 1.65;
  letter-spacing: 0.02em;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (max-width: 960px) {
  body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
  }
}

::selection {
  background-color: var(--text-primary);
  color: var(--bg-color);
}

::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
  background: #252830;
  border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover {
  background: #3e4350;
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: #d4d0c7;
}
[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: #b5b0a5;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  background: none;
  border: none;
  font-family: inherit;
  color: inherit;
  cursor: pointer;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: 2.5rem;
  padding-right: 2.5rem;
}

@media (max-width: 768px) {
  .container {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}

.font-mono, .project-code, .meta-data {
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}

.font-serif {
  font-family: var(--font-serif);
  letter-spacing: 0.08em;
}

.font-display {
  font-family: var(--font-display);
  letter-spacing: 0.04em;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.25em;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.section-tag::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 1px;
  background-color: var(--accent-bronze);
}

.section-title {
  font-family: var(--font-sans);
  font-size: 2.25rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  line-height: 1.3;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 300;
  margin-top: 0.5rem;
  max-width: 680px;
}

@media (max-width: 768px) {
  .section-title {
    font-size: 1.75rem;
  }
}