:root {
  --bg: #0d1117;
  --ink: #cdd9e5;
  --muted: #4d6478;
  --accent: #58a6ff;
  --border: #243447;
  --card-bg: rgba(255, 255, 255, 0.02);
}

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: Syne, sans-serif;
  min-height: 100vh;
  padding: 3rem 2rem;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

.wrap {
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

header {
  border-top: 3px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
  margin-bottom: 3rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.site-title {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.site-title span {
  color: var(--accent);
}

.gh-link {
  font-family: 'Syne Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

.gh-link:hover {
  color: var(--accent);
}

h1 {
  font-size: clamp(2.8rem, 8vw, 5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 0.5rem;
}

h1 em {
  font-style: normal;
  color: var(--accent);
}

.controls {
  margin-bottom: 3rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#search {
  background: 0 0;
  border: 1px solid var(--border);
  color: var(--ink);
  padding: 0.8rem;
  font-family: 'Syne Mono', monospace;
  font-size: 0.8rem;
  outline: 0;
  width: 100%;
  max-width: 300px;
}

#search:focus {
  border-color: var(--accent);
}

#filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-btn {
  background: 0 0;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 0.3rem 0.7rem;
  font-family: 'Syne Mono', monospace;
  font-size: 0.65rem;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn.active,
.filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.subtitle {
  font-family: 'Syne Mono', monospace;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}

#projects {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

#projects li {
  background: var(--card-bg);
  border: 1px solid var(--border);
  animation: slideUp 0.4s ease both;
  display: flex;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#projects a {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  text-decoration: none;
  color: var(--ink);
  width: 100%;
  transition: border-color 0.2s;
}

#projects li:hover {
  border-color: var(--accent);
}

#projects a:hover .proj-name {
  color: var(--accent);
}

.proj-name {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  transition: color 0.15s;
}

.proj-desc {
  font-family: 'Syne Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  line-height: 1.4;
  flex-grow: 1;
}

.proj-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.proj-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag {
  font-family: 'Syne Mono', monospace;
  font-size: 0.6rem;
  color: var(--accent);
  text-transform: uppercase;
  opacity: 0.7;
}

.proj-meta {
  font-family: 'Syne Mono', monospace;
  font-size: 0.68rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Repository link specific styling */
.repo-link {
  font-family: 'Syne Mono', monospace;
  font-size: 0.65rem;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s;
}

.repo-link:hover {
  border-bottom-color: var(--accent);
}

.state {
  font-family: 'Syne Mono', monospace;
  font-size: 0.8rem;
  color: var(--muted);
  padding: 20px 20px;
  grid-column: 1/-1;
}

footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-family: 'Syne Mono', monospace;
  font-size: 0.68rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
}
