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

:root {
  color-scheme: light;
  --bg: #0b1224;
  --bg-2: #101c38;
  --ink: #f7fbff;
  --muted: #b2c3de;
  --accent: #48f2c2;
  --accent-2: #ffb86b;
  --accent-3: #8fb2ff;
  --card: rgba(12, 20, 38, 0.75);
  --line: rgba(148, 186, 255, 0.2);
  --shadow: 0 26px 70px rgba(4, 10, 22, 0.45);
  --radius: 20px;
  --brand-github: #f7fbff;
  --brand-linkedin: #ffffff;
  --brand-scholar: #ffffff;
  --brand-pdf: #ff8a80;
}


[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f7fb;
  --bg-2: #e9eef7;
  --ink: #0b1324;
  --muted: #2c3d59;
  --accent: #0bbf92;
  --accent-2: #ff9b50;
  --accent-3: #3f6bff;
  --card: rgba(255, 255, 255, 0.9);
  --line: rgba(26, 46, 86, 0.3);
  --shadow: 0 10px 26px rgba(19, 30, 60, 0.08);
  --brand-github: #111111;
  --brand-linkedin: #0a66c2;
  --brand-scholar: #1a73e8;
  --brand-pdf: #c62828;
}


* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Space Grotesk", system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at top left, #1a2b55 0%, #0b1224 45%, #050812 100%);
  color: var(--ink);
  min-height: 100vh;
}

[data-theme="light"] body {
  background: radial-gradient(circle at top left, #ffffff 0%, #eef3ff 45%, #e6eef9 100%);
}

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 36px 22px 72px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.hero {
  position: relative;
  background: linear-gradient(135deg, #0f1f3d 0%, #13274f 55%, #0c1933 100%);
  border: 1px solid rgba(143, 178, 255, 0.25);
  border-radius: var(--radius);
  padding: 34px;
  min-height: 220px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

[data-theme="light"] .hero {
  background: linear-gradient(135deg, #f4f7ff 0%, #e5eeff 55%, #f7f2ff 100%);
  border: 1px solid rgba(26, 46, 86, 0.2);
}

[data-theme="light"] .hero__eyebrow {
  color: #1f2a40;
}

[data-theme="light"] .hero h1 {
  color: #0a1222;
}

.hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 620px;
  min-height: 140px;
}

.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.7rem;
  color: #ffd199;
  white-space: nowrap;
}

.hero h1 {
  font-size: clamp(2.6rem, 3.2vw, 3.4rem);
  letter-spacing: 0.01em;
  color: #f9fcff;
}

.hero__tagline {
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--muted);
}

.hero-email {
  position: static;
  align-self: flex-start;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
  margin: 0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hero-email svg {
  width: 30px;
  height: 30px;
  padding: 3px 1px;
  fill: currentColor;
}

.hero-email:hover,
.hero-email:focus-visible {
  border: 1px solid rgba(180, 186, 196, 0.7);
  color: var(--accent);
  outline: none;
  box-shadow: none;
}

[data-theme="light"] .hero-email {
  color: #0a1224;
}

[data-theme="light"] .hero__tagline {
  color: #2b3d5a;
}

.hero__meta {
  display: flex;
  gap: 20px;
  font-size: 0.9rem;
  color: var(--accent);
}

.hero__accent {
  position: absolute;
  inset: auto -20% -40% auto;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(72, 242, 194, 0.5) 0%, rgba(72, 242, 194, 0) 70%);
  filter: blur(8px);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tabs__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.nav-toggle {
  display: none;
  border: 1px solid rgba(143, 178, 255, 0.3);
  background: rgba(10, 18, 36, 0.9);
  color: var(--ink);
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  align-items: center;
  justify-content: center;
}


.nav-toggle:hover,
.nav-toggle:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

[data-theme="light"] .nav-toggle {
  border: 1px solid rgba(26, 46, 86, 0.2);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  box-shadow: none;
}

.nav-toggle__icon {
  font-size: 1rem;
  line-height: 1;
}

.nav-current {
  display: none;
  border: 1px solid rgba(143, 178, 255, 0.3);
  background: rgba(12, 20, 38, 0.6);
  color: #04131d;
  padding: 10px 18px;
  background: linear-gradient(120deg, rgba(72, 242, 194, 0.9), rgba(143, 178, 255, 0.9));
  border-color: rgba(72, 242, 194, 0.9);
  box-shadow: 0 14px 26px rgba(72, 242, 194, 0.3);
  border-radius: 999px;
  font-size: 0.9rem;
  text-decoration: none;
  backdrop-filter: blur(10px);
}

[data-theme="light"] .nav-current {
  border: 1px solid rgba(26, 46, 86, 0.2);
  background: linear-gradient(120deg, rgba(11, 191, 146, 0.9), rgba(63, 107, 255, 0.85));
  color: #ffffff;
}



.tab {
  border: 1px solid rgba(143, 178, 255, 0.3);
  background: rgba(12, 20, 38, 0.6);
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--muted);
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
  text-decoration: none;
}

[data-theme="light"] .tab {
  border: 1px solid rgba(26, 46, 86, 0.2);
  background: rgba(255, 255, 255, 0.8);
  color: #2c3d59;
}

.tab:hover,
.tab:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
  box-shadow: 0 0 20px rgba(72, 242, 194, 0.25);
}

