/* ====== Fonts ====== */
@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');

/* ====== Reset basics ====== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

/* ====== Base body styles and background (blurred image) ====== */
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #f5f5ff;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-y: auto; /* allow scrolling if needed */
  position: relative;
  background-color: #111;
}

/* Background image (furthest back) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url('../images/background.jpg');
  background-size: cover;
  background-position: center center;
  filter: blur(8px) saturate(0.95) contrast(0.95);
  transform: scale(1.03);
  z-index: -4; /* << very far back */
}

/* Dark overlay (above bg but still behind page content) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,6,18,0.45), rgba(10,6,18,0.65));
  z-index: -2; /* above bg (-4) but below grid (-3) and content (>=0) */
}




/* vertical movement animation */
@keyframes move {
  from { transform: translateY(0px); }
  to   { transform: translateY(calc(var(--grid) * var(--dir))); }
}

/* ====== Page wrapper and content (force above decorative layers) ====== */
main.page, .page {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 48px 40px;
  position: relative; /* needed so z-index works */
  z-index: 1;         /* above overlays and grid */
}

/* header/hero */
.hero-head { text-align: center; margin-bottom: 28px; position: relative; z-index: 2; }

.hero-head h1{
  font-family: "Playfair Display", serif;
  font-size: clamp(40px, 7vw, 84px);
  font-weight: 400;
  letter-spacing: 0.5px;
  line-height: 1.03;
  color: #fff;
  text-shadow: 0 6px 24px rgba(0,0,0,0.6);
  margin-bottom: 10px;
  display: inline-block;
  position: relative;
  z-index: 3; /* top of header */
}

.hero-head h1::after {
  content: '';
  display: inline-block;
  width: .2em;
  height: .7em;
  background-color: currentColor;
  margin-left: .1em;
  animation: blink 1s linear infinite forwards;
  vertical-align: baseline;
}

.hero {
  display: flex;
  flex-direction: column; /* Stack vertically */
  align-items: center;
  text-align: center;
  gap: 25px; /* spacing between image, socials, and text */
  padding: 80px 20px;
}

/* main layout */
.hero-content{
  display: inline-block;
  flex-direction: column; /* stack left card and intro vertically */
  gap: 24px;
  align-items: center;    /* center the left card and intro horizontally */
  padding-top: 6px;
  position: relative;
  z-index: 2;
  padding-inline: inherit;
}

/* left card */
.photo-frame img{
  display: block;
  width: 250px;       
  height: auto;       /* keeps the aspect ratio automatic */
  border-radius: 8px; /* rounded corners */
  object-fit: cover;  /* keeps it neatly cropped */
  align-self: flex-start; /* if parent is flex */
  text-align: left; 
}

/* right column: positioned and above grid */
.right-content {
  padding-top: 8px;
  position: relative;
  z-index: 2;
  width: 100%; 
}

/* IMPORTANT: intro specifically forced above the grid */
.intro {
  position: relative;
  z-index: 3;
  color: #e9e6ff;
}

