/* Inter font loaded via <link> in HTML for non-blocking rendering */

/* ===== Dark Blue/Teal Design System ===== */
:root {
  --color-bg: #0a1628;
  --color-surface: #030b14;
  --color-surface-alt: #071521;
  --color-border: rgba(34, 211, 238, 0.1);
  --color-border-hover: rgba(34, 211, 238, 0.2);
  --color-text-primary: #ffffff;
  --color-text-secondary: #d6d0e0;
  --color-text-tertiary: #8a7fa0;
  --color-accent: #22d3ee;
  --color-accent-light: #0c1a2e;
  --color-accent-hover: #38bdf8;
  --color-button-dark: #1a1a1a;
  --color-button-dark-hover: #333333;
  --color-primary: #0ea5e9;
  --color-primary-light: #38bdf8;
  --color-primary-dark: #0284c7;
  --color-secondary: #7dd3fc;
  --color-glow: rgba(14, 165, 233, 0.3);
  --gradient-hero: linear-gradient(135deg, #0c1a2e 0%, #071521 25%, #0a1628 50%, #0c1a30 75%, #071521 100%);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 24px;
  --radius-xl: 40px;
  --transition: 0.2s ease-out;
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #071521;
}

::-webkit-scrollbar-thumb {
  background: rgba(14, 165, 233, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(14, 165, 233, 0.5);
}

/* ===== Selection Color ===== */
::selection {
  background: rgba(14, 165, 233, 0.4);
  color: #ffffff;
}


/* ===== Anime Animations ===== */
@keyframes sparkle {
  0%, 100% { opacity: 0; transform: scale(0) rotate(0deg); }
  50% { opacity: 1; transform: scale(1) rotate(180deg); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
}

/* Mirage-style animated gradient */
@keyframes gradientFlow {
  0% {
    background-position: 0% 50%;
  }
  25% {
    background-position: 50% 100%;
  }
  50% {
    background-position: 100% 50%;
  }
  75% {
    background-position: 50% 0%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes blobMove1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -50px) scale(1.1); }
  50% { transform: translate(-20px, 20px) scale(0.9); }
  75% { transform: translate(50px, 50px) scale(1.05); }
}

@keyframes blobMove2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(-40px, 30px) scale(0.95); }
  50% { transform: translate(60px, -30px) scale(1.1); }
  75% { transform: translate(-30px, -60px) scale(1); }
}

@keyframes blobMove3 {
  0%, 100% { transform: translate(0, 0) scale(1.05); }
  33% { transform: translate(40px, 40px) scale(0.95); }
  66% { transform: translate(-50px, 20px) scale(1.1); }
}

* {
  box-sizing: border-box;
}

body {
  background: var(--color-bg);
  min-height: 100vh;
  color: var(--color-text-primary);
  position: relative;
  overflow-x: hidden;
}

/* Water ripple canvas background */
#waterCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

/* Fallback gradient background (hidden when WebGL is active) */
.gradient-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -2;
  overflow: hidden;
  background: #060e1a;
}

.gradient-bg .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.35;
  mix-blend-mode: screen;
  will-change: transform;
}

.gradient-bg .blob-1 {
  width: 600px;
  height: 600px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.3) 0%, rgba(2, 132, 199, 0.2) 100%);
  top: -10%;
  left: -5%;
  animation: blobMove1 20s ease-in-out infinite;
}

.gradient-bg .blob-2 {
  width: 500px;
  height: 500px;
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.25) 0%, rgba(34, 211, 238, 0.15) 100%);
  top: 20%;
  right: -10%;
  animation: blobMove2 25s ease-in-out infinite;
}

.gradient-bg .blob-3 {
  width: 550px;
  height: 550px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.3) 0%, rgba(125, 211, 252, 0.2) 100%);
  bottom: -15%;
  left: 30%;
  animation: blobMove3 22s ease-in-out infinite;
}

.gradient-bg .blob-4 {
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.25) 0%, rgba(56, 189, 248, 0.15) 100%);
  top: 50%;
  left: -10%;
  animation: blobMove2 18s ease-in-out infinite reverse;
}



a {
  color: var(--color-accent);
  text-decoration: none;
  transition: all 0.3s ease-out;
}

a:focus,
a:hover {
  color: var(--color-primary-light);
  text-decoration: none;
}

