/* Dark theme inspired by mux desktop app */

:root {
  /* Core palette */
  --color-background: hsl(0 0% 12%);
  /* page bg */
  --color-surface: hsl(60 1% 15%);
  /* panels/cards */
  --color-hover: hsl(0 0% 16.5%);
  --color-foreground: hsl(0 0% 83%);
  /* primary text */
  --color-muted: hsl(0 0% 60%);
  /* secondary text */
  --color-border: hsl(240 2% 25%);
  --color-border-strong: hsl(240 3% 22%);
  --color-code-bg: hsl(0 6.43% 8.04%);

  /* Accent */
  --color-accent: hsl(207 100% 40%);
  /* VS Code blue vibe */
  --color-accent-hover: hsl(207 100% 45%);

  /* Success / Danger (light touch) */
  --color-success: hsl(122 39% 49%);
  --color-danger: hsl(4 90% 58%);

  /* Typography */
  --font-primary:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", "Roboto", "Helvetica Neue",
    Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  --font-mono:
    ui-monospace, "SFMono-Regular", "Menlo", "Monaco", "Consolas", "Liberation Mono",
    "Courier New", monospace;

  /* Layout */
  --radius: 10px;
  --container-width: 720px;
  /* thin content area */
  --container-padding: 20px;
}

/* Base reset-ish */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-foreground);
  font-family: var(--font-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
}

/* Page chrome */
.page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.site-header {
  margin-top: 100px;
  background: none;
  backdrop-filter: blur(4px);
}

.site-footer {
  margin-top: auto;
  color: var(--color-muted);
  background: none;
}

.site-main {
  flex: 1 1 auto;
  padding: 24px 0;
}

/* Center and pad header/footer content */
.site-header .container,
.site-footer .container {
  text-align: center;
  padding-top: 16px;
  padding-bottom: 16px;
}

/* Centered, thin content area */
.container {
  max-width: var(--container-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 0.6em;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h1 {
  font-size: 1.6rem;
}

h2 {
  font-size: 1.35rem;
}

h3 {
  font-size: 1.15rem;
}

p {
  margin: 0 0 1em;
  color: var(--color-foreground);
}

small,
.muted {
  color: var(--color-muted);
}

/* Links */
a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 150ms ease;
}

a:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Stealth link: looks like text until hover */
.stealth-link {
  color: inherit;
  text-decoration: none;
  transition: color 150ms ease;
}

.stealth-link:hover {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Lists */
ul,
ol {
  padding-left: 1.25em;
  margin: 0.6em 0 1em;
}

li {
  margin: 0.25em 0;
}

/* Code + Pre */
code,
kbd,
samp {
  font-family: var(--font-mono);
  font-size: 0.95em;
}

pre {
  margin: 1em 0;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--color-code-bg);
  border: 1px solid var(--color-border-strong);
  overflow-x: auto;
}

pre code {
  background: transparent;
}

/* Blockquotes */
blockquote {
  margin: 1em 0;
  padding: 8px 14px;
  border-left: 3px solid var(--color-border);
  color: var(--color-muted);
  background: color-mix(in srgb, var(--color-surface), transparent 80%);
  border-radius: 4px;
}

/* Forms (light touch) */
input[type="text"],
input[type="email"],
input[type="search"],
input[type="password"],
input[type="number"],
input[type="date"],
textarea,
select {
  display: block;
  box-sizing: border-box;
  width: 100%;
  color: var(--color-foreground);
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 1rem;
  outline: none;
  transition: border-color 150ms ease, background 150ms ease;
}

input::placeholder,
textarea::placeholder {
  color: var(--color-muted);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--color-accent);
  background: var(--color-hover);
}

/* Buttons */
button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: var(--color-hover);
  color: var(--color-foreground);
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

button:hover,
.btn:hover {
  background: color-mix(in srgb, var(--color-hover), white 2%);
  border-color: color-mix(in srgb, var(--color-border), var(--color-accent) 30%);
  text-decoration: none;
}

button.primary,
.btn.primary {
  border-color: color-mix(in srgb, var(--color-accent), transparent 30%);
  background: color-mix(in srgb, var(--color-accent), transparent 85%);
  color: var(--color-foreground);
}

button.primary:hover,
.btn.primary:hover {
  background: color-mix(in srgb, var(--color-accent), transparent 80%);
}

/* Tables (compact, readable) */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  font-size: 0.95rem;
}

th,
td {
  border: 1px solid var(--color-border);
  padding: 8px 10px;
  text-align: left;
}

th {
  background: color-mix(in srgb, var(--color-surface), transparent 80%);
  font-weight: 600;
}

tr:nth-child(even) td {
  background: color-mix(in srgb, var(--color-surface), transparent 90%);
}

/* Horizontal rule */
hr {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: 1.4em 0;
}

/* Utility: subtle surfaces to frame content when needed */
.surface {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.surface--padded {
  padding: 16px;
}

/* Utility: center column card effect (optional wrapper) */
.content-surface {
  background: color-mix(in srgb, var(--color-surface), transparent 30%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
}

/* Make images responsive in the column */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Accessibility focus */
::focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Header title styling */
.header-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-foreground);
  text-transform: lowercase;
}

/* Homepage hero spacing */
.hero {
  padding: 48px 0 36px;
}

/* GitHub button */
.btn--lg {
  padding: 12px 18px;
  font-size: 1rem;
}

.btn-github {
  background: #000;
  color: #fff;
  border-color: #111;
}

.btn-github:hover {
  background: #111;
  border-color: #222;
  color: #fff;
}

.btn-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  margin-right: 8px;
  vertical-align: middle;
}

/* Avatar */
.avatar {
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  object-fit: cover;
  border: 1px solid var(--color-border);
  background: var(--color-background);
}

/* Collapsible sections */
details.collapsible {
  background: color-mix(in srgb, var(--color-surface), transparent 30%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

details.collapsible summary {
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-muted);
  transition: color 150ms ease;
}

details.collapsible summary::-webkit-details-marker {
  display: none;
}

details.collapsible summary::before {
  content: "▸";
  font-size: 0.8em;
  transition: transform 200ms ease;
}

details.collapsible[open] summary::before {
  transform: rotate(90deg);
}

details.collapsible summary:hover {
  color: var(--color-foreground);
}

details.collapsible .collapsible-content {
  padding: 0 16px 16px;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

details.collapsible ol {
  margin: 0;
  padding-left: 1.5em;
}

details.collapsible li {
  margin: 0.6em 0;
  line-height: 1.5;
}

details.collapsible code {
  background: var(--color-code-bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}