:root {
  --primary-color: #ad5317;
  --secondary-color: #fff;
  --accent-color: #333;

  /* Dark theme (default) */
  --bg-primary: #676967;
  --bg-gradient: linear-gradient(135deg, #5b4848, #0d0505);
  --text-primary: #fff;
  --card-bg: rgba(6, 5, 5, 0.353);
  --border-color: rgba(255, 255, 255, 0.06);
  --shadow-color: #1f241f;
}

/* Light theme */
[data-theme="light"] {
  --bg-primary: #dde5ed;
  --bg-gradient: linear-gradient(135deg, #e1d6d6, #ffffff);
  --text-primary: #333;
  --card-bg: rgba(186, 184, 184, 0.8);
  --border-color:#a14d15;
  --shadow-color: rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  font-family: "Roboto", sans-serif;
  box-sizing: border-box;
}
body {
  background: var(--bg-primary);
  background: var(--bg-gradient);
  color: var(--text-primary);
  transition: background 0.3s ease, color 0.3s ease;
}

.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  padding: 10px 50px;
  z-index: 100;
  background: #1f241f;
  margin-bottom: 25px;
}

.title a {
  text-decoration: none;
  padding: 0 10px;
  color: #fff;
  cursor: pointer;
}
.title {
  animation: rightSlide 1s ease forwards;
  opacity: 0;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Toggle buttons */
.theme-toggle,
.lang-toggle {
  background: transparent;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.theme-toggle:hover,
.lang-toggle:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-1px);
}

.theme-toggle i {
  font-size: 1.1rem;
}

.sidebar-toggle {
  width: 100%;
  justify-content: flex-start;
  padding: 12px 16px;
  margin: 4px 0;
}
.nav-links li {
  animation: leftSlide 0.5s ease forwards;
  opacity: 0;
}
.nav-links a {
  text-decoration: none;
  color: white;
  margin-left: 15px;
  font-weight: 500;
  transition: 0.3s;
  font-size: 1.2rem;
}
:root {
  --a: 1;
  --b: 2;
  --c: 3;
  --d: 4;
  --e: 5;
  --g: 6;
  --h: 7;
  --i: 8;
  --j: 9;
  --k: 10;
}
.nav-links li:nth-child(1) {
  animation-delay: calc(0.1s * var(--a));
}
.nav-links li:nth-child(2) {
  animation-delay: calc(0.1s * var(--b));
}
.nav-links li:nth-child(3) {
  animation-delay: calc(0.1s * var(--c));
}
.nav-links li:nth-child(4) {
  animation-delay: calc(0.1s * var(--d));
}
.nav-links li:nth-child(5) {
  animation-delay: calc(0.1s * var(--e));
}

.nav-links a:hover,
.sidebar a:hover {
  color: #ad5317;
}
.nav-links a.active,
.sidebar a.active {
  color: #a14d15;
  font-weight: 700;
  padding-bottom: 5px;
  border-bottom: 2px solid #ad5317;
}
/* section home */
.home {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 120px 50px 80px 50px;
  box-sizing: border-box;
  gap: 75px;
  scroll-margin-top: 75px;
  overflow: hidden;
}
.content-home {
  padding: 17px 0;
  margin-bottom: 20px;
  max-width: 600px;
}

.info-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(29, 9, 9, 0.06);
  /* border-radius: 16px; */
  padding: 18px 18px 10px 18px;
  box-shadow: 0 10px 30px #1f241f;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  margin-top: 20px;
}

.intro-block p {
  font-size: 1.3rem;
  line-height: 1.8;
  padding: 2.4rem;
  text-align: justify;
}

/* About section */
.about.section-card {
  align-items: flex-start;
  scroll-margin-top: 100px;
}

.about-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.about-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 18px;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.about-card h2 {
  color: #ad5317;
  margin-bottom: 12px;
}

.about-languages .lang-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0;
}

.bulleted {
  list-style: none;
  padding: 0;
  margin: 0;
}

.bulleted li {
  position: relative;
  padding-left: 18px;
  margin: 8px 0;
}

.bulleted li::before {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  background: #ad5317;
  border-radius: 50%;
  left: 0;
  top: 8px;
}

