/*For Popup box*/
/* Popup overlay */
.popup {
  display: none;
  /* Hidden by default */
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  /* Dark overlay */
  backdrop-filter: blur(3px);
  /* Subtle blur effect */
  transition: opacity 0.3s ease;
}

/* Popup links */
.popup-links {
  display: flex;
  gap: 25px;
  /* Adjust this number to increase or decrease space */
  text-decoration: none;
}

/* Popup content box */
.popup-content {
  background: #ffffff;
  margin: 10% auto;
  padding: 25px 30px;
  width: 90%;
  max-width: 450px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  animation: slideDown 0.5s ease;
}

.highconn {
  color: #000000;
  font-size: 1rem;
  margin-bottom: 15px;
  font-weight: 500;
}

/* Heading inside popup */
.popup-content h2 {
  font-size: 1.6rem;
  margin-bottom: 10px;
  color: #222;
}

/* Paragraphs */
.popup-content p {
  font-size: 1rem;
  color: #030303cc;
  line-height: 1.5;
  margin: 10px 0;
}

/* Links inside popup */
.popup-content a {
  color: #0077cc;
  text-decoration: none;
  font-weight: 600;
}

.popup-content a:hover {
  text-decoration: underline;
}

/* Close button (X) */
.close {
  float: right;
  font-size: 26px;
  font-weight: bold;
  cursor: pointer;
  color: #888;
  transition: color 0.3s ease;
}

.close:hover {
  color: #000;
}

/* Animation for popup */
@keyframes slideDown {
  from {
    transform: translateY(-30px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* --------------------------------------------------
   GLOBAL STYLE
---------------------------------------------------*/
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

:root {
  --bg: #f5f6fa;
  --text: #222;
  --card: #ffffff;
}

body {
  background: var(--bg);
  color: var(--text);
  padding: 20px;
  transition: 0.3s ease-in-out;
  animation: fadeIn 0.7s ease-in-out;
}

/* date and time */
.datetime {
  margin-top: 25px;
  background: rgba(255, 255, 255, 0.25);
  padding: 15px 25px;
  border-radius: 15px;
  backdrop-filter: blur(10px);
  color: #89e9bc;
  font-size: 26px;
  font-weight: 700;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  text-align: center;
  transition: 0.3s;
}

.datetime:hover {
  transform: scale(1.07);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
}

/* Fade Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Dark Mode Colors */
.dark-mode {
  --bg: #1e1e1e;
  --text: #eaeaea;
  --card: #2a2a2a;
}

/* --------------------------------------------------
   HEADER
---------------------------------------------------*/
.header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
  position: relative;
  z-index: 999;
}

.profile-img {
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #4a90e2;
  order: 1;
}

.title {
  font-size: 2.2rem;
  font-weight: bold;
  color: #6e1010;
  order: 1;
}

/* DARK MODE TOGGLE BUTTON */
.theme-btn {
  padding: 10px 16px;
  background: #4a90e2;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: 0.3s;
  position: relative;
  z-index: 999;
  overflow: hidden;
  /* push theme button to the right */
  margin-left: auto;
  order: 2;
}

.theme-btn:hover {
  background: #357bd4;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

.theme-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.25);
  transition: 0.35s ease;
}

.theme-btn:hover::after {
  left: 0;
}

/* Responsive: theme button */
@media (max-width: 768px) {
  .theme-btn {
    padding: 8px 12px;
    font-size: 0.85rem;
  }
}

@media (max-width: 600px) {
  .theme-btn {
    padding: 6px 10px;
    font-size: 0.8rem;
  }
}

/* --------------------------------------------------
   HAMBURGER ICON
---------------------------------------------------*/
.menu-icon {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  /* ensure hamburger sits on the left */
  margin-left: 0;
  order: 0;
  transition: 0.3s;
  position: relative;
  z-index: 1100;
}

.menu-icon div {
  width: 28px;
  height: 3px;
  background: var(--text);
  border-radius: 3px;
  transition: 0.3s ease;
}

/* X Animation */
.menu-icon.open div:nth-child(1) {
  transform: rotate(45deg) translateY(8px);
}

.menu-icon.open div:nth-child(2) {
  opacity: 0;
}

.menu-icon.open div:nth-child(3) {
  transform: rotate(-45deg) translateY(-8px);
}

/* --------------------------------------------------
   DROPDOWN MENU (Glass + Animation)
---------------------------------------------------*/
.dropdown-menu {
  position: absolute;
  top: 70px;
  /* show dropdown under hamburger on the left */
  left: 20px;
  width: 160px;
  padding: 12px;
  border-radius: 10px;
  display: none;
  flex-direction: column;

  /* Glass Effect */
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.15);

  /* Animation */
  opacity: 0;
  transform: translateY(-10px) scale(0.95);
  transition: 0.35s ease;
  pointer-events: none;

  z-index: 1000;
}