.intro p{
  font-size: 18px;
  color: #e9e6ff;
  margin-bottom: 16px;
  max-width: 900px;
}
.intro p a{
  color: #bfbff7;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}

/* tags and CTA */
.tags{
  margin-top: 32px;
  font-size: 18px;
  opacity: 0.95;
  color: #f3f1ff;
  border-top: 1px dotted rgba(255,255,255,0.05);
  padding-top: 18px;
  max-width: 920px;
  position: relative;
  z-index: 2;
  align-items: center;
}

.cta-row{
  margin-top: 42px;
  display: inline-block;
  gap: 18px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  min-width: 180px;
  transition: transform .14s ease, box-shadow .14s ease;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.btn.primary{
  background: linear-gradient(90deg,#8f7bff 0%, #7b95ff 100%);
  color: #0b0420;
}
.btn.primary:hover{ transform: translateY(-4px) scale(1.01); }
.btn.secondary{
  background: transparent;
  color: #b9b4ff;
  border: 2px solid rgba(185,180,255,0.26);
  box-shadow: 0 0 0 rgba(0,0,0,0);
  backdrop-filter: blur(6px);
}
.btn.secondary:hover{ transform: translateY(-4px); border-color: rgba(189,180,255,0.46); }


.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
  max-width: 500px;
}

.project-card {
  background: rgba(20,16,40,0.7);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.55);
}

.project-card img {
  width: 100%;
  height: auto;
  display: block;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.project-info {
  padding: 20px;
}

.project-info h2 {
  font-family: "Playfair Display", serif;
  font-size: 22px;
  margin-bottom: 12px;
}

.project-info p {
  font-size: 16px;
  margin-bottom: 16px;
  color: #e9e6ff;
}
  
  html {
    scroll-behavior: smooth;
  }

  .contact-form {
    max-width: 500px;
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
  }
  
  .contact-form input,
  .contact-form textarea {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: 'Inter', sans-serif;
  }
  
  .contact-form button {
    padding: 12px;
    font-size: 16px;
    cursor: pointer;
    border: none;
    border-radius: 5px;
  }

  #contact {
    padding: 60px 20px;
    text-align: center;
    position: relative; /* important! */
    z-index: 2;         /* above the grid layers */
    color: #fff;        /* make text readable on dark background */
  }

  header.hero-head {
    padding-bottom: 55px; /* extra space under header */
  }

  .social-links {
    display: flex;
    flex-direction: column; /* stack vertically */
    gap: 20px;              /* space between each row */
    text-align: left;       /* align text to left */
    max-width: 400px;       /* keeps it from stretching too far */
    margin: 75px auto;      /* center the block horizontally */
    font-size: 18px;
  }
  
  .social-item {
    display: flex;
    align-items: center; /* vertically centers icon and text */
    gap: 10px;           /* space between icon and text */
  }
  
  .social-item img {
    display: inline-block;
  }

  .btn-cv {
    display: inline-flex;
    align-items: right;
    justify-content: center;
    gap: 10px;                  
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    background: linear-gradient(135deg, #6a0dad, #4b0082, #1e3c72, #2a5298, #ff5f6d);
    background-size: 400% 400%;  /* for animated gradient */
    color: #fff;
    box-shadow: 0 6px 20px rgba(0,0,0,0.6);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: galaxy 8s ease infinite;
  }
  
  @keyframes galaxy {
    0%{background-position:0% 50%}
    50%{background-position:100% 50%}
    100%{background-position:0% 50%}
  }
  
  .btn-cv::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.15);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
  }
  
  .btn-cv:hover::before {
    transform: scaleX(1);
  }
  
  .btn-cv:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 10px 28px rgba(0,0,0,0.7);
  }
  
  .btn-cv .btn-icon {
    font-size: 20px;
    transition: transform 0.3s ease;
  }
  
  .btn-cv:hover .btn-icon {
    transform: rotate(20deg) scale(1.2);
  }

  /* ===== General Section Styling ===== */
.info-section {
  max-width: 1000px;
  margin: 80px auto;
  padding: 40px 20px;
  color: #fff;
  text-align: left;
  position: relative;
  z-index: 2;
}

.info-section h2 {
  font-family: "Playfair Display", serif;
  font-size: clamp(32px, 5vw, 48px);
  margin-bottom: 24px;
  color: #bfbff7;
  border-bottom: 2px solid rgba(185,180,255,0.3);
  display: inline-block;
  padding-bottom: 8px;
  margin-top: 30px;
}

/* ===== Lists ===== */
.info-list {
  list-style: none;
  padding-left: 0;
}

.info-list li {
  font-size: 13px;
  margin-bottom: 2px;
  position: relative;
  padding-left: 24px;
}

.info-list li::before {
  content: "✔"; /* check mark symbol */
  position: absolute;
  left: 0;
  color: #7b95ff;
  font-size: 14px; /* smaller check mark */
}

/* ===== Cards for Education & Work ===== */
.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.info-card {
  background: rgba(20,16,40,0.7);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.info-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.55);
}

.info-card h3 {
  font-family: "Playfair Display", serif;
  font-size: 22px;
  margin-bottom: 8px;
  color: #fff;
}

.info-card p {
  font-size: 16px;
  line-height: 1.5;
  color: #e9e6ff;
}


/* Certifications styles */
.cert-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

