/* Dracula-inspired Light Theme */
:root {
  --bg-color: #edeef7;
  --text-color: #1e1e1e;
  --card-bg: #f7f7fb;
  --header-bg: #dcdff2;
  --header-text: #1e1e1e;
  --accent: #6272a4;
  --accent-hover: #7082c4;
  --secondary: #bd93f9;
  --secondary-hover: #9a6df0;
  --logo-color: #7082c4;
  --footer-bg: #dcdff2;
  --footer-text: #1e1e1e;
}

/* Dark theme (Dracula classic) */
[data-theme="dark"] {
  --bg-color: #1e1e1e; 
  --text-color: #f8f8f2;
  --card-bg: #282a36;
  --header-bg: #44475a;
  --header-text: #f8f8f2;
  --accent: #bd93f9;
  --accent-hover: #9a6df0;
  --secondary: #6272a4;
  --secondary-hover: #7082c4;
  --logo-color: #bd93f9;
  --footer-bg: #44475a;
  --footer-text: #f8f8f2;
}

/* Global styles */
body {
  background: var(--bg-color);
  color: var(--text-color);
  font-family: Arial, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  transition: background 0.5s ease, color 0.5s ease;
}

header {
  background: var(--header-bg);
  color: var(--header-text);
  padding: 1.5rem;
  text-align: center;
  position: relative;
}

h1, h2 {
  margin-top: 0;
  color: var(--text-color);
}

.project-card {
  background: var(--card-bg);
  color: var(--text-color);
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  margin: 2rem auto;
  max-width: 900px;
  transition: background 0.5s ease, color 0.5s ease;
}

.project-card.sub {
  background: var(--header-bg);
}

h2 {
  border-bottom: 2px solid #eee;
  padding-bottom: 0.3rem;
}

/* Preview images */
.preview {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.preview img {
  max-width: 800px;   /* limit image size */
  height: auto;
  border: 1px solid #ccc;
  border-radius: 2px;
}

img, .ascii-logo, .project-card img {
  max-width: 100%;
  height: auto;
  display: block;
}

.header { position: relative; }
.header .ascii-logo { position: relative; top: 0; left: 0; }

/* Buttons */
.buttons {
  margin-top: 1rem;
  display: flex;
  gap: .25rem;
  flex-wrap: wrap;
  justify-content: center;
}

.buttons.card {
  justify-content: left;
}

pre {
  display: inline-block;
  overflow-x: auto;
}

code {
  background: var(--header-bg);
}

/* ASCII Art Logo Styling */
.ascii-logo {
  font-family: "Courier New", monospace;
  font-size: 12px;
  line-height: 1.1;
  white-space: pre;
  color: var(--logo-color);
  text-align: center;
  margin: 1rem 0;
}

/* Theme toggle button (fixed top-right) */
#theme-toggle {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.4rem 0.6rem;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  background: var(--accent);
  color: #fff;
  transition: background 0.5s ease, transform 0.5s ease;
}

#theme-toggle:hover {
  background: var(--accent-hover);
  transform: scale(1.1);
}

/* Footer */
footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
  margin-top: 2rem;
}