/* Light Pixel Art Style */
:root {
  --primary: #6a7bff;
  --primary-light: #8c9bff;
  --secondary: #ff7eb5;
  --background: #fffaf5;
  --surface: #ffffff;
  --text: #333344;
  --text-light: #666677;
  --accent: #43c6ac;
  --border: 2px solid #333;
  --pixel-shadow: 4px 4px 0px #333333;
  --pixel-shadow-small: 2px 2px 0px #333333;
  --menu-height: 60px;
}

/* Dark Pixel Art Style */
body.dark-theme {
  --primary: #ff6a88;
  --primary-light: #ff8cab;
  --secondary: #8c9bff;
  --background: #151515;
  --surface: #1e1e1e;
  --text: #f0f0f5;
  --text-light: #aaaaaa;
  --accent: #43c6ac;
  --border: 2px solid #444;
  --pixel-shadow: 4px 4px 0px #000000;
  --pixel-shadow-small: 2px 2px 0px #000000;
  --menu-height: 60px;
}

body {
  font-family: 'VT323', 'Silkscreen', monospace;
  background-color: var(--background);
  color: var(--text);
  line-height: 1.6;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 20px 20px;
  padding-bottom: 2rem;
  font-size: 18px; /* 🔹 fixed body size */
  letter-spacing: 0.5px;
}

/* Import modern pixel art fonts */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Silkscreen:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

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

html, body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}

/* Main content grows and pushes footer down */
main {
  flex: 1;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header styles */
.site-header {
  background-color: var(--surface);
  border-bottom: var(--border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--pixel-shadow-small);
  transition: transform 0.3s ease;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.site-header h1 {
  font-family: 'Press Start 2P', 'Silkscreen', monospace;
  font-size: 36px; /* 🔹 fixed */
  color: var(--primary);
  text-shadow: 2px 2px 0px var(--primary-light);
  margin-bottom: 0.5rem;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.menu-toggle span {
  width: 100%;
  height: 3px;
  background-color: var(--text);
  border-radius: 2px;
  transition: all 0.3s linear;
  position: relative;
  transform-origin: center;
}

.site-header nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.site-header nav a {
  font-family: 'Silkscreen', 'VT323', monospace;
  color: var(--text);
  text-decoration: none;
  font-weight: bold;
  padding: 0.5rem;
  border: var(--border);
  background-color: var(--surface);
  box-shadow: var(--pixel-shadow-small);
  transition: all 0.2s ease;
}

.site-header nav a:hover {
  background-color: var(--primary);
  color: white;
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0px var(--primary-light);
}

/* Section styles */
.section {
  padding: 3rem 0;
}

.section h2 {
  font-family: 'Press Start 2P', 'Silkscreen', monospace;
  font-size: 28px; /* 🔹 fixed */
  margin-bottom: 2rem;
  color: var(--primary);
  text-shadow: 3px 3px 0px var(--primary-light);
  position: relative;
  display: inline-block;
}

.section h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: var(--secondary);
  image-rendering: pixelated;
}

.section h3 {
  font-family: 'Silkscreen', 'VT323', monospace;
  font-size: 22px; /* 🔹 fixed */
  margin: 2rem 0 1.5rem;
  color: var(--secondary);
}

/* About section */
.about-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-text p {
  margin-bottom: 1.5rem;
  font-size: 18px;
}

.about-photo img {
  width: 100%;
  border: var(--border);
  image-rendering: pixelated;
  box-shadow: var(--pixel-shadow);
  transition: all 0.3s ease;
}

.about-photo img:hover {
  transform: scale(1.05) rotate(2deg);
  box-shadow: 8px 8px 0px var(--primary-light);
}

.container p {
  margin-bottom: 1.5rem;
  font-size: 18px;
}

/* Projects section */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.project-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border: var(--border);
  background-color: var(--surface);
  transition: all 0.3s ease;
  box-shadow: var(--pixel-shadow);
}

.project-card:hover {
  transform: translate(-5px, -5px);
  background-color: var(--primary);
  box-shadow: 8px 8px 0px var(--primary-light);
}

.project-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-bottom: var(--border);
  image-rendering: pixelated;
}

.project-card h4 {
  font-family: 'Silkscreen', 'VT323', monospace;
  font-size: 18px;
  padding: 1rem;
  text-align: center;
  background-color: var(--surface);
  color: var(--text);
  margin: 0;
  transition: all 0.3s ease;
}

.project-card:hover h4 {
  background-color: var(--primary);
  color: var(--surface);
}

/* Contact section */
#contact .container {
  display: block;
}

#contact h2 {
  margin-bottom: 2.5rem;
}

.contact-navigation {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1.5rem;
  width: 100%;
}

.contact-navigation a {
  font-family: 'Silkscreen', 'VT323', monospace;
  color: var(--text);
  text-decoration: none;
  font-weight: bold;
  padding: 0.8rem 1.5rem;
  border: var(--border);
  background-color: var(--surface);
  transition: all 0.2s ease;
  box-shadow: var(--pixel-shadow-small);
}

.contact-navigation a:hover {
  background-color: var(--primary);
  color: white;
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0px var(--primary-light);
}

