/* ---- tinywork.space (dark page, light card) ---- */
:root {
  color-scheme: dark;

  /* dark page palette */
  --bg: #0b0d11;      /* page background */
  --text: #e5e7eb;    /* default page text */
  --muted: #9ca3af;   /* secondary text on page */
  --border: #262a31;  /* page borders */

  /* darker blue accent */
  --accent: #2c54c9;       /* blue-800 */
  --accent-hover: #2c54c9; /* blue-700 */

  /* effects */
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  --row-hover: #161a21;
  --row-active: #10131a;
}

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

/* Base */
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  background-color: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem 1rem;
  line-height: 1.6;
  color: var(--text);
}

/* Page-level links (outside and inside card) */
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

/* --- Light card on dark background --- */
.container {
  background-color: #e9edf3;   /* soft light grey */
  color: #0b0d11;              /* dark ink inside card */
  border: 1px solid #d6dde6;   /* light border for card */
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 3rem 2.5rem;
  width: 75%;
  min-width: 320px;
  max-width: 900px;
  margin: auto;
}

/* Headings (inside card) */
.container h1 {
  font-size: 2rem;
  font-weight: 600;
  color: #0b0d11;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.container h2 {
  font-size: 1.125rem;
  font-weight: 400;
  color: #4b5563; /* slate-600 */
  margin-bottom: 3rem;
  letter-spacing: -0.01em;
}

/* List */
.experiments-list {
  list-style: none;
  margin-bottom: 3rem;
}

.experiment-item { border-bottom: 1px solid #dfe5ec; }
.experiment-item:last-child { border-bottom: none; }

/* Links / rows (inside card) */
.experiment-link {
  display: block;
  padding: 1.25rem 0.5rem; /* stays constant to prevent shift */
  text-decoration: none;
  color: inherit;          /* use card text */
  cursor: pointer;
  border-radius: 8px;
  margin: 0 -0.5rem;

  /* only animate colors/shadows; no layout animations */
  transition:
    background-color .15s linear,
    color .15s linear,
    box-shadow .15s linear,
    text-decoration-color .15s linear;
}

.experiment-link:hover {
  background-color: #f3f5f9;   /* gentle hover on light card */
  text-decoration: underline;  /* underline without moving */
}

.experiment-link:active { background-color: #edf1f7; }

/* Row header */
.experiment-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
}

.experiment-title {
  font-size: 1rem;
  font-weight: 500;
  color: #0b0d11;
}

.experiment-date {
  font-size: 0.75rem;
  color: #6b7280; /* slate-500 */
  font-weight: 400;
  white-space: nowrap;
}

.experiment-description {
  font-size: 0.875rem;
  color: #4b5563; /* slate-600 */
  line-height: 1.5;
}

/* Footer */
footer {
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted);             /* page-level fallback */
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  letter-spacing: -0.01em;
}

/* When footer is inside the card, keep it light-themed */
.container footer {
  color: #6b7280;                  /* slate-500 */
  border-top: 1px solid #dfe5ec;
}

/* Media queries */
@media (min-width: 640px) {
  .container { padding: 4rem 3.5rem; }
  .container h1 { font-size: 2.5rem; }
  .container h2 { font-size: 1.25rem; }
}

@media (min-width: 768px) {
  body { padding: 3rem 2rem; }
}

/* Accessibility */
.experiment-link:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 8px;
}

/* Gentle transitions */
@media (prefers-reduced-motion: no-preference) {
  body, .container, .experiment-link, .container h1, .container h2, footer {
    transition:
      background-color .15s linear,
      color .15s linear,
      border-color .15s linear,
      box-shadow .15s linear;
  }
}

/* Optional selection */
::selection { background: #1f2937; color: var(--accent); }
