/* === Color Theme === */
:root {
  --bg: #080b16;
  --panel: #00061c;
  --text: #e8ebff;
  --muted: #a9b1d6;
  --accent: #7aa2f7;
  --chip: #1b254b;
  --link: #8bd5ff;

  --bgL: #ffffff;
  --panelL: #f7f8fb;
  --textL: #0b1020;
  --mutedL: #4b5879;
  --accentL: #2b59ff;
  --chipL: #eef2ff;
  --linkL: #0b6bcb;
}

html {
  color-scheme: light dark;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

body.light {
  background: var(--bgL);
  color: var(--textL);
}

/* === Layout === */
.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 20px 80px;
}

/* === Header === */
header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  margin-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar {
  width: 170px;
  height: 160px;
  border-radius: 100px;
  overflow: hidden;
  box-shadow: 0 8px 24px #00000055;
  border: 1px solid #2a3460;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.name {
  font-size: clamp(24px, 3.6vw, 36px);
  font-weight: 800;
  line-height: 1.1;
}

.title {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 500;
}

/* === Navigation === */
nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.chip {
  padding: 8px 12px;
  background: var(--chip);
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
}

.chip:hover {
  background: #1e2a50;
  transform: translateY(-2px);
}

body.light .chip {
  background: var(--chipL);
  color: var(--textL);
}

/* === Panels === */
.panel {
  background: linear-gradient(180deg, var(--panel), color-mix(in oklch, var(--panel) 88%, black));
  border: 1px solid #2a3460;
  padding: 22px;
  border-radius: 10px;
  box-shadow: 0 10px 30px #00000040;
}

body.light .panel {
  background: var(--panelL);
  border: 1px solid #e6e9f5;
  box-shadow: 0 10px 30px #0b102009;
}

/* === Grid === */
.grid {
  display: grid;
  gap: 16px;
}

@media (min-width: 900px) {
  .grid.cols-2 {
    grid-template-columns: 1.2fr .8fr;
  }
}

/* === Typography === */
h2 {
  font-size: clamp(18px, 2.2vw, 22px);
  margin: 0 0 8px;
  letter-spacing: .3px;
}

.muted {
  color: var(--muted);
}

a {
  color: var(--link);
  text-decoration: none;
}

body.light a {
  color: var(--linkL);
}

a:hover {
  text-decoration: underline;
}

/* === Contact === */
.contact {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.contact a,
.contact span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px dashed #34406b;
  font-size: 0.95rem;
}

body.light .contact a,
body.light .contact span {
  border-color: #d8def3;
}

/* === List Items === */
.list {
  display: grid;
  gap: 5px;
}

.item {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #2a3460;
  background: #0c1535;
  transition: transform .2s ease, box-shadow .2s ease;
  opacity: 0;
  transform: translateY(8px);
}

.item.reveal {
  opacity: 1;
  transform: none;
}

.item:hover {
  box-shadow: 0 12px 24px #00000055;
}

body.light .item {
  border-color: #e6e9f5;
  background: #ffffff;
}

/* === Publications Scroll === */
#pubScroller {
  max-height: 600px;
  overflow-y: auto;
  padding-right: 6px;
  scroll-behavior: smooth;
}

#pubScroller::-webkit-scrollbar {
  width: 10px;
}

#pubScroller::-webkit-scrollbar-thumb {
  background: #7aa2f7;
  border-radius: 999px;
}

/* === Filter Buttons === */
.pub-type-switch {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.switch {
  border: 1px solid #2a3460;
  background: transparent;
  padding: 6px 10px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}

.switch:hover {
  background: #1e2a50;
}

body.light .switch {
  border-color: #dfe5fb;
}

.switch.active {
  background: var(--accent);
  color: white;
  border-color: transparent;
}

/* === Tags === */
.tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #2a3460;
  margin-right: 8px;
}

body.light .tag {
  border-color: #e6e9f5;
}

/* === Search === */
.srch {
  display: flex;
  gap: 8px;
  align-items: center;
}

.srch input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #2a3460;
  background: transparent;
  color: inherit;
  margin-right: 10px;
}

body.light .srch input {
  border-color: #dfe5fb;
}

/* === Footer === */
.footer {
  margin-top: 30px;
  color: var(--muted);
  font-size: 14px;
  display: flex;
  flex-direction: column;
  /* stack items vertically */
  justify-content: center;
  /* center vertically in case it grows */
  align-items: center;
  /* center horizontally */
  text-align: center;
  gap: 6px;
  /* space between lines */
}

.kbd {
  font-family: "JetBrains Mono", monospace;
  border: 1px solid currentColor;
  border-radius: 6px;
  padding: 0 6px;
  font-size: 12px;
}

