:root {
  --bg:        #080b10;
  --surface:   #0d1219;
  --card:      #111820;
  --card-hover:#151f2a;
  --border:    #1c2b3a;
  --border-light: #243547;
  --accent:    #4fa3d1;          /* calm steel blue */
  --accent-dim:rgba(79,163,209,0.12);
  --green:     #4caf87;
  --amber:     #c8a45a;
  --text:      #dde6f0;
  --muted:     #5a7a96;
  --subtle:    #2a3f52;
  --font-serif:'Instrument Serif', Georgia, serif;
  --font-mono: 'Geist Mono', 'Courier New', monospace;
  --font-sans: 'Geist', system-ui, sans-serif;
  --radius:    10px;
  --shadow:    0 4px 24px rgba(0,0,0,0.45);
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.65;
  overflow-x: hidden;
}

/* ── Subtle grid texture ── */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(79,163,209,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79,163,209,0.025) 1px, transparent 1px);
  background-size: 72px 72px;
}

a { color: var(--accent); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.75; }

/* ════════════════════════════════════════
   NAV
════════════════════════════════════════ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 3rem;
  height: 60px;
  background: rgba(8,11,16,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}
.nav.scrolled { background: rgba(8,11,16,0.97); }

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1rem; font-weight: 600;
  color: var(--accent); letter-spacing: 0.05em;
  text-decoration: none;
}

.nav-links { display: flex; gap: 2rem; }
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.72rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted);
  text-decoration: none; transition: color 0.2s;
  position: relative; padding-bottom: 2px;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 0; height: 1px; background: var(--accent);
  transition: width 0.25s ease;
}
.nav-links a:hover { color: var(--text); opacity: 1; }
.nav-links a:hover::after { width: 100%; }

.nav-burger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-burger span {
  display: block; width: 22px; height: 1.5px;
  background: var(--muted); transition: all 0.25s;
}

/* Mobile menu */
.mobile-menu {
  display: none; flex-direction: column; gap: 0;
  position: fixed; top: 60px; left: 0; right: 0; z-index: 99;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.mobile-menu.open { display: flex; }
.mm-link {
  font-family: var(--font-mono);
  font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
  text-decoration: none; transition: color 0.2s, background 0.2s;
}
.mm-link:hover { color: var(--text); background: var(--card); opacity: 1; }

/* ════════════════════════════════════════
   HERO
════════════════════════════════════════ */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: row;
  align-items: center; justify-content: space-between;
  padding: 8rem 3rem 4rem;
  max-width: 1100px; margin: 0 auto;
  position: relative; z-index: 1;
  gap: 3rem;
}

.hero-left {
  display: flex; flex-direction: column;
  align-items: flex-start;
  flex: 1;
}

.hero-right {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  animation: fadeUp 0.7s 0.5s ease both;
}

.hero-photo-wrap {
  position: relative;
  width: 300px; height: 300px;
}

.hero-photo {
  width: 300px; height: 300px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  display: block;
  position: relative; z-index: 1;
  border: 2px solid var(--border);
}

.hero-photo-ring {
  position: absolute; inset: -8px;
  border-radius: 50%;
  border: 1px solid rgba(79,163,209,0.25);
  z-index: 0;
  animation: ringPulse 3s ease infinite;
}

@keyframes ringPulse {
  0%,100% { transform: scale(1); opacity: 0.5; }
  50%      { transform: scale(1.03); opacity: 1; }
}

.hero-eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 2rem;
  animation: fadeUp 0.7s ease both;
}

.dot-pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.5s ease infinite;
}
@keyframes pulse {
  0%,100% { opacity:1; transform: scale(1); }
  50%      { opacity:0.3; transform: scale(0.7); }
}

.hero-name {
  display: flex; flex-direction: column;
  font-family: var(--font-serif);
  font-size: clamp(4rem, 10vw, 8rem);
  font-weight: 400; line-height: 0.95;
  letter-spacing: -0.02em; color: #fff;
  animation: fadeUp 0.7s 0.1s ease both;
}
.hero-last {
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255,255,255,0.4);
}

.hero-sub {
  font-family: var(--font-serif);
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--muted); margin-top: 1.8rem;
  line-height: 1.6;
  animation: fadeUp 0.7s 0.2s ease both;
}
.hero-sub em { color: var(--text); font-style: italic; }

.hero-chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 2rem;
  animation: fadeUp 0.7s 0.3s ease both;
}
.chip {
  font-family: var(--font-mono);
  font-size: 0.67rem; letter-spacing: 0.08em;
  padding: 5px 12px; border-radius: 4px;
  background: var(--card); border: 1px solid var(--border);
  color: var(--muted);
}

