:root {
  --bg-color: #ffffff;
  --text-color: #1a1a1a;
  --card-bg: #f5f5f5;
  --card-hover: #e8e8e8;
  --border-color: #e0e0e0;
  --shadow: rgba(0, 0, 0, 0.1);
  --accent-color: #667eea;
}

[data-theme="dark"] {
  --bg-color: #1a1a1a;
  --text-color: #ffffff;
  --card-bg: #2d2d2d;
  --card-hover: #3a3a3a;
  --border-color: #404040;
  --shadow: rgba(0, 0, 0, 0.3);
  --accent-color: #8b9dff;
}

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

body {
  /* Use Lexend site-wide with system fallbacks */
  font-family:
    "Lexend",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  /* ensure content isn't obscured by a fixed footer */
  padding-bottom: 120px;
}

.container {
  max-width: 1200px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.left-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.right-section {
  display: flex;
  flex-direction: column;
}

/* Tab buttons (brand page) */
.tab {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-color);
  cursor: pointer;
  font-weight: 700;
}
.tab.active {
  background: linear-gradient(
    180deg,
    var(--accent-color),
    color-mix(in srgb, var(--accent-color) 82%, black 8%)
  );
  color: white;
  border-color: transparent;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
}

/* badge sizing */
.badge-sample {
  width: 160px;
  height: auto;
  display: inline-block;
  margin: 8px;
}

.profile {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 10px;
}

.avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--border-color);
  background: var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.avatar-icon {
  width: 50px;
  height: 50px;
  color: var(--text-color);
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.name {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
}

.description {
  font-size: 1.125rem; /* ~20px at 18px base */
  color: var(--text-color);
  opacity: 0.95;
  line-height: 1.6;
  font-weight: 600;
  margin-bottom: 16px;
}

.button-group {
  display: flex;
  gap: 12px;
  align-items: center;
}

.contact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  background: linear-gradient(
    180deg,
    var(--accent-color),
    color-mix(in srgb, var(--accent-color) 85%, black 15%)
  );
  border: 0;
  border-radius: 10px;
  text-decoration: none;
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    opacity 0.12s ease;
  box-shadow: 0 6px 24px rgba(102, 126, 234, 0.12);
}

.contact-button:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 12px 36px rgba(102, 126, 234, 0.14);
}

.github-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 50%;
  text-decoration: none;
  color: var(--text-color);
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px var(--shadow);
}

.github-button:hover,
.icon-button:hover {
  background: var(--card-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow);
}

.github-button svg,
.icon-button svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.links {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.link-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--card-bg) 98%, black 2%),
    var(--card-bg)
  );
  border: 1px solid var(--border-color);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-color);
  font-weight: 700;
  font-size: 15px;
  transition:
    transform 0.14s ease,
    box-shadow 0.14s ease,
    background 0.14s ease;
  box-shadow: 0 6px 20px rgba(10, 10, 10, 0.04);
}

.link-button:hover {
  background: var(--card-hover);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.08);
}

.link-subtitle {
  font-size: 12px;
  opacity: 0.8;
  margin-top: 6px;
}

/* Codebox and brand page tweaks */
pre.codebox {
  background: var(--card-bg);
  color: var(--text-color);
  padding: 14px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  position: relative;
}

button.copy-btn {
  position: absolute;
  right: 10px;
  top: 10px;
  background: transparent;
  color: var(--text-color);
  border: 1px solid var(--border-color);
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
}

button.copy-btn:hover {
  background: var(--card-hover);
  transform: translateY(-2px);
}

/* code token colors tuned for both themes */
.token-tag {
  color: #d97316;
}
.token-attr {
  color: #60a5fa;
}
.token-string {
  color: #10b981;
}
.token-link {
  color: #7dd3fc;
  text-decoration: underline;
}

/* smaller screen brand layout improvements */
@media (max-width: 900px) {
  .brand-hero {
    flex-direction: column;
    align-items: flex-start;
  }
  .brand-logo {
    width: 84px;
    height: 84px;
  }
}

/* Single-column container for long content pages like brand guidelines */
.container.single-column {
  grid-template-columns: 1fr;
  max-width: 900px;
  gap: 28px;
  padding: 24px;
}

/* code font and sizing */
pre.codebox,
pre.codebox code {
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, "Roboto Mono", "Courier New",
    monospace;
  font-size: 14px;
}

.link-title {
  flex: 1;
}

@media (max-width: 768px) {
  body {
    padding: 30px 16px;
  }

  .container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .profile {
    flex-direction: column;
    text-align: center;
  }

  .name {
    font-size: 28px;
  }

  .description {
    text-align: center;
  }

  .button-group {
    justify-content: center;
  }

  .link-button {
    padding: 18px 20px;
    font-size: 15px;
  }
}

/* site-wide footer fixed to bottom */
footer.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--card-bg);
  border-top: 1px solid var(--border-color);
  padding: 10px 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
footer.site-footer a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 600;
}
