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

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

:root {
  --bg:         #ffffff;
  --surface:    #f7f7f7;
  --surface-2:  #ececec;
  --accent:     #0095eb;
  --accent-h:   #0077c0;
  --text:        rgba(0,0,0,0.8);
  --text-dark:   #313131;
  --text-muted:  rgba(0,0,0,0.54);
  --border:      #e5e5e5;
  --radius:      4px;
}

html {
  font-family: 'Roboto', sans-serif;
  font-size: 16px;
  color: var(--text);
  line-height: 1.65;
}

body {
  background: var(--bg);
  font-family: inherit;
  font-size: 1rem;
  line-height: inherit;
  color: inherit;
  margin-top: 60px;
}

/* ── Navigation ── */
nav {
  position: fixed;
  top: 0;
  left: 0; right: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  padding: 0 1.5rem;
}

.nav-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-brand {
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  color: var(--text-dark);
  text-decoration: none;
}

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

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-family: 'Roboto', sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius);
  transition: color 0.2s;
  display: block;
}

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

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Layout & Sections ── */
.home-section {
  padding: 80px 1.5rem;
  animation: intro 0.3s both;
  animation-delay: 0.15s;
}

.home-section:nth-of-type(even) {
  background-color: var(--surface);
}

.section-inner {
  max-width: 1000px;
  margin: 0 auto;
}

main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 60px 1.5rem 80px;
}

@keyframes intro {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  line-height: 1.25;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.5rem; margin-top: 1rem; }
h3 { font-size: 1.1rem; margin-top: 1rem; }

p { margin-bottom: 1rem; }

a { color: var(--accent); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--accent-h); }

/* ── Section heading ── */
.section-heading {
  margin-bottom: 2rem;
}

.section-heading h1 {
  font-size: 1.75rem;
  font-weight: 400;
  margin: 0 0 0.5rem;
}

.section-heading p {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 1rem;
  margin: 0;
}

/* ── Profile (inoryy-style 2-col) ── */
.profile-row {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
}

.profile-col {
  width: 220px;
  flex-shrink: 0;
  text-align: center;
}

.bio-col {
  flex: 1;
}

/* Portrait */
.portrait-wrap {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 1.25rem;
  border: 1px solid var(--border);
}

.portrait-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  transform: scale(1.15);
  transform-origin: center 18%;
  display: block;
}

.portrait-title h2 {
  font-size: 1.4rem;
  font-weight: 300;
  color: #000;
  margin: 0 0 0.3rem;
}

.portrait-title h3 {
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--text-muted);
  margin: 0 0 0.25rem;
}

/* Social icons */
.network-icon {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  gap: 0.6rem;
}

.network-icon li a {
  color: var(--text-muted);
  font-size: 1.4rem;
  transition: color 0.2s, transform 0.2s;
  display: block;
}

.network-icon li a:hover {
  color: var(--accent);
  transform: scale(1.2);
}

.network-icon svg {
  width: 1.4rem;
  height: 1.4rem;
  display: block;
}

/* Bio column */
.bio-col h1 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/* ── Publications ── */
.pub-year-group { margin-bottom: 2rem; }

.pub-year {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.pub-entry {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

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

.pub-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-dark);
  margin-bottom: 0.3rem;
  line-height: 1.4;
}

.pub-authors {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.pub-authors strong { color: var(--text-dark); }

.pub-journal {
  font-size: 0.875rem;
  font-style: italic;
  color: var(--text-muted);
}

.pub-badges { display: flex; gap: 0.4rem; margin-top: 0.5rem; flex-wrap: wrap; }

.pub-badge {
  font-size: 0.72rem;
  font-family: 'Roboto Mono', monospace;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  font-weight: 500;
  text-decoration: none;
}

.pub-badge.doi {
  background: rgba(0, 149, 235, 0.1);
  color: var(--accent);
  border: 1px solid rgba(0, 149, 235, 0.3);
}

.pub-badge.doi:hover { background: rgba(0, 149, 235, 0.2); }

.pub-badge.prep {
  background: #f0f0f0;
  color: #888;
  border: 1px solid #ddd;
}

/* ── Tags ── */
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }
.tag {
  font-size: 0.72rem;
  font-family: 'Roboto Mono', monospace;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  background: rgba(0,149,235,0.08);
  color: var(--accent);
  border: 1px solid rgba(0,149,235,0.2);
}

/* ── Cards ── */
.card-grid { display: grid; gap: 1.25rem; }

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  transition: box-shadow 0.2s;
}

.card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.card h3 { margin-bottom: 0.3rem; font-size: 0.95rem; }
.card-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: 'Roboto Mono', monospace;
  margin-bottom: 0.4rem;
}
.card p { font-size: 0.9rem; color: var(--text-muted); margin: 0; }
.card-link { display: inline-block; margin-top: 0.75rem; font-size: 0.8rem; font-weight: 500; }

/* ── Theme grid ── */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

/* ── CV blocks ── */
.cv-block { margin-bottom: 1.5rem; }
.cv-block-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 0.2rem; }
.cv-block-title { font-family: 'Montserrat', sans-serif; font-weight: 500; font-size: 0.95rem; color: var(--text-dark); }
.cv-block-date { font-family: 'Roboto Mono', monospace; font-size: 0.78rem; color: var(--accent); white-space: nowrap; flex-shrink: 0; }
.cv-block-sub { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 0.15rem; }
.cv-block ul { margin: 0.4rem 0 0 1.2rem; font-size: 0.875rem; color: var(--text-muted); }
.cv-block li { margin-bottom: 0.2rem; }

/* ── Download button ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
}

.btn-primary:hover {
  background: var(--accent-h);
  color: #fff;
}

/* ── Contact ── */
.contact-email-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.25rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: 'Roboto Mono', monospace;
  font-size: 0.875rem;
  color: var(--text-dark);
  cursor: pointer;
  transition: all 0.2s;
}

.contact-email-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 2px 8px rgba(0,149,235,0.12);
}

.copy-feedback {
  font-size: 0.78rem;
  color: var(--accent);
  margin-left: 0.5rem;
  opacity: 0;
  transition: opacity 0.3s;
}

.copy-feedback.show { opacity: 1; }

/* ── Footer ── */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Responsive ── */
@media (max-width: 640px) {
  nav { padding: 0 1rem; }
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 0.75rem;
    gap: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  }
  .nav-links.open { display: flex; }
  .nav-hamburger { display: flex; }
  .home-section { padding: 50px 1rem; }
  main { padding: 40px 1rem 60px; }
  .profile-row { flex-direction: column; align-items: center; gap: 2rem; }
  .profile-col { width: 100%; }
  .cv-block-header { flex-direction: column; gap: 0.15rem; }
}

/* ── Print (cv.html) ── */
@media print {
  nav, footer, .btn, .no-print { display: none !important; }
  body { background: #fff; color: #111; margin-top: 0; }
  .home-section, main { padding: 1rem; }
  .card { border: 1px solid #ddd; box-shadow: none; }
  a { color: #111; }
  .pub-badge { border: 1px solid #ccc; color: #333; background: none; }
}
