:root {
  --max: 1100px;
  font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  /* Dark theme as default */
  --bg: #0b1221;
  --card: #0f172a;
  --text: #e7ecf5;
  --muted: #9fb1d1;
  --accent: #7ef0c1;
  --accent-2: #f4bf72;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --glass-bg: rgba(15, 23, 42, 0.72);
  --glass-bg-soft: rgba(15, 23, 42, 0.64);
  --glass-border: rgba(255, 255, 255, 0.14);
  --glass-shine: rgba(255, 255, 255, 0.07);
  --cube-face: linear-gradient(155deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02) 34%, rgba(126, 240, 193, 0.08) 62%, rgba(244, 191, 114, 0.08));
  --cube-edge: linear-gradient(135deg, rgba(126, 240, 193, 0.7), rgba(244, 191, 114, 0.5));
  --cube-shadow: 0 26px 70px rgba(0, 0, 0, 0.34);
  --cube-highlight: inset 1px 1px 0 rgba(255, 255, 255, 0.16), inset -1px -1px 0 rgba(126, 240, 193, 0.08);
  --fantasy-orb-1: rgba(126, 240, 193, 0.16);
  --fantasy-orb-2: rgba(244, 191, 114, 0.14);
  --fantasy-orb-3: rgba(96, 165, 250, 0.12);
  /* Controls vertical alignment of date text in timeline */
  --timeline-date-offset: 8px;
}

html[data-theme="light"] {
  --bg: #f5f7fa;
  --card: #ffffff;
  --text: #0b1221;
  --muted: #5a6b7f;
  --accent: #2d9b6c;
  --accent-2: #d97706;
  --border: rgba(0, 0, 0, 0.1);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  --glass-bg: rgba(255, 255, 255, 0.86);
  --glass-bg-soft: rgba(255, 255, 255, 0.93);
  --glass-border: rgba(255, 255, 255, 0.7);
  --glass-shine: rgba(255, 255, 255, 0.48);
  --cube-face: linear-gradient(155deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.8) 34%, rgba(45, 155, 108, 0.1) 68%, rgba(217, 119, 6, 0.1));
  --cube-edge: linear-gradient(135deg, rgba(45, 155, 108, 0.62), rgba(217, 119, 6, 0.46));
  --cube-shadow: 0 26px 60px rgba(45, 74, 110, 0.14);
  --cube-highlight: inset 1px 1px 0 rgba(255, 255, 255, 0.9), inset -1px -1px 0 rgba(45, 155, 108, 0.06);
  --fantasy-orb-1: rgba(45, 155, 108, 0.1);
  --fantasy-orb-2: rgba(217, 119, 6, 0.1);
  --fantasy-orb-3: rgba(96, 165, 250, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Academicons baseline */
.nav {
  font-variant: normal;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: radial-gradient(circle at 12% 18%, var(--fantasy-orb-1), transparent 30%),
              radial-gradient(circle at 82% 12%, var(--fantasy-orb-2), transparent 26%),
              radial-gradient(circle at 52% 78%, var(--fantasy-orb-3), transparent 28%),
              linear-gradient(145deg, rgba(255, 255, 255, 0.02), transparent 40%),
              var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  padding: 32px 20px;
  transition: background-color 300ms ease, color 300ms ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  width: 100%;
}

html[data-theme="light"] body {
  background: radial-gradient(circle at 12% 18%, var(--fantasy-orb-1), transparent 32%),
              radial-gradient(circle at 82% 12%, var(--fantasy-orb-2), transparent 28%),
              radial-gradient(circle at 52% 78%, var(--fantasy-orb-3), transparent 30%),
              linear-gradient(135deg, rgba(255, 255, 255, 0.45), transparent 48%),
              var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

.page {
  width: 100%;
  max-width: var(--max);
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.page--home {
  align-items: stretch;
}

.nav {
  width: 100%;
  max-width: var(--max);
  margin: 0 0 32px;
  padding: 14px 18px;
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.04), transparent 36%),
    var(--cube-face),
    var(--glass-bg);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  top: 0;
  z-index: 10;
  box-shadow: var(--cube-shadow), var(--cube-highlight);
  transition: background-color 300ms ease, border-color 300ms ease;
  gap: 20px;
  overflow: visible; /* allow menu to display */
}

html[data-theme="light"] .nav {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), transparent 36%),
    var(--cube-face),
    var(--glass-bg-soft);
}

.nav::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, transparent 0%, var(--glass-shine) 42%, transparent 72%);
  opacity: 0.8;
  pointer-events: none;
}

.nav__brand {
  font-weight: 700;
  letter-spacing: 0.5px;
  white-space: nowrap;
  position: absolute;
  left: 18px;
  flex-shrink: 0;
  color: var(--text);
  text-decoration: none;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
}

.nav__brand:hover {
  color: var(--accent);
}

.nav__brand img {
  height: 32px;
  width: auto;
  display: block;
}

html[data-theme="dark"] .nav-logo--light { display: none; }
html[data-theme="light"] .nav-logo--dark { display: none; }

.nav__hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
  position: absolute;
  right: 80px;
  z-index: 12;
  transition: color 0.3s ease;
}

.nav__hamburger:hover {
  color: var(--accent);
}

.nav__links {
  display: flex;
  gap: 16px;
  font-size: 15px;
  justify-content: center;
  text-align: center;
  flex: 0 1 calc(100% - 340px);
  align-items: center;
  flex-wrap: wrap;
  row-gap: 8px;
  margin: 0 auto;
}

.nav__links a,
.nav__current {
  font-size: 15px;
  display: inline-flex;
  align-items: center;
}

.nav__current {
  color: #9a9a9a;
  cursor: default;
  pointer-events: none;
}

html[data-theme="light"] .nav__current {
  color: #8b919a;
}

.blog-warning-dialog {
  position: fixed;
  inset: 0;
  width: min(420px, calc(100vw - 32px));
  height: fit-content;
  margin: auto;
  padding: 0;
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  background: transparent;
  color: var(--text);
  box-shadow: var(--shadow);
}

.blog-warning-dialog[open] {
  animation: blogDialogIn 220ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.blog-warning-dialog::backdrop {
  background: rgba(4, 10, 20, 0.72);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.blog-warning-dialog[open]::backdrop {
  animation: blogDialogBackdropIn 220ms ease both;
}

.blog-warning-dialog__panel {
  padding: 24px;
  border-radius: inherit;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), transparent 40%),
    var(--glass-bg-soft);
}

.blog-warning-dialog h2 {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.25;
}

.blog-warning-dialog p {
  margin: 0 auto;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
  text-align: justify;
  text-align-last: left;
}

.blog-warning-dialog__actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}

.blog-warning-dialog__button {
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.blog-warning-dialog__button:hover {
  transform: translateY(-1px);
  border-color: rgba(126, 240, 193, 0.55);
}

.blog-warning-dialog__button--primary {
  border-color: rgba(126, 240, 193, 0.55);
  background: rgba(126, 240, 193, 0.16);
  color: var(--accent);
}

html[data-theme="light"] .blog-warning-dialog::backdrop {
  background: rgba(11, 18, 33, 0.42);
}

html[data-theme="light"] .blog-warning-dialog__button {
  background: rgba(11, 18, 33, 0.04);
}

@keyframes blogDialogIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes blogDialogBackdropIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .blog-warning-dialog[open],
  .blog-warning-dialog[open]::backdrop {
    animation: none;
  }
}

.nav__close {
  display: none;
}

.toggle-wrapper {
  position: absolute;
  right: 20px;
  flex-shrink: 0;
}

.lang-menu {
  position: absolute;
  right: 136px;
  display: inline-flex;
  align-items: center;
}

.lang-menu select {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", "Twemoji Mozilla", "Segoe UI", sans-serif;
}

.lang-menu select option {
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", "Twemoji Mozilla", "Segoe UI", sans-serif;
}

.viewer-enabled {
  cursor: zoom-in;
}

.protected-media {
  -webkit-user-drag: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.viewer-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(4, 10, 20, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
  z-index: 1200;
}

.viewer-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.viewer-modal__dialog {
  width: min(1100px, 100%);
  height: min(88vh, 940px);
  max-height: min(88vh, 940px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), transparent 38%),
    var(--cube-face),
    var(--glass-bg);
  box-shadow: var(--cube-shadow), var(--cube-highlight);
}

html[data-theme="light"] .viewer-modal__dialog {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.74), transparent 36%),
    var(--cube-face),
    var(--glass-bg-soft);
}

.viewer-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.viewer-modal__meta {
  min-width: 0;
}

