:root {
  --bg-dark: #0a0f1c;
  --bg-light: #ffffff;
  --text-light: #dbe8f4;
  --text-dark: #2c3e50;
  --accent: #6eb5d3;
  --accent-hover: #90d0e8;
  --link: #4dabf7;
  --card-bg: #2a3e4c;
  --card-bg-light: #f8f9fa;
}

body {
  font-family: system-ui, sans-serif;
  max-width: 600px;
  margin: 4rem auto;
  padding: 0 1rem;
  text-align: center;
  transition: bg 0.3s, color 0.3s;
}

body.dark {
  background: var(--bg-dark);
  color: var(--text-light);
}

body:not(.dark) {
  background: var(--bg-light);
  color: var(--text-dark);
}

img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

body.dark h1 {
  color: #ffffff;
}

body:not(.dark) h1 {
  color: var(--text-dark);
}

p {
  font-size: 1.1rem;
  margin: 0.5rem 0;
}

.stations,
.links {
  margin-top: 1.5rem;
}

.stations span {
  display: block;
  margin: 0.5rem 0;
  font-size: 1.1rem;
  padding: 0.4rem;
}

body.dark .stations span {
  color: var(--text-light);
}

body:not(.dark) .stations span {
  color: var(--text-dark);
}

.links a {
  display: block;
  margin: 0.5rem 0;
  font-size: 1.1rem;
  text-decoration: none;
  padding: 0.4rem;
  border-radius: 6px;
  color: var(--link);
}

.links a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.links a i,
.stations span i {
  margin-right: 8px;
}

.toggle-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  cursor: pointer;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: var(--accent);
}

.sidebar-toggle {
  position: absolute;
  top: 1rem;
  left: 1rem;
  cursor: pointer;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: var(--accent);
  z-index: 1001;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 250px;
  background-color: var(--card-bg);
  padding-top: 4rem;
  display: flex;
  flex-direction: column;
  align-items: start;
  padding-left: 2rem;
  transition: transform 0.3s ease;
  z-index: 1000;
  transform: translateX(-100%);
  box-shadow: 2px 0 10px rgba(0,0,0,0.3);
}

body:not(.dark) .sidebar {
  background-color: var(--card-bg-light);
  box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.sidebar a {
  margin: 1rem 0;
  color: var(--text-light);
  text-decoration: none;
  font-size: 1.1rem;
  transition: color 0.3s;
}

body:not(.dark) .sidebar a {
  color: var(--text-dark);
}

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

.sidebar.visible {
  transform: translateX(0);
}

.sidebar-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  cursor: pointer;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: var(--accent);
}

.sidebar-close:hover,
.sidebar-toggle:hover,
.toggle-btn:hover {
  color: var(--accent-hover);
}

/* Overlay for when sidebar is open */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: none;
}

.overlay.visible {
  display: block;
}

/* Sections styling */
.section {
  margin-top: 4rem;
  padding: 2rem 0;
  text-align: center;
}

.section h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

body.dark .section h2 {
  color: var(--text-light);
}

body:not(.dark) .section h2 {
  color: var(--text-dark);
}

.section p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

/* Projects styling */
.project {
  margin-bottom: 2rem;
  padding: 1.5rem;
  border-radius: 8px;
  background-color: var(--card-bg);
}

body:not(.dark) .project {
  background-color: var(--card-bg-light);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.project h3 {
  margin-bottom: 0.5rem;
  color: var(--accent);
}

/* Contact section */
.contact-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}

.contact-links a {
  display: inline-flex;
  align-items: center;
  padding: 0.8rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  color: var(--link);
  transition: all 0.3s;
}

.contact-links a:hover {
  color: var(--accent-hover);
  transform: translateY(-2px);
}

.contact-links a i {
  margin-right: 8px;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Add some spacing at the bottom */
body {
  padding-bottom: 3rem;
}

/* Homelab grid styling */
.homelab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.homelab-item {
  padding: 1.5rem;
  border-radius: 8px;
  background-color: var(--card-bg);
  text-align: center;
  transition: transform 0.3s;
}

body:not(.dark) .homelab-item {
  background-color: var(--card-bg-light);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.homelab-item:hover {
  transform: translateY(-5px);
}

.homelab-item i {
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: 1rem;
  display: block;
}

.homelab-item h3 {
  margin-bottom: 0.5rem;
  color: var(--accent);
}

.homelab-item p {
  font-size: 0.95rem;
  margin: 0;
}

/* Legal section styling */
.legal-content {
  margin-top: 2rem;
}

.legal-content h3 {
  color: var(--accent);
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.legal-content p {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

/* Footer spacing */
#legal {
  padding-bottom: 4rem;
}

/* Go to link styling */
.go-to-link {
  display: inline-flex;
  align-items: center;
  padding: 0.8rem 1.5rem;
  background-color: var(--accent);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 1.1rem;
  transition: all 0.3s;
}

.go-to-link:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
}

.go-to-link i {
  margin-right: 8px;
}

/* Modal styling */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  animation: fadeIn 0.3s;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background-color: var(--card-bg);
  margin: 15% auto;
  padding: 2rem;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  position: relative;
  animation: slideIn 0.3s;
  text-align: center;
}

body:not(.dark) .modal-content {
  background-color: var(--card-bg-light);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-close {
  position: absolute;
  right: 1rem;
  top: 0.5rem;
  font-size: 2rem;
  font-weight: bold;
  color: var(--accent);
  cursor: pointer;
  transition: color 0.3s;
}

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

.modal h3 {
  color: var(--accent);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.modal p {
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.modal-button {
  background-color: var(--accent);
  color: white;
  border: none;
  padding: 0.8rem 2rem;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
}

.modal-button:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
}
