@import url("https://fonts.googleapis.com/css?family=Barlow+Condensed:300,400,500,600,700,800,900|Barlow:300,400,500,600,700,800,900&display=swap");

:root {
    --bg-body: #f5f5f5;
  --text: #333333;
  --about-bg-links: #4285F4;
  --nav-website-name-color: #f5f5f5;
  --nav-website-name-bg: #333333;
  --nav-link: #333333;
  --nav-link-hover: #4285F4;
  --nav-menu-icon: #333333;
  --logo-bg: rgba(0, 0, 0, 0.05);
  --menu-link-gradient-start: #64B5F6; /* Light Blue */
  --menu-link-gradient-end: #1E88E5;  /* Deep Blue */
  --wrapper-one-gradient-start: #A1C4FD;
  --wrapper-one-gradient-end: #C2E9FB;
  --wrapper-two-gradient-start: #FFE0B2;
  --wrapper-two-gradient-end: #FFCC80;
  --wrapper-three-bg: #42A5F5;
  --ticker-bg: #f5f5f5;
  --ticker-text: #333333;
  --button-bg: #f5f5f5;
  --button-text: #333333;
  --linkedin-bg: #0077b5;
  --linkedin-hover: #0056b3;
  --project-border: #aaa;
  --project-bg: #ffffff;
  --project-h2: #333333;
  --project-p: #555555;
  --search-bg: #ffffff;
  --search-border: #ccc;
  --card-border: #ddd;
  --card-bg: #ffffff;
  --card-text: #333333;
  --card-image-border: #eee;
  --card-header-color: #1E88E5;
  --card-header-overlay: rgba(255, 255, 255, 0.75);
  --header-description: #333333;
  --card-hover-bg: #f0f0f0;
  --view-button-bg: #007bff;
  --view-button-hover: #0056b3;
  --card-body-color: #252525;
  --card-tags-bg: #f5f5f5;
  --card-tags-border: #ddd;
  --tag-bg: #000000;
  --tag-color: white;
  --tag-hover-bg: #333333;
  --tag-selected-bg: #FF8C00;
  --tag-selected-color: white;
  --description-color:  #333333;
  --timeline-entry-bg: #ffffff;
  --timeline-entry-box-shadow: rgba(0, 0, 0, 0.1);
  --experience-h3: #42A5F5;
  --experience-p: #666666;
  --experience-link: #42A5F5;
  --timeline-date: #888888;
  --experience-description: #333333;
  --publication-entry-bg: #ffffff;
  --publication-entry-border: #42A5F5;
  --publication-h3: #42A5F5;
  --publication-link: #42A5F5;
  --cite-button-bg: #007b34;
  --cite-button-hover: #0056b3;
  --footer-nav: #333333;
  --footer-link: #f57c00;
  --footer-content: #666666;
  --award-bg: #ffffff;
  --award-border: #42a5f5;
  --award-h3: #1976d2;
  --award-p: #333333;
  --award-strong: #555555;

  --switch-color-dark: #333333;
  --switch-color-light: #f5f5f5;
  --transition-time: 0.3s;
}

