/* -------------------- General styling -------------------- */
:root {
  color-scheme: light dark;
  --max-width: 900px;
}

* {
  box-sizing: border-box;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #fff8dc, #ffe4b5);
  color: #333;
}

/* -------------------- Navigation -------------------- */
.nav {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border-bottom: 1px solid #e5e5e5;
}

.nav a {
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.nav a.active,
.nav a:hover {
  background: rgba(127,127,127,.15);
}

#themeToggle {
  margin-left: auto;
  cursor: pointer;
  font-size: 1.2rem;
}

/* -------------------- Home / Hero Section -------------------- */
.hero {
  max-width: var(--max-width);
  margin: 24px auto;
  text-align: center;
  padding: 24px;
}

.avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 16px;
  border: 3px solid #d2691e;
}

.hero h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #d2691e;
}

.tagline {
  font-size: 1rem;
  opacity: 0.85;
  margin-top: 0.5rem;
}

/* -------------------- API Section -------------------- */
.api {
  max-width: var(--max-width);
  margin: 24px auto;
  text-align: center;
  padding: 24px;
  background: rgba(255,255,255,0.8);
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.api h2 {
  color: #d2691e;
  margin-bottom: 12px;
}

#quote {
  font-style: italic;
  font-size: 1.1rem;
  color: #444;
}

/* -------------------- Projects Page -------------------- */
.grid {
  max-width: var(--max-width);
  margin: 24px auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  padding: 0 16px 32px;
}

.card {
  padding: 16px;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  background: #fff;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.card.show {
  opacity: 1;
  transform: translateY(0);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 1.2rem;
  color: #d2691e;
}

.card p {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 12px;
}

.card a {
  text-decoration: none;
  color: #1a73e8;
  font-weight: 500;
  transition: color 0.2s ease;
}

.card a:hover {
  color: #d2691e;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

/* -------------------- Contact Page -------------------- */
.stack {
  max-width: 600px;
  margin: 24px auto;
  padding: 0 16px;
}

form {
  display: grid;
  gap: 12px;
  background: #fff;
  padding: 24px;
  border-radius: 12px;
  border: 1px solid #e5e5e5;
}

label {
  display: grid;
  gap: 6px;
  font-weight: bold;
}

input,
textarea,
button {
  font: inherit;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
}

button {
  cursor: pointer;
  background-color: #d2691e;
  color: #fff;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 10px rgba(0,0,0,0.2);
}

button:active {
  transform: scale(0.95);
}

#status {
  margin-top: 8px;
  font-style: italic;
}

/* -------------------- Footer -------------------- */
footer {
  text-align: center;
  padding: 1rem;
  background-color: #ffe4b5;
}

/* -------------------- Responsive -------------------- */
@media (max-width: 600px) {
  .avatar {
    width: 120px;
    height: 120px;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .tagline {
    font-size: 0.9rem;
  }

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

  #themeToggle {
    margin-left: 0;
  }
}
