/* GENERAL */

@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap");

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

body {
  font-family: "Poppins", sans-serif;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 50%, #ffffff 100%);
  transition: background 0.4s ease, color 0.4s ease;
}

html {
  scroll-behavior: smooth;
}

/* SCROLL PROGRESS BAR */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  z-index: 9999;
  transition: width 0.1s ease;
}

p {
  color: #555555;
}

:root {
  --primary-color: #00244D;
  --secondary-color: #D4B68E;
  --text-dark: #00244D;
  --text-light: #ffffff;
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-card: #ffffff;
  --border-color: #D4B68E;
  --text-body: #555555;
}

/* DARK MODE */
body.dark-mode {
  --primary-color: #8bb8e8;
  --secondary-color: #D4B68E;
  --text-dark: #e0e0e0;
  --text-light: #1a1a2e;
  --bg-primary: #1a1a2e;
  --bg-secondary: #16213e;
  --bg-card: #1f2940;
  --border-color: #D4B68E;
  --text-body: #b0b0b0;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #1a1a2e 100%);
}

body.dark-mode p {
  color: var(--text-body);
}

body.dark-mode .details-container {
  background: var(--bg-card);
}

body.dark-mode .color-container {
  background: var(--bg-card);
}

body.dark-mode nav {
  background: rgba(26, 26, 46, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

body.dark-mode footer {
  background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 100%);
}

body.dark-mode .contact-info-upper-container {
  background: var(--bg-card);
}

body.dark-mode .section__pic-container img {
  border-color: var(--bg-card);
}

body.dark-mode .modal-content {
  background: var(--bg-card);
  color: var(--text-body);
}

body.dark-mode .btn-color-2 {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

body.dark-mode .text-container p {
  color: var(--text-body);
}

/* THEME TOGGLE */
.theme-toggle {
  background: none;
  border: 2px solid var(--secondary-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  background: var(--secondary-color);
  transform: rotate(30deg);
}

.theme-icon {
  font-size: 1.2rem;
  color: var(--primary-color);
}

/* LANGUAGE SWITCH: sits beside the theme toggle and mirrors its shape */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lang-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 2px solid var(--secondary-color);
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--primary-color);
  transition: all 0.3s ease;
}

.lang-toggle:hover {
  background: var(--secondary-color);
  color: var(--primary-color);
  text-decoration: none;
}

/* TRANSITION */

a,
.btn {
  transition: all 300ms ease;
}

/* DESKTOP NAV */

nav,
.nav-links {
  display: flex;
}

nav {
  justify-content: space-around;
  align-items: center;
  height: 17vh;
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 36, 77, 0.1);
}

.nav-links {
  gap: 2rem;
  list-style: none;
  font-size: 1.5rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  text-decoration-color: white;
}

a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
  text-underline-offset: 1rem;
  text-decoration-color: var(--secondary-color);
}

.logo {
  font-size: 2rem;
  color: var(--primary-color);
  font-weight: 600;
}

.logo:hover {
  cursor: default;
}

/* HAMBURGER MENU */

#hamburger-nav {
  display: none;
}

.hamburger-menu {
  position: relative;
  display: inline-block;
}

.hamburger-icon {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 24px;
  width: 30px;
  cursor: pointer;
}

/* The icon is 30x24; the invisible pseudo-element widens the touch target to 44x44. */
.hamburger-icon::before {
  content: "";
  position: absolute;
  inset: -10px -7px;
}

.hamburger-icon span {
  width: 100%;
  height: 2px;
  background-color: var(--primary-color);
  transition: all 0.3s ease-in-out;
}

.menu-links {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: var(--bg-primary);
  width: fit-content;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease-in-out;
}

.menu-links a {
  display: block;
  padding: 10px;
  text-align: center;
  font-size: 1.5rem;
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.3s ease-in-out;
}

.menu-links li {
  list-style: none;
}

.menu-links.open {
  max-height: 300px;
}

.hamburger-icon.open span:first-child {
  transform: rotate(45deg) translate(10px, 5px);
}

.hamburger-icon.open span:nth-child(2) {
  opacity: 0;
}

.hamburger-icon.open span:last-child {
  transform: rotate(-45deg) translate(10px, -5px);
}

/* SECTIONS */

section {
  padding-top: 4vh;
  height: 96vh;
  margin: 0 10rem;
  box-sizing: border-box;
  min-height: fit-content;
  opacity: 0;
  transform: translateY(30px);
}

section.visible {
  animation: fadeInUp 0.8s ease forwards;
}

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

/* First section visible by default */
#profile {
  opacity: 1;
  transform: translateY(0);
}

.section-container {
  display: flex;
}

/* PROFILE SECTION */

#profile {
  display: flex;
  justify-content: center;
  gap: 5rem;
  height: 80vh;
}

.section__pic-container {
  display: flex;
  height: 400px;
  width: 400px;
  margin: auto 0;
  position: relative;
}

.section__pic-container::before {
  content: '';
  position: absolute;
  inset: -10px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 2rem;
  z-index: -1;
  opacity: 0.3;
}

