/* Palette claire */
:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --accent: #2563eb;
  --primary: var(--accent);
  --secondary-bg: #f5f5f5;
}
/* Palette sombre */
[data-theme="dark"] {
  --bg: #0f172a;
  --text: #e2e8f0;
  --accent: #60a5fa;
  --secondary-bg: #1e293b;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  scroll-behavior: smooth;
}
.container {
  width: 90%;
  max-width: 1100px;
  margin: auto;
}
/* Header */
.header {
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--secondary-bg);
}
.header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}
.logo {
  font-size: 1.5rem;
  font-weight: 700;
}
.logo span {
  color: var(--accent);
}
.nav a {
  margin-left: 1.5rem;
  color: var(--text);
  text-decoration: none;
  position: relative;
}
.nav a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  background: var(--accent);
  left: 0;
  bottom: -4px;
  transition: width 0.3s ease;
}
.nav a:hover::after {
  width: 100%;
}
#theme-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  margin-left: 1.5rem;
  color: var(--text);
}
/* Hero */
.hero {
  display: flex;
  align-items: center;
  min-height: 70vh;
}
.hero h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}
.accent {
  color: var(--accent);
}
.subtitle {
  margin-bottom: 2rem;
  opacity: 0.8;
}
.btn {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s ease;
}
.btn--primary {
  background: var(--accent);
  color: #fff;
}
.btn--primary:hover {
  background: #1d4ed8;
}
/* Profile */
.profile__inner {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.profile__photo img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.profile__info h3 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}
.profile__info p {
  opacity: 0.85;
}
@media (max-width: 600px) {
  .profile__inner { flex-direction: column; text-align: center; }
}

/* Sections */
section {
  padding: 4rem 0;
}
h3 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}
/* Projects Grid */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}
.project-card {
  background: var(--secondary-bg);
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.3s ease;
}
.project-card:hover {
  transform: translateY(-5px);
}
.project-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.project-card__content {
  padding: 1rem;
}
.project-card__title {
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.project-card__desc {
  opacity: 0.8;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.project-card__links a {
  margin-right: 1rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
/* Contact */
.contact__form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.contact__form label {
  display: flex;
  flex-direction: column;
  font-weight: 600;
  gap: 0.5rem;
}
.contact__form input,
.contact__form textarea {
  padding: 0.8rem;
  border: 1px solid var(--secondary-bg);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
}
.contact__form button {
  align-self: start;
}
/* Skills Grid */
.skills__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1.5rem;
  justify-items: center;
  align-items: center;
  margin-top: 2rem;
}
.skill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  background: var(--secondary-bg);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  transition: transform 0.3s ease;
}
.skill-item:hover {
  transform: translateY(-4px);
}
.skill-item img {
  width: 40px;
  height: 40px;
}
.skill-item span {
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
}

/* Footer */
.footer {
  text-align: center;
  padding: 2rem 0;
  background: var(--secondary-bg);
  margin-top: 2rem;
}
@media (max-width: 600px) {
  .hero h2 {
    font-size: 1.6rem;
  }
  .header__inner {
    flex-direction: column;
  }
  .nav {
    margin-top: 1rem;
  }
}
