* {
  font-family: Arial, Helvetica, sans-serif;
}

:root {
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 32px;
  --spacing-xl: 48px;
  --max-content-width: 1200px;
  --accent-color: #e44cc9;

  --bg-color: #000000;
  --text-color: #ffffff;
  --text-secondary: #cccccc;
  --button-text-color: #ffffff;
  --button-border-color: #ffffff;
  --card-bg: rgba(255, 255, 255, 0.05);
}

html,
body {
  margin: 0;
  border: 0;
  padding: 0;
  background-color: #000000;
  color: white;
}

main {
  display: flex;
  flex: 1;
  padding: 20px;
  flex-direction: column;
  margin: auto;
  justify-content: center;
  align-items: center;
}

.container {
  max-width: var(--max-content-width);
  width: 90%;
  margin: 0 auto;
  padding: var(--spacing-md);
  min-height: calc(100vh - 120px); /* Account for header/footer */
}

section {
  width: 100%;
  margin-bottom: var(--spacing-sm);
}

.hero {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

h1 {
  font-size: clamp(20px, 4vw, 32px);
  padding-left: 20px;
}

.symbol-button {
  background-color: transparent;
  outline-color: transparent;
  border: none;
  outline: none;
  line-height: 0px;
}

.symbol-button:hover,
.symbol-button:focus {
  outline: 2px solid #e44cc9;
  outline-offset: 2px;
}

.button-text:focus {
  outline: 2px solid #e44cc9;
  outline-offset: 2px;
}

/* Publications toggle */
.hidden-publications {
  display: none;
  flex-direction: column;
}

.hidden-publications.show {
  display: flex;
}

.publications-toggle-btn {
  display: block;
  margin: var(--spacing-sm) auto 0;
  cursor: pointer;
}

.svg-image {
  max-width: 100%;
  min-width: 200px;
  height: auto;
}

.link-image {
  max-height: 50px;
  max-width: auto;
  padding-right: 20px;
  background-color: transparent;
}

.link-image:hover {
  -webkit-filter: invert(76%) sepia(33%) saturate(4788%) hue-rotate(280deg)
    brightness(116%) contrast(100%);
  filter: invert(76%) sepia(33%) saturate(4788%) hue-rotate(280deg)
    brightness(116%) contrast(100%);
}

p {
  margin: 0;
  font-size: clamp(14px, 2vw, 18px);
}

h2 {
  margin: 0;
  font-size: clamp(18px, 4vw, 28px);
  padding-bottom: 10px;
}

h3 {
  margin: 0;
  font-size: clamp(16px, 4vw, 24px);
  padding-bottom: 10px;
}

.cv-container {
  border-radius: 8px;
  width: 100%; /* Add this to be explicit about width */
}

.section-title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 30px;
  padding-bottom: 10px;
}
section > h2 {
  text-align: center;
  margin-bottom: var(--spacing-lg);
  border-bottom: 2px solid grey;
  padding-bottom: var(--spacing-sm);
  display: inline-block;
  width: 100%;
}

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.job-title {
  font-size: clamp(16px, 3vw, 24px);
  font-weight: bold;
  margin-bottom: 5px;
}

.company-name {
  font-size: clamp(14px, 2.5vw, 20px);
  font-style: italic;
}

.employment-date {
  font-size: clamp(12px, 2vw, 16px);
  font-weight: bold;
  white-space: nowrap;
}

.responsibilities {
  margin-top: clamp(12px, 1.8vw, 18px);
}

.responsibilities ul {
  margin: 0;
  padding-left: 20px;
}

.responsibilities li {
  margin-bottom: 8px;
  font-size: clamp(14px, 2vw, 16px);
  line-height: 1.5;
}

.publications-list {
  display: flex;
  flex-direction: column;
  /* max-width: 900px; */
  margin: 0 auto;
}

.section-item {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: var(--spacing-sm);
  margin-bottom: 10px;
}

