/* 1. Global Variables & Mode Definitions */
:root {
  /* DARK MODE (Default) */
  --bg-color: #000000;
  --text-primary: #ffffff;
  --text-secondary: #a1a1a1;
  --nav-link: #888;
  --border-color: #333;
  --modal-bg: #0a0a0a;
  --input-bg: #111;
  --btn-submit-bg: rgba(255, 255, 255, 0.75);
  --btn-submit-text: #000000;
  --btn-main-bg: #ffffff;
  --btn-main-text: #000000;
}

body.light-mode {
  /* LIGHT MODE Colors */
  --bg-color: #ffffff;
  --text-primary: #000000;
  --text-secondary: #555555;
  --nav-link: #666;
  --border-color: #e0e0e0;
  --modal-bg: #f9f9f9;
  --input-bg: #f0f0f0;
  --btn-submit-bg: #e0e0e0; /* Grayish button in light mode */
  --btn-submit-text: #000000;
  --btn-main-bg: #000000;
  --btn-main-text: #ffffff;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  letter-spacing: -0.015em;
  transition:
    background-color 0.4s ease,
    color 0.4s ease;
}

/* 2. Navigation & Toggle */
.navbar {
  display: flex;
  justify-content: flex-end;
  padding: 40px 60px;
}

.theme-btn {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--nav-link);
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.75rem;
  font-family: inherit;
  margin-right: 20px;
  transition: all 0.3s ease;
}

.theme-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-primary);
}

.nav-links a {
  color: var(--nav-link);
  text-decoration: none;
  margin-left: 25px;
  font-size: 0.85rem;
  transition: color 0.3s ease;
  letter-spacing: -0.01em;
}

.nav-links a:hover {
  color: var(--text-primary);
}

/* 3. Main Container */
.container {
  max-width: 1000px;
  margin: 80px auto 40px 15%;
  padding: 0 20px;
}

/* 4. Profile Picture */
.profile-pic img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  filter: grayscale(100%);
  transition:
    filter 0.3s ease,
    transform 0.2s ease;
  transform: scale(1);
  will-change: transform, filter;
  object-fit: cover;
}

.profile-pic img:hover {
  filter: grayscale(0%);
  transform: scale(1.05);
  cursor: pointer;
}

/* 5. Typography */
.intro h1 {
  font-size: 1.6rem;
  font-weight: 600;
  margin-top: 25px;
  margin-bottom: 12px;
  letter-spacing: -0.035em;
  color: var(--text-primary);
}

.tagline,
.about {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.55;
  margin-bottom: 20px;
  max-width: 850px;
  width: 100%;
  letter-spacing: -0.015em;
}

/* Bold text logic */
.about strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* 6. Skills Section */
.skills-section h3 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.skills-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #888;
  font-size: 0.85rem;
  margin-bottom: 40px;
}

.skills-list li:not(:last-child)::after {
  content: "•";
  margin-left: 10px;
  color: var(--border-color);
}

/* 7. Primary Action Button */
.btn {
  display: inline-block;
  background-color: var(--btn-main-bg);
  color: var(--btn-main-text);
  padding: 10px 30px;
  border-radius: 30px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  letter-spacing: -0.02em;
  transition: transform 0.2s ease;
}

.btn:hover {
  transform: scale(1.03);
}

/* 8. Modal Overlay & Container */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: var(--modal-bg);
  border: 1px solid var(--border-color);
  padding: 40px;
  border-radius: 24px;
  width: 90%;
  max-width: 480px;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  animation: modalPop 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-content h3 {
  text-align: center;
  margin-top: 5px;
  margin-bottom: 30px;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.close-btn {
  position: absolute;
  top: 20px;
  right: 25px;
  color: var(--nav-link);
  font-size: 20px;
  cursor: pointer;
  transition: color 0.2s;
}

.close-btn:hover {
  color: var(--text-primary);
}

/* 9. Contact Form Inputs */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-form input,
.contact-form textarea {
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  padding: 16px;
  color: var(--text-primary);
  border-radius: 12px;
  outline: none;
  font-family: inherit;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  transition: border-color 0.2s;
}

/* 10. The Submit Button */
.btn-submit {
  background-color: var(--btn-submit-bg);
  color: var(--btn-submit-text);
  border: none;
  padding: 16px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-top: 10px;
  letter-spacing: -0.02em;
}

/* 11. Fade-In Animations */
.fade-in {
  opacity: 0;
  transform: translateY(15px);
  animation: entrance 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes entrance {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.delay-1 {
  animation-delay: 0.1s;
}
.delay-2 {
  animation-delay: 0.25s;
}
.delay-3 {
  animation-delay: 0.4s;
}
.delay-4 {
  animation-delay: 0.55s;
}

/* 12. Responsive */
@media (max-width: 768px) {
  .container {
    margin: 40px auto;
    padding: 0 30px;
    max-width: 100%;
  }
  .navbar {
    padding: 30px;
  }
  .modal-content {
    padding: 30px;
  }
  .intro h1 {
    font-size: 1.4rem;
  }
}