/* card */
.cert-card {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 16px;
  align-items: center;
  background: rgba(20,16,40,0.7);
  padding: 14px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
  transition: transform .18s ease, box-shadow .18s ease;
}

.cert-card.small { 
  grid-template-columns: 80px 1fr;
  padding: 10px;
}

.cert-card img {
  width: 100%;
  height: 100%;
  max-width: 100px;
  object-fit: contain;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
}

.cert-body h3 {
  margin: 0 0 6px 0;
  font-family: "Playfair Display", serif;
  font-size: 18px;
  color: #fff;
}

.cert-body .meta {
  font-size: 14px;
  color: #bfbff7;
  margin-bottom: 8px;
}

.cert-body .desc {
  font-size: 14px;
  color: #e9e6ff;
  margin: 0;
}

.cert-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.55);
}

.cert-link {
  text-decoration: none;
  color: inherit;
  display: inline-block;
}


.cert-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.2);
}

/* filter bar */
.filter-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.06);
  background: transparent;
  color: #e9e6ff;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s ease;
}

.filter-btn.active {
  background: linear-gradient(90deg,#8f7bff 0%, #7b95ff 100%);
  color: #0b0420;
  box-shadow: 0 6px 20px rgba(0,0,0,0.45);
}

#searchCert {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
  color: #fff;
  margin-bottom: 20px;
}

.research-list {
  list-style-position: inside; /* bullet becomes part of the text flow */
  padding: 0;
  margin: 12px auto;            /* centers the list block horizontally */
  max-width: 720px;            
}

.research-list li {
  margin: 6px 0;
  text-align: left;          /* center each list item (and bullet when using inside) */
  font-size: 18px;
  line-height: 1.4;
}

#publications {
  display: flex;
  flex-direction: column;
  gap: 50px; /* controls distance between the two publications */
  align-items: left;
  text-align: left;
  font-size: 20px;
}


.about-section {
  display: inline-block;
  flex-direction: column;
  gap: 50px;              /* distance between elements */
  font-size: 20px;
  max-width: 900px;       /* narrow the section */
  margin: 0 auto;         /* center on the page */
  padding: 0 20px;        /* small padding for smaller screens */
  margin-top: 10px;
  align-items: center;
}

@media (max-width: 1024px) {
  .about-section {
    max-width: 700px;
  }
}

@media (max-width: 768px) {
  .about-section {
    max-width: 100%;      /* full width on mobile */
    text-align: center;   /* centers text on small screens */
    align-items: center;
    gap: 30px;            /* reduces gap on smaller screens */
  }

  .photo-frame img {
    width: 180px;         /* smaller profile picture */
  }
}

/* Sidebar */
.sidebar {
  position: fixed;
  left: -250px;
  top: 0;
  height: 100%;
  width: 250px;
  background-color: #222;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: start;
  padding: 60px 20px;
  transition: left 0.3s ease;
  z-index: 1000;
}

.sidebar.show {
  left: 0;
}

.sidebar-menu {
  list-style: none;
  padding: 0;
  width: 100%;
}

.sidebar-menu li {
  margin: 20px 0;
}

.sidebar-menu a {
  color: white;
  text-decoration: none;
  font-size: 18px;
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

.menu-btn {
  position: fixed;
  top: 20px;
  left: 20px;
  background: #222;
  color: white;
  border: none;
  font-size: 22px;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 8px;
  z-index: 1100;
}

.menu-btn:hover {
  background: #444;
}


.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}

.skills-grid h2 {
  font-family: "Playfair Display", serif;
  font-size: clamp(32px, 5vw, 48px);
  margin-bottom: 24px;
  color: #bfbff7;
  border-bottom: 2px solid rgba(185,180,255,0.3);
  display: inline-block;
  padding-bottom: 8px;
  margin-top: 30px;
}

.skill-column {
  flex: 1;
  min-width: 200px;
}

.skill-item {
  margin-bottom: 15px;
  font-size: 1.1rem;
  padding: 5px 0;
  transition: all 0.2s ease;
}

.skill-item:hover {
  transform: translateX(5px);
  color: #3498db;
}

.bold {
  font-weight: 600;
  color: #2c3e50;
}