/*! concrete.css v3.1.0 | MIT License | github.com/louismerlin/concrete.css */
/*! alterNative.css v1.0.0 | MIT License | Based on concrete.css */

/**
 * 1. Design tokens (shadcn / Luxa inspired palette)
 * 2. Modern system font stack
 * 3. Soft card radiuses & focus rings
 */
:root {
  --bg: #ffffff;
  --fg: #09090b;
  --card: #ffffff;
  --card-subtle: #fbfbfb;
  --muted: #f4f4f5;
  --muted-fg: #71717a;
  --border: #e4e4e7;
  --primary: #18181b;
  --primary-fg: #fafafa;
  --ring: rgba(24, 24, 27, 0.12);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter,
    system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    monospace;
  --main-width: 760px;
  --radius: 0.6rem;
  --radius-sm: 0.375rem;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.04), 0 1px 2px -1px rgba(0, 0, 0, 0.04);
}

/**
 * Dark theme (Zinc deep tones)
 */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #09090b;
    --fg: #fafafa;
    --card: #121215;
    --card-subtle: #18181b;
    --muted: #27272a;
    --muted-fg: #a1a1aa;
    --border: #27272a;
    --primary: #fafafa;
    --primary-fg: #18181b;
    --ring: rgba(250, 250, 250, 0.15);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
    --shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
  }
}

/* Base setup */
html {
  font-size: 16px;
  line-height: 1.6;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

*, ::after, ::before {
  box-sizing: inherit;
  border-color: var(--border);
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font);
}

/* Layout containers */
body > header,
body > main,
body > footer {
  margin: auto;
  max-width: var(--main-width);
  padding: 0 1.25rem;
  width: 100%;
}

body > header {
  padding-top: 5rem;
  padding-bottom: 3rem;
}

main section + section {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

footer {
  padding: 3rem 1.25rem;
  color: var(--muted-fg);
  font-size: 0.875rem;
  text-align: center;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--fg);
  font-weight: 600;
  line-height: 1.25;
  margin-top: 1.8rem;
  margin-bottom: 0.6rem;
  letter-spacing: -0.02em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1rem; }
h5, h6 { font-size: 1rem; }

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

a {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 4px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

a:hover {
  text-decoration-color: var(--fg);
}

/* Navigation */
nav {
  margin: 1.5rem 0;
}

nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

nav a {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted-fg);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background-color 0.15s ease, color 0.15s ease;
}

nav a:hover,
nav a[aria-current="page"] {
  color: var(--fg);
  background-color: var(--muted);
}

/* Card pattern & Boxes */
.card,
fieldset,
blockquote {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-card);
}

blockquote {
  border-left: 3px solid var(--primary);
  font-style: italic;
  color: var(--muted-fg);
  margin-left: 0;
  margin-right: 0;
}

/* Code & Preformatted */
code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background-color: var(--muted);
  color: var(--fg);
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

pre {
  background-color: var(--card-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
  margin: 1rem 0;
}

pre > code {
  background: transparent;
  padding: 0;
  border: none;
  font-size: 0.875rem;
  line-height: 1.5;
  color: inherit;
}

/* Interactive: Buttons */
button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  background-color: var(--primary);
  color: var(--primary-fg);
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: opacity 0.15s ease, box-shadow 0.15s ease;
}

button:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
input[type="submit"]:hover {
  opacity: 0.9;
}

button:focus-visible,
input[type="button"]:focus-visible,
input[type="submit"]:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}

button:disabled,
input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Interactive: Inputs & Forms */
label, legend {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
}

input[type="email"],
input[type="number"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="text"],
input[type="url"],
textarea,
select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  margin-bottom: 0.85rem;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--fg);
  box-shadow: 0 0 0 3px var(--ring);
}

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

/* Tables */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.5rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.875rem;
}

th {
  background-color: var(--muted);
  color: var(--muted-fg);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}

td {
  border-bottom: 1px solid var(--border);
}

tr:last-child td {
  border-bottom: none;
}

/* Lists & Figures */
ul {
  padding-left: 1.25rem;
}

figure {
  margin: 1.5rem 0;
}

figcaption {
  font-size: 0.85rem;
  color: var(--muted-fg);
  text-align: center;
  margin-top: 0.5rem;
}

img, .img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}

/* Progress & Horizontal Rule */
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

progress {
  appearance: none;
  display: block;
  width: 100%;
  height: 0.5rem;
  overflow: hidden;
  border-radius: 9999px;
  background-color: var(--muted);
  border: none;
  margin: 1rem 0;
}

progress::-webkit-progress-bar {
  background-color: var(--muted);
}

progress::-webkit-progress-value {
  background-color: var(--primary);
  border-radius: 9999px;
}

progress::-moz-progress-bar {
  background-color: var(--primary);
  border-radius: 9999px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  background: var(--muted);
  color: var(--fg);
  border: 1px solid var(--border);
  text-decoration: none;
  margin-right: 0.35rem;
  margin-bottom: 0.35rem;
}

.badge:hover {
  background: var(--border);
}

.row {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

.row .column {
  flex: 1 1 0%;
  min-width: 0;
}

@media (min-width: 48rem) {
  .row {
    flex-direction: row;
  }
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay:target {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: 440px;
  width: 90%;
  box-shadow: var(--shadow-card);
}