/* ===================================================================
   YANGYU WANG — Personal Site Styles
   Color system: Soft pastel, chosen randomly per visitor
   =================================================================== */

/* ===== VARIABLES ===== */
:root {
  /* Palette 1 – Sage Green (default) */
  --v-950: #1a2e22;
  --v-900: #2a4a35;
  --v-800: #3a6648;
  --v-700: #4d845e;
  --v-600: #61a375;
  --v-500: #7dbf8e;
  --v-400: #9dd3ac;
  --v-300: #bee5c7;
  --v-200: #d9f0df;
  --v-100: #ecf8ef;
  --v-50:  #f6fcf7;
  --p-rgb: 77 132 94;

  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-400: #9ca3af;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50:  #f9fafb;
  --white:    #ffffff;

  --font-serif: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --nav-height: 64px;

  --shadow-sm:     0 1px 3px rgb(var(--p-rgb) / 0.07), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:     0 4px 16px rgb(var(--p-rgb) / 0.10), 0 2px 6px rgba(0,0,0,0.05);
  --shadow-lg:     0 10px 32px rgb(var(--p-rgb) / 0.14), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-violet: 0 8px 28px rgb(var(--p-rgb) / 0.35);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
}

/* ===== PALETTES ===== */
/* 2 – Blush Rose */
[data-palette="2"] {
  --v-950: #2e1a1f; --v-900: #4a2830; --v-800: #663842; --v-700: #845863;
  --v-600: #a37280; --v-500: #bf8f9a; --v-400: #d3adb6; --v-300: #e5cdd2;
  --v-200: #f0dade; --v-100: #f8eef0; --v-50:  #fcf6f7;
  --p-rgb: 132 88 99;
}
/* 3 – Powder Blue */
[data-palette="3"] {
  --v-950: #1a1e2e; --v-900: #283048; --v-800: #384866; --v-700: #4e6284;
  --v-600: #6880a3; --v-500: #859bbf; --v-400: #a5b8d3; --v-300: #c5d2e5;
  --v-200: #dae3f0; --v-100: #ecf1f8; --v-50:  #f6f8fc;
  --p-rgb: 78 98 132;
}
/* 4 – Soft Lavender */
[data-palette="4"] {
  --v-950: #1e1a2e; --v-900: #302a4a; --v-800: #463e66; --v-700: #5e5484;
  --v-600: #786ca3; --v-500: #9288bf; --v-400: #ada8d3; --v-300: #c8c5e5;
  --v-200: #dddaf0; --v-100: #eeedf8; --v-50:  #f8f7fc;
  --p-rgb: 94 84 132;
}
/* 5 – Pale Peach */
[data-palette="5"] {
  --v-950: #2e1e14; --v-900: #4a3020; --v-800: #66442e; --v-700: #845a3e;
  --v-600: #a37254; --v-500: #bf8e6e; --v-400: #d3ae92; --v-300: #e5cebc;
  --v-200: #f0e2d6; --v-100: #f8f0ea; --v-50:  #fcf8f5;
  --p-rgb: 132 90 62;
}
/* 6 – Pale Teal */
[data-palette="6"] {
  --v-950: #1a2d2b; --v-900: #284845; --v-800: #386460; --v-700: #4d827e;
  --v-600: #62a09c; --v-500: #7ebcb8; --v-400: #9dd0cc; --v-300: #bee3e1;
  --v-200: #d9eeec; --v-100: #ecf7f6; --v-50:  #f6fbfb;
  --p-rgb: 77 130 126;
}
/* 7 – Warm Cream */
[data-palette="7"] {
  --v-950: #28260e; --v-900: #403e16; --v-800: #5a5820; --v-700: #76742e;
  --v-600: #949240; --v-500: #b0ae5a; --v-400: #cac878; --v-300: #dede9e;
  --v-200: #ebebc4; --v-100: #f4f4de; --v-50:  #fafaee;
  --p-rgb: 118 116 46;
}
/* 8 – Pale Mauve */
[data-palette="8"] {
  --v-950: #2a1a26; --v-900: #42283e; --v-800: #5e3858; --v-700: #7c4e74;
  --v-600: #9a6490; --v-500: #b680aa; --v-400: #cca0c4; --v-300: #dfc0da;
  --v-200: #eed8eb; --v-100: #f6ecf5; --v-50:  #fbf6fa;
  --p-rgb: 124 78 116;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }


/* ===== NAVIGATION ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--v-300) 30%, transparent);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.navbar.scrolled {
  box-shadow: var(--shadow-md);
  border-color: var(--v-200);
}
.nav-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 28px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--v-800);
  letter-spacing: -0.01em;
  transition: color 0.2s;
}
.nav-brand:hover { color: var(--v-600); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-600);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--v-500);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-link:hover { color: var(--v-700); background: var(--v-50); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-link.active { color: var(--v-700); }
.nav-link.active::after { transform: scaleX(1); }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--gray-700);
  border-radius: 2px;
  transition: all 0.3s ease;
}
.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }


/* ===== HERO SECTION ===== */
.hero {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  background:
    radial-gradient(ellipse 60% 70% at 80% 40%, color-mix(in srgb, var(--v-300) 28%, transparent) 0%, transparent 65%),
    radial-gradient(ellipse 40% 50% at 20% 80%, color-mix(in srgb, var(--v-100) 20%, transparent) 0%, transparent 60%),
    var(--white);
  padding: 40px 28px 80px;
  position: relative;
}
.hero::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -120px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--v-400) 8%, transparent) 0%, transparent 70%);
  pointer-events: none;
}

.hero-container {
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 80px;
  align-items: center;
  width: 100%;
}

.hero-greeting {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--v-500);
  margin-bottom: 8px;
  opacity: 0;
  animation: fadeInUp 0.55s cubic-bezier(.22,.68,0,1.2) forwards 0.05s;
}
.hero-name {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 5.5vw, 4.8rem);
  color: var(--gray-900);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 14px;
  opacity: 0;
  animation: fadeInUp 0.55s cubic-bezier(.22,.68,0,1.2) forwards 0.15s;
}
.hero-subtitle {
  font-size: 1.05rem;
  color: var(--v-700);
  font-weight: 500;
  margin-bottom: 22px;
  opacity: 0;
  animation: fadeInUp 0.55s cubic-bezier(.22,.68,0,1.2) forwards 0.25s;
}
.hero-bio {
  font-size: 0.975rem;
  color: var(--gray-600);
  line-height: 1.85;
  max-width: 500px;
  margin-bottom: 28px;
  opacity: 0;
  animation: fadeInUp 0.55s cubic-bezier(.22,.68,0,1.2) forwards 0.35s;
}
.hero-bio strong { color: var(--v-700); font-weight: 600; }

/* Interest tags */
.interests {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 44px;
  opacity: 0;
  animation: fadeInUp 0.55s cubic-bezier(.22,.68,0,1.2) forwards 0.42s;
}
.interest-tag {
  background: var(--v-100);
  color: var(--v-700);
  padding: 4px 13px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: 1px solid var(--v-200);
}

/* CTA Lines */
.cta-lines {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.cta-line {
  display: flex;
  align-items: center;
  gap: 18px;
  opacity: 0;
  animation: fadeInLeft 0.55s cubic-bezier(.22,.68,0,1.2) forwards;
}
.cta-line:nth-child(1) { animation-delay: 0.52s; }
.cta-line:nth-child(2) { animation-delay: 0.64s; }
.cta-line:nth-child(3) { animation-delay: 0.76s; }

.cta-label {
  font-size: 0.9rem;
  color: var(--gray-500);
  white-space: nowrap;
  flex-shrink: 0;
}
.cta-rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--v-200), transparent);
}
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, border-color 0.22s ease, color 0.22s ease;
}
.cta-btn .btn-arrow {
  font-size: 0.75em;
  transition: transform 0.22s ease;
}
.cta-btn:hover .btn-arrow { transform: translateX(5px); }

.cta-btn-primary {
  background: var(--v-700);
  color: var(--white);
  box-shadow: var(--shadow-md);
}
.cta-btn-primary:hover {
  background: var(--v-600);
  transform: translateY(-2px);
  box-shadow: var(--shadow-violet);
}
.cta-btn-outline {
  color: var(--v-700);
  border: 1.5px solid var(--v-300);
  background: transparent;
}
.cta-btn-outline:hover {
  border-color: var(--v-500);
  background: var(--v-50);
  transform: translateY(-2px);
}

/* Hero photo */
.hero-photo-col {
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  animation: fadeIn 0.7s ease forwards 0.2s;
}
.hero-photo-ring {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--v-300), var(--v-700), var(--v-900));
  padding: 5px;
  box-shadow: var(--shadow-violet);
  position: relative;
}
.hero-photo-ring::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--v-200), transparent, var(--v-300));
  z-index: -1;
  opacity: 0.5;
}
.hero-photo-ring img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 4px solid var(--white);
}


/* ===== SCROLL HINT ===== */
.scroll-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: 1;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.scroll-hint.hidden { opacity: 0; }
.scroll-hint-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--v-400);
}
.scroll-hint-arrow {
  font-size: 1rem;
  color: var(--v-400);
  animation: hintBounce 1.4s ease-in-out infinite;
}
@keyframes hintBounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(5px); }
}