.contact-email {
  margin-bottom: 2rem;
  font-size: 20px; /* 🔹 fixed */
  text-align: center;
}

.contact-email a {
  font-family: 'Silkscreen', 'VT323', monospace;
  color: var(--primary);
  text-decoration: none;
  font-weight: bold;
  padding: 0.5rem 1rem;
  border: var(--border);
  background-color: var(--surface);
  transition: all 0.2s ease;
  box-shadow: var(--pixel-shadow-small);
}

.contact-email a:hover {
  background-color: var(--primary);
  color: white;
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0px var(--primary-light);
}

.social-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  justify-content: center;
}

.social-links a {
  font-family: 'Silkscreen', 'VT323', monospace;
  padding: 0.8rem 1.5rem;
  border: var(--border);
  background-color: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-weight: bold;
  transition: all 0.2s ease;
  box-shadow: var(--pixel-shadow-small);
}

.social-links a:hover {
  background-color: var(--primary);
  color: white;
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0px var(--primary-light);
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 2rem;
  border-top: var(--border);
  background-color: var(--surface);
  font-family: 'Silkscreen', 'VT323', monospace;
  transition: transform 0.3s ease;
}

/* Pixel elements */
.pixel-divider {
  height: 4px;
  background-color: var(--secondary);
  margin: 2rem 0;
  image-rendering: pixelated;
}

.pixel-button {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border: var(--border);
  background-color: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-weight: bold;
  transition: all 0.2s ease;
  box-shadow: var(--pixel-shadow-small);
  font-family: 'Silkscreen', 'VT323', monospace;
  cursor: pointer;
}

.pixel-button:hover {
  background-color: var(--primary);
  color: white;
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0px var(--primary-light);
}

/* Pixel art animations */
@keyframes pixel-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
.pixel-bounce { animation: pixel-bounce 2s infinite; }

/* Custom scrollbar */
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track {
  background: var(--surface);
  border-left: var(--border);
}
::-webkit-scrollbar-thumb {
  background: var(--primary);
  border: var(--border);
}
::-webkit-scrollbar-thumb:hover { background: var(--primary-light); }

/* ================== Responsive ================== */
@media (max-width: 1080px) {
  .container { padding: 0 1rem; }
  
  .menu-toggle { display: flex; z-index: 1000; }

  .about-grid {
    align-items: center;
    justify-items: center;
  }
  
  .about-photo img {
    width: 200px;
    border: var(--border);
    image-rendering: pixelated;
    box-shadow: var(--pixel-shadow);
    transition: all 0.3s ease;
  }
  
  .site-header nav {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 70%;
    max-width: 300px;
    background-color: var(--surface);
    border-left: var(--border);
    flex-direction: column;
    padding: 80px 20px 20px;
    transition: right 0.3s ease;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    z-index: 999;
    gap: 1rem;
  }
  .site-header nav.active { right: 0; }
  .site-header nav a { width: 100%; text-align: center; padding: 1rem; }
  
  .menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .menu-toggle.active span:nth-child(2) { opacity: 0; }
  .menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -6px); }
  
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .site-header .container { flex-direction: row; text-align: left; }
  
  /* Fixed font sizes for medium screens */
  .site-header h1 { font-size: 1.8rem; }
  .section { padding: 2rem 0; }
  .section h2 { font-size: 1.6rem; }
  .section h3 { font-size: 1.3rem; }
  .about-text p, .container p { font-size: 1.1rem; }
  .contact-email { font-size: 1.1rem; }
  
  .projects-grid { grid-template-columns: 1fr; }
  .social-links, .contact-navigation { justify-content: center; }
  .contact-navigation { flex-direction: column; align-items: center; }
  .contact-navigation a { width: 100%; text-align: center; }
  .social-links { flex-direction: column; align-items: center; }
  .social-links a { width: 100%; text-align: center; }
  
  a, button, .pixel-button {
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .project-card { padding: 0.5rem; }
  .project-card h4 { font-size: 1.1rem; }
}

@media (max-width: 480px) {
  /* Fixed header and footer scaling */
  .site-header, .site-footer {
    width: 100%;
    transform: none;
  }
  
  /* Fixed font sizes for small screens */
  .site-header h1 { 
    font-size: 1.5rem; 
    text-align: center;
    width: 100%;
  }
  
  .section h2 { font-size: 1.4rem; }
  .section h3 { font-size: 1.2rem; }
  .about-text p, .container p { font-size: 1rem; }
  .contact-email { font-size: 1rem; }
  .project-card h4 { font-size: 1rem; }
  
  /* Improved header layout for mobile */
  .site-header .container {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }
  
  /* Better spacing for mobile */
  .section {
    padding: 1.5rem 0;
  }
}

@media (max-width: 480px) {
  /* 🔹 Zoom header & footer */
  .site-header, .site-footer {
    transform: scale(1.1);
    transform-origin: center;
  }

  .site-header h1 { font-size: 24px; }
  .section h2 { font-size: 20px; }
  .section h3 { font-size: 18px; }
  .about-text p, .container p { font-size: 15px; }
  .contact-email { font-size: 18px; }
  .project-card h4 { font-size: 16px; padding: 0.8rem; }
}
