/* =========================================================
   DESIGN TOKENS
   ========================================================= */

:root {

  /* -------------------------------------------------------
     PAPER / BACKGROUND
     ------------------------------------------------------- */

  --paper: #f3f8ff;
  --paper-raised: #ffffff;

  /* -------------------------------------------------------
     TEXT
     ------------------------------------------------------- */

  --ink: #07152f;
  --ink-muted: #31527d;
  --ink-faint: #5f7fa8;

  /* -------------------------------------------------------
     ELECTRIC BLUE
     ------------------------------------------------------- */

  --accent: #1264ff;
  --accent-bright: #00aaff;
  --accent-soft: #e5f1ff;

  /* -------------------------------------------------------
     NEON CYAN
     ------------------------------------------------------- */

  --accent2: #00cfe8;
  --accent2-bright: #00f0ff;
  --accent2-soft: #e2fbff;

  /* -------------------------------------------------------
     BLUE-VIOLET
     ------------------------------------------------------- */

  --accent3: #6366f1;
  --accent3-soft: #eceeff;

  /* -------------------------------------------------------
     BORDERS
     ------------------------------------------------------- */

  --border: #b9d2f2;

  /* -------------------------------------------------------
     HIGHLIGHT
     ------------------------------------------------------- */

  --mark: #cfe8ff;

  /* -------------------------------------------------------
     COLOR SCHEME
     ------------------------------------------------------- */

  color-scheme: light;
}


/* =========================================================
   DARK THEME
   ========================================================= */

@media (prefers-color-scheme: dark) {

  :root:not([data-theme="light"]) {

    --paper: #020817;
    --paper-raised: #061329;

    /* TEXT */

    --ink: #f2f8ff;
    --ink-muted: #b4ccec;
    --ink-faint: #7195c4;

    /* ELECTRIC BLUE */

    --accent: #1683ff;
    --accent-bright: #00baff;
    --accent-soft: #09264d;

    /* NEON CYAN */

    --accent2: #00cfe8;
    --accent2-bright: #00efff;
    --accent2-soft: #062f3a;

    /* BLUE-VIOLET */

    --accent3: #8b9cff;
    --accent3-soft: #151d48;

    /* BORDERS */

    --border: #17467d;

    /* HIGHLIGHT */

    --mark: #123d70;

    color-scheme: dark;
  }
}


/* =========================================================
   FORCED DARK THEME
   ========================================================= */

:root[data-theme="dark"] {

  --paper: #020817;
  --paper-raised: #061329;

  /* TEXT */

  --ink: #f2f8ff;
  --ink-muted: #f2f8ff;
  --ink-faint: #f2f8ff;

  /* ELECTRIC BLUE */

  --accent: #1683ff;
  --accent-bright: #00baff;
  --accent-soft: #09264d;

  /* NEON CYAN */

  --accent2: #00cfe8;
  --accent2-bright: #00efff;
  --accent2-soft: #062f3a;

  /* BLUE-VIOLET */

  --accent3: #8b9cff;
  --accent3-soft: #151d48;

  /* BORDERS */

  --border: #17467d;

  /* HIGHLIGHT */

  --mark: #123d70;

  color-scheme: dark;
}


/* =========================================================
   BASE
   ========================================================= */

* {
  box-sizing: border-box;
}

html {
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;

  background:
    radial-gradient(
      circle at 85% 5%,
      color-mix(
        in srgb,
        var(--accent) 18%,
        transparent
      ),
      transparent 30rem
    ),
    radial-gradient(
      circle at 15% 35%,
      color-mix(
        in srgb,
        var(--accent2) 7%,
        transparent
      ),
      transparent 25rem
    ),
    radial-gradient(
      circle at 10% 90%,
      color-mix(
        in srgb,
        var(--accent-bright) 9%,
        transparent
      ),
      transparent 28rem
    ),
    var(--paper);

  color: var(--ink);

  font-family:
    'Source Serif 4',
    Georgia,
    'Iowan Old Style',
    serif;

  font-size: 17px;
  line-height: 1.65;
}

h1,
h2,
h3,
.display {
  font-family:
    'Fraunces',
    Georgia,
    serif;

  font-weight: 500;
  text-wrap: balance;
  color: var(--ink);
}

.mono {
  font-family:
    'IBM Plex Mono',
    'SFMono-Regular',
    Consolas,
    monospace;

  font-variant-numeric: tabular-nums;
}


/* =========================================================
   LINKS
   ========================================================= */

a {
  color: var(--accent);

  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    text-shadow 0.2s ease;
}

a:hover {
  color: var(--accent-bright);

  text-shadow:
    0 0 8px
    color-mix(
      in srgb,
      var(--accent-bright) 40%,
      transparent
    );
}


/* =========================================================
   ACCESSIBILITY / FOCUS
   ========================================================= */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline:
    2px solid
    var(--accent-bright);

  outline-offset: 3px;
}


/* =========================================================
   BANNER
   ========================================================= */

