:root {
  --bg-color: #faf8f5;
  --ink: #111827;
  --accent: #2563eb;
  --muted: #4b5563;
  --border: #e5e7eb;
  --tag-bg: #f1f5f9;
  --tag-border: #cbd5e1;
  --toggle-bg: #e2e8f0;
  --toggle-knob: #ffffff;
}

[data-theme="dark"] {
  --bg-color: #111827;
  --ink: #f9fafb;
  --accent: #60a5fa;
  --muted: #9ca3af;
  --border: #374151;
  --tag-bg: #1e293b;
  --tag-border: #334155;
  --toggle-bg: #475569;
  --toggle-knob: #0f172a;
}

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

html {
  transition: background-color 0.25s ease, color 0.25s ease;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-color);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.75;
  max-width: 660px;
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
  transition: background-color 0.25s ease, color 0.25s ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  color: var(--ink);
}

.top-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 2.5rem;
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
}

.toggle-track {
  width: 40px;
  height: 22px;
  background: var(--toggle-bg);
  border-radius: 99px;
  position: relative;
  transition: background-color 0.25s;
}

.toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--toggle-knob);
  transition: transform 0.25s, background-color 0.25s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

[data-theme="dark"] .toggle-knob {
  transform: translateX(18px);
}

.site-header {
  margin-bottom: 2.8rem;
}

.site-header h1 {
  font-size: 1.9rem;
  line-height: 1.2;
  margin-bottom: 0.3rem;
}

.subtitle {
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 400;
  margin-bottom: 1.2rem;
  letter-spacing: 0.01em;
}

.intro {
  font-size: 1.05rem;
  color: var(--ink);
  max-width: 580px;
  margin-bottom: 1.4rem;
  line-height: 1.75;
}

.connect-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1rem;
}

.connect-row a {
  font-size: 0.9rem;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 400;
  transition: color 0.15s;
}

.connect-row a:hover {
  color: var(--ink);
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.4rem 0;
}

.section-title {
  font-size: 1.15rem;
  margin-bottom: 1.2rem;
}

.list-item {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.list-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.list-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.2rem;
}

.item-title {
  font-weight: 500;
  font-size: 0.97rem;
  color: var(--ink);
}

.item-title a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s;
}

.item-title a:hover {
  color: var(--accent);
}

.item-tag {
  font-size: 0.8rem;
  color: var(--accent);
  background: var(--tag-bg);
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--tag-border);
  font-weight: 400;
  white-space: nowrap;
}

.item-subtitle {
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 0.1rem;
  margin-bottom: 0.2rem;
}

.item-desc {
  font-size: 0.92rem;
  color: var(--muted);
  margin-top: 0.1rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

.tag-row a {
  text-decoration: none;
}

.tag-row a:hover .item-tag {
  opacity: 0.75;
}

.tag-row .item-tag {
  color: var(--ink);
  background: var(--tag-bg);
  border: 1px solid var(--tag-border);
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
  transition: opacity 0.15s;
}

.inline-link-item {
  margin-bottom: 0.7rem;
}

.inline-link-item a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 400;
  transition: color 0.15s;
}

.inline-link-item a:hover {
  color: var(--accent);
}

.inline-link-item span {
  font-size: 0.85rem;
  color: var(--muted);
  margin-left: 0.4rem;
}

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

.footer-connect {
  font-size: 0.92rem;
  color: var(--muted);
}

.footer-connect a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 400;
}

.footer-connect a:hover {
  color: var(--ink);
}