.viewer-modal__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.viewer-modal__title {
  margin-top: 4px;
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.viewer-modal__note {
  font-size: 12px;
  color: var(--muted);
}

.viewer-modal__close {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, color 180ms ease;
}

.viewer-modal__close:hover {
  color: var(--accent);
  border-color: rgba(126, 240, 193, 0.4);
  transform: rotate(90deg);
}

.viewer-modal__content {
  flex: 1;
  min-height: 0;
  border-radius: 18px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: rgba(5, 10, 20, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.viewer-modal__frame,
.viewer-modal__image {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

.viewer-modal__frame {
  min-height: min(74vh, 780px);
  background: #111827;
}

.viewer-modal__pdf {
  min-height: min(74vh, 780px);
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  background: #111827;
}

.viewer-modal__pdf-page {
  width: fit-content;
  max-width: 100%;
  background: #ffffff;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
}

.viewer-modal__pdf-page canvas {
  display: block;
  max-width: 100%;
  height: auto !important;
}

.viewer-modal__loading {
  min-height: min(60vh, 640px);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 700;
}

.viewer-modal__image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: min(74vh, 780px);
  padding: 16px;
  background:
    radial-gradient(circle at top, rgba(126, 240, 193, 0.12), transparent 30%),
    radial-gradient(circle at bottom, rgba(244, 191, 114, 0.12), transparent 26%),
    rgba(4, 10, 20, 0.95);
}

.viewer-modal__image {
  max-width: 100%;
  max-height: min(72vh, 760px);
  height: auto;
  object-fit: contain;
  border-radius: 14px;
}

.viewer-lock-scroll {
  overflow: hidden;
}

@media (max-width: 720px) {
  .viewer-modal {
    padding: 14px;
  }

  .viewer-modal__dialog {
    width: 100%;
    height: calc(100vh - 28px);
    height: calc(100dvh - 28px);
    max-height: none;
    padding: 14px;
    border-radius: 20px;
  }

  .viewer-modal__header {
    align-items: flex-start;
  }

  .viewer-modal__title {
    white-space: normal;
  }
}

.lang-picker {
  position: relative;
}

.lang-picker summary {
  list-style: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.lang-picker summary::-webkit-details-marker {
  display: none;
}

.lang-summary-content {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lang-flag {
  width: 16px;
  height: 12px;
  object-fit: cover;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.lang-options {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 160px;
  background: var(--glass-bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 6px;
  z-index: 20;
}

.lang-option {
  width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: transparent;
  color: var(--text);
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  text-align: left;
}

.lang-option:hover {
  background: rgba(126, 240, 193, 0.12);
}

.lang-option.is-current,
.lang-option:disabled {
  color: #9aa3ad;
  background: rgba(148, 163, 184, 0.14);
  cursor: default;
  pointer-events: none;
  opacity: 0.9;
}

html[data-theme="light"] .lang-option.is-current,
html[data-theme="light"] .lang-option:disabled {
  color: #7c8794;
  background: rgba(148, 163, 184, 0.2);
}

html[data-theme="light"] .lang-menu select {
  background: rgba(255, 255, 255, 0.75);
}

html[data-theme="light"] .lang-picker summary {
  background: rgba(255, 255, 255, 0.75);
}

.hero-simple {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  text-align: center;
  max-width: 600px;
  width: 100%;
  padding: 0 12px;
}

.hero-simple__image {
  width: 150px;
  height: 150px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 8px;
  transition: border-color 300ms ease;
}

html[data-theme="light"] .hero-simple__image {
  border-color: rgba(0, 0, 0, 0.15);
}

.hero-simple__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-simple__content h1 {
  font-size: 32px;
  line-height: 1.2;
  margin: 12px 0 14px;
  font-weight: 700;
}

.hero-name-primary {
  font-size: clamp(2rem, 6vw, 2.6rem);
  line-height: 1.15;
  margin: 10px 0 6px;
  font-weight: 700;
}

.hero-name-secondary {
  font-size: clamp(1.85rem, 5.4vw, 2.4rem);
  line-height: 1.1;
  margin: 4px 0 10px;
  font-weight: 650;
}

.hero-name-tertiary {
  font-size: clamp(0.95rem, 3.4vw, 1.1rem);
  color: var(--text-secondary);
  margin: 0 0 14px;
  font-weight: 500;
}

.hero-simple__intro {
  font-size: 15px;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 10px;
}

.hero-simple__bio {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 12px;
}

.hero-simple__quote {
  color: var(--accent);
  font-size: 14px;
  font-style: italic;
  line-height: 1.6;
  margin: 12px 0 16px;
  font-weight: 500;
  padding: 14px 16px;
  border-left: 3px solid var(--accent);
  background: rgba(126, 240, 193, 0.05);
  border-radius: 6px;
  min-height: 48px;
  box-shadow: 0 0 8px rgba(126, 240, 193, 0.3);
  transition: background-color 300ms ease, border-color 300ms ease, box-shadow 300ms ease;
  /* Typewriter effect */
  overflow: hidden;
  border-right: 0.15em solid var(--accent);
  white-space: nowrap;
  animation: typewriter 5s steps(70, end), blink-caret 0.75s step-end infinite;
}

html[data-theme="light"] .hero-simple__quote {
  background: rgba(45, 155, 108, 0.1);
  box-shadow: 0 0 8px rgba(45, 155, 108, 0.3);
}

@keyframes typewriter {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink-caret {
  from, to {
    border-right-color: transparent;
  }
  50% {
    border-right-color: var(--accent);
  }
}

.hero-simple__links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 20px;
  justify-content: center;
}

.hero-simple__links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--accent);
  transition: all 0.3s ease;
  margin: 0 6px; /* explicit spacing for wider browser support */
}

html[data-theme="light"] .hero-simple__links a {
  background: rgba(45, 155, 108, 0.1);
  border-color: rgba(45, 155, 108, 0.3);
}

.hero-simple__links a:hover {
  background: rgba(126, 240, 193, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(126, 240, 193, 0.1);
}

html[data-theme="light"] .hero-simple__links a:hover {
  background: rgba(45, 155, 108, 0.25);
  box-shadow: 0 8px 20px rgba(45, 155, 108, 0.15);
}

.home-layout {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
}

.home-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--glass-bg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  transition: transform 260ms ease, box-shadow 260ms ease, border-color 260ms ease;
}

html[data-theme="light"] .home-card {
  background: var(--glass-bg-soft);
  border-color: rgba(255, 255, 255, 0.78);
}

.home-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(126, 240, 193, 0.08), transparent 40%, rgba(244, 191, 114, 0.08));
  opacity: 0.7;
  pointer-events: none;
}

.home-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}

.home-card > * {
  position: relative;
  z-index: 1;
}

.home-card--profile {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  height: 100%;
}

.home-profile__frame {
  width: 170px;
  height: 170px;
  align-self: center;
  border-radius: 50%;
  overflow: hidden;
  border: 6px solid rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
}

html[data-theme="light"] .home-profile__frame {
  border-color: rgba(255, 255, 255, 0.92);
}

.home-profile__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.home-profile__copy {
  text-align: center;
}

.home-profile__name {
  font-size: clamp(2rem, 5vw, 2.85rem);
  line-height: 1.1;
  margin-bottom: 6px;
}

.home-profile__name-en {
  color: var(--muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 600;
}

.home-profile__name-alt {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  margin-top: 8px;
}

.home-profile__subtitle {
  margin-top: 14px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
}

.home-experience {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.home-section-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.home-experience__list {
  display: grid;
  gap: 14px;
  position: relative;
  padding-left: 20px;
}

.home-experience__list::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: linear-gradient(180deg, rgba(126, 240, 193, 0.85), rgba(126, 240, 193, 0.2));
  border-radius: 999px;
}

.home-experience__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 0;
  border: none;
  background: transparent;
}

html[data-theme="light"] .home-experience__item {
  background: transparent;
}

.home-experience__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 4px rgba(126, 240, 193, 0.16);
  flex: none;
  position: absolute;
  left: -20px;
  top: 9px;
}

.home-experience__item--past .home-experience__dot {
  background: #95a0b2;
  box-shadow: 0 0 0 4px rgba(149, 160, 178, 0.18);
}

.home-experience__entry {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.home-experience__name {
  font-weight: 700;
  font-size: 16px;
}

.home-experience__position {
  color: var(--muted);
  font-size: 13px;
}

.home-experience__status-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.home-experience__status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 0;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.home-experience__status--type {
  color: #356a58;
  background: rgba(126, 240, 193, 0.12);
  border: 1px solid rgba(126, 240, 193, 0.32);
}

.home-experience__item--present .home-experience__status {
  color: #1f8b63;
  background: rgba(126, 240, 193, 0.2);
  border: 1px solid rgba(126, 240, 193, 0.4);
}

.home-experience__item--past .home-experience__status {
  color: #64748b;
  background: rgba(148, 163, 184, 0.16);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.home-stack {
  display: grid;
  gap: 18px;
}

.home-card--intro {
  padding: 28px 28px 26px;
  min-height: 290px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
}

.home-card--intro h2 {
  font-size: clamp(1.25rem, 2.1vw, 1.95rem);
  line-height: 1.25;
  margin: 0 0 18px;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  display: block;
  padding: 6px 0 6px 14px;
  border-left: 4px solid var(--accent-2);
}

.home-intro__text {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
  max-width: 760px;
  margin: 0;
}

.home-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
  justify-content: flex-start;
}

.home-chip {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 14px;
  transition: transform 220ms ease, background-color 220ms ease, border-color 220ms ease;
}

.home-chip:hover {
  transform: translateY(-2px);
  background: rgba(126, 240, 193, 0.08);
  border-color: rgba(126, 240, 193, 0.35);
}

.home-bottom-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  gap: 18px;
}

.home-card--social,
.home-card--quote {
  padding: 24px;
  min-height: 132px;
  display: flex;
  flex-direction: column;
}

.home-card--quote {
  justify-content: center;
}

.home-social-grid {
  margin: auto;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.home-social-grid a {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 22px;
  transition: transform 220ms ease, box-shadow 220ms ease, color 220ms ease, border-color 220ms ease, background-color 220ms ease;
}

.home-social-grid a:hover {
  transform: translateY(-3px);
  color: var(--accent);
  border-color: rgba(126, 240, 193, 0.45);
  background: rgba(126, 240, 193, 0.08);
  box-shadow: 0 10px 22px rgba(126, 240, 193, 0.15);
}

.home-quote {
  margin: 0;
  color: var(--accent);
  font-size: 16px;
  font-style: italic;
  line-height: 1.7;
  text-align: left;
  padding: 14px 16px;
  border-left: 3px solid var(--accent);
  background: rgba(126, 240, 193, 0.05);
  border-radius: 6px;
  box-shadow: 0 0 8px rgba(126, 240, 193, 0.2);
}

.home-quote--animated {
  clip-path: inset(0 100% 0 0);
  animation: homeQuoteReveal 3.8s steps(48, end) forwards;
}

html[data-theme="light"] .home-quote {
  background: rgba(45, 155, 108, 0.1);
  box-shadow: 0 0 8px rgba(45, 155, 108, 0.2);
}

@keyframes homeQuoteReveal {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

.card__label {
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.section {
  margin: 48px 0 32px;
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  padding: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.04), transparent 34%),
    var(--cube-face),
    var(--glass-bg-soft);
  backdrop-filter: blur(14px) saturate(135%);
  -webkit-backdrop-filter: blur(14px) saturate(135%);
  box-shadow: var(--cube-shadow), var(--cube-highlight);
  position: relative;
  overflow: hidden;
  transition: transform 240ms ease, box-shadow 240ms ease, background-color 300ms ease, border-color 300ms ease;
  animation: pageBlockReveal 520ms ease both;
}

.section::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 26px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), transparent 36%, rgba(255, 255, 255, 0.02));
  opacity: 0.9;
  pointer-events: none;
}