.hero-actions {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-top: 2.5rem;
  animation: fadeUp 0.7s 0.4s ease both;
}
.btn {
  font-family: var(--font-mono);
  font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 11px 24px; border-radius: 6px;
  text-decoration: none; transition: all 0.22s ease; display: inline-block;
}
.btn-primary {
  background: var(--accent); color: #000; font-weight: 600;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(79,163,209,0.35); opacity: 1; }
.btn-outline {
  border: 1px solid var(--border); color: var(--muted);
}
.btn-outline:hover { border-color: var(--accent); color: var(--text); opacity: 1; }

.hero-scroll {
  position: absolute; bottom: 3rem; left: 3rem;
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 0.62rem;
  letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted);
  animation: fadeUp 0.7s 0.6s ease both;
}
.scroll-line {
  width: 40px; height: 1px;
  background: linear-gradient(90deg, var(--muted), transparent);
  animation: scrollAnim 2s ease infinite;
}
@keyframes scrollAnim {
  0%,100% { transform: scaleX(1); transform-origin: left; }
  50% { transform: scaleX(0.4); transform-origin: left; }
}

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

/* ════════════════════════════════════════
   STATS BAND
════════════════════════════════════════ */
.stats-band {
  display: flex; align-items: center; justify-content: center;
  gap: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: relative; z-index: 1;
}
.stat {
  display: flex; flex-direction: column; align-items: center;
  padding: 2rem 3.5rem; gap: 4px; flex: 1;
}
.stat-n {
  font-family: var(--font-serif);
  font-size: 2.4rem; color: var(--accent); line-height: 1;
}
.stat-l {
  font-family: var(--font-mono);
  font-size: 0.65rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted);
}
.stat-div {
  width: 1px; height: 60px;
  background: var(--border);
}

/* ════════════════════════════════════════
   SECTIONS
════════════════════════════════════════ */
.section { padding: 7rem 0; position: relative; z-index: 1; }
.section-alt { background: var(--surface); }

.section-inner {
  max-width: 1100px; margin: 0 auto;
  padding: 0 3rem;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1.5rem;
}

.section-heading {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 400; line-height: 1.05;
  letter-spacing: -0.02em;
  color: #fff; margin-bottom: 3rem;
}
.section-heading em {
  font-style: italic; color: var(--muted);
}

/* ════════════════════════════════════════
   ABOUT
════════════════════════════════════════ */
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 4rem; align-items: start;
}

.about-text p {
  color: var(--muted); font-size: 0.95rem; line-height: 1.8;
  margin-bottom: 1rem;
}

.about-edu { margin-top: 2.5rem; display: flex; flex-direction: column; gap: 1px; }
.edu-item {
  display: flex; flex-direction: column;
  padding: 1.2rem 1.5rem;
  background: var(--card); border: 1px solid var(--border);
}
.edu-item:first-child { border-radius: 8px 8px 0 0; }
.edu-item:last-child  { border-radius: 0 0 8px 8px; }
.edu-org {
  font-family: var(--font-sans);
  font-size: 0.88rem; font-weight: 600; color: var(--text);
  margin-bottom: 0.3rem;
}
.edu-detail {
  font-family: var(--font-mono);
  font-size: 0.7rem; color: var(--muted); letter-spacing: 0.04em;
}

/* achievements card */
.achievements-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.ach-header {
  font-family: var(--font-mono);
  font-size: 0.62rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 1.2rem;
}
.ach-item {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--border);
}
.ach-item:first-of-type { border-top: none; padding-top: 0; }
.ach-rank {
  font-family: var(--font-serif);
  font-size: 1.6rem; color: var(--accent);
  min-width: 48px; line-height: 1;
}
.ach-title {
  font-size: 0.83rem; font-weight: 600; color: var(--text);
  margin-bottom: 0.2rem;
}
.ach-desc {
  font-family: var(--font-mono);
  font-size: 0.67rem; color: var(--muted);
}

/* stack card */
.stack-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  display: flex; flex-direction: column; gap: 1.2rem;
}
.stack-row { display: flex; flex-direction: column; gap: 0.5rem; }
.stack-label {
  font-family: var(--font-mono);
  font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted);
}
.stack-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.stack-tags span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 4px 10px; border-radius: 4px;
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text);
}

/* ════════════════════════════════════════
   TIMELINE
════════════════════════════════════════ */
.timeline { display: flex; flex-direction: column; gap: 0; }

.tl-item {
  display: grid;
  grid-template-columns: 140px 24px 1fr;
  gap: 0 1.5rem;
  padding-bottom: 3rem;
}
.tl-item:last-child { padding-bottom: 0; }

.tl-left {
  padding-top: 2px;
  text-align: right;
}
.tl-period {
  font-family: var(--font-mono);
  font-size: 0.67rem; letter-spacing: 0.05em;
  color: var(--muted);
}

