:root {
  --bg-dark: #121212;
  --text-dark: #ffffff;
  --bg-light: #f5f5f5;
  --text-light: #121212;
  --primary: #5a5aff;
}

[data-theme="dark"] {
  background-color: var(--bg-dark);
  color: var(--text-dark);
}

[data-theme="light"] {
  background-color: var(--bg-light);
  color: var(--text-light);
}

body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  overflow: hidden;
  position: relative;
  min-height: 100vh;
}

/* Dot Grid Background */
#grid-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-size: 25px 25px;
  z-index: 0;
  pointer-events: none;
}

/* Canvas for trail */
#paint-canvas {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1;
  pointer-events: none;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 1.5rem;
  left: 0;
  right: 0;
  padding: 0 2rem;
  z-index: 10;
}

header h1 {
  margin: 0 auto;
  font-size: 2rem;
}

#themeToggle {
  border: 2px solid rgb(129, 129, 129);
  border-radius: 50%;
  background: none;
  width: 40px;
  height: 40px;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.3s;
}

#themeToggle:hover {
  background-color: currentColor;
  color: var(--bg-dark);
}

/* Centered Main */
.main-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 2;
}

.about {
  margin: 1rem 0 2rem;
  font-size: 1.1rem;
  line-height: 1.6;
}

.write-btn {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  border: 2px solid var(--primary);
  color: var(--primary);
  text-decoration: none;
  font-weight: bold;
  border-radius: 10px;
  transition: 0.3s;
}

.write-btn:hover {
  background: var(--primary);
  color: white;
}

/* Footer */
footer {
  position: fixed;
  bottom: 1rem;
  left: 0;
  right: 0;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  z-index: 10;
}

.github-link {
  text-decoration: none;
  color: inherit;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: 0.3s;
}

.github-link:hover {
  color: var(--primary);
}
