:root {
  --bg-color: #ffffff;
  --text-color: #000000;
  --accent-color: #b36bff;
  --hover-color: #e26d6d;
}

/* Dark theme now applies from <html> as well */
html.dark-theme,
body.dark-theme {
  --bg-color: #000000;
  --text-color: #ffffff;
  --accent-color: #e26d6d;
  --hover-color: #b36bff;
}

body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: 0.3s ease;
}

.main-header {
  background-color: var(--bg-color);
  padding: 15px 50px;
  border-bottom: 1px solid var(--accent-color);
}

.main-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.nav-left h1 {
  font-size: 22px;
  font-weight: bold;
  color: var(--text-color);
  margin: 0;
  white-space: nowrap;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 25px;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-menu a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: bold;
}

.nav-menu a:hover {
  color: var(--accent-color);
}

.theme-toggle-btn {
  background: none;
  border: 2px solid var(--accent-color);
  border-radius: 8px;
  padding: 5px;
  font-size: 22px;
  cursor: pointer;
  transition: all 0.3s;
}

main {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px 20px;
}

.intro {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 40px;
  max-width: 1100px;
  margin: 0 auto;
}

.profile-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: -40px;
  margin-bottom: 20px;
}

.profile-img {
  width: 300px;
  height: auto;
  object-fit: cover;
  border-radius: 10px;
  margin: 0;
  display: block;
}

/* ===== BLUE LINE (updated) ===== */
.blue-line {
  width: 200px;
  height: 8px;
  background-color: #3366ff;
  animation: growLine 1s ease-out forwards;
  box-shadow: 0 4px 10px rgba(51, 102, 255, 0.5),
              inset 0 2px 4px rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.blue-line:hover {
  animation: bounceLine 0.6s;
}

/* Animation for growing line on load */
@keyframes growLine {
  0% {
    width: 0;
    opacity: 0;
  }
  100% {
    width: 200px;
    opacity: 1;
  }
}

/* Animation on hover */
@keyframes bounceLine {
  0%   { transform: scaleX(1); }
  50%  { transform: scaleX(1.2); }
  100% { transform: scaleX(1); }
}

.curved-bottom {
  position: absolute;
  bottom: -20px;
  left: 0;
  width: 100%;
  height: 40px;
  background: transparent;
  border-bottom: 6px solid #3b6cff;
  border-radius: 50% 50% 0 0;
}

.intro-text h2 {
  margin: 10px 0;
  font-size: 42px;
}

.intro-text h3 {
  margin: 10px 0;
  font-size: 32px;
}

.highlight {
  color: var(--accent-color);
}

.download-btn {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 25px;
  border: 2px solid var(--accent-color);
  border-radius: 8px;
  color: var(--text-color);
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  transition: 0.3s ease;
}

.download-btn:hover {
  background-color: var(--accent-color);
  color: var(--bg-color);
}

.social-icons {
  margin-top: 20px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border: 2px solid var(--accent-color);
  border-radius: 50%;
  color: var(--accent-color);
  font-size: 20px;
  text-decoration: none;
  transition: 0.3s ease, transform 0.2s;
}

.social-icons a:hover {
  background-color: var(--hover-color);
  color: var(--bg-color);
  border-color: var(--hover-color);
  transform: scale(1.2);
}

#role::after {
  content: "|";
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 50%, 100% { opacity: 1; }
  25%, 75% { opacity: 0; }
}

/* --- Responsive header --- */
.menu-toggle {
  display: none;
  border: 2px solid var(--accent-color);
  border-radius: 8px;
  background: none;
  padding: 6px 10px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-color);
}

.menu-toggle:hover,
.menu-toggle:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--accent-color);
}

/* Base: desktop layout */
.nav-right { display: flex; align-items: center; gap: 20px; }
.nav-menu   { display: flex; gap: 25px; }

/* Mobile/tablet */
@media (max-width: 900px) {
  .main-nav { gap: 12px; }
  .menu-toggle { display: inline-flex; align-items: center; }

  .nav-right {
    width: 100%;
    justify-content: space-between;
  }

  .nav-menu[data-collapsible] {
    display: none;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin-top: 12px;
    padding: 12px 0;
    border-top: 1px solid var(--accent-color);
  }

  .nav-menu.open {
    display: flex;
  }

  .main-nav { flex-wrap: wrap; }
  .nav-left h1 { font-size: 18px; }
}

/* ====== Home (index) responsive ====== */

/* Tablet & down */
@media (max-width: 992px) {
  main {
    padding: 40px 16px;
  }
  .intro {
    gap: 24px;
  }
  .intro-text h2 { font-size: 34px; }
  .intro-text h3 { font-size: 26px; }
  .profile-img { width: 240px; }
  .blue-line { width: 160px; height: 6px; }
}

/* Mobile (stack layout) */
@media (max-width: 640px) {
  .intro {
    flex-direction: column;
    text-align: center;
  }
  .profile-container {
    margin-top: 0;
    margin-bottom: 8px;
  }
  .profile-img {
    width: 180px;
    border-radius: 12px;
  }
  .blue-line {
    width: 120px;
    height: 6px;
  }
  .intro-text h2 { font-size: 28px; }
  .intro-text h3 { font-size: 22px; }
  .download-btn {
    width: 100%;
    max-width: 320px;
  }
  .social-icons {
    justify-content: center;
    gap: 14px;
  }
  .social-icons a {
    width: 40px; height: 40px;
    font-size: 18px;
  }
}

/* Very small phones */
@media (max-width: 360px) {
  .intro-text h2 { font-size: 24px; }
  .intro-text h3 { font-size: 20px; }
  .profile-img { width: 160px; }
  .blue-line { width: 100px; height: 5px; }
}
