@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,400&family=JetBrains+Mono:wght@400&display=swap');

:root {
  --ink: #1a1a1a;
  --paper: #f6f3ee;
  --accent: #b44a2f;
  --accent-light: #e8d5cd;
  --muted: #8a8278;
  --rule: #d4cec4;
  --card-bg: #fffdf9;
  --section-alt: #efeae2;
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: #fff; }

/* ===== NAV ===== */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background 0.4s, box-shadow 0.3s, border-color 0.4s;
}

nav.nav-dark {
  background: transparent;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
nav.nav-dark.scrolled {
  background: rgba(246, 243, 238, 0.92);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 2px 24px rgba(0,0,0,0.06);
  border-color: var(--rule);
}
nav.nav-dark .nav-name { color: rgba(255,255,255,0.95); }
nav.nav-dark .nav-links a { color: rgba(255,255,255,0.6); }
nav.nav-dark .nav-links a:hover { color: #fff; }
nav.nav-dark .nav-links a.active { color: #fff; border-bottom-color: var(--accent); }
nav.nav-dark.scrolled .nav-name,
nav.nav-dark.scrolled .nav-links a { color: var(--ink); }
nav.nav-dark.scrolled .nav-links a:hover,
nav.nav-dark.scrolled .nav-links a.active { color: var(--accent); }

nav.nav-light {
  background: rgba(246, 243, 238, 0.92);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 2px 24px rgba(0,0,0,0.06);
  border-bottom: 1px solid var(--rule);
}
nav.nav-light .nav-name { color: var(--ink); }
nav.nav-light .nav-links a { color: var(--muted); }
nav.nav-light .nav-links a:hover,
nav.nav-light .nav-links a.active { color: var(--accent); }

nav .nav-inner {
  max-width: 1100px; margin: 0 auto; padding: 0.85rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
}

nav .nav-name {
  font-family: 'Instrument Serif', serif; font-size: 1.25rem;
  text-decoration: none; transition: color 0.4s;
  letter-spacing: -0.01em;
}
nav .nav-name span {
  color: var(--accent);
}

nav .nav-links { display: flex; gap: 1.8rem; list-style: none; }
nav .nav-links a {
  text-decoration: none; font-size: 0.82rem;
  font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em;
  transition: color 0.3s;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}

/* Mobile hamburger */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.nav-toggle span {
  display: block; width: 22px; height: 2px; margin: 5px 0;
  background: var(--ink); transition: all 0.3s;
}

/* ===== PAGE HEADER (for inner pages) ===== */
.page-header {
  padding: 3rem 2rem 3rem;
  text-align: center;
  border-bottom: 1px solid var(--rule);
}
.page-header .section-number {
  font-family: 'JetBrains Mono', monospace; font-size: 0.7rem;
  color: var(--accent); opacity: 0.7; display: block; margin-bottom: 0.5rem;
}
.page-header h1 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400; letter-spacing: -0.02em;
}
.page-header p {
  margin-top: 0.8rem; color: var(--muted); font-size: 0.95rem; max-width: 500px; margin-inline: auto;
}

/* ===== SECTIONS ===== */
section { padding: 4rem 2rem; }
section.alt { background: var(--section-alt); }
.section-inner { max-width: 1100px; margin: 0 auto; }

.section-header {
  display: flex; align-items: baseline; gap: 1rem; margin-bottom: 3rem;
}
.section-number {
  font-family: 'JetBrains Mono', monospace; font-size: 0.7rem;
  color: var(--accent); opacity: 0.7;
}
h2 {
  font-family: 'Instrument Serif', serif; font-size: 2.2rem;
  font-weight: 400; letter-spacing: -0.015em;
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 6rem 2rem 4rem;
  position: relative; overflow: hidden;
  background: #0e1117;
  color: #fff;
}

.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 15% 80%, rgba(180, 74, 47, 0.35) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 85% 20%, rgba(100, 140, 200, 0.2) 0%, transparent 70%),
    radial-gradient(ellipse 80% 40% at 50% 50%, rgba(180, 74, 47, 0.08) 0%, transparent 60%);
  animation: meshDrift 12s ease-in-out infinite alternate;
}

