/* ================================
   THEME VARIABLES
================================ */

/* Default / Dark theme */
:root {
  --bg-color: #121212;
  --card-bg: #1E1E1E;
  --text-color: #E0E0E0;
  --heading-color: #BB86FC;
  --nav-link-color: #E0E0E0;
  --accent-color: #BB86FC;
  --input-bg: #1E1E1E;
  --input-text: #E0E0E0;
}

/* Light theme */
[data-theme="light"] {
  --bg-color: #F8F9FA;
  --card-bg: #FFFFFF;
  --text-color: #212529;
  --heading-color: #0D6EFD;
  --nav-link-color: #212529;
  --accent-color: #0D6EFD;
  --input-bg: #FFFFFF;
  --input-text: #212529;
}

/* Colorblind high-contrast theme */
[data-theme="colorblind"] {
  --bg-color: #FFFFFF;
  --card-bg: #F4F4F4;
  --text-color: #000000;
  --heading-color: #000000;
  --nav-link-color: #000000;
  --accent-color: #FFAA00;
  --input-bg: #FFFFFF;
  --input-text: #000000;
}

/* ================================
   GLOBAL STYLES
================================ */
* { box-sizing: border-box; }

html, body { overflow-x: hidden; }

#body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: 'Playfair Display', serif;
  margin: 0;
  padding: 0;
  transition: background-color 0.5s ease, color 0.5s ease;
}

/* ================================
   NAVIGATION
================================ */
#navigation-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 60px;
  position: relative;
  z-index: 1000;
}

.nav-links {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.nav-links a {
  font-size: 20px;
  text-decoration: none;
  color: var(--nav-link-color);
  transition: color 0.3s ease;
}

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

.theme-container select {
  padding: 6px 10px;
  font-size: 1rem;
  border-radius: 6px;
  border: 2px solid var(--accent-color);
  background-color: var(--input-bg);
  color: var(--input-text);
  cursor: pointer;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.theme-container select:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 5px var(--accent-color);
}

#nav-toggle {
  display: none;
  font-size: 2rem;
  background: none;
  border: none;
  color: var(--nav-link-color);
  cursor: pointer;
  z-index: 1100;
}

/* ================================
   HEADINGS + ANIMATIONS
================================ */
h1 {
  text-align: right;
  padding-right: 35px;
  margin-right: 60px;
  font-size: 2.2rem;
  border-right: 5px solid var(--accent-color);
  text-shadow: 0 0 15px rgba(0,0,0,0.3);
  color: var(--heading-color);
  animation: fadeSlideIn 1s ease forwards;
}

h2 {
  text-align: right;
  padding-right: 35px;
  margin: 0 60px 10px 0;
  font-size: 1.4rem;
  color: var(--heading-color);
  animation: h2FadeToAccent 2s ease forwards, fadeSlideIn 1s ease forwards;
}

@keyframes h2FadeToAccent { to { color: var(--accent-color); } }

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================================
   HERO / ABOUT SECTIONS
================================ */
.side-by-side {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 60px;
  gap: 60px;
}

.side-by-side img {
  width: 320px;
  height: 320px;
  border-radius: 80%;
  border: 4px solid var(--accent-color);
  object-fit: cover;
}

.side-by-side p {
  max-width: 600px;
  padding-right: 30px;
  text-align: right;
  line-height: 1.7;
}

.about-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 60px;
}

.tech-stack-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.tech-stack-icons img { width: 50px; height: 50px; }

.about-text { line-height: 1.6; }

/* ================================
   ABOUT STATS
================================ */
.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.about-stats .stat {
  background-color: var(--card-bg);
  border-left: 6px solid var(--accent-color);
  border-radius: 6px;
  padding: 15px 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.about-stats .stat:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 15px var(--accent-color, rgba(0,0,0,0.3));
}

.about-stats .stat strong { color: var(--accent-color); font-size: 1.05rem; }

.about-stats .stat ul {
  margin: 5px 0 0 15px;
  padding: 0;
}

.about-stats .stat ul li {
  margin: 3px 0;
  list-style-type: disc;
  color: var(--text-color);
}

/* ================================
   CONTACT
================================ */
.contact-container, .contact-card {
  background-color: var(--card-bg);
  border-radius: 10px;
  padding: 20px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  background-color: var(--input-bg);
  color: var(--input-text);
  border: 2px solid var(--accent-color);
  border-radius: 6px;
  padding: 10px;
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--input-text); opacity: 0.7; }

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 5px var(--accent-color);
}

.contact-form button {
  background-color: var(--accent-color);
  color: var(--bg-color);
  font-weight: bold;
  border: none;
  border-radius: 6px;
  padding: 10px;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.3s ease, color 0.3s ease;
}

.contact-form button:hover { transform: scale(1.05); }

/* ================================
   FOOTER
================================ */
footer {
  background-color: var(--accent-color);
  color: var(--bg-color);
  text-align: center;
  padding: 3px 0;
  margin-top: 40px;
  font-size: 0.85rem;
  transition: background-color 0.5s ease, color 0.5s ease;
}

/* ================================
   MOBILE ADAPTATION
================================ */
@media (max-width: 768px) {

  #navigation-bar { padding: 1rem 20px; }

  h1, h2 { margin-right: 0; padding-right: 20px; }

  .side-by-side { flex-direction: column; margin: 40px 20px; gap: 30px; }
  .side-by-side img { width: 240px; height: 240px; }
  .side-by-side p { padding-right: 0; }

  .about-columns { grid-template-columns: 1fr; padding: 40px 20px; }

  .contact-container, .contact-card { padding: 0 20px; }
  .contact-columns { grid-template-columns: 1fr; padding: 0 20px; }

  #nav-toggle { display: block; }
  .nav-links {
    display: none;
    flex-direction: column;
    gap: 15px;
    background-color: var(--bg-color);
    position: absolute;
    top: 60px;
    right: 20px;
    padding: 10px 20px;
    border: 1px solid var(--accent-color);
    border-radius: 6px;
    z-index: 1000;
  }

  .nav-links.active { display: flex; }
  .nav-links a { padding: 10px 0; }

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