/* ============================================
   DESIGN TOKENS
   ============================================ */
:root {
  --ink: #0f1419;
  --ink-soft: #161d24;
  --paper: #f7f5f0;
  --paper-dim: #ece8df;
  --brass: #c89b3c;
  --brass-soft: #e0c274;
  --slate: #8a95a1;
  --slate-dark: #4a5560;
  --white: #fafaf8;
  --line: rgba(250, 250, 248, 0.1);
  --line-dark: rgba(15, 20, 25, 0.1);

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  --max-width: 1100px;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 7rem;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-body);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* ============================================
   NAV
   ============================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 20, 25, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  height: 64px;
}

.nav-mark {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--brass);
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 1150px) {
  .nav-mark { font-size: 0.7rem; }
}

.nav-links {
  display: flex;
  gap: var(--space-md);
  font-size: 0.9rem;
}

.nav-links a {
  color: var(--slate);
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav-links a:hover, .nav-links a:focus-visible { color: var(--white); }

.nav-links a.active {
  color: var(--brass);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 1150px) {
  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--ink-soft);
    flex-direction: column;
    padding: var(--space-md);
    gap: var(--space-sm);
    border-bottom: 1px solid var(--line);
    transform: translateY(-150%);
    transition: transform 0.3s ease;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-toggle { display: block; }
}

/* ============================================
   HERO
   ============================================ */
.hero {
  padding: var(--space-xl) 0 var(--space-lg);
  border-bottom: 1px solid var(--line);
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: var(--space-lg);
  align-items: center;
}

.status-line {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--brass-soft);
  border: 1px solid var(--line);
  padding: 0.4rem 0.8rem;
  border-radius: 100px;
  margin-bottom: var(--space-md);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brass);
  box-shadow: 0 0 8px var(--brass);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: var(--space-sm);
}

.hero .role {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--brass);
  margin-bottom: var(--space-md);
}

.hero p.lead {
  color: #cfd4da;
  font-size: 1.02rem;
  max-width: 60ch;
  margin-bottom: var(--space-md);
}

.hero-ctas {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1.4rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--brass);
  color: var(--ink);
}
.btn-primary:hover { background: var(--brass-soft); }

.btn-ghost {
  border-color: var(--line);
  color: var(--white);
}
.btn-ghost:hover { border-color: var(--brass); color: var(--brass-soft); }

.hero-photo {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 4/5;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(15%);
}

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-photo { max-width: 320px; margin: 0 auto; order: -1; }
}

/* ============================================
   ACADEMIC HOME LAYOUT
   ============================================ */
.academic-hero {
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--line);
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--space-lg);
  align-items: start;
}

.sidebar-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.news-card {
  background: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: var(--space-md);
}

.news-card-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brass-soft);
  margin-bottom: 0.8rem;
}

.profile-main h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.profile-main .role {
  color: var(--slate);
  font-size: 1rem;
  margin-bottom: var(--space-md);
}

.interest-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: var(--space-md);
}

.interest-tags a.skill-tag {
  transition: border-color 0.2s ease, color 0.2s ease;
}
.interest-tags a.skill-tag:hover { border-color: var(--brass); color: var(--brass); }

.greeting {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.profile-main > p.lead {
  color: #c2c8ce;
  margin-bottom: var(--space-md);
  max-width: 65ch;
}

.block-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brass-soft);
  margin: var(--space-md) 0 0.7rem;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--line);
}

.plain-list {
  color: #c2c8ce;
  font-size: 0.95rem;
  margin-bottom: var(--space-md);
}
.plain-list li {
  list-style: disc;
  margin-left: 1.2rem;
  margin-bottom: 0.3rem;
}

.news-list { display: flex; flex-direction: column; }
.news-item {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}
.news-item:last-child { border-bottom: none; }
.news-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--brass);
  margin-bottom: 0.2rem;
}
.news-item p { font-size: 0.92rem; color: #d3d8dd; }

.profile-sidebar {
  background: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: var(--space-md);
  text-align: center;
}

.sidebar-photo {
  width: 100%;
  max-width: 220px;
  aspect-ratio: 1/1;
  margin: 0 auto var(--space-sm);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.sidebar-photo img { width: 100%; height: 100%; object-fit: cover; }

.profile-sidebar h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.sidebar-role { color: var(--brass-soft); font-size: 0.85rem; }
.sidebar-affil { color: var(--slate); font-size: 0.82rem; margin-bottom: var(--space-sm); }

.sidebar-contacts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--line);
}
.sidebar-contacts a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--brass);
  border: 1px solid var(--line);
  padding: 0.35rem 0.7rem;
  border-radius: 100px;
}
.sidebar-contacts a:hover { border-color: var(--brass); }

.mini-timeline { text-align: left; }
.mini-item {
  font-size: 0.85rem;
  color: #d3d8dd;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}
.mini-item:last-child { border-bottom: none; }
.mini-date {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--brass);
  margin-bottom: 0.2rem;
}
.mini-place { color: var(--slate); font-size: 0.8rem; }

