@import url("colors.css");

/* === RESET & BASE === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--canvas);
  color: var(--text-body);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

/* === CURSOR GLOW === */
.cursor-glow {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), var(--glow-purple), transparent 80%);
}

/* === PAGE CONTAINER === */
.page-container {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 64px 48px 120px;
}

/* === HEADER === */
.page-header {
  margin-bottom: 56px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  margin-bottom: 20px;
  transition: gap 0.2s ease, color 0.2s ease;
}

.back-link:hover {
  gap: 10px;
}

.back-link svg {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.back-link:hover svg {
  transform: translateX(-3px);
}

.page-title {
  font-size: clamp(2.4rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

/* === FILTER BAR === */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.filter-btn {
  background-color: var(--surface-50);
  border: 1px solid var(--border-emphasis);
  color: var(--text-body);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.filter-btn:hover {
  background-color: var(--surface-80);
  color: var(--text-primary);
}

.filter-btn.active {
  background-color: var(--accent-soft-mid);
  color: var(--accent);
  border-color: var(--accent-active-border);
}

/* === TABLE WRAPPER === */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* === TABLE === */
.projects-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

/* Header row */
.projects-table thead tr {
  border-bottom: 1px solid var(--border-medium);
}

.projects-table thead th {
  text-align: left;
  padding: 0 16px 16px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-primary);
  white-space: nowrap;
}

.projects-table thead th:first-child {
  padding-left: 0;
}

.projects-table thead th:last-child {
  padding-right: 0;
}

/* Body rows */
.projects-table tbody tr {
  border-bottom: 1px solid var(--border-hairline);
  transition: background-color 0.15s ease;
  cursor: default;
}

.projects-table tbody tr:hover {
  background-color: var(--surface-60);
}

.projects-table tbody tr:hover .project-name {
  color: var(--accent);
}

.projects-table tbody tr:hover .arrow {
  color: var(--accent);
}

.projects-table tbody td {
  padding: 16px;
  vertical-align: top;
}

.projects-table tbody td:first-child {
  padding-left: 0;
}

.projects-table tbody td:last-child {
  padding-right: 0;
}

/* Year column */
.year {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
  padding-top: 18px !important;
  width: 60px;
}

/* Project name */
.project-name {
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.4;
  transition: color 0.15s ease;
  min-width: 180px;
}

/* Made at */
.made-at {
  color: var(--text-muted);
  white-space: nowrap;
  font-size: 0.88rem;
}

/* Built with tags */
.built-with ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.built-with ul li {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--accent);
  background-color: var(--accent-soft);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
  letter-spacing: 0.03em;
}

/* Link column */
.link-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.link-col {
  white-space: nowrap;
  min-width: 120px;
}

.link-col a {
  color: var(--text-body);
  text-decoration: none;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s ease;
}

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

.arrow {
  display: inline-block;
  vertical-align: -0.2em;
  flex-shrink: 0;
  transition: transform 0.15s ease, color 0.15s ease;
}

.link-col a:hover .arrow {
  transform: translate(2px, -2px);
}

.no-link {
  color: var(--text-disabled);
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .page-container {
    padding: 48px 32px 96px;
  }
}

@media (max-width: 640px) {
  .page-container {
    padding: 48px 20px 96px;
  }

  .hide-sm {
    display: none;
  }
}

@media (max-width: 480px) {
  .hide-xs {
    display: none;
  }
}
