
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

@media (max-width: 768px) {
  #sidebar {
    /* special mobile styles if needed */
  }
}

:root {
  --base-color: #1a1a1a;
  --accent-color: #fffb96;
  --text-color: #f2ed57;
  --bg-color: #000000;
  --retro-border: 4px double #f2ed57;
  --transition: 0.4s ease;
}

body.light {
  --base-color: #ebe896;
  --bg-color: #babab6;
  --text-color: #222;
  --retro-border: 4px double #222;
}
.post h2::before {
  content: "★ ";
}

* {
  transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease;
}

body {
   cursor: url('cursor.png')8 8, auto;
  font-family: 'Press Start 2P', cursive;
  background-image: url('optimized.gif');
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text-color);
  line-height: 1.5;
  padding: 15px;
  margin-left: 180px;
  transition: margin-left 0.3s ease;
}

body.light {
  background-image: url('sky.gif');
}

header {
  background-color: transparent;
  padding: 20px 0;
  text-align: center;
}

.header-container {
  display: inline-block;
  border: var(--retro-border);
  padding: 10px 20px;
  background-color: var(--base-color);
}

.pixel-corner {
  border: 4px solid var(--accent-color);
  clip-path: polygon(
    0 8px, 8px 8px, 8px 0, calc(100% - 8px) 0, calc(100% - 8px) 8px,
    100% 8px, 100% calc(100% - 8px), calc(100% - 8px) calc(100% - 8px),
    calc(100% - 8px) 100%, 8px 100%, 8px calc(100% - 8px), 0 calc(100% - 8px)
  );
}

.pixel-border {
  border-width: 16px;
  border-style: solid;
  border-image: url('pixel-border-corner.png') 16 stretch;
}

.retro-title {
  font-size: 20px;
  color: var(--accent-color);
  text-shadow: 2px 2px #ff00aa;
}
.pixel-border {
  border-width: 16px;
  border-style: solid;
  border-image: url('pixel-border.png') 16 stretch;
}

.about {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
  margin-bottom: 40px;
}

.profile-pic {
  width: 120px;
  height: 120px;
  border-radius: 0;
  border: var(--retro-border);
  image-rendering: pixelated;
}

.pixel-border {
  border-width: 16px;
  border-style: solid;
  border-image: url('pixel-border.png') 16 stretch;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 20px 0;
  margin-top: auto;
}

.social-icons img {
  width: 24px;
  height: 24px;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 2px var(--accent-color));
}

.portfolio-image {
  width: 100%;
  max-width: 400px;
  height: auto;
  margin-top: 10px;
  border: var(--retro-border);
  image-rendering: pixelated;
}

.bio h2 {
  font-size: 16px;
  margin-bottom: 5px;
}

.blog-posts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.blog-posts .post {
  background-color: var(--base-color);
  border: var(--retro-border);
  padding: 20px;
  font-size: 12px;
}

footer {
  margin-top: 40px;
  text-align: center;
  font-size: 10px;
  color: var(--text-color);
  opacity: 0.7;
}

/* Sidebar styles */
#sidebar {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 200px;
  height: 100%;
  min-height: 100vh; /* Covers full height */
  overflow-y: auto;  /* Scroll if content is taller than screen */
  background-color: var(--base-color);
  border-right: var(--retro-border);
  padding: 20px 0;
  z-index: 1000;
  transition: transform 0.3s ease;
}
#sidebar.no-transition {
  transition: none !important;
}
.top-buttons {
  position: fixed;
  top: 1rem;
  left: 1rem;
  display: flex;
  gap: 0.5rem;
  z-index: 1000;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
}


#sidebar-toggle,
#theme-toggle {
  background: var(--secondary-color);
  color: var(--text-color);
  border: none;
  padding: 0.5rem;
  font-size: 1.2rem;
  border-radius: 4px;
  cursor: pointer;
}
#sidebar.hidden {
  transform: translateX(-200px);
}

#sidebar ul {
  list-style: none;
  padding: 0;
  text-align: center;
}

#sidebar ul li {
  margin: 20px 0;
}

#sidebar a.active {
  background-color: var(--accent-color);
  color: black;
  padding: 6px 12px;
  border-radius: 6px;
}


#sidebar ul li a,
#sidebar ul li button {
  color: var(--text-color);
  text-decoration: none;
  font-size: 12px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Press Start 2P', cursive;
}

#sidebar ul li button#theme-toggle {
  background-color: var(--accent-color);
  color: black;
  padding: 8px 12px;
  box-shadow: 0 0 6px var(--accent-color);
  width: 100%;
  margin-top: 10px;
  text-align: center;
}
#sidebar.hidden {
  transform: translateX(-200px);
}

body.sidebar-hidden {
  margin-left: 0 !important;
}


/* Sidebar toggle button */
#sidebar-toggle {
  position: fixed;
  top: 20px;
  left: 20px;
  padding: 10px;
  background-color: var(--accent-color);
  color: black;
  font-family: 'Press Start 2P', cursive;
  z-index: 1000;
  border: none;
  cursor: pointer;
}

/* Content shift when sidebar hidden */
body.sidebar-hidden {
  margin-left: 0 !important;
}
