/* ==========================================================================
   deyderae.dev — Catppuccin theme system
   Palettes: Latte, Frappé, Macchiato, Mocha
   Source: https://github.com/catppuccin/catppuccin (official hex values)
   ========================================================================== */

:root {
  --radius: 14px;
  --maxw: 880px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

/* ---- Latte (light) ---- */
[data-theme="latte"] {
  --rosewater: #dc8a78; --flamingo: #dd7878; --pink: #ea76cb; --mauve: #8839ef;
  --red: #d20f39; --maroon: #e64553; --peach: #fe640b; --yellow: #df8e1d;
  --green: #40a02b; --teal: #179299; --sky: #04a5e5; --sapphire: #209fb5;
  --blue: #1e66f5; --lavender: #7287fd;
  --text: #4c4f69; --subtext1: #5c5f77; --subtext0: #6c6f85;
  --overlay2: #7c7f93; --overlay1: #8c8fa1; --overlay0: #9ca0b0;
  --surface2: #acb0be; --surface1: #bcc0cc; --surface0: #ccd0da;
  --base: #eff1f5; --mantle: #e6e9ef; --crust: #dce0e8;
}
/* ---- Frappé ---- */
[data-theme="frappe"] {
  --rosewater: #f2d5cf; --flamingo: #eebebe; --pink: #f4b8e4; --mauve: #ca9ee6;
  --red: #e78284; --maroon: #ea999c; --peach: #ef9f76; --yellow: #e5c890;
  --green: #a6d189; --teal: #81c8be; --sky: #99d1db; --sapphire: #85c1dc;
  --blue: #8caaee; --lavender: #babbf1;
  --text: #c6d0f5; --subtext1: #b5bfe2; --subtext0: #a5adce;
  --overlay2: #949cbb; --overlay1: #838ba7; --overlay0: #737994;
  --surface2: #626880; --surface1: #51576d; --surface0: #414559;
  --base: #303446; --mantle: #292c3c; --crust: #232634;
}
/* ---- Macchiato ---- */
[data-theme="macchiato"] {
  --rosewater: #f4dbd6; --flamingo: #f0c6c6; --pink: #f5bde6; --mauve: #c6a0f6;
  --red: #ed8796; --maroon: #ee99a0; --peach: #f5a97f; --yellow: #eed49f;
  --green: #a6da95; --teal: #8bd5ca; --sky: #91d7e3; --sapphire: #7dc4e4;
  --blue: #8aadf4; --lavender: #b7bdf8;
  --text: #cad3f5; --subtext1: #b8c0e0; --subtext0: #a5adcb;
  --overlay2: #939ab7; --overlay1: #8087a2; --overlay0: #6e738d;
  --surface2: #5b6078; --surface1: #494d64; --surface0: #363a4f;
  --base: #24273a; --mantle: #1e2030; --crust: #181926;
}
/* ---- Mocha (default) ---- */
[data-theme="mocha"] {
  --rosewater: #f5e0dc; --flamingo: #f2cdcd; --pink: #f5c2e7; --mauve: #cba6f7;
  --red: #f38ba8; --maroon: #eba0ac; --peach: #fab387; --yellow: #f9e2af;
  --green: #a6e3a1; --teal: #94e2d5; --sky: #89dceb; --sapphire: #74c7ec;
  --blue: #89b4fa; --lavender: #b4befe;
  --text: #cdd6f4; --subtext1: #bac2de; --subtext0: #a6adc8;
  --overlay2: #9399b2; --overlay1: #7f849c; --overlay0: #6c7086;
  --surface2: #585b70; --surface1: #45475a; --surface0: #313244;
  --base: #1e1e2e; --mantle: #181825; --crust: #11111b;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }
[data-theme="latte"] { color-scheme: light; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--base);
  color: var(--text);
  transition: background-color 0.25s ease, color 0.25s ease;
  min-height: 100vh;
}

a { color: var(--blue); }
a:hover { color: var(--sapphire); }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* ---- Header / theme switcher ---- */
header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.wordmark {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  color: var(--mauve);
}
.wordmark span { color: var(--text); font-weight: 400; }

.theme-switcher {
  display: flex;
  gap: 6px;
  background: var(--mantle);
  border: 1px solid var(--surface0);
  border-radius: 999px;
  padding: 4px;
}

.theme-btn {
  border: none;
  cursor: pointer;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  padding: 0;
  position: relative;
  outline-offset: 2px;
}
.theme-btn[data-swatch="latte"]      { background: #eff1f5; box-shadow: inset 0 0 0 1px #acb0be; }
.theme-btn[data-swatch="frappe"]     { background: #303446; box-shadow: inset 0 0 0 1px #626880; }
.theme-btn[data-swatch="macchiato"]  { background: #24273a; box-shadow: inset 0 0 0 1px #5b6078; }
.theme-btn[data-swatch="mocha"]      { background: #1e1e2e; box-shadow: inset 0 0 0 1px #585b70; }
.theme-btn.active { box-shadow: 0 0 0 2px var(--base), 0 0 0 4px var(--mauve); }

/* ---- Hero ---- */
.hero { margin-bottom: 64px; }
.hero h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  line-height: 1.15;
  margin: 0 0 14px;
  color: var(--text);
}
.hero h1 .accent { color: var(--mauve); }
.hero p {
  font-size: 1.05rem;
  color: var(--subtext1);
  max-width: 60ch;
  margin: 0;
}

/* ---- Section headings ---- */
h2.section-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--overlay1);
  margin: 0 0 20px;
  font-weight: 600;
}

/* ---- Project cards ---- */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 64px;
}

.card {
  background: var(--mantle);
  border: 1px solid var(--surface0);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover {
  border-color: var(--mauve);
  transform: translateY(-2px);
}
.card .card-icon {
  font-size: 1.5rem;
  margin-bottom: 4px;
}
.card h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text);
}
.card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--subtext0);
  line-height: 1.5;
}
.card .tag {
  margin-top: auto;
  padding-top: 10px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--overlay1);
}
.card.disabled {
  opacity: 0.6;
  cursor: default;
}
.card.disabled:hover { transform: none; border-color: var(--surface0); }
.badge {
  display: inline-block;
  font-size: 0.68rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface0);
  color: var(--subtext0);
  width: fit-content;
}
.badge.live { background: color-mix(in srgb, var(--green) 20%, transparent); color: var(--green); }
.badge.soon { background: color-mix(in srgb, var(--peach) 20%, transparent); color: var(--peach); }

/* ---- Footer ---- */
footer.site {
  border-top: 1px solid var(--surface0);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--overlay0);
  font-size: 0.85rem;
}
footer.site a { color: var(--overlay1); }
footer.site a:hover { color: var(--mauve); }
