/* =========================
  Background palette + knobs
  ========================= */
  :root {
    --primary-color: #0071e3;
    --text-color: #1d1d1f;
    --background-color: #f5f5f7;
    --card-color: rgba(255, 255, 255, 0.15);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --secondary-text: #6e6e73;
    --highlight-bg: rgba(0, 113, 227, 0.05);
    --border-color: rgba(0, 0, 0, 0.1);
  
    /* Background palette + tuning (new) */
    --bg-red:     #ffb7c5;   /* top-left */
    --bg-lilac-core: #d0c4ff;
    --bg-lilac:   #e6d7ff;   /* center purple */
    --bg-periw:   #c9d8ff;   /* right blue (deeper) */
    --bg-sky:     #cfeeff;   /* right blue (lighter) */
    --bg-offwhite:#ffffff;   /* white fill */
  
    --bg-blur: 80px;
    --bg-sat:  1.06;
    --bg-vignette: 0.85; /* 0 = none, 1 = strong */
  }

  /* =========================
    Resets + base layout
    ========================= */
     * { margin: 0; padding: 0; box-sizing: border-box; }
  
     html, body { height: 100%; }
     
     body {
       font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
       background-color: var(--background-color);
       color: var(--text-color);
       line-height: 1.6;
       position: relative; /* enables z-index layering for the pseudo-elements */
       display: flex;
       overflow-x: hidden;
       flex-direction: column;
       padding-bottom: 0;
       min-height: 100svh;
       -webkit-font-smoothing: antialiased;
       -moz-osx-font-smoothing: grayscale;
     }
     
     .container { max-width: 980px; margin: 0 auto; padding: 0 20px; }

  body::before{
    content:"";
    position:fixed;
    inset:-25vmax;
    z-index:-1;
    pointer-events:none;
  
    background:
      /* Top-right blues (depth via two layers) */
      radial-gradient(55vmax 55vmax at 80% 26%, var(--bg-sky),   transparent 64%),
      radial-gradient(45vmax 45vmax at 70% 18%, var(--bg-periw), transparent 64%),
  
      /* NEW: purple core (slightly sharper center, then blends out) */
      radial-gradient(52vmax 50vmax at 40% 70%, var(--bg-lilac), transparent 63%),
      radial-gradient(34vmax 32vmax at 38% 60%, var(--bg-lilac-core), transparent 60%),

      /* Surrounding purple field (soft, to catch the fade from the core) */
      radial-gradient(52vmax 50vmax at 52% 52%, var(--bg-lilac), transparent 63%),
  
      /* Single larger red at top-left */
      radial-gradient(70vmax 70vmax at 14% 18%, var(--bg-red), transparent 62%),
  
      /* Bottom/overall white fill (kept under colors) */
      radial-gradient(62vmax 42vmax at 50% 90%, var(--bg-offwhite), transparent 70%);
  
    filter: blur(var(--bg-blur)) saturate(var(--bg-sat));
    transform: translateZ(0);
  }
  
  /* = Vignette + bottom white lift (a touch more white overall) = */
  body::after{
    content:"";
    position:fixed;
    inset:0;
    z-index:-1;
    pointer-events:none;
  
    /* Edge fade so colors fall off toward borders */
    -webkit-mask-image:
      radial-gradient(120% 85% at 50% 50%,
        rgba(0,0,0,1) calc(100% - (var(--bg-vignette) * 35%)),
        rgba(0,0,0,0) 100%);
            mask-image:
      radial-gradient(120% 85% at 50% 50%,
        rgba(0,0,0,1) calc(100% - (var(--bg-vignette) * 35%)),
        rgba(0,0,0,0) 100%);
  
    /* 1) extra bottom white “mist”, 2) gentle center lift */
    background:
      radial-gradient(100% 60% at 50% 96%, rgba(255,255,255,0.65), rgba(255,255,255,0) 72%),
      radial-gradient(100% 65% at 50% 45%, rgba(255,255,255,0.18), rgba(255,255,255,0) 72%);
  }
  
  /* = Film grain (unchanged; optional) = */
  html::before{
    content:"";
    position:fixed;
    inset:0;
    z-index:-1;
    pointer-events:none;
    mix-blend-mode: soft-light;
    opacity:.06;
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAP0lEQVQYV2NkYGBg+M/AwMBgIAZxQGQxE2QwGJgYkD8Q/8GAgQYg0gEo0g1gB0YGmGkQfQw2w2iC8CwA1m0Qyq6o9QAAh2xgJp2y8DgAAAABJRU5ErkJggg==");
    image-rendering: pixelated;
    background-size: 8px 8px;
    animation: grainShift 8s steps(6) infinite;
  }
  
  /* Optional gentle drift (same motion as before) */
  @media (prefers-reduced-motion: no-preference){
    body::before{
      animation: floatBlobs 22s ease-in-out infinite alternate;
    }
    @keyframes floatBlobs{
      0%  {transform: translate3d(-1%, 0, 0) scale(1);}
      100%{transform: translate3d(1%, 0.5%, 0) scale(1.02);}
    }
  }
  
