/*
 * Modern Portfolio Website
 * Author: Wilson Chang
 * Version: 2.0
 */

/* ===== Base Styles ===== */
:root {
  /* Color Scheme */
  --primary-color: #2a6db0;
  --primary-light: #3a80c7;
  --primary-dark: #1c5998;
  --secondary-color: #22c55e;
  --dark-color: #1f2937;
  --light-color: #f3f4f6;
  --gray-color: #9ca3af;
  --text-color: #374151;
  --bg-color: #ffffff;
  
  /* Typography */
  --heading-font: 'Poppins', sans-serif;
  --body-font: 'Poppins', sans-serif;
  
  /* Spacing */
  --section-spacing: 6rem;
  --element-spacing: 2rem;
}

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

html {
  scroll-behavior: smooth;
  font-size: 62.5%; /* 1rem = 10px */
}

body {
  font-family: var(--body-font);
  font-size: 1.6rem;
  line-height: 1.7;
  color: var(--text-color);
  background-color: var(--bg-color);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--heading-font);
  line-height: 1.3;
  color: var(--dark-color);
  font-weight: 600;
}

h1 {
  font-size: 4.8rem;
  margin-bottom: 2rem;
}

h2 {
  font-size: 3.6rem;
  margin-bottom: 1.5rem;
}

h3 {
  font-size: 2.4rem;
  margin-bottom: 1rem;
}

h4 {
  font-size: 2rem;
  margin-bottom: 0.8rem;
}

p {
  margin-bottom: 1.5rem;
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: all 0.3s ease;
}

a:hover {
  color: var(--primary-light);
}

ul {
  list-style: none;
}