.social-link {
  font-size: 14px;
  font-weight: 500;
  font-style: normal;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-text-secondary);
  transition: all 0.3s ease-out;
  letter-spacing: -0.01em;
}

.social-link:hover {
  color: var(--color-primary-light);
  transform: translateY(-2px);
}

.social-link img {
  width: 16px;
  height: 16px;
  display: inline-block;
  opacity: 0.7;
  transition: all 0.3s ease-out;
  filter: brightness(0) invert(1);
}

.social-link:hover img {
  opacity: 1;
  transform: scale(1.1);
}

.profile-photo-frame {
  width: 100%;
  border-radius: 50%;
  overflow: visible;
  background: linear-gradient(135deg, #7dd3fc, #22d3ee, #0ea5e9, #0284c7);
  background-size: 300% 300%;
  animation: gradientFlow 25s ease infinite;
  padding: 4px;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  box-shadow: 0 10px 30px rgba(14, 165, 233, 0.25);
}


.profile-photo-frame::before {
  content: '\2726';
  position: absolute;
  top: 5%;
  right: 5%;
  font-size: 14px;
  color: #22d3ee;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  animation: sparkle 4s ease-in-out infinite;
}

.profile-photo-frame:hover::before {
  opacity: 0.6;
}

.profile-photo-frame:hover {
  transform: scale(1.05);
  box-shadow: 0 25px 50px rgba(14, 165, 233, 0.4);
}

.profile-photo {
  transition: transform 0.3s ease-out;
  transform: scale(1);
  display: block;
  border-radius: 50%;
  overflow: hidden;
}

.profile-photo-frame:hover .profile-photo {
  transform: scale(1.05);
}

.social-separator {
  display: inline-block;
  margin: 0 8px;
  color: var(--color-text-tertiary);
}

body,
td,
th,
tr,
p,
a {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text-secondary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

strong {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-primary);
}

h2 {
  margin: 0;
  font-weight: 600;
  font-size: 22px;
  color: var(--color-text-primary);
  letter-spacing: -0.025em;
  background: radial-gradient(circle at 30% 50%, #38bdf8, #22d3ee, #7dd3fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.papertitle {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-primary);
  letter-spacing: -0.01em;
}

.name {
  padding-top: 20px;
  margin: 0;
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
  position: relative;
  display: inline-block;
  background: linear-gradient(135deg, #ffffff 0%, #7dd3fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}



.one {
  width: 200px;
  height: auto;
  position: relative;
}

.one img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
}

.contact-button {
  display: inline-block;
  padding: 10px 22px;
  border-radius: var(--radius-xl);
  border: none;
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.contact-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-button:hover::before {
  left: 100%;
}

.contact-button:hover,
.contact-button:focus {
  background: linear-gradient(135deg, #7dd3fc 0%, #0ea5e9 50%, #0284c7 100%);
  color: #ffffff;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 15px 35px rgba(14, 165, 233, 0.4);
}

.bio-pills {
  margin: 0 0 14px;
}

.bio-pill {
  display: inline-block;
  margin: 0 6px 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.15), rgba(14, 165, 233, 0.1));
  border: 1px solid rgba(14, 165, 233, 0.2);
  color: var(--color-text-secondary);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.bio-pill:hover {
  background: linear-gradient(135deg, #7dd3fc, #0ea5e9, #0284c7);
  border-color: transparent;
  color: #ffffff;
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 8px 25px rgba(14, 165, 233, 0.35);
}

.bio-location {
  color: var(--color-text-tertiary);
  font-size: 13px;
  font-weight: 400;
}

.site-credit {
  text-align: right;
  font-size: 12px;
  font-weight: 400;
  color: var(--color-text-tertiary);
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.site-credit a {
  color: var(--color-text-secondary);
  font-size: inherit;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition);
}

.site-credit a:hover,
.site-credit a:focus {
  color: var(--color-text-primary);
}

.legal-links {
  text-align: center;
  margin-top: 6px;
}

.legal-copy {
  font-size: 12px;
  font-weight: 400;
  color: var(--color-text-tertiary);
}


.site-credit strong {
  font-size: inherit;
  font-weight: 500;
  color: var(--color-text-secondary);
}


span.highlight {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(2, 132, 199, 0.15));
  border-radius: 4px;
  padding: 1px 6px;
}

.highlight-row td {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(2, 132, 199, 0.1)) !important;
  border-color: rgba(14, 165, 233, 0.2) !important;
}

.highlight-row td:first-child {
  border-top-left-radius: var(--radius-lg);
  border-bottom-left-radius: var(--radius-lg);
}

.highlight-row td:last-child {
  border-top-right-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
}

.paper-row td {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 20px;
  border-radius: var(--radius-lg);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.paper-row.highlight-row td {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(2, 132, 199, 0.08));
  border-color: rgba(14, 165, 233, 0.2);
}

.paper-row td:first-child {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.paper-row td:last-child {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-left: none;
  overflow: hidden;
}

/* LTX-style card hover effect */
.paper-row td:last-child::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.1), rgba(14, 165, 233, 0.08));
  opacity: 0;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  border-radius: inherit;
}

.paper-row:hover td:last-child::before {
  opacity: 1;
}

.paper-row:hover td {
  box-shadow:
    0 20px 40px rgba(14, 165, 233, 0.15),
    0 8px 16px rgba(2, 132, 199, 0.1),
    inset 0 0 0 1px rgba(14, 165, 233, 0.2);
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(14, 165, 233, 0.3);
}

.paper-row:hover td:first-child {
  box-shadow:
    0 20px 40px rgba(14, 165, 233, 0.15),
    0 8px 16px rgba(2, 132, 199, 0.1);
}

/* Staggered content animation on hover */
.paper-row .papertitle {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.paper-row:hover .papertitle {
  color: #38bdf8;
}

.paper-row td p {
  transition: all 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.05s;
}

.paper-row:hover td p {
  transform: translateY(-2px);
}

.paper-row td p {
  margin-top: 8px;
  color: var(--color-text-secondary);
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: -0.01em;
}

.paper-row td .papertitle {
  display: inline;
  margin-bottom: 0;
}

.paper-separator {
  display: inline-block;
  margin: 0 6px;
  color: var(--color-text-tertiary);
}

.paper-row td .venue-tag {
  margin-bottom: 6px;
}

.venue-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-right: 8px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.venue-tag:hover {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9, #0284c7);
  border-color: transparent;
  color: #ffffff;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.3);
}

.new-badge {
  display: inline-block;
  margin-left: 0;
  padding: 4px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #7dd3fc, #0ea5e9, #0284c7);
  background-size: 200% 200%;
  animation: gradientFlow 3s ease infinite;
  color: #ffffff;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  vertical-align: middle;
  line-height: 1;
  position: relative;
  box-shadow: 0 4px 15px rgba(14, 165, 233, 0.35);
}

.new-badge::before {
  content: '\2726';
  margin-right: 4px;
  font-size: 8px;
}

.paper-title-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

/* LTX-style gradient underline animation */
.paper-title-link::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #7dd3fc, #0ea5e9, #0284c7);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.paper-title-link:hover::after {
  transform: scaleX(1);
}

/* ===== Project Card Grid ===== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  width: 100%;
  padding: 0 16px;
  margin-bottom: 16px;
}

.project-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.1), rgba(14, 165, 233, 0.08));
  opacity: 0;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  border-radius: inherit;
  z-index: 1;
}

.project-card:hover::before {
  opacity: 1;
}

.project-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(14, 165, 233, 0.3);
  box-shadow:
    0 20px 40px rgba(14, 165, 233, 0.15),
    0 8px 16px rgba(2, 132, 199, 0.1),
    inset 0 0 0 1px rgba(14, 165, 233, 0.2);
  text-decoration: none;
}

.project-card-img {
  width: 100%;
  height: 160px;
  overflow: hidden;
  background: var(--color-surface-alt);
  border-bottom: 1px solid var(--color-border);
}

.project-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover .project-card-img img {
  transform: scale(1.05);
}

.project-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  position: relative;
  z-index: 2;
}

.project-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-primary);
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  transition: color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover .project-card-title {
  color: #38bdf8;
}

.project-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--color-text-tertiary);
  font-weight: 500;
}

.project-card-logo {
  width: 16px;
  height: 16px;
  object-fit: contain;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.85);
  padding: 2px;
}

.project-card-desc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-secondary);
  letter-spacing: -0.01em;
  margin: 0;
  flex: 1;
}

@media (max-width: 600px) {
  .project-grid {
    grid-template-columns: 1fr;
    padding: 0 12px;
  }
}

/* ===== Open Source Card Grid ===== */
.oss-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  width: 100%;
  padding: 0 16px;
  margin-bottom: 16px;
}