@media (max-width: 860px) {
  .profile-grid { grid-template-columns: 1fr; }
  .sidebar-stack { order: -1; max-width: 320px; margin: 0 auto; }
}

/* ============================================
   SECTIONS (general)
   ============================================ */
section { padding: var(--space-lg) 0; border-bottom: 1px solid var(--line); }
section:last-of-type { border-bottom: none; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--slate);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
}

/* ============================================
   BENTO / VENTURE CARDS
   ============================================ */
.venture-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

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

.venture-card {
  background: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.venture-card:hover { border-color: var(--brass); transform: translateY(-3px); }

.venture-logo {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  overflow: hidden;
}

.venture-card h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
}

.venture-card .subtitle {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--brass-soft);
}

.venture-card p { color: #c2c8ce; font-size: 0.95rem; }

.venture-link {
  margin-top: auto;
  font-size: 0.88rem;
  color: var(--brass);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  width: fit-content;
}
.venture-link:hover { color: var(--brass-soft); }

/* ============================================
   PUBLICATIONS
   ============================================ */
.pub-list { display: flex; flex-direction: column; gap: 0; }

.pub-item {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: var(--space-sm);
  align-items: center;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}

.pub-item:last-child { border-bottom: none; }

.pub-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--slate);
}

.pub-title { font-size: 0.98rem; }
.pub-type {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--brass-soft);
  display: block;
  margin-top: 0.2rem;
}

.pub-link {
  font-size: 0.85rem;
  color: var(--brass);
  border: 1px solid var(--line);
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  white-space: nowrap;
}
.pub-link:hover { border-color: var(--brass); }

@media (max-width: 640px) {
  .pub-item { grid-template-columns: 1fr; gap: 0.4rem; }
}

.rg-banner {
  margin-top: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* ============================================
   TIMELINE (education / international)
   ============================================ */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--line);
}

.tl-item { position: relative; padding-bottom: var(--space-md); }
.tl-item:last-child { padding-bottom: 0; }

.tl-item::before {
  content: "";
  position: absolute;
  left: -2rem;
  top: 5px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--ink);
  border: 2px solid var(--brass);
}

.tl-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--brass-soft);
  margin-bottom: 0.2rem;
}

.tl-item h3 { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; margin-bottom: 0.2rem; }
.tl-item .place { color: var(--slate); font-size: 0.9rem; margin-bottom: 0.3rem; }
.tl-item p.detail { color: #c2c8ce; font-size: 0.92rem; }

.exp-header { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.2rem; }
.exp-mono {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: rgba(200, 155, 60, 0.12);
  color: var(--brass);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.1;
}
.exp-header h3 { margin: 0; }

/* ============================================
   AWARDS
   ============================================ */
.awards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm) var(--space-md);
}
@media (max-width: 760px) { .awards-grid { grid-template-columns: 1fr; } }

.award-item {
  display: flex;
  gap: 0.8rem;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--line);
}
.award-mark { color: var(--brass); font-family: var(--font-mono); flex-shrink: 0; }
.award-item p { font-size: 0.92rem; color: #d3d8dd; }

/* ============================================
   SKILLS
   ============================================ */
.skills-row { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.skill-tag {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.6rem 1rem;
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--brass-soft);
}

.footprint-group { margin-bottom: var(--space-sm); }
.footprint-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate);
  margin-bottom: 0.5rem;
}

.footprints-d3-map {
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--ink-soft);
  line-height: 0;
}

.footprints-info {
  margin-top: var(--space-sm);
  padding: 0.9rem 1.1rem;
  background: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.9rem;
  color: #d3d8dd;
}
.footprints-info strong { color: var(--brass-soft); }

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-top: var(--space-sm);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--slate);
}
.map-legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
.legend-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brass);
}
.legend-unvisited { background: var(--slate); border: 1px solid var(--slate); }

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: var(--space-sm);
}

.tool-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.8rem 1rem;
  font-size: 0.9rem;
  color: #d3d8dd;
  transition: border-color 0.2s ease;
}
.tool-item:hover { border-color: var(--brass); }

.tool-mono {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(200, 155, 60, 0.12);
  color: var(--brass);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================
   CONTACT
   ============================================ */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-md);
}

.contact-card {
  background: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: var(--space-md);
}

.contact-card .label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate);
  margin-bottom: 0.6rem;
}

.contact-card a, .contact-card p {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
  word-break: break-word;
}
.contact-card a:hover { color: var(--brass); }

footer {
  padding: var(--space-lg) 0 var(--space-md);
  margin-top: var(--space-lg);
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.footer-col h5 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brass-soft);
  margin-bottom: 0.7rem;
}

.footer-col p, .footer-col a {
  display: block;
  color: var(--slate);
  font-size: 0.85rem;
  line-height: 1.7;
}
.footer-col a:hover { color: var(--brass); }

.footer-copy {
  text-align: center;
  padding-top: var(--space-md);
  color: var(--slate);
}

@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; text-align: center; }
}
