:root {
  --bg-color: #121212;
  --text-color: #e0e0e0;
  --link-color: #4fc3f7;
  --accent-color: #ffb74d;
  --font-inter: 'Inter', sans-serif;
  --font-montserrat: 'Montserrat', sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-inter);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  padding: 5rem 0; /* Add top and bottom padding for mobile */
}

body[data-theme="light"] {
  --bg-color: #FAEDCD;
  --text-color: #222222;
  --link-color: #007acc;
  --accent-color: #ff9800;
}

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

/* Navigation */
nav {
  position: fixed;
  top: 2rem;
  left: 2rem;
}

nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

nav a {
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

nav a:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

nav a.active {
  color: var(--link-color);
  border-bottom: 2px solid var(--link-color);
  padding: 0.5rem 1rem;
}

/* Container */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

/* Main Content */
.main-content {
  padding-top: 5rem;
}

/* Hero Section */
.hero {
  text-align: center;
  margin-top: 5rem;
}

.hero-heading {
  font-family: var(--font-montserrat);
  font-size: 3rem;
  margin-bottom: 1rem;
  color: #60A5FA;
  animation: fadeIn 1.5s ease-in-out;
}

.hero-paragraph {
  font-size: 1.2rem;
  line-height: 1.8;
  animation: fadeIn 2s ease-in-out;
}

/* Work-in-Progress Banner with Metal Chains */
.wip-banner-container {
  position: relative;
  max-width: 640px;
  margin: 2rem auto;
}

.chain-container {
  position: absolute;
  top: -70px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  z-index: 10;
  width: 100%;
  justify-content: center;
  pointer-events: none;
}

.chain {
  width: 8px;
  height: 60px;
  background: linear-gradient(to right, #555 0%, #888 5%, #888 15%, #555 20%, #555 80%, #888 85%, #888 95%, #555 100%);
  margin: 0 15px;
  position: relative;
  border-radius: 2px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
  transform-origin: top center;
  animation: chainSwing 4s ease-in-out infinite;
}

.chain:before {
  content: '';
  position: absolute;
  top: -10px;
  left: -3px;
  width: 14px;
  height: 14px;
  background: #666;
  border-radius: 50%;
  box-shadow: inset 0 0 5px #333, 0 2px 3px rgba(0, 0, 0, 0.5);
}

.chain:after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: -3px;
  width: 14px;
  height: 10px;
  background: #555;
  clip-path: polygon(0 0, 100% 0, 85% 100%, 15% 100%);
}

.chain-left {
  animation-delay: 0.2s;
}

.chain-right {
  animation-delay: 0.4s;
}

.wip-banner {
  background-color: #60A5FA;
  color: #2c2c2c;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  font-weight: 600;
  font-size: 1.1rem;
  text-align: center;
  position: relative;
  animation: bannerTilt 3s ease-out forwards;
  transform-origin: top center;
}

.wip-banner:before {
  content: '';
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  background: #666;
  border-radius: 50%;
  box-shadow: inset 0 0 5px #333, 0 2px 3px rgba(0, 0, 0, 0.5);
  z-index: 5;
}

.wip-banner:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px) rotate(3deg);
}

/* Chain swing animation */
@keyframes chainSwing {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: rotate(2deg); }
}

/* Banner tilt animation */
@keyframes bannerTilt {
  0% {
    transform: translateY(-100px) rotate(0deg);
    opacity: 0;
  }
  70% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  85% {
    transform: translateY(0) rotate(-2deg);
  }
  100% {
    transform: translateY(0) rotate(3deg);
  }
}

/* Light theme adjustments for chains */
body[data-theme="light"] .chain {
  background: linear-gradient(to right, #999 0%, #ccc 5%, #ccc 15%, #999 20%, #999 80%, #ccc 85%, #ccc 95%, #999 100%);
}

body[data-theme="light"] .chain:before {
  background: #aaa;
  box-shadow: inset 0 0 5px #777, 0 2px 3px rgba(0, 0, 0, 0.3);
}

body[data-theme="light"] .chain:after {
  background: #999;
}

body[data-theme="light"] .wip-banner:before {
  background: #aaa;
  box-shadow: inset 0 0 5px #777, 0 2px 3px rgba(0, 0, 0, 0.3);
}

/* Footer */
footer {
  text-align: center;
  margin-top: 4rem;
  padding: 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.footer-link {
  text-decoration: none;
  color: var(--text-color);
  transition: color 0.3s ease;
}

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

/* Icon Styling */
.footer-link i {
  margin-right: 0.5rem;
}

/* Theme Toggle Button */
#theme-toggle {
  position: fixed;
  top: 2rem;
  right: 2rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-color);
  transition: transform 0.3s ease, color 0.3s ease;
  font-size: 1.5rem;
}

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

body[data-theme="light"] #theme-toggle {
  color: #000;
}

/* General Content Styling */
h1, h2, h3, h4, h5, h6 {
  color: #60A5FA;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--link-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Cool Button for CV */
.cool-button {
  display: inline-block;
  padding: 1rem 2rem;
  background: linear-gradient(45deg, #3498db, #8e44ad);
  color: white;
  text-decoration: none;
  font-weight: 600;
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-top: 2rem;
}

.cool-button:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Fade-in Animation */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Design for Mobile Devices */
@media (max-width: 600px) {
  /* Adjusting top and bottom padding for more space */
  body {
    padding-top: 5rem;
    padding-bottom: 5rem;
  }

  .container {
    padding: 2rem 1rem; /* Reduce padding on mobile */
  }

  /* Make navigation non-fixed on mobile and center them */
  nav {
    position: static;
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 1rem 0;
  }

  nav ul {
    flex-direction: row;
    justify-content: center;
    gap: 0.5rem; /* Reduce gap for tighter layout */
  }

  .hero-heading {
    font-size: 2rem;
  }
  
  .hero-paragraph {
    font-size: 1rem;
  }
  
  /* Keep theme toggle fixed at the top right for mobile */
  #theme-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    margin: 0;
    display: block;
  }
  
  /* Make social links in footer align correctly */
  footer ul {
    flex-direction: column;
    gap: 1rem;
  }
  
  /* Adjust chain size for mobile */
  .chain {
    height: 50px;
    margin: 0 10px;
  }
  
  .chain-container {
    top: -60px;
  }
}