/* === Timeline === */
.timeline {
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(#3b82f6, #7aa2f7);
  opacity: .6;
}

.t-item {
  position: relative;
}

.t-item::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 18px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #7aa2f7;
  box-shadow: 0 0 0 4px #89b4fa40;
}

/* === Publication Details === */
.pub-details {
  margin-top: 12px;
  padding: 16px;
  background: rgba(20, 25, 50, 0.4);
  border: 1px solid #2a3460;
  border-radius: 12px;
  border-left: 3px solid var(--accent);
  display: none;
}

.pub-details.visible {
  display: block;
}

.pub-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.pub-details-grid img.ga {
  width: 100%;
  border-radius: 6px;
  height: 300px;
}

.pub-details.collapsed {
  display: none;
}

.ga {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #2a3460;
  background: #0c1535;
  aspect-ratio: 4/3;
  display: grid;
  place-items: center;
}

.bib {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  line-height: 1.4;
  white-space: pre-wrap;
  overflow: auto;
  max-height: 200px;
  border: 1px dashed #2a3460;
  padding: 10px;
  margin-top: 10px;
  border-radius: 8px;
  background: #0a0f20;

  text-align: left;
  text-indent: 0;
  margin-left: 0;
}



.pub-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.btn {
  border: 1px solid #2a3460;
  background: transparent;
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}

.btn:hover {
  background: #1e2a50;
}

body.light .btn {
  border-color: #dfe5fb;
}

.btn.primary {
  background: var(--accent);
  color: white;
  border-color: transparent;
}

/* === Reveal Animation === */
.reveal {
  animation: fadeUp .5s ease forwards;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* === Print === */
@media print {

  nav,
  .footer,
  #pubControls {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .panel,
  .item {
    box-shadow: none;
    background: white;
    border: 1px solid #ccc;
  }

  .wrap {
    padding: 0;
  }
}

#pubScroller {
  max-height: 600px;
  overflow-y: auto;
}

/* /* -------------------- */
.two-column-container {
  display: flex;
  gap: 20px;
  /* space between columns */
  flex-wrap: wrap;
  /* allows stacking on small screens */
}

.two-column-container .column {
  flex: 1 1 45%;
  min-width: 300px;
  background: #00061c;
  padding: 16px;
  border-radius: 8px;
  /* max-height: 350px; */
  /* overflow-y: auto; */
  border: 0.04px solid #3d3b3b;
  /* white edge */
}



#experience .timeline.list {
  /* max-height: 300px; */
  overflow-y: auto;
  padding-top: 15px;
  padding-bottom: 15px;
  padding-right: 8px;
  box-sizing: border-box;
  flex: 2 1 45%;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.2);
}

#insights .timeline.list {
  max-height: 550px;
  overflow-y: auto;
  padding-top: 15px;
  padding-bottom: 15px;
  padding-right: 8px;
  box-sizing: border-box;
  flex: 1 1 35%;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.2);
}



.two-column-container h2 {
  margin-top: 0;
}

/* Optional: smooth scrollbar styling */
.two-column-container .column::-webkit-scrollbar {
  width: 8px;
}

.two-column-container .column::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}


/* Webkit browsers (Chrome, Edge, Safari) */
.two-column-container .column::-webkit-scrollbar {
  width: 8px;
  /* width of the scrollbar */
}

.two-column-container .column::-webkit-scrollbar-thumb {
  background-color: rgba(59, 130, 246, 0.6);
  /* blue-ish thumb */
  border-radius: 4px;
  /* rounded edges */
}

.two-column-container .column::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  /* subtle track */
}

/* Firefox */
.two-column-container .column {
  scrollbar-width: thin;
  scrollbar-color: rgba(59, 130, 246, 0.6) rgba(255, 255, 255, 0.05);
  /* thumb track */
}


#pubScroller {
  max-height: 600px;
  overflow-y: auto;
  margin-top: 10px;
  padding-right: 8px;
  scrollbar-width: thin;
  /* Firefox */
  scrollbar-color: rgba(59, 130, 246, 0.6) rgba(255, 255, 255, 0.05);
  /* thumb track for Firefox */
}

/* Webkit browsers (Chrome, Edge, Safari) */
#pubScroller::-webkit-scrollbar {
  width: 8px;
}

#pubScroller::-webkit-scrollbar-thumb {
  background-color: rgba(59, 130, 246, 0.6);
  /* blue thumb */
  border-radius: 4px;
}

#pubScroller::-webkit-scrollbar-thumb:hover {
  background-color: rgba(59, 130, 246, 0.8);
  /* darker on hover */
}

#pubScroller::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  /* subtle track */
}


.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
  background: #0f1327;
  margin: 10% auto;
  padding: 20px;
  width: 60%;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

.close {
  float: right;
  font-size: 20px;
  cursor: pointer;
}