:root
{
    /* Catppuccin Mocha Theme */
    --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;
}

/* ===== Catppuccin Latte (Light Theme) ===== */
body.light-theme {
    --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;
}
/* Ensure card shadows are appropriate for light theme */
body.light-theme .card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
body.light-theme .top-bar {
    background-color: rgba(230, 233, 239, 0.92); /* var(--mantle) light version */
}
body.light-theme .kvin-footer {
    background-color: var(--mantle);
}

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

body
{
    background-color: var(--base);
    color: var(--text);
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    padding: 2rem;
}

h1, h2, h3, h4, h5, h6
{
    color: var(--lavender);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

h1
{
    color: var(--pink);
    font-size: 2.5rem;
}

h2
{
    color: var(--mauve);
    border-bottom: 2px solid var(--surface0);
    padding-bottom: 0.3rem;
}

h3
{
    color: var(--blue);
}

a
{
    color: var(--sky);
    text-decoration: none;
    transition: color 0.2s ease;
}

a[disabled]
{
    color: rgba(0.7, 0.7, 0.7, 1.0);
    text-decoration: none;
}

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

button[disabled], .button[disabled]
{
    background-color: var(--surface1);
    color: var(--overlay2);
    border: 1px solid var(--surface1);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 1rem;
    pointer-events: none;
}

button, .button
{
    background-color: var(--surface0);
    color: var(--text);
    border: 1px solid var(--surface1);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

button:hover, .button:hover
{
    background-color: var(--surface1);
    border-color: var(--mauve);
    color: var(--mauve);
}

.card
{
    background-color: var(--mantle);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
    border: 1px solid var(--surface0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
}

.card-mini
{
    background-color: var(--mantle);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
    border: 1px solid var(--surface0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    width: auto;
    justify-content: center;
}

.card h3, .card-mini h3
{
    margin-top: 0;
}

.container
{
    max-width: 1200px;
    margin: 0 auto;
    background-color: var(--base);
    padding: 1rem;
}

code, pre
{
    background-color: var(--crust);
    border-radius: 8px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

code
{
    padding: 0.2rem 0.4rem;
    color: var(--green);
}

pre
{
    padding: 1rem;
    overflow-x: auto;
    border: 1px solid var(--surface0);
}

pre code
{
    background: none;
    padding: 0;
    color: var(--text);
}

input, textarea, select
{
    background-color: var(--surface0);
    border: 1px solid var(--surface2);
    color: var(--text);
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 1rem;
}

input:focus, textarea:focus, select:focus
{
    outline: none;
    border-color: var(--mauve);
}

.text-subtle
{
    color: var(--subtext0);
}

.bg-surface
{
    background-color: var(--surface0);
    /* padding: 1rem; */
    border-radius: 8px;
}

blockquote
{
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background-color: var(--surface0);
    border-left: 4px solid var(--mauve);
    border-radius: 0 12px 12px 0;
    color: var(--subtext0);
    font-style: italic;
}

blockquote p
{
    margin-bottom: 0.5rem;
}

blockquote footer, blockquote cite
{
    display: block;
    margin-top: 0.5rem;
    color: var(--lavender);
    font-style: normal;
    font-size: 0.9rem;
}

q
{
    quotes: "“" "”" "\u2018" "’";
    color: var(--peach);
    font-style: italic;
}

cite
{
    color: var(--sky);
    font-style: normal;
    font-weight: 500;
}

/* Force full-width sticky topbar */
body {
  margin: 0;
  padding: 0;
}

.demo-grid
{
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 2rem 0;
}

.demo-grid .card
{
    flex: 1;
    min-width: 200px;
}

.top-bar {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(24, 24, 37, 0.92); /* var(--mantle) with slight blur */
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--surface0);
  z-index: 1000;
  box-sizing: border-box;
}

.top-bar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.5rem 1.5rem;
  width: 100%;
  box-sizing: border-box;
}

/* Logo image */
.logo-img {
  height: 40px;
  width: auto;
  display: block;
  transition: opacity 0.2s;
  /* margin: 20px; */
}

.logo a:hover .logo-img {
  opacity: 0.8;
}

/* Navigation links */
.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--sky);
  border-bottom-color: var(--mauve);
}

/* Mobile menu button */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--text);
  padding: 0 0.5rem;
}

