

@import url('https://fonts.googleapis.com/css2?family=Roboto+Flex:opsz,slnt,wdth,wght,YTUC,YTAS,YTDE,XTRA,GRAD@8..144,-10..0,25..151,100..900,528..760,649..854,-305..-98,323..603,-200..150&display=swap');

/* ============================================================
   CSS VARIABLES — Light & Dark themes
   ============================================================ */
:root {
  --accent: #0b76a0;
  --accent-hover: #095f80;
  --sidebar-w: clamp(260px, 37vw, 480px);
  --page-margin: clamp(1rem, 2.5vw, 4rem);

  /* Light mode */
  --bg: #fafafa;
  --surface: #ffffff;
  --sidebar-bg: var(--bg);
  --text: #1a1a1a;
  --text-muted: #555;
  --border: #e0e0e0;
  --nav-bg: var(--bg);
  --nav-shadow: none;
  --badge-review-bg: #f3e8ff;
  --badge-review-color: #7c3aed;
}

html.dark body {
  -webkit-font-smoothing: antialiased;
}

html.dark .pub-link:hover {
  background: #f2c41fd3;
  border-color: #f2c41fd3;
}

html.dark {
  --accent: #3a9fc4;
  --accent-hover: #57afcf;
  --bg: #111214;
  --surface: #1a1c1f;
  --sidebar-bg: var(--bg);
  --text: #e8e8e8;
  --text-muted: #9a9a9a;
  --border: #2c2e33;
  --nav-bg: var(--bg);
  --nav-shadow: none;
  --badge-review-bg: #2d1f47;
  --badge-review-color: #c084fc;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--accent) 95%, transparent); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--accent) 95%, transparent); }
* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--accent) 60%, transparent) transparent; }

html {
  scroll-behavior: smooth;
  font-size: 90%;
}

body {
  font-family: 'Roboto Flex', sans-serif;
  font-weight: 300;
  font-variation-settings: 'wdth' 113, 'YTUC' 800, 'YTAS' 780, 'YTDE' -290, 'XTRA'477;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding-top: 52px;
  display: flex;
  flex-direction: column;
}

html.transitioning *,
html.transitioning *::before,
html.transitioning *::after {
  transition: background 0.25s, color 0.25s, border-color 0.25s, box-shadow 0.25s !important;
}

strong, b {
  font-family: 'Roboto Flex', sans-serif;
  font-weight: 500;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-right: auto;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: background 0.15s;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2rem;
  padding: 0 2rem;
  height: 52px;
  background: var(--nav-bg);
  border-bottom: none;
  box-shadow: var(--nav-shadow);
}

.nav-name {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.01em;
  margin-right: auto;
}

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

.nav-link {
  font-family: 'Roboto Flex', sans-serif;
  font-size: 1rem;
  color: var(--text-muted);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  text-decoration: none;
}

.theme-toggle {
  background: none;
  border: none;
  border-radius: 20px;
  padding: 4px 10px;
  cursor: pointer;
  font-size: 1rem;
  color: #f5c41a;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  gap: 4px;
  transition: border-color 0.2s, background 0.2s;
  line-height: 1;
}

.theme-toggle:hover {
  border-color: var(--accent);
}


.theme-toggle .toggle-img,
.theme-toggle .icon-sun {
  transition: transform 0.2s;
  display: inline-block;
}

.theme-toggle:hover .toggle-img,
.theme-toggle:hover .icon-sun {
  transform: scale(1.25);
}

/* show/hide sun vs star based on mode */
html.light .icon-star { display: none; }
html.dark  .icon-sun  { display: none; }

.theme-toggle .icon-sun,
.theme-toggle .toggle-img {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  object-fit: contain;
  position: relative;
  top: -3.5px;
}

.theme-toggle .icon-sun {
  width: 22px;
  height: 22px;
}

.theme-toggle .toggle-img {
  width: 28px;
  height: 28px;
}

/* ============================================================
   LAYOUT — sticky sidebar + scrollable content
   ============================================================ */