:root.dark-mode, html.dark-mode {
  --bg-body: #3a3a3a;
  --text: white;
  --about-bg-links: #FF8C00;
  --nav-website-name-color: #695681;
  --nav-website-name-bg: white;
  --nav-link: white;
  --nav-link-hover: #FF8C00;
  --nav-menu-icon: white;
  --logo-bg: rgba(0, 0, 0, 0.1);
  --menu-link-gradient-start: #FFEDC0;
  --menu-link-gradient-end: #FF9D87;
  --wrapper-one-gradient-start: #FF80AB;
  --wrapper-one-gradient-end: #FF4081;
  --wrapper-two-gradient-start: #FFEDC0;
  --wrapper-two-gradient-end: #FF9D87;
  --wrapper-three-bg: #FF8C00;
  --ticker-bg: #3a3a3a;
  --ticker-text: white;
  --button-bg: #555;
  --button-text: white;
  --linkedin-bg: #FF8C00;
  --linkedin-hover: #FF6500;
  --project-border: #ccc;
  --project-bg: #f9f9f9;
  --project-h2: #555;
  --project-p: #777;
  --search-bg: #4a4a4a;
  --search-border: #666;
  --card-border: #666;
  --card-bg: #4a4a4a;
  --card-text: #f9f9f9;
  --card-image-border: #666;
  --card-header-color: #FF8C00;
  --card-header-overlay: rgba(60, 60, 60, 0.75);
  --header-description: #f9f9f9;
  --card-hover-bg: #555;
  --view-button-bg: #FF8C00;
  --view-button-hover: #FF6500;
  --card-body-color: white;
  --card-tags-bg: #4a4a4a;
  --card-tags-border: #666;
  --tag-bg: #000000;
  --tag-color: white;
  --tag-hover-bg: #333333;
  --tag-selected-bg: #FF8C00;
  --tag-selected-color: white;
  --description-color: #ccc;
  --timeline-entry-bg: #4a4a4a;
  --timeline-entry-box-shadow: rgba(255, 157, 135, 0.3);
  --experience-h3: #FF9D87;
  --experience-p: #bbb;
  --experience-link: #FF9D87;
  --timeline-date: whitesmoke;
  --experience-description: white;
  --publication-entry-bg: #4a4a4a;
  --publication-entry-border: #FF9D87;
  --publication-h3: #FF9D87;
  --publication-link: #FF9D87;
  --cite-button-bg: #FF8C00;
  --cite-button-hover: #FF6500;
  --footer-nav: #f4f4f4;
  --footer-link: #FF8C00;
  --footer-content: #ccc;
  --award-bg: #4a4a4a;
  --award-border: #FF8C00;
  --award-h3: white;
  --award-p: white;
  --award-strong: white;
}

* {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  box-sizing: border-box;
}

img {
  max-width: 100%;
  height: auto;
}
a {
  text-decoration: none;
  color: inherit;
}

/* ========================================= */
/* ===== NAVIGATION CSS (Desktop & Mobile) = */
/* ========================================= */

nav .menu {
  width: 100%;
  height: 80px;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  box-sizing: border-box;
  z-index: 1000000;
  background: var(--bg-body);
}
nav .menu .website_name {
  color: var(--nav-website-name-color);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 1px;
  background: var(--nav-website-name-bg);
  padding: 4px 8px;
  border-radius: 2px;
  opacity: 0.5;
  transition: all 0.4s ease;
  cursor: pointer;
}
nav .menu .website_name:hover {
  opacity: 1;
}

/* DESKTOP LINKS */
nav .menu .menu_links {
  transition: all 0.4s ease;
  opacity: 0.5;
  display: flex; /* Default: Visible on Desktop */
}
nav .menu .menu_links:hover {
  opacity: 1;
}
nav .menu .menu_links .link {
  color: var(--nav-link);
  text-transform: uppercase;
  font-weight: 500;
  font-size: 20px;
  margin-right: 50px;
  letter-spacing: 2px;
  position: relative;
  transition: all 0.3s 0.2s ease;
}
nav .menu .menu_links .link:last-child {
  margin-right: 0;
}
nav .menu .menu_links .link:before {
  content: "";
  position: absolute;
  width: 0px;
  height: 4px;
  background: linear-gradient(90deg, var(--menu-link-gradient-start) 0%, var(--menu-link-gradient-end) 100%);
  bottom: -10px;
  border-radius: 4px;
  transition: all 0.4s cubic-bezier(0.82, 0.02, 0.13, 1.26);
  left: 100%;
}
nav .menu .menu_links .link:hover {
  opacity: 1;
  color: var(--nav-link-hover);
}
nav .menu .menu_links .link:hover:before {
  width: 40px;
  left: 0;
}

/* HAMBURGER ICON */
nav .menu .menu_icon {
  width: 40px;
  height: 40px;
  position: relative;
  display: none; /* Default: Hidden on Desktop */
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 1000001;
}
nav .menu .menu_icon .icon {
  width: 24px;
  height: 2px;
  background: var(--nav-menu-icon);
  position: absolute;
}
nav .menu .menu_icon .icon:before, nav .menu .menu_icon .icon:after {
  content: "";
  width: 100%;
  height: 100%;
  background: inherit;
  position: absolute;
  transition: all 0.3s cubic-bezier(0.49, 0.04, 0, 1.55);
}
nav .menu .menu_icon .icon:before { transform: translateY(-8px); }
nav .menu .menu_icon .icon:after { transform: translateY(8px); }
nav .menu .menu_icon:hover .icon { background: var(--menu-link-gradient-start); }
nav .menu .menu_icon:hover .icon:before { transform: translateY(-10px); }
nav .menu .menu_icon:hover .icon:after { transform: translateY(10px); }