.section::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, var(--glass-shine) 48%, transparent 100%);
  opacity: 0;
  transform: translateX(-35%);
  transition: opacity 240ms ease, transform 300ms ease;
  pointer-events: none;
  z-index: 0;
}

.section > * {
  position: relative;
  z-index: 1;
}

.section:hover {
  transform: translateY(-5px) rotateX(0.7deg);
  box-shadow: 0 30px 82px rgba(0, 0, 0, 0.34);
}

.section:hover::after {
  opacity: 1;
  transform: translateX(0);
}

html[data-theme="light"] .section {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), transparent 36%),
    var(--cube-face),
    var(--glass-bg-soft);
  border-color: rgba(255, 255, 255, 0.8);
}

.section__header {
  margin-bottom: 12px;
}

.section-cube {
  position: relative;
  margin-top: 28px;
  padding: 22px 22px 26px;
  border-radius: 30px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.05), transparent 34%),
    var(--cube-face),
    rgba(255, 255, 255, 0.02);
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.12), var(--cube-highlight);
  overflow: hidden;
}

.section-cube::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.06) 40%, transparent 76%);
  pointer-events: none;
}

.section-cube > * {
  position: relative;
  z-index: 1;
}

.section-cube > h2 {
  margin-top: 0 !important;
  margin-bottom: 22px !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.section-cube > h2::after {
  content: none !important;
}

.section-cube > .timeline,
.section-cube > .cards,
.section-cube > .about__grid,
.section-cube > .about__item,
.section-cube > div[style*="display: grid"],
.section-cube > div[style*="margin-top: 16px"],
.section-cube > div[style*="margin-top:18px"],
.section-cube > div[style*="margin-top: 18px"] {
  margin-top: 0 !important;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 11px;
  color: var(--accent-2);
  font-weight: 600;
}

h2 {
  font-size: 28px;
  margin-top: 6px;
}

.section h2[style] {
  border-bottom: none !important;
}

.body {
  color: var(--muted);
  max-width: 780px;
}

.section__header .body,
.home-intro__text,
.not-found__text,
.timeline__content p,
.page--fixed-locale .timeline__content > div p,
.about__item p,
.project-filter-empty p,
.card__body p {
  text-align: justify !important;
  text-justify: inter-word;
}

.publication-status {
  margin: 0 0 18px;
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(126, 240, 193, 0.22);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.05), transparent 36%),
    linear-gradient(155deg, rgba(126, 240, 193, 0.08), rgba(244, 191, 114, 0.06)),
    var(--glass-bg);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12), var(--cube-highlight);
}

.publication-status__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.publication-status__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(126, 240, 193, 0.18);
  background: rgba(255, 255, 255, 0.04);
}

.publication-status__label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.publication-status__value {
  min-width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(126, 240, 193, 0.16);
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
}

html[data-theme="light"] .publication-status {
  border-color: rgba(45, 155, 108, 0.18);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), transparent 36%),
    linear-gradient(155deg, rgba(45, 155, 108, 0.08), rgba(217, 119, 6, 0.06)),
    var(--glass-bg-soft);
}

html[data-theme="light"] .publication-status__item {
  border-color: rgba(45, 155, 108, 0.16);
  background: rgba(255, 255, 255, 0.7);
}

html[data-theme="light"] .publication-status__value {
  background: rgba(45, 155, 108, 0.12);
  color: #147a54;
}

.publication-tags {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.publication-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
}

.publication-tag--progress {
  color: #ffd89a;
  background: rgba(244, 191, 114, 0.14);
  border-color: rgba(244, 191, 114, 0.28);
}

.publication-tag--preprint {
  color: #8ed7ff;
  background: rgba(96, 165, 250, 0.14);
  border-color: rgba(96, 165, 250, 0.28);
}

.publication-tag--published {
  color: var(--accent);
  background: rgba(126, 240, 193, 0.14);
  border-color: rgba(126, 240, 193, 0.28);
}

html[data-theme="light"] .publication-tag--progress {
  color: #9a5b00;
  background: rgba(217, 119, 6, 0.12);
  border-color: rgba(217, 119, 6, 0.24);
}

html[data-theme="light"] .publication-tag--preprint {
  color: #1d5fbf;
  background: rgba(96, 165, 250, 0.12);
  border-color: rgba(96, 165, 250, 0.24);
}

html[data-theme="light"] .publication-tag--published {
  color: #147a54;
  background: rgba(45, 155, 108, 0.12);
  border-color: rgba(45, 155, 108, 0.24);
}

.about__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.about__item {
  border: 1px solid var(--glass-border);
  padding: 14px;
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.04), transparent 34%),
    var(--cube-face),
    var(--glass-bg);
  backdrop-filter: blur(12px) saturate(130%);
  -webkit-backdrop-filter: blur(12px) saturate(130%);
  transition: transform 220ms ease, background-color 300ms ease, border-color 300ms ease, box-shadow 220ms ease;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.14), var(--cube-highlight);
  position: relative;
  overflow: hidden;
}

.about__item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 40%, rgba(126, 240, 193, 0.06));
  pointer-events: none;
}

.about__item:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 40px rgba(0, 0, 0, 0.22), var(--cube-highlight);
}

