/* ═══════════════════════════════════════════════════════════
   style.css — Academic researcher portfolio
═══════════════════════════════════════════════════════════ */

/* ── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #ffffff;
  --bg-alt:   #f7f9fc;
  --text:     #1a1a1a;
  --text-2:   #444444;
  --text-3:   #6b6b6b;
  --accent:   #1a4f8a;
  --accent-l: #e8f0fa;
  --border:   #dce3ed;
  --nav-h:    60px;
  --max-w:    960px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: disc; padding-left: 1.4em; }
li { margin-bottom: .3em; }
strong { font-weight: 600; }


/* ── NAVIGATION ───────────────────────────────────────────── */
#navbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(255,255,255,0.97);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  transition: transform 0.3s ease;
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text);
}
.nav-logo:hover { text-decoration: none; color: var(--accent); }

.nav-links {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  font-size: .85rem;
  color: var(--text-2);
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--accent); text-decoration: none; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all .25s ease;
}

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 99;
  padding: 1rem 1.5rem 1.5rem;
}
.mobile-menu.open { display: block; }
.mobile-menu ul { list-style: none; padding: 0; }
.mobile-menu li { border-bottom: 1px solid var(--border); }
.mobile-menu a {
  display: block;
  padding: .75rem 0;
  color: var(--text-2);
  font-size: .95rem;
}


/* ── PAGE LAYOUT ──────────────────────────────────────────── */
main { padding-top: var(--nav-h); }

section { padding: 3.5rem 0; }
section:nth-child(even) { background: var(--bg-alt); }

.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.01em;
  margin-bottom: .45rem;
}

.section-divider {
  height: 2px;
  width: 36px;
  background: var(--accent);
  margin-bottom: 1.8rem;
}


/* ── HOME / ABOUT ─────────────────────────────────────────── */
.home-grid {
  display: grid;
  grid-template-columns: 1fr 268px;
  gap: 3rem;
  align-items: start;
}

h1 {
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: .25rem;
}

.home-role {
  font-size: .97rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: .1rem;
}

.home-affil {
  font-size: .88rem;
  color: var(--text-3);
  margin-bottom: 1.4rem;
}

.home-bio {
  font-size: .96rem;
  color: var(--text-2);
  margin-bottom: .85rem;
}

.home-interests {
  font-size: .88rem;
  color: var(--text-2);
  padding: .7rem 1rem;
  background: var(--accent-l);
  border-left: 3px solid var(--accent);
  border-radius: 2px;
  margin: 1.1rem 0;
}

.home-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: .88rem;
  color: var(--text-2);
  margin-bottom: 1.4rem;
}

.home-actions { display: flex; gap: .7rem; flex-wrap: wrap; }

.btn-primary {
  display: inline-block;
  padding: .5rem 1.15rem;
  background: var(--accent);
  color: #fff;
  border-radius: 4px;
  font-size: .86rem;
  font-weight: 600;
  transition: background .2s;
}
.btn-primary:hover { background: #153f70; text-decoration: none; color: #fff; }

.btn-secondary {
  display: inline-block;
  padding: .5rem 1.15rem;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  border-radius: 4px;
  font-size: .86rem;
  font-weight: 600;
  transition: background .2s;
}
.btn-secondary:hover { background: var(--accent-l); text-decoration: none; }

/* Sidebar */
.info-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.1rem 1.2rem;
  font-size: .86rem;
  color: var(--text-2);
}
.info-card h3 {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-3);
  margin-bottom: .4rem;
}
.ic-title { font-weight: 600; color: var(--text); margin-bottom: .1rem; }
.ic-sub   { color: var(--text-3); margin-bottom: .1rem; }
.ic-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: .85rem 0;
}
.course-list { padding-left: 1.2em; }
.course-list li { margin-bottom: .2rem; }


/* ── RESEARCH ─────────────────────────────────────────────── */
.research-list { display: flex; flex-direction: column; gap: 0; }

.research-item {
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--border);
}
.research-item:first-child { padding-top: 0; }
.research-item:last-child  { border-bottom: none; }

.research-meta {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin-bottom: .4rem;
}

.research-year {
  font-size: .8rem;
  color: var(--text-3);
}

.research-type {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--accent);
  background: var(--accent-l);
  padding: .12rem .48rem;
  border-radius: 3px;
}

.research-item h3 {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .18rem;
}

.research-venue {
  font-size: .85rem;
  font-style: italic;
  color: var(--text-3);
  margin-bottom: .55rem;
}

.research-desc {
  font-size: .93rem;
  color: var(--text-2);
  margin-bottom: .75rem;
}

.research-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-bottom: .55rem;
}
.research-tags span {
  font-size: .76rem;
  background: #f0f4f8;
  border: 1px solid var(--border);
  padding: .12rem .5rem;
  border-radius: 3px;
  color: var(--text-2);
}