.two-col {
  columns: 2;
  column-gap: 24px;
}

@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
  .two-col {
    columns: 1;
  }
}

.info-scroll {
  height: auto;
  overflow: visible;
}
.content-home h1,
.content-home h3 {
  font-weight: 700;
  font-size: 26px;
  animation: rightSlide 0.5s ease forwards;
  opacity: 0;
  margin: 5px 0;
}
.content-home h3 span {
  color: #ad5317;
  animation: rightSlide 0.5s ease forwards;
  opacity: 0;
}

#text-text {
  color: var(--primary-color);
  font-weight: 600;
  min-height: 1.2em;
  display: inline-block;
}
.content-home h3 ~ p {
  margin-top: 35px;
  font-size: 17px;
  animation: leftSlide 0.5s ease forwards;
  opacity: 0;
}

.tab-content p {
  margin: 0;
  line-height: 1.6;
}
.content-home h2 {
  font-size: 56px;
  font-weight: 700;
  margin: -3px 0;
  animation: leftSlide 0.7s ease forwards;
  opacity: 0;
}

.portrait-home {
  max-width: 500px;
  min-width: 350px;
  height: auto;
  margin-bottom: 20px;
  animation: inZoom 0.5s ease forwards, updown 4s ease-in-out infinite;
  opacity: 0;
  padding: 20px 0;
  animation-delay: 1s, 1.6s;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  position: sticky;
  top: 130px;
}
.portrait-home img {
  width: 100%;
  max-width: 400px;
  height: 420px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.2);
  filter: grayscale(20%) contrast(1.1) brightness(0.95);
  transition: all 0.3s ease;
  background: linear-gradient(
    135deg,
    rgba(173, 83, 23, 0.1) 0%,
    rgba(161, 77, 21, 0.05) 100%
  );
}
.portrait-home img:hover {
  filter: grayscale(10%) contrast(1.15) brightness(1.05);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 6px 20px rgba(173, 83, 23, 0.2);
  transform: translateY(-2px);
}
.social-links {
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
}

.social-links a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 50px;
  height: 50px;
  background: transparent;
  border: 2px solid #ad5317;
  border-radius: 50%;
  font-size: 35px;
  text-decoration: none;
  color: #ad5317;
  margin: 30px 15px 30px 0;
}
.tabs > button:nth-child(1) {
  animation-delay: calc(0.1s * var(--g));
}
.tabs > button:nth-child(2) {
  animation-delay: calc(0.1s * var(--h));
}
.tabs > button:nth-child(3) {
  animation-delay: calc(0.1s * var(--j));
}
.tabs > button:nth-child(4) {
  animation-delay: calc(0.1s * var(--k));
}

.social-links a:hover {
  background: #ad5317;
  color: #1f241f;
  box-shadow: 0 0 20px #ad5317;
}
.btn {
  padding: 15px 28px;
  border-radius: 22px;
  background: #ad5317;
  display: block;
  width: fit-content;
  margin: 1.2rem auto;
  border-radius: 40px;
  transition: 0.5s ease;
  text-decoration: none;
  color: #fff;
  font-weight: 600;
  letter-spacing: 1%;
  font-size: 1.1rem;
  animation: leftSlide 1.5s ease forwards;
  opacity: 0;
}

.btn:hover {
  transition: 0.5s ease;
  box-shadow: 0 0 20px #ad5317;
}
/* animation style */