.oss-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.oss-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.1), rgba(14, 165, 233, 0.08));
  opacity: 0;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  border-radius: inherit;
  z-index: 1;
}

.oss-card:hover::before {
  opacity: 1;
}

.oss-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(14, 165, 233, 0.3);
  box-shadow:
    0 20px 40px rgba(14, 165, 233, 0.15),
    0 8px 16px rgba(2, 132, 199, 0.1),
    inset 0 0 0 1px rgba(14, 165, 233, 0.2);
  text-decoration: none;
}

.oss-card-img {
  width: 100%;
  height: 160px;
  overflow: hidden;
  background: var(--color-surface-alt);
  border-bottom: 1px solid var(--color-border);
}

.oss-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.oss-card:hover .oss-card-img img {
  transform: scale(1.05);
}

.oss-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  position: relative;
  z-index: 2;
}

.oss-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-primary);
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  transition: color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.oss-card:hover .oss-card-title {
  color: #38bdf8;
}

.oss-card-body .venue-tag {
  align-self: flex-start;
  margin-bottom: 8px;
}

.oss-card-desc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-secondary);
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  flex: 1;
}

.oss-card-footer {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: auto;
}

.oss-card-footer img {
  height: 20px;
  vertical-align: middle;
}

@media (max-width: 600px) {
  .oss-grid {
    grid-template-columns: 1fr;
    padding: 0 12px;
  }
}

