/* ================================================================
   renxk.com — Award-Level Design System
   Design Concept: "Editorial Elegance"
   ================================================================ */

/* === Reset & Variables === */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}

:root {
  /* Typography */
  --font: "PingFang SC","Hiragino Sans GB","Microsoft YaHei","Segoe UI",system-ui,-apple-system,sans-serif;
  --font-display: "PingFang SC","Hiragino Sans GB","Microsoft YaHei","Segoe UI",system-ui,-apple-system,sans-serif;

  /* Palette — warm editorial */
  --ink: #1a1a24;
  --ink-soft: #3d3d50;
  --ink-muted: #8c8ca0;
  --stripe: #f0ede8;
  --surface: #faf9f6;
  --card: #ffffff;
  --border: #e8e4dc;
  --border-soft: #f0ede880;
  --accent: #5b4ceb;
  --accent-glow: #7c6ff7;
  --warm: #e8953b;

  /* Spacing scale */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 32px;
  --space-xl: 64px;
  --space-2xl: 96px;
  --space-3xl: 128px;

  /* Radii */
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  /* Shadows — layered depth */
  --shadow-1: 0 1px 2px rgba(0,0,0,.03),0 1px 3px rgba(0,0,0,.04);
  --shadow-2: 0 2px 8px rgba(0,0,0,.04),0 4px 16px rgba(0,0,0,.03);
  --shadow-3: 0 8px 32px rgba(0,0,0,.06),0 2px 8px rgba(0,0,0,.03);
  --shadow-card: 0 1px 3px rgba(0,0,0,.04),0 6px 24px rgba(0,0,0,.04),0 0 0 1px rgba(0,0,0,.02);
  --shadow-card-hover: 0 2px 6px rgba(0,0,0,.05),0 12px 40px rgba(0,0,0,.07),0 0 0 1px rgba(91,76,235,.08);

  /* Transitions */
  --ease-out: cubic-bezier(.25,.8,.25,1);
  --ease-spring: cubic-bezier(.34,1.56,.64,1);
  --ease-smooth: cubic-bezier(.4,0,.2,1);
  --dur-fast: 150ms;
  --dur: 300ms;
  --dur-slow: 600ms;
  --dur-reveal: 800ms;
}

html {
  font-size: 17px;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font);
  background: var(--surface);
  color: var(--ink);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Selection */
::selection { background: rgba(91,76,235,.15); color: var(--ink); }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ================================================================
   TYPOGRAPHY
   ================================================================ */

h1,h2,h3,h4 { font-weight: 700; letter-spacing: -.02em; line-height: 1.25; }
h1 { font-size: clamp(2.5rem,6vw,4.5rem); }
h2 { font-size: clamp(1.5rem,3vw,2rem); }
h3 { font-size: 1.125rem; font-weight: 600; letter-spacing: -.01em; }

/* ================================================================
   ANIMATED BACKGROUND
   ================================================================ */

.bg-mesh {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: .6;
}
.bg-mesh .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: orbFloat 20s infinite var(--ease-smooth);
}
.bg-mesh .orb:nth-child(1) {
  width: 500px; height: 500px;
  background: rgba(91,76,235,.08);
  top: -10%; left: -5%;
  animation-delay: 0s;
}
.bg-mesh .orb:nth-child(2) {
  width: 400px; height: 400px;
  background: rgba(232,149,59,.06);
  top: 60%; right: -8%;
  animation-delay: -7s;
}
.bg-mesh .orb:nth-child(3) {
  width: 350px; height: 350px;
  background: rgba(91,76,235,.05);
  bottom: -10%; left: 30%;
  animation-delay: -14s;
}

@keyframes orbFloat {
  0%,100% { transform: translate(0,0) scale(1); }
  25% { transform: translate(40px,-30px) scale(1.1); }
  50% { transform: translate(-20px,20px) scale(.95); }
  75% { transform: translate(30px,10px) scale(1.05); }
}

/* ================================================================
   NAVIGATION
   ================================================================ */

.topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 32px;
  transition: background .4s var(--ease-out),box-shadow .4s var(--ease-out),
              backdrop-filter .4s var(--ease-out);
  will-change: background;
}
.topnav.scrolled {
  background: rgba(250,249,246,.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 1px 0 rgba(0,0,0,.04);
}
.topnav .logo {
  font-size: 1.1rem;
  font-weight: 750;
  letter-spacing: -.02em;
  color: var(--ink);
  cursor: pointer;
}
.topnav .logo span { color: var(--accent); }
.topnav .logo .dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-left: 1px;
  animation: dotPulse 2s infinite;
}
@keyframes dotPulse {
  0%,100% { opacity: 1; }
  50% { opacity: .4; }
}

.topnav nav { display: flex; gap: 28px; align-items: center; }
.topnav nav a {
  font-size: .88rem;
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
  cursor: pointer;
}
.topnav nav a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1.5px;
  background: var(--accent);
  transition: width .3s var(--ease-out);
}
.topnav nav a:hover::after,
.topnav nav a.active::after { width: 100%; }
.topnav nav a:hover { color: var(--ink); }
.topnav nav a.cta-nav {
  padding: 6px 16px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-full);
  font-size: 1.1rem;
  font-weight: 600;
  transition: background .2s,transform .2s;
}
.topnav nav a.cta-nav::after { display: none; }
.topnav nav a.cta-nav:hover {
  background: var(--accent-glow);
  transform: translateY(-1px);
}

/* ================================================================
   HERO — Name Pages
   ================================================================ */

.hero {
  text-align: center;
  padding: 160px 24px 80px;
  position: relative;
  overflow: hidden;
}

.hero .avatar-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 28px;
}
.hero .avatar {
  width: 120px; height: 120px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff;
  position: relative;
  z-index: 2;
  box-shadow: 0 8px 32px rgba(0,0,0,.15),0 0 0 6px rgba(255,255,255,.8);
  user-select: none;
  transition: transform .4s var(--ease-spring);
}
.hero .avatar:hover { transform: scale(1.05); }
.hero .avatar-ring {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1.5px dashed var(--border);
  z-index: 1;
  animation: ringRotate 30s linear infinite;
}
@keyframes ringRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hero .name {
  font-size: clamp(2.5rem,6vw,4rem);
  font-weight: 800;
  letter-spacing: .02em;
  margin-bottom: 6px;
  line-height: 1.1;
}

.hero .pinyin-row {
  font-size: 1rem;
  color: var(--ink-muted);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.hero .pinyin-row .sep { color: var(--border); }

.hero .tag-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.hero .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  color: #fff;
  font-size: .84rem;
  font-weight: 600;
  letter-spacing: .01em;
  box-shadow: 0 4px 16px rgba(91,76,235,.2);
}
.hero .badge .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,.7);
}
.hero .location {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .9rem;
  color: var(--ink-muted);
}

.hero .intro {
  max-width: 560px;
  margin: 24px auto 0;
  font-size: 1.05rem;
  color: var(--ink-soft);
  line-height: 1.8;
}

/* Hero links bar */
.hero .links-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
}

.link-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: .88rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: all .25s var(--ease-out);
  box-shadow: var(--shadow-1);
  position: relative;
  overflow: hidden;
}
.link-pill::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  opacity: 0;
  transition: opacity .25s var(--ease-out);
  border-radius: var(--radius-full);
  z-index: -1;
}
.link-pill:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
  border-color: transparent;
}
.link-pill:hover::before { opacity: .05; }
.link-pill .emoji { font-size: 1.1rem; }

/* ================================================================
   SECTIONS — Shared
   ================================================================ */

.page-section {
  padding: var(--space-xl) 24px;
  position: relative;
}
.page-section.alt { background: var(--card); }

.section-inner {
  max-width: 780px;
  margin: 0 auto;
  position: relative;
}

