:root {
  /* Colors - Light Theme */
  --bg-primary: #ffffff;
  --bg-secondary: #dbeafe;
  /* Blue 100 - Distinct Light Blue */
  --bg-card: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --accent: #0d9488;
  /* Professional Teal */
  --accent-hover: #0f766e;
  --border: #e2e8f0;

  /* Typography */
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;

  /* Spacing */
  --container-width: 1200px;
  --header-height: 70px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.6;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

h1 {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 2rem;
  position: relative;
  display: inline-block;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}

ul {
  list-style: none;
}

/* Layout Utilities */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: 80px 0;
}

section:nth-child(even) {
  background-color: var(--bg-primary);
}

/* Header & Nav */
header {
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

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

.nav-links a {
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

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

.menu-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-height);
  position: relative;
  overflow: hidden;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-text h1 {
  margin-bottom: 1.5rem;
  background: linear-gradient(to right, var(--text-primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 600px;
}

.hero-socials {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.hero-socials a {
  width: 40px;
  height: 40px;
  background-color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1.2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 1px solid var(--border);
}

.hero-socials a:hover {
  background-color: var(--accent);
  color: white;
  transform: translateY(-3px);
  border-color: var(--accent);
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  background-color: var(--accent);
  color: white;
  border-radius: 6px;
  font-weight: 600;
  transition: transform 0.2s, background-color 0.2s;
}

.btn:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
  margin-left: 1rem;
}

.btn-outline:hover {
  background-color: var(--accent);
  color: white;
}

.hero-image {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image img {
  width: 100%;
  max-width: 225px;
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 2.5px solid transparent;
  background: linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, var(--accent), #8b5cf6) border-box;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
}

.hero-image:hover img {
  transform: scale(1.02);
}

/* Cards (Education, Research, Publications) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.card {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  border-color: var(--accent);
}

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

/* Publications Styles */
#publications .card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 100%;
}

#publications .card {
  display: flex;
  flex-direction: row;
  /* Horizontal layout */
  padding: 0.7rem;
  /* Reduced padding */
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  /* For absolute date */
  align-items: flex-start;
}

#publications .pub-img-wrapper {
  flex: 0 0 112px;
  /* Reduced width */
  height: 84px;
  /* Reduced height */
  margin-right: 1.2rem;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #f0f0f0;
}

#publications .pub-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#publications .pub-content-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
}

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

#publications .pub-date {
  font-size: 0.75rem;
  color: #00796b;
  /* Teal color similar to screenshot */
  background-color: #e0f7fa;
  /* Light blue/cyan background */
  font-weight: 600;
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  /* Pill shape */
  z-index: 2;
  box-shadow: none;
  border: none;
  display: block;
  min-width: auto;
  text-align: right;
}

/* Removed complex calendar styles */

#publications .pub-journal {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.75rem;
  font-style: italic;
  /* Distinctive style for journal */
}

#publications .card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  line-height: 1.3;
  padding-right: 140px;
  /* More space for the pill date */
}

#publications .card-content p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0;
}

#publications .read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  margin-left: 0.5rem;
}

#publications .read-more:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  #publications .card {
    flex-direction: column;
  }

  #publications .pub-img-wrapper {
    flex: 0 0 auto;
    width: 100%;
    height: 120px;
    /* Reduced height for mobile */
    margin-right: 0;
    margin-bottom: 0.7rem;
  }

  #publications .card-title {
    padding-right: 0;
    margin-top: 1rem;
    /* Reduced margin */
  }
}

#publications .read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  margin-top: auto;
}

#publications .read-more:hover {
  text-decoration: underline;
}

/* Specific compact styles for Certifications */
/* Specific compact styles for Certifications */
#certifications .card-grid {
  display: grid;
  grid-template-columns: 1fr;
  /* 1 item per row (full width) */
  gap: 1rem;
  max-width: 100%;
  margin: 0 auto;
}

#certifications .card {
  display: flex;
  /* Horizontal layout */
  flex-direction: row;
  align-items: center;
  padding: 0.5rem;
  gap: 0.75rem;
  height: 100px !important;
  /* STRICT fixed 100px height force */
  min-height: 100px !important;
  max-height: 100px !important;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  overflow: hidden;
  /* Hide extra text */
  position: relative;
  /* Context for absolute positioning */
}

