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

:root {
  /* Surface */
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-elevated: #161616;
  --bg-card: #131313;
  --bg-card-hover: #1a1a1a;
  --bg-input: #0e0e0e;

  /* Borders */
  --border-subtle: #1e1e1e;
  --border-medium: #2a2a2a;
  --border-strong: #333333;

  /* Text */
  --text-primary: #e8e8e8;
  --text-secondary: #888888;
  --text-tertiary: #555555;
  --text-accent: #ffffff;

  /* Accent — light blue */
  --accent: #38BDF8;
  --accent-dim: #0ea5e9;
  --accent-glow: rgba(56, 189, 248, 0.08);

  /* Status */
  --status-live: #4ade80;
  --status-live-bg: rgba(74, 222, 128, 0.08);
  --status-beta: #facc15;
  --status-beta-bg: rgba(250, 204, 21, 0.08);
  --status-maintenance: #fb923c;
  --status-maintenance-bg: rgba(251, 146, 60, 0.08);
  --status-private: #6b7280;
  --status-private-bg: rgba(107, 114, 128, 0.08);

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 64px;
  --space-3xl: 96px;

  /* Type scale */
  --text-xs: 0.6875rem;    /* 11px */
  --text-sm: 0.8125rem;    /* 13px */
  --text-base: 0.9375rem;  /* 15px */
  --text-md: 1.0625rem;    /* 17px */
  --text-lg: 1.25rem;      /* 20px */
  --text-xl: 1.75rem;      /* 28px */
  --text-2xl: 2.5rem;      /* 40px */
  --text-3xl: 3.25rem;     /* 52px */

  /* Misc */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 100px;
  --max-width: 1200px;
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

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

ul { list-style: none; }

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

button, input, select {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
  background: none;
  color: inherit;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* Navbar */
.navbar {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  padding: var(--space-md) 0;
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  gap: 0;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: var(--text-lg);
  letter-spacing: -0.02em;
  color: var(--text-accent);
}

.navbar-brand-mark {
  color: var(--accent);
}

.navbar-brand-text {
  color: var(--text-primary);
}

.navbar-logo {
  height: 32px;
  width: auto;
  margin-right: 8px;
}

.navbar-menu {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.navbar-link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

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

.navbar-link--external i {
  margin-left: 4px;
  opacity: 0.5;
}

/* Hero */
.hero {
  padding: var(--space-2xl) 0;
  border-bottom: 1px solid var(--border-subtle);
}

.hero-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

.hero-photo-frame {
  width: 200px;
  height: 200px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-medium);
  overflow: hidden;
  background: var(--bg-elevated);
  position: relative;
}

.hero-photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  font-size: 3.5rem;
}

.hero-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-name {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: var(--text-2xl);
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text-accent);
  margin-bottom: var(--space-sm);
}

.hero-brand {
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: var(--text-md);
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-lg);
}

.hero-bio {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.hero-bio-line {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: var(--text-base);
  color: var(--text-secondary);
  font-weight: 400;
}

.hero-bio-bullet {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-dim);
  flex-shrink: 0;
}

.hero-socials {
  display: flex;
  gap: var(--space-md);
}

.hero-social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  font-size: 1.05rem;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.hero-social-link:hover {
  color: var(--text-accent);
  border-color: var(--border-strong);
  background-color: var(--bg-elevated);
}

/* Directory */
.directory {
  padding: var(--space-2xl) 0 var(--space-3xl);
}

.directory-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border-subtle);
}

.directory-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: var(--text-xl);
  letter-spacing: -0.02em;
  color: var(--text-accent);
  margin-bottom: var(--space-xs);
}

.directory-subtitle {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  font-weight: 400;
}

