:root {
  --primary:rgb(11, 171, 229);
  --secondary: #232946;
  --bg: #f9f9f9;
  --text: #232946;
  --card-bg: #ffffff;
  --shadow: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
  --primary: #f0f0f0;
  --secondary:rgba(15, 219, 234, 0.85);
  --bg: #121212;
  --text:rgba(15, 219, 234, 0.85);
  --card-bg: #1e1e1e;
  --shadow: rgba(0, 0, 0, 0.3);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  transition: background-color 0.3s, color 0.3s;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Header & Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--card-bg);
  box-shadow: 0 2px 10px var(--shadow);
  z-index: 1000;
  padding: 1rem;
}

nav {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 2rem;
}

nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

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

/* Sections */
section {
  padding: 5rem 0;
}

h1, h2, h3 {
  color: var(--secondary);
}

h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  position: relative;
  display: inline-block;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--primary);
}

/* Hero Section */
#hero {
  text-align: center;
  padding-top: 8rem;
}

#hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.subtitle {
  font-size: 1.5rem;
  color: var(--text);
  opacity: 0.9;
  margin-bottom: 1rem;
}

.description {
  max-width: 600px;
  margin: 0 auto 2rem;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* Buttons */
.btn-primary, .btn-secondary {
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 500;
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
  transition: transform 0.3s, box-shadow 0.3s, background 0.3s, color 0.3s;
}

.btn-primary:hover, .btn-secondary:hover {
  background: var(--primary);
  color: var(--secondary);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px var(--shadow);
}

/* Skills Section */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.skill-card {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 4px 10px var(--shadow);
  transition: transform 0.3s;
}

.skill-card:hover {
  transform: translateY(-5px);
}

.skill-card h3 {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: var(--primary);
  gap: 0.5rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.skill-pill {
  display: inline-block;
  background: var(--secondary);      /* dark background */
  color: var(--primary);             /* blue text */
  padding: 0.4em 1.2em;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;                  /* bold text */
  margin-bottom: 0.3em;
  box-shadow: 0 2px 8px var(--shadow);
  opacity: 1;
  transition: background 0.2s, color 0.2s;
  border: none;
}

.skill-pill:hover {
  background: var(--primary);
  color: var(--secondary);
  cursor: pointer;
}

/* Cards (Experience, Projects, Education) */
.card {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 10px var(--shadow);
  margin-bottom: 2rem;
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px var(--shadow);
}

.card h3 {
  margin-bottom: 1rem;
  color: var(--primary);
}

.card .company, .card .period {
  color: var(--text);
  opacity: 0.8;
  margin-bottom: 1rem;
}

.card ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.card .technologies {
  font-style: italic;
  color: var(--text);
  opacity: 0.8;
}

.project-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.project-link:hover {
  text-decoration: underline;
}

/* Contact Section */
#contact {
  text-align: center;
}

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

.contact-links a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.contact-links a:hover {
  color: var(--secondary);
}

/* Footer */
footer {
  background: var(--card-bg);
  padding: 2rem;
  text-align: center;
  margin-top: 4rem;
}

/* Theme Toggle */
#theme-toggle {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 10px var(--shadow);
  transition: transform 0.3s;
  z-index: 1000;
}

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

#theme-toggle .sun {
  display: none;
}

[data-theme="dark"] #theme-toggle .sun {
  display: block;
}

[data-theme="dark"] #theme-toggle .moon {
  display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
  nav {
    flex-wrap: wrap;
    gap: 1rem;
  }

  #hero h1 {
    font-size: 2.5rem;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .contact-links {
    flex-direction: column;
    gap: 1rem;
  }
}