@keyframes meshDrift {
  0% { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.08) translate(-20px, 10px); }
}

.hero::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.hero-orb { position: absolute; border-radius: 50%; pointer-events: none; filter: blur(1px); }
.hero-orb-1 {
  width: 320px; height: 320px; top: 8%; right: 5%;
  background: radial-gradient(circle, rgba(180,74,47,0.3) 0%, transparent 70%);
  animation: orbFloat1 8s ease-in-out infinite;
}
.hero-orb-2 {
  width: 200px; height: 200px; bottom: 12%; left: 8%;
  background: radial-gradient(circle, rgba(100,160,220,0.2) 0%, transparent 70%);
  animation: orbFloat2 10s ease-in-out infinite;
}
.hero-orb-3 {
  width: 140px; height: 140px; top: 30%; left: 35%;
  background: radial-gradient(circle, rgba(180,74,47,0.15) 0%, transparent 70%);
  animation: orbFloat3 7s ease-in-out infinite;
}

@keyframes orbFloat1 { 0%, 100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-30px,20px) scale(1.1); } }
@keyframes orbFloat2 { 0%, 100% { transform: translate(0,0); } 50% { transform: translate(20px,-25px); } }
@keyframes orbFloat3 { 0%, 100% { transform: translate(0,0) scale(1); } 50% { transform: translate(15px,15px) scale(0.9); } }

.hero-content {
  position: relative; z-index: 2;
  max-width: 1100px; margin: 0 auto; width: 100%;
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 4rem; align-items: center;
}

.hero-text { animation: heroFadeUp 1s ease both; }
.hero-right { animation: heroFadeUp 1s 0.2s ease both; }

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

.hero-label {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.16em;
  color: rgba(255,255,255,0.5); font-weight: 500; margin-bottom: 1.6rem;
}
.hero-label::before {
  content: ''; display: inline-block; width: 28px; height: 1px; background: var(--accent);
}

.hero h1 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(2.8rem, 5.5vw, 4.4rem);
  line-height: 1.06; font-weight: 400; letter-spacing: -0.025em;
  margin-bottom: 1.6rem; color: #fff;
}
.hero h1 em {
  font-style: italic;
  background: linear-gradient(135deg, #e07a5a, #c45a38);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-bio {
  font-size: 1.05rem; color: rgba(255,255,255,0.55);
  max-width: 500px; margin-bottom: 2.2rem; line-height: 1.75;
}

.hero-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }
.hero-tags span {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  padding: 0.45rem 0.9rem; border-radius: 100px;
  font-size: 0.76rem; color: rgba(255,255,255,0.65); font-weight: 500;
  backdrop-filter: blur(8px); transition: border-color 0.2s, color 0.2s;
}
.hero-tags span:hover { border-color: var(--accent); color: rgba(255,255,255,0.9); }
.hero-tags .tag-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

.hero-cta {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: var(--accent); font-size: 0.84rem; font-weight: 600;
  text-decoration: none; letter-spacing: 0.04em; transition: gap 0.2s;
}
.hero-cta:hover { gap: 0.8rem; }
.hero-cta svg { transition: transform 0.2s; }
.hero-cta:hover svg { transform: translateX(3px); }

.hero-portrait { display: flex; justify-content: center; margin-bottom: 1.6rem; }
.hero-portrait img {
  width: 180px; height: 180px; border-radius: 50%;
  object-fit: cover; object-position: center top;
  border: 3px solid rgba(255,255,255,0.1);
  box-shadow: 0 0 0 6px rgba(180,74,47,0.15), 0 20px 60px rgba(0,0,0,0.4);
  transition: transform 0.3s, box-shadow 0.3s;
}
.hero-portrait img:hover {
  transform: scale(1.04);
  box-shadow: 0 0 0 6px rgba(180,74,47,0.25), 0 24px 70px rgba(0,0,0,0.5);
}

.hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.hero-stat {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px; padding: 1.6rem 1.2rem; text-align: center;
  backdrop-filter: blur(12px);
  transition: transform 0.25s, border-color 0.25s, background 0.25s;
}
.hero-stat:hover {
  transform: translateY(-4px);
  border-color: rgba(180,74,47,0.4); background: rgba(255,255,255,0.07);
}
.hero-stat .num {
  font-family: 'Instrument Serif', serif; font-size: 2.6rem; line-height: 1;
  background: linear-gradient(135deg, #fff, rgba(255,255,255,0.7));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin-bottom: 0.35rem;
}
.hero-stat .lbl {
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: rgba(255,255,255,0.4); font-weight: 500;
}

.hero-keywords {
  margin-top: 1.2rem; padding: 1.2rem 1.4rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06); border-radius: 14px;
}
.hero-keywords h4 {
  font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.14em;
  color: rgba(255,255,255,0.3); margin-bottom: 0.7rem; font-weight: 600;
}
.hero-keywords p {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem; color: rgba(255,255,255,0.35); line-height: 1.9;
}
.hero-keywords p span { color: var(--accent); }

.scroll-hint {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  animation: heroFadeUp 1s 0.6s ease both;
}
.scroll-hint span {
  font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.16em;
  color: rgba(255,255,255,0.25); font-weight: 500;
}
.scroll-line {
  width: 1px; height: 32px; background: rgba(255,255,255,0.15);
  position: relative; overflow: hidden;
}
.scroll-line::after {
  content: ''; position: absolute; top: -100%; left: 0;
  width: 100%; height: 100%; background: var(--accent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse { 0% { top: -100%; } 50% { top: 100%; } 100% { top: 100%; } }

/* ===== ABOUT ===== */
.about-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 3rem; }
.about-text p { margin-bottom: 1rem; color: #444; font-size: 0.97rem; }

.role-card {
  background: var(--card-bg); border: 1px solid var(--rule);
  border-radius: 12px; padding: 1.4rem; margin-bottom: 1rem;
}
.role-card h4 {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--accent); margin-bottom: 0.6rem; font-weight: 600;
}
.role-card p { font-size: 0.88rem; color: #555; line-height: 1.55; }

/* ===== RESEARCH ===== */
.research-areas {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin-bottom: 3rem;
}
.area-card {
  border: 1px solid var(--rule); border-radius: 12px;
  padding: 1.8rem 1.5rem; background: var(--card-bg);
  position: relative; overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}
.area-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.area-card::after {
  content: ''; position: absolute; top: 0; left: 0;
  width: 100%; height: 3px; background: var(--accent);
  transform: scaleX(0); transition: transform 0.3s; transform-origin: left;
}
.area-card:hover::after { transform: scaleX(1); }
.area-card h3 { font-family: 'Instrument Serif', serif; font-size: 1.2rem; margin-bottom: 0.7rem; font-weight: 400; }
.area-card p { font-size: 0.84rem; color: var(--muted); line-height: 1.6; }

.framework-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.framework-card {
  background: var(--card-bg); border: 1px solid var(--rule);
  border-radius: 14px; padding: 2rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.framework-card:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(0,0,0,0.06); }
.framework-card h3 { font-family: 'Instrument Serif', serif; font-size: 1.4rem; margin-bottom: 0.4rem; }
.framework-card .abbr {
  font-family: 'JetBrains Mono', monospace; font-size: 0.7rem;
  color: var(--accent); margin-bottom: 0.8rem; display: block;
}
.framework-card p { font-size: 0.88rem; color: #555; line-height: 1.6; }

/* ===== PUBLICATIONS ===== */
.pub-list { list-style: none; }
.pub-item {
  border-bottom: 1px solid var(--rule); padding: 1.6rem 0;
  display: grid; grid-template-columns: 80px 1fr auto;
  gap: 1.2rem; align-items: start;
}
.pub-item:first-child { border-top: 1px solid var(--rule); }
.pub-year {
  font-family: 'JetBrains Mono', monospace; font-size: 0.78rem;
  color: var(--accent); padding-top: 0.2rem;
}
.pub-title {
  font-family: 'Instrument Serif', serif; font-size: 1.05rem;
  line-height: 1.45; margin-bottom: 0.35rem;
}
.pub-meta { font-size: 0.78rem; color: var(--muted); }
.pub-journal {
  display: inline-block; background: var(--accent-light); color: var(--accent);
  padding: 0.15rem 0.55rem; border-radius: 4px; font-size: 0.68rem;
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap;
}

/* ===== EDUCATION ===== */
.timeline { position: relative; padding-left: 2.4rem; }
.timeline::before {
  content: ''; position: absolute; left: 0.45rem; top: 0.4rem; bottom: 0.4rem;
  width: 1px; background: var(--rule);
}
.timeline-item { position: relative; margin-bottom: 2rem; }
.timeline-item::before {
  content: ''; position: absolute; left: -2.05rem; top: 0.4rem;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--accent);
}
.timeline-item h3 { font-family: 'Instrument Serif', serif; font-size: 1.15rem; font-weight: 400; margin-bottom: 0.2rem; }
.timeline-item .institution { font-size: 0.88rem; color: var(--accent); margin-bottom: 0.15rem; }
.timeline-item .year { font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; color: var(--muted); }

.awards-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.award-card {
  display: flex; align-items: flex-start; gap: 1rem;
  background: var(--card-bg); border: 1px solid var(--rule);
  border-radius: 12px; padding: 1.4rem;
}
.award-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent-light); display: flex;
  align-items: center; justify-content: center; flex-shrink: 0;
  color: var(--accent); font-size: 0.9rem;
}
.award-card h4 { font-size: 0.92rem; font-weight: 500; margin-bottom: 0.2rem; }
.award-card p { font-size: 0.78rem; color: var(--muted); }