.directory-count {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.directory-count-number {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: var(--text-2xl);
  color: var(--accent);
  line-height: 1;
}

.directory-count-label {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
}

.directory-controls {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.directory-search {
  flex: 1;
  min-width: 240px;
  position: relative;
}

.directory-search-icon {
  position: absolute;
  left: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  font-size: var(--text-sm);
  pointer-events: none;
}

.directory-search-input {
  width: 100%;
  height: 46px;
  padding: 0 var(--space-md) 0 42px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-weight: 400;
  transition: border-color 0.2s ease;
}

.directory-search-input::placeholder {
  color: var(--text-tertiary);
}

.directory-search-input:focus {
  border-color: var(--border-strong);
}

.directory-filters {
  display: flex;
  gap: var(--space-md);
}

.directory-select {
  height: 46px;
  padding: 0 var(--space-xl) 0 var(--space-md);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 400;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%23555' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  min-width: 160px;
  transition: border-color 0.2s ease;
}

.directory-select:focus {
  border-color: var(--border-strong);
}

.directory-results-info {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-bottom: var(--space-lg);
  min-height: 18px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
}

.directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-md);
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  transition: border-color 0.2s ease, background-color 0.2s ease;
  position: relative;
}

.card:hover {
  border-color: var(--border-medium);
  background-color: var(--bg-card-hover);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-logo {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.card-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card-logo-fallback {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  text-transform: uppercase;
}

.card-status {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.card-status--live {
  color: var(--status-live);
  background: var(--status-live-bg);
}

.card-status--beta {
  color: var(--status-beta);
  background: var(--status-beta-bg);
}

.card-status--maintenance {
  color: var(--status-maintenance);
  background: var(--status-maintenance-bg);
}

.card-status--private {
  color: var(--status-private);
  background: var(--status-private-bg);
}

.card-name {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: var(--text-md);
  letter-spacing: -0.01em;
  color: var(--text-accent);
}

.card-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.55;
  font-weight: 400;
}

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

.card-chip {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-elevated);
  color: var(--text-tertiary);
  border: 1px solid var(--border-subtle);
}

.card-action {
  margin-top: auto;
  padding-top: var(--space-sm);
}

.card-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px 20px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  text-decoration: none;
}

.card-btn:hover {
  background-color: var(--border-medium);
  border-color: var(--border-strong);
  color: var(--text-accent);
}

.card-btn i {
  font-size: 0.65rem;
  opacity: 0.5;
}

.directory-empty {
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
  color: var(--text-tertiary);
}

.directory-empty i {
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
  display: block;
}

.directory-empty p {
  font-size: var(--text-sm);
}

/* Footer */
.footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-lg) 0;
}

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

.footer-copy {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  font-weight: 400;
}

.footer-link {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  font-weight: 500;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

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

/* Responsive */
@media (max-width: 900px) {
  :root {
    --text-2xl: 2rem;
    --text-3xl: 2.5rem;
  }

  .hero {
    padding: var(--space-2xl) 0;
  }

  .hero-inner {
    gap: var(--space-xl);
  }

  .hero-photo-frame {
    width: 160px;
    height: 160px;
  }

  .directory-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  :root {
    --text-2xl: 1.75rem;
    --text-xl: 1.375rem;
  }

  .container {
    padding: 0 var(--space-md);
  }

  .navbar-menu {
    gap: var(--space-md);
  }

  .navbar-link {
    font-size: var(--text-xs);
  }

  .hero {
    padding: var(--space-xl) 0;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    text-align: center;
  }

  .hero-photo-col {
    display: flex;
    justify-content: center;
  }

  .hero-photo-frame {
    width: 140px;
    height: 140px;
  }

  .hero-bio {
    align-items: center;
  }

  .hero-socials {
    justify-content: center;
  }

  .directory-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
  }

  .directory-count {
    align-items: flex-start;
  }

  .directory-controls {
    flex-direction: column;
  }

  .directory-filters {
    flex-direction: column;
    width: 100%;
  }

  .directory-select {
    width: 100%;
  }

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

@media (max-width: 380px) {
  :root {
    --text-2xl: 1.5rem;
  }

  .hero-photo-frame {
    width: 120px;
    height: 120px;
  }
}