.banner {
  background:
    linear-gradient(
      90deg,
      var(--accent-soft),
      color-mix(
        in srgb,
        var(--accent2-soft) 55%,
        var(--accent-soft)
      ),
      var(--accent-soft)
    );

  border-bottom:
    1px solid
    color-mix(
      in srgb,
      var(--accent) 32%,
      var(--border)
    );

  color: var(--ink-muted);

  font-family:
    'IBM Plex Mono',
    monospace;

  font-size: 0.78rem;
  letter-spacing: 0.02em;
  text-align: center;

  padding: 0.55rem 1rem;
}

.banner strong {
  color: var(--accent-bright);

  text-shadow:
    0 0 8px
    color-mix(
      in srgb,
      var(--accent-bright) 45%,
      transparent
    ),
    0 0 20px
    color-mix(
      in srgb,
      var(--accent) 20%,
      transparent
    );
}


/* =========================================================
   HEADER / NAVIGATION
   ========================================================= */

header.site {
  position: sticky;
  top: 0;
  z-index: 20;

  background:
    color-mix(
      in srgb,
      var(--paper) 84%,
      transparent
    );

  backdrop-filter: blur(12px);

  border-bottom:
    1px solid
    color-mix(
      in srgb,
      var(--accent) 24%,
      var(--border)
    );
}

.bar {
  max-width: 1400px;
  margin: 0 auto;

  padding:
    0.75rem
    1.5rem;

  display: flex;
  align-items: center;

  gap: 1.45rem;
  flex-wrap: wrap;
}


/* =========================================================
   BRAND
   ========================================================= */

.brand {
  font-family:
    'Fraunces',
    serif;

  font-weight: 700;
  font-size: 1.2rem;

  text-decoration: none;
  color: var(--ink);

  transition:
    color 0.2s ease,
    text-shadow 0.2s ease;
}

.brand:hover {
  color: var(--accent-bright);

  text-shadow:
    0 0 10px
    color-mix(
      in srgb,
      var(--accent-bright) 40%,
      transparent
    );
}


/* =========================================================
   PRIMARY NAV
   ========================================================= */

nav.primary ul {
  list-style: none;

  display: flex;
  gap: 1.35rem;

  margin: 0;
  padding: 0;

  flex-wrap: wrap;
}

nav.primary a {
  font-family:
    'IBM Plex Mono',
    monospace;

  font-size: 0.95rem;
  letter-spacing: 0.04em;

  text-transform: uppercase;
  text-decoration: none;

  color: var(--ink-muted);

  padding-bottom: 3px;

  border-bottom:
    1px solid
    transparent;
}

nav.primary a:hover,
nav.primary a[aria-current="page"] {
  color: var(--accent-bright);

  border-bottom-color:
    var(--accent-bright);

  text-shadow:
    0 0 8px
    color-mix(
      in srgb,
      var(--accent-bright) 55%,
      transparent
    ),
    0 0 18px
    color-mix(
      in srgb,
      var(--accent) 30%,
      transparent
    );
}


/* =========================================================
   ACADEMIC PROFILE BUTTONS
   ========================================================= */

.academic-profiles {
  margin-left: auto;

  display: flex;
  align-items: center;

  gap: 0.35rem;

  flex-wrap: nowrap;
}


/* =========================================================
   INDIVIDUAL PROFILE BUTTON
   ========================================================= */

.academic-profile {
  width: 42px;
  height: 42px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 42px;

  text-decoration: none;
  color: var(--accent-bright);

  background:
    color-mix(
      in srgb,
      var(--paper-raised) 72%,
      transparent
    );

  border:
    1px solid
    color-mix(
      in srgb,
      var(--accent) 55%,
      var(--border)
    );

  border-radius: 7px;

  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}


/* =========================================================
   PROFILE ICON
   ========================================================= */

.academic-profile i {
  font-size: 1.5rem;
  line-height: 1;

  color: var(--accent-bright);

  transition:
    color 0.2s ease,
    filter 0.2s ease,
    transform 0.2s ease;
}


/* =========================================================
   PROFILE HOVER
   ========================================================= */

.academic-profile:hover {
  color: var(--accent-bright);

  border-color:
    var(--accent-bright);

  background:
    color-mix(
      in srgb,
      var(--accent-soft) 75%,
      var(--paper-raised)
    );

  box-shadow:
    0 0 8px
    color-mix(
      in srgb,
      var(--accent) 45%,
      transparent
    ),
    0 0 18px
    color-mix(
      in srgb,
      var(--accent-bright) 28%,
      transparent
    );

  transform: translateY(-1px);

  text-shadow: none;
}


/* =========================================================
   PROFILE ICON HOVER
   ========================================================= */

.academic-profile:hover i {
  color: var(--accent-bright);

  filter:
    drop-shadow(
      0 0 5px
      color-mix(
        in srgb,
        var(--accent-bright) 65%,
        transparent
      )
    );

  transform: scale(1.08);
}


/* =========================================================
   CV — FIRST BUTTON
   Disabled: all academic profile buttons now share
   the same appearance.
   ========================================================= */

/*
.academic-profile:first-child {
  border-color:
    color-mix(
      in srgb,
      var(--accent-bright) 65%,
      var(--border)
    );

  background:
    color-mix(
      in srgb,
      var(--accent-soft) 70%,
      var(--paper-raised)
    );
}

.academic-profile:first-child:hover {
  border-color:
    var(--accent-bright);

  box-shadow:
    0 0 10px
    color-mix(
      in srgb,
      var(--accent-bright) 50%,
      transparent
    ),
    0 0 24px
    color-mix(
      in srgb,
      var(--accent) 30%,
      transparent
    );
}
*/