/* ===== NEWS SECTION ===== */
.news-section {
  background: var(--v-50);
  padding: 96px 28px;
  border-top: 1px solid var(--v-200);
  border-bottom: 1px solid var(--v-200);
}
.news-container { max-width: 800px; margin: 0 auto; }

.section-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--v-500);
  text-align: center;
  margin-bottom: 8px;
}
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--gray-900);
  text-align: center;
  letter-spacing: -0.03em;
  margin-bottom: 56px;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 44px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: linear-gradient(to bottom, var(--v-400), var(--v-200));
  border-radius: 2px;
}
.timeline-item {
  position: relative;
  margin-bottom: 28px;
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.timeline-item.visible {
  opacity: 1;
  transform: translateX(0);
}
.timeline-item:nth-child(1) { transition-delay: 0.0s; }
.timeline-item:nth-child(2) { transition-delay: 0.1s; }
.timeline-item:nth-child(3) { transition-delay: 0.2s; }
.timeline-item:nth-child(4) { transition-delay: 0.3s; }
.timeline-item:nth-child(5) { transition-delay: 0.4s; }

.timeline-dot {
  position: absolute;
  left: -37px;
  top: 18px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--v-700);
  border: 3px solid var(--v-50);
  box-shadow: 0 0 0 2px var(--v-400);
}
.timeline-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  border-left: 3px solid var(--v-300);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.timeline-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--v-500);
}
.timeline-date {
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--v-500);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 5px;
}
.timeline-text {
  font-size: 0.925rem;
  color: var(--gray-700);
  line-height: 1.7;
}
.timeline-text em { font-style: italic; color: var(--v-600); }


/* ===== PAGE HEADER (Projects, CV) ===== */
.page-hero {
  background: linear-gradient(135deg, var(--v-900) 0%, var(--v-700) 50%, var(--v-600) 100%);
  padding: 80px 28px 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.025'%3E%3Ccircle cx='40' cy='40' r='12'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.page-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: var(--white);
  letter-spacing: -0.03em;
  position: relative;
  z-index: 1;
}
.page-hero-sub {
  color: var(--v-200);
  font-size: 1rem;
  margin-top: 10px;
  position: relative;
  z-index: 1;
  font-weight: 400;
}


/* ===== FILTER BAR ===== */
.filter-bar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 20px 28px;
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: var(--nav-height);
  z-index: 100;
}
.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 900px;
  margin: 0 auto;
}
.filter-pill {
  padding: 7px 18px;
  border-radius: var(--radius-full);
  font-size: 0.83rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1.5px solid var(--v-200);
  color: var(--gray-600);
  background: var(--white);
  user-select: none;
}
.filter-pill:hover {
  border-color: var(--v-400);
  color: var(--v-700);
  background: var(--v-50);
}
.filter-pill.active {
  background: var(--v-700);
  border-color: var(--v-700);
  color: var(--white);
  box-shadow: 0 3px 10px rgb(var(--p-rgb) / 0.3);
}


/* ===== PROJECTS GRID ===== */
.projects-section {
  padding: 48px 28px 96px;
  background: var(--gray-50);
  min-height: 400px;
}
.projects-grid {
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

/* Project Card */
.project-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.28s cubic-bezier(.22,.68,0,1.2), box-shadow 0.28s ease;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.project-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow-lg);
}
.project-card.hidden {
  display: none;
}

.project-card-img-wrap {
  width: 100%;
  height: 175px;
  overflow: hidden;
  background: var(--v-100);
  flex-shrink: 0;
}
.project-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.project-card:hover .project-card-img { transform: scale(1.05); }

.project-card-body {
  padding: 20px 20px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.project-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 6px;
}
.project-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}
.badge-publication      { background: var(--v-100); color: var(--v-700); border: 1px solid var(--v-200); }
.badge-thesis           { background: #fef9c3; color: #713f12; border: 1px solid #fde68a; }
.badge-ongoing-project  { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }

.project-card-date {
  font-size: 0.78rem;
  color: var(--gray-400);
  font-variant-numeric: tabular-nums;
}
.project-card-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--gray-900);
  line-height: 1.42;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.project-card-abstract {
  font-size: 0.82rem;
  color: var(--gray-500);
  line-height: 1.65;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.project-card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--v-600);
  font-weight: 500;
  transition: gap 0.2s ease, color 0.2s ease;
}
.project-card:hover .project-card-footer {
  gap: 10px;
  color: var(--v-500);
}
.footer-arrow { font-size: 0.75em; }