.tab.is-active {
  background: linear-gradient(120deg, rgba(72, 242, 194, 0.9), rgba(143, 178, 255, 0.9));
  color: #04131d;
  border-color: rgba(72, 242, 194, 0.9);
  box-shadow: 0 14px 26px rgba(72, 242, 194, 0.3);
}

[data-theme="light"] .tab.is-active {
  background: linear-gradient(120deg, rgba(11, 191, 146, 0.9), rgba(63, 107, 255, 0.85));
  color: #ffffff;
}

.content {
  display: grid;
}

.section-list {
  display: grid;
  gap: 20px;
}

#publications-list,
#projects-list,
#talks-list,
#recognition-list,
#open-source-list,
#patents-list,
#theses-list {
  display: grid;
  gap: 20px;
}

.panel {
  display: none;
}

.panel.is-active {
  display: block;
  animation: fadeIn 0.4s ease;
}

.panel__inner {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 28px;
  backdrop-filter: blur(14px);
}

[data-theme="light"] .panel__inner {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(26, 46, 86, 0.24);
}

.panel__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.card {
  border: 1px solid rgba(143, 178, 255, 0.2);
  border-radius: 16px;
  padding: 16px;
  background: rgba(10, 18, 36, 0.75);
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 16px 40px rgba(4, 8, 18, 0.35);
}

[data-theme="light"] .card {
  border: 1px solid rgba(26, 46, 86, 0.22);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: none;
}

[data-theme="light"] .card h3 {
  color: #0b1426;
}

.card h3 {
  font-size: 1.1rem;
  color: #f1f7ff;
}

.card ul {
  list-style: none;
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.card ul li {
  margin: 0;
}

.role-item {
  display: grid;
  gap: 4px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(143, 178, 255, 0.18);
}

.role-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

[data-theme="light"] .role-item {
  border-bottom: 1px solid rgba(26, 46, 86, 0.12);
}
.role-date {
  font-size: 0.85rem;
  color: var(--muted);
}

.role-title {
  font-weight: 600;
  color: var(--ink);
}

.role-location {
  font-size: 0.85rem;
  color: var(--muted);
}

.tag {
  display: inline-block;
  margin-left: 8px;
  padding: 0 4px;
  border-radius: 999px;
  border: 1px solid rgba(143, 178, 255, 0.3);
  background: rgba(16, 28, 56, 0.9);
  font-size: 0.5rem;
  letter-spacing: 0.02em;
  text-transform: none;
  font-variant-caps: small-caps;
  color: var(--accent-3);
  font: inherit;
  cursor: pointer;
  appearance: none;
}

[data-theme="light"] .tag {
  border: 1px solid rgba(26, 46, 86, 0.2);
  background: rgba(239, 244, 255, 0.95);
  color: #2a4dc8;
}

.tag:hover,
.tag:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.tag.is-active {
  background: rgba(72, 242, 194, 0.9);
  border-color: rgba(72, 242, 194, 0.9);
  color: #04131d;
}

[data-theme="light"] .tag.is-active {
  background: rgba(11, 191, 146, 0.95);
  border-color: rgba(11, 191, 146, 0.95);
  color: #ffffff;
}

.pub-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 0 4px;
}

