:root {
  --bg-color: #0c0d14;
  --marble: #f4f4f6;
  --accent: #d4af37;
  --accent-glow: rgba(212, 175, 55, 0.25);
  --stone: #1a1c26;
  --stone-hover: #222533;
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --header-bg: rgba(12, 13, 20, 0.85);
  --footer-bg: rgba(12, 13, 20, 0.5);
  --border-color: rgba(212, 175, 55, 0.18);
  --transition: all 0.25s ease;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 100;
}

header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 3.5rem;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(8px);
  background: var(--header-bg);
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-link {
  display: flex;
  align-items: center;
  transition: transform 0.2s ease;
}

.logo-link:hover {
  transform: scale(1.05);
}

.brand-logo {
  width: 36px;
  height: 36px;
}

.breadcrumbs {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.breadcrumbs a {
  color: var(--accent);
  text-decoration: none;
  transition: var(--transition);
}

.breadcrumbs a:hover {
  text-shadow: 0 0 10px var(--accent-glow);
}

.breadcrumbs .divider {
  color: var(--text-muted);
  opacity: 0.5;
}

.breadcrumbs .current {
  color: var(--marble);
}

main {
  position: relative;
  z-index: 10;
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  display: flex;
  flex-direction: column;
}

.hero-section {
  width: 100%;
  margin-bottom: 2.5rem;
  text-align: center;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 300;
  letter-spacing: 0.15em;
  color: var(--marble);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  font-family: Georgia, serif;
}

.hero-subtitle {
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  color: var(--text-muted);
  width: 100%;
  line-height: 1.6;
}

.section-header {
  width: 100%;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
  margin: 2rem 0 1.25rem 0;
  color: var(--marble);
  font-family: Georgia, serif;
  font-size: 1.15rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-row {
  display: grid;
  gap: 1.25rem;
  width: 100%;
  margin-bottom: 1.25rem;
}

.cols-1 { grid-template-columns: 1fr; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }

.directory-card {
  background: var(--stone);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.directory-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.directory-card:hover {
  background: var(--stone-hover);
  border-color: var(--accent);
  box-shadow: 0 8px 24px -8px var(--accent-glow);
}

.directory-card:hover::before {
  transform: scaleX(1);
}

.card-body-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.card-content {
  flex: 1;
}

.card-title {
  font-size: 1.35rem;
  color: var(--marble);
  font-family: Georgia, serif;
  letter-spacing: 0.04em;
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

.card-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.card-icon {
  width: 58px; height: 58px;
  flex-shrink: 0;
  color: var(--marble);
  opacity: 0.25;
  transition: var(--transition);
}

.directory-card:hover .card-icon {
  opacity: 0.85;
  color: var(--accent);
  transform: scale(1.08);
}

.card-tags {
  display: flex;
  gap: 0.4rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
  align-items: center;
}

.tag {
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-weight: 500;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  line-height: 1.3;
}

.tag.tag-filled {
  background: var(--tag-color, var(--accent));
  color: var(--bg-color);
  border-color: var(--tag-color, var(--accent));
  font-weight: 600;
}

.tag-icon {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

footer {
  position: relative;
  z-index: 10;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  background: var(--footer-bg);
  backdrop-filter: blur(4px);
  line-height: 1.5;
}

@media (max-width: 900px) {
  .cols-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .cols-2, .cols-3 { grid-template-columns: 1fr; }
}