/* =========================
  Header + navbar + cards
  (unchanged from your file)
  ========================= */
header {
  padding: 20px 0 50px;
  text-align: center;
  background: transparent;
}

.profile-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  margin: 0 auto;
  max-width: 800px;
}

.profile-info { text-align: right; }

.profile-info h1 {
  font-size: 48px;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}

.profile-info .title {
  font-size: 24px;
  font-weight: 400;
  color: var(--primary-color);
}

.profile-image { width: 140px; height: 140px; flex-shrink: 0; }

.image-placeholder {
  width: 100%; height: 100%;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.7);
  display: flex; align-items: center; justify-content: center;
  color: #888; font-size: 14px;
  box-shadow: 0 10px 30px var(--shadow-color);
  backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.image-placeholder:hover {
  transform: scale(1.05);
  box-shadow: 0 15px 35px var(--shadow-color);
}

.profile-image img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
  box-shadow: 0 10px 30px var(--shadow-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.profile-image img:hover {
  transform: scale(1.05);
  box-shadow: 0 15px 35px var(--shadow-color);
}

.header-container {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 2rem;
}

.navbar {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.5rem 1rem;
}

.navbar__links {
  list-style: none; display: flex; gap: 1.5rem; margin: 0; padding: 0;
}
.navbar__links a {
  text-decoration: none; color: var(--text-color, #333);
  font-weight: 500; padding: 0.4rem 0.6rem; border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}
.navbar__links a:hover,
.navbar__links .active a {
  background: rgba(255, 255, 255, 0.4);
  color: var(--primary-color);
}

.navbar__links .disabled-link {
  color: var(--secondary-text);
  cursor: not-allowed;
  pointer-events: none;       /* disables clicks */
  opacity: 0.5;               /* subtle faded look */
  text-decoration: none;
}
.navbar__links .disabled-link:hover {
  color: var(--secondary-text);
}
  
/* Main content */
main { padding: 30px 0; margin-bottom: 40px; flex: 1 0 auto; }

/* Can be removed if all containers have text content */
main.container {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 80%;
}

.card {
  background-color: transparent;
  border-radius: 24px;
  box-shadow: 0 10px 30px var(--shadow-color);
  margin-bottom: 40px;
  padding: 30px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
}
.card:last-child { margin-bottom: 60px; }
.card:hover { transform: translateY(-6px); box-shadow: 0 15px 35px var(--shadow-color); }

.card h2 {
  font-size: 24px; font-weight: 500; margin-bottom: 20px;
  color: var(--primary-color);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  padding-bottom: 10px;
}
.card .content { padding: 10px 0; }

.card .content strong,
.card .content b {
  color: var(--primary-color);
  font-weight: 600;
}
/* Base link styling */
.card .content a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;                /* regular bold by default */
  transition: color 0.2s ease, font-weight 0.2s ease;
}

/* Hover or focus = slightly bolder and brighter */
.card .content a:hover,
.card .content a:focus {
  color: color-mix(in srgb, var(--primary-color) 85%, white 15%);
  font-weight: 750;                /* even bolder on hover */
}

/* Keep accessible focus ring for keyboard navigation */
.card .content a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 6px rgba(0,113,227,0.12);
  border-radius: 6px;
}

#research_topic .content p {
  text-align: justify;
  text-justify: inter-word;
}

#aboutme .content p {
  text-align: justify;
  text-justify: inter-word;
}

.s2a sup {
  font-size: 0.68em;
  vertical-align: 0.4em;
  line-height: 0;
}
  