/* Responsive */
@media (max-width: 700px) {
  .menu-toggle {
    display: block;
  }
  
  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0.8rem;
    padding: 1rem 0 0.5rem 0;
  }
  
  .nav-links.open {
    display: flex;
  }
  
  .nav-links a {
    width: 100%;
    text-align: center;
    padding: 0.5rem;
    white-space: normal;
  }
  
  .logo-img {
    height: 40px;
  }
  
  .top-bar-container {
    padding: 0.5rem 1rem;
  }
}

.kvin-footer {
  background-color: var(--mantle);
  border-top: 1px solid var(--surface0);
  margin-top: 3rem;
  padding: 1.5rem 1rem;
  margin-bottom: 0;
  border-radius: 12px;
  width: 100%;
  box-sizing: border-box;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--surface1);
}

/* Brand: only logo now */
.footer-brand {
  display: flex;
  align-items: center;
}

.footer-logo {
  height: 40px;
  width: auto;
  display: block;
}

/* Link group */
.footer-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.footer-links a,
.footer-social a {
  color: var(--subtext0);
  text-decoration: none;
  transition: color 0.2s;
  font-size: 0.9rem;
}

.footer-links a:hover,
.footer-social a:hover {
  color: var(--peach);
}

/* Social links */
.footer-social {
  display: flex;
  gap: 1.2rem;
  align-items: center;
}

/* Copyright line */
.footer-copyright {
  text-align: center;
  font-size: 0.75rem;
  color: var(--overlay0);
  margin-top: 1rem;
}

/* Responsive: stack on small screens */
@media (max-width: 600px) {
  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 0.8rem;
  }
  .footer-links,
  .footer-social {
    justify-content: center;
  }
}

.hero {
  text-align: center;
  padding: 3rem 1rem;
  background: linear-gradient(135deg, var(--mantle), var(--base));
  border-radius: 24px;
  margin-bottom: 2rem;
}
.hero-title {
  font-size: 3.5rem;
  background: linear-gradient(135deg, var(--pink), var(--mauve));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  margin-bottom: 0.5rem;
}
.hero-subtitle {
  font-size: 1.2rem;
  color: var(--subtext0);
  margin-bottom: 1.5rem;
}
.btn-primary, .btn-secondary {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: 40px;
  text-decoration: none;
  margin: 0 0.5rem;
  transition: all 0.2s;
}
.btn-primary {
  background-color: var(--mauve);
  color: var(--crust);
}
.btn-primary:hover {
  background-color: var(--pink);
  transform: scale(1.02);
}
.btn-secondary {
  background-color: var(--surface0);
  color: var(--text);
  border: 1px solid var(--surface2);
}
.btn-secondary:hover {
  border-color: var(--mauve);
  color: var(--mauve);
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}
.card-link {
  display: inline-block;
  margin-top: 0.8rem;
  font-weight: bold;
}
.project-list {
  background-color: var(--surface0);
  border-radius: 16px;
  padding: 1rem;
  margin: 1rem 0;
}
.project-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.5rem;
  border-bottom: 1px solid var(--surface1);
}
.project-item:last-child {
  border-bottom: none;
}
.project-item strong {
  min-width: 80px;
}
.project-desc {
  color: var(--subtext0);
  font-size: 0.85rem;
  margin-left: auto;
}
.team-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  margin: 1.5rem 0;
}
.team-card {
  background-color: var(--mantle);
  border-radius: 20px;
  padding: 1.5rem;
  text-align: center;
  width: 260px;
  transition: transform 0.1s;
}
.team-card:hover {
  transform: translateY(-4px);
}
.team-avatar {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}
.team-role {
  font-size: 0.8rem;
  color: var(--subtext1);
  margin-top: 0.3rem;
}
.cta {
  text-align: center;
  background: var(--surface0);
  padding: 2rem;
  border-radius: 24px;
  margin: 2rem 0;
}

.theme-toggle {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0 0.5rem;
    color: var(--text);
    transition: transform 0.1s;
}
.theme-toggle:hover {
    transform: scale(1.1);
}
@media (max-width: 700px) {
    .theme-toggle {
        order: 2;
    }
    .menu-toggle {
        order: 3;
    }
}

[disabled] {
    pointer-events: none;
}