.pub-tags .tag {
  margin-left: 0;
}

.pub-filters {
  display: grid;
  gap: 10px;
}

.talk-filters {
  display: grid;
  gap: 10px;
}

.pub-filter-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--muted);
}

.filter-label {
  font-weight: 600;
  color: var(--accent-2);
}

.active-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.active-tags .tag {
  margin-left: 0;
}

.talk-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 0 4px;
}

.talk-filter-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--muted);
}

.clear-filters {
  border: 1px solid rgba(143, 178, 255, 0.3);
  background: rgba(10, 18, 36, 0.9);
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--muted);
  transition: all 0.2s ease;
}

[data-theme="light"] .clear-filters {
  border: 1px solid rgba(26, 46, 86, 0.18);
  background: rgba(255, 255, 255, 0.9);
  color: #2c3d59;
}

.clear-filters:hover,
.clear-filters:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.year-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
  margin-left: auto;
}

.year-filter select {
  border: 1px solid rgba(143, 178, 255, 0.3);
  border-radius: 10px;
  padding: 6px 8px;
  background: rgba(10, 18, 36, 0.9);
  color: var(--ink);
  min-width: 120px;
  min-height: 90px;
}

[data-theme="light"] .year-filter select {
  border: 1px solid rgba(26, 46, 86, 0.2);
  background: rgba(255, 255, 255, 0.95);
}

.pub-item {
  display: grid;
  gap: 6px;
  padding: 10px 0;
}

.talk-item {
  display: grid;
  gap: 6px;
  padding: 4px 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.talk-title {
  color: var(--ink);
  font-weight: 600;
}

.talk-meta {
  color: var(--muted);
  line-height: 1.5;
}

.talk-item .tag {
  margin-left: 0;
  align-self: start;
  width: fit-content;
  display: inline-flex;
}

.pub-item[hidden] {
  display: none;
}

.talk-item[hidden] {
  display: none;
}

.card[hidden] {
  display: none;
}

.card.is-hidden {
  display: none;
}

.pub-title {
  font-weight: 600;
  color: var(--ink);
}

.pub-authors,
.pub-venue {
  font-size: 0.9rem;
  color: var(--muted);
}

.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.85rem;
}

.pub-featured {
  margin-top: 4px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(143, 178, 255, 0.3);
  background: rgba(10, 18, 36, 0.9);
  font-size: 0.75rem;
  text-decoration: none;
  color: var(--accent-2);
}

[data-theme="light"] .badge {
  border: 1px solid rgba(26, 46, 86, 0.2);
  background: rgba(255, 255, 255, 0.95);
  color: #b85a1a;
  box-shadow: none;
}

.badge:hover,
.badge:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.project-item {
  display: grid;
  gap: 8px;
  padding: 10px 0;
}

.thesis-item {
  display: grid;
  gap: 6px;
  padding: 10px 0;
}

.thesis-grid {
  display: grid;
  gap: 20px;
}

.thesis-card {
  border: 1px solid rgba(143, 178, 255, 0.2);
  border-radius: 16px;
  padding: 16px;
  background: rgba(10, 18, 36, 0.75);
  box-shadow: 0 16px 40px rgba(4, 8, 18, 0.35);
  display: grid;
  gap: 16px;
}

[data-theme="light"] .thesis-card {
  border: 1px solid rgba(26, 46, 86, 0.12);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: none;
}