/* =========================================================
   HEADER CONTROLS
   ========================================================= */

.controls {
  display: flex;
  align-items: center;

  gap: 0.5rem;

  flex-shrink: 0;
}


/* =========================================================
   LANGUAGE BUTTONS
   ========================================================= */

/* =====================================================
   LANGUAGE SWITCHER
   ===================================================== */

.language-switcher {

  display: inline-flex;

  align-items: center;

  justify-content: center;

  height: 34px;

  min-width: 72px;

  padding: 0;

  border: 1px solid var(--border);

  border-radius: 5px;

  overflow: hidden;

  background: var(--paper);

  box-sizing: border-box;

  /* Neon border */
  /* box-shadow:
    0 0 4px
    color-mix(
      in srgb,
      var(--accent-bright) 65%,
      transparent
    ),
    0 0 10px
    color-mix(
      in srgb,
      var(--accent) 35%,
      transparent
    ),
    inset 0 0 5px
    color-mix(
      in srgb,
      var(--accent) 12%,
      transparent
    );

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease; */

}


/* =====================================================
   LANGUAGE OPTIONS
   ===================================================== */

/* .language-option {

  display: flex;

  align-items: center;

  justify-content: center;

  height: 100%;

  flex: 1;

  padding: 0 9px;

  color: var(--ink-faint) !important;

  text-decoration: none !important;

  font-family:
    'IBM Plex Mono',
    monospace;

  font-size: 0.78rem;

  font-weight: 500;

  line-height: 1;

  text-shadow: none;

  border: 1px solid transparent;

  border-radius: 5px;

  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    text-shadow 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
} */


.language-option {

  display: flex;

  align-items: center;

  justify-content: center;

  height: 100%;

  flex: 1;

  padding: 0 9px;

  color: var(--ink-faint) !important;

  text-decoration: none !important;

  font-family:
    'IBM Plex Mono',
    monospace;

  font-size: 0.78rem;

  font-weight: 500;

  line-height: 1;

  text-shadow: none;

  border: 1px solid transparent;

  border-radius: 5px;

  position: relative;

  z-index: 1;

  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    text-shadow 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}



/* =====================================================
   ACTIVE LANGUAGE
   Keep it subtle — no glow
   ===================================================== */

/* .language-option.active {

  color: var(--accent-bright) !important;

  background:
    color-mix(
      in srgb,
      var(--accent) 8%,
      transparent
    );

  text-shadow: none;

  box-shadow: none;

} */

.language-option.active {

  color: var(--accent-bright) !important;

  background:
    color-mix(
      in srgb,
      var(--accent) 16%,
      var(--paper)
    );

  text-shadow: none;

  box-shadow:
    inset 0 0 8px
    color-mix(
      in srgb,
      var(--accent) 18%,
      transparent
    );

}


/* =====================================================
   ACTIVE ENGLISH
   Rounded on the outside,
   sharp toward the divider
   ===================================================== */

.language-option.active:first-child {

  border-radius:
    5px
    0
    0
    5px;

}


/* =====================================================
   ACTIVE PORTUGUESE
   Sharp toward the divider,
   rounded on the outside
   ===================================================== */

.language-option.active:last-child {

  border-radius:
    0
    5px
    5px
    0;

}



/* =====================================================
   HOVER — ANY LANGUAGE
   The hovered half behaves like the other buttons
   ===================================================== */

.language-option:hover {

  color: var(--accent-bright) !important;

  border-color:
    var(--accent-bright);

  background:
    color-mix(
      in srgb,
      var(--accent-soft) 75%,
      var(--paper-raised)
    );

  box-shadow:
    0 0 10px
    color-mix(
      in srgb,
      var(--accent) 40%,
      transparent
    ),
    0 0 22px
    color-mix(
      in srgb,
      var(--accent-bright) 20%,
      transparent
    );

  transform: translateY(-1px);

  text-shadow: none;
}


/* =====================================================
   DIVIDER
   ===================================================== */

/* .language-divider {

  flex: 0 0 auto;

  color: var(--ink-faint);

  opacity: 0.55;

  font-family:
    'IBM Plex Mono',
    monospace;

  font-size: 0.78rem;

  pointer-events: none;

} */

.language-divider {
  flex: 0 0 0;

  width: 0;

  position: relative;

  z-index: 5;

  color: var(--ink-faint);

  opacity: 0.75;

  font-family:
    'IBM Plex Mono',
    monospace;

  font-size: 0.78rem;

  line-height: 1;

  pointer-events: none;

  background: transparent;

  border: none;

  box-shadow: none;

  display: flex;
  align-items: center;
  justify-content: center;
}




/* =========================================================
   THEME TOGGLE — SUN / MOON
   SAME SIZE AS LANGUAGE BUTTONS
   ========================================================= */