.section-label {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-header {
  margin-bottom: 48px;
  position: relative;
}
.section-header h2 {
  font-size: clamp(1.5rem,3vw,2rem);
  font-weight: 750;
  letter-spacing: -.02em;
  line-height: 1.2;
}
.section-header .section-line {
  width: 48px;
  height: 3px;
  border-radius: 2px;
  margin-top: 16px;
}

/* ================================================================
   ABOUT
   ================================================================ */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: start;
}
.about-grid p {
  color: var(--ink-soft);
  line-height: 1.85;
  font-size: .98rem;
}
.about-grid p:first-child {
  font-size: 1.1rem;
  color: var(--ink);
}

@media (max-width: 640px) {
  .about-grid { grid-template-columns: 1fr; }
}

/* ================================================================
   TIMELINE (Experience / Education)
   ================================================================ */

.timeline {
  position: relative;
  padding-left: 36px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 11px; top: 6px; bottom: 6px;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), var(--border) 60%);
  opacity: .4;
}

.timeline-item {
  position: relative;
  margin-bottom: 36px;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  transition: box-shadow .3s var(--ease-out),transform .3s var(--ease-out);
}
.timeline-item:last-child { margin-bottom: 0; }
.timeline-item:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateX(4px);
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -28px; top: 30px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(91,76,235,.12);
  transition: box-shadow .3s var(--ease-out);
}
.timeline-item:hover::before {
  box-shadow: 0 0 0 8px rgba(91,76,235,.2);
}

.ti-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.ti-role { font-weight: 700; font-size: 1.02rem; }
.ti-company { color: var(--accent); font-weight: 600; }
.ti-period {
  font-size: 1.1rem;
  color: var(--ink-muted);
  font-weight: 500;
  white-space: nowrap;
}
.ti-desc { color: var(--ink-soft); font-size: .9rem; line-height: 1.65; }

/* ================================================================
   SKILLS
   ================================================================ */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.skill-card {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-1);
  transition: box-shadow .3s var(--ease-out);
}
.skill-card:hover { box-shadow: var(--shadow-2); }
.skill-card .skill-name {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: .9rem;
  font-weight: 600;
  margin-bottom: 10px;
}
.skill-card .skill-name .pct {
  font-size: 1.1rem;
  color: var(--ink-muted);
  font-weight: 500;
}
.skill-card .track {
  height: 5px;
  background: #eee;
  border-radius: 3px;
  overflow: hidden;
}
.skill-card .fill {
  height: 100%;
  border-radius: 3px;
  width: 0;
  transition: width 1.2s var(--ease-smooth);
}

/* ================================================================
   PROJECTS
   ================================================================ */

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.project-card {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
  transition: all .4s var(--ease-out);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.project-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(600px circle at var(--mx,50%) var(--my,50%),
    rgba(91,76,235,.04), transparent 40%);
  opacity: 0;
  transition: opacity .4s;
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}
.project-card:hover::after { opacity: 1; }

.project-card .pc-no {
  font-size: 3rem;
  font-weight: 800;
  color: rgba(91,76,235,.08);
  line-height: 1;
  margin-bottom: -8px;
}
.project-card h3 { font-size: 1.05rem; margin: 12px 0 8px; }
.project-card p { font-size: .9rem; color: var(--ink-soft); line-height: 1.65; margin-bottom: 14px; }
.project-card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.project-card .tag {
  font-size: .75rem;
  padding: 3px 10px;
  background: #f5f3f0;
  border-radius: var(--radius-full);
  color: var(--ink-muted);
  font-weight: 500;
}

/* ================================================================
   BLOG
   ================================================================ */