/* No results message */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 0;
  color: var(--gray-400);
  font-size: 1rem;
  display: none;
}
.no-results.visible { display: block; }


/* ===== SINGLE POST ===== */
.post-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 56px 28px 96px;
}
.post-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--v-600);
  margin-bottom: 36px;
  transition: gap 0.2s ease, color 0.2s ease;
}
.post-back:hover { gap: 11px; color: var(--v-500); }

.post-header {
  padding-bottom: 32px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--v-100);
}
.post-category-label {
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--v-500);
  margin-bottom: 12px;
}
.post-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--gray-900);
  margin-bottom: 18px;
}
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
}
.post-tag {
  background: var(--v-100);
  color: var(--v-700);
  padding: 3px 11px;
  border-radius: var(--radius-full);
  font-size: 0.73rem;
  font-weight: 500;
  border: 1px solid var(--v-200);
}

.post-content {
  font-size: 1rem;
  line-height: 1.9;
  color: var(--gray-700);
}
.post-content > *:first-child { margin-top: 0; }
.post-content h2 {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  color: var(--gray-900);
  margin: 44px 0 18px;
  letter-spacing: -0.02em;
}
.post-content h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--gray-800);
  margin: 32px 0 12px;
}
.post-content p { margin-bottom: 22px; }
.post-content strong { color: var(--gray-900); font-weight: 600; }
.post-content em { font-style: italic; }
.post-content a { color: var(--v-600); text-decoration: underline; text-decoration-color: var(--v-300); text-underline-offset: 3px; transition: color 0.2s; }
.post-content a:hover { color: var(--v-500); }
.post-content img {
  border-radius: var(--radius-md);
  margin: 28px auto;
  box-shadow: var(--shadow-md);
  max-width: 100%;
}
.post-content p[align="center"] { text-align: center; }
.post-content button {
  background: var(--v-700);
  color: var(--white);
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  font-family: var(--font-sans);
  transition: background 0.2s, transform 0.2s;
  display: inline-block;
  margin: 8px 0;
}
.post-content button:hover { background: var(--v-600); transform: translateY(-1px); }
.post-content hr {
  border: none;
  border-top: 1px solid var(--v-200);
  margin: 36px 0;
}
.post-content blockquote {
  border-left: 3px solid var(--v-300);
  padding-left: 18px;
  color: var(--gray-600);
  font-style: italic;
  margin: 24px 0;
}


/* ===== CV PAGE ===== */
.cv-wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 56px 28px 96px;
}
.cv-frame-box {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--v-200);
}
.cv-frame-box iframe {
  display: block;
  width: 100%;
  border: none;
}


/* ===== FOOTER ===== */
.footer {
  background: var(--v-950);
  color: var(--v-300);
  padding: 56px 28px 40px;
  text-align: center;
}
.footer-name {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--white);
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}
.footer-affil {
  font-size: 0.85rem;
  color: var(--v-400);
  margin-bottom: 24px;
}
.footer-icons {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin-bottom: 24px;
}
.footer-icon {
  color: var(--v-400);
  font-size: 1.15rem;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--v-300) 20%, transparent);
  transition: color 0.2s, border-color 0.2s, transform 0.2s, background 0.2s;
}
.footer-icon:hover {
  color: var(--white);
  border-color: var(--v-400);
  transform: translateY(-3px);
  background: rgba(255,255,255,0.06);
}
.footer-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.footer-nav-link {
  font-size: 0.82rem;
  color: var(--v-400);
  transition: color 0.2s;
}
.footer-nav-link:hover { color: var(--white); }
.footer-copy {
  font-size: 0.78rem;
  color: var(--v-600);
}


/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-28px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}


/* ===== RESPONSIVE ===== */
@media (max-width: 960px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }
  .hero-photo-col { order: -1; }
  .hero-bio { max-width: 100%; }
  .interests { justify-content: center; }
  .cta-lines { align-items: stretch; }
  .cta-line { justify-content: space-between; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .hero { padding: 48px 20px; }
  .hero-photo-ring { width: 220px; height: 220px; }
  .projects-grid { grid-template-columns: 1fr; }
  .page-hero { padding: 56px 20px 44px; }
  .post-wrap { padding: 20px 20px 72px; }
  .nav-links {
    display: none;
    position: fixed;
    inset: var(--nav-height) 0 0 0;
    background: var(--white);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: 199;
    border-top: 1px solid var(--v-100);
  }
  .nav-links.open { display: flex; }
  .nav-link { font-size: 1.1rem; padding: 12px 32px; width: 100%; text-align: center; }
  .nav-toggle { display: flex; }
}