.theme-toggle {
  min-width: 52px;
  height: 32px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  position: relative;

  padding:
    0.28rem
    0.55rem;

  font-family:
    'IBM Plex Mono',
    monospace;

  font-size: 0.95rem;

  color: var(--accent-bright);

  background:
    color-mix(
      in srgb,
      var(--paper-raised) 70%,
      transparent
    );

  border:
    1px solid
    var(--border);

  border-radius: 5px;

  cursor: pointer;

  flex-shrink: 0;

  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}


/* =========================================================
   THEME ICONS
   ========================================================= */

.theme-toggle i {
  position: absolute;

  font-size: 0.95rem;
  line-height: 1;

  color: var(--accent-bright);

  transition:
    opacity 0.2s ease,
    transform 0.25s ease,
    color 0.2s ease,
    filter 0.2s ease;
}


/* =========================================================
   LIGHT THEME
   SHOW SUN
   ========================================================= */

.theme-sun {
  opacity: 1;
  transform:
    scale(1)
    rotate(0deg);
}

.theme-moon {
  opacity: 0;
  transform:
    scale(0.6)
    rotate(-45deg);
}


/* =========================================================
   DARK THEME
   SHOW MOON
   ========================================================= */

html[data-theme="dark"] .theme-sun {
  opacity: 0;

  transform:
    scale(0.6)
    rotate(45deg);
}

html[data-theme="dark"] .theme-moon {
  opacity: 1;

  transform:
    scale(1)
    rotate(0deg);
}


/* =========================================================
   AUTO DARK THEME
   ========================================================= */

@media (prefers-color-scheme: dark) {

  html[data-theme="auto"] .theme-sun {
    opacity: 0;

    transform:
      scale(0.6)
      rotate(45deg);
  }

  html[data-theme="auto"] .theme-moon {
    opacity: 1;

    transform:
      scale(1)
      rotate(0deg);
  }
}


/* =========================================================
   THEME TOGGLE HOVER
   ========================================================= */

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

  border-color:
    var(--accent-bright);

  background:
    color-mix(
      in srgb,
      var(--accent-soft) 75%,
      var(--paper-raised)
    );

  box-shadow:
    0 0 10px
    color-mix(
      in srgb,
      var(--accent) 40%,
      transparent
    ),
    0 0 22px
    color-mix(
      in srgb,
      var(--accent-bright) 20%,
      transparent
    );

  transform: translateY(-1px);
}

.theme-toggle:hover i {
  color: var(--accent-bright);

  filter:
    drop-shadow(
      0 0 6px
      color-mix(
        in srgb,
        var(--accent-bright) 70%,
        transparent
      )
    );
}


/* =========================================================
   MAIN
   ========================================================= */

main {
  max-width: 1200px;

  margin: 0 auto;

  padding:
    0
    1.5rem;
}


/* =========================================================
   PAGE HEADER
   ========================================================= */

.page-head {
  padding:
    2.6rem
    0
    1.4rem;
}

.page-head h1 {
  font-size: 2.1rem;

  margin:
    0
    0.4rem;

  background:
    linear-gradient(
      100deg,
      var(--ink),
      var(--accent),
      var(--accent-bright)
    );

  -webkit-background-clip: text;
  background-clip: text;

  color: transparent;

  filter:
    drop-shadow(
      0 0 10px
      color-mix(
        in srgb,
        var(--accent) 16%,
        transparent
      )
    );
}

.page-head p {
  color: var(--ink-muted);
  margin: 0;
}


/* =========================================================
   HERO
   ========================================================= */

.hero {
  position: relative;

  padding:
    3.2rem
    0
    2.6rem;

  display: grid;

  grid-template-columns:
    148px
    1fr;

  gap: 2rem;

  align-items: start;

  overflow: hidden;
}


/* =========================================================
   PHASE CANVAS
   ========================================================= */

#phase-canvas {
  position: absolute;

  right: -60px;
  top: 40px;

  width: 340px;
  height: 260px;

  opacity: 0.97;

  filter:
    saturate(1.65)
    hue-rotate(-12deg)
    drop-shadow(
      0 0 18px
      color-mix(
        in srgb,
        var(--accent-bright) 50%,
        transparent
      )
    )
    drop-shadow(
      0 0 40px
      color-mix(
        in srgb,
        var(--accent) 25%,
        transparent
      )
    );

  pointer-events: none;

  z-index: 0;
}

.hero > * {
  position: relative;
  z-index: 1;
}


/* =========================================================
   AVATAR
   ========================================================= */

.avatar {
  width: 148px;
  height: 148px;

  border-radius: 10px;

  background:
    radial-gradient(
      circle at 30% 25%,
      color-mix(
        in srgb,
        var(--accent-bright) 30%,
        transparent
      ),
      transparent 45%
    ),
    linear-gradient(
      145deg,
      var(--accent-soft),
      var(--accent2-soft)
    );

  border:
    1px solid
    color-mix(
      in srgb,
      var(--accent) 55%,
      var(--border)
    );

  display: flex;
  align-items: center;
  justify-content: center;

  font-family:
    'Fraunces',
    serif;

  font-weight: 500;
  font-size: 2.6rem;

  color: var(--accent-bright);

  box-shadow:
    0 0 0 1px
    color-mix(
      in srgb,
      var(--accent) 15%,
      transparent
    ),
    0 0 25px
    color-mix(
      in srgb,
      var(--accent) 28%,
      transparent
    ),
    0 0 55px
    color-mix(
      in srgb,
      var(--accent-bright) 12%,
      transparent
    ),
    inset 0 0 25px
    color-mix(
      in srgb,
      var(--accent-bright) 14%,
      transparent
    );
}