nav .menu .menu_icon.active .icon { background: transparent; }
nav .menu .menu_icon.active .icon:before { transform: rotate(45deg); }
nav .menu .menu_icon.active .icon:after { transform: rotate(-45deg); }

/* ===== SWITCH & OTHER STYLES ===== */

.switch {
  background: transparent;
  border-radius: 15px;
  cursor: pointer;
  display: block;
  height: 30px;
  position: relative;
  width: 60px;
  margin-left: 20px;
}
.switch__toggle {
  background: var(--switch-color-dark);
  border-radius: 15px;
  display: block;
  height: 100%;
  transition: background var(--transition-time);
  position: relative;
}
.switch__toggle::after {
  background: var(--switch-color-light);
  border-radius: 50%;
  content: "";
  display: block;
  height: 26px;
  width: 26px;
  left: 0;
  margin: 2px;
  position: absolute;
  top: 0;
  transition: transform var(--transition-time), background var(--transition-time);
}
.switch__state { opacity: 0; pointer-events: none; position: absolute; }
.switch__state:checked ~ .switch__toggle { background: var(--switch-color-light); }
.switch__state:checked ~ .switch__toggle::after {
  background: var(--switch-color-dark);
  transform: translate(calc(60px - 30px));
}

h1 { font-size: 36px; color: var(--text); }
h2 { font-size: 30px; color: var(--text); }
h3 { font-size: 24px; color: var(--text); }
h4 { font-size: 20px; color: var(--text); }
h5 { font-size: 18px; color: var(--text); }
h6 { font-size: 16px; color: var(--text); }
p { font-size: 14px; color: var(--text); line-height: 1.6; }

ul, li, button, a, i, input, body {
  margin: 0; padding: 0; list-style: none; border: 0;
  -webkit-tap-highlight-color: transparent; text-decoration: none; color: inherit;
}

body {
  margin: 0; padding: 0; height: auto; font-family: "Barlow", sans-serif;
  background: var(--bg-body); overflow-x: hidden; width: 100%; max-width: 100vw;
}

/* WRAPPER (Updated to Align Start) */
.wrapper {
  display: grid;
  grid-template-columns: 1fr;
  justify-content: center;
  align-items: start; /* Moved UP */
  min-height: 100vh;
  overflow-x: hidden;
  padding-top: 80px;
}

.wrapper .container {
  margin: 0 auto;
  transition: all 0.4s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  width: 100%;
  height: 80vh; 
}
.wrapper .container .scene { position: absolute; width: 100%; height: 100%; }

.wrapper .container .content,
.wrapper .container .three .content {
    width: 600px; height: 600px; display: flex;
    justify-content: center; align-items: center;
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation: content 0.8s cubic-bezier(1, 0.06, 0.25, 1) backwards;
}

.wrapper .container .content:before {
    content: ""; position: absolute; width: 600px; height: 600px;
    background-color: rgba(54, 24, 79, 0.05); border-radius: 100%; z-index: -1;
}

.wrapper .container .content .piece {
    width: 200px; height: 80px; display: flex; position: absolute;
    border-radius: 80px; z-index: 1;
    background: linear-gradient(90deg, var(--wrapper-one-gradient-start) 13.7%, var(--wrapper-one-gradient-end) 94.65%);
    animation: pieceLeft 8s cubic-bezier(1, 0.06, 0.25, 1) infinite both;
}

@keyframes pieceLeft { 50% { left: 0%; width: 10%; } }
@keyframes pieceRight { 50% { right: 0%; width: 100%; } }

.wrapper .container .content .piece:nth-child(1) { right: 15%; top: 18%; animation-name: pieceRight; }
.wrapper .container .content .piece:nth-child(2) { left: 15%; top: 45%; animation-name: pieceLeft; }
.wrapper .container .content .piece:nth-child(3) { left: 10%; top: 75%; animation-name: pieceLeft; }

