:root {
  --bg: #ffffff;
  --bg-alt: #f4f5f7;
  --fg: #1a1a1a;
  --fg-muted: #6b7280;
  --border: #d9dce1;
  --accent: #2563eb;
  --accent-fg: #ffffff;
  --card-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
  --card-shadow-hover: 0 8px 20px rgba(16, 24, 40, 0.1);
}

:root[data-theme="dark"] {
  --bg: #14161a;
  --bg-alt: #1d2026;
  --fg: #e6e8eb;
  --fg-muted: #9aa1ab;
  --border: #2c3038;
  --accent: #5b8def;
  --accent-fg: #0b0d10;
  --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  --card-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.45);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14161a;
    --bg-alt: #1d2026;
    --fg: #e6e8eb;
    --fg-muted: #9aa1ab;
    --border: #2c3038;
    --accent: #5b8def;
    --accent-fg: #0b0d10;
    --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    --card-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.45);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--fg);
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-mark {
  font-size: 1.35rem;
}

.brand-name {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.icon-button {
  min-width: 44px;
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--fg);
  font-size: 1.1rem;
  cursor: pointer;
}

main {
  padding: 2rem 1.5rem 3rem;
  max-width: 1100px;
  margin: 0 auto;
}

.hero {
  max-width: 680px;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.hero h1 {
  font-size: 2rem;
  line-height: 1.25;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

.hero-sub {
  color: var(--fg-muted);
  font-size: 1.05rem;
  line-height: 1.55;
  margin: 0;
}

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

.project-card {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-alt);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--card-shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-hover);
  border-color: var(--accent);
}

.project-card-top {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.project-emoji {
  font-size: 1.4rem;
}

.project-card h2 {
  font-size: 1.05rem;
  margin: 0;
}

.project-desc {
  color: var(--fg-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0 0 0.85rem;
  flex-grow: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
}

.tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--fg-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
}

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

.app-footer {
  text-align: center;
  padding: 1.5rem 1.5rem 2.5rem;
  color: var(--fg-muted);
  font-size: 0.85rem;
}

@media (max-width: 600px) {
  .hero h1 {
    font-size: 1.6rem;
  }
}