/* ... existing styles for wrapper/images ... */

.card-date {
  font-size: 0.7rem;
  color: var(--accent);
  font-weight: 600;
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  background: rgba(255, 255, 255, 0.9);
  /* Slight background to read over text if needed */
  padding: 0 4px;
  border-radius: 4px;
}

#certifications .card-img-wrapper {
  flex: 0 0 80px;
  /* STRICT fixed width for image container */
  height: 100%;
  /* Fill card height */
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
}

#certifications .card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Full image visible */
  background: white;
  display: block;
}

#certifications .card-text-wrapper {
  flex: 1;
  /* Take remaining space */
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  /* Prevent text overflow */
}

#certifications .card-header {
  margin-bottom: 0.2rem;
}

#certifications .card-title {
  font-size: 0.9rem;
  margin-bottom: 0;
  line-height: 1.2;
  white-space: nowrap;
  /* Keep title on one line if possible */
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 768px) {
  #certifications .card {
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
  }

  #certifications .card-img-wrapper {
    width: 100%;
    height: 150px;
    flex: 0 0 auto;
    margin-bottom: 0.5rem;
  }

  #certifications .card-date {
    position: static;
    margin-top: 0.5rem;
    align-self: flex-start;
    background: transparent;
    padding: 0;
  }

  #certifications .card-title {
    white-space: normal;
  }
}

#certifications .card-content p {
  font-size: 0.8rem;
  margin: 0;
  line-height: 1.2;
}

