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

:root {
  --bg: #0a0a0a;
  --card-bg: #141414;
  --card-hover: #1a1a1a;
  --border: #262626;
  --text-primary: #e8e8e8;
  --text-secondary: #888;
  --text-muted: #666;
  --accent: #6c5ce7;
  --status-active: #00b894;
  --status-paused: #fdcb6e;
  --status-finished: #74b9ff;
  --status-abandoned: #636e72;
  --radius: 12px;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header ── */

.header {
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}

.header-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.header-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

.header-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.header-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 6px;
  margin-left: 62px;
}

.header-bio {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 4px;
  margin-left: 62px;
}

.header-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 10px;
  margin-left: 62px;
}

.header-link {
  color: var(--text-muted);
  font-size: 0.82rem;
  transition: color 0.2s ease;
}

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

/* ── Filter Bar ── */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.filter-btn {
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.filter-btn:hover {
  color: var(--text-secondary);
  border-color: #444;
}

.filter-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.project-card.hidden {
  display: none;
}

/* ── Tech Stack Summary ── */

.tech-stack-summary {
  margin-bottom: 32px;
  padding: 20px 24px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.tech-stack-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.tech-stack-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ── Projects Grid ── */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

/* ── Project Card ── */

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.project-link {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-image-wrapper {
  width: 100%;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
  padding: 28px;
  border-bottom: 1px solid var(--border);
}

.project-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: saturate(0.95);
}

.project-body {
  padding: 20px 24px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.project-name {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.project-status {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.status-active {
  background: rgba(0, 184, 148, 0.15);
  color: var(--status-active);
}

.status-paused {
  background: rgba(253, 203, 110, 0.15);
  color: var(--status-paused);
}

.status-finished {
  background: rgba(116, 185, 255, 0.15);
  color: var(--status-finished);
}

.status-abandoned {
  background: rgba(99, 110, 114, 0.25);
  color: var(--status-abandoned);
}

.project-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.65;
  margin-bottom: 16px;
  flex: 1;
}

.project-description em {
  color: var(--text-primary);
  font-style: italic;
}

.project-techs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.tech-tag {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  background: #1e1e1e;
  color: var(--text-secondary);
  border: 1px solid #2a2a2a;
  border-radius: 6px;
}

.project-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.platform-badge {
  font-size: 0.72rem;
  padding: 4px 10px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.platform-badge.soon {
  border-style: dashed;
  color: var(--text-secondary);
}

/* ── Footer ── */

.footer {
  margin-top: 80px;
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-copy {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-link {
  color: var(--text-secondary);
  font-size: 0.85rem;
  transition: color 0.2s ease;
}

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

/* ── Responsive ── */

@media (max-width: 700px) {
  .header {
    padding: 32px 0 24px;
    margin-bottom: 32px;
  }

  .header-subtitle {
    margin-left: 0;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
  }

  .project-image-wrapper {
    height: 150px;
    padding: 20px;
  }
}

@media (min-width: 701px) and (max-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