ul li {
  margin-bottom: 0.8rem;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: 120rem;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-title {
  text-align: center;
  margin-bottom: 4rem;
  position: relative;
  padding-bottom: 1.5rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 8rem;
  height: 0.3rem;
  background-color: var(--primary-color);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem 2.4rem;
  border-radius: 0.8rem;
  font-weight: 500;
  font-size: 1.6rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  gap: 0.8rem;
}

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

.primary-btn:hover {
  background-color: var(--primary-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.secondary-btn {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.secondary-btn:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* ===== Header & Navigation ===== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  z-index: 1000;
  backdrop-filter: blur(10px);
}

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

.logo a {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--dark-color);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 3rem;
}

.nav-links a {
  color: var(--text-color);
  font-weight: 500;
  font-size: 1.6rem;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-color);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  width: 0%;
  height: 0.2rem;
  background-color: var(--primary-color);
  transition: all 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.hamburger span {
  width: 3rem;
  height: 0.3rem;
  background-color: var(--dark-color);
  margin: 0.3rem 0;
  border-radius: 5px;
  transition: all 0.3s ease;
}

/* ===== Hero Section ===== */
.hero {
  padding: 16rem 0 8rem;
  background-color: var(--light-color);
}

.hero-content {
  display: flex;
  align-items: center;
  gap: 6rem;
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
}

.hero-image img {
  width: 28rem;
  height: 28rem;
  object-fit: cover;
  border-radius: 50%;
  border: 0.5rem solid white;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.hero-text {
  flex: 1;
}

.hero-text h1 {
  margin-bottom: 1.5rem;
}

.hero-text h1 span {
  color: var(--primary-color);
}

.hero-text p {
  font-size: 2rem;
  margin-bottom: 3rem;
  color: var(--text-color);
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
}

/* ===== About Section ===== */
.about {
  padding: var(--section-spacing) 0;
}

.about-content {
  max-width: 80rem;
  margin: 0 auto;
  text-align: center;
  font-size: 1.8rem;
}

/* ===== Experience Section ===== */
.experience {
  padding: var(--section-spacing) 0;
  background-color: var(--light-color);
}

.timeline {
  position: relative;
  max-width: 80rem;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 5rem;
  height: 100%;
  width: 0.2rem;
  background-color: var (--primary-color);
}

.timeline-item {
  padding: 3rem 0 3rem 10rem;
  position: relative;
}

.timeline-date {
  position: absolute;
  left: 0;
  top: 3rem;
  width: 10rem;
  text-align: right;
}

.timeline-date span {
  background-color: var(--primary-color);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 1.4rem;
  white-space: nowrap;
}

.timeline-content {
  background-color: white;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.timeline-content h3 {
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.timeline-content h4 {
  color: var(--gray-color);
  margin-bottom: 1.5rem;
  font-weight: 400;
}

.experience-bullets {
  padding-left: 2rem;
  list-style-type: disc;
}

.experience-bullets li {
  margin-bottom: 0.8rem;
}

/* Experience Section Styling */
.experience {
    padding: var(--section-spacing) 0;
}

.experience-card {
    background-color: white;
    border-radius: 0.8rem;
    padding: 2rem 2.5rem; /* Reduced padding */
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem; /* Add space between cards */
}

.experience-card:last-child {
    margin-bottom: 0; /* Remove margin from last card */
}

.experience-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
}

/* Add a subtle accent border on the left of each card */
.experience-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px; /* Thinner border */
    background-color: var(--primary-color);
    opacity: 0.7;
}

.experience-header {
    display: flex;
    align-items: center;
    gap: 1.5rem; /* Reduced gap */
    margin-bottom: 1.5rem; /* Reduced bottom margin */
}

.experience-logo {
    width: 4.5rem; /* Smaller logo */
    height: 4.5rem; /* Smaller logo */
    background-color: var(--light-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    flex-shrink: 0;
}

.experience-logo i {
    font-size: 2rem; /* Smaller icon */
    color: var(--primary-color);
}

.experience-details {
    flex: 1;
}

.experience-details h3 {
    font-size: 1.8rem; /* Smaller title */
    color: var(--dark-color);
    margin-bottom: 0.5rem; /* Reduced margin */
    line-height: 1.3;
}

.experience-details h4 {
    font-size: 1.5rem; /* Smaller subtitle */
    color: var(--text-color);
    font-weight: 500;
    margin-bottom: 0.5rem; /* Reduced margin */
    line-height: 1.4;
}

.experience-period {
    font-size: 1.3rem; /* Smaller text */
    color: var(--primary-color);
    font-weight: 500;
    display: inline-block;
    padding: 0.2rem 0.8rem; /* Smaller padding */
    background-color: rgba(var(--primary-rgb), 0.1);
    border-radius: 2rem;
}

.experience-body {
    padding-left: 6rem; /* Reduced padding */
}

.experience-bullets {
    list-style-type: disc;
    padding-left: 1.5rem; /* Reduced indent */
    margin-bottom: 0; /* Remove bottom margin */
}

.experience-bullets li {
    margin-bottom: 0.6rem; /* Reduced spacing between bullets */
    font-size: 1.4rem; /* Smaller text */
    color: var(--text-color);
    line-height: 1.4;
}

.experience-bullets li:last-child {
    margin-bottom: 0;
}

/* Remove the margin-top that was added inline */
.experience-card[style*="margin-top"] {
    margin-top: 2rem !important; /* Override the inline style with a smaller value */
}

/* Connect cards with a timeline */
.experience .container {
    position: relative;
}

.experience .container::before {
    content: '';
    position: absolute;
    left: 2.75rem;
    top: 11rem;
    bottom: 11rem;
    width: 1px;
    background-color: rgba(var(--primary-rgb), 0.2);
    z-index: -1;
    display: none; /* Hidden by default, enabled in desktop */
}

@media (min-width: 992px) {
    .experience .container::before {
        display: block;
    }
}

@media (max-width: 991px) {
    .experience-body {
        padding-left: 0;
    }
}

@media (max-width: 768px) {
    .experience-card {
        padding: 1.8rem;
    }
    
    .experience-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .experience-details h3 {
        font-size: 2rem;
    }
    
    .experience-details h4 {
        font-size: 1.6rem;
    }
    
    .experience-logo {
        width: 4rem;
        height: 4rem;
    }
    
    .experience-logo i {
        font-size: 1.8rem;
    }
}

/* Experience Section Styling - Reduced right-side whitespace */
.experience {
    padding: var(--section-spacing) 0;
}

.experience .container {
    max-width: 120rem; /* Wider container for experiences */
    padding: 0 3rem; /* Maintain some padding on small screens */
}

.experience-card {
    background-color: white;
    border-radius: 0.8rem;
    padding: 2rem 2.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem; 
    width: 100%; /* Ensure full width */
}

.experience-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
}

.experience-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background-color: var(--primary-color);
    opacity: 0.7;
}

.experience-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

.experience-logo {
    width: 4.5rem;
    height: 4.5rem;
    background-color: var(--light-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    flex-shrink: 0;
}

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

.experience-details {
    flex: 1;
    min-width: 0; /* Allow text to shrink */
}

.experience-details h3 {
    font-size: 1.8rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    line-height: 1.3;
    width: 100%; /* Full width */
}

.experience-details h4 {
    font-size: 1.5rem;
    color: var(--text-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    width: 100%; /* Full width */
}

.experience-period {
    font-size: 1.3rem;
    color: var(--primary-color);
    font-weight: 500;
    display: inline-block;
    padding: 0.2rem 0.8rem;
    background-color: rgba(var(--primary-rgb), 0.1);
    border-radius: 2rem;
}

.experience-body {
    padding-left: 6rem;
    max-width: 100%; /* Use full width */
}

.experience-bullets {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-bottom: 0;
    max-width: 100%; /* Use maximum width */
}

.experience-bullets li {
    margin-bottom: 0.6rem;
    font-size: 1.4rem;
    color: var(--text-color);
    line-height: 1.4;
}

/* Override inline styles for spacing between cards */
.experience-card[style*="margin-top"] {
    margin-top: 2rem !important;
}

/* Update container width for different screen sizes */
@media (min-width: 1200px) {
    .experience .container {
        max-width: 130rem; /* Even wider on large screens */
    }
}

@media (max-width: 991px) {
    .experience-body {
        padding-left: 0;
    }
    
    .experience .container {
        max-width: 90%; /* Use more screen width on tablets */
    }
}

@media (max-width: 768px) {
    .experience-card {
        padding: 1.8rem;
    }
    
    .experience-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .experience .container {
        padding: 0 2rem;
        max-width: 95%; /* Use more screen width on mobiles */
    }
}

/* ===== Education Section ===== */
.education {
  padding: var(--section-spacing) 0;
}

.education-card {
  max-width: 80rem;
  margin: 0 auto;
  background-color: white;
  border-radius: 1rem;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  overflow: hidden;
}

.education-header {
  display: flex;
  gap: 2rem;
  padding: 3rem;
  background-color: var(--light-color);
}

.education-logo {
  font-size: 4rem;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

.education-details h3 {
  margin-bottom: 0.5rem;
}

.education-details h4 {
  color: var(--gray-color);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.education-period {
  font-size: 1.4rem;
  color: var(--primary-color);
  font-weight: 500;
}

.education-body {
  padding: 3rem;
}

/* ===== Skills Section ===== */
.skills {
  padding: var(--section-spacing) 0;
  background-color: var(--light-color);
}

.skills-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4rem;
}

.skill-category {
  flex: 1;
  min-width: 25rem;
  text-align: center;
}

.skill-category h3 {
  margin-bottom: 2rem;
  color: var (--primary-color);
}

.skill-items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.skill-item {
  background-color: white;
  padding: 0.8rem 1.6rem;
  border-radius: 2rem;
  font-size: 1.5rem;
  color: var (--dark-color);
  box-shadow: 0 3px 8px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.skill-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Enhanced Skills Section Styling */
.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(45rem, 1fr));
  gap: 3rem;
}

.skills-category {
  background-color: white;
  border-radius: 1rem;
  padding: 2.5rem;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  transition: transform 0.3s ease;
}

.skills-category:hover {
  transform: translateY(-5px);
}

.skills-category h3 {
  margin-bottom: 2rem;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.skills-category h3 i {
  font-size: 2rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.skill-tag {
  background-color: var(--light-color);
  color: var(--text-color);
  padding: 0.8rem 1.5rem;
  border-radius: 5rem;
  font-size: 1.4rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.skill-tag:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .skills-container {
    grid-template-columns: 1fr;
  }
}

/* ===== Contact Section ===== */
.contact {
  padding: var(--section-spacing) 0;
}

.contact-content {
  max-width: 60rem;
  margin: 0 auto;
  text-align: center;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.contact-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.contact-item i {
  color: var(--primary-color);
  font-size: 2rem;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  background-color: var(--light-color);
  color: var(--dark-color);
  font-size: 2.2rem;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.social-link:hover {
  color: white;
  background-color: var(--primary-color);
  transform: translateY(-5px);
}

/* ===== Footer ===== */
footer {
  background-color: var(--dark-color);
  color: white;
  padding: 3rem 0;
  text-align: center;
}

footer p {
  margin-bottom: 0;
  font-size: 1.4rem;
}

/* ===== Projects Page ===== */
.projects {
  padding: var(--section-spacing) 0;
}

.project-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 4rem;
}

.filter-btn {
  background-color: var(--light-color);
  color: var(--text-color);
  border: none;
  padding: 0.8rem 1.6rem;
  border-radius: 3rem;
  cursor: pointer;
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background-color: var(--primary-color);
  color: white;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(35rem, 1fr));
  gap: 3rem;
  margin-bottom: 5rem;
}

.project-card {
  background-color: white;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.project-image {
  position: relative;
  height: 25rem;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
}

.project-image:hover .project-overlay {
  opacity: 1;
}

.project-links {
  display: flex;
  gap: 2rem;
}

.project-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  background-color: white;
  color: var(--dark-color);
  font-size: 2rem;
  transition: all 0.3s ease;
}

.project-link:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-3px);
}

.project-info {
  padding: 2rem;
}

.project-info h3 {
  margin-bottom: 1rem;
}

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

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.tag {
  font-size: 1.2rem;
  padding: 0.4rem 1rem;
  border-radius: 2rem;
  background-color: var(--light-color);
  color: var(--dark-color);
}

/* New Project Card Styles */
.project-filter-section {
  padding: 2rem 0;
  background-color: var(--light-color);
}

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

.project-date {
  font-size: 1.4rem;
  color: var(--primary-color);
  font-weight: 500;
  white-space: nowrap;
}

.project-features {
  margin-bottom: 1.5rem;
}

.project-features ul {
  list-style-type: disc;
  padding-left: 2rem;
}

.project-features li {
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
}

/* Delete or comment out the featured project styling */
/*
.featured {
  box-shadow: 0 8px 30px rgba(0,0,0,0.1);
  transform: scale(1.02);
  border: none;
}

.featured:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.featured .project-info {
  position: relative;
  padding-left: 2.5rem;
}

.featured .project-info::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 5px;
  background-color: var(--primary-color);
  border-radius: 0 3px 3px 0;
}

.featured {
  background-color: rgba(250, 250, 252, 1);
}
*/

/* Alternative highlighting for featured projects */
.featured .project-info {
  position: relative;
  padding-left: 2.5rem;
}

.featured .project-info::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 5px;
  background-color: var(--primary-color);
  border-radius: 0 3px 3px 0;
}
.project-image,
.project-overlay,
button {
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

/* Add this to ensure no outline on focus/active states */
.project-card:focus,
.project-link:focus,
.filter-btn:focus,
.project-image:focus,
button:focus {
  outline: none;
  box-shadow: none;
}

/* For Firefox */
.project-card::-moz-focus-inner,
.project-link::-moz-focus-inner,
.filter-btn::-moz-focus-inner,
button::-moz-focus-inner {
  border: 0;
}

/* ===== Research Page ===== */
.research-overview {
  padding: var(--section-spacing) 0;
}

.research-intro {
  max-width: 80rem;
  margin: 0 auto;
}

.research-intro ul {
  margin-bottom: 2rem;
  padding-left: 2rem;
  list-style-type: disc;
}

.featured-research {
  padding: var(--section-spacing) 0;
  background-color: var(--light-color);
}

.featured-project {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 5rem;
  max-width: 100rem;
  margin: 0 auto;
  background-color: white;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.research-image {
  height: 100%;
}

.research-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.research-content {
  padding: 4rem;
}

.research-meta {
  color: var(--gray-color);
  margin-bottom: 2rem;
  font-size: 1.6rem;
}

.award {
  color: var (--secondary-color);
  font-weight: 600;
}

.research-abstract,
.research-methodology {
  margin-bottom: 3rem;
}

.research-links {
  display: flex;
  gap: 2rem;
}

.other-research {
  padding: var(--section-spacing) 0;
}

.research-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(30rem, 1fr));
  gap: 3rem;
}

.research-card {
  background-color: var(--light-color);
  border-radius: 1rem;
  padding: 3rem;
  transition: all 0.3s ease;
}

.research-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.research-period {
  color: var(--primary-color);
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.research-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.research-link {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-weight: 500;
}

/* Publication styles for research page */
.publications {
  padding: var(--section-spacing) 0;
  background-color: var(--light-color);
}

.publication {
  background-color: white;
  border-radius: 1rem;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  margin-bottom: 4rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.publication:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.publication-content {
  padding: 4rem;
}

.publication h3 {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  font-size: 2.6rem;
}

.publication-meta {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--light-color);
}

.publication-meta p {
  margin-bottom: 0.5rem;
}

.authors {
  font-size: 1.8rem;
}

.conference {
  font-style: italic;
  color: var(--text-color);
}

.pub-status {
  display: inline-block;
  padding: 0.4rem 1.2rem;
  border-radius: 2rem;
  font-weight: 500;
  font-size: 1.4rem;
  margin-top: 1rem;
}

.published {
  background-color: var(--secondary-color);
  color: white;
}

.under-review {
  background-color: #f59e0b;
  color: white;
}

.publication-abstract h4,
.publication-detail h4 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--dark-color);
}

.publication-abstract {
  margin-bottom: 3rem;
}

.publication-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.publication-detail ul {
  list-style-type: disc;
  padding-left: 2rem;
}

.publication-detail li {
  margin-bottom: 0.8rem;
}

.publication-links {
  display: flex;
  gap: 1.5rem;
}

.pub-link {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1.6rem;
  border-radius: 0.6rem;
  font-weight: 500;
  transition: all 0.3s ease;
  background-color: var(--light-color);
}

.pub-link:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.publication-note {
  background-color: var(--light-color);
  padding: 1.5rem;
  border-radius: 0.6rem;
  font-style: italic;
}

.publication-note i {
  margin-right: 0.8rem;
  color: var(--primary-color);
}

/* Research Methods Section */
.research-methods {
  padding: var(--section-spacing) 0;
}

.methods-content {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(25rem, 1fr));
  gap: 3rem;
  max-width: 100rem;
  margin: 0 auto;
}

.method-card {
  background-color: var(--light-color);
  padding: 3rem;
  border-radius: 1rem;
  text-align: center;
  transition: all 0.3s ease;
}

.method-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.method-icon {
  font-size: 4rem;
  color: var(--primary-color);
  margin-bottom: 2rem;
}

.method-card h3 {
  margin-bottom: 1.5rem;
  color: var(--dark-color);
}

/* Media queries for publications */
@media (max-width: 992px) {
  .publication-details {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .publication-content {
    padding: 3rem;
  }
  
  .methods-content {
    grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
  }
   
  .publication h3 {
    font-size: 2.2rem;
  }
  
  .publication-links {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .pub-link {
    width: 100%;
    justify-content: center;
  }
}

/* ===== Resume Page Styles ===== */
.resume-section {
  padding: var(--section-spacing) 0;
  background-color: var(--light-color);
}

.resume-header {
  background-color: white;
  padding: 4rem;
  border-radius: 1rem;
  margin-bottom: 3rem;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.resume-header h2 {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

.resume-contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

.resume-contact p {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0;
}

.resume-contact i {
  color: var(--primary-color);
}

.resume-section-content {
  background-color: white;
  padding: 4rem;
  border-radius: 1rem;
  margin-bottom: 3rem;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.resume-section-title {
  color: var(--primary-color);
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  position: relative;
}

.resume-section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 6rem;
  height: 0.3rem;
  background-color: var(--primary-color);
}

.resume-item {
  margin-bottom: 3rem;
}

.resume-item:last-child {
  margin-bottom: 0;
}

.resume-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.resume-date {
  color: var(--primary-color);
  font-weight: 500;
  white-space: nowrap;
}

.resume-item-header h4 {
  color: var(--dark-color);
  margin-bottom: 0.5rem;
}

.resume-item-header h5 {
  color: var(--gray-color);
  font-weight: 400;
  font-size: 1.6rem;
}

.resume-item-details ul {
  list-style-type: disc;
  padding-left: 2rem;
}

.resume-item-details a {
  font-weight: 500;
}

.resume-skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(25rem, 1fr));
  gap: 3rem;
}

.resume-skill-column h4 {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

.resume-skill-column ul {
  list-style-type: disc;
  padding-left: 2rem;
}

.resume-languages {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
}

.resume-language {
  display: flex;
  flex-direction: column;
}

.language-name {
  font-weight: 600;
  font-size: 1.8rem;
}

.language-level {
  color: var(--gray-color);
}

/* Animation for resume sections */
.resume-section-content {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

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

/* Apply animation with delay for each section */
.resume-section-content:nth-child(1) { animation-delay: 0.1s; }
.resume-section-content:nth-child(2) { animation-delay: 0.2s; }
.resume-section-content:nth-child(3) { animation-delay: 0.3s; }
.resume-section-content:nth-child(4) { animation-delay: 0.4s; }
.resume-section-content:nth-child(5) { animation-delay: 0.5s; }
.resume-section-content:nth-child(6) { animation-delay: 0.6s; }
.resume-section-content:nth-child(7) { animation-delay: 0.7s; }

/* ===== Media Queries ===== */
@media (max-width: 992px) {
  html {
    font-size: 56.25%; /* 1rem = 9px */
  }
  
  .hero-content {
    flex-direction: column;
    text-align: center;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .featured-project {
    grid-template-columns: 1fr;
  }
  
  .research-image {
    height: 30rem;
  }
  
  .resume-item-header {
    flex-direction: column;
  }
  
  .resume-date {
    margin-top: 0.5rem;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 50%; /* 1rem = 8px */
  }
  
  .nav-links {
    display: none;
  }
  
  .hamburger {
    display: flex;
  }
  
  /* Mobile navigation - show when active */
  .nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 8rem;
    left: 0;
    width: 100%;
    background-color: white;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  }
  
  .timeline::before {
    left: 2rem;
  }
  
  .timeline-item {
    padding-left: 7rem;
  }
  
  .timeline-date {
    width: 7rem;
  }
  
  .skills-content {
    flex-direction: column;
  }
  
  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(28rem, 1fr));
  }
  
  .research-content {
    padding: 3rem;
  }
  
  .research-cards {
    grid-template-columns: 1fr;
  }
  
  .resume-section-content {
    padding: 3rem;
  }
  
  .resume-contact {
    flex-direction: column;
    gap: 1rem;
  }
  
  .resume-skills-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 576px) {
  .hero {
    padding: 12rem 0 6rem;
  }
  
  h1 {
    font-size: 3.6rem;
  }
  
  h2 {
    font-size: 3rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }
  
  .hero-buttons .btn {
    width: 100%;
  }
  
  .timeline::before {
    display: none;
  }
  
  .timeline-item {
    padding: 2rem 0;
  }
  
  .timeline-date {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    text-align: left;
    margin-bottom: 1rem;
  }
  
  .timeline-content {
    padding: 1.5rem;
  }
  
  .research-links {
    flex-direction: column;
  }
  
  .resume-header {
    padding: 2.5rem;
  }
  
  .resume-section-content {
    padding: 2.5rem;
  }
}

/* Experience Section - 50% Less Wide (Add this to the bottom of your CSS file) */

/* Center the experience cards and make them 50% less wide */
.experience .container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center; /* Centers content horizontally */
}

.experience-card {
  width: 50%; /* Make cards 50% of container width */
  max-width: 700px; /* Set a maximum width */
  margin-left: auto;
  margin-right: auto;
}

/* Make header and content fit within narrower cards */
.experience-header {
  flex-wrap: wrap;
}

.experience-details h3,
.experience-details h4 {
  width: 100%;
  word-break: normal; /* Prevent awkward breaks */
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .experience-card {
    width: 65%; /* A bit wider on medium screens */
  }
}

@media (max-width: 992px) {
  .experience-card {
    width: 75%; /* Wider on smaller screens */
  }
}

@media (max-width: 768px) {
  .experience-card {
    width: 85%; /* Almost full width on tablets */
  }
}

@media (max-width: 576px) {
  .experience-card {
    width: 100%; /* Full width on mobile */
  }
}

/* Experience Section - 65% Width (Add this to the bottom of your CSS file) */

/* Center the experience cards and make them 65% of container width */
.experience .container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center; /* Centers content horizontally */
}

.experience-card {
  width: 65%; /* Make cards 65% of container width */
  max-width: 850px; /* Set a maximum width */
  margin-left: auto;
  margin-right: auto;
}

/* Make header and content fit within narrower cards */
.experience-header {
  flex-wrap: wrap;
}

.experience-details h3,
.experience-details h4 {
  width: 100%;
  word-break: normal; /* Prevent awkward breaks */
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .experience-card {
    width: 75%; /* A bit wider on medium screens */
  }
}

@media (max-width: 992px) {
  .experience-card {
    width: 85%; /* Wider on smaller screens */
  }
}

@media (max-width: 768px) {
  .experience-card {
    width: 95%; /* Almost full width on tablets */
  }
}

@media (max-width: 576px) {
  .experience-card {
    width: 100%; /* Full width on mobile */
  }
}

/* Visitor Stats Section */
.visitor-stats {
    padding: 20px 0;
    background-color: #f8f9fa;
    text-align: center;
}

.visitor-counter {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background-color: white;
    border-radius: 50px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.visitor-counter i {
    color: #0077cc;
    margin-right: 10px;
    font-size: 1.2rem;
}

.visitor-counter p {
    margin: 0;
    font-weight: 500;
}

#visit-count {
    color: #0077cc;
    font-weight: 700;
    margin-left: 5px;
}