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

/* Colors */
:root {
  --bg-light: #f9f9f9;
  --bg-dark: #121212;
  --text-dark: #222222;
  --text-light: #eaeaea;
  --gray-light: #a0a0a0;
  --gray-medium: #555555;
}

/* Body & Basics */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  scroll-behavior: smooth;
  padding: 0 1.5rem;
  transition: background 0.3s ease, color 0.3s ease;
}

/* Dark Mode */
.dark {
  background: var(--bg-dark);
  color: var(--text-light);
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--gray-light);
  flex-wrap: wrap;
}

.logo {
  font-size: 2rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-dark);
  user-select: none;
}

.dark .logo {
  color: var(--text-light);
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.theme-toggle {
  cursor: pointer;
  font-size: 1.4rem;
  color: var(--text-dark);
  transition: color 0.3s;
}

.dark .theme-toggle {
  color: var(--text-light);
}

.btn-filled {
  background: var(--text-dark);
  color: var(--bg-light);
  padding: 0.45rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.btn-filled:hover,
.btn-filled:focus {
  background: var(--gray-medium);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  outline: none;
}

.dark .btn-filled {
  background: var(--text-light);
  color: var(--bg-dark);
  box-shadow: 0 2px 6px rgba(255,255,255,0.2);
}

.dark .btn-filled:hover,
.dark .btn-filled:focus {
  background: var(--gray-medium);
  box-shadow: 0 4px 10px rgba(255,255,255,0.3);
}

/* Intro Section */
.intro {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 4rem 0 2rem;
  gap: 2rem;
}

.intro-left {
  flex: 1 1 300px;
  max-width: 600px;
}

.intro-left h1 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.dark .intro-left h1 {
  color: var(--text-light);
}

.intro-left p {
  font-size: 1.2rem;
  line-height: 1.8;
  margin-bottom: 1rem;
  color: var(--gray-medium);
}

.dark .intro-left p {
  color: var(--gray-light);
}

/* Social Icons */
.socials a {
  font-size: 1.3rem;
  color: inherit;
  margin-right: 1rem;
  transition: transform 0.3s ease, color 0.3s ease;
}

.socials a:hover {
  transform: scale(1.2);
  color: var(--gray-medium);
}

.dark .socials a:hover {
  color: var(--gray-light);
}

/* Projects Section */
.projects-section {
  padding: 3rem 0 2rem;
}

.projects-section h2 {
  margin-bottom: 1.5rem;
  font-size: 2rem;
  color: var(--text-dark);
  text-align: center;
}

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

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.8rem;
}

.project {
  background: var(--bg-light);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  color: var(--text-dark);
  position: relative;
  overflow: hidden;
}

.project:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.dark .project {
  background: #1e1e1e;
  color: var(--text-light);
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.05);
}

.dark .project:hover {
  box-shadow: 0 8px 20px rgba(255, 255, 255, 0.15);
}

.project h3 {
  margin-bottom: 0.5rem;
  font-size: 1.4rem;
  color: var(--text-dark);
}

.dark .project h3 {
  color: var(--text-light);
}

.project p {
  font-size: 1rem;
  color: var(--gray-medium);
}

.dark .project p {
  color: var(--gray-light);
}

/* Project Links */
.project-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-dark);
  transition: color 0.3s ease;
}

.project-link:hover,
.project-link:focus {
  color: var(--gray-medium);
  outline: none;
}

.dark .project-link {
  color: var(--text-light);
}

.dark .project-link:hover,
.dark .project-link:focus {
  color: var(--gray-light);
}

/* Inline links */
.inline-link {
  font-weight: 600;
  color: var(--text-dark);
  text-decoration: underline;
}

.dark .inline-link {
  color: var(--text-light);
}

/* Features Section */
.features {
  margin: 3rem 0;
  background-color: var(--bg-light);
  padding: 3rem 2rem;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--text-dark);
}

.features:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.15);
}

.dark .features {
  background-color: #222;
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.15);
  color: var(--text-light);
}

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

.features ul {
  padding-left: 1.5rem;
  font-size: 1.2rem;
  line-height: 2.2;
  color: var(--gray-medium);
}

.dark .features ul {
  color: var(--gray-light);
}

.features li::marker {
  color: var(--gray-medium);
}

.features li:hover {
  color: var(--gray-light);
  transform: translateX(6px);
}

/* Learning Pill */
.learning-pill {
  display: inline-block;
  margin: 2rem auto 0;
  padding: 0.4rem 1.2rem;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  background-color: #e0e0e0;
  color: #222;
  max-width: fit-content;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.learning-pill:hover {
  background-color: #cfcfcf;
  transform: translateX(-50%) scale(1.05);
}

.dark .learning-pill {
  background-color: var(--text-light);
  color: var(--bg-dark);
  box-shadow: 0 4px 8px rgba(255, 255, 255, 0.15);
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem 0 1rem;
  font-size: 1rem;
  color: var(--gray-medium);
}

.dark footer {
  color: var(--gray-light);
}

/* Links General */
a {
  text-decoration: none;
  font-weight: 600;
  color: var(--text-dark);
  transition: color 0.3s ease;
}

a:hover,
a:focus {
  color: var(--gray-medium);
  outline: none;
}

.dark a {
  color: var(--text-light);
}

.dark a:hover,
.dark a:focus {
  color: var(--gray-light);
}

/* Responsive */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    gap: 0.5rem;
  }

  .intro {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  .intro-left h1 {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .intro-left p {
    font-size: 1rem;
  }

  .projects {
    grid-template-columns: 1fr;
  }

  .socials a {
    margin-right: 0.6rem;
    font-size: 1.1rem;
  }
}