/* ===== Fonts ===== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,700&display=swap');

/* ===== Custom Properties ===== */
:root {
  --color-base: #F5F5F2;
  --color-surface: #FAFAF8;
  --color-text: #3A3F58;
  --color-text-secondary: #5C6078;
  --color-text-tertiary: #C4A08E;
  --color-accent: #5C4033;
  --color-accent-secondary: #F9AC67;
  --color-border: #E0DDD4;
  --color-border-light: #ECE6CD;

  --phase-games: #F9AC67;
  --phase-medical: #EE6A59;
  --phase-mr: #3A3F58;
  --phase-spatial: #F9AC67;

  --pastel-sage: #F0EDE4;
  --pastel-sky: #ECE6CD;
  --pastel-lilac: #EDE9E0;
  --pastel-blush: #F5EDE0;
  --pastel-cream: #ECE6CD;
  --pastel-mist: #EDE9E2;
  --pastel-peach: #F5EDDF;

  --font: 'Poppins', -apple-system, sans-serif;

  --shadow-sm: 0 1px 3px rgba(30,30,30,0.04), 0 1px 2px rgba(30,30,30,0.02);
  --shadow-md: 0 4px 14px rgba(30,30,30,0.06), 0 2px 4px rgba(30,30,30,0.03);

  --radius-sm: 8px;
  --radius-md: 12px;
  --max-width: 820px;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--color-base);
  color: var(--color-text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--color-accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: #3D2A20; }
p { margin-bottom: 0.7em; }
p:last-child { margin-bottom: 0; }


/* ==========================================================
   PROFILE HEADER
   ========================================================== */
.profile-header {
  background: var(--color-surface);
  padding: 52px 24px 36px;
  border-bottom: 1px solid var(--color-border);
}

.profile-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 36px;
}

.profile-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid var(--color-border);
  box-shadow: 0 0 0 5px var(--color-base), var(--shadow-md);
  transition: transform 0.3s;
}
.profile-avatar:hover { transform: scale(1.03); }

.profile-info { flex: 1; }

.profile-name {
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 4px;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.profile-position {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-bottom: 2px;
}

.profile-affiliation { font-size: 0.93rem; margin-bottom: 2px; }
.profile-affiliation a { font-weight: 500; }

.profile-email {
  font-size: 0.82rem;
  color: var(--color-text-tertiary);
  font-family: 'SF Mono', 'Fira Code', monospace;
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}

.social-icons { display: flex; gap: 10px; }

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--color-base);
  color: var(--color-text-secondary);
  font-size: 1.05rem;
  transition: all 0.25s;
  border: 1px solid var(--color-border-light);
}
.social-icons a:hover {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(92,64,51,0.25);
}


/* ==========================================================
   TAB NAVIGATION
   ========================================================== */
.tab-nav {
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(255,255,255,0.88);
}

.tab-nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  gap: 4px;
  padding: 10px 24px;
  position: relative;
}

.tab-btn {
  background: none;
  border: none;
  padding: 9px 22px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--color-text-tertiary);
  cursor: pointer;
  border-radius: 8px;
  transition: color 0.3s;
  font-family: var(--font);
  position: relative;
  z-index: 1;
}
.tab-btn:hover { color: var(--color-text-secondary); }
.tab-btn.active { color: var(--color-surface); }

.tab-indicator {
  position: absolute;
  height: calc(100% - 20px);
  top: 10px;
  background: var(--color-accent);
  border-radius: 8px;
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 0;
  box-shadow: 0 2px 8px rgba(92,64,51,0.2);
}


/* ==========================================================
   TAB CONTENT
   ========================================================== */
.tab-content-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 36px 24px 80px;
  min-height: 60vh;
}

.tab-content { display: none; }
.tab-content.active {
  display: block;
  animation: fadeIn 0.35s ease;
}

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

.section-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 20px;
  padding-bottom: 10px;
  position: relative;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 28px; height: 2.5px;
  background: var(--color-accent);
  border-radius: 2px;
}

.content-section { margin-bottom: 40px; }


/* ==========================================================
   OVERVIEW — ABOUT INTRO
   ========================================================== */