html[data-theme="light"] .about__item {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.76), transparent 36%),
    var(--cube-face),
    rgba(255, 255, 255, 0.66);
  border-color: rgba(255, 255, 255, 0.75);
}

.about-feature-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.about-feature-card {
  position: relative;
  padding: 26px !important;
  border-radius: 24px !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.16), transparent 32%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.12), rgba(126, 240, 193, 0.1) 46%, rgba(244, 191, 114, 0.1)) !important;
  box-shadow: 0 18px 38px rgba(11, 18, 33, 0.16), var(--cube-highlight) !important;
  overflow: hidden;
}

.about-feature-card::after {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--feature-accent, var(--accent)), transparent 82%);
  opacity: 0.9;
}

.about-feature-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.22), color-mix(in srgb, var(--feature-accent, var(--accent)) 18%, transparent), rgba(244, 191, 114, 0.12));
  border: 1px solid color-mix(in srgb, var(--feature-accent, var(--accent)) 28%, rgba(255, 255, 255, 0.2));
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  flex: 0 0 auto;
}

.about-feature-card__icon i {
  font-size: 24px !important;
  color: var(--feature-accent, var(--accent)) !important;
}

.about-feature-card__titlewrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.about-feature-card__eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--feature-accent, var(--accent)) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--feature-accent, var(--accent)) 22%, transparent);
  color: var(--feature-accent, var(--accent));
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.9px;
  text-transform: uppercase;
}

.about-feature-card__title {
  margin: 0 !important;
  font-size: 19px !important;
  font-weight: 700 !important;
  line-height: 1.3;
}

.skill-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 112px));
  grid-auto-rows: 112px;
  justify-content: start;
  gap: 12px;
}

.skill-mini-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 112px;
  aspect-ratio: 1 / 1;
  padding: 14px 12px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--feature-accent, var(--accent)) 22%, rgba(255, 255, 255, 0.14));
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), transparent 46%),
    color-mix(in srgb, var(--feature-accent, var(--accent)) 8%, rgba(255, 255, 255, 0.04));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 10px 20px rgba(15, 23, 42, 0.08);
  text-align: center;
}

.skill-mini-card i,
.skill-mini-card img {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}

.skill-mini-card i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--feature-accent, var(--accent));
  font-size: 20px;
}

.skill-mini-card img {
  object-fit: contain;
}

.skill-logo-badge {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.skill-logo-badge img {
  width: 18px;
  height: 18px;
}

.skill-logo-badge--xilinx {
  background: linear-gradient(145deg, #cf4b31, #8b2c22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 6px 12px rgba(139, 44, 34, 0.28);
}

.skill-lang-badge {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.18), color-mix(in srgb, var(--feature-accent, var(--accent)) 18%, transparent));
  border: 1px solid color-mix(in srgb, var(--feature-accent, var(--accent)) 28%, rgba(255, 255, 255, 0.16));
  color: var(--feature-accent, var(--accent));
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 8px 16px rgba(15, 23, 42, 0.1);
}

.skill-mini-card span {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  word-break: normal;
  overflow-wrap: break-word;
  max-width: 100%;
}

@media (max-width: 720px) {
  .about-feature-card {
    padding: 16px !important;
  }

  .skill-card-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: auto;
    gap: 8px;
  }

  .skill-mini-card {
    min-height: 80px;
    aspect-ratio: unset;
    padding: 10px 8px;
    gap: 6px;
  }

  .skill-mini-card span {
    font-size: 11px;
  }

  .skill-mini-card i {
    font-size: 17px;
  }
}

.about-feature-card--ai {
  --feature-accent: #2a9d8f;
}

.about-feature-card--robotics {
  --feature-accent: #f4a261;
}

.about-feature-card--ic {
  --feature-accent: #e76f51;
}

.about-feature-card--research {
  --feature-accent: #2f80ed;
}

.about-feature-card--technical {
  --feature-accent: #7c5cff;
}

.about-feature-card--soft {
  --feature-accent: #ef476f;
}

.about-feature-card--language {
  --feature-accent: #06d6a0;
}

html[data-theme="light"] .about-feature-card {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.86), transparent 30%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.92), color-mix(in srgb, var(--feature-accent, var(--accent)) 8%, white) 45%, rgba(255, 248, 240, 0.96)) !important;
  border-color: color-mix(in srgb, var(--feature-accent, var(--accent)) 18%, rgba(255, 255, 255, 0.82)) !important;
  box-shadow: 0 18px 34px rgba(31, 41, 55, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.65) inset !important;
}

html[data-theme="light"] .skill-mini-card {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.84), transparent 48%),
    color-mix(in srgb, var(--feature-accent, var(--accent)) 7%, white);
  border-color: color-mix(in srgb, var(--feature-accent, var(--accent)) 18%, rgba(255, 255, 255, 0.82));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76), 0 8px 18px rgba(15, 23, 42, 0.06);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.research-projects-grid .card h3 {
  line-height: 1.35;
  min-height: calc(1.35em * 2);
}

.research-projects-grid .card__body {
  line-height: 1.6;
  min-height: calc(1.6em * 4);
}

.project-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.project-filter__chip {
  appearance: none;
  border: 1px solid rgba(126, 240, 193, 0.24);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(126, 240, 193, 0.08), rgba(244, 191, 114, 0.06));
  color: var(--text);
  padding: 10px 16px;
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.project-filter__chip:hover {
  transform: translateY(-1px);
  border-color: rgba(126, 240, 193, 0.4);
}

.project-filter__chip.is-active {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 28%, white), color-mix(in srgb, var(--accent-2) 20%, white));
  color: #10231f;
  border-color: transparent;
  box-shadow: 0 14px 26px rgba(45, 155, 108, 0.18);
}

.project-filter-empty {
  margin-top: 18px;
  padding: 28px 22px;
  border-radius: 24px;
  border: 1px dashed rgba(126, 240, 193, 0.28);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(126, 240, 193, 0.06));
  text-align: center;
}

.project-filter-empty__icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(126, 240, 193, 0.12));
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.project-filter-empty__icon i {
  font-size: 26px;
}

.project-filter-empty h3 {
  margin: 0 0 8px;
}

.project-filter-empty p {
  margin: 0;
  color: var(--muted);
  text-align: center !important;
}

.research-projects-grid .card.is-hidden,
.publication-item.is-hidden,
.publication-section.is-hidden,
.project-filter-empty.is-hidden {
  display: none !important;
}

.card {
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.05), transparent 36%),
    var(--cube-face),
    var(--glass-bg);
  backdrop-filter: blur(13px) saturate(135%);
  -webkit-backdrop-filter: blur(13px) saturate(135%);
  min-height: 180px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
  transition: transform 220ms ease, background-color 300ms ease, border-color 300ms ease, box-shadow 220ms ease;
  animation: pageBlockReveal 560ms ease both;
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.16), var(--cube-highlight);
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 10%, rgba(126, 240, 193, 0.12), transparent 42%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 40%, rgba(244, 191, 114, 0.08));
  pointer-events: none;
  z-index: 0;
}

.card > * {
  position: relative;
  z-index: 1;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 26px 48px rgba(0, 0, 0, 0.24), var(--cube-highlight);
}

html[data-theme="light"] .card {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), transparent 36%),
    var(--cube-face),
    rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.78);
}

.card__meta {
  color: var(--muted);
  font-size: 13px;
}

.card__body {
  color: var(--muted);
}

.card__links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: auto;
}

.card__links a {
  font-weight: 600;
  font-size: 14px;
}

/* Project Button Styling */
.project-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(126, 240, 193, 0.12), rgba(244, 191, 114, 0.1));
  border: 1.5px solid rgba(126, 240, 193, 0.55);
  color: var(--accent);
  text-decoration: none;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 24px rgba(11, 18, 33, 0.12), var(--cube-highlight);
  position: relative;
  overflow: hidden;
}

.project-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(126, 240, 193, 0.2), transparent);
  transition: left 0.5s ease;
}

.project-btn:hover::before {
  left: 100%;
}

.project-btn:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(126, 240, 193, 0.18), rgba(244, 191, 114, 0.14));
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(11, 18, 33, 0.2), 0 0 0 1px rgba(126, 240, 193, 0.12) inset;
  color: var(--accent);
  border-color: var(--accent);
}

.project-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(126, 240, 193, 0.2);
}

.project-btn i {
  font-size: 14px;
  transition: transform 0.3s ease;
}

.project-btn:hover i {
  transform: translateX(2px);
}

html[data-theme="light"] .project-btn {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(45, 155, 108, 0.1), rgba(217, 119, 6, 0.08));
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 10px 24px rgba(45, 155, 108, 0.12), var(--cube-highlight);
}