/* Brand area sits after hamburger */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  order: 1;
}

.dropdown-menu.show {
  display: flex;
  opacity: 1;
  transform: translateY(0px) scale(1);
  pointer-events: auto;
}

.dropdown-menu a {
  padding: 10px;
  text-decoration: none;
  color: var(--text);
  font-size: 1rem;
  border-radius: 6px;
  transition: 0.2s;
}

.dropdown-menu a:hover {
  background: #4a90e2;
  color: white;
}

/* Dark Mode Glass */
.dark-mode .dropdown-menu {
  background: rgba(35, 144, 187, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* --------------------------------------------------
   SECTIONS (Glassmorphism)
---------------------------------------------------*/
.intro,
.connect {
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(20px);
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.15);

  padding: 25px;
  border-radius: 12px;
  margin-bottom: 30px;
  transition: 0.3s ease;
}

.dark-mode .intro,
.dark-mode .connect {
  background: rgba(109, 44, 44, 0.35);
}

/* Intro text */
.intro h2 {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.intro p {
  line-height: 1.7;
  margin-bottom: 20px;
}

/* --------------------------------------------------
   SHORTCUTS (Homepage)
---------------------------------------------------*/
.shortcuts {
  margin: 28px 0;
}

.shortcuts h3 {
  margin-bottom: 12px;
  font-size: 1.2rem;
}

.shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
}

.shortcut-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--card);
  color: var(--text);
  border-radius: 10px;
}

/* Logout button */
.logout-btn {
  background: #f44336;
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}
.logout-btn:hover { opacity: 0.95; 
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}



.shortcut-card .icon {
  font-size: 1.6rem;
}

.shortcut-card .label {
  font-weight: 600;
}

.shortcut-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.09);
}

.dark-mode .shortcut-card {
  background: rgba(255, 255, 255, 0.03);
}

/* Button */
.btn {
  padding: 10px 20px;
  background: #4a90e2;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: 0.3s;
  overflow: hidden;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

.btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.25);
  transition: 0.35s;
}

.btn:hover::after {
  left: 0;
}

/* --------------------------------------------------
   SOCIAL LINKS
---------------------------------------------------*/
.social-links {
  display: flex;
  gap: 15px;
}

.social {
  padding: 10px 15px;
  background: #333;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  transition: 0.3s;
  overflow: hidden;
}

.social:hover {
  background: #4a90e2;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

.social::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.25);
  transition: 0.35s;
}

.social:hover::after {
  left: 0;
}

#footer-text {
  text-align: center;
  padding: 15px;
  font-size: 0.9rem;
  color: var(--text);
}

.category-container {
  width: 90%;
  max-width: 600px;
  margin: 40px auto;
  font-family: Poppins, sans-serif;
}

.category {
  background: #111827;
  color: #fff;
  padding: 15px 20px;
  margin-bottom: 10px;
  border-radius: 10px;
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
}

.category:hover {
  background: #1f2937;
  transform: scale(1.02);
}

.semester-box {
  display: none;
  background: #f3f4f6;
  padding: 15px;
  margin-top: -5px;
  margin-bottom: 15px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.semester-box a {
  display: block;
  text-decoration: none;
  padding: 10px;
  background: #fff;
  margin: 8px 0;
  border-radius: 8px;
  font-weight: 500;
  color: #111;
  transition: 0.2s;
}

.semester-box a:hover {
  background: #2563eb;
  color: #fff;
}

/* Presentation box */
#slides1 {
  margin-top: 20px;
  background: var(--card);
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Presentation links (cards) */
#slides1 a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  padding: 10px 14px;
  background: linear-gradient(180deg, rgba(14, 165, 164, 0.06), transparent);
  border-radius: 10px;
  color: var(--text);
  border: 1px solid rgba(15, 23, 42, 0.04);
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}

