:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #1a1d21;
  --text-muted: #5c6470;
  --border: #e3e6ea;
  --chip-bg: #eef1f5;
  --accent: #4f8cff;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 8px 24px rgba(16, 24, 40, 0.06);
  --shadow-hover: 0 2px 4px rgba(16, 24, 40, 0.08), 0 16px 40px rgba(16, 24, 40, 0.12);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1216;
    --surface: #181c22;
    --text: #e9edf2;
    --text-muted: #9aa4b2;
    --border: #262c34;
    --chip-bg: #222831;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.5), 0 16px 40px rgba(0, 0, 0, 0.45);
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  line-height: 1.5;
}

.site-header {
  max-width: 1040px;
  width: 100%;
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 5.5rem) 1.5rem 1.5rem;
}

.site-title {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.site-tagline {
  margin: 0.5rem 0 0;
  color: var(--text-muted);
  font-size: 1.05rem;
}

main {
  flex: 1;
  max-width: 1040px;
  width: 100%;
  margin: 0 auto;
  padding: 1rem 1.5rem 3rem;
}

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

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.4rem 1.4rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--card-accent, var(--accent));
}

.project-card:hover,
.project-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--card-accent, var(--accent));
  outline: none;
}

.project-card__name {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.project-card__desc {
  margin: 0.4rem 0 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  flex: 1;
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.project-card__tag {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--chip-bg);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.project-card__go {
  margin-top: 0.9rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--card-accent, var(--accent));
}

.empty-state {
  grid-column: 1 / -1;
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: 14px;
}

.site-footer {
  max-width: 1040px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 2.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

.site-footer a:hover {
  color: var(--text);
}
