@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ─── Animations ─── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── Reset & Base ─── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: #0a0a0a;
  color: #e0e0e0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
}

/* ─── Hero ─── */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  padding: 2rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #a855f7, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: #888;
  max-width: 480px;
}

/* ─── Section Layout ─── */
section {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-heading {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #e0e0e0;
}

.section-body {
  color: #888;
  margin-bottom: 2.5rem;
  max-width: 600px;
}

/* ─── Projects Grid ─── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* ─── Project Cards ─── */
.card {
  position: relative;
  background: #111;
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid #222;
  transition: transform 0.3s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  padding: 1px;
  background: linear-gradient(135deg, #a855f7, #06b6d4);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: transparent;
}

.card:hover::before {
  opacity: 1;
}

/* ─── Card Header ─── */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #e0e0e0;
}

/* ─── Card Description ─── */
.card-description {
  color: #999;
  font-size: 0.9rem;
  flex: 1;
}

/* ─── Tech Stack Tags ─── */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
}

.tag {
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 999px;
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  color: #aaa;
}

/* ─── License Badges ─── */
.license-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.license-mit {
  color: #22c55e;
  border: 1px solid #22c55e;
}

.license-agpl {
  color: #3b82f6;
  border: 1px solid #3b82f6;
}

/* ─── Card Footer ─── */
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

/* ─── GitHub Stars ─── */
.stars {
  font-family: ui-monospace, 'Cascadia Code', monospace;
  font-size: 0.8rem;
  color: #555;
}

/* ─── View on GitHub Button ─── */
.btn-github {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.35rem 0.85rem;
  border-radius: 6px;
  border: 1px solid #444;
  color: #ccc;
  text-decoration: none;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.btn-github:hover {
  background: linear-gradient(135deg, #a855f7, #06b6d4);
  border-color: transparent;
  color: #fff;
}

/* ─── Contributing Section ─── */
.contributing {
  background: #111;
  border-radius: 12px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3.5rem 2rem;
}

.involve-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  text-align: center;
}

.involve-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  color: #ccc;
  font-size: 0.95rem;
}

.involve-icon {
  font-size: 2rem;
}

/* ─── Philosophy Section ─── */
.philosophy {
  text-align: center;
  padding: 5rem 2rem;
  max-width: 720px;
  margin: 0 auto;
}

.philosophy .section-body {
  font-style: italic;
  font-size: 1.1rem;
  color: #aaa;
  border-left: 3px solid #a855f7;
  padding-left: 1.25rem;
  text-align: left;
  max-width: 100%;
}

/* ─── Footer ─── */
.site-footer {
  text-align: center;
  padding: 2rem;
  color: #555;
  font-size: 0.85rem;
  border-top: 1px solid #1a1a1a;
}

/* ─── Responsive ─── */
@media (max-width: 600px) {
  .card-grid {
    grid-template-columns: 1fr;
  }

  .involve-list {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 2.2rem;
  }
}
