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

:root {
  --bg: #fff;
  --bg-alt: #fafafa;
  --text: #111;
  --text-muted: #666;
  --border: #ddd;
  --max-width: 900px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111;
    --bg-alt: #1a1a1a;
    --text: #f2f2f2;
    --text-muted: #999;
    --border: #333;
  }
}

:root[data-theme="dark"] {
  --bg: #111;
  --bg-alt: #1a1a1a;
  --text: #f2f2f2;
  --text-muted: #999;
  --border: #333;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--text);
}

a:hover {
  opacity: 0.7;
}

h1, h2, h3 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.75rem;
  margin-bottom: 24px;
}

h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

ul {
  list-style: none;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}

.logo {
  font-weight: 700;
  font-size: 1.1rem;
  border-bottom: none;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.theme-toggle {
  font: inherit;
  font-size: 0.85rem;
  color: var(--text);
  background: none;
  border: 1px solid var(--text);
  padding: 5px 12px;
  cursor: pointer;
}

.theme-toggle:hover {
  opacity: 0.7;
}

.nav-list {
  display: flex;
  gap: 24px;
}

.nav-list a {
  border-bottom: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
}

/* Hero */
.hero {
  padding: 96px 0 64px;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Sections */
.section {
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
}

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

/* Skills */
.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.skill-list li {
  border: 1px solid var(--text);
  padding: 6px 14px;
}

/* Contact */
.button {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 20px;
  border: 1px solid var(--text);
}

.button:hover {
  background: var(--text);
  color: var(--bg);
  opacity: 1;
}

/* Footer */
.site-footer {
  padding: 32px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Responsive nav */
@media (max-width: 640px) {
  .nav-toggle {
    display: flex;
  }

  .header-right {
    position: relative;
  }

  .nav-list {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 160px;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border: 1px solid var(--border);
    display: none;
  }

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

  .nav-list li {
    border-top: 1px solid var(--border);
  }

  .nav-list li:first-child {
    border-top: none;
  }

  .nav-list a {
    display: block;
    padding: 16px 24px;
  }
}
