/* ===========================================================
   Your site's styles. Change anything here — colors, fonts,
   sizes. Every page on the site uses this one file.
   =========================================================== */

/* Light is the default. Dark kicks in from your system setting,
   or from the toggle button (theme.js), which sets data-theme. */
:root {
  --ink: #16161a;          /* main text color */
  --muted: #5f5f6b;        /* quieter text */
  --accent: #6d28d9;       /* links and highlights (violet) */
  --accent-2: #db2777;     /* second gradient stop (magenta) */
  --accent-3: #0891b2;     /* third gradient stop (cyan) */
  --paper: #fbfaf7;        /* page background */
  --card: #ffffff;         /* card background */
  --line: #e6e3ee;         /* borders */
  --glow: rgba(109, 40, 217, 0.18);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #ececf1;
    --muted: #9a9aab;
    --accent: #a78bfa;
    --accent-2: #f472b6;
    --accent-3: #22d3ee;
    --paper: #0d0d13;
    --card: #15151f;
    --line: #26263a;
    --glow: rgba(167, 139, 250, 0.25);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --ink: #ececf1;
  --muted: #9a9aab;
  --accent: #a78bfa;
  --accent-2: #f472b6;
  --accent-3: #22d3ee;
  --paper: #0d0d13;
  --card: #15151f;
  --line: #26263a;
  --glow: rgba(167, 139, 250, 0.25);
  color-scheme: dark;
}

:root {
  --gradient: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3), var(--accent));
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 1.25rem 5rem;
  background: var(--paper);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* Keeps everything in a readable column in the middle of the page */
header, main, footer {
  max-width: 44rem;
  margin: 0 auto;
}

/* --- top navigation ---------------------------------------- */

header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1.5rem;
  padding: 2rem 0 1.5rem;
  margin-bottom: 2.5rem;
  position: relative;
}

/* The animated "signal" line under the header */
header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--gradient);
  background-size: 300% 100%;
  animation: flow 8s linear infinite;
}

@keyframes flow {
  from { background-position: 0% 0; }
  to   { background-position: 300% 0; }
}

header .site-name {
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
}

header nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 1.25rem;
}

header nav a:hover { color: var(--accent); }

header nav { display: flex; align-items: center; }

/* Light/dark toggle button (added by theme.js) */
.theme-toggle {
  margin-left: 1.25rem;
  width: 2.1rem;
  height: 2.1rem;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--glow);
}

/* --- text --------------------------------------------------- */

h1 {
  font-size: 2.1rem;
  line-height: 1.2;
  margin: 0 0 0.5rem;
}

/* Gradient text for the big name on the home page */
.gradient-text {
  background: var(--gradient);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: flow 12s linear infinite;
}

h2 {
  font-size: 1.3rem;
  margin: 2.5rem 0 0.75rem;
}

.tagline {
  color: var(--muted);
  font-size: 1.1rem;
  margin: 0 0 2rem;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover { color: var(--accent-2); }

/* --- the list of links on the projects pages ----------------- */

.card-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
}

.card-list li {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  margin-bottom: 0.9rem;
  transition: border-color 0.15s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.card-list li:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 24px var(--glow);
  transform: translateY(-2px);
}

.card-list a {
  display: block;
  padding: 1.1rem 1.25rem;
  text-decoration: none;
  color: inherit;
}

.card-list .title {
  font-weight: 700;
  color: var(--accent);
  display: block;
}

.card-list .description {
  color: var(--muted);
  font-size: 0.95rem;
}

/* --- sketch pages ------------------------------------------- */

.back {
  display: inline-block;
  margin-bottom: 1.5rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.back:hover { color: var(--accent); }

canvas { max-width: 100%; }

/* --- footer -------------------------------------------------- */

footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

/* Respect people who turn off animations in their OS settings */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