#slides1 a:hover,
#slides1 a:focus {
  background: var(--accent);
  color: #741717;
  transform: translateY(-3px);
  box-shadow: 0 8px 26px rgba(14, 165, 164, 0.12);
}

/* Horizontal scroll behavior on wide screens */
@media (min-width: 900px) {
  #slides1 {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 16px;
  }

  #slides1 a {
    flex: 0 0 auto;
    min-width: 220px;
    scroll-snap-align: start;
  }

  #slides1::-webkit-scrollbar {
    height: 8px;
  }

  #slides1::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.12);
    border-radius: 999px;
  }
}

/* Revision link styles */
.revision-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: var(--text);
  text-decoration: none;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
  margin-right: 8px;
}

.revision-link:hover,
.revision-link:focus {
  background: #2563eb;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.12);
}

.revision-note {
  color: #6b7280;
  margin-left: 6px;
  font-size: 0.95rem;
}

/* Accessibility & contrast improvements */
.category {
  background: #0b1220;
  color: #fff;
}

.category:hover {
  background: #0f1724;
}

.category:focus {
  outline: 3px solid rgba(14, 165, 164, 0.15);
  outline-offset: 2px;
}

.semester-box {
  background: #f7fafc;
}

.semester-box a {
  background: #fff;
  color: #111827;
}

.semester-box a:focus {
  outline: 3px solid rgba(37, 99, 235, 0.18);
  outline-offset: 2px;
}

/* Responsive tweaks for smaller screens */
@media (max-width: 900px) {
  .category-container {
    width: 95%;
    max-width: 720px;
    margin: 20px auto;
  }

  .category {
    font-size: 18px;
    padding: 12px 16px;
  }

  .semester-box {
    padding: 12px;
    margin-bottom: 18px;
  }

  .semester-box a {
    padding: 10px;
    margin: 6px 0;
  }

  #slides1 {
    flex-direction: column;
    gap: 10px;
    overflow: visible;
  }

  #slides1 a {
    width: 100%;
    min-width: unset;
  }

  header {
    padding: 12px;
  }

  .profile-img {
    width: 64px;
    height: auto;
    border-width: 2px;
  }

  .title {
    font-size: 1rem;
  }

  .theme-btn {
    padding: 8px 12px;
    font-size: 0.9rem;
  }

  .dropdown-menu {
    left: 8px;
    right: 8px;
    top: 72px;
    width: auto;
  }
}

/* Improve spacing & touch targets for very small screens */
@media (max-width: 480px) {
  .category {
    font-size: 16px;
    padding: 10px 12px;
  }

  .revision-link {
    padding: 8px 10px;
    font-size: 0.95rem;
  }
}

/* Focus-visible for keyboard users */
:focus-visible {
  outline: 3px solid rgba(14, 165, 164, 0.18);
  outline-offset: 2px;
}

/* ANimated Image Slider CSS */
@import url('https://fonts.cdnfonts.com/css/ica-rubrik-black');
@import url('https://fonts.cdnfonts.com/css/poppins');

.banner {
  width: 100%;
  height: 100vh;
  text-align: center;
  overflow: hidden;
  position: relative;
  background-color: #d5dfe7;
}

.banner .slider {
  position: absolute;
  width: 200px;
  height: 250px;
  top: 10%;
  left: calc(50% - 100px);
  transform-style: preserve-3d;
  transform: perspective(1000px);
  animation: autoRun 20s linear infinite;
  z-index: 2;
}

@import url('https://fonts.cdnfonts.com/css/ica-rubrik-black');
@import url('https://fonts.cdnfonts.com/css/poppins');

.banner {
  width: 100%;
  height: 100vh;
  text-align: center;
  overflow: hidden;
  position: relative;
  background-color: #f5f9fc;
  border-radius: 30px;
}

.banner .slider {
  position: absolute;
  width: 200px;
  height: 250px;
  top: 10%;
  left: calc(50% - 100px);
  transform-style: preserve-3d;
  transform: perspective(1000px);
  animation: autoRun 20s linear infinite;
  z-index: 2;
}

@keyframes autoRun {
  from {
    transform: perspective(1000px) rotateX(-16deg) rotateY(0deg);
  }

  to {
    transform: perspective(1000px) rotateX(-16deg) rotateY(360deg);
  }
}

