/* =====================
   THEME VARIABLES
   ===================== */
:root {
  --bg: #ffffff;
  --bg-secondary: rgb(250, 250, 250);
  --text-primary: #222222;
  --text-secondary: #333333;
  --text-body: rgb(85, 85, 85);
  --border-color: rgb(163, 163, 163);
  --nav-bg: #ffffff;
  --card-bg: #ffffff;
  --btn-color-2-bg: #ffffff;
  --btn-color-2-text: #333333;
  --hamburger-span-bg: black;
  --icon-filter: invert(20%) sepia(27%) saturate(0%) hue-rotate(211deg)
    brightness(90%) contrast(98%);
}

[data-theme="dark"] {
  --bg: #0f0f0f;
  --bg-secondary: #1a1a1a;
  --text-primary: #f0f0f0;
  --text-secondary: #cccccc;
  --text-body: #aaaaaa;
  --border-color: #444444;
  --nav-bg: #111111;
  --card-bg: #1e1e1e;
  --btn-color-2-bg: #1e1e1e;
  --btn-color-2-text: #cccccc;
  --hamburger-span-bg: #f0f0f0;
  --icon-filter: invert(80%) sepia(10%) saturate(200%) hue-rotate(180deg)
    brightness(90%) contrast(90%);
}

/* =====================
   RESET & BASE
   ===================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg);
  color: var(--text-body);
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

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

h3 {
  color: var(--text-secondary);
}

a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 300ms ease;
}

a:hover {
  color: #b056ed;
  text-decoration: underline;
  text-underline-offset: 0.5rem;
  text-decoration-color: #b056ed;
}

/* =====================
   CUSTOM LINK
   ===================== */
.custom-link {
  color: #007bff;
  text-decoration: underline;
  cursor: pointer;
}

.custom-link:hover {
  color: #b056ed;
  text-underline-offset: 0.5rem;
  text-decoration-color: #b056ed;
}

/* =====================
   DESKTOP NAV
   ===================== */
nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 17vh;
  background-color: var(--nav-bg);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 2rem;
}

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

.logo {
  color: var(--text-primary);
  font-size: 2rem;
  cursor: default;
}

/* =====================
   HAMBURGER NAV
   ===================== */
#hamburger-nav {
  display: none;
}

.hamburger-menu {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
}

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

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

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

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

.menu-links a:hover {
  color: #b056ed;
  text-decoration: underline;
  text-underline-offset: 0.5rem;
  text-decoration-color: #b056ed;
}

.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);
}

/* =====================
   THEME TOGGLE
   ===================== */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
}

.toggle-track {
  width: 48px;
  height: 26px;
  background-color: #cccccc;
  border-radius: 999px;
  position: relative;
  transition: background-color 0.3s ease;
}

[data-theme="dark"] .toggle-track {
  background-color: #b056ed;
}

.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-theme="dark"] .toggle-thumb {
  transform: translateX(22px);
}

.toggle-thumb::before {
  content: "🌙";
  font-size: 11px;
}

[data-theme="dark"] .toggle-thumb::before {
  content: "☀️";
}

/* =====================
   SECTIONS
   ===================== */
section {
  padding-top: 4vh;
  margin: 0 10rem;
  min-height: fit-content;
}

/* =====================
   HERO SECTION
   ===================== */
#hero {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5rem;
  height: 80vh;
  position: relative;
}

.section_pic-container {
  display: flex;
  height: 400px;
  width: 400px;
  flex-shrink: 0;
  margin: 0;
}

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

.section_text p {
  color: var(--text-secondary);
  font-weight: 600;
}

.section_text_p1 {
  text-align: center;
  font-size: 1.4rem;
}

.section_text_p2 {
  text-align: center;
  font-size: 1.75rem;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.title {
  color: var(--text-primary);
  font-size: 3rem;
  text-align: center;
}

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

/* =====================
   ICONS
   ===================== */
.icon-hero,
.icon-arrow,
.icon-experience,
.icon-contact {
  filter: var(--icon-filter);
}

.icon-hero {
  cursor: pointer;
  height: 2rem;
}

.icon-hero:hover,
.icon-arrow:hover {
  filter: invert(52%) sepia(93%) saturate(4630%) hue-rotate(251deg)
    brightness(99%) contrast(88%);
}

.icon-arrow {
  cursor: pointer;
  height: 2rem;
}

.icon-experience {
  height: 1.2rem;
}

.icon-contact {
  height: 2rem;
}

/* =====================
   ARROW
   ===================== */
.arrow {
  position: absolute;
  right: -5rem;
  bottom: 2rem;
}

#about .arrow {
  bottom: -0.4rem;
}

