/* ===== GLOBAL STYLES ===== */
body {
  margin: 0;
  font-family: 'Jost', sans-serif;
  font-weight: 300;
  background-color: #070a28;
  color: #ffffff;
  font-size: 20px;  /* default is 16px, increase as you like */
}

/* ===== TOP BAR ===== */
.topbar {
  max-width: 1100px;
  width: 90%;
  margin: 0 auto;
}

.topbar-wrapper {
  border-bottom: 3px solid #34081f;
  width: 100%;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
/* LEFT COLUMN (same as sidebar) */
.header-left {
  font-family: 'Cormorant Garamond', serif;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;   /* stack name above image */
  align-items: flex-start;
  text-align: center;
  padding: 20px 20px 20px 0;
  
}

/* RIGHT COLUMN (same as content) */
.header-right {
  font-family: 'Cormorant Garamond', serif;
  flex: 1;                  /* take remaining space */
  display: flex;
  align-items: center;
  justify-content: flex-end; /* push nav to the right */
  padding: 20px 0;
}

.sidebar {
  flex: 0 0 240px;          /* fixed width, no shrink */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-left: 200px;  /* adjust this to move image right */
}

.content {
  flex: 1;                  /* fill all remaining space */
  min-width: 0;             /* allow shrinking below natural width */
  text-align: justify;
  hyphens: auto;
  font-size: 1.4em;
  padding: 0;
}

/* NAME IN SIDEBAR */
.site-name {
  font-family: 'Cormorant Garamond', serif;
  font-weight: bold;
  line-height: 1.1;
}

.site-name .first {
  display: block;
  font-size: 1.6em;
}

.site-name .last {
  display: block;
  font-size: 1em;
}
/* NAVIGATION (RIGHT) */
nav {
  display: flex;
  gap: 15px;
}

nav a {
  text-decoration: none;
  background-color: #34081f;
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 25px;
  transition: 0.2s;
  font-weight: bold;
}

nav a:hover {
  opacity: 0.8;
}

nav a.active {
  background-color: #1c0812;
}

/* ===== MAIN LAYOUT ===== */
.container {
  display: flex;
  align-items: flex-start;
  max-width: 1100px;
  width: 90%;
  margin: 10px auto 10px 0;
   padding: 40px 40px 40px 200px;     /* top breathing room + same edge padding as topbar+ last digit help move the DP */
  box-sizing: border-box;
  gap: 200px;              /* clear gap between sidebar and content+ home body setting */
}
#page-home .container {
  gap: 60px;
  padding-left: 40px;
  margin-left: auto;
}

#page-home .sidebar {
  margin-left: -80px;   /* was 180px — adjust this number until it looks right */
  flex: 0 0 220px;   /* fixed narrow sidebar */
}

#page-home .content {
  flex: 1;
  min-width: 0;
  max-width: none;   /* let it fill all remaining space */
  text-align: justify;
  hyphens: none;
}
/* LEFT SIDEBAR */
.sidebar {
  width: 30%;
  display: flex;
  flex-direction: column;
  align-items: center;   /* centers everything horizontally */
  text-align: center;
   flex-shrink: 0;         /* prevents sidebar from squishing */
}

/* PROFILE IMAGE */
.profile-pic {
  width: 300px;
  height: 300px;
  object-fit: cover;
  border-radius: 8px;
  margin-top: 15px;        /* space between name and image */
  box-shadow: 0 4px 50px rgba(0,0,0,0.15);
}

/* JOB TITLE */
.title {
  color: #949292;
  font-weight: bold;
}
.title {
  width: 300px;  /* adjust until it fits in 2 lines */
}

/* RIGHT CONTENT */
.content {
  width: 70%;
  text-align: left;
  hyphens: auto;
  font-size: 1.4em;
  padding: 0;
}

.content h1 {
  margin-top: 0;
}

.content h2 {
  margin-top: 0;
}


/* ===== RESPONSIVE (MOBILE) ===== */
@media (max-width: 768px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 20px;
    gap: 15px;
  }

  .container {
    flex-direction: column;
    padding: 24px 20px;
    gap: 24px;
  }

  .sidebar,
  .content {
    width: 100%;
  }

  nav {
    flex-wrap: wrap;
  }
}
.projects-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .project-card {
    width: 100%;
  }

  #page-publications .container,
  #page-talks .container {
    padding: 0 20px;
  }

  .talk-item {
    border-left-width: 5px;
  }