.tl-connector {
  display: flex; flex-direction: column;
  align-items: center;
}
.tl-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0;
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 1px var(--accent);
  margin-top: 3px;
}
.tl-line {
  width: 1px; flex: 1;
  background: var(--border); margin-top: 8px;
}

.tl-content {
  padding-bottom: 0.5rem;
}
.tl-role {
  font-size: 1rem; font-weight: 600; color: var(--text);
  margin-bottom: 0.2rem;
}
.tl-org {
  font-family: var(--font-mono);
  font-size: 0.7rem; color: var(--accent); margin-bottom: 0.9rem;
}
.tl-points {
  list-style: none; padding: 0;
  display: flex; flex-direction: column; gap: 0.4rem;
  margin-bottom: 1rem;
}
.tl-points li {
  font-size: 0.85rem; color: var(--muted); line-height: 1.65;
  padding-left: 1.1rem; position: relative;
}
.tl-points li::before {
  content: '—'; position: absolute; left: 0;
  color: var(--border);
}
.tl-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.tl-tags span {
  font-family: var(--font-mono);
  font-size: 0.62rem; padding: 3px 9px;
  border-radius: 4px; border: 1px solid var(--border);
  color: var(--muted);
}

/* ════════════════════════════════════════
   PROJECT CARDS + CAROUSEL
════════════════════════════════════════ */
.proj-category {
  font-family: var(--font-mono);
  font-size: 0.65rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.2rem; margin-top: 3.5rem;
  padding-left: 2px;
}
.proj-category:first-of-type { margin-top: 0; }

.carousel-wrap { position: relative; overflow: hidden; }

.carousel-track {
  display: flex; gap: 1.5rem;
  transition: transform 0.45s cubic-bezier(0.4,0,0.2,1);
  will-change: transform;
}

.proj-card {
  flex: 0 0 calc(50% - 0.75rem);   /* 2 visible at once */
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  display: flex; flex-direction: column;
  transition: border-color 0.2s ease, background 0.2s ease;
  min-height: 240px;
}
.proj-card:hover {
  border-color: var(--border-light);
  background: var(--card-hover);
}

.proj-card-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 0.9rem;
}
.proj-type {
  font-family: var(--font-mono);
  font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 4px;
}
.proj-type.research { background: rgba(79,163,209,0.1); color: var(--accent); border: 1px solid rgba(79,163,209,0.25); }
.proj-type.course   { background: rgba(124,58,237,0.08); color: #9b7fe8; border: 1px solid rgba(124,58,237,0.2); }
.proj-type.personal { background: rgba(76,175,135,0.08); color: var(--green); border: 1px solid rgba(76,175,135,0.2); }

.proj-link-icon {
  font-size: 1.1rem; color: var(--muted);
  transition: color 0.2s, transform 0.2s;
  text-decoration: none;
}
.proj-card:hover .proj-link-icon { color: var(--accent); transform: translate(2px,-2px); }

.proj-name {
  font-family: var(--font-sans);
  font-size: 1.05rem; font-weight: 600;
  color: var(--text); margin-bottom: 0.65rem;
}

.proj-desc {
  font-size: 0.83rem; color: var(--muted);
  line-height: 1.7; flex: 1;
  margin-bottom: 1.3rem;
}

.proj-footer {
  display: flex; justify-content: space-between;
  align-items: flex-end; gap: 1rem;
  flex-wrap: wrap;
}
.proj-tags {
  display: flex; flex-wrap: wrap; gap: 5px;
}
.proj-tags span {
  font-family: var(--font-mono);
  font-size: 0.6rem; padding: 2px 8px;
  border-radius: 3px; border: 1px solid var(--border);
  color: var(--muted);
}
.proj-links {
  display: flex; gap: 10px; flex-shrink: 0;
}
.proj-links a {
  font-family: var(--font-mono);
  font-size: 0.68rem; color: var(--accent);
  border-bottom: 1px solid rgba(79,163,209,0.3);
  padding-bottom: 1px; text-decoration: none;
  transition: border-color 0.2s;
}
.proj-links a:hover { border-color: var(--accent); opacity: 1; }

/* carousel controls */
.carousel-controls {
  display: flex; align-items: center; justify-content: center;
  gap: 1rem; margin-top: 1.2rem;
}
.car-btn {
  background: var(--card); border: 1px solid var(--border);
  color: var(--muted);
  width: 36px; height: 36px; border-radius: 6px;
  font-size: 1rem; cursor: pointer;
  transition: all 0.2s ease;
  display: flex; align-items: center; justify-content: center;
}
.car-btn:hover { border-color: var(--accent); color: var(--accent); }
.car-btn:disabled { opacity: 0.3; cursor: default; }

.car-dots { display: flex; gap: 6px; align-items: center; }
.car-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--border); transition: all 0.2s;
}
.car-dot.active { background: var(--accent); width: 18px; border-radius: 3px; }