.layout {
  display: flex;
  flex: 1;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.profile-photo-wrap {
  position: relative;
  width: 100%;
  max-width: 260px;
}

.profile-photo-wrap .profile-photo {
  width: 100%;
  max-width: 260px;
  display: block;
  border-radius: 5px;
  transition: opacity 0.05s 0.3s;
}

.profile-photo-hover {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
}

.profile-photo-wrap:hover .profile-photo-default {
  opacity: 0;
}

.profile-photo-wrap:hover .profile-photo-hover {
  opacity: 1;
}
.sidebar {
  position: fixed;
  top: 52px;
  left: 0;
  height: calc(100vh - 52px);
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: none;
  padding: 3.2rem 1rem 2rem var(--page-margin);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1.5rem;
  overflow-y: hidden;
  z-index: 10;
}

.sidebar-card {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: 100%;
}

.profile-photo {
  width: 100%;
  max-width: 260px;
  height: auto;
  display: block;
  border-radius: 5px;
}

.sidebar-info {
  text-align: center;
  width: 260px;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 1.2rem;
}

.sidebar-name {
  font-size: 1.55rem;
  font-family: 'Roboto Flex', sans-serif;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.01em;
}

.sidebar-status {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.sidebar-email {
  font-size: 0.95rem;
  color: var(--accent);
  word-break: break-all;
}

.sidebar-email:hover {
  color: var(--accent);
}

.sidebar-deco {
  width: 100%;
  max-width: 294px;
  height: auto;
  margin-top: 0.6rem;
}

/* Icon links row */
.sidebar-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  width: 260px;
  gap: 0rem;
  margin-top: 0.8rem;
}

.icon-link {
  display: inline-flex;
  align-items: flex-end;
  gap: 6px;
  color: var(--text-muted);
  font-size: 1.18rem;
  padding: 8px 10px;
  border-radius: 6px;
  border: none;
  text-decoration: none;
  transition: color 0.15s, transform 0.15s;
}

.icon-link span {
  font-size: 1rem;
  font-family: 'Roboto Flex', sans-serif;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.icon-link:hover {
  color: var(--accent);
  background: transparent;
  text-decoration: none;
  transform: scale(1.08);
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.content {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 3rem calc(var(--sidebar-w) - 260px - 0.5rem) 3rem var(--page-margin);
  max-width: none;
  overflow-y: visible;
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
  margin-bottom: 3.5rem;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 1.2rem;
  display: block;
  letter-spacing: 0.01em;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

/* Intro */
.section p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 0.8rem;
}

.interest-list {
  padding-left: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.interest-list li {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-muted);
}

/* News */
.news-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.news-list li {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  font-size: 1rem;
  line-height: 1.6;
}

.news-date {
  font-size: 0.95rem;
  font-weight: 380;
  color: var(--text-muted);
  min-width: 80px;
  white-space: nowrap;
}

.news-text {
  color: var(--text);
}

/* Publications */
.pub-item {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.cocolab-icon {
  height: 1.13em;
  width: auto;
  vertical-align: middle;
  margin-left: 4px;
  margin-right: 4px;
  position: relative;
  top: -2px;
  transition: transform 0.2s;
}

a:hover .cocolab-icon {
  transform: scale(1.1);
}

.katfishnet-icon {
  height: 1.13em;
  width: auto;
  vertical-align: middle;
  margin-left: 4px;
  margin-right: 4px;
  position: relative;
  top: -2px;
  transition: transform 0.2s;
}

a:hover .katfishnet-icon {
  transform: scale(1.1);
}

.bio-highlight {
  font-weight: 500;
}

.dark .bio-highlight {
  font-weight: 600;
}

.pub-thumb {
  width: 160px;
  min-width: 160px;
  border-radius: 4px;
  object-fit: cover;
  margin-top: 0.5rem;
  box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.15);
}


.pub-item:hover .pub-thumb {
  transform: scale(1.1);
}

.pub-item:hover .pub-title,
.pub-item:hover .pub-title a {
  color: var(--accent) !important;
  text-decoration: underline;
}

.pub-body {
  flex: 1;
}


.pub-title {
  font-size: 1rem;
  font-family: 'Roboto Flex', sans-serif;
  font-weight: 500;
  color: var(--text) !important;
  line-height: 1.45;
  margin-bottom: 0.25rem !important;
}

.pub-title a {
  color: var(--text);
  text-decoration: none;
}

.pub-title a:hover {
  text-decoration: underline;
  color: var(--accent);
}

.pub-venue {
  display: block;
  font-size: 1rem;
  font-weight: 300;
  color: var(--text) !important;
  margin-bottom: 0.5rem;
}

.pub-venue em {
  font-style: normal;
  font-variation-settings: 'wdth' 113, 'YTUC' 800, 'YTAS' 780, 'YTDE' -290, 'XTRA' 477, 'slnt' -10;
}

.section .pub-authors {
  font-size: 1rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 0.25rem !important;
}

.section .pub-authors .pub-self {
  color: var(--text) !important;
  font-weight: 380;
}

.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.pub-link {
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--text-muted);
  border: 0.8px solid var(--text-muted);
  border-radius: 1px;
  padding: 2px 7px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.pub-link:hover {
  background: #f5c41a;
  border-color: #f5c41a;
  color: var(--bg);
  text-decoration: none;
}

.badge {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 2px 9px;
  border-radius: 4px;
}

.badge-review {
  background: var(--badge-review-bg);
  color: var(--badge-review-color);
}

/* Awards */
.award-group-label {
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.6rem !important;
  margin-top: 1rem;
}

.award-item {
  margin-bottom: 1.2rem;
}

.award-item:last-child {
  margin-bottom: 0;
}

.award-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.award-instructor {
  font-size: 1rem;
  font-weight: 300;
  color: var(--text-muted);
  margin-left: 0.2rem;
}

.award-instructor a {
  font-weight: 300;
  color: var(--text-muted);
}

.award-instructor a:hover {
  color: var(--accent);
}

.award-name {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
}

.award-name a {
  color: var(--text);
  font-weight: 500;
}

.award-name a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.award-name a:hover .award-org {
  color: var(--accent-hover);
}

.award-org {
  font-weight: 300;
  color: var(--text-muted);
}

.award-date {
  font-size: 1rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.award-detail {
  font-size: 1rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.55;
  padding-left: 1.2rem;
  margin-top: 0.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.award-detail a {
  font-weight: 300;
}

.experience-blurb a {
  color: var(--text);
}

.experience-blurb a:hover {
  color: var(--accent);
}

.experience-blurb {
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.65;
  margin-top: 0.4rem;
  font-style: normal;
  font-variation-settings: 'wdth' 113, 'YTUC' 800, 'YTAS' 780, 'YTDE' -290, 'XTRA' 477, 'slnt' -10;
}

.joke-reveal {
  display: inline-block;
  position: relative;
  cursor: default;
  vertical-align: middle;
  top: -3px;
  margin-left: 0.4rem;
}

.joke-hint {
  display: inline-block;
  font-size: 0.8rem;
  color: #fff;
  background: #0b76a0d7;
  border: 1px #0b76a0be;
  border-radius: 2px;
  padding: 1px 8px;
  transition: opacity 0.3s;
}

.joke-answer {
  display: inline-block;
  opacity: 0;
  position: absolute;
  left: 0;
  top: 1.7px;
  white-space: nowrap;
  color: var(--text);
  font-weight: 500;
  font-variation-settings: 'wdth' 113, 'YTUC' 800, 'YTAS' 780, 'YTDE' -290, 'XTRA' 477;
  transition: opacity 0.3s;
  pointer-events: none;
}

.joke-reveal:hover .joke-hint {
  opacity: 0;
}

.joke-reveal:hover .joke-answer {
  opacity: 1;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 0.6rem 2rem 0.6rem calc(var(--sidebar-w) + 3.5rem);
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 20;
}

.site-footer .footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
}

.site-footer img {
  height: 20px;
  width: auto;
}

.site-footer .footer-signature-night {
  display: none;
}

html.dark .site-footer .footer-signature-day {
  display: none;
}

html.dark .site-footer .footer-signature-night {
  display: inline;
}

/* ============================================================
   BLOG PAGE
   ============================================================ */
.blog-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  gap: 1rem;
  text-align: center;
}

.blog-placeholder h2 {
  font-size: 1.6rem;
  color: var(--text);
}

.blog-placeholder p {
  font-size: 1rem;
  color: var(--text-muted);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  ::-webkit-scrollbar { width: 15px; }
  * { scrollbar-width: auto; }

  .hamburger {
    display: flex;
  }

  .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 52px;
    left: 0;
    width: 100%;
    background: var(--nav-bg);
    padding: 0 2rem;
    gap: 1rem;
    z-index: 99;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out, padding 0.3s ease-in-out;
  }

  .nav-links.open {
    max-height: 400px;
    padding: 1rem 2rem;
  }

  .layout {
    flex-direction: column;
    transition: margin-top 0.3s ease-in-out;
  }

  body.nav-open .layout {
    margin-top: var(--nav-menu-height, 0px);
  }

  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    min-width: unset;
    border-right: none;
    border-bottom: 1px solid transparent;
    padding: 2rem 1.5rem;
    gap: 1rem;
    z-index: auto;
    align-items: center;
  }

  .sidebar-card {
    align-items: center;
  }

  .sidebar-info {
    text-align: center;
  }

  .sidebar-links {
    justify-content: center;
  }

  .content {
    margin-left: 0;
  }

  .site-footer {
    padding: 0.6rem 1.25rem;
  }

  .sidebar-name {
    font-size: 1.55rem;
  }

  .sidebar-status {
    font-size: 1rem;
  }

  .sidebar-email {
    font-size: 0.95rem;
  }

  .icon-link {
    font-size: 1.35rem;
    padding: 8px 10px;
  }

  .icon-link span {
    font-size: 1rem;
  }

  .content {
    padding: 2rem 1.25rem;
    max-width: 100%;
  }

  .section-title {
    font-size: 1.1rem;
  }

  .pub-title {
    font-size: 0.95rem;
  }

  .award-header {
    flex-direction: column;
    gap: 0.2rem;
  }

  #awards .award-instructor {
    margin-left: 0;
  }

  #awards .award-instructor {
    display: block;
  }
}

@media (max-width: 480px) {
  .navbar {
    padding: 0 1rem;
    gap: 1rem;
  }

  .nav-name {
    font-size: 0.9rem;
  }

  .sidebar {
    padding: 1.5rem 1rem;
  }

  .profile-photo {
    max-width: 260px;
  }

  .content {
    padding: 1.5rem 1rem;
  }

  /* Wider scrollbar on phone */
  ::-webkit-scrollbar { width: 15px; }
  * { scrollbar-width: auto; }

  .pub-thumb {
    display: none;
  }

  .pub-item a:has(.pub-thumb) {
    display: none;
  }
}
