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

:root {
  --teal-deep: #16697a;
  --teal-mid: #489fb5;
  --teal-light: #82c0cc;
  --cream: #ede7e3;
  --amber: #ffa62b;
  --text-dark: #1c2b2e;
}

body {
  font-family: Calibri, "Segoe UI", Candara, Tahoma, sans-serif;
  background-color: var(--cream);
  color: var(--text-dark);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

html {
  scroll-behavior: smooth;
}

img {
  max-width: 100%;
  display: block;
}

/* ---------- Header / Nav ---------- */
header {
  background: linear-gradient(135deg, var(--teal-deep), var(--teal-mid));
  color: #ffffff;
  padding-bottom: 3rem;
}

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

.logo {
  font-size: 1.4rem;
  font-weight: bold;
  letter-spacing: 0.5px;
}

.logo-accent {
  color: var(--amber);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: #ffffff;
  text-decoration: none;
  font-weight: bold;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.25s ease, color 0.25s ease;
}

.nav-links a:hover {
  border-bottom-color: var(--amber);
  color: var(--amber);
}

#darkModeToggle {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #ffffff;
  font-size: 1.1rem;
  padding: 0.5rem 0.8rem;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease;
}

#darkModeToggle:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(20deg);
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  max-width: 700px;
  margin: 1rem auto 0;
  padding: 0 5%;
}

.profile-img {
  width: 170px;
  height: 170px;
  object-fit: cover;
  border-radius: 50%;
  border: 5px solid var(--amber);
  margin: 0 auto 1.2rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.hero-tag {
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.8rem;
  color: var(--cream);
  margin-bottom: 0.5rem;
}

.hero h2 {
  font-size: 2.4rem;
  margin-bottom: 0.6rem;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: #f1f7f8;
  margin-bottom: 1.8rem;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: var(--amber);
  color: var(--text-dark);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(255, 166, 43, 0.4);
}

.btn-secondary {
  background: var(--teal-light);
  color: var(--text-dark);
}

.btn-secondary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(130, 192, 204, 0.5);
}

.btn-linkedin {
  background: #ffffff;
  color: var(--teal-deep);
  border: 2px solid #ffffff;
}

.btn-linkedin:hover {
  background: transparent;
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

/* ---------- Section layout ---------- */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 5%;
}

section {
  padding: 4rem 0;
  border-bottom: 1px solid rgba(22, 105, 122, 0.15);
}

.section-title {
  text-align: center;
  font-size: 2rem;
  color: var(--teal-deep);
  margin-bottom: 0.6rem;
}

.section-subtitle {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 2rem;
  color: #4a5a5c;
}

.bio {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
  font-size: 1.05rem;
}

/* ---------- Skills ---------- */
.skills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 2rem;
}

.skill-card {
  background: #ffffff;
  padding: 1.8rem 1.5rem;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(22, 105, 122, 0.12);
  width: 260px;
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.skill-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 14px 28px rgba(22, 105, 122, 0.22);
}

.skill-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.6rem;
}

.skill-card h3 {
  color: var(--teal-deep);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.skill-card p {
  font-size: 0.92rem;
  color: #4a5a5c;
}

/* ---------- Projects ---------- */
.projects-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 2rem;
}

.project-card {
  background: #ffffff;
  padding: 1.8rem;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(22, 105, 122, 0.12);
  width: 300px;
  border-top: 4px solid var(--amber);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 14px 28px rgba(22, 105, 122, 0.22);
}

.project-tag {
  display: inline-block;
  background: var(--teal-light);
  color: var(--text-dark);
  font-size: 0.75rem;
  font-weight: bold;
  padding: 0.2rem 0.7rem;
  border-radius: 20px;
  margin-bottom: 0.8rem;
}

.project-card h3 {
  color: var(--teal-deep);
  margin-bottom: 0.6rem;
  font-size: 1.05rem;
}

.project-card p {
  font-size: 0.92rem;
  color: #4a5a5c;
}

/* ---------- Live data ---------- */
#live-data {
  text-align: center;
}

.live-data-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.live-data-result {
  max-width: 650px;
  margin: 0.6rem auto;
  font-style: italic;
  color: var(--teal-deep);
  min-height: 1.4rem;
}

/* ---------- Contact form ---------- */
.contact-form {
  max-width: 520px;
  margin: 2rem auto 0;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  padding: 2rem;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(22, 105, 122, 0.12);
}

.contact-form label {
  font-weight: bold;
  margin-top: 1rem;
  margin-bottom: 0.4rem;
  color: var(--teal-deep);
}

.contact-form input,
.contact-form textarea {
  padding: 0.7rem;
  border: 1px solid var(--teal-light);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  background: var(--cream);
  color: var(--text-dark);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--amber);
}

.contact-form button {
  margin-top: 1.4rem;
  align-self: center;
}

.form-status {
  text-align: center;
  margin-top: 1rem;
  font-weight: bold;
  color: var(--teal-deep);
  min-height: 1.2rem;
}

/* ---------- Footer ---------- */
footer {
  background-color: #333333;
  color: #ffffff;
  text-align: center;
  padding: 2rem 5%;
  margin-top: 2rem;
}

footer a {
  color: var(--amber);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* ---------- Dark mode ---------- */
body.dark-mode {
  background-color: #10181a;
  color: #ede7e3;
}

body.dark-mode .skill-card,
body.dark-mode .project-card,
body.dark-mode .contact-form {
  background: #1c2b2e;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

body.dark-mode .skill-card p,
body.dark-mode .project-card p,
body.dark-mode .section-subtitle {
  color: #b7c4c6;
}

body.dark-mode .contact-form input,
body.dark-mode .contact-form textarea {
  background: #10181a;
  color: #ede7e3;
  border-color: var(--teal-mid);
}

body.dark-mode section {
  border-bottom-color: rgba(130, 192, 204, 0.15);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  nav {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-links {
    flex-direction: column;
    text-align: center;
    gap: 0.8rem;
  }

  .skills-container,
  .projects-container {
    flex-direction: column;
    align-items: center;
  }

  .skill-card,
  .project-card {
    width: 100%;
    max-width: 340px;
  }

  .hero h2 {
    font-size: 1.9rem;
  }
}