/* =========================================================
   HERO TEXT
   ========================================================= */

.eyebrow {
  font-family:
    'IBM Plex Mono',
    monospace;

  font-size: 0.78rem;

  letter-spacing: 0.06em;

  text-transform: uppercase;

  color: var(--accent-bright);

  margin:
    0
    0.4rem;

  text-shadow:
    0 0 8px
    color-mix(
      in srgb,
      var(--accent-bright) 65%,
      transparent
    ),
    0 0 20px
    color-mix(
      in srgb,
      var(--accent) 35%,
      transparent
    );
}

h1.name {
  font-size: 2.5rem;

  margin:
    0
    0.15rem;

  line-height: 1.05;

  background:
    linear-gradient(
      105deg,
      var(--ink) 5%,
      #2787ff 35%,
      var(--accent-bright) 68%,
      #00efff 100%
    );

  -webkit-background-clip: text;
  background-clip: text;

  color: transparent;

  filter:
    drop-shadow(
      0 0 12px
      color-mix(
        in srgb,
        var(--accent) 20%,
        transparent
      )
    );
}

.tagline {
  color: var(--ink-muted);

  font-size: 1.1rem;

  margin:
    0
    0
    1.1rem;

  font-style: italic;
}

.degrees {
  list-style: none;

  padding: 0;
  margin: 0;

  display: flex;

  flex-direction: column;

  gap: 0.3rem;
}

.degrees li {
  font-size: 0.95rem;

  color: var(--ink-muted);
}

.degrees .yr {
  color: var(--accent-bright);

  font-weight: 500;

  text-shadow:
    0 0 8px
    color-mix(
      in srgb,
      var(--accent-bright) 40%,
      transparent
    );
}


/* =========================================================
   SECTIONS
   ========================================================= */

section.block {
  padding:
    2.2rem
    0;

  border-top:
    1px solid
    color-mix(
      in srgb,
      var(--accent) 24%,
      var(--border)
    );
}

section.block > h2 {
  font-size: 1.05rem;

  font-family:
    'IBM Plex Mono',
    monospace;

  font-weight: 500;

  text-transform: uppercase;

  letter-spacing: 0.05em;

  color: var(--ink);

  margin:
    0
    0
    1.1rem;

  display: flex;

  align-items: baseline;

  gap: 0.6rem;
}

section.block > h2::before {
  content: '';

  width: 7px;
  height: 7px;

  display: inline-block;

  border-radius: 50%;

  background: var(--accent-bright);

  box-shadow:
    0 0 6px
    var(--accent-bright),
    0 0 14px
    var(--accent-bright),
    0 0 28px
    color-mix(
      in srgb,
      var(--accent) 65%,
      transparent
    );
}

section.block > h2 .count {
  color: var(--ink-faint);

  font-weight: 400;
}

.see-all {
  font-family:
    'IBM Plex Mono',
    monospace;

  color: var(--accent-bright);

  font-size: 0.85rem;
}


/* =========================================================
   RESEARCH AREAS
   ========================================================= */

.areas {
  display: grid;

  grid-template-columns:
    repeat(
      2,
      1fr
    );

  gap:
    0.55rem
    1.5rem;

  list-style: none;

  padding: 0;
  margin: 0;
}

.areas li {
  font-family:
    'Fraunces',
    serif;

  font-size: 1.02rem;

  padding:
    0.25rem
    0
    0.25rem
    1rem;

  border-left:
    2px solid
    var(--accent);

  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    padding-left 0.2s ease,
    text-shadow 0.2s ease;
}

.areas li:hover {
  color: var(--accent-bright);

  border-left-color:
    var(--accent-bright);

  padding-left: 1.25rem;

  text-shadow:
    0 0 10px
    color-mix(
      in srgb,
      var(--accent-bright) 30%,
      transparent
    );
}


/* =========================================================
   TEACHING
   ========================================================= */

.teach-card {
  padding: 1.1rem 0;

  border-bottom:
    1px dashed
    var(--border);
}

.teach-card:last-child {
  border-bottom: none;
}

.teach-card .teach-top {
  display: flex;

  justify-content: space-between;

  gap: 1rem;

  align-items: baseline;
}

.teach-card h3 {
  margin:
    0
    0.3rem;

  font-size: 1.15rem;
}

.teach-card .outline-list {
  color: var(--ink-muted);

  font-size: 0.92rem;

  margin:
    0.5rem
    0
    0;

  padding-left: 1.1rem;

  columns: 2;
}

.teach-card .outline-list li {
  margin-bottom: 0.2rem;

  break-inside: avoid;
}

.teach-hours {
  font-family:
    'IBM Plex Mono',
    monospace;

  color: var(--accent-bright);

  white-space: nowrap;

  font-size: 0.85rem;

  text-shadow:
    0 0 8px
    color-mix(
      in srgb,
      var(--accent-bright) 50%,
      transparent
    ),
    0 0 18px
    color-mix(
      in srgb,
      var(--accent) 25%,
      transparent
    );
}