.section__pic-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2rem;
  border: 4px solid white;
  box-shadow: 0 10px 30px rgba(0, 36, 77, 0.2);
  transition: transform 0.3s ease;
}

.section__pic-container img:hover {
  transform: scale(1.02);
}

.section__text {
  align-self: center;
  text-align: center;
}

.section__text p {
  font-weight: 600;
}

.section__text__p1 {
  text-align: center;
  color: var(--secondary-color);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 1rem;
}

.section__text__p2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
  min-height: 2.5rem;
}

.title {
  font-size: 3rem;
  text-align: center;
  color: var(--primary-color);
  position: relative;
  display: inline-block;
  width: 100%;
  margin-bottom: 1rem;
}

.title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border-radius: 2px;
}

#socials-container {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  gap: 1rem;
}

/* TYPING CURSOR */
.cursor {
  animation: blink 1s infinite;
  color: var(--secondary-color);
  font-weight: 300;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* ICONS */

.icon {
  cursor: pointer;
  height: 2rem;
  transition: all 0.3s ease;
}

#socials-container .icon {
  filter: grayscale(100%);
  opacity: 0.7;
}

#socials-container .icon:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: translateY(-5px) scale(1.1);
}

/* BUTTONS */

.btn-container {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  font-weight: 600;
  transition: all 300ms ease;
  padding: 1rem;
  width: 8rem;
  border-radius: 2rem;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
  z-index: -1;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}
.btn,
.btn:hover,
.btn:focus {
  text-decoration: none !important;
  text-underline-offset: 0 !important;
}

.btn-color-1,
.btn-color-2 {
  border: var(--primary-color) 0.1rem solid;
}

.btn-color-1,
.btn-color-2:hover {
  background: var(--primary-color);
  color: var(--text-light);
}

.btn-color-1:hover {
  background: var(--secondary-color);
  border: var(--secondary-color) 0.1rem solid;
  color: var(--primary-color);
}

.btn-color-2 {
  background: none;
  color: var(--primary-color);
}

.btn-color-2:hover {
  border: var(--primary-color) 0.1rem solid;
}

/* ABOUT SECTION */

#about {
  position: relative;
}

.about-pic-container {
  flex-shrink: 0;
  width: 280px;
  margin-right: 3rem;
}

.about-pic {
  width: 100%;
  height: 350px;
  object-fit: cover;
  border-radius: 2rem;
  box-shadow: 0 8px 24px rgba(0, 36, 77, 0.15);
  transition: transform 0.3s ease;
}

.about-pic:hover {
  transform: scale(1.02);
}

.about-containers {
  gap: 2rem;
  margin-bottom: 2rem;
  margin-top: 2rem;
}

.about-details-container {
  justify-content: center;
  flex-direction: column;
}

.about-containers,
.about-details-container {
  display: flex;
}

.arrow {
  position: absolute;
  right: -5rem;
  bottom: 2.5rem;
}

.details-container {
  padding: 1.5rem;
  flex: 1;
  background: var(--bg-card);
  border-radius: 2rem;
  border: var(--border-color) 0.15rem solid;
  text-align: center;
  transition: all 0.3s ease;
}

.details-container:hover {
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(0, 36, 77, 0.15);
  transform: translateY(-4px);
}

.section-container {
  gap: 4rem;
  height: 80%;
}

/* EXPERIENCE / SKILLS SECTION */

#experience {
  position: relative;
}

.experience-sub-title {
  color: rgb(85, 85, 85);
  font-weight: 600;
  font-size: 1.75rem;
  margin-bottom: 2rem;
}

body.dark-mode .experience-sub-title {
  color: #b0b0b0;
}

.experience-details-container {
  display: flex;
  justify-content: center;
  flex-direction: column;
}

.article-container {
  display: flex;
  text-align: initial;
  flex-wrap: wrap;
  flex-direction: row;
  gap: 2.5rem;
  justify-content: space-around;
}

article {
  display: flex;
  width: 10rem;
  justify-content: space-around;
  gap: 0.5rem;
}

article .icon {
  cursor: default;
}

/* Name and bar share one flex item. Letting it take the rest of the row gives every
   bar the same length, so the fill percentage reads the same for every skill. */
article > div {
  flex: 1;
  min-width: 0;
}

article {
  transition: all 0.3s ease;
}

article:hover {
  transform: translateY(-5px);
  background: rgba(212, 182, 142, 0.05);
  padding: 0.5rem;
  border-radius: 1rem;
}

/* SKILL BARS */
.skill-bar {
  width: 100%;
  height: 6px;
  background: rgba(0, 36, 77, 0.1);
  border-radius: 3px;
  margin-top: 4px;
  overflow: hidden;
}

body.dark-mode .skill-bar {
  background: rgba(255, 255, 255, 0.1);
}

.skill-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border-radius: 3px;
  width: 0%;
  transition: width 1.2s ease;
}

.skill-fill.animate {
  /* Width is set inline */
}

/* PROJECTS SECTION */

#projects {
  position: relative;
}

.projects-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem;
}

.project-icon {
  margin-bottom: 1rem;
  padding: 1rem;
  background: rgba(212, 182, 142, 0.1);
  border-radius: 1rem;
  display: inline-flex;
  transition: all 0.3s ease;
}