.misc-table {
  width: 100%;
  border: 0;
  border-spacing: 0 12px;
  margin-left: auto;
  margin-right: auto;
}

.misc-row td {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 16px 20px;
  vertical-align: top;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.misc-row td:first-child {
  border-top-left-radius: var(--radius-lg);
  border-bottom-left-radius: var(--radius-lg);
  overflow: hidden;
}

.misc-row td:last-child {
  border-top-right-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
  border-left: none;
  overflow: hidden;
}

/* LTX-style gradient overlay on hover */
.misc-row td:last-child::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.08), rgba(14, 165, 233, 0.05));
  opacity: 0;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  border-radius: inherit;
}

.misc-row:hover td:last-child::before {
  opacity: 1;
}

.misc-row:hover td {
  box-shadow:
    0 20px 40px rgba(14, 165, 233, 0.12),
    0 8px 16px rgba(2, 132, 199, 0.08),
    inset 0 0 0 1px rgba(14, 165, 233, 0.15);
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(14, 165, 233, 0.25);
}

.misc-row:hover td:first-child {
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.12), rgba(14, 165, 233, 0.06));
}

/* Content animation on hover */
.misc-row li {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.misc-row:hover li {
  transform: translateX(4px);
}

.misc-row a {
  position: relative;
}

.misc-row a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #7dd3fc, #0ea5e9, #0284c7);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.misc-row a:hover::after {
  transform: scaleX(1);
}

.misc-label {
  width: 24%;
  text-align: center;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: var(--color-surface-alt);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 10px;
}

.misc-content ul {
  margin: 0;
  padding-left: 18px;
  color: var(--color-text-secondary);
}

.misc-content li {
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: -0.01em;
}

.misc-content li + li {
  margin-top: 8px;
}

.company-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 6px;
  border-radius: 4px;
  position: relative;
  top: -1px;
  background: rgba(255, 255, 255, 0.85);
  padding: 3px;
}

.edu-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 6px;
  position: relative;
  top: -1px;
  background: rgba(255, 255, 255, 0.85);
  padding: 3px;
  border-radius: 4px;
}

/* ===== Video Demo Carousel Section ===== */
.video-landing {
  width: 100%;
  padding: 48px 0 40px;
  background: linear-gradient(180deg, rgba(7, 21, 33, 0.6) 0%, transparent 100%);
  overflow: hidden;
}

.video-landing-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 32px;
  padding: 0 16px;
}