.teach-card .ext-link {
  font-family:
    'IBM Plex Mono',
    monospace;

  font-size: 0.8rem;
}


/* =========================================================
   PUBLICATIONS TOOLBAR
   ========================================================= */

.pub-toolbar {
  display: flex;

  gap: 0.6rem;

  flex-wrap: wrap;

  margin-bottom: 0.5rem;
}

#pub-search {
  flex: 1;

  min-width: 200px;

  font-family:
    'Source Serif 4',
    serif;

  font-size: 0.95rem;

  padding:
    0.45rem
    0.7rem;

  border:
    1px solid
    var(--border);

  border-radius: 5px;

  background: var(--paper-raised);

  color: var(--ink);

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

#pub-search::placeholder {
  color: var(--ink-faint);
}

#pub-search:focus {
  border-color:
    var(--accent-bright);

  box-shadow:
    0 0 0 3px
    color-mix(
      in srgb,
      var(--accent) 18%,
      transparent
    ),
    0 0 16px
    color-mix(
      in srgb,
      var(--accent-bright) 22%,
      transparent
    );
}

#pub-year {
  font-family:
    'IBM Plex Mono',
    monospace;

  font-size: 0.85rem;

  padding:
    0.45rem
    0.6rem;

  border:
    1px solid
    var(--border);

  border-radius: 5px;

  background: var(--paper-raised);

  color: var(--ink);
}