/* ════════════════════════════════════════
   PAPERS
════════════════════════════════════════ */
.papers-list { display: flex; flex-direction: column; gap: 1px; }

.paper-item {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 0; padding: 2rem;
  display: flex; flex-direction: column; gap: 0.5rem;
  transition: background 0.2s;
}
.papers-list .paper-item:first-child { border-radius: 10px 10px 0 0; }
.papers-list .paper-item:last-child  { border-radius: 0 0 10px 10px; }
.papers-list .paper-item:only-child  { border-radius: 10px; }
.paper-item:hover { background: var(--card-hover); }

.paper-meta { display: flex; gap: 8px; margin-bottom: 0.3rem; }
.paper-status {
  font-family: var(--font-mono);
  font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 4px;
}
.paper-status.pending { background: rgba(200,164,90,0.1); color: var(--amber); border: 1px solid rgba(200,164,90,0.25); }
.paper-status.published { background: rgba(76,175,135,0.1); color: var(--green); border: 1px solid rgba(76,175,135,0.25); }

.paper-title {
  font-size: 1rem; font-weight: 600; color: var(--text);
}
.paper-authors {
  font-family: var(--font-mono);
  font-size: 0.72rem; color: var(--accent);
}
.paper-venue {
  font-family: var(--font-mono);
  font-size: 0.7rem; color: var(--muted);
}
.paper-placeholder-note {
  font-size: 0.8rem; color: var(--subtle);
  font-style: italic; margin-top: 0.5rem;
}
.paper-placeholder { border-style: dashed; }

/* ════════════════════════════════════════
   CONTACT
════════════════════════════════════════ */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 4rem; align-items: start;
}

.contact-text {
  color: var(--muted); font-size: 0.9rem; line-height: 1.8;
  margin-bottom: 2rem;
}
.contact-details { display: flex; flex-direction: column; gap: 0.8rem; }
.contact-item {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted);
  text-decoration: none;
}
.contact-item:hover { color: var(--text); opacity: 1; }
.contact-icon { font-size: 0.9rem; }

.contact-right {
  display: flex; flex-direction: column; gap: 1px;
}
.social-card {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--card); border: 1px solid var(--border);
  padding: 1.4rem 1.8rem;
  text-decoration: none;
  transition: all 0.2s ease;
}
.contact-right .social-card:first-child { border-radius: 10px 10px 0 0; }
.contact-right .social-card:last-child  { border-radius: 0 0 10px 10px; }
.social-card:hover { background: var(--card-hover); border-color: var(--accent); }
.social-name {
  font-family: var(--font-sans); font-size: 0.95rem;
  font-weight: 500; color: var(--text);
}
.social-arrow {
  color: var(--muted); font-size: 1.1rem;
  transition: transform 0.2s, color 0.2s;
}
.social-card:hover .social-arrow { transform: translate(3px,-3px); color: var(--accent); }

/* ════════════════════════════════════════
   FOOTER
════════════════════════════════════════ */
.footer {
  border-top: 1px solid var(--border);
  position: relative; z-index: 1;
}
.footer-inner {
  max-width: 1100px; margin: 0 auto; padding: 2rem 3rem;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono);
  font-size: 0.68rem; letter-spacing: 0.06em; color: var(--muted);
}

/* ════════════════════════════════════════
   SCROLL REVEAL
════════════════════════════════════════ */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════ */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .nav { padding: 0 1.5rem; }

  .hero {
    flex-direction: column-reverse;
    padding: 7rem 1.5rem 4rem;
    align-items: flex-start;
    gap: 2rem;
  }
  .hero-right { width: 100%; justify-content: center; }
  .hero-photo-wrap { width: 200px; height: 200px; }
  .hero-photo { width: 200px; height: 200px; }
  .hero-scroll { left: 1.5rem; }

  .section-inner { padding: 0 1.5rem; }
  .footer-inner { padding: 1.5rem; }

  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }

  .tl-item { grid-template-columns: 90px 20px 1fr; gap: 0 1rem; }
  .tl-period { font-size: 0.6rem; }

  .stats-band { flex-wrap: wrap; }
  .stat { padding: 1.5rem 2rem; flex: 1 1 40%; }
  .stat-div { display: none; }

  .proj-card { flex: 0 0 calc(100% - 1.5rem); }
}

@media (max-width: 560px) {
  .hero-name { font-size: clamp(3rem, 14vw, 5rem); }
  .section-heading { font-size: clamp(1.8rem, 7vw, 2.5rem); }

  .tl-item { grid-template-columns: 1fr; gap: 0.4rem; }
  .tl-left { text-align: left; }
  .tl-connector { display: none; }
  .tl-content { padding-left: 0; }

  .footer-inner { flex-direction: column; gap: 0.5rem; text-align: center; }
}