.video-landing-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 12px;
  background: linear-gradient(135deg, #ffffff 0%, #7dd3fc 50%, #5eead4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.video-landing-subtitle {
  color: var(--color-text-secondary);
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

/* Carousel wrapper */
.video-carousel-wrap {
  position: relative;
  width: 100%;
}

.video-carousel {
  position: relative;
  height: 340px;
  overflow: hidden;
}

.video-thumb {
  position: absolute;
  border-radius: var(--radius-md);
  overflow: hidden;
  top: 50%;
  left: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  filter: grayscale(0.5) brightness(0.6);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

/* Card sizes by aspect ratio */
.video-thumb--portrait  { width: 140px; aspect-ratio: 9 / 16; }
.video-thumb--landscape { width: 260px; aspect-ratio: 2 / 1; }
.video-thumb--square    { width: 185px; aspect-ratio: 1 / 1; }

.video-thumb.no-transition {
  transition: none !important;
}

.video-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Active center card */
.video-thumb.is-active {
  filter: grayscale(0) brightness(1);
  border-color: rgba(94, 234, 212, 0.6);
  box-shadow:
    0 0 24px rgba(94, 234, 212, 0.3),
    0 0 48px rgba(94, 234, 212, 0.1);
}

.video-ai-badge {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%) scale(0);
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(94, 234, 212, 0.9);
  color: #060e1a;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  z-index: 3;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.video-thumb.is-active .video-ai-badge {
  transform: translateX(-50%) scale(1);
  opacity: 1;
}

.video-mute-icon {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  z-index: 3;
  line-height: 1;
  opacity: 0;
  cursor: pointer;
  transition: all 0.3s ease-out;
}

.video-mute-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 2px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 1px;
  transform: translate(-50%, -50%) rotate(-45deg);
  opacity: 0;
  transition: opacity 0.2s ease-out;
  pointer-events: none;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.6);
}

.video-mute-icon.is-muted::after {
  opacity: 1;
}

.video-thumb.is-active .video-mute-icon {
  opacity: 1;
  background: rgba(94, 234, 212, 0.25);
  color: #ffffff;
}

/* Expand / zoom icon */
.video-expand-icon {
  position: absolute;
  bottom: 8px;
  left: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  z-index: 3;
  line-height: 1;
  opacity: 0;
  cursor: pointer;
  transition: all 0.3s ease-out;
}

.video-thumb.is-active .video-expand-icon {
  opacity: 1;
}

.video-expand-icon:hover {
  background: rgba(94, 234, 212, 0.35);
  color: #ffffff;
  transform: scale(1.15);
}

.video-mute-icon:hover {
  background: rgba(94, 234, 212, 0.35);
  color: #ffffff;
  transform: scale(1.15);
}

/* Video lightbox */
.video-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
}

.video-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.video-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 11, 20, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.video-lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  z-index: 1;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.video-lightbox.is-open .video-lightbox-content {
  transform: scale(1);
}

.video-lightbox-player {
  display: block;
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  outline: none;
}

.video-lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(3, 11, 20, 0.6);
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease-out;
}

.video-lightbox-close:hover {
  background: rgba(94, 234, 212, 0.2);
  border-color: rgba(94, 234, 212, 0.4);
  color: #ffffff;
  transform: rotate(90deg);
}

/* Navigation arrows */
.video-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(3, 11, 20, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.8);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease-out;
}

.video-carousel-arrow:hover {
  background: rgba(94, 234, 212, 0.15);
  border-color: rgba(94, 234, 212, 0.4);
  color: #ffffff;
  transform: translateY(-50%) scale(1.1);
}

.video-carousel-arrow--left {
  left: 12px;
}

.video-carousel-arrow--right {
  right: 12px;
}

/* ===== Impact Timeline ===== */
.impact-timeline {
  position: relative;
  padding: 0 16px 0 32px;
  margin: 0 auto 24px;
  max-width: 100%;
}

.impact-timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 24px;
  width: 2px;
  background: linear-gradient(180deg, #0ea5e9, #22d3ee, rgba(34, 211, 238, 0.1));
  border-radius: 1px;
}

.impact-item {
  position: relative;
  padding: 0 0 28px 28px;
}

.impact-item:last-child {
  padding-bottom: 0;
}

.impact-dot {
  position: absolute;
  left: -13px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #0ea5e9;
  border: 2px solid #030b14;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.3);
  z-index: 1;
  transition: all 0.3s ease-out;
}

.impact-item:hover .impact-dot {
  background: #22d3ee;
  box-shadow: 0 0 0 5px rgba(34, 211, 238, 0.3), 0 0 12px rgba(34, 211, 238, 0.4);
  transform: scale(1.2);
}