.pub-clear {
  font-family:
    'IBM Plex Mono',
    monospace;

  font-size: 0.8rem;

  border:
    1px solid
    var(--border);

  border-radius: 5px;

  background: transparent;

  color: var(--ink-muted);

  padding:
    0.45rem
    0.7rem;

  cursor: pointer;

  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.pub-clear:hover {
  color: var(--accent-bright);

  border-color:
    var(--accent);

  box-shadow:
    0 0 10px
    color-mix(
      in srgb,
      var(--accent) 25%,
      transparent
    );
}

.pub-count {
  font-family:
    'IBM Plex Mono',
    monospace;

  font-size: 0.78rem;

  color: var(--ink-faint);

  margin:
    0.4rem
    0
    1.2rem;
}


/* =========================================================
   YEAR NAVIGATION
   ========================================================= */

.year-jump {
  display: flex;

  gap: 0.35rem;

  flex-wrap: wrap;

  margin-bottom: 1.7rem;

  font-family:
    'IBM Plex Mono',
    monospace;

  font-size: 1.35rem;

  font-weight: 500;
}

.year-jump a {
  text-decoration: none;

  color: var(--ink-muted);

  padding:
    0.3rem
    0.7rem;

  border-radius: 4px;

  transition:
    background 0.2s ease,
    color 0.2s ease,
    text-shadow 0.2s ease;
}

.year-jump a:hover {
  background: var(--accent-soft);

  color: var(--accent-bright);

  text-shadow:
    0 0 8px
    color-mix(
      in srgb,
      var(--accent-bright) 35%,
      transparent
    );
}


/* =========================================================
   YEAR GROUP
   ========================================================= */

.year-group h3 {
  font-family:
    'IBM Plex Mono',
    monospace;

  font-size: 1.35rem;

  line-height: 1.2;

  font-weight: 500;

  color: var(--accent-bright);

  margin:
    1.8rem
    0
    0.65rem;

  scroll-margin-top: 4.5rem;

  letter-spacing: 0.02em;

  text-shadow:
    0 0 10px
    color-mix(
      in srgb,
      var(--accent-bright) 50%,
      transparent
    ),
    0 0 22px
    color-mix(
      in srgb,
      var(--accent) 30%,
      transparent
    );
}


/* =========================================================
   PUBLICATION
   ========================================================= */

.pub {
  padding:
    0.95rem
    0;

  border-bottom:
    1px solid
    color-mix(
      in srgb,
      var(--accent) 20%,
      var(--border)
    );

  display: grid;

  grid-template-columns:
    2.4rem
    1fr;

  gap:
    0.15rem
    0.7rem;
}

.pub .num {
  font-family:
    'IBM Plex Mono',
    monospace;

  color: var(--ink-faint);

  font-size: 0.85rem;

  padding-top: 0.15rem;
}

.pub .content {
  min-width: 0;
}

.pub .title {
  font-family:
    'Fraunces',
    serif;

  font-size: 1.03rem;

  line-height: 1.35;

  margin:
    0
    0.25rem;
}

.pub .authors {
  margin:
    0
    0.2rem;

  color: var(--ink-muted);

  font-size: 0.92rem;
}


/* =========================================================
   PUBLICATION AUTHOR HIGHLIGHT
   ========================================================= */

.pub .authors mark {
  background:
    linear-gradient(
      90deg,
      color-mix(
        in srgb,
        var(--accent) 24%,
        transparent
      ),
      color-mix(
        in srgb,
        var(--accent-bright) 18%,
        transparent
      )
    );

  color: var(--ink);

  border:
    1px solid
    color-mix(
      in srgb,
      var(--accent-bright) 25%,
      transparent
    );

  padding:
    0
    0.18em;

  border-radius: 3px;

  font-weight: 600;

  box-shadow:
    0 0 8px
    color-mix(
      in srgb,
      var(--accent) 14%,
      transparent
    );
}


/* =========================================================
   GENERAL MARK / HIGHLIGHT
   ========================================================= */

mark {
  background:
    linear-gradient(
      90deg,
      color-mix(
        in srgb,
        var(--accent) 24%,
        transparent
      ),
      color-mix(
        in srgb,
        var(--accent-bright) 18%,
        transparent
      )
    );

  color: var(--ink);

  border:
    1px solid
    color-mix(
      in srgb,
      var(--accent-bright) 25%,
      transparent
    );

  padding:
    0
    0.18em;

  border-radius: 3px;

  font-weight: 600;

  box-shadow:
    0 0 8px
    color-mix(
      in srgb,
      var(--accent) 14%,
      transparent
    );
}


/* =========================================================
   PUBLICATION VENUE
   ========================================================= */

.pub .venue {
  margin:
    0
    0
    0.55rem;

  font-size: 0.88rem;

  color: var(--ink-faint);

  font-style: italic;
}

.pub .venue b {
  font-style: normal;

  color: var(--ink-muted);
}


/* =========================================================
   BUTTONS
   ========================================================= */

.actions {
  display: flex;

  gap: 0.4rem;

  flex-wrap: wrap;
}

.btn {
  font-family:
    'IBM Plex Mono',
    monospace;

  font-size: 0.72rem;

  letter-spacing: 0.03em;

  text-decoration: none;

  border:
    1px solid
    var(--border);

  border-radius: 5px;

  padding:
    0.2rem
    0.5rem;

  color: var(--ink-muted);

  background: transparent;

  cursor: pointer;

  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.btn:hover {
  border-color:
    var(--accent-bright);

  color: var(--accent-bright);

  box-shadow:
    0 0 10px
    color-mix(
      in srgb,
      var(--accent) 32%,
      transparent
    ),
    0 0 20px
    color-mix(
      in srgb,
      var(--accent-bright) 15%,
      transparent
    );

  transform: translateY(-1px);
}

.btn.disabled {
  opacity: 0.45;

  cursor: default;

  pointer-events: none;
}


/* =========================================================
   PDF BUTTON
   ========================================================= */

.btn.pdf {
  color: var(--accent);

  border-color:
    color-mix(
      in srgb,
      var(--accent) 50%,
      var(--border)
    );
}

.btn.pdf:hover {
  color: var(--accent-bright);

  border-color:
    var(--accent-bright);

  box-shadow:
    0 0 12px
    color-mix(
      in srgb,
      var(--accent) 35%,
      transparent
    ),
    0 0 22px
    color-mix(
      in srgb,
      var(--accent-bright) 15%,
      transparent
    );
}


/* =========================================================
   BIBTEX BUTTON
   ========================================================= */

.btn.bibtex {
  color: var(--accent2);

  border-color:
    color-mix(
      in srgb,
      var(--accent2) 50%,
      var(--border)
    );
}

.btn.bibtex:hover {
  color: var(--accent2-bright);

  border-color:
    var(--accent2-bright);

  box-shadow:
    0 0 12px
    color-mix(
      in srgb,
      var(--accent2) 35%,
      transparent
    ),
    0 0 22px
    color-mix(
      in srgb,
      var(--accent2-bright) 15%,
      transparent
    );
}


/* =========================================================
   PUBLICATION PREVIEW
   ========================================================= */

.pub-preview-list {
  list-style: none;

  padding: 0;
  margin: 0;
}

.pub-preview-list li {
  padding:
    0.7rem
    0;

  border-bottom:
    1px dashed
    var(--border);
}

.pub-preview-list li:last-child {
  border-bottom: none;
}

.pub-preview-list .title {
  font-family:
    'Fraunces',
    serif;

  margin:
    0
    0.2rem;
}

.pub-preview-list .meta {
  color: var(--ink-muted);

  font-size: 0.88rem;
}

.pub-empty {
  display: none;

  padding: 2rem 0;

  color: var(--ink-muted);

  font-family:
    'IBM Plex Mono',
    monospace;

  font-size: 0.9rem;
}

.pub-empty.show {
  display: block;
}


/* =========================================================
   CONTACT
   ========================================================= */

.contact-grid {
  display: grid;

  grid-template-columns:
    1fr
    1fr;

  gap: 2rem;

  padding:
    0.5rem
    0
    1rem;
}

.contact-grid h3 {
  font-size: 0.95rem;

  font-family:
    'IBM Plex Mono',
    monospace;

  text-transform: uppercase;

  letter-spacing: 0.04em;

  color: var(--ink-muted);

  margin:
    0
    0.6rem;
}

.profiles {
  display: flex;

  flex-wrap: wrap;

  gap: 0.6rem;

  margin-top: 0.6rem;
}

.profiles a {
  font-family:
    'IBM Plex Mono',
    monospace;

  font-size: 0.78rem;

  text-decoration: none;

  color: var(--ink-muted);

  border:
    1px solid
    var(--border);

  border-radius: 5px;

  padding:
    0.25rem
    0.6rem;

  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.profiles a:hover {
  color: var(--accent-bright);

  border-color:
    var(--accent-bright);

  box-shadow:
    0 0 12px
    color-mix(
      in srgb,
      var(--accent) 32%,
      transparent
    ),
    0 0 22px
    color-mix(
      in srgb,
      var(--accent-bright) 12%,
      transparent
    );
}


/* =========================================================
   FOOTER
   ========================================================= */

footer.site {
  border-top:
    1px solid
    color-mix(
      in srgb,
      var(--accent) 24%,
      var(--border)
    );

  margin-top: 1rem;

  padding:
    1.8rem
    0
    3rem;

  color: var(--ink-muted);

  font-size: 0.9rem;
}

footer.site .inner {
  max-width: 840px;

  margin: 0 auto;

  padding:
    0
    1.5rem;
}

footer.site .copyright {
  margin-top: 1rem;

  font-family:
    'IBM Plex Mono',
    monospace;

  font-size: 0.78rem;

  color: var(--ink-faint);
}


/* =========================================================
   BIBTEX MODAL
   ========================================================= */

dialog#bibtex-modal {
  border:
    1px solid
    color-mix(
      in srgb,
      var(--accent) 55%,
      var(--border)
    );

  border-radius: 10px;

  padding: 1.4rem;

  max-width: 620px;

  width: 90vw;

  background: var(--paper-raised);

  color: var(--ink);

  font-family:
    'Source Serif 4',
    serif;

  box-shadow:
    0 0 30px
    color-mix(
      in srgb,
      var(--accent) 28%,
      transparent
    ),
    0 0 70px
    color-mix(
      in srgb,
      var(--accent-bright) 12%,
      transparent
    );
}

dialog#bibtex-modal::backdrop {
  background:
    color-mix(
      in srgb,
      #001a3d 78%,
      transparent
    );

  backdrop-filter: blur(3px);
}

dialog#bibtex-modal h3 {
  margin:
    0
    0
    0.2rem;

  font-size: 1.05rem;
}