/* ===== CV PAGE ===== */
.cv-half {
  flex: 1;
  min-width: 0;
}

.cv-entry {
  display: flex;
  gap: 15px;
  margin-bottom: 10px;
  align-items: flex-start;
}
.cv-entry p {
  margin: 0px;  /* removes default paragraph spacing */
}

.cv-year {
  font-weight: bold;
  color: #868485;
  white-space: nowrap;
  min-width: 200px;
}
#page-cv .container {
  gap: 40px;          /* restore original gap for CV */
  padding-left: 40px; /* restore original padding for CV */
  margin-left: auto;  /* restore centering for CV */
}
/* ===== PROJECTS PAGE ===== */
#page-consulting .container {
  padding-left: 40px;
  margin-left: auto;
  margin-right: auto;
}

#page-consulting .content {
  display: flex;
  justify-content: center;
  width: 100%;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 60px;
  justify-items: center;
}

.project-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  z-index: 1;
  width: 300px;
}

.project-card:hover img {
  filter: invert(4%) sepia(20%) saturate(6500%) hue-rotate(195deg) brightness(15%) contrast(105%);
}
.project-card img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
  transition: filter 0.3s ease; /* add this */
}

.project-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  color: #ffffff;
  padding: 20px 12px 10px;
  font-size: 0.9em;
  font-weight: bold;
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(7, 10, 40, 0.92);
  color: #ffffff;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-size: 0.85em;
  line-height: 1.6;
  z-index: 2;
}

.project-card.active .project-overlay {
  opacity: 1;
}

.project-overlay h3 {
  margin: 0 0 10px 0;
  font-size: 1em;
}

.project-overlay p {
  margin: 0;
}

.project-card:hover .project-overlay {
  opacity: 0.7;
}

.project-link {
  text-decoration: none;
  color: inherit;
  display: block;
}
/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .project-detail {
    flex-direction: column; /* Stacks the image on top of the text */
    align-items: center;    /* Centers everything */
    gap: 20px;              /* Reduces the gap for smaller screens */
    margin: 20px auto;      /* Reduces outer spacing */
  }

  .project-detail-img {
    flex: 0 0 auto;         /* Allows the image to resize */
    width: 100%;            /* Makes image fill the screen width */
    max-width: 400px;       /* Prevents it from getting too huge */
    height: auto;           /* Maintains aspect ratio so it doesn't stretch */
  }

  .project-detail-text {
    min-width: 0;           /* Ensures text doesn't overflow the screen */
    text-align: left;       /* Optional: Justified text can look messy on very narrow screens */
  }

  .project-detail-text h1 {
    font-size: 28px;        /* Shrinks the title so it fits on one or two lines */
    text-align: center;     /* Centers the title for a cleaner mobile look */
  }

  .project-detail-text p {
    font-size: 18px;        /* Shrinks body text for smaller displays */
    text-align: left;       /* Justify usually looks bad on narrow mobile screens */
  }
  
}


/* ===== TALKS PAGE ===== */
#page-publications .container,
#page-talks .container {
  max-width: 900px;
  margin-left: 10%; /* increase this to move content more to the right */
  margin-right: auto;
  padding: 0 40px;
}
.talk-item {
  margin-bottom: 30px;
  border-left: 9px solid #34081f;
  padding-left: 15px;
}

.talk-title {
  margin: 0 0 5px 0;
  color: #ffffff;
  font-weight: bold;
}

.talk-event {
  margin: 0 0 3px 0;
  font-weight: bold;
  color: #868485;  /* now the event name gets the dark color */
}

.talk-details {
  margin: 0;
  opacity: 0.7;
  font-size: 0.9em;
}
.talk-title a {
  color: #ffffff;
  text-decoration: none;
}

.talk-title a:hover {
  text-decoration: underline;
}



/* ===== PAGE TRANSITION ===== */
body {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* For icons */
footer {
  display: flex;
  align-items: center;
  gap: 16px;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background-color: #34081f;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
   vertical-align: top; 
}

.social-icons a:hover {
  background-color: #1c0812;
}

.social-icons a svg {
  fill: #868485;
  width: 22px;
  height: 22px;
}

.social-icons a i {
  color: #868485;
  font-size: 22px;
  margin: 0;
  padding: 0;
  display: block;
}
.ai {
  line-height: 1 !important;
}