.about-intro {
  font-size: 1.02rem;
  line-height: 1.8;
  color: var(--color-text-secondary);
}
.about-intro a {
  font-weight: 600;
  border-bottom: 1.5px solid rgba(92,64,51,0.3);
  transition: border-color 0.2s;
}
.about-intro a:hover { border-color: var(--color-accent); }


/* ==========================================================
   OVERVIEW — RESEARCH INTERESTS
   ========================================================== */
.interests {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.interest-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border-light);
  opacity: 0;
  animation: cardEnter 0.4s ease forwards;
}
.interest-item:last-child { border-bottom: none; }

.interest-item:nth-child(1) { animation-delay: 0.05s; }
.interest-item:nth-child(2) { animation-delay: 0.1s; }
.interest-item:nth-child(3) { animation-delay: 0.15s; }
.interest-item:nth-child(4) { animation-delay: 0.2s; }

.interest-marker {
  width: 4px;
  height: 100%;
  min-height: 48px;
  border-radius: 3px;
  flex-shrink: 0;
  margin-top: 2px;
}

.interest-item strong {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  display: block;
  margin-bottom: 2px;
}

.interest-period {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--color-text-tertiary);
  letter-spacing: 0.02em;
  display: block;
  margin-bottom: 4px;
}

.interest-item p {
  font-size: 0.88rem;
  color: var(--color-text-secondary);
  line-height: 1.55;
  margin: 0;
}


/* ==========================================================
   OVERVIEW — FLOATING BUBBLES
   ========================================================== */
.overview-hero {
  position: relative;
  padding: 40px 0;
  overflow: hidden;
}

.about-intro {
  position: relative;
  z-index: 2;
}

/* Bubbles */
.bubble {
  position: absolute;
  z-index: 1;
  display: block;
  border-radius: 50%;
  overflow: hidden;
  opacity: 0;
  animation: bubbleIn 0.6s ease forwards, float var(--dur) ease-in-out var(--delay) infinite alternate;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.bubble:hover {
  transform: scale(1.18) !important;
  box-shadow: 0 6px 24px rgba(0,0,0,0.12);
  z-index: 4;
}

.bubble img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@keyframes bubbleIn {
  from { opacity: 0; transform: scale(0.4); }
  to   { opacity: 1; transform: scale(1); }
}

/* Each bubble: unique size, position, float path, timing */
.b1 {
  width: 72px; height: 72px;
  top: -8px; left: -20px;
  --dur: 7s; --delay: 0s;
  animation-delay: 0.1s, 0.1s;
  border: 2px solid rgba(224,138,78,0.3);
}
.b2 {
  width: 58px; height: 58px;
  top: 10px; right: 30px;
  --dur: 8s; --delay: 0.5s;
  animation-delay: 0.18s, 0.18s;
  border: 2px solid rgba(224,138,78,0.3);
}
.b3 {
  width: 66px; height: 66px;
  top: 45%; right: -16px;
  --dur: 9s; --delay: 1s;
  animation-delay: 0.25s, 0.25s;
  border: 2px solid rgba(124,91,175,0.3);
}
.b4 {
  width: 60px; height: 60px;
  bottom: 30px; right: 50px;
  --dur: 7.5s; --delay: 0.3s;
  animation-delay: 0.32s, 0.32s;
  border: 2px solid rgba(124,91,175,0.3);
}
.b5 {
  width: 54px; height: 54px;
  bottom: -5px; left: 35%;
  --dur: 8.5s; --delay: 0.8s;
  animation-delay: 0.38s, 0.38s;
  border: 2px solid rgba(124,91,175,0.3);
}
.b6 {
  width: 50px; height: 50px;
  bottom: 20px; left: -10px;
  --dur: 6.5s; --delay: 0.2s;
  animation-delay: 0.44s, 0.44s;
  border: 2px solid rgba(61,160,138,0.3);
}
.b7 {
  width: 56px; height: 56px;
  top: 40%; left: -24px;
  --dur: 9.5s; --delay: 1.2s;
  animation-delay: 0.5s, 0.5s;
  border: 2px solid rgba(91,142,196,0.3);
}
.b8 {
  width: 48px; height: 48px;
  top: 5px; left: 42%;
  --dur: 7s; --delay: 0.6s;
  animation-delay: 0.56s, 0.56s;
  border: 2px solid rgba(91,142,196,0.3);
}

/* Float keyframes — gentle drifting */
@keyframes float {
  0%   { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(8px, -12px) rotate(3deg); }
}


/* ==========================================================
   RESEARCH — YEAR-BASED PUBLICATIONS
   ========================================================== */
.year-section {
  margin-bottom: 8px;
}

.year-heading {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-border);
  letter-spacing: -0.02em;
}