.section-item:hover {
  background: rgba(255, 255, 255, 0.18);
}

.publication-content {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.publication-title {
  font-size: clamp(16px, 2.5vw, 20px);
  font-weight: 600;
  margin: 0;
  line-height: 1.4;
}

.publication-authors {
  font-size: clamp(14px, 2vw, 16px);
  color: #cccccc;
  font-style: italic;
}

.author-highlight {
  font-weight: 600;
  font-style: normal;
}

.publication-details {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  font-size: clamp(13px, 1.8vw, 15px);
  color: #aaaaaa;
}

.journal {
  font-weight: 600;
  color: #ffffff;
}

.publication-year {
  font-weight: 600;
}

.volume {
  color: #cccccc;
}

.publication-actions {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-sm);
  flex-wrap: wrap;
}

.publication-link {
  text-decoration: none;
}

.vflex {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  width: 75%;
  margin: auto;
}

.headerflex {
  margin: auto;
  display: flex;
  width: 80%;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-lg);
}

.project-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--spacing-md);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.18);
}

.project-image {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: var(--spacing-md);
  min-height: 120px; /* Consistent image area height */
}

.project-svg {
  max-width: 100px;
  max-height: 100px;
  height: auto;
  width: auto;
  transition: transform 0.2s ease;
}

.project-content {
  display: flex;
  flex-direction: column;
  flex: 1; /* Takes remaining space */
  text-align: center;
}

.project-content h3 {
  margin-bottom: var(--spacing-sm);
  font-size: clamp(18px, 3vw, 24px);
}

.project-content p {
  flex: 1; /* Pushes button to bottom */
  margin-bottom: var(--spacing-md);
  line-height: 1.6;
  font-size: clamp(14px, 2vw, 16px);
}

footer {
  margin-top: auto;
  padding: var(--spacing-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.button-text {
  color: var(--button-text-color);
  background-color: transparent;
  min-width: 70px;
  height: auto;
  padding: 15px 20px;
  text-decoration: none;
  font-size: clamp(14px, 2vw, 16px);
  border-radius: 4px;
  border: 1px solid var(--button-border-color);
  line-height: 0px;
  border-style: solid;
}

.button-text:hover {
  color: #e44cc9;
  padding: 15px 20px;
}

.button-text,
.github-link {
  transition: all 0.2s ease;
}

.description {
  padding-bottom: 20px;
}

/* ====== MEDIA QUERIES ====== */
@media (max-width: 768px) {
  /* Header adjustments */
  .github-link {
    transform: scale(0.6);
  }

  /* Job section */
  .job-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .employment-date {
    margin-top: 5px;
  }

  /* Projects grid */
  .projects-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
  
  .project-card {
    padding: var(--spacing-md);
  }
  
  .project-image {
    min-height: 80px;
  }
  
  .project-svg {
    max-width: 80px;
    max-height: 80px;
  }

  /* Publications */
  .publication-item {
    padding: var(--spacing-md);
  }
  
  .publication-details {
    flex-direction: column;
    gap: 4px;
  }
  
  .publication-actions {
    gap: var(--spacing-xs);
  }
}

/* Small Mobile - up to 480px */
@media (max-width: 480px) {
  .publications-list {
    gap: var(--spacing-md);
  }
  
  .publication-title {
    font-size: 16px;
  }
  
  .publication-authors,
  .publication-details {
    font-size: 13px;
  }
}

/* Tablet - 769px to 1024px */
@media (min-width: 769px) and (max-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop - 1025px to 1199px */
@media (min-width: 1025px) and (max-width: 1199px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Large Desktop - 1200px and up */
@media (min-width: 1200px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 1000px;
    margin: var(--spacing-lg) auto 0;
  }
}

/* Extra Large Desktop - 1400px and up */
@media (min-width: 1400px) {
  .projects-grid {
    grid-template-columns: repeat(4, 1fr);
    max-width: 1200px;
  }
}