.card-date {
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 600;
  background: rgba(59, 130, 246, 0.1);
  padding: 4px 12px;
  border-radius: 20px;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.card-subtitle {
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-content ul {
  list-style: disc;
  padding-left: 1.25rem;
  color: var(--text-secondary);
}

.card-content li {
  margin-bottom: 0.5rem;
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: 750px;
  /* Reduced width */
  margin: 0 auto;
  /* Center the grid */
}

.skill-category {
  background: var(--bg-card);
  padding: 1rem;
  /* Compact padding */
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.skill-category:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
}

.skill-category::before {
  content: '';
  position: absolute;
  bottom: -20px;
  right: -20px;
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 8rem;
  opacity: 0.05;
  color: var(--accent);
  z-index: 0;
}

.cat-wet::before {
  content: '\f490';
}

/* Vial */
.cat-dry::before {
  content: '\f610';
}

/* Microscope/Analysis - actually using a different one? f002 search maybe? let's use f610 (microscope) if available or f0c3 (flask) */
/* f490 is vial. f0aec is microscope? Let's check FA. microscope is f610 ? no. */
/* Using generic codes, let's fix: microscope: \f610 (this is mostly pro) or \f002 (search)?
Let's use:
Wet: \f490 (vial)
Dry: \f1b3 (cubes? data?) or \f0c3 (flask)
Code: \f121 (code)
*/
.cat-wet::before {
  content: '\f490';
}

.cat-dry::before {
  content: '\f0c3';
}

/* Flask */
.cat-code::before {
  content: '\f121';
}

/* Code */


.skill-category h3 {
  margin-bottom: 0.5rem;
  /* Reduced margin */
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: relative;
  z-index: 1;
  font-size: 1.1rem;
}

.skill-list {
  display: flex;
  flex-direction: column;
  /* Line by line */
  gap: 0.25rem;
  /* Reduced gap */
  position: relative;
  z-index: 1;
}

.skill-tag {
  background: transparent;
  padding: 2px 0;
  /* Reduced padding */
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: all 0.2s;
  display: block;
}

.skill-tag:last-child {
  border-bottom: none;
}

.skill-tag:hover {
  color: var(--accent);
  padding-left: 5px;
}

/* Contact */
/* Contact Section New Design */
.contact-section {
  background-color: var(--bg-primary);
  /* Light Background */
  color: var(--text-primary);
  padding: 40px 0;
  /* Reduced padding */
}

.section-title-center {
  text-align: center;
  margin-bottom: 2rem;
  /* Reduced margin */
}

.section-title-center h2 {
  font-size: 2rem;
  /* Reduced font size */
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.section-title-center h2::after {
  display: none;
}

.section-title-center p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  /* Reduced font size */
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 1rem;
  /* Reduced gap */
  max-width: 800px;
  /* Reduced width significantly */
  margin: 0 auto;
}

/* Contact Info Side */
.contact-info-card {
  background: var(--bg-card);
  padding: 1.5rem;
  /* Reduced padding */
  border-radius: 12px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.contact-info-card h3 {
  font-size: 1.25rem;
  /* Reduced font size */
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.info-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}

.info-icon {
  width: 40px;
  /* Reduced icon size */
  height: 40px;
  background: rgba(13, 148, 136, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--accent);
  flex-shrink: 0;
}

.info-details h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.1rem;
}

.info-details p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.4;
}

.social-links-footer {
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.social-links-footer h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.social-icons {
  display: flex;
  gap: 0.75rem;
}

.social-icons a {
  width: 35px;
  /* Reduced size */
  height: 35px;
  background: var(--bg-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.3s;
  font-size: 0.9rem;
}

.social-icons a:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-3px);
}

/* Contact Form Side */
.contact-form-card {
  background: var(--bg-card);
  padding: 1.5rem;
  /* Reduced padding */
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.form-row {
  display: flex;
  gap: 1rem;
}

.form-row .form-group {
  flex: 1;
}

.form-group {
  margin-bottom: 1rem;
  /* Reduced margin */
  display: flex;
  flex-direction: column;
}

.form-group label {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.form-group input,
.form-group textarea {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  /* Reduced padding */
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.9rem;
  transition: border-color 0.3s, focus-ring 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.2);
}

.form-group textarea {
  resize: vertical;
}

.submit-btn {
  background: var(--accent);
  color: white;
  font-weight: 700;
  text-transform: uppercase;
  padding: 10px 20px;
  /* Reduced padding */
  border: none;
  border-radius: 6px;
  cursor: pointer;
  width: 100%;
  font-size: 0.9rem;
  transition: background 0.3s;
  letter-spacing: 0.05em;
}

.submit-btn:hover {
  background: var(--accent-hover);
}

/* Responsive */
@media (max-width: 768px) {
  .contact-wrapper {
    grid-template-columns: 1fr;
    max-width: 100%;
    /* Restore width on mobile for readability */
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .contact-info-card,
  .contact-form-card {
    padding: 1.5rem;
  }
}

/* Badges for Publications */
.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 4px;
  margin-right: 8px;
  background: var(--border);
  color: var(--text-secondary);
}

.badge-pub {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-primary);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--border);
    transform: translateY(-150%);
    transition: transform 0.3s ease-in-out;
  }

  .nav-links.active {
    transform: translateY(0);
  }

  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }

  .hero-text {
    order: 2;
  }

  .hero-image {
    order: 1;
  }

  .hero-image img {
    max-width: 300px;
  }

  .hero-subtitle {
    margin: 0 auto 2rem;
  }

  .hero-socials {
    justify-content: center;
  }

  h2::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .skills-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Typewriter Effect */
.typewriter-container {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
}

.cursor {
  display: inline-block;
  width: 3px;
  height: 24px;
  background-color: var(--text-primary);
  animation: blink 1s infinite;
  margin-left: 5px;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

/* Footer */
footer {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: auto;
}

/* Modal Styles */
.modal {
  display: none;
  /* Hidden by default */
  position: fixed;
  z-index: 1000;
  padding-top: 50px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
  /* Black w/ opacity */
  backdrop-filter: blur(5px);
}

.modal-content {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 900px;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
  animation: zoomIn 0.3s ease;
  cursor: grab;
  /* Indicate draggable */
  transition: transform 0.1s ease-out;
  /* Smooth movement */
}

.modal-content:active {
  cursor: grabbing;
}

@keyframes zoomIn {
  from {
    transform: scale(0)
  }

  to {
    transform: scale(1)
  }
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
  z-index: 1001;
}

.close-modal:hover,
.close-modal:focus {
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
}

/* Make certification cards clickable */
#certifications .card {
  cursor: pointer;
}

/* Zoom Controls */
.zoom-controls {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1rem;
  z-index: 1002;
}

.zoom-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 10px 15px;
  font-size: 1.2rem;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s;
  backdrop-filter: blur(5px);
}

.zoom-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}