:root {
  --bg: #ffffff;
  --text: #111;
  --accent: #00c4a0;
  --subtitle-color: #444;
}

[data-theme="dark"] {
  --bg: #121212;
  --text: #f5f5f5;
  --accent: #00ffcc;
  --subtitle-color: #ddd;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 1.5rem 1rem;
  background: transparent;
  font-weight: 600;
}

.navbar a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.3s;
}

.navbar a:hover {
  color: var(--text);
}

.hero {
  text-align: center;
  padding: 4rem 1rem;
}

.profile-container {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.profile-img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.subtitle {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--subtitle-color);
  text-align: center;
  max-width: 700px;
  margin: 0 auto 1.5rem;
  line-height: 1.5;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 5px;
  font-weight: bold;
  text-decoration: none;
  margin-top: 1rem;
  transition: transform 0.2s, background 0.3s;
}

.btn:hover {
  transform: scale(1.03);
  background: #00a88a;
}

section {
  padding: 4rem 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

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

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

.project-card {
  background: var(--bg);
  padding: 1.5rem;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

[data-theme="dark"] .project-card {
  background: #1e1e1e;
}

.project-card img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 1rem;
}

.project-card h3 {
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.skills-list-container {
  overflow-x: auto;
  padding: 0.5rem 0;
}

.skills-list {
  display: flex;
  gap: 1rem;
  min-width: max-content;
  padding: 1rem 0;
}

.skill-card {
  background: var(--bg);
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-weight: bold;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.3s;
}

[data-theme="dark"] .skill-card {
  background: #2a2a2a;
  color: var(--text);
}

.skill-card:hover {
  background: var(--accent);
  color: var(--bg);
}

.resume-category {
  margin-bottom: 2rem;
  border-left: 4px solid var(--accent);
  padding-left: 1rem;
}

.resume-category h3 {
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.resume-item {
  background: var(--bg);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  color: var(--text);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

[data-theme="dark"] .resume-item {
  background: #1e1e1e;
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

contact-form input,
contact-form textarea {
  padding: 0.75rem;
  border: none;
  border-radius: 5px;
  background: var(--bg);
  color: var(--text);
}

[data-theme="dark"] .contact-form input,
[data-theme="dark"] .contact-form textarea {
  background: #2a2a2a;
  color: #fff;
}

footer {
  text-align: center;
  padding: 2rem 1rem;
  border-top: 1px solid #ccc;
  color: #777;
}

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

.social-links a {
  color: var(--accent);
  text-decoration: none;
}

.social-links a:hover {
  text-decoration: underline;
}

#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 1rem;
  display: none;
  padding: 0.6rem 1rem;
  font-size: 1.2rem;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  z-index: 999;
}

#theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: none;
  font-size: 1.4rem;
  border: none;
  cursor: pointer;
  z-index: 1000;
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }
  .subtitle {
    font-size: 1rem;
  }
  .profile-img {
    width: 140px;
    height: 140px;
  }
  .skills-list {
    gap: 0.5rem;
  }
  .navbar {
    gap: 1rem;
  }
}
