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

:root {
  --font-display: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  --brand-primary: #6366f1;
  --brand-secondary: #a855f7;
  --roast-primary: #ea580c;
  --roast-secondary: #c2410c;
  --ui-primary: #6366f1;
  --ui-secondary: #7c3aed;
  --push-primary: #0891b2;
  --push-secondary: #0e7490;
  --page-bg: #0a0c10;
  --text: #e8e8ec;
  --text-muted: #8b92a0;
  --surface: #12151c;
  --surface-border: #252a36;
  --surface-divider: #1e232d;
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 3rem) 0;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 45% at 50% -5%, color-mix(in srgb, var(--brand-primary) 18%, transparent), transparent),
    var(--page-bg);
}

code {
  font-family: var(--vk-font-mono, monospace);
  font-size: 0.88em;
}

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

.page-shell {
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header — icon + wordmark */
.site-header {
  padding: 0 0 clamp(1.5rem, 4vw, 2.5rem);
  width: 100%;
}

.brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: clamp(1rem, 3vw, 1.75rem);
}

.logo-mark {
  flex-shrink: 0;
  width: clamp(4.5rem, 12vw, 6.5rem);
  height: clamp(4.5rem, 12vw, 6.5rem);
}

.logo-mark svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 12px 28px color-mix(in srgb, var(--brand-primary) 28%, transparent));
}

.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(0.25rem, 1vw, 0.5rem);
  min-width: 0;
}

h1, h2, h3,
.logo-text,
.hero-title,
.project-card h3 {
  font-family: var(--font-display);
}

.logo-text {
  margin: 0;
  font-size: clamp(2.75rem, 10vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.95;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-tagline {
  margin: 0;
  font-size: clamp(1.125rem, 2.8vw, 1.75rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text-muted);
}

main {
  width: 100%;
}

.hero {
  margin-bottom: 2.5rem;
}

.hero-title {
  margin: 0 0 1rem;
  font-size: clamp(1.5rem, 2.2vw + 0.75rem, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  white-space: nowrap;
}

@media (max-width: 520px) {
  .hero-title {
    white-space: normal;
  }
}

.hero-lede {
  margin: 0;
  max-width: 40rem;
  font-size: 1.125rem;
  color: var(--text-muted);
}

.projects {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .projects {
    grid-template-columns: repeat(3, 1fr);
  }
}

.project-card {
  --card-primary: var(--brand-primary);
  --card-secondary: var(--brand-secondary);

  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 1.75rem;
  border-radius: 1rem;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  box-shadow: 0 1px 2px rgb(0 0 0 / 12%);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.project-card-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
  color: inherit;
  margin-bottom: 1rem;
}

.project-card-head {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  min-height: 3.5rem;
}

.project-card-title {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.project-card-main:hover h3 {
  color: var(--card-secondary);
}

.project-roast {
  --card-primary: var(--roast-primary);
  --card-secondary: var(--roast-secondary);
}

.project-ui {
  --card-primary: var(--ui-primary);
  --card-secondary: var(--ui-secondary);
}

.project-push {
  --card-primary: var(--push-primary);
  --card-secondary: var(--push-secondary);
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 6px 20px color-mix(in srgb, var(--card-primary) 10%, transparent),
    0 1px 2px rgb(0 0 0 / 14%);
  border-color: color-mix(in srgb, var(--card-primary) 22%, var(--surface-border));
  background: color-mix(in srgb, var(--surface) 96%, var(--card-primary) 4%);
}

.project-icon {
  display: block;
  flex: 0 0 3.5rem;
  width: 3.5rem;
  height: 3.5rem;
}

.project-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 4px 10px color-mix(in srgb, var(--card-primary) 18%, transparent));
}

.project-card h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--card-primary);
  transition: color 0.18s ease;
}

.project-lede {
  margin: 0;
  flex: 1;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.project-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--surface-divider);
}
.project-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--card-primary);
  transition: color 0.18s ease;
}

.project-link:hover {
  color: var(--card-secondary);
}

span.project-link {
  cursor: default;
}

.project-gitlab {
  flex-shrink: 0;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--card-primary) 22%, var(--surface-border));
  background: color-mix(in srgb, var(--card-primary) 6%, transparent);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--card-primary);
  line-height: 1;
  white-space: nowrap;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}

.project-source-label {
  font-size: inherit;
  font-weight: inherit;
  line-height: 1;
}

.gitlab-icon {
  width: 0.875rem;
  height: 0.875rem;
  flex: 0 0 0.875rem;
  display: block;
  overflow: hidden;
}

.project-gitlab svg {
  width: 0.875rem;
  height: 0.875rem;
  max-width: 0.875rem;
  max-height: 0.875rem;
}

.project-gitlab:hover {
  background: color-mix(in srgb, var(--card-primary) 12%, transparent);
  border-color: color-mix(in srgb, var(--card-primary) 35%, var(--surface-border));
  color: var(--card-secondary);
}
