/* Light mode (default) */
:root {
  --primary-color: #b4533a;
  --body: #fbf7f2;
  --secondary-color: #292524;
  --accent: #92402e;

  --surface: #ffffff;
  --border-color: #cccccc;
  --footer-bg: #292524;
}

/* Dark mode */
:root[data-theme="dark"] {
  --primary-color: #f28e73;
  --body: #171516;
  --secondary-color: #f5eeeb;
  --accent: #cb6148;

  --surface: #252122;
  --border-color: #514747;
  --footer-bg: #100e0e;
}

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

body {
  font-family: "Inter", sans-serif;
  background-color: var(--body);
  color: var(--secondary-color);
  line-height: 1.7;
}

header {
  background-color: var(--surface);
  padding-bottom: 60px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 5%;
}

.logo {
  color: var(--primary-color);
  font-weight: 800;
  font-size: 1.6rem;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 25px;
}

.nav-links a {
  text-decoration: none;
  color: var(--secondary-color);
  transition: color 0.2s;
}

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

.hero {
  margin-top: 1.875rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-img {
  width: 150px;
  height: 150px;
  border-radius: 40%;
  object-fit: cover;
  border: 4px solid var(--primary-color);
  margin-bottom: 20px;
}

.hero-text h2 {
  font-size: 2rem;
  font-weight: 600;
}

.developer-name {
  color: var(--primary-color);
  font-weight: 800;
}

.section {
  padding: 60px 10%;
  text-align: center;
}

.project-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin-top: 30px;
}

.project-card {
  background-color: var(--surface);
  padding: 20px 25px;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  max-width: 300px;
  transition: transform 0.2s;
}

.project-card h3 {
  color: var(--primary-color);
  margin-bottom: 10px;
}

.project-card:hover {
  transform: scale(1.05);
}

form {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

input,
textarea {
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 0.625rem;

  background-color: var(--surface);
  color: var(--secondary-color);
}

input:focus,
textarea:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

button {
  background: linear-gradient(to right, var(--primary-color), var(--accent));
  color: white;
  padding: 12px;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

button:hover {
  /*transform: scale(1.05);*/
  opacity: 0.9;
}

#form-msg {
  margin-top: 10px;
  font-weight: 600;
  text-align: center;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

footer {
  background-color: var(--footer-bg);
  color: white;
  padding: 1.25rem;
  text-align: center;
  margin-top: 3.75rem;
}

#topBtn {
  display: none;
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 14px;
  border-radius: 10%;
  cursor: pointer;
  font-size: 1.2rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

/* Theme toggle button */
#theme-toggle {
  background: var(--primary-color);
  color: white;
  padding: 10px 16px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

/* Smooth theme transitions */
body,
header,
.project-card,
input,
textarea,
footer {
  transition:
    background-color 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease;
}

/* Small screens */
@media (max-width: 768px) {
  nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    flex-direction: column;
    gap: 10px;
  }

  .project-list {
    flex-direction: column;
    align-items: center;
  }

  .hero {
    padding: 0 20px;
  }
}