html[data-theme="light"] .project-btn::before {
  background: linear-gradient(90deg, transparent, rgba(45, 155, 108, 0.15), transparent);
}

html[data-theme="light"] .project-btn:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(45, 155, 108, 0.16), rgba(217, 119, 6, 0.12));
  box-shadow: 0 16px 28px rgba(45, 155, 108, 0.22);
  border-color: var(--accent);
  color: var(--accent);
}

.timeline {
  position: relative;
  padding-left: 50px;
  transition: background-color 300ms ease, border-color 300ms ease;
}

/* Vertical timeline line */
.timeline::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-2) 100%);
  border-radius: 2px;
}

html[data-theme="light"] .timeline__item {
  background: rgba(45, 155, 108, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
  display: grid;
  gap: 14px;
}

.timeline__item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(180px, 230px) 1fr;
  gap: 8px;
  padding: 14px;
  margin-bottom: 30px;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px) saturate(130%);
  -webkit-backdrop-filter: blur(12px) saturate(130%);
  transition: transform 220ms ease, border-color 240ms ease, box-shadow 220ms ease;
  animation: pageBlockReveal 620ms ease both;
}

.timeline__item:hover {
  transform: translateY(-2px);
  border-color: rgba(126, 240, 193, 0.35);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.2);
}

/* Center any logo image inside the date column */
.timeline__item .timeline__date {
  position: relative;
}

/* Default logo/image styling inside date column */
.timeline__item .timeline__date img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Timeline dot/circle */
.timeline__item::before {
  content: "";
  position: absolute;
  left: -38px;
  top: 20px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 4px var(--bg), 0 0 12px rgba(126, 240, 193, 0.4);
  z-index: 1;
}

.timeline__date {
  color: var(--accent);
  font-weight: 600;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  /* Align date with the position title top padding */
  align-self: start;
  padding-top: var(--timeline-date-offset);
}

/* When the date column contains a logo/image, center it vertically */
.timeline__date:has(img),
.timeline__date--with-logo {
  align-self: stretch;        /* take full row height */
  padding-top: 0;             /* base: no padding, handled on first child */
  display: flex;
  flex-direction: column;
}

/* Center direct image or wrapper flex box */
.timeline__date:has(img) > img,
.timeline__date--with-logo > img {
  margin: auto 0;             /* vertically center direct image */
}

.timeline__date:has(img) > div,
.timeline__date--with-logo > div {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;    /* center image inside provided wrapper */
}

/* Ensure the date text aligns with the content title top padding */
.timeline__date:has(img) > :first-child,
.timeline__date--with-logo > .date-text {
  padding-top: var(--timeline-date-offset);
}

