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

/* ── TOKENS ── */
:root {
  --bg:           #f0ede8;
  --bg-page:      #e8e4de;
  --card:         #faf8f5;
  --border:       #ddd9d2;
  --border-2:     #ccc8c0;
  --accent:       #7a5c2e;
  --accent-light: #f0e8d8;
  --text:         #1c1a17;
  --text-2:       #4a4640;
  --text-3:       #8a8278;
  --font-serif:   'DM Serif Display', Georgia, serif;
  --font-sans:    'DM Sans', sans-serif;
  --font-mono:    'DM Mono', monospace;
  --radius:       10px;
  --shadow:       0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:    0 4px 12px rgba(0,0,0,0.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg-page);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-page); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }
::selection { background: var(--accent); color: #fff; }

/* ── TOPBAR ── */
.topbar {
  position: sticky;
  top: 0; z-index: 100;
  background: rgba(240,237,232,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar-name {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--text);
}
.topbar-nav {
  display: flex;
  gap: 0;
  list-style: none;
}
.topbar-nav a {
  display: block;
  padding: 0.3rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  letter-spacing: 0.01em;
}
.topbar-nav a:hover { background: var(--accent-light); color: var(--accent); }

/* ── PAGE LAYOUT ── */
.page-layout { padding: 2rem 0 4rem; }
.page-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 1.5rem;
  align-items: start;
}

/* ── CARD ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}
.card-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

/* ── SIDEBAR ── */
/* .sidebar { position: sticky; top: 68px; } */
.sidebar { position: static; } */

/* ── PROFILE CARD ── */
.profile-card { text-align: center; }
.profile-photo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}
.profile-photo {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--card);
  box-shadow: 0 0 0 2px var(--border), var(--shadow-md);
}
.profile-name {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 0.3rem;
}
.profile-title {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 0.4rem;
}
.profile-tagline {
  font-size: 0.75rem;
  color: var(--text-3);
  line-height: 1.5;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}
.profile-divider {
  height: 1px;
  background: var(--border);
  margin: 1.25rem 0;
}
.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  text-align: left;
}
.contact-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.5rem;
  border-radius: 6px;
  text-decoration: none;
  color: var(--text-2);
  font-size: 0.8rem;
  transition: background 0.15s, color 0.15s;
}
.contact-row:hover { background: var(--accent-light); color: var(--accent); }
.contact-icon {
  width: 16px; height: 16px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.contact-icon svg {
  width: 14px; height: 14px;
  stroke: currentColor; fill: none; stroke-width: 1.8;
}
.contact-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── SKILLS ── */
.skill-group { margin-bottom: 1.25rem; }
.skill-group:last-child { margin-bottom: 0; }
.skill-group-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.skill-list { display: flex; flex-direction: column; gap: 0.65rem; }
.skill-item {}
.skill-name-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.3rem;
}
.skill-name { font-size: 0.8rem; color: var(--text-2); }
.skill-pct { font-family: var(--font-mono); font-size: 0.62rem; color: var(--text-3); }
.skill-bar { height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; }
.skill-fill {
  height: 100%; width: 0;
  background: var(--accent);
  border-radius: 2px;
  transition: width 1.2s cubic-bezier(0.16,1,0.3,1);
}
.skill-fill.animated { width: var(--w); }

/* ── BIO ── */
.bio-text {
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.85;
}

/* ── TIMELINE ── */
.timeline { display: flex; flex-direction: column; }
.timeline-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 0 1rem;
  position: relative;
}
.timeline-item:last-child .timeline-line { display: none; }

.timeline-logo-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.org-logo-wrap {
  width: 40px; height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.org-logo {
  width: 28px; height: 28px;
  object-fit: contain;
}
.timeline-line {
  flex: 1;
  width: 1px;
  background: var(--border);
  margin: 6px 0 0;
  min-height: 1.5rem;
}

.timeline-body {
  padding-bottom: 2rem;
}
.timeline-item:last-child .timeline-body { padding-bottom: 0; }

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.timeline-role {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.timeline-org {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 500;
  margin-top: 0.1rem;
}
.timeline-period {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-3);
  white-space: nowrap;
  margin-top: 0.2rem;
  flex-shrink: 0;
}
.timeline-desc {
  font-size: 0.85rem;
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 0.75rem;
}

/* ── TECH TAGS ── */
.tech-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tech-tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-3);
  background: var(--bg-page);
  border: 1px solid var(--border);
  padding: 0.18rem 0.55rem;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

/* ── PROJECTS ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.project-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.project-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(122,92,46,0.1);
}
.project-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}
.project-desc {
  font-size: 0.82rem;
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}
.project-links { display: flex; gap: 1rem; margin-top: 0.75rem; }
.project-link {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-3);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  letter-spacing: 0.05em;
  transition: color 0.15s;
}
.project-link:hover { color: var(--accent); }
.project-link svg { width: 11px; height: 11px; stroke: currentColor; fill: none; stroke-width: 1.8; }

/* ── PUBLICATIONS ── */
.pub-list { display: flex; flex-direction: column; }
.pub-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 0 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.pub-item:first-child { padding-top: 0; }
.pub-item:last-child { border-bottom: none; padding-bottom: 0; }
.pub-year {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-3);
  padding-top: 0.15rem;
}
.pub-body { display: flex; flex-direction: column; gap: 0.2rem; }
.pub-title {
  font-size: 0.85rem;
  color: var(--text);
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.15s;
}
a.pub-title:hover { color: var(--accent); text-decoration: underline; }
.pub-journal {
  font-size: 0.75rem;
  color: var(--accent);
  font-style: italic;
}

/* ── FOOTER ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-name {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  color: var(--text-2);
}
.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-3);
}

/* ── REVEAL ── */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── RESPONSIVE ── */
@media (max-width: 860px) {
  .page-container { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .topbar-nav { display: none; }
  .timeline-header { flex-direction: column; gap: 0.25rem; }
}
@media (max-width: 500px) {
  .page-container { padding: 0 1rem; }
  .card { padding: 1.25rem; }
}



.profile-photo-placeholder {
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.profile-photo-placeholder svg {
  width: 44px;
  height: 44px;
}
.profile-photo-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
    width: 150px;
    height: 150px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--card);
    box-shadow: 0 0 0 2px var(--border), var(--shadow-md);
}

.profile-photo {
    width: 130%;
    height: 130%;
    border-radius: 0;
    object-fit: cover;
    object-position: center top;
    border: none;
    box-shadow: none;
}



.org-logo-wrap {
    width: 12px;
    height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 6px;
}

.timeline-bullet {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
    display: block;
}
section[id],
div[id] {
    scroll-margin-top: 68px;
}
.profile-title {
    text-align: center;
}