.banner .slider .item {
  position: absolute;
  inset: 0 0 0 0;
  transform:
    rotateY(calc((var(--position) - 1) * (360 / var(--quantity)) * 1deg)) translateZ(550px);
}

.banner .slider .item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
  border-style: ridge
}

.banner .content {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(1400px, 100vw);
  height: max-content;
  padding-bottom: 100px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  z-index: 1;
}

.banner .content h1 {
  font-family: 'ICA Rubrik';
  font-size: 16em;
  line-height: 1em;
  color: #262e61;
  position: relative;
}

.banner .content h1::after {
  position: absolute;
  inset: 0 0 0 0;
  content: attr(data-content);
  z-index: 2;
  -webkit-text-stroke: 2px #d2d2d2;
  color: transparent;
}

.banner .content .author {
  font-family: Poppins;
  text-align: right;
  max-width: 200px;
}

.banner .content h2 {
  font-size: 3em;
}

.banner .content .model {
  background-image: url(images/model.png);
  width: 100%;
  height: 75vh;
  position: absolute;
  bottom: 0;
  left: 0;
  background-size: auto 130%;
  background-repeat: no-repeat;
  background-position: top center;
  z-index: 1;
}

@media screen and (max-width: 1023px) {
  .banner .slider {
    width: 160px;
    height: 200px;
    left: calc(50% - 80px);
  }

  .banner .slider .item {
    transform:
      rotateY(calc((var(--position) - 1) * (360 / var(--quantity)) * 1deg)) translateZ(300px);
  }

  .banner .content h1 {
    text-align: center;
    width: 100%;
    text-shadow: 0 10px 20px #000;
    font-size: 7em;
  }

  .banner .content .author {
    color: #fff;
    padding: 20px;
    text-shadow: 0 10px 20px #000;
    z-index: 2;
    max-width: unset;
    width: 100%;
    text-align: center;
    padding: 0 30px;
  }
}

@media screen and (max-width: 767px) {
  .banner .slider {
    width: 100px;
    height: 150px;
    left: calc(50% - 50px);
  }

  .banner .slider .item {
    transform:
      rotateY(calc((var(--position) - 1) * (360 / var(--quantity)) * 1deg)) translateZ(180px);
  }

  .banner .content h1 {
    font-size: 5em;
    margin-bottom: 100px;
  }
}

/* cursor pointer */
.circle {
  height: 24px;
  width: 24px;
  border-radius: 24px;
  background-color: black;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 99999999;
  /* so that it stays on top of all other elements */
}

/* ===== ABOUT PAGE ===== */
.about-section {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 20px;
}

/* Intro Card */
.about-card {
  background: var(--card-bg, #ffffff);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  margin-bottom: 30px;
}

.about-card h2 {
  font-size: 28px;
  margin-bottom: 15px;
}

.about-card p {
  line-height: 1.7;
  color: #555;
}

/* Download CV Button */
.btn-cv {
  display: inline-block;
  margin-top: 15px;
  padding: 12px 22px;
  background-color: #0d6efd;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border-radius: 6px;
  transition: background 0.3s;
}

.btn-cv:hover {
  background-color: #084298;
}

/* Grid */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
}

/* Boxes */
.about-box {
  background: var(--card-bg, #ffffff);
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.about-box h3 {
  margin-bottom: 15px;
  border-bottom: 2px solid #0d6efd;
  display: inline-block;
  padding-bottom: 4px;
}

/* Lists */
.skill-list,
.academic-list {
  list-style: none;
  padding: 0;
}

.skill-list li,
.academic-list li {
  margin-bottom: 10px;
  color: #444;
}

/* Animations */
.fade-in {
  animation: fadeIn 1s ease-in;
}

.slide-up {
  animation: slideUp 0.9s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

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

/* ===== PHOTO GALLERY ===== */
.photo-section {
  max-width: 1100px;
  margin: 50px auto;
  padding: 0 20px;
  text-align: center;
}

.photo-section h2 {
  font-size: 28px;
  color: #0d6efd;
  margin-bottom: 10px;
}

.photo-section p {
  font-size: 16px;
  color: #555;
  margin-bottom: 25px;
}

/* Grid */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

/* Each photo */
.photo-item {
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

/* Hover effect */
.photo-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.photo-item:hover img {
  transform: scale(1.05);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .photo-section h2 {
    font-size: 24px;
  }

  .photo-section p {
    font-size: 16px;
  }
}