:root {
  --bg: #ffffff;
  --text: #0f0f0f;
  --muted: #333;
  --card: #f0f0f0;
  --card-hover: #e0e0e0;
  --border: #ccc;
}

body.dark-theme {
  --bg: #202124;
  --text: #e8eaed;
  --muted: #ccc;
  --card: #2a2a2a;
  --card-hover: #3a3a3a;
  --border: #444;
}

html { scroll-behavior: smooth; }
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  color: var(--text);
  background: var(--bg);
}
a { color: var(--muted); }

*,
*::before,
*::after { box-sizing: border-box; }

header {
  background-position: center;
  text-align: center;
  padding: 100px 0;
}
header h1 { font-size: 3em; margin-bottom: 20px; }
header nav ul { list-style: none; padding: 0; margin: 0; }
header nav li { display: inline; margin: 0 20px; }
header nav a { text-decoration: none; }

section {
  border: 1px solid var(--border);
  max-width: 90vw;
  border-radius: 10px;
  padding: 30px;
  margin: 30px auto;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#welcome {
  text-align: center;
  justify-content: center;
  background-position: center;
  padding: 50px 0;
}
#welcome h2 { font-size: 2.5em; margin-bottom: 20px; }

.projects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  text-align: center;
  max-width: 90vw;
  margin: 0 auto;
}

.project {
  background: var(--card);
  padding: 20px;
  margin: 10px;
  border-radius: 8px;
  text-align: center;
  font-weight: bold;
  border: 1px solid var(--border);
  transition: background-color 0.3s, transform 0.1s ease-in-out;
}
.project:hover { background: var(--card-hover); }
.project a { color: var(--text); text-decoration: none; }

#about { padding: 50px 30px; max-width: 90vw; }
#about .container {
  display: flex;
  align-items: center;
  justify-content: space-around;
}
#about img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 30px;
}
#about .content h4 { font-size: 1.8em; margin-bottom: 15px; }
#about .content p { line-height: 1.6; margin-bottom: 20px; }
#about .content button {
  background: #333; color: #fff; padding: 10px 20px;
  border: none; border-radius: 5px; cursor: pointer;
}

#social { text-align: center; max-width: 90vw; padding: 30px 0; }
.social-icons a { margin: 0 15px; font-size: 1.5em; }

footer {
  background: var(--card);
  max-width: 100%;
  text-align: center;
  padding: 20px 0;
  border-top: 1px solid var(--border);
}


.btn-toggle {
  background: #333; color: #fff;
  padding: 10px 20px; border: none; border-radius: 5px;
  font-size: 16px; cursor: pointer;
  transition: background-color 0.3s, transform 0.1s;
  position: relative; float: right; margin: 10px 20px 0 0;
}
.btn-toggle:hover { background: #555; transform: scale(1.05); }
.btn-toggle:active { background: #222; transform: scale(0.98); }

a:focus-visible, button:focus-visible {
  outline: 2px solid #8ab4f8; outline-offset: 2px;
}

@media (max-width: 768px) {
  header nav ul { display: flex; flex-direction: column; align-items: center; }
  header nav li { margin: 10px 0; }
  .projects { grid-template-columns: 1fr; }
  #about .container { flex-direction: column; }
  #about img { margin: 0 0 20px; }
  section { width: 90%; margin: 0 1%; }
}

@media (max-width: 480px) {
  header h1 { font-size: 2em; }
  #welcome h2 { font-size: 1.8em; }
  #about .content h4 { font-size: 1.5em; }
  .social-icons a { font-size: 1.2em; }
}