.ticker-wrap {
  position: relative; width: 100%; overflow: hidden; height: 2rem;
  background-color: var(--ticker-bg); padding-left: 100%; margin-top: 50px;
}
.ticker {
  display: inline-block; height: 2rem; line-height: 2rem;
  white-space: nowrap; padding-right: 100%; animation: ticker 50s linear infinite;
}
.ticker_item {
  color: var(--ticker-text); display: inline-block; padding: 0 4rem; font-size: 1.5rem;
}
@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }

.content-container, .about-section {
  width: 100%; max-width: 1200px; margin: 0 auto;
  box-sizing: border-box; padding: 20px; position: relative; z-index: 5;
}
.about-section { display: flex; align-items: center; justify-content: space-between; }
footer { text-align: center; padding: 20px; color: var(--footer-content); }

/* About Floating Links */
.about {
  position: fixed; background-image: url('../assets/er.png'); z-index: 10;
  width: 40px; height: 40px; top: 100px; right: 75px;
  display: flex; justify-content: flex-end; align-items: flex-end; transition: all 0.2s ease;
}
.about .bg_links {
  width: 60px; height: 60px; border-radius: 100%; display: flex;
  justify-content: center; align-items: center; background-color: var(--about-bg-links);
  backdrop-filter: blur(5px); position: absolute;
}
.about .logo {
  width: 60px; height: 60px; z-index: 9; background-image: url('../assets/er.png');
  background-size: 50%; background-repeat: no-repeat; background-position: 10px 7px;
  opacity: 0.9; transition: all 1s 0.2s ease; bottom: 0; right: 0;
}
.about .social { opacity: 0; bottom: 0; transform: translate(0, 0); transition: transform 0.4s ease, opacity 0.4s ease; }
.about .social .icon { width: 100%; height: 100%; background-size: 20px; background-repeat: no-repeat; background-position: center; display: flex; transition: all 0.2s ease; opacity: 0; border-radius: 100%; }
.about:hover .logo { opacity: 1; transition: all 0.6s ease; }
.about:hover .social { opacity: 1; }
.about:hover .social.portfolio { transform: translateY(70px); }
.about:hover .social.github { transform: translateY(140px); }
.about:hover .social.linkedin { transform: translateY(210px); }
.about:hover .social.orcid { transform: translateY(280px); }
.about:hover .social.scholar { transform: translateY(350px); }


/* ========================================= */
/* ===== MOBILE RESPONSIVENESS & MENUS ===== */
/* ========================================= */

@media screen and (max-width: 799px) {
  nav .menu { padding: 0 3%; }
  nav .menu .menu_links { display: none; }
  nav .menu .menu_icon { display: flex; }

  .about-section { flex-direction: column !important; text-align: center; }
  .about-section .content { order: 2; margin-top: 20px; }
  .about-section img.profile-picture {
    order: 1; width: 200px !important; height: 200px !important; margin: 0 auto 20px auto !important;
  }
  .about { display: none !important; }
  .wrapper .container .content:before { width: 300px; height: 300px; }
  .wrapper .container { height: auto; min-height: 400px; }
}

/* =========================================== */
/* ===== MOBILE OVERLAY (Black Scrollable) === */
/* =========================================== */

.mobile-menu-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.98); z-index: 999999;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease; display: block; 
}
.mobile-menu-overlay.active { opacity: 1 !important; pointer-events: all !important; }

.mobile-menu-content {
  min-height: 100%; width: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 80px 0 40px 0; box-sizing: border-box;
}