/* Keep Experience role title height stable after localization */
.exp-role-title {
  display: block;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

/* Keep Experience/Work page height consistent across languages */
.page--fixed-locale .timeline__date:not(:has(img)) {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.page--fixed-locale .timeline__date:has(img) {
  min-width: 0;
  overflow: hidden;
  justify-content: flex-start !important;
  align-items: flex-start !important;
  gap: 18px;
}

.page--fixed-locale .timeline__date--with-logo {
  min-width: 0;
  overflow: hidden;
  justify-content: flex-start !important;
  align-items: flex-start !important;
  gap: 18px;
}

.page--fixed-locale .timeline__date:has(img) > span {
  display: block;
  min-width: 0;
  max-width: 100%;
  flex: 0 1 auto;
  line-height: 1.35;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.page--fixed-locale .timeline__date--with-logo > span {
  display: block;
  min-width: 0;
  max-width: 100%;
  flex: 0 1 auto;
  line-height: 1.35;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.page--fixed-locale .timeline__date:has(img) > img {
  margin: 12px 0 0 0;
  align-self: center;
}

.page--fixed-locale .timeline__date--with-logo > img {
  margin: 12px 0 0 0;
  align-self: center;
}

.page--fixed-locale .timeline__content h3,
.page--fixed-locale .timeline__content > p {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.page--fixed-locale .timeline__content > div p {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

/* Prevent page-width shrink in CJK locales and keep action rows stable */
.page--fixed-locale > .section {
  width: 100%;
}

.page--fixed-locale .timeline__content {
  min-width: 0;
}

.page--fixed-locale .timeline__content > div[style*="flex-wrap: wrap"] {
  flex-wrap: nowrap !important;
  overflow: hidden;
}

.page--fixed-locale .compact-btn {
  min-width: 0;
  max-width: 220px;
}

.page--fixed-locale .compact-btn span {
  display: block;
  min-width: 0;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

/* Timeline date column tidy alignment */
.timeline__item {
  grid-template-columns: minmax(170px, 220px) 1fr;
  gap: 14px;
}

.timeline__date {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
  padding-top: var(--timeline-date-offset);
}

.timeline__date > span,
.timeline__date > .date-text {
  display: block;
  line-height: 1.35;
}

.timeline__date img {
  align-self: flex-start;
}

.timeline__date--with-logo {
  padding-top: 4px;
}

.timeline__date--with-logo > img {
  margin: 4px 0 0;
}

@keyframes pageBlockReveal {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

/* Compact button variant for CV/Experience pages */
.compact-btn {
  padding: 8px 14px !important;
  font-size: 13px !important;
  border-radius: 14px !important;
  gap: 6px !important;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(126, 240, 193, 0.1), rgba(244, 191, 114, 0.08));
  border: 1px solid rgba(126, 240, 193, 0.32);
  box-shadow: 0 10px 22px rgba(11, 18, 33, 0.12), var(--cube-highlight);
}

.compact-btn i {
  font-size: 14px !important;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn--primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #0f172a;
}

.btn--ghost {
  border-color: var(--border);
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.footer {
  width: 100%;
  max-width: var(--max);
  text-align: center;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding: 32px 20px 12px;
  transition: color 300ms ease;
  margin-top: 32px;
}

.footer p {
  text-align: center;
}

.toggle-wrapper {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 30px;
  flex-shrink: 0;
  cursor: pointer;
  z-index: 1;
}

.toggle-wrapper input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  visibility: hidden;
  z-index: -1;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 60px !important;
  height: 30px !important;
  background-color: #4a5568 !important;
  transition: 0.4s;
  border-radius: 34px;
  display: block !important;
  box-sizing: border-box;
  z-index: 1;
}

.toggle-slider::before {
  position: absolute;
  content: "" !important;
  height: 22px !important;
  width: 22px !important;
  left: 4px;
  bottom: 4px;
  background-color: #ffffff !important;
  transition: 0.4s;
  border-radius: 50%;
  display: block !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  z-index: 2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a5568' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 12px 12px !important;
}

input:checked + .toggle-slider {
  background-color: var(--accent) !important;
}

input:checked + .toggle-slider::before {
  transform: translateX(30px) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f59e0b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2'/%3E%3Cpath d='M12 20v2'/%3E%3Cpath d='m4.93 4.93 1.41 1.41'/%3E%3Cpath d='m17.66 17.66 1.41 1.41'/%3E%3Cpath d='M2 12h2'/%3E%3Cpath d='M20 12h2'/%3E%3Cpath d='m6.34 17.66-1.41 1.41'/%3E%3Cpath d='m19.07 4.93-1.41 1.41'/%3E%3C/svg%3E") !important;
}

.toggle-slider:hover {
  opacity: 0.9;
}

html[data-theme="light"] .toggle-slider {
  background-color: #0b1221 !important;
}

html[data-theme="light"] input:checked + .toggle-slider {
  background-color: var(--accent) !important;
}

/* Tablet devices (768px and below) */
@media (max-width: 768px) {
  .nav__links .lang-menu {
    position: static;
    right: auto;
    width: 100%;
    margin-top: 10px;
  }

  .nav__links .lang-picker {
    width: 100%;
  }

  .nav__links .lang-picker summary {
    width: 100%;
    border-radius: 10px;
    display: flex;
    align-items: center;
  }

  .nav__links .lang-options {
    left: 0;
    right: auto;
    width: 100%;
  }

  .page--fixed-locale .timeline__content > div[style*="flex-wrap: wrap"] {
    flex-wrap: wrap !important;
  }

  .page--fixed-locale .compact-btn {
    max-width: 100%;
  }

  body {
    font-size: 15px;
    padding: 24px 12px;
  }

  .nav {
    position: static;
    padding: 16px 20px;
    padding-right: 20px; /* remove extra padding */
    gap: 12px;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .nav__brand {
    font-size: 18px;
    position: static;
  }

  .nav__brand img {
    height: 26px;
  }

  .nav__hamburger {
    display: block;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 84px;
    z-index: 13;
  }

  .nav__links {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 250px;
    background: var(--card);
    flex-direction: column;
    gap: 24px;
    padding: 80px 24px 24px;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
    transition: right 0.3s ease;
    z-index: 999;
    justify-content: flex-start;
    align-items: flex-start;
    border-left: 1px solid var(--border);
  }

  .nav__close {
    display: block;
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text);
    font-size: 28px;
    cursor: pointer;
    padding: 8px;
    z-index: 1000;
    transition: color 0.3s ease;
  }

  .nav__close:hover {
    color: var(--accent);
  }

  .nav__links.active {
    right: 0;
  }

  .nav__links a,
  .nav__current {
    font-size: 18px;
    padding: 12px 0;
    width: 100%;
    border-bottom: 1px solid var(--border);
  }

  .toggle-wrapper {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 13;
    width: 60px;
    height: 30px;
  }

  .lang-menu {
    right: 112px;
  }

  .lang-menu select {
    font-size: 11px;
    padding: 5px 9px;
  }

  .lang-picker summary {
    font-size: 11px;
    padding: 5px 9px;
  }

  .page {
    padding: 0 8px;
  }

  .hero-simple {
    gap: 16px;
    padding: 40px 12px;
  }

  .hero-simple__image {
    width: 135px;
    height: 135px;
  }

  .hero-simple__content h1 {
    font-size: 26px;
  }

  .hero-name-primary {
    font-size: clamp(1.9rem, 5.5vw, 2.4rem);
    margin: 8px 0 6px;
  }

  .hero-name-secondary {
    font-size: clamp(1.7rem, 5vw, 2.2rem);
    margin: 2px 0 8px;
  }

  .hero-name-tertiary {
    font-size: clamp(0.9rem, 3.2vw, 1.05rem);
    margin-bottom: 12px;
  }

  .hero-simple__intro {
    font-size: 14px;
    padding: 0 8px;
  }

  .hero-simple__bio {
    font-size: 13px;
    padding: 0 8px;
  }

  .hero-simple__quote {
    white-space: normal;
    animation: none;
    border-right: none;
    width: 100%;
    padding: 12px 16px;
    font-size: 13px;
    word-wrap: break-word;
    overflow: visible;
  }

  .section__header h1 {
    font-size: 24px;
  }

  .about__grid {
    grid-template-columns: 1fr;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .timeline__item {
    grid-template-columns: 1fr;
  }

  .btn {
    font-size: 14px;
    padding: 10px 20px;
  }
}

/* Mobile devices (480px and below) */
@media (max-width: 480px) {
  body {
    font-size: 14px;
    padding: 10px 8px;
  }

  .nav {
    padding: 12px 18px;
    padding-right: 16px;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: space-between;
    position: relative;
  }

  .nav__brand {
    position: static;
    left: auto;
    font-size: 16px;
    margin-left: 4px;
  }

  .nav__brand img {
    height: 24px;
  }

  .nav__links {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 240px;
    background: var(--card);
    flex-direction: column;
    gap: 20px;
    padding: 72px 20px 20px;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
    transition: right 0.3s ease;
    z-index: 999;
    justify-content: flex-start;
    align-items: flex-start;
    border-left: 1px solid var(--border);
  }

  .nav__close {
    display: block;
    position: absolute;
    top: 18px;
    right: 18px;
    background: none;
    border: none;
    color: var(--text);
    font-size: 26px;
    cursor: pointer;
    padding: 6px;
    z-index: 1000;
    transition: color 0.3s ease;
  }

  .nav__close:hover {
    color: var(--accent);
  }

  .nav__links.active {
    right: 0;
  }

  .nav__links a,
  .nav__current {
    font-size: 16px;
    padding: 10px 0;
    width: 100%;
    border-bottom: 1px solid var(--border);
  }

  .toggle-wrapper {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 25px;
    z-index: 13;
  }

  .lang-menu {
    right: 86px;
  }

  .lang-menu select {
    font-size: 10px;
    padding: 4px 8px;
  }

  .lang-picker summary {
    font-size: 10px;
    padding: 4px 8px;
  }

  .toggle-slider {
    width: 50px !important;
    height: 25px !important;
  }

  .toggle-slider::before {
    height: 18px !important;
    width: 18px !important;
    background-size: 10px 10px !important;
  }

  input:checked + .toggle-slider::before {
    transform: translateX(25px) !important;
  }

  .nav__hamburger {
    display: block;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 70px;
    z-index: 13;
  }

  .hero-simple {
    gap: 12px;
    padding: 30px 16px;
  }

  .hero-simple__image {
    width: 120px;
    height: 120px;
  }

  .hero-simple__content h1 {
    font-size: 22px;
    margin: 8px 0 10px;
  }

  .hero-name-primary {
    font-size: clamp(1.8rem, 6vw, 2.2rem);
    margin: 6px 0 4px;
  }

  .hero-name-secondary {
    font-size: clamp(1.6rem, 5.5vw, 2rem);
    margin: 2px 0 6px;
  }

  .hero-name-tertiary {
    font-size: clamp(0.88rem, 3.5vw, 1rem);
    margin-bottom: 10px;
  }

  .hero-simple__intro {
    font-size: 14px;
  }

  .hero-simple__quote {
    font-size: 13px;
    padding: 10px 12px;
    border-radius: 4px;
  }

  .hero-simple__links {
    gap: 12px;
    margin-top: 16px;
  }

  .hero-simple__links a {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  .page {
    padding: 18px 14px;
  }

  .section {
    padding: 16px;
    margin: 20px 0 18px;
    border-radius: 14px;
  }

  .section__header {
    margin-bottom: 20px;
  }

  .section__header h1 {
    font-size: 20px;
    margin: 8px 0;
  }

  .eyebrow {
    font-size: 12px;
    letter-spacing: 0.5px;
  }

  h2 {
    font-size: 18px !important;
    margin-top: 24px !important;
    margin-bottom: 12px !important;
  }

  h3 {
    font-size: 15px;
  }

  .card {
    padding: 12px;
  }

  .card__meta {
    font-size: 12px;
  }

  .card__body {
    font-size: 13px;
  }

  .timeline__date {
    font-size: 13px;
    min-width: 80px;
  }

  .timeline {
    padding-left: 35px;
  }

  .timeline::before {
    left: 12px;
    width: 2px;
  }

  .timeline__item {
    grid-template-columns: 90px 1fr;
    gap: 10px;
    padding: 10px;
    margin-bottom: 20px;
  }

  .timeline__item::before {
    left: -27px;
    top: 14px;
    width: 12px;
    height: 12px;
    border-width: 2px;
  }

  .timeline__content {
    padding-left: 12px;
  }

  .timeline__content h3 {
    font-size: 15px;
    margin: 0 0 6px 0;
  }

  .timeline__content p {
    font-size: 13px;
    margin: 4px 0;
  }

  .about__item {
    padding: 12px;
  }

  .about__item h3 {
    font-size: 15px;
    margin-bottom: 8px;
  }

  .about__item p {
    font-size: 13px;
  }

  .btn {
    font-size: 13px;
    padding: 9px 16px;
  }

  .footer {
    padding: 24px 16px 12px;
    font-size: 13px;
  }
}

/* Very small phones (360px and below) */
@media (max-width: 360px) {
  .nav__links a,
  .nav__current {
    font-size: 12px;
    padding: 8px 6px;
  }

  .nav__brand img {
    height: 22px;
  }

  .hero-simple__image {
    width: 100px;
    height: 100px;
  }

  .hero-simple__content h1 {
    font-size: 20px;
  }

  .section__header h1 {
    font-size: 18px;
  }
}

@media (max-width: 860px) {
  .timeline__item {
    grid-template-columns: 1fr;
  }

  .timeline__date,
  .timeline__date--with-logo {
    padding-top: 0;
    gap: 8px;
  }

  .nav {
    position: static;
  }

  .home-layout {
    grid-template-columns: 1fr;
  }

  .home-bottom-grid {
    grid-template-columns: 1fr;
  }

  .home-card--profile,
  .home-card--intro,
  .home-card--social,
  .home-card--quote {
    padding: 22px;
  }

  .home-profile__frame {
    width: 150px;
    height: 150px;
  }

  .home-profile__name {
    font-size: clamp(1.8rem, 5vw, 2.4rem);
  }

  .home-card--intro h2 {
    white-space: normal;
  }

  .home-social-grid {
    flex-wrap: wrap;
    gap: 8px;
  }

  .home-social-grid a {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .section,
  .card,
  .timeline__item,
  .about__item {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }

  .section::after,
  .card::after {
    display: none;
  }

  .timeline--work::before,
  .timeline--work .timeline__item::before {
    animation: none !important;
  }
}

/* Work timeline: reference-inspired centered alternating layout */
.timeline--work {
  --work-gap: 54px;
  --work-logo-slot: 112px;
  --work-marker-size: 18px;
  padding-left: 0;
  max-width: 1120px;
  margin-inline: auto;
}

.timeline--work::before {
  left: 50%;
  top: 22px;
  bottom: 22px;
  width: 4px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(126, 240, 193, 0.95), rgba(217, 119, 6, 0.85));
  animation: timelineRailGlow 4.8s ease-in-out infinite;
}

.timeline--work .timeline__item {
  --tl-delay: 0ms;
  --timeline-accent: #c95c42;
  --timeline-accent-soft: #e76f51;
  --timeline-glow: rgba(231, 111, 81, 0.26);
  --timeline-surface: rgba(231, 111, 81, 0.14);
  --accent: var(--timeline-accent);
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: var(--work-gap);
  row-gap: 14px;
  align-items: start;
  margin-bottom: 40px;
  padding: 0;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  opacity: 0;
  animation: timelineItemEnter 620ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--tl-delay);
}

.timeline--work .timeline__item:nth-child(1) { --tl-delay: 40ms; }
.timeline--work .timeline__item:nth-child(2) { --tl-delay: 120ms; }
.timeline--work .timeline__item:nth-child(3) { --tl-delay: 200ms; }
.timeline--work .timeline__item:nth-child(4) { --tl-delay: 280ms; }
.timeline--work .timeline__item:nth-child(5) { --tl-delay: 360ms; }
.timeline--work .timeline__item:nth-child(6) { --tl-delay: 440ms; }
.timeline--work .timeline__item:nth-child(7) { --tl-delay: 520ms; }
.timeline--work .timeline__item:nth-child(8) { --tl-delay: 600ms; }

.timeline--work .timeline__item:nth-child(4n + 2) {
  --timeline-accent: #d88944;
  --timeline-accent-soft: #f4a261;
  --timeline-glow: rgba(244, 162, 97, 0.26);
  --timeline-surface: rgba(244, 162, 97, 0.14);
}

.timeline--work .timeline__item:nth-child(4n + 3) {
  --timeline-accent: #c7a64b;
  --timeline-accent-soft: #e9c46a;
  --timeline-glow: rgba(233, 196, 106, 0.26);
  --timeline-surface: rgba(233, 196, 106, 0.14);
}

.timeline--work .timeline__item:nth-child(4n + 4) {
  --timeline-accent: #1f7f74;
  --timeline-accent-soft: #2a9d8f;
  --timeline-glow: rgba(42, 157, 143, 0.26);
  --timeline-surface: rgba(42, 157, 143, 0.14);
}

.timeline--work .timeline__item::before {
  left: calc(50% - (var(--work-marker-size) / 2));
  top: 18px;
  width: var(--work-marker-size);
  height: var(--work-marker-size);
  border-color: var(--timeline-accent);
  animation: timelineMarkerPulse 2.8s ease-in-out infinite;
  animation-delay: calc(var(--tl-delay) + 120ms);
}

.timeline--work .timeline__item::after {
  content: none;
}

.timeline--work .timeline__date,
.timeline--work .timeline__content {
  width: 100%;
  box-sizing: border-box;
}

.timeline--work .timeline__item:nth-child(odd) .timeline__date,
.timeline--work .timeline__item:nth-child(odd) .timeline__content {
  grid-column: 1;
  justify-self: stretch;
}

.timeline--work .timeline__item:nth-child(even) .timeline__date,
.timeline--work .timeline__item:nth-child(even) .timeline__content {
  grid-column: 2;
  justify-self: stretch;
}

.timeline--work .timeline__date {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-height: 0;
  padding: 18px 26px 14px 26px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  text-align: left;
  white-space: normal;
  overflow: visible;
  border-radius: 28px 28px 0 0;
  background: linear-gradient(135deg, var(--timeline-accent), var(--timeline-accent-soft));
  box-shadow: 0 16px 26px var(--timeline-glow);
}

.timeline--work .timeline__item:nth-child(odd) .timeline__date::after,
.timeline--work .timeline__item:nth-child(even) .timeline__date::after {
  content: "";
  position: absolute;
  top: 100%;
  width: 16px;
  height: 18px;
  background: linear-gradient(135deg, var(--timeline-accent), var(--timeline-accent-soft));
}

.timeline--work .timeline__item:nth-child(odd) .timeline__date::after {
  right: 0;
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

.timeline--work .timeline__item:nth-child(even) .timeline__date::after {
  left: 0;
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.timeline--work .timeline__date .timeline__type-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.timeline--work .timeline__content {
  position: relative;
  min-height: 148px;
  min-width: 0;
  padding: 20px 24px 18px !important;
  border-radius: 0 0 22px 22px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-top: 4px solid var(--timeline-accent) !important;
  background:
    radial-gradient(circle at 12% 16%, var(--timeline-glow), transparent 42%),
    linear-gradient(145deg, var(--timeline-surface), rgba(255, 255, 255, 0.02)) var(--bg) !important;
  box-shadow: 0 18px 34px rgba(11, 18, 33, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.timeline--work .timeline__item:nth-child(even) .timeline__content {
  border-radius: 0 0 22px 22px !important;
}

.timeline--work .timeline__content::before {
  content: none;
  position: absolute;
  top: 12px;
  left: 18px;
  right: 18px;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.18), transparent);
  pointer-events: none;
}

.timeline--work .timeline__item:hover .timeline__content {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.14) !important;
  box-shadow: 0 24px 42px rgba(11, 18, 33, 0.24), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

@keyframes timelineItemEnter {
  0% {
    opacity: 0;
    transform: translateY(14px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes timelineMarkerPulse {
  0%,
  100% {
    box-shadow: 0 0 0 4px var(--card), 0 0 0 0 var(--timeline-glow);
  }
  50% {
    box-shadow: 0 0 0 4px var(--card), 0 0 0 8px var(--timeline-glow);
  }
}

@keyframes timelineRailGlow {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.2);
  }
}

.timeline--work .timeline__logo {
  position: absolute;
  left: 24px;
  top: 26px;
  width: auto;
  max-width: var(--work-logo-slot);
  max-height: 72px;
  object-fit: contain;
}

.timeline--work .timeline__content h3 {
  font-size: 17px !important;
  line-height: 1.3;
  margin-bottom: 6px !important;
}

.timeline--work .timeline__content p {
  font-size: 13.5px !important;
  line-height: 1.55 !important;
}


.timeline--work .timeline__content:has(.timeline__logo) {
  min-height: 170px;
  padding-left: calc(var(--work-logo-slot) + 40px) !important;
}

.timeline--work .timeline__content > div[style*="flex-wrap: wrap"] {
  flex-wrap: wrap !important;
  overflow: visible !important;
  gap: 10px 12px !important;
  align-items: stretch;
}

.timeline--work .timeline__content:not(:has(.timeline__logo)) {
  padding-left: 24px !important;
}

.timeline--work .timeline__content .compact-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px !important;
  min-height: 48px;
  padding: 10px 16px !important;
  border-radius: 14px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  white-space: normal !important;
  text-align: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), var(--timeline-surface)) !important;
  border: 1px solid color-mix(in srgb, var(--timeline-accent) 60%, white 8%) !important;
  color: var(--timeline-accent) !important;
  box-shadow: 0 8px 18px rgba(11, 18, 33, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.timeline--work .timeline__content .compact-btn:hover {
  transform: translateY(-2px);
  border-color: var(--timeline-accent) !important;
  box-shadow: 0 12px 22px var(--timeline-glow);
}

.timeline--work .timeline__content .compact-btn span {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

.timeline--work .timeline__content .compact-btn i {
  font-size: 15px !important;
  flex: 0 0 auto;
}

.work-meta {
  margin: 8px 0 12px;
  display: grid;
  gap: 6px;
  padding: 2px 0 2px;
  border-bottom: none;
}

.work-meta-line {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--timeline-accent);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.35;
}

.work-meta-line i {
  font-size: 15px;
  flex: 0 0 auto;
}

.work-meta-line--division {
  width: fit-content;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--timeline-glow);
  background: var(--timeline-surface);
  color: var(--timeline-accent);
  font-weight: 600;
  font-size: 12.5px;
}

html[data-theme="light"] .work-meta-line--division {
  background: var(--timeline-surface);
  border-color: var(--timeline-glow);
  color: var(--timeline-accent);
}

/* Centered timeline responsive refinements */
@media (max-width: 980px) {
  .timeline--work {
    --work-gap: 34px;
    --work-logo-slot: 92px;
  }

  .timeline--work .timeline__date {
    font-size: 14px;
    padding: 16px 20px 13px;
  }

  .timeline--work .timeline__content {
    border-radius: 20px !important;
  }

  .timeline--work .timeline__item:nth-child(even) .timeline__content {
    border-radius: 0 0 20px 20px !important;
  }

  .timeline--work .timeline__content:has(.timeline__logo) {
    padding-left: calc(var(--work-logo-slot) + 34px) !important;
  }

  .timeline--work .timeline__content:not(:has(.timeline__logo)) {
    padding-left: 16px !important;
  }

  .timeline--work .timeline__logo {
    max-width: var(--work-logo-slot);
    max-height: 58px;
  }
}

@media (max-width: 860px) {
  .timeline--work {
    padding-left: 28px;
  }

  .timeline--work::before {
    left: 10px;
    transform: none;
  }

  .timeline--work .timeline__item {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 28px;
  }

  .timeline--work .timeline__item::after {
    content: none;
  }

  .timeline--work .timeline__item::before {
    left: -27px;
    top: 14px;
  }

  .timeline--work .timeline__date,
  .timeline--work .timeline__content,
  .timeline--work .timeline__item:nth-child(odd) .timeline__date,
  .timeline--work .timeline__item:nth-child(odd) .timeline__content,
  .timeline--work .timeline__item:nth-child(even) .timeline__date,
  .timeline--work .timeline__item:nth-child(even) .timeline__content {
    grid-column: 1;
    justify-self: stretch;
    width: 100%;
  }

  .timeline--work .timeline__date {
    white-space: normal;
    font-size: 15px;
    min-height: 0;
    padding: 15px 16px 12px;
    border-radius: 18px 18px 0 0;
  }

  .timeline--work .timeline__date::after {
    left: 0 !important;
    right: auto !important;
    width: 14px;
    height: 14px;
    clip-path: polygon(0 0, 100% 0, 100% 100%) !important;
  }

  .timeline--work .timeline__content,
  .timeline--work .timeline__item:nth-child(even) .timeline__content {
    min-height: 0;
    border-radius: 0 0 18px 18px !important;
  }

  .timeline--work .timeline__content:has(.timeline__logo) {
    padding: 78px 14px 14px !important;
  }

  .timeline--work .timeline__content:not(:has(.timeline__logo)) {
    padding-left: 14px !important;
  }

  .timeline--work .timeline__content .compact-btn {
    min-height: 44px;
    width: auto;
    padding: 9px 14px !important;
  }

  .timeline--work .timeline__logo {
    left: 14px;
    top: 18px;
    max-width: 60px;
    max-height: 44px;
  }
}

/* Publication button hover effects */
a[href*="arxiv.org"]:hover,
a[href*="ieeexplore.ieee.org"]:hover,
a[href*="Updating.html"]:hover {
  background: rgba(126, 240, 193, 0.25) !important;
  border-color: var(--accent) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(126, 240, 193, 0.2);
}

a[href*="arxiv.org"]:active,
a[href*="ieeexplore.ieee.org"]:active,
a[href*="Updating.html"]:active {
  transform: translateY(0px);
}

/* Mobile nav polish: rounded panel, depth, and cleaner touch targets */
@media (max-width: 768px) {
  .nav__links {
    top: 10px;
    height: calc(100vh - 20px);
    width: min(82vw, 320px);
    padding: 82px 22px 22px;
    border-left: 1px solid var(--border);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px 0 0 24px;
    background:
      linear-gradient(165deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02)),
      var(--card);
    box-shadow: -14px 0 36px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(6px) saturate(120%);
    -webkit-backdrop-filter: blur(6px) saturate(120%);
  }

  .nav__links a,
  .nav__current {
    border-radius: 10px;
    padding: 11px 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.28);
  }

  .nav__links a:hover {
    background: rgba(126, 240, 193, 0.12);
    border-bottom-color: rgba(126, 240, 193, 0.5);
  }

  .nav__close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav__links .lang-menu {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
  }

  .nav__links .lang-picker summary {
    border-radius: 14px;
    padding: 8px 10px;
  }
}

@media (max-width: 480px) {
  .nav__links {
    top: 8px;
    height: calc(100vh - 16px);
    width: min(86vw, 300px);
    border-radius: 22px 0 0 22px;
    padding: 76px 18px 18px;
  }
}

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

.showcase-card {
  position: relative;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(126, 240, 193, 0.24);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.12), transparent 34%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.08), rgba(126, 240, 193, 0.08) 52%, rgba(244, 191, 114, 0.08));
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.14), var(--cube-highlight);
  overflow: hidden;
}

.showcase-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), transparent 80%);
  opacity: 0.9;
}