dialog#bibtex-modal .pub-title-ref {
  color: var(--ink-muted);

  font-size: 0.85rem;

  margin:
    0
    0
    0.8rem;
}

dialog#bibtex-modal pre {
  font-family:
    'IBM Plex Mono',
    monospace;

  font-size: 0.78rem;

  white-space: pre-wrap;

  background: var(--accent-soft);

  border:
    1px solid
    color-mix(
      in srgb,
      var(--accent) 25%,
      var(--border)
    );

  padding: 0.8rem;

  border-radius: 5px;

  max-height: 45vh;

  overflow: auto;

  margin: 0;
}

.modal-actions {
  display: flex;

  gap: 0.5rem;

  margin-top: 1rem;

  justify-content: flex-end;
}

.modal-actions .btn {
  font-size: 0.8rem;

  padding:
    0.35rem
    0.8rem;
}


/* =========================================================
   FORM CONTROLS
   Keep native controls blue
   ========================================================= */

input,
select,
button {
  accent-color: var(--accent-bright);
}

select option {
  background: var(--paper-raised);

  color: var(--ink);
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 900px) {

  .academic-profiles {
    order: 4;

    width: 100%;

    margin-left: 0;

    justify-content: flex-start;

    padding-top: 0.35rem;
  }
}


@media (max-width: 620px) {

  .hero {
    grid-template-columns: 1fr;
  }

  .areas {
    grid-template-columns: 1fr;
  }

  #phase-canvas {
    width: 280px;
    height: 280px;

    right: -80px;
  }

  .pub {
    grid-template-columns:
      1.6rem
      1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .teach-card .outline-list {
    columns: 1;
  }

  .bar {
    padding:
      0.8rem
      1rem;

    gap: 1rem;
  }

  nav.primary ul {
    gap: 0.8rem;
  }


  /* -------------------------------------------------------
     ACADEMIC PROFILES
     ------------------------------------------------------- */

  .academic-profiles {
    order: 4;

    width: 100%;

    margin-left: 0;

    justify-content: flex-start;

    gap: 0.3rem;

    overflow-x: auto;

    padding:
      0.35rem
      0
      0.15rem;

    scrollbar-width: thin;
  }

  .academic-profile {
    flex:
      0 0
      32px;

    width: 32px;
    height: 32px;
  }

  .academic-profile i {
    font-size: 0.95rem;
  }


  /* -------------------------------------------------------
     CONTROLS
     ------------------------------------------------------- */

  .controls {
    margin-left: 0;

    width: 100%;
  }


  /* -------------------------------------------------------
     THEME BUTTON
     Same mobile dimensions as language buttons
     ------------------------------------------------------- */

  .theme-toggle {
    min-width: 52px;
    width: 52px;
    height: 32px;

    padding:
      0.28rem
      0.55rem;
  }

  .theme-toggle i {
    font-size: 0.95rem;
  }


  /* -------------------------------------------------------
     HERO NAME
     ------------------------------------------------------- */

  h1.name {
    font-size: 2.15rem;
  }


  /* -------------------------------------------------------
     YEARS
     ------------------------------------------------------- */

  .year-group h3 {
    font-size: 1.2rem;
  }
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;

    animation-iteration-count: 1 !important;

    transition-duration: 0.01ms !important;
  }
}