@keyframes rightSlide {
  0% {
    transform: translateX(-100px);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes leftSlide {
  0% {
    transform: translateX(100px);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes inZoom {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes updown {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0);
  }
}
/* sidebar */

.sidebar {
  list-style: none;
  display: none;
  align-items: flex-start;
  flex-direction: column;
  gap: 15px;
  position: fixed;
  top: 0;
  height: 100vh;
  width: 100%;
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
  z-index: 999;
  right: 0;
  padding: 40px 30px 30px 30px;
  background: rgba(63, 59, 59, 0.85);
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
}
.menu-btn {
  display: none;
}
.sidebar li {
  padding: 15px 0;
  width: 100%;
}

.sidebar a {
  display: block;
  padding: 15px 20px;
  width: 100%;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-size: 1.3rem;
  font-weight: 500;
}

.sidebar a:hover {
  background: rgba(173, 83, 23, 0.2);
  transform: translateX(5px);
}
.sidebar-controls {
  display: flex;
  gap: 10px;
  width: 100%;
  margin-top: 8px;
}
.icon i {
  font-size: 36px;
}

.titles {
  text-align: center;
  margin-bottom: 30px;
}
.section-card {
  min-height: 10vh;
  margin: 0;
  padding: 120px 50px 80px 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
}
.section-card > h1 {
  align-self: center;
  /* color: #000; */
}

.tab-button {
  padding: 10px 20px;
  border-radius: 25px;
  border: 2px solid #ccc;
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: bold;
  color: #ad5317;
  font-size: 1.2rem;
  overflow-wrap: break-word;
  white-space: nowrap;
  text-overflow: ellipsis;

  animation: rightSlide 0.4s ease forwards;
  opacity: 0;
  margin-top: 3px;
}

.tabs button:nth-child(1):hover {
  background-color: #f0f0f0;
  border-color: #999;
  transition: 0.5s ease;
  box-shadow: 0 0 3px 5px #78281f;
}

.tab-button.active {
  background-color: #f0f0f0;
  /* color: #fff; */
  border-color: #333;
}

.hidden {
  display: none;
}

.flag-title {
  /* text-align: center; */
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.imgf {
  width: 30px;
  height: 28px;
}
.flag {
  width: 100%;
  /* height: 30px; */
  /* margin: 0 78px; */
  border-radius: 10px;
  /* margin-bottom: 10px; */
  object-fit: contain;
}

/* Grid layouts for skills and passions */
.skills-grid,
.passions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-top: 15px;
}

.skill-item,
.passion-item {
  background: rgba(173, 83, 23, 0.1);
  border: 1px solid rgba(173, 83, 23, 0.3);
  border-radius: 8px;
  padding: 12px;
  font-size: 1rem;
  line-height: 1.4;
  text-align: center;
  transition: all 0.3s ease;
}

.skill-item:hover,
.passion-item:hover {
  background: rgba(173, 83, 23, 0.2);
  border-color: rgba(173, 83, 23, 0.5);
  transform: translateY(-2px);
}

.skills-list h2,
.passions-list h2 {
  margin-bottom: 10px;
  font-size: 1.5rem;
}

.skills-list p,
.passions-list p {
  margin-bottom: 15px;
  font-size: 1.1rem;
}

/* Success Popup Styles */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease;
}

.popup-overlay.error {
  background: rgba(0, 0, 0, 0.85);
}

.popup-content {
  background: linear-gradient(135deg, #2a2f2a 0%, #1f241f 100%);
  border-radius: 20px;
  padding: 40px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(173, 83, 23, 0.3);
  animation: slideIn 0.4s ease;
  position: relative;
}

.popup-content.error {
  border: 2px solid rgba(231, 76, 60, 0.45);
}

.popup-content::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, #ad5317, #a14d15);
  border-radius: 22px;
  z-index: -1;
}

.popup-icon {
  margin-bottom: 20px;
}

.popup-icon i {
  font-size: 4rem;
  color: #4caf50;
  animation: bounce 0.6s ease;
}

.popup-content.error .popup-icon i {
  color: #e74c3c;
}

.popup-content h3 {
  color: #ad5317;
  font-size: 1.8rem;
  margin-bottom: 15px;
  font-weight: 700;
}

.popup-content p {
  color: #e0e0e0;
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

.popup-contact-info {
  background: rgba(173, 83, 23, 0.1);
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
  border: 1px solid rgba(173, 83, 23, 0.3);
}

.popup-contact-info p {
  margin: 8px 0;
  font-size: 1rem;
}

.popup-contact-info strong {
  color: #ad5317;
}

.popup-btn {
  background: linear-gradient(135deg, #ad5317, #a14d15);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 25px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 20px;
}

.popup-btn:hover {
  background: linear-gradient(135deg, #a14d15, #8b3f12);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(173, 83, 23, 0.4);
}

/* Popup Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}