.project-card:hover .project-icon {
  transform: scale(1.1);
  background: rgba(212, 182, 142, 0.2);
}

.project-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.tag {
  background: rgba(0, 36, 77, 0.08);
  color: var(--primary-color);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
}

body.dark-mode .tag {
  background: rgba(139, 184, 232, 0.15);
}

.color-container {
  border-color: var(--secondary-color);
  background: var(--bg-secondary);
}

.project-img {
  border-radius: 2rem;
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: all 0.4s ease;
  filter: brightness(0.95);
}

.details-container:hover .project-img {
  transform: scale(1.05);
  filter: brightness(1);
}

.project-title {
  margin: 1rem;
  color: var(--primary-color);
  cursor: pointer;
  transition: color 0.3s ease;
}

.project-title:hover {
  color: var(--secondary-color);
}

.project-btn {
  color: var(--primary-color);
  border-color: var(--secondary-color);
}

/* CONTACT */

#contact {
  display: flex;
  justify-content: center;
  flex-direction: column;
  height: 70vh;
}

.contact-info-upper-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  border-radius: 2rem;
  border: var(--border-color) 0.15rem solid;
  background: var(--bg-secondary);
  margin: 2rem auto;
  padding: 0.5rem;
}

.contact-info-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem;
  transition: all 0.3s ease;
  padding: 1rem;
  border-radius: 1rem;
}

.contact-info-container:hover {
  background: rgba(212, 182, 142, 0.1);
  transform: translateY(-3px);
}

.contact-info-container p {
  font-size: larger;
}

.contact-icon {
  cursor: default;
}

.email-icon {
  height: 2.5rem;
}

/* FOOTER SECTION */

footer {
  height: 26vh;
  margin: 0 1rem;
  padding: 1rem 0;
  background: linear-gradient(135deg, var(--primary-color) 0%, #003d7a 100%);
  border-radius: 2rem 2rem 0 0;
  margin-top: 4rem;
}

/* Skills are grouped by how deeply they have been used, each with the project that
   shows it. This replaced percentage bars that no one could check. */
.skill-rows {
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 1.1rem;
}

.skill-rows article {
  width: 100%;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 0.75rem;
}

.skill-evidence {
  font-size: 0.9rem;
  color: var(--text-body);
  margin-top: 0.15rem;
}

/* The footer reuses <nav>, which otherwise inherits the sticky white top bar and
   hides the links in a light box. Reset it so they sit on the footer gradient. */
footer nav,
body.dark-mode footer nav {
  position: static;
  height: auto;
  padding: 1rem 0;
  background: none;
  backdrop-filter: none;
  box-shadow: none;
}

body.dark-mode footer .nav-links a:hover {
  color: #ffffff;
}

.nowrap {
  white-space: nowrap;
}

footer p {
  text-align: center;
  color: var(--text-light);
}

body.dark-mode footer p {
  color: #b0b0b0;
}

footer .nav-links a {
  color: var(--secondary-color);
}

footer .nav-links a:hover {
  color: var(--text-light);
}

/* MODAL */

.modal {
  display: none;
  position: fixed;
  z-index: 999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
  background-color: var(--bg-card);
  margin: 10% auto;
  padding: 20px;
  border-radius: 8px;
  width: 90%;
  max-width: 700px;
  max-height: 80vh;
  overflow-y: auto;
}

.close {
  color: var(--primary-color);
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  background: var(--secondary-color);
  padding: 5px 10px;
  border-radius: 50%;
  border: none;
}

.close:hover {
  color: var(--text-light);
  background: var(--primary-color);
}

/* TEXT CONTAINER */

.text-container {
  text-align: justify;
}

/* DUAL NAME / IDENTITY */
.name-alt {
  display: inline-flex;
  align-items: stretch;
  margin: 0 auto 1.25rem;
  padding: 0.35rem 0.4rem;
  border: 1px solid var(--border-color);
  border-radius: 2rem;
  background: rgba(212, 182, 142, 0.08);
}

.name-alt__part {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.75rem;
}

.name-alt__sep {
  width: 1px;
  align-self: stretch;
  background: var(--border-color);
  opacity: 0.6;
}

.name-alt__label {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--secondary-color);
}

.name-alt__value {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--primary-color);
  white-space: nowrap;
}

body.dark-mode .name-alt {
  background: rgba(212, 182, 142, 0.12);
}

.contact-note {
  max-width: 42rem;
  margin: 1.75rem auto 0;
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-body);
}

.contact-note strong {
  color: var(--primary-color);
  font-weight: 600;
}

/* PROJECT GROUPS */
.project-group-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-color);
  text-align: center;
  margin-top: 2.5rem;
  position: relative;
  padding-bottom: 0.6rem;
}

.project-group-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border-radius: 2px;
}

/* TOOLS ROW, wider grid so the full-width card breathes */
.tools-container {
  gap: 2rem 2.5rem;
  justify-content: flex-start;
}

.tools-container article {
  width: 12rem;
}

.project-note {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  font-style: italic;
  color: var(--text-body);
  opacity: 0.85;
}
