/* ===== CSS VARIABLES ===== */
:root {
  /* Layout */
  --maxwidth: 65%;
  
  /* Colors */
  --yellow: #ffdd57;
  --white: #f4f4f4;
  --black: #000000;
  --dark-gray: #111111;
  --medium-gray: #222222;
  --light-gray: #333;
  --text-gray: #555;
  --border-gray: #e0e0e0;
  --bg-light: #f8f8f8;
  --bg-lighter: #f9f9f9;
  --bg-lightest: #eeeeee;
  --primary-blue: #007BFF;
  --primary-blue-hover: #0056b3;
  --success-green: #248f3d;
  --text-primary: #2c3e50;
  --text-secondary: #4a5568;
  --text-muted: #5a6c7d;
  
  /* Spacing */
  --border-radius: 8px;
  --border-radius-lg: 16px;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
  
  /* Gradients */
  --gradient-dark: linear-gradient(to bottom, var(--medium-gray), var(--dark-gray));
  --gradient-light: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  --gradient-accent: linear-gradient(90deg, #6c757d, #495057);
}

/* ===== RESPONSIVE BREAKPOINTS ===== */
@media (max-width: 2400px) and (min-width: 1920px) {
  :root { --maxwidth: 75%; }
}

@media (max-width: 1919px) and (min-width: 1280px) {
  :root { --maxwidth: 85%; }
}

@media (max-width: 1279px) and (min-width: 1080px) {
  :root { --maxwidth: 90%; }
}

@media (max-width: 1079px) {
  :root { --maxwidth: 95%; }
}

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

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--black);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===== SHARED COMPONENTS ===== */
.container {
  width: var(--maxwidth);
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  background: var(--gradient-light);
  border: 1px solid var(--border-gray);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-accent);
}

section ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin: 0;
}

section ul li {
  margin-bottom: 0.5rem;
}

.toggle {
  margin-bottom: 1.5rem;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.toggle-header {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 1.25rem 1.5rem;
  font-size: 1.4rem;
  color: var(--text-primary);
  background: var(--gradient-light);
  border-bottom: 1px solid #e9ecef;
  margin-bottom: 0;
  transition: all 0.3s ease;
  user-select: none;
}

.toggle-header:hover {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.toggle-header h2 {
  font-weight: 600;
  font-size: 1.4rem;
  margin: 0;
}

.toggle-header .arrow {
  margin-right: 1rem;
  font-size: 1rem;
  transition: transform 0.3s ease;
  color: var(--text-primary);
  font-weight: bold;
}

.toggle-header.active .arrow {
  transform: rotate(90deg);
}

.toggle-content {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.4s ease, padding 0.4s ease;
  background: #ffffff;
}

.toggle-content.active {
  opacity: 1;
  padding: 1.5rem;
}

@media (max-width: 768px) {
  .toggle-header {
    padding: 1rem;
    font-size: 1.2rem;
  }
  
  .toggle-header h2 {
    font-size: 1.2rem;
  }
}

/* ===== NAVIGATION ===== */
.navbar {
  background: var(--gradient-dark);
  color: var(--white);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar .logo {
  text-decoration: none;
  display: flex;
  align-items: center;
}

.logo-text {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.5px;
  position: relative;
}

.logo-text::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--yellow);
  transition: width 0.3s ease;
}

.logo:hover .logo-text::after {
  width: 100%;
}

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

.navbar .nav-links a {
  color: var(--white);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  padding: 0.25rem 0;
}

.navbar .nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--yellow);
  transition: width 0.3s ease;
}

.navbar .nav-links a:hover,
.navbar .nav-links a:hover::after {
  color: var(--yellow);
  width: 100%;
}

.nav-links .active {
  font-weight: 700;
  color: var(--yellow) !important;
  position: relative;
  text-shadow: 0 0 8px rgba(255, 221, 87, 0.3);
}

.navbar .nav-links .active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--yellow);
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 10;
}

.mobile-menu-btn .bar {
  width: 100%;
  height: 3px;
  background-color: var(--white);
  border-radius: 2px;
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .navbar .container,
  .navbar .nav-links {
    padding: 0 1rem;
    gap: 1rem;
  }
  
  .logo-text {
    font-size: 1.4rem;
  }
}