/* ===== CONTACT ===== */
.contact-inner { text-align: center; max-width: 560px; margin: 0 auto; }
.contact-inner p { font-size: 1rem; color: #555; margin-bottom: 2rem; }
.contact-links { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.contact-links a {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.7rem 1.4rem; border: 1px solid var(--rule);
  border-radius: 100px; text-decoration: none; color: var(--ink);
  font-size: 0.84rem; font-weight: 500; transition: all 0.2s; background: var(--card-bg);
}
.contact-links a:hover {
  border-color: var(--accent); color: var(--accent);
  transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

/* ===== FOOTER ===== */
footer {
  text-align: center; padding: 2.5rem 2rem;
  font-size: 0.75rem; color: var(--muted); border-top: 1px solid var(--rule);
}

/* ===== ANIMATION ===== */
.fade-in {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .hero-content { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero { min-height: auto; padding: 8rem 1.5rem 4rem; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 2.6rem; }
  .hero-portrait img { width: 140px; height: 140px; }
}
@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; }
  .research-areas { grid-template-columns: 1fr; }
  .pub-item { grid-template-columns: 60px 1fr; }
  .pub-journal { display: none; }
  .framework-row { grid-template-columns: 1fr; }
  .awards-grid { grid-template-columns: 1fr; }
  section { padding: 3.5rem 1.2rem; }
  nav .nav-links { gap: 1rem; }
  nav .nav-links a { font-size: 0.72rem; }
  .nav-toggle { display: block; }
  .nav-links-wrap {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    padding: 1rem 2rem; flex-direction: column; gap: 0.8rem;
  }
  .nav-links-wrap.open { display: flex; }
  nav .nav-links { flex-direction: column; gap: 0.8rem; }
}
@media (max-width: 480px) {
  .hero { padding: 7rem 1.2rem 3rem; }
  .scroll-hint { display: none; }
}