/* ── PROJECTS ─────────────────────────────────────────────── */
.projects-list { display: flex; flex-direction: column; gap: 0; }

.project-item {
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--border);
}
.project-item:first-child { padding-top: 0; }
.project-item:last-child  { border-bottom: none; }

.entry-header-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: .35rem;
}
.entry-header-row h3 {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text);
}
.entry-year {
  font-size: .82rem;
  color: var(--text-3);
  white-space: nowrap;
}

.entry-desc {
  font-size: .93rem;
  color: var(--text-2);
  margin-bottom: .5rem;
}

.entry-tech {
  font-size: .86rem;
  color: var(--text-3);
  margin-bottom: .5rem;
}

.entry-links { display: flex; gap: .8rem; }

.rlink {
  font-size: .85rem;
  font-weight: 600;
  color: var(--accent);
}
.rlink:hover { text-decoration: underline; }


/* ── TWO-COLUMN EXPERIENCE + PUBLICATIONS ─────────────────── */
#exp-pub { background: var(--bg-alt); }

.two-col-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: start;
}

/* Experience timeline inside two-col */
.timeline { display: flex; flex-direction: column; }

.timeline-item {
  padding: 0 0 1.6rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.6rem;
}
.timeline-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.tl-meta { margin-bottom: .55rem; }

.tl-period {
  display: block;
  font-size: .8rem;
  color: var(--text-3);
  margin-bottom: .25rem;
}

.tl-type {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--accent);
  background: var(--accent-l);
  padding: .1rem .42rem;
  border-radius: 3px;
}

.tl-body h3 {
  font-size: .98rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .15rem;
}

.tl-org {
  font-size: .85rem;
  font-style: italic;
  color: var(--text-3);
  margin-bottom: .6rem;
}

.tl-body ul {
  font-size: .9rem;
  color: var(--text-2);
  margin-bottom: .65rem;
}

.tl-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}
.tl-tags span {
  font-size: .74rem;
  background: #eef1f6;
  border: 1px solid var(--border);
  padding: .1rem .44rem;
  border-radius: 3px;
  color: var(--text-2);
}

/* Publications */
.pub-list { display: flex; flex-direction: column; gap: 1.5rem; }

.pub-group-title {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-3);
  border-bottom: 1px solid var(--border);
  padding-bottom: .35rem;
  margin-bottom: .7rem;
}

.pub-placeholder {
  font-size: .88rem;
  color: var(--text-3);
  font-style: italic;
}

/* Individual publication entry — ready to populate */
.pub-entry {
  margin-bottom: 1rem;
}
.pub-entry:last-child { margin-bottom: 0; }

.pub-authors {
  font-size: .86rem;
  color: var(--text-2);
  margin-bottom: .1rem;
}

.pub-title {
  font-size: .92rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: .1rem;
}

.pub-venue {
  font-size: .84rem;
  color: var(--text-3);
  margin-bottom: .35rem;
}

.pub-links { display: flex; gap: .7rem; }


/* ── SKILLS — compact summary table ──────────────────────── */
#skills { background: var(--bg); }

.skills-compact {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  color: var(--text-2);
}

.skills-compact tr {
  border-bottom: 1px solid var(--border);
}
.skills-compact tr:last-child { border-bottom: none; }

.skills-compact th {
  width: 130px;
  text-align: left;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-3);
  padding: .75rem 1.2rem .75rem 0;
  vertical-align: top;
  white-space: nowrap;
}

.skills-compact td {
  padding: .75rem 0;
  color: var(--text-2);
  line-height: 1.6;
}


/* ── CONTACT ──────────────────────────────────────────────── */
.contact-note {
  font-size: .93rem;
  color: var(--text-2);
  margin-bottom: 1.8rem;
  max-width: 540px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: .9rem;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  transition: border-color .2s, background .2s;
}
.contact-card:hover {
  border-color: var(--accent);
  background: var(--accent-l);
  text-decoration: none;
  color: var(--text);
}

.cc-icon {
  font-size: .95rem;
  color: var(--accent);
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.cc-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-3);
  margin-bottom: .1rem;
}

.cc-val { font-size: .83rem; color: var(--text-2); }


/* ── FOOTER ───────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 1.4rem 0;
  background: var(--bg-alt);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  font-size: .8rem;
  color: var(--text-3);
}





/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 780px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }

  .home-grid {
    grid-template-columns: 1fr;
  }
  .home-side { order: -1; }

  /* Stack two-col layout vertically */
  .two-col-section {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  /* Divider between stacked columns */
  .two-col-right {
    border-top: 1px solid var(--border);
    padding-top: 2rem;
  }

  h1 { font-size: 1.6rem; }
}

@media (max-width: 500px) {
  section { padding: 2.5rem 0; }

  .contact-grid { grid-template-columns: 1fr; }

  .skills-compact th {
    width: 100px;
    font-size: .72rem;
  }
}