.placeholder { color: #777; font-style: italic; }

/* CV entries */
.cv-entry {
  margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--border-color);
  animation: fade-in 0.6s ease-out;
}
.cv-entry:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

@keyframes fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0);  }
}

.cv-entry-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 12px; flex-wrap: wrap;
}
.cv-entry-title { flex: 1; min-width: 60%; }
.cv-entry-title h3 { font-size: 20px; font-weight: 500; margin-bottom: 4px; color: var(--text-color); }
.cv-entry-title h4 { font-size: 16px; font-weight: 400; color: var(--primary-color); margin-bottom: 2px; }

.cv-entry-meta {
  display: flex; flex-direction: column; align-items: flex-end;
  color: var(--secondary-text); font-size: 14px;
}
.cv-date { font-weight: 500; margin-bottom: 4px; }
.cv-location { display: flex; align-items: center; }

.cv-entry-content { margin-top: 10px; padding-left: 2px; }
.cv-entry-content p { margin-bottom: 8px; }
.cv-entry-content p:last-child { margin-bottom: 0; }
.cv-subheading { font-weight: 500; margin-top: 12px; margin-bottom: 6px; }

.cv-entry-content ul { list-style-type: none; padding-left: 16px; margin-bottom: 8px; }
.cv-entry-content ul li { position: relative; margin-bottom: 4px; padding-left: 15px; }
.cv-entry-content ul li::before { content: "•"; position: absolute; left: 0; color: var(--primary-color); }

.cv-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cv-item {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  row-gap: 10px;
  align-items: center;
  padding: 12px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(8px);
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.cv-item__main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cv-role {
  font-weight: 600;
  color: var(--text-color);
  font-size: 1.05rem;
}

.cv-company {
  font-weight: 500;
  color: var(--primary-color);
  letter-spacing: -0.01em;
}

.cv-item__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: right;
  color: var(--secondary-text);
  font-size: 0.92rem;
}

.cv-item__description {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.92rem;
  color: var(--secondary-text);
  line-height: 1.5;
}

.cv-item:focus-within {
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05));
  border-color: rgba(255, 255, 255, 0.26);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.36), 0 12px 26px rgba(0, 0, 0, 0.10);
}

@media (max-width: 720px) {
  .cv-item {
    grid-template-columns: 1fr;
  }
  .cv-item__meta {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    text-align: left;
    gap: 6px 16px;
  }

  .cv-item__description {
    grid-column: 1 / -1;
  }
}

@media (hover: hover) {
  .cv-item:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06));
    border-color: rgba(255, 255, 255, 0.26);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38), 0 10px 26px rgba(0, 0, 0, 0.08);
  }
}


/* Footer */
footer {
  padding: 30px 0; text-align: center; position: static; width: 100%;
  background: transparent; z-index: 10; margin-top: auto;
}

.social-links { display: flex; align-items: center; justify-content: center; }
.social-links a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px;
  color: var(--primary-color); text-decoration: none; margin: 0 10px;
  transition: transform 0.3s ease, color 0.3s ease;
}
.social-links a:hover { color: var(--primary-color); transform: scale(1.15); text-decoration: none; }
.social-links svg { width: 24px; height: 24px; vertical-align: top; }
.social-links a.email-icon { color: var(--primary-color); font-size: 28px; font-weight: bold; line-height: 1; position: relative; top: -2px; }

/* =========================
    Responsive tweaks
    ========================= */
@media (max-width: 768px) {
  header { padding: 60px 0 30px; }
  .profile-container { flex-direction: column-reverse; gap: 20px; }
  .profile-info { text-align: center; }
  .profile-info h1 { font-size: 36px; }
  .profile-info .title { font-size: 20px; }

  .header-container {
    flex-direction: column; 
    gap: 20px;
  }
  .navbar {
    margin-top: 10px;
    width: auto; /* Allow it to shrink to fit content */
    display: flex;
    justify-content: center;
  }

  .card { padding: 20px; }
  body { padding-bottom: 180px; }
  .cv-entry-header { flex-direction: column; align-items: flex-start; }
  .cv-entry-meta {
    flex-direction: row; align-items: center; margin-top: 8px; width: 100%;
  }
  .cv-date { margin-bottom: 0; margin-right: 8px; }
}