.blog-list {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-1);
}
.blog-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 28px;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
  transition: all .25s var(--ease-out);
  gap: 16px;
  flex-wrap: wrap;
  position: relative;
}
.blog-item:last-child { border-bottom: none; }
.blog-item::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transition: transform .3s var(--ease-out);
  border-radius: 0 3px 3px 0;
}
.blog-item:hover { background: #faf9f8; }
.blog-item:hover::before { transform: scaleY(1); }
.blog-item .blog-title {
  font-weight: 600;
  font-size: .95rem;
  transition: color .2s;
}
.blog-item:hover .blog-title { color: var(--accent); }
.blog-item .blog-rhs {
  display: flex;
  align-items: center;
  gap: 10px;
}
.blog-cat {
  font-size: .74rem;
  padding: 3px 10px;
  background: rgba(91,76,235,.06);
  color: var(--accent);
  border-radius: var(--radius-full);
  font-weight: 600;
}
.blog-date { font-size: .8rem; color: var(--ink-muted); }

/* ================================================================
   CONTACT
   ================================================================ */

.contact-section {
  text-align: center;
  padding: var(--space-2xl) 24px;
  position: relative;
}
.contact-section .cta-text {
  max-width: 500px;
  margin: 0 auto 28px;
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.75;
}

/* ================================================================
   FOOTER
   ================================================================ */

.site-footer {
  text-align: center;
  padding: 48px 24px;
  border-top: 1px solid var(--border);
  color: var(--ink-muted);
  font-size: 1.1rem;
  cursor: auto;
}
.site-footer .powered {
  font-size: .85rem;
  margin-bottom: 4px;
  color: var(--ink-soft);
}
.site-footer .domain-sale {
  margin-top: 6px;
  font-size: .78rem;
  opacity: .7;
  transition: opacity .3s;
}
.site-footer .domain-sale:hover { opacity: 1; }
.site-footer .domain-sale a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ================================================================
   HOME PAGE
   ================================================================ */

.home-hero {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  position: relative;
}

.home-hero .domain-display {
  position: relative;
  margin-bottom: 32px;
}
.home-hero .domain-name {
  font-size: clamp(3rem,8vw,6rem);
  font-weight: 850;
  letter-spacing: -.03em;
  line-height: 1;
  background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 40%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 4px 8px rgba(91,76,235,.2));
}
.home-hero .tagline {
  font-size: clamp(1rem,2vw,1.25rem);
  color: var(--ink-soft);
  margin-top: 16px;
  font-weight: 450;
  letter-spacing: .02em;
}

.home-hero .stat-row {
  display: flex;
  gap: 48px;
  margin-top: 48px;
  flex-wrap: wrap;
  justify-content: center;
}
.stat-item { text-align: center; }
.stat-item .stat-num {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -.02em;
  background: linear-gradient(135deg, var(--accent), var(--accent-glow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-item .stat-label {
  font-size: 1.1rem;
  color: var(--ink-muted);
  margin-top: 4px;
  font-weight: 500;
}

.home-scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounceDown 2s infinite;
}
.home-scroll-hint span {
  display: block;
  width: 24px; height: 24px;
  border-right: 2px solid var(--ink-muted);
  border-bottom: 2px solid var(--ink-muted);
  transform: rotate(45deg);
  opacity: .4;
}
@keyframes bounceDown {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* Value grid */
.value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.value-card {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-card);
  transition: all .4s var(--ease-out);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.value-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(400px circle at var(--mx,50%) var(--my,50%),
    rgba(91,76,235,.04), transparent 40%);
  opacity: 0;
  transition: opacity .4s;
}
.value-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); }
.value-card:hover::after { opacity: 1; }
.value-card .vc-icon { font-size: 1.6rem; margin-bottom: 14px; }
.value-card h3 { font-size: 1.02rem; margin-bottom: 6px; }
.value-card p { font-size: .88rem; color: var(--ink-soft); line-height: 1.65; }

/* Directory */
.name-directory {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px var(--space-2xl);
  text-align: center;
}
.name-directory .dir-desc {
  font-size: .92rem;
  color: var(--ink-muted);
  margin-bottom: 28px;
}
.name-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(126px, 1fr));
  gap: 8px;
}
.name-grid a {
  display: block;
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: all .25s var(--ease-out);
}
.name-grid a:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: var(--shadow-2);
  transform: translateY(-2px);
}

/* ================================================================
   SCROLL ANIMATIONS
   ================================================================ */

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .8s var(--ease-smooth), transform .8s var(--ease-smooth);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity .7s var(--ease-smooth), transform .7s var(--ease-smooth);
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity .7s var(--ease-smooth), transform .7s var(--ease-smooth);
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }

.reveal-scale {
  opacity: 0;
  transform: scale(.9);
  transition: opacity .6s var(--ease-smooth), transform .6s var(--ease-smooth);
}
.reveal-scale.visible { opacity: 1; transform: scale(1); }

/* Stagger delays for children */
.stagger > *:nth-child(1) { transition-delay: 0ms; }
.stagger > *:nth-child(2) { transition-delay: 80ms; }
.stagger > *:nth-child(3) { transition-delay: 160ms; }
.stagger > *:nth-child(4) { transition-delay: 240ms; }
.stagger > *:nth-child(5) { transition-delay: 320ms; }
.stagger > *:nth-child(6) { transition-delay: 400ms; }
.stagger > *:nth-child(7) { transition-delay: 480ms; }
.stagger > *:nth-child(8) { transition-delay: 560ms; }

/* ================================================================
   DEMO NOTICE BANNER
   ================================================================ */

.demo-banner {
  background: linear-gradient(135deg, #fff8e6 0%, #fff3d0 100%);
  border-top: 1px solid #f0d78c;
  border-bottom: 1px solid #f0d78c;
  text-align: center;
  padding: 14px 24px;
  font-size: .9rem;
  font-weight: 500;
  color: #8b6914;
  margin-bottom: 0;
}
.demo-banner strong { color: #6b4f10; }
.demo-banner a {
  color: #8b6914;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}

/* ================================================================
   ENHANCED FOOTER — Contact & QR
   ================================================================ */

.contact-footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 56px 24px 40px;
  text-align: center;
}
.contact-footer h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.contact-footer .cf-subtitle {
  color: var(--ink-muted);
  font-size: .88rem;
  margin-bottom: 32px;
}

.qr-row {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.qr-item {
  text-align: center;
}
.qr-item .qr-box {
  width: 120px; height: 120px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fafaf8;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  font-size: .75rem;
  color: var(--ink-muted);
}
.qr-item .qr-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--radius);
}
.qr-item .qr-label {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.contact-footer .email-line {
  font-size: .9rem;
  color: var(--ink-soft);
  margin-bottom: 24px;
}
.contact-footer .email-line a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-footer .demo-footnote {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 1.1rem;
  color: var(--ink-muted);
}
.contact-footer .demo-footnote strong { color: var(--warm); }

/* ================================================================
   CONTACT MODAL
   ================================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease-out);
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }

.modal-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 40px 36px 32px;
  max-width: 440px;
  width: calc(100% - 40px);
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.15);
  position: relative;
  transform: translateY(20px);
  transition: transform .35s var(--ease-spring);
}
.modal-overlay.open .modal-card { transform: translateY(0); }

.modal-close {
  position: absolute;
  top: 12px; right: 16px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: #f0f0f3;
  font-size: 1.2rem;
  color: var(--ink-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.modal-close:hover { background: #e0e0e5; }

.modal-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.modal-sub {
  font-size: .88rem;
  color: var(--ink-muted);
  margin-bottom: 24px;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */

@media (max-width: 768px) {
  html { font-size: 16px; }
  .topnav { padding: 14px 20px; }
  .topnav nav { gap: 18px; }
  .topnav nav a { font-size: 1.1rem; }
  .topnav nav a.cta-nav { display: none; }
  .hero { padding: 120px 20px 60px; }
  .hero .avatar { width: 96px; height: 96px; font-size: 2rem; }
  .hero .name { font-size: 2rem; }
  .page-section { padding: 48px 20px; }
  .section-header { margin-bottom: 32px; }
  .project-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
  .home-hero .stat-row { gap: 32px; }
  .stat-item .stat-num { font-size: 1.6rem; }
  .blog-item { padding: 16px 20px; }
}

@media (max-width: 480px) {
  .hero { padding: 100px 16px 48px; }
  .hero .name { font-size: 1.7rem; }
  .skills-grid { grid-template-columns: 1fr; }
  .value-grid { grid-template-columns: 1fr; }
  .timeline-item { padding: 18px; }
  .topnav nav { gap: 14px; }
}