.thesis-summary {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 16px;
  align-items: center;
}

.thesis-image {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(143, 178, 255, 0.25);
}

.thesis-summary__text {
  display: grid;
  gap: 6px;
}

.thesis-title {
  font-weight: 600;
  color: var(--ink);
}

.thesis-meta {
  font-size: 0.9rem;
  color: var(--muted);
}

.thesis-pdf {
  margin-top: 6px;
}


.thesis-toggle {
  border: 1px solid rgba(143, 178, 255, 0.3);
  background: rgba(10, 18, 36, 0.9);
  color: var(--ink);
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.thesis-toggle:hover,
.thesis-toggle:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

[data-theme="light"] .thesis-toggle {
  border: 1px solid rgba(26, 46, 86, 0.2);
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
}

.thesis-details {
  display: none;
  gap: 16px;
}

.thesis-card[data-expanded="true"] .thesis-details {
  display: grid;
}

.thesis-abstract h4,
.thesis-publications h4 {
  font-size: 0.95rem;
  color: var(--ink);
  margin-bottom: 6px;
}

.thesis-abstract p {
  color: var(--muted);
  line-height: 1.6;
  text-align: justify;
}

.thesis-abstract p + p {
  margin-top: 10px;
}

.thesis-abstract,
.thesis-publications {
  border: 1px solid rgba(143, 178, 255, 0.2);
  border-radius: 12px;
  padding: 12px;
  background: rgba(12, 20, 38, 0.6);
}

[data-theme="light"] .thesis-abstract,
[data-theme="light"] .thesis-publications {
  border: 1px solid rgba(26, 46, 86, 0.14);
  background: rgba(250, 252, 255, 0.9);
}

.thesis-video iframe {
  width: min(720px, 100%);
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(143, 178, 255, 0.2);
}

.thesis-video {
  display: flex;
  justify-content: center;
}

.thesis-publications ul {
  list-style: none;
  display: grid;
  gap: 12px;
  color: var(--muted);
}

.thesis-publications .pub-item {
  display: grid;
  gap: 6px;
  padding: 10px 0;
}

.thesis-publications .pub-title {
  color: var(--ink);
  font-weight: 600;
}

.thesis-publications .pub-authors,
.thesis-publications .pub-venue {
  display: block;
  color: var(--muted);
}

.thesis-publications .pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.thesis-title {
  font-weight: 600;
  color: var(--ink);
}

.thesis-meta {
  font-size: 0.9rem;
  color: var(--muted);
}

.thesis-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.project-title {
  font-weight: 600;
  color: var(--ink);
}

.project-desc {
  font-size: 0.95rem;
  color: var(--muted);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-tags .tag {
  margin-left: 0;
  cursor: default;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(143, 178, 255, 0.3);
  background: rgba(10, 18, 36, 0.9);
  color: var(--accent);
}

[data-theme="light"] .icon-link {
  border: 1px solid rgba(26, 46, 86, 0.2);
  background: rgba(255, 255, 255, 0.95);
  color: #0b8c6b;
  box-shadow: none;
}

.icon-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.icon-link:hover,
.icon-link:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

p {
  line-height: 1.7;
  color: var(--muted);
}

.link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.theme-toggle {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 50;
  border: 1px solid rgba(143, 178, 255, 0.3);
  background: rgba(10, 18, 36, 0.9);
  color: var(--ink);
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
  box-shadow: 0 0 18px rgba(72, 242, 194, 0.25);
}

[data-theme="light"] .theme-toggle {
  border: 1px solid rgba(26, 46, 86, 0.2);
  background: rgba(255, 255, 255, 0.9);
  color: #0b1324;
  box-shadow: none;
}

.theme-toggle__icon {
  font-size: 1rem;
  line-height: 1;
}


.link--icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.link--icon svg {
  width: 24px;
  height: 24px;
  fill: var(--accent);
}


.link--github svg {
  fill: var(--brand-github);
}

.link--linkedin svg {
  fill: var(--brand-linkedin);
}

.link--scholar svg {
  fill: var(--brand-scholar);
}

.link--pdf svg {
  fill: var(--brand-pdf);
}

.link--default svg {
  fill: var(--accent);
}






.link:hover {
  text-decoration: underline;
}


.about-block {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  align-items: center;
}

.about-photo {
  width: 180px;
  height: 220px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(143, 178, 255, 0.25);
}

[data-theme="light"] .about-photo {
  border: 1px solid rgba(26, 46, 86, 0.2);
}

.about-text p {
  margin: 0;
}


.contact-email {
  display: inline-block;
  font-weight: 600;
}

.contact-email--image {
  display: inline-flex;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  line-height: 0;
  font-size: 0;
}

.contact-email--image canvas {
  border-radius: 8px;
  max-width: 100%;
  display: block;
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.card--links {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

[data-theme="light"] .card--links {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.contact__grid .card ul {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.contact__grid .card ul li {
  flex: 1;
  text-align: center;
}

.contact__grid .card ul li a {
  justify-content: center;
}


.site-footer {
  margin-top: 24px;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

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

@media (max-width: 720px) {
  .hero__meta {
    flex-direction: column;
    gap: 6px;
  }

  .page {
    padding: 24px 16px 48px;
  }

  .hero {
    padding: 24px;
  }

  .hero__eyebrow {
    letter-spacing: 0.18em;
    white-space: normal;
  }
  .tabs {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    justify-content: flex-start;
  }


  .tabs__links {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    display: none;
  }

  .tabs__links.is-open {
    display: flex;
  }

  .nav-toggle {
    width: 36px;
    height: 36px;
    display: inline-flex;
    position: static;
    order: 0;
  }

  .tab {
    padding: 10px 14px;
    font-size: 0.9rem;
    text-align: left;
  }

  .panel__inner {
    padding: 22px;
  }

  .pub-filter-controls,
  .talk-filter-controls {
    flex-direction: column;
    align-items: flex-start;
  }

  .year-filter {
    margin-left: 0;
  }

  .year-filter select {
    min-width: 100%;
    min-height: 70px;
  }

  .theme-toggle {
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .thesis-summary {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .thesis-image {
    width: 100%;
    height: 180px;
  }

  .thesis-toggle {
    justify-self: start;
  }

  .talk-item .tag {
    margin-left: 0;
  }

  .pub-links {
    row-gap: 6px;
  }

  .about-block {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .about-photo {
    width: min(240px, 80%);
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: contain;
    background: rgba(12, 20, 38, 0.2);
  }

  .about-text {
    width: 100%;
  }

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

  .contact__grid .card {
    width: 100%;
  }

  .contact__grid .card ul {
    flex-wrap: wrap;
    gap: 10px;
  }

  .contact__grid .card ul li {
    flex: 1 1 45%;
    text-align: center;
  }

  .contact__grid .card ul li a {
    display: inline-flex;
    justify-content: center;
    width: 100%;
  }

  .email-link {
    word-break: break-all;
  }

  .tabs {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
  }

  .nav-toggle {
    order: 0;
  }
  .nav-current {
    order: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 6px;
  }


  .tabs__links {
    width: 100%;
    order: 2;
  }

  .tabs.is-open .nav-current {
    display: none;
  }
}

@media (max-width: 768px) {
  .page {
    padding: 28px 18px 56px;
  }

  .panel__grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .thesis-summary {
    grid-template-columns: 140px 1fr;
  }

  .thesis-image {
    width: 140px;
    height: 110px;
  }
}

@media (max-width: 390px) {
  .hero h1 {
    font-size: 2rem;
  }

  .hero__tagline {
    font-size: 1rem;
  }

  .tab {
    padding: 7px 12px;
    font-size: 0.85rem;
  }

  .panel__inner {
    padding: 18px;
  }

  .pub-tags,
  .talk-tags {
    gap: 6px;
  }

  .thesis-image {
    height: 160px;
  }
}