.impact-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.impact-card:hover {
  border-color: rgba(14, 165, 233, 0.3);
  box-shadow: 0 12px 32px rgba(14, 165, 233, 0.12), 0 4px 12px rgba(2, 132, 199, 0.08);
  transform: translateY(-3px);
}

.impact-date {
  font-size: 11px;
  font-weight: 600;
  color: #22d3ee;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.impact-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-primary);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.impact-title img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.85);
  padding: 2px;
}

.impact-amount {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(34, 211, 238, 0.1));
  border: 1px solid rgba(14, 165, 233, 0.2);
  font-size: 12px;
  font-weight: 600;
  color: #38bdf8;
  margin-bottom: 6px;
}

.impact-desc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-secondary);
  letter-spacing: -0.01em;
  margin: 0;
}

.impact-role {
  font-size: 12px;
  color: var(--color-text-tertiary);
  font-weight: 500;
  margin-top: 6px;
}

/* In-progress / upcoming milestone */
.impact-dot--active {
  background: #22d3ee;
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.3);
  animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.3); }
  50% { box-shadow: 0 0 0 6px rgba(34, 211, 238, 0.15), 0 0 16px rgba(34, 211, 238, 0.4); }
}

.impact-card--active {
  border-color: rgba(34, 211, 238, 0.25);
  background: linear-gradient(135deg, var(--color-surface), rgba(14, 165, 233, 0.05));
}

.impact-status {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.25);
  font-size: 10px;
  font-weight: 600;
  color: #22d3ee;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-left: 8px;
  vertical-align: middle;
}

/* ===== Articles Grid ===== */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  width: 100%;
  padding: 0 16px;
  margin-bottom: 16px;
}

.article-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.article-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.1), rgba(14, 165, 233, 0.08));
  opacity: 0;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  border-radius: inherit;
  z-index: 1;
}

.article-card:hover::before {
  opacity: 1;
}

.article-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(14, 165, 233, 0.3);
  box-shadow:
    0 20px 40px rgba(14, 165, 233, 0.15),
    0 8px 16px rgba(2, 132, 199, 0.1),
    inset 0 0 0 1px rgba(14, 165, 233, 0.2);
  text-decoration: none;
}

.article-card-icon {
  width: 100%;
  height: 160px;
  overflow: hidden;
  background: var(--color-surface-alt);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.article-card-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(34, 211, 238, 0.05));
}

.article-card-icon .article-icon-text {
  font-size: 48px;
  line-height: 1;
  z-index: 1;
}

.article-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  position: relative;
  z-index: 2;
}

.article-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-primary);
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  transition: color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.article-card:hover .article-card-title {
  color: #38bdf8;
}

.article-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.article-card-desc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-secondary);
  letter-spacing: -0.01em;
  margin: 0;
  flex: 1;
}

.article-card-read {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-accent);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: all 0.3s ease-out;
}

.article-card:hover .article-card-read {
  color: #38bdf8;
  transform: translateX(4px);
}

/* Article lightbox (iframe) */
.article-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
}

.article-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.article-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 11, 20, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.article-lightbox-content {
  position: relative;
  width: 92vw;
  height: 90vh;
  max-width: 1200px;
  z-index: 1;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.article-lightbox.is-open .article-lightbox-content {
  transform: scale(1) translateY(0);
}

.article-lightbox-iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: var(--radius-lg);
  background: #07090f;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.article-lightbox-close {
  position: absolute;
  top: -44px;
  right: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(3, 11, 20, 0.6);
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease-out;
}

.article-lightbox-close:hover {
  background: rgba(94, 234, 212, 0.2);
  border-color: rgba(94, 234, 212, 0.4);
  color: #ffffff;
  transform: rotate(90deg);
}

@media (max-width: 600px) {
  .articles-grid {
    grid-template-columns: 1fr;
    padding: 0 12px;
  }

  .article-lightbox-content {
    width: 98vw;
    height: 92vh;
  }

  .article-lightbox-close {
    top: -38px;
  }
}

/* ===== Content Visibility (skip rendering for off-screen sections) ===== */
.project-grid,
.oss-grid,
.articles-grid,
.misc-table,
.impact-timeline {
  content-visibility: auto;
  contain-intrinsic-size: auto 500px;
}