.showcase-card__top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.showcase-card__icon {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(126, 240, 193, 0.18));
  border: 1px solid rgba(126, 240, 193, 0.24);
  color: var(--accent);
  flex: 0 0 auto;
}

.showcase-card__icon i,
.showcase-card__icon img {
  max-width: 26px;
  max-height: 26px;
  font-size: 24px;
}

.showcase-card__body {
  min-width: 0;
  flex: 1;
}

.showcase-card__title {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
}

.showcase-card__title-link {
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.25s ease, transform 0.25s ease;
}

.showcase-card__title-link:hover {
  color: var(--accent);
  transform: translateX(2px);
}

.showcase-card__meta {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.showcase-badges {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.showcase-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(126, 240, 193, 0.28);
  background: rgba(126, 240, 193, 0.12);
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  transition: transform 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

.showcase-badge:hover {
  transform: translateY(-2px);
  background: rgba(126, 240, 193, 0.18);
  border-color: rgba(126, 240, 193, 0.4);
}

html[data-theme="light"] .showcase-card {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.76), transparent 34%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.92), rgba(45, 155, 108, 0.08) 52%, rgba(217, 119, 6, 0.08));
  border-color: rgba(45, 155, 108, 0.18);
}

html[data-theme="light"] .showcase-badge {
  background: rgba(45, 155, 108, 0.08);
  border-color: rgba(45, 155, 108, 0.24);
  color: #147a54;
}