@media (max-width: 700px) {
  .mobile-menu-btn {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 300px;
    height: 100vh;
    background: var(--dark-gray);
    padding: 4rem 2rem 2rem 2rem;
    transition: 0.3s ease;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
  }

  .nav-menu.active {
    right: 0;
  }

  .navbar .nav-links {
    flex-direction: column;
    gap: 1.5rem;
  }

  .navbar .container {
    padding: 0 1.5rem;
  }

  .mobile-menu-btn.active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }

  .mobile-menu-btn.active .bar:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-btn.active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }

  .navbar .nav-links a {
    display: block;
    width: 100%;
    padding: 0.5rem 0;
  }

  .navbar .nav-links .active {
    margin: 0;
    padding: 0.5rem 0.75rem;
  }
}

/* ===== FOOTER ===== */
.footer {
  background: var(--gradient-dark);
  color: var(--white);
  padding: 1rem 0;
  margin-top: auto;
}

.footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1rem;
}

.footer-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.footer-icon {
  width: 24px;
  height: 24px;
  display: inline-block;
  background-size: cover;
  transition: opacity 0.2s ease;
}

.footer-icon:hover {
  opacity: 0.8;
}

.github-icon {
  background-image: url('https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/github/github-original.svg');
  filter: invert(1);
}

.linkedin-icon {
  background-image: url('https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/linkedin/linkedin-original.svg');
}

.email-icon {
  width: 24px;
  height: 24px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23f4f4f4"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>');
  display: none;
}

.footer-name,
.footer-text {
  font-size: 1rem;
  color: var(--white);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-text {
  font-size: 0.9rem;
}

.email-link {
  text-decoration: none;
  color: var(--primary-blue);
}

@media (max-width: 768px) {
  .footer-links .email-link,
  .footer-links .location,
  .footer .footer-name {
    display: none;
  }

  .footer-links .email-icon {
    display: inline-block;
  }
}

/* ===== HOME PAGE ===== */
.hero {
  text-align: center;
  padding: 2rem 1rem;
  background: var(--bg-lightest);
}

.hero h1 {
  margin: 0;
  font-size: 2.5rem;
}

.hero .profile-picture {
  margin: 1rem 0;
}

.hero .profile-picture img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 3px solid var(--light-gray);
}

.hero p {
  color: var(--text-gray);
  font-size: 1.2rem;
  margin: 1rem 0;
}

.hero .resume-link {
  display: inline-block;
  padding: 0.5rem 1rem;
  transition: background-color 0.3s, color 0.3s;
  background: var(--primary-blue);
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  font-size: 1rem;
}

.hero .resume-link:hover {
  background: var(--primary-blue-hover);
}

.introduction {
  padding: 2rem 1rem;
  text-align: center;
}

.introduction h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.introduction p {
  color: var(--light-gray);
  max-width: var(--maxwidth);
  margin: 0 auto;
}

.featured {
  background: var(--bg-light) !important;
  padding: 2rem 1rem;
  text-align: center;
}

.featured .container {
  width: var(--maxwidth);
  margin: 0 auto;
  text-align: center;
}

.featured h2 {
  text-align: center;
  margin-bottom: 1rem;
}

.featured-item {
  margin-bottom: 1.5rem;
}

.featured-item h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.3rem;
}

.skills {
  padding: 2rem 1rem;
  background: #ffffff;
  text-align: center;
}

.skills h2,
.featured h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.skills p {
  color: var(--light-gray);
  margin-bottom: 1.5rem;
}

