@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* Theming */
:root {
  --bg: #ffffff;
  --text: #2F4F5F;
  --heading: #222222;
  --muted: #494949;
  --link: #2B6CB0;
  --link-hover: #1A365D;
  --card-bg: #fafbfc;
  --accent: #39c;
  --accent-hover: #2980b9;
  --border: #e5e5e5;
}

html[data-theme="dark"] {
  --bg: #0b1220;
  --text: #d1e4ee;
  --heading: #e6edf3;
  --muted: #cbd5e1;
  --link: #93c5fd;
  --link-hover: #bfdbfe;
  --card-bg: #0f172a;
  --accent: #60a5fa;
  --accent-hover: #93c5fd;
  --border: #23324d;
}

@media (prefers-color-scheme: dark) {
  html[data-theme="auto"], html:not([data-theme]) {
    --bg: #0b1220;
    --text: #d1e4ee;
    --heading: #e6edf3;
    --muted: #cbd5e1;
    --link: #93c5fd;
    --link-hover: #bfdbfe;
    --card-bg: #0f172a;
    --accent: #60a5fa;
    --accent-hover: #93c5fd;
    --border: #23324d;
  }
}

body {
  background-color: var(--bg);
  padding:50px;
  font: 15px/1.6 "JetBrains Mono", "Fira Code", "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace;
  color: var(--text);
  font-weight:400;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--heading);
  margin:0 0 20px;
}

p, ul, ol, table, pre, dl {
  margin:0 0 20px;
}

ol {
  padding-left: 15px;
}

h1, h2, h3 {
  line-height:1.1;
}

h1 {
  font-size:28px;
}

h3, h4, h5, h6 { color: var(--muted); }

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

a:hover {
  color: var(--link-hover);
}

a small {
  font-size:11px;
  color:#777;
  margin-top:-0.3em;
  display:block;
}

a:hover small {
  color:#777;
}

.wrapper {
  max-width:1200px;
  width: 100%;
  margin:0 auto;
}

blockquote {
  border-left:1px solid var(--border);
  margin:0;
  padding:0 0 0 20px;
  font-style:italic;
}

code, pre {
  font-family:Monaco, Bitstream Vera Sans Mono, Lucida Console, Terminal, Consolas, Liberation Mono, DejaVu Sans Mono, Courier New, monospace;
  color:#333;
  font-size:12px;
}

pre {
  padding:8px 15px;
  background: #f8f8f8;
  border-radius:5px;
  border:1px solid var(--border);
  overflow-x: auto;
}

table {
  width:100%;
  border-collapse:collapse;
}

th, td {
  text-align:left;
  padding:5px 10px;
  border-bottom:1px solid var(--border);
}

dt {
  color:#444;
  font-weight:700;
}

th {
  color:#444;
}

img {
  max-width:100%;
}

header {
  width:270px;
  float:left;
  position:fixed;
  -webkit-font-smoothing:subpixel-antialiased;
}

header ul {
  list-style:none;
  height:40px;
  padding:0;
  background: #f4f4f4;
  border-radius:5px;
  border:1px solid #e0e0e0;
  width:270px;
}

header li {
  width:89px;
  float:left;
  border-right:1px solid #e0e0e0;
  height:40px;
}

header li:first-child a {
  border-radius:5px 0 0 5px;
}

header li:last-child a {
  border-radius:0 5px 5px 0;
}

header ul a {
  line-height:1;
  font-size:11px;
  color:#999;
  display:block;
  text-align:center;
  padding-top:6px;
  height:34px;
}

header ul a:hover {
  color:#999;
}

header ul a:active {
  background-color:#f0f0f0;
}

strong {
  color: var(--heading);
  font-weight:700;
}

header ul li + li + li {
  border-right:none;
  width:89px;
}

header ul a strong {
  font-size:14px;
  display:block;
  color:#222;
}

section, main {
  width:800px;
  float:right;
  padding-bottom:50px;
}

small {
  font-size:11px;
}