#experience .arrow {
  bottom: 2rem;
}

/* =====================
   BUTTONS
   ===================== */
.btn-container {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.btn {
  font-weight: 600;
  padding: 1rem;
  width: 8rem;
  border-radius: 2rem;
  cursor: pointer;
  transition: all 300ms ease;
}

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

.btn-color-1 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background-color: #333333;
  color: white !important;
}

.btn-color-2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background-color: var(--btn-color-2-bg);
  color: var(--btn-color-2-text);
}

.btn-color-1:hover,
.btn-color-2:hover {
  background-color: #b056ed;
  color: white !important;
  border-color: #b056ed;
}

/* =====================
   ABOUT SECTION
   ===================== */
#about {
  position: relative;
  margin-top: 3rem;
  margin-bottom: 0;
}

.section-container {
  display: flex;
  gap: 4rem;
  align-items: flex-start;
  margin-top: 3rem;
}

.about-details-container {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-self: flex-start;
}

.about-pic {
  border-radius: 2rem;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-me {
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 2rem;
}

/* =====================
   EXPERIENCE SECTION
   ===================== */
#experience {
  position: relative;
  margin-top: 5rem;
  margin-bottom: 0;
}

.experience-details-container {
  display: flex;
  flex-direction: column;
  margin-top: 2rem;
}

.exp-block {
  margin-bottom: 3.5rem;
}

.exp-block:first-child {
  margin-top: 0.5rem;
}

.exp-section-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.2rem;
  padding-top: 0rem;
}

.exp-item {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 1rem;
}

.exp-avatar {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  background-color: var(--border-color);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
}

.exp-avatar.edu {
  background-color: transparent;
  border: none;
  overflow: hidden;
}

.exp-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: var(--icon-filter);
}

.exp-info {
  flex: 1;
}

.exp-role-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.exp-role {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.exp-sub {
  font-size: 0.9rem;
  color: var(--text-body);
  margin-top: 0.2rem;
}

.exp-date {
  font-size: 0.95rem;
  color: var(--text-body);
  white-space: nowrap;
}

/* Tech Stack & Design Tools */
.about-containers {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.details-container {
  padding: 1.5rem;
  flex: 1;
  background: var(--card-bg);
  border-radius: 2rem;
  border: 0.1rem solid var(--border-color);
  text-align: center;
}

.experience-sub-title {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 1.75rem;
  margin-bottom: 2rem;
}

.article-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: flex-start;
  align-items: center;
}

article {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: calc(50% - 1rem);
  text-align: center;
}

/* =====================
   PROJECTS SECTION
   ===================== */
#projects {
  position: relative;
  margin-top: 1rem;
  padding-top: 5rem;
}

#projects .about-containers {
  flex-wrap: wrap;
  justify-content: flex-start;
}

#projects .details-container {
  flex: 0 0 calc(33.333% - 1.4rem);
  max-width: calc(33.333% - 1.4rem);
}

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

.project-img-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1rem;
  overflow: hidden;
}

.project-img {
  border-radius: 2rem;
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.project-content {
  text-align: center;
}

.project-title {
  margin: 1rem 0;
  color: var(--text-secondary);
  text-align: center;
}

.project-description {
  font-size: 0.95rem;
  line-height: 1.6rem;
  color: var(--text-body);
  margin-bottom: 1rem;
  text-align: center;
}

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

.project-tag {
  border: 0.05rem solid var(--border-color);
  border-radius: 0.4rem;
  padding: 0.2rem 0.6rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: transparent;
}

.project-btn {
  width: auto;
  padding: 0.6rem 1.2rem;
  border-color: var(--border-color);
  min-width: 0;
  flex: 0 0 auto;
}

.btn-icon {
  height: 1rem;
  filter: var(--icon-filter);
}

.btn-icon-white {
  height: 1rem;
  filter: invert(100%);
}

/* =====================
   CONTACT SECTION
   ===================== */
#contact {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  min-height: 60vh;
}

.contact-info-upper-container {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2rem;
  border: 0.1rem solid var(--border-color);
  background: var(--bg-secondary);
  margin: 2rem auto;
  padding: 0.5rem;
  max-width: 600px;
  width: 100%;
}

.contact-info-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem;
}

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

/* =====================
   FOOTER
   ===================== */
footer {
  min-height: 20vh;
  margin: 0 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem 0;
}

footer p {
  text-align: center;
}

.nav-links-container {
  display: flex;
  justify-content: center;
}

/* =====================
   FADE ANIMATION
   ===================== */
.fade-section {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.fade-section.show {
  opacity: 1;
  transform: translateY(0);
}