.skills .skills-list {
  position: relative;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.skills .skill-item {
  text-align: center;
  max-width: 120px;
}

.skills .skill-item img {
  width: 80px;
  height: 80px;
  margin-bottom: 0.5rem;
}

.skills .skill-item p {
  font-size: 0.9rem;
  color: var(--text-gray);
}

.contact {
  padding: 2rem 1rem;
  background: var(--bg-light);
  text-align: center;
}

.contact h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.contact p {
  color: var(--light-gray);
  margin-bottom: 1.5rem;
}

.contact-list {
  list-style: none;
  padding: 0;
}

.contact-list li {
  margin-bottom: 0.5rem;
}

.contact a,
.featured a,
.skills a {
  color: var(--primary-blue);
  text-decoration: none;
}

.contact a:hover,
.featured a:hover,
.skills a:hover {
  text-decoration: underline;
}

/* ===== PAPERS PAGE ===== */
.papers-page {
  width: var(--maxwidth);
  margin: 2rem auto;
  padding: 1rem;
  color: var(--black);
}

.papers-list li {
  background-color: var(--bg-lighter);
  border: 1px solid var(--border-gray);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
}

.papers-list > section .paper-title {
  color: var(--black);
  text-decoration: none;
  font-size: 1.5rem;
  display: block;
}

.papers-list > section .paper-title img {
  max-width: 1.5rem;
}

.papers-list > section .paper-title:hover {
  text-decoration: underline;
}

.papers-list > section .paper-description {
  color: var(--light-gray);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.disclaimer {
  background-color: var(--bg-lighter);
  border: 1px solid var(--border-gray);
  border-radius: 4px;
  margin: 20px auto;
  padding: 10px 15px;
  max-width: 800px;
  font-size: 0.9em;
  color: var(--text-gray);
  text-align: center;
}

/* ===== EDUCATION PAGE ===== */
.education-page {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin: 2rem auto;
  padding: 1rem;
  width: var(--maxwidth);
}

.university-section {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.university-content {
  flex: 1;
}

.university-logo {
  display: none;
}

.university-logo img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.university {
  margin-bottom: 2rem;
}

.university:last-child {
  margin-bottom: 0;
}

.university h2 {
  font-size: 1.65rem;
  font-weight: 600;
}

.university h3 {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-style: italic;
  font-weight: 400;
}

.gpa {
  font-size: 0.8rem;
  color: var(--success-green);
  font-weight: 600;
  margin-bottom: 1.25rem;
  padding: 0.25rem 0.75rem;
  background: rgba(40, 167, 69, 0.1);
  border-radius: 20px;
  display: inline-block;
}

.university ul {
  padding-left: 1.5rem;
  list-style: disc;
  margin-left: 0.5rem;
}

.university ul li {
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
  position: relative;
}

/* Course Sections */
.education-page > section h1 {
  font-size: 2rem;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-align: center;
}

.course-semester {
  margin-bottom: 1rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-radius: 12px;
  border-left: 4px solid #6c757d;
}

.course-semester h3 {
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.course-semester ul {
  list-style: none;
  padding-left: 0;
}

.course-semester ul li {
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
  padding: 0.75rem 1rem;
  background: #ffffff;
  border-radius: var(--border-radius);
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.course-semester ul li:hover {
  border-left-color: var(--yellow);
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.course-semester ul li strong {
  color: var(--text-primary);
  font-weight: 600;
}

@media screen and (min-width: 1695px) {
  .university-section {
    align-items: center;
  }
  
  .university-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 0 0 50%;
  }
  
  .university-logo img {
    display: block;
    max-width: 80%;
    max-height: 80%;
    padding: 2rem;
    object-fit: contain;
  }
}

@media (max-width: 768px) {
  .education-page {
    gap: 2rem;
    margin: 2rem auto;
  }
  
  .university-section,
  .courses-section {
    padding: 1.5rem;
    margin: 0 0.5rem;
  }
  
  .university h2 {
    font-size: 1.4rem;
  }
  
  .courses-section > h1 {
    font-size: 1.6rem;
  }
  
  .course-semester {
    padding: 1rem;
  }
}

/* ===== EXPERIENCE PAGE ===== */
.experience-page {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin: 2rem auto;
  padding: 1rem;
  width: var(--maxwidth);
}

.experience {
  margin-bottom: 2rem;
}

.experience h2 {
  font-size: 1.5rem;
  color: var(--black);
}

.experience h3 {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-style: italic;
  font-weight: 400;
}

.related-experience {
  font-size: 2rem;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.subheader {
  font-size: 0.9rem;
  color: #777;
  font-style: italic;
  margin-bottom: 1rem;
}

.experience ul {
  padding-left: 1.5rem;
  list-style: disc;
}

.experience ul li {
  margin-bottom: 0.5rem;
  color: var(--light-gray);
}

/* ===== ABOUT PAGE ===== */
.about-page {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin: 2rem auto;
  padding: 1rem;
  width: var(--maxwidth);
}

.about-page > section h1 {
  font-size: 1.7rem;
  color: var(--dark-gray);
  margin-bottom: 1rem;
}

.about-page >section p,
.about-page > section ul {
  font-size: 1rem;
  color: var(--light-gray);
}

/* ===== SKILLS PAGE ===== */
.skills-page {
  width: var(--maxwidth);
  margin: 2rem auto;
  padding: 1rem;
  text-align: center;
}

.skills-grid,
.projects-list,
.papers-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.skills-grid > section h2 {
  font-size: 1.8rem;
  color: var(--light-gray);
  margin-bottom: 1rem;
}

.skills-grid > section .skills-list {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.skills-grid > section .skill-item {
  text-align: center;
  max-width: 120px;
}

.skills-grid > section .skill-item img {
  width: 80px;
  height: 80px;
}

.skills-grid > section .skill-item p {
  font-size: 0.9rem;
  color: var(--text-gray);
}

/* ===== PROJECTS PAGE ===== */
.projects-page {
  width: var(--maxwidth);
  margin: 2rem auto;
  padding: 1rem;
  text-align: left;
}

.project-title {
  font-size: 1.5rem;
  color: var(--light-gray);
  margin: 0;
  flex: 1;
}

.project-meta {
  font-size: 1rem;
  color: var(--text-gray);
  margin-bottom: 1rem;
}

.project-meta a {
  color: var(--primary-blue);
  text-decoration: none;
}

.project-meta a:hover {
  text-decoration: underline;
}

.project-description {
  font-size: 1rem;
  color: var(--light-gray);
  line-height: 1.5;
}

.projects-list > section, .skills-grid > section, .papers-list > section {
  box-shadow: var(--shadow-md);
}

.projects-list > section .skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.projects-list > section .skill-item {
  text-align: center;
  max-width: 120px;
}

.projects-list > section .skill-item img {
  width: 32px;
  height: 32px;
}

.projects-list > section .skill-item p {
  font-size: 0.9rem;
  color: var(--text-gray);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.25rem;
  align-items: baseline;
}

.project-date {
  font-size: 0.9rem;
  margin-left: 1.5rem;
  color: #666;
  font-weight: 500;
  white-space: nowrap;
}

/* Filter Controls */
.filter-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
}

.filter-left {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
}

.filter-right {
  display: flex;
  align-items: center;
}

.current-projects-btn {
  background-color: var(--light-gray);
  color: var(--white);
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: capitalize;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  transform: scale(1);
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
}

.current-projects-btn:hover {
  background-color: var(--yellow);
  color: black;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.current-projects-btn.active {
  background-color: var(--yellow);
  color: black;
  box-shadow: 0 2px 8px rgba(255, 221, 87, 0.3);
}

.current-projects-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.current-projects-btn:hover::before {
  left: 100%;
}

section {
  transition: all 0.4s ease;
  opacity: 1;
  transform: translateY(0);
}

section.fade-out {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

.no-projects-message {
  display: none;
  text-align: center;
  padding: 3rem 2rem;
  background: var(--gradient-light);
  border: 1px solid var(--border-gray);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
}

.no-projects-message.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
  transition: all 0.4s ease;
}

.no-projects-message h3 {
  color: var(--text-primary);
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.no-projects-message p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 500px;
  margin: 0 auto;
}

.category-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.category-buttons button {
  background-color: var(--light-gray);
  color: var(--white);
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
  text-transform: capitalize;
}

.category-buttons button:hover {
  background-color: var(--yellow);
  color: black;
}

.dropdown {
  position: absolute;
  z-index: 10;
  margin-top: 0.5rem;
  width: 200px;
  background: white;
  border: 1px solid var(--border-gray);
  border-radius: 6px;
  box-shadow: var(--shadow-md);
  padding: 0.5rem;
}

.dropdown button {
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.75rem;
  background: none;
  color: var(--light-gray);
  border: none;
  border-radius: 4px;
  margin: 0.25rem 0;
}

.dropdown button:hover {
  background-color: #f0f0f0;
}

.dropdown button.selected {
  background-color: #e6f3ff;
}

.selected-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.selected-tags span {
  background-color: #e6f3ff;
  color: var(--primary-blue);
  padding: 0.375rem 0.75rem;
  border-radius: 999px;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.selected-tags button {
  background: none;
  border: none;
  color: var(--primary-blue);
  cursor: pointer;
  font-size: 1.25rem;
  padding: 0;
  line-height: 1;
}

.selected-tags button:hover {
  color: var(--primary-blue-hover);
}

.skill-item:hover {
  transform: translateY(-2px);
}

.skill-item img:hover {
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.skill-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--dark-gray);
  color: var(--white);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  z-index: 1000;
  opacity: 0;
  transform: translateX(-50%) translateY(4px) scale(0.95);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--dark-gray);
}

.skill-item:hover .skill-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

@media (max-width: 768px) {
  .filter-container {
    flex-direction: column;
    align-items: stretch;
    border-radius: 12px;
  }
  
  .filter-right {
    justify-content: center;
    margin-top: 0;
  }

  .filter-left {
    gap: 1.25rem;
  }
  
  .no-projects-message {
    padding: 2rem 1.5rem;
  }
  
  .no-projects-message h3 {
    font-size: 1.3rem;
  }
  
  .no-projects-message p {
    font-size: 0.9rem;
  }

  .current-projects-btn {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
    min-height: 48px;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.025em;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: visible;
  }
  
  .current-projects-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  }
  
  .current-projects-btn:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
    box-shadow: 
      0 2px 8px rgba(255, 221, 87, 0.3),
      0 0 0 2px rgba(255, 221, 87, 0.1);
  }

  .category-buttons {
    gap: 1rem;
    justify-content: center;
  }

  .selected-tags {
    justify-content: center;
    margin-bottom: 0.5rem;
  }

  .skill-tooltip {
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;
    bottom: calc(100% + 6px);
  }
}

/* Screenshots and Toggles */
.toggle-btn,
.toggle-btn-poster {
  display: block;
  margin: 1rem auto;
  padding: 0.6rem 1.2rem;
  background-color: var(--light-gray);
  color: var(--white);
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
  box-shadow: var(--shadow-md);
}

.toggle-btn:hover,
.toggle-btn-poster:hover {
  background-color: var(--yellow);
  color: black;
}

.poster {
  max-width: 100% !important;
  height: auto !important;
}

.screenshots {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.screenshots.open {
  max-height: 2000px;
}

.screenshot-grid.desktop-shots {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.screenshot-grid.desktop-shots > a:last-child:nth-child(odd),
.screenshot-grid.desktop-shots > img:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  justify-self: center;
  max-width: 60%;
}

.screenshot-grid.desktop-shots a {
  display: block;
}

.screenshot-grid.mobile-shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.screenshot-grid img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: var(--shadow-sm);
  object-fit: cover;
  cursor: pointer;
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 95vh;
  width: auto;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  font-size: 2rem;
  color: var(--white);
  cursor: pointer;
}

.lightbox-close:hover {
  color: var(--yellow);
}

/* Mobile Responsiveness for Projects */
@media (max-width: 1280px) {
  .screenshot-grid.desktop-shots {
    grid-template-columns: 1fr;
  }
  
  .screenshot-grid.desktop-shots > a,
  .screenshot-grid.desktop-shots > img {
    width: 100%;
    max-width: 100%;
  }
  
  .screenshot-grid.desktop-shots > a:last-child:nth-child(odd),
  .screenshot-grid.desktop-shots > img:last-child:nth-child(odd) {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 1080px) {
  .projects-list {
    padding: 1rem 0.5rem;
  }

  .project-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .project-title {
    font-size: 1.3rem;
  }

  .project-date {
    font-size: 0.85rem;
    margin-top: 0;
    margin-left: 0;
  }

  .skills-list {
    gap: 0.75rem;
    justify-content: flex-start;
  }

  .projects-list > section {
    padding: 1rem;
  }

  .project-meta,
  .project-description {
    font-size: 0.95rem;
  }

  .projects-list > section .skill-item {
    max-width: 64px;
  }

  .projects-list > section .skill-item img {
    width: 28px;
    height: 28px;
  }

  .projects-list > section .skill-item p {
    font-size: 0.75rem;
  }
}

/* ===== EXTERNAL WIDGETS ===== */
.gr_grid_container, .vg_grid_container {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}

.gr_grid_book_container, .vg_grid_game_container {
  float: none;
  padding: 0;
  overflow: hidden;
  margin: 0;
  border-radius: var(--border-radius);
  transition: all 0.3s ease;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.gr_grid_book_container:hover, .vg_grid_game_container:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: var(--shadow-lg);
  z-index: 2;
}

.gr_grid_book_container img, .vg_grid_game_container img {
  width: 98px !important;
  height: 160px !important;
  border-radius: var(--border-radius);
  transition: all 0.3s ease;
  object-fit: cover;
  display: block;
}

.gr_grid_book_container:hover img, .vg_grid_game_container:hover img {
  filter: brightness(1.1) saturate(1.1);
}

.gr_grid_book_container::after, .vg_grid_game_container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(255, 221, 87, 0.1), rgba(255, 221, 87, 0.05));
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: var(--border-radius);
  pointer-events: none;
}

.gr_grid_book_container:hover::after, .vg_grid_game_container:hover::after {
  opacity: 1;
}

.goodreads, .vgames {
  display: block;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.goodreads h3, .vgames h3 {
  color: var(--text-primary);
  font-size: 1.3rem;
}

.goodreads .gr_grid_container p {
  margin-top: 1rem;
  line-height: 1.6;
  color: var(--text-secondary);
  text-align: left;
}

.vgames .vg_grid_container p {
  margin-top: 1rem;
  line-height: 1.6;
  color: var(--text-secondary);
  text-align: left;
}

.goodreads .gr_grid_container:has(p), .vgames .vg_grid_container:has(p) {
  display: block;
}

.goodreads .gr_grid_container:has(p) .gr_grid_book_container,
.vgames .vg_grid_container:has(p) .vg_grid_game_container {
  float: left;
  margin-right: 1.5rem;
  margin-bottom: 1rem;
}

.goodreads-link {
  color: var(--primary-blue);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.goodreads-link:hover {
  color: var(--primary-blue-hover);
  text-decoration: underline;
}

@media (max-width: 768px) {
  .gr_grid_container, .vg_grid_container {
    justify-content: center;
    gap: 6px;
  }
  
  .gr_grid_book_container, .vg_grid_game_container {
    transition: all 0.2s ease;
  }
  
  .gr_grid_book_container:hover, .vg_grid_game_container:hover {
    transform: translateY(-2px) scale(1.02);
  }
  
  .gr_grid_book_container img, .vg_grid_game_container img {
    width: 85px !important;
    height: 140px !important;
  }
  
  .goodreads .gr_grid_container:has(p) .gr_grid_book_container,
  .vgames .vg_grid_container:has(p) .vg_grid_game_container {
    margin-right: 1rem;
    margin-bottom: 0.5rem;
  }
  
  .goodreads .gr_grid_container:has(p) .gr_grid_book_container img,
  .vgames .vg_grid_container:has(p) .vg_grid_game_container img {
    width: 75px !important;
    height: 120px !important;
  }
}

@media (max-width: 480px) {
  .gr_grid_book_container img, .vg_grid_game_container img {
    width: 75px !important;
    height: 120px !important;
  }
  
  .goodreads .gr_grid_container:has(p) .gr_grid_book_container img,
  .vgames .vg_grid_container:has(p) .vg_grid_game_container img {
    width: 65px !important;
    height: 105px !important;
  }
}