hr {
  border:0;
  background:var(--border);
  height:1px;
  margin:0 0 20px;
}

footer {
  width:270px;
  float:left;
  position:fixed;
  bottom:50px;
  -webkit-font-smoothing:subpixel-antialiased;
}

@media print, screen and (max-width: 1200px) {

  div.wrapper {
    width:auto;
    margin:0;
  }

  header, section, main, footer {
    float:none;
    position:static;
    width:auto;
  }

  header {
    padding-right:0;
    margin-bottom: 30px;
  }

  section, main {
    border:1px solid var(--border);
    border-width:1px 0;
    padding:20px 0;
    margin:0 0 20px;
  }

  header a small {
    display:inline;
  }

  header ul {
    position:static;
    margin-top: 20px;
  }

  #face_img {
    width: 120px;
  }
}

@media print, screen and (max-width: 720px) {
  body {
    word-wrap:break-word;
  }

  header {
    padding:0;
  }

  header ul, header p.view {
    position:static;
  }

  pre, code {
    word-wrap:normal;
  }
}

@media print, screen and (max-width: 480px) {
  body {
    padding:15px;
  }

  header ul {
    width:99%;
  }

  header li, header ul li + li + li {
    width:33%;
  }
}

@media print {
  body {
    padding:0.4in;
    font-size:12pt;
    color:#444;
  }
}

/* Profile section styling */
.profile-section {
  text-align: center;
  margin-bottom: 30px;
  position: relative;
}

.profile-section .title {
  color: #666;
  font-size: 16px;
  font-weight: 500;
  margin: 0 0 20px 0;
  font-style: italic;
}

.profile-image {
  margin: 20px 0;
}

#face_img {
  width: 200px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

#face_img:hover {
  transform: scale(1.02);
}

/* Enhanced typography */
h1 {
  color: var(--text);
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 10px;
}

h3 {
  color: var(--text);
  border-bottom: 2px solid rgba(56, 189, 248, 0.15);
  padding-bottom: 8px;
  margin: 30px 0 20px 0;
}

/* Publication list improvements */
ol li {
  margin-bottom: 15px;
  padding: 10px;
  background: var(--card-bg);
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

ol li:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  border-left-color: var(--accent-hover);
}

/* Link styling refinement */
a { transition: color 0.3s ease; }
a:hover { text-decoration: underline; }

/* Contact section styling */
.view a {
  display: inline-block;
  margin: 2px 0;
  padding: 4px 8px;
  background: rgba(226, 232, 240, 0.3);
  border-radius: 6px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.view a:hover {
  background: rgba(226, 232, 240, 0.6);
  transform: translateY(-1px);
  text-decoration: none;
}

/* Quick access improvements */
.publication-year {
  display: inline-block;
  background: #e8f4f8;
  color: #2c5aa0;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
  margin-left: 8px;
}

.venue-highlight {
  font-weight: 600;
  color: #2c5aa0;
}

/* Copy email functionality */
.email-copy {
  cursor: pointer;
  position: relative;
}

.email-copy:hover::after {
  content: "Click to copy";
  position: absolute;
  background: #333;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  top: -30px;
  left: 0;
  white-space: nowrap;
  z-index: 1000;
}

/* Publication thumbnails */
.publication-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 10px 0;
  padding: 25px 15px 25px 8px;
  background: var(--card-bg);
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.publication-item:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  border-left-color: var(--accent-hover);
}

.publication-thumbnail {
  flex-shrink: 0;
  width: 80px;
  transition: transform 0.3s ease;
}

.publication-thumbnail:hover {
  transform: scale(1.05);
}

.publication-thumbnail img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: opacity 0.3s ease;
}

.publication-content {
  flex: 1;
  min-width: 0;
}

/* Override previous publication list styling for new structure */
ol li.publication-item {
  margin-bottom: 0;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

/* Accessibility: skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: static;
  width: auto;
  height: auto;
  padding: 8px 12px;
  background: var(--accent);
  color: white;
  border-radius: 6px;
}

/* Theme toggle removed: dark mode is always on */