.pub-entry {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  padding: 20px 0;
  border-bottom: 1px solid var(--color-border-light);
  opacity: 0;
  animation: cardEnter 0.45s ease forwards;
}
.pub-entry:last-child { border-bottom: none; }

.year-section .pub-entry:nth-child(2) { animation-delay: 0.05s; }
.year-section .pub-entry:nth-child(3) { animation-delay: 0.1s; }
.year-section .pub-entry:nth-child(4) { animation-delay: 0.15s; }
.year-section .pub-entry:nth-child(5) { animation-delay: 0.2s; }
.year-section .pub-entry:nth-child(6) { animation-delay: 0.25s; }

.pub-teaser {
  flex-shrink: 0;
  width: 170px;
  overflow: hidden;
  border-radius: var(--radius-sm);
}

.pub-teaser img {
  width: 100%;
  display: block;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  transition: transform 0.35s ease;
}
.pub-entry:hover .pub-teaser img { transform: scale(1.03); }

.pub-body { flex: 1; min-width: 0; }

.pub-type-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 10px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.pub-type-conference { background: rgba(92,64,51,0.1);  color: #5C4033; }
.pub-type-journal    { background: rgba(238,106,89,0.08); color: #D4584A; }
.pub-type-workshop   { background: rgba(249,172,103,0.15); color: #D08A40; }
.pub-type-poster     { background: rgba(238,106,89,0.1);  color: #EE6A59; }
.pub-type-demo       { background: rgba(238,106,89,0.1);  color: #EE6A59; }
.pub-type-preprint   { background: rgba(238,106,89,0.08); color: #EE6A59; }

.pub-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 6px;
}
.pub-title a { color: var(--color-text); }
.pub-title a:hover { color: var(--color-accent); }

.pub-authors {
  font-size: 0.84rem;
  color: var(--color-text-secondary);
  margin-bottom: 3px;
  line-height: 1.45;
}

.pub-venue {
  font-size: 0.82rem;
  color: var(--color-text-tertiary);
  font-style: italic;
  margin-bottom: 10px;
  line-height: 1.4;
}

.pub-links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pub-link {
  display: inline-flex;
  align-items: center;
  padding: 4px 13px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-accent);
  background: rgba(92,64,51,0.06);
  border: 1px solid rgba(92,64,51,0.18);
  border-radius: 6px;
  transition: all 0.2s;
  cursor: pointer;
}
.pub-link:hover {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
  box-shadow: 0 2px 8px rgba(92,64,51,0.2);
}

.pub-note {
  margin-top: 8px;
  font-size: 0.82rem;
  color: #C0623A;
  font-weight: 600;
  font-style: italic;
}


/* ==========================================================
   CARDS (Projects, Background tabs)
   ========================================================== */
@keyframes cardEnter {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card {
  border-radius: var(--radius-md);
  padding: 22px 26px;
  margin-bottom: 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-left: 4px solid transparent;
  transition: transform 0.25s, box-shadow 0.25s;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  animation: cardEnter 0.45s ease forwards;
}

.content-section .card:nth-child(1) { animation-delay: 0.05s; }
.content-section .card:nth-child(2) { animation-delay: 0.1s; }
.content-section .card:nth-child(3) { animation-delay: 0.15s; }
.content-section .card:nth-child(4) { animation-delay: 0.2s; }
.content-section .card:nth-child(5) { animation-delay: 0.25s; }

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card-green   { background: var(--pastel-sage);  border-left-color: #F9AC67; }
.card-purple  { background: var(--pastel-lilac); border-left-color: #3A3F58; }
.card-rose    { background: var(--pastel-blush); border-left-color: #5C4033; }
.card-peach   { background: var(--pastel-peach); border-left-color: #F9AC67; }
.card-mint    { background: var(--pastel-mist);  border-left-color: #3A3F58; }

.card-project-1 { background: var(--pastel-sky);   border-left-color: #5C4033; }
.card-project-2 { background: var(--pastel-peach);  border-left-color: #F9AC67; }
.card-project-3 { background: var(--pastel-sage);   border-left-color: #3A3F58; }
.card-project-4 { background: var(--pastel-lilac);  border-left-color: #5C4033; }
.card-project-5 { background: var(--pastel-mist);   border-left-color: #F9AC67; }

.card-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 4px;
}

.card-subtitle {
  font-size: 0.88rem;
  color: var(--color-text-secondary);
  font-style: italic;
  margin-bottom: 3px;
}

.card-meta {
  font-size: 0.84rem;
  color: var(--color-text-secondary);
  margin-bottom: 3px;
}

.card-date {
  font-size: 0.78rem;
  color: var(--color-text-tertiary);
  white-space: nowrap;
  flex-shrink: 0;
  font-weight: 600;
  background: rgba(0,0,0,0.03);
  padding: 3px 10px;
  border-radius: 6px;
}

.card-note {
  font-size: 0.84rem;
  color: #C0623A;
  font-weight: 600;
  font-style: italic;
}

.card-notes {
  font-size: 0.86rem;
  color: var(--color-text-secondary);
  margin-top: 8px;
  line-height: 1.55;
}

.exp-projects {
  display: flex;
  gap: 14px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.exp-project-item {
  position: relative;
  flex: 1;
  min-width: 110px;
  max-width: 180px;
  transition: transform 0.2s;
}
.exp-project-item:hover { transform: translateY(-3px); }

.exp-project-item img {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.exp-project-badge {
  display: block;
  margin-top: 5px;
  font-size: 0.68rem;
  color: var(--color-text-secondary);
  text-align: center;
  font-weight: 600;
}

.service-list { list-style: none; padding: 0; }
.service-list li {
  padding: 4px 0;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.service-list li::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  flex-shrink: 0;
}


/* ==========================================================
   PROJECT CARDS
   ========================================================== */
.projects-grid {
  display: flex;
  flex-direction: column;
}

.project-card {
  display: flex;
  gap: 22px;
  align-items: flex-start;
}

.project-image {
  flex-shrink: 0;
  width: 195px;
  overflow: hidden;
  border-radius: var(--radius-sm);
}

.project-image img {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  transition: transform 0.35s;
  box-shadow: var(--shadow-sm);
}
.project-card:hover .project-image img { transform: scale(1.03); }

.project-details { flex: 1; min-width: 0; }

.project-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 5px;
}
.project-title a { color: var(--color-text); }
.project-title a:hover { color: var(--color-accent); }

.project-role {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  font-style: italic;
  margin-bottom: 6px;
}

.project-summary {
  font-size: 0.88rem;
  color: var(--color-text-secondary);
  margin-bottom: 8px;
  line-height: 1.55;
}

.project-highlight {
  font-size: 0.84rem;
  color: #C0623A;
  font-weight: 600;
  font-style: italic;
  margin-bottom: 10px;
}


/* ==========================================================
   FOOTER
   ========================================================== */
.site-footer {
  text-align: center;
  padding: 28px 24px;
  color: var(--color-text-tertiary);
  font-size: 0.8rem;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}


/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 768px) {
  .profile-inner { flex-direction: column; text-align: center; }
  .profile-avatar { width: 120px; height: 120px; }
  .social-icons { justify-content: center; }
  .tab-nav-inner { justify-content: center; }
  .tab-btn { padding: 8px 16px; font-size: 0.82rem; }

  .bubble { display: none; }
  .overview-hero { padding: 0; }

  .pub-entry { flex-direction: column; }
  .pub-teaser { width: 100%; max-width: 280px; }

  .project-card { flex-direction: column; }
  .project-image { width: 100%; max-width: 280px; }

  .card-row { flex-direction: column; gap: 4px; }
  .exp-project-item { max-width: 140px; }
}

@media (max-width: 480px) {
  .profile-header { padding: 36px 16px 28px; }
  .profile-avatar { width: 96px; height: 96px; }
  .profile-name { font-size: 1.6rem; }
  .tab-btn { padding: 7px 12px; font-size: 0.78rem; }
  .tab-content-wrapper { padding: 20px 16px 48px; }
  .card { padding: 18px 20px; }
}