.mobile-menu-content a:not(.social-links a) {
  font-size: 32px; color: white; text-decoration: none; margin: 15px 0;
  font-weight: 700; transition: color 0.3s; letter-spacing: 1px;
}
.mobile-menu-content a:hover { color: #4285F4; }

.social-divider { width: 60px; height: 1px; background: rgba(255, 255, 255, 0.3); margin: 30px 0; }
.social-links { display: flex; flex-direction: column; gap: 15px; text-align: center; }
.social-links a { font-size: 18px; color: #aaa; font-weight: 400; }
.social-links a:hover { color: white; }

.mobile-menu-close {
  position: fixed; top: 25px; right: 25px; width: 44px; height: 44px;
  background: transparent; border: none; cursor: pointer; z-index: 1000000;
  display: flex; align-items: center; justify-content: center; color: white;
}
.mobile-menu-close svg { stroke: white; }

/* ========================================= */
/* ===== CV CARD GRID LAYOUT STYLES  ======= */
/* ========================================= */

/* 1. Header + Button Layout */
.section-header-wrapper {
  display: flex; align-items: center; gap: 20px; margin-bottom: 20px;
  border-bottom: 2px solid var(--nav-link-hover); padding-bottom: 10px;
}
.section-header-wrapper h2 { margin: 0; white-space: nowrap; }

.view-button {
  background-color: var(--view-button-bg); color: white;
  padding: 10px 20px; border-radius: 5px; cursor: pointer; border: none; font-size: 14px;
}

.view-button {
    background: linear-gradient(135deg, var(--view-button-bg) 0%, var(--view-button-hover) 100%);
    color: white;
    font-size: 16px;
    font-weight: 600;
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

/* 2. The Grid Container */
.cv-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); 
  gap: 25px; margin-bottom: 60px;
}

/* 3. Universal Card Styling */
.timeline-entry, .publication-entry, .award-item {
  background-color: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: 12px; padding: 20px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%; display: flex; flex-direction: column;
}
.timeline-entry:hover, .publication-entry:hover, .award-item:hover {
  transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
  border-color: var(--nav-link-hover);
}




.publication-entry h3 {
  color: var(--publication-link);
  text-decoration: bold;
  font-weight: 600;
  font-size: 14px;
  transition: color 0.2s ease;
}

.publication-link:hover {
  color: var(--nav-link-hover);
  text-decoration: underline;
}

.publication-entry a {
  color: var(--publication-link);
  text-decoration: bold;
  transition: color 0.2s ease;
}

/* 4. Experience Card Specifics */
.timeline-entry .entry-top {
  display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 15px;
}
.experience-image {
  width: 60px; height: 60px; border-radius: 8px; object-fit: cover; border: 1px solid var(--card-border);
}
.timeline-date {
  font-size: 14px; font-weight: 700; color: var(--experience-link); text-align: right; margin: 0;
}
.experience-header h3 {
  font-size: 18px; margin: 0 0 5px 0; color: var(--text); line-height: 1.3;
}
.experience-header p {
  font-size: 14px; font-style: italic; color: var(--experience-p); margin: 0 0 15px 0;
}
.experience-description {
  font-size: 14px; color: var(--text); flex-grow: 1; margin-bottom: 15px;
}
/* Center Tags and set color */
.experience-tags {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; justify-content: center;
}
.experience-tags .tag { 
  font-size: 11px; padding: 4px 8px; border-radius: 4px;
  background-color: var(--tag-bg) !important; color: var(--tag-color) !important;
}

/* 5. Publication & Award Specifics */
.publication-entry, .award-item {
  border-left: 1px solid var(--card-border);
  border-top: 4px solid var(--publication-entry-border);
}
.award-item h3, .publication-entry h3 {
  font-size: 18px; margin-bottom: 10px; color: var(--text);
}
/* Proper Cite Button Styling */
.cite-button {
  margin-top: auto; align-self: flex-start; 
  background-color: var(--cite-button-bg); color: white;
  border: none; padding: 8px 16px; border-radius: 4px; cursor: pointer;
  font-weight: 600; transition: background 0.3s;
  display: inline-flex; align-items: center; gap: 6px;
}
.cite-button:hover { background-color: var(--cite-button-hover); }

/* 6. Mobile Responsiveness for Grid */
@media screen and (max-width: 768px) {
  .cv-grid-container { grid-template-columns: 1fr; }
  .section-header-wrapper { flex-direction: column; align-items: flex-start; }
}

.backToTop {
    position: fixed; bottom: 20px; right: 20px; display: none; 
    background-color:  #FF6500; color: white; border: none;
    padding: 12px 18px; font-size: 16px; cursor: pointer;
    border-radius: 5px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1000;
}
.back-to-top:hover {
    background-color: #FF6500; /* Darker Orange */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}