/* ===== Reduced Motion (accessibility) ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== Mobile Responsive ===== */
@media (max-width: 768px) {

  /* --- Header: stack photo above text --- */
  table[style*="max-width:800px"] > tbody > tr > td > table:first-of-type > tbody > tr {
    display: flex;
    flex-direction: column-reverse;
  }

  table[style*="max-width:800px"] > tbody > tr > td > table:first-of-type > tbody > tr > td {
    width: 100% !important;
    max-width: 100% !important;
    display: block;
    padding: 12px 16px !important;
  }

  table[style*="max-width:800px"] > tbody > tr > td > table:first-of-type > tbody > tr > td:last-child {
    display: flex;
    justify-content: center;
    padding-bottom: 0 !important;
  }

  .profile-photo-frame {
    width: 160px;
    margin: 0 auto;
  }

  .name {
    font-size: 30px;
    display: block;
    text-align: center;
  }

  /* --- Paper row (EditYourself): stack image above text --- */
  .paper-row {
    display: block;
  }

  .paper-row td {
    display: block !important;
    width: 100% !important;
    border-radius: 0 !important;
  }

  .paper-row td:first-child {
    border-bottom: none !important;
    border-top-left-radius: var(--radius-lg) !important;
    border-top-right-radius: var(--radius-lg) !important;
  }

  .paper-row td:last-child {
    border-top: none !important;
    border-left: 1px solid var(--color-border) !important;
    border-bottom-left-radius: var(--radius-lg) !important;
    border-bottom-right-radius: var(--radius-lg) !important;
  }

  .paper-row.highlight-row td:last-child {
    border-left-color: rgba(14, 165, 233, 0.2) !important;
  }

  .one {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
  }

  /* --- Experience/Misc table: stack label above content --- */
  .misc-row {
    display: block;
    margin-bottom: 12px;
  }

  .misc-row td {
    display: block !important;
    width: 100% !important;
  }

  .misc-label {
    width: 100% !important;
    text-align: left;
    border-bottom: none !important;
    border-top-left-radius: var(--radius-lg) !important;
    border-top-right-radius: var(--radius-lg) !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    padding: 12px 16px !important;
  }

  .misc-content {
    border-top: none !important;
    border-left: 1px solid var(--color-border) !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
    border-bottom-left-radius: var(--radius-lg) !important;
    border-bottom-right-radius: var(--radius-lg) !important;
  }

  .misc-table {
    border-spacing: 0 12px;
  }

  .misc-content li {
    font-size: 13px;
  }

  /* --- Impact timeline: tighter on mobile --- */
  .impact-timeline {
    padding: 0 12px 0 24px;
  }

  .impact-timeline::before {
    left: 16px;
  }

  .impact-item {
    padding-left: 24px;
    padding-bottom: 20px;
  }

  .impact-card {
    padding: 14px 16px;
  }

  .impact-title {
    font-size: 14px;
  }

  /* --- Blobs: scale down to prevent overflow --- */
  .gradient-bg .blob-1 { width: 300px; height: 300px; }
  .gradient-bg .blob-2 { width: 250px; height: 250px; }
  .gradient-bg .blob-3 { width: 280px; height: 280px; }
  .gradient-bg .blob-4 { width: 200px; height: 200px; }

  /* --- General spacing --- */
  body {
    font-size: 14px;
  }

  body,
  td,
  th,
  tr,
  p,
  a {
    font-size: 14px;
  }

  h2 {
    font-size: 20px;
  }

  .bio-pill {
    margin: 0 4px 4px;
    padding: 4px 10px;
    font-size: 10px;
  }

  .paper-title-link {
    flex-wrap: wrap;
  }

  /* --- Video landing: shrink cards & headline --- */
  .video-landing {
    padding: 32px 0 28px;
  }

  .video-landing-title {
    font-size: 24px;
  }

  .video-landing-subtitle {
    font-size: 13px;
  }

  .video-carousel {
    height: 230px;
  }

  .video-thumb--portrait  { width: 100px; }
  .video-thumb--landscape { width: 190px; }
  .video-thumb--square    { width: 135px; }

  .video-ai-badge {
    font-size: 8px;
    padding: 2px 8px;
  }

  .video-carousel-arrow {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .video-carousel-arrow--left {
    left: 6px;
  }

  .video-carousel-arrow--right {
    right: 6px;
  }

}