.page--not-found {
  align-items: center;
}

.not-found {
  position: relative;
  width: 100%;
  max-width: 780px;
  padding: 40px;
  border-radius: 32px;
  border: 1px solid var(--glass-border);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.08), transparent 32%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.06), rgba(126, 240, 193, 0.08) 56%, rgba(244, 191, 114, 0.08)),
    var(--glass-bg);
  box-shadow: var(--cube-shadow), var(--cube-highlight);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  overflow: hidden;
}

.not-found::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, var(--glass-shine) 36%, transparent 68%);
  pointer-events: none;
}

.not-found__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(126, 240, 193, 0.28);
  background: rgba(126, 240, 193, 0.12);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.not-found__title {
  margin-top: 20px;
  font-size: clamp(54px, 13vw, 120px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.not-found__subtitle {
  margin-top: 18px;
  font-size: clamp(24px, 4vw, 36px);
  line-height: 1.15;
}

.not-found__text {
  margin-top: 18px;
  max-width: 560px;
  color: var(--muted);
  font-size: 17px;
}

.not-found__actions {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.not-found__button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 999px;
  border: 1px solid rgba(126, 240, 193, 0.28);
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.25s ease, border-color 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}

.not-found__button:hover {
  transform: translateY(-2px);
}

.not-found__button--primary {
  background: linear-gradient(135deg, rgba(126, 240, 193, 0.22), rgba(244, 191, 114, 0.18));
  color: var(--text);
}

.not-found__button--primary:hover {
  border-color: rgba(126, 240, 193, 0.48);
}

html[data-theme="light"] .not-found {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.72), transparent 32%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.92), rgba(45, 155, 108, 0.08) 56%, rgba(217, 119, 6, 0.08)),
    var(--glass-bg-soft);
}

html[data-theme="light"] .not-found__eyebrow {
  background: rgba(45, 155, 108, 0.1);
  border-color: rgba(45, 155, 108, 0.24);
  color: #147a54;
}

html[data-theme="light"] .not-found__button--primary {
  background: linear-gradient(135deg, rgba(45, 155, 108, 0.16), rgba(217, 119, 6, 0.12));
}

@media (max-width: 768px) {
  .not-found {
    padding: 28px 22px;
    border-radius: 26px;
  }

  .not-found__text {
    font-size: 16px;
  }

  .not-found__actions {
    flex-direction: column;
  }

  .not-found__button {
    width: 100%;
    justify-content: center;
  }
}
