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

:root {
  --ink:        #1f2937;
  --ink-soft:   #374151;
  --ink-muted:  #6b7280;
  --rule:       #e5e7eb;
  --bg:         #f4f4fc;
  --bg-soft:    #eaeefa;
  --accent:     #1d4ed8;
  --accent-hover: #1e40af;
  --nav-h:      64px;
  --max-w:      1100px;
}

html { font-size: 16px; scroll-behavior: smooth; }
 
body {
  font-family: Lucida, Monospace;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Nav ──────────────────────────────────────────── */
nav {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  background: MidnightBlue;
  border-bottom: 2.5px solid #9696e8;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-name {
  font-size: 2rem;
  font-weight: 600;
  color: var(--rule);
  text-decoration: none;
  margin-right: 2.5rem;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 0.25rem;
}

nav ul a {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--rule);
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  margin-right: 0.9rem;
  transition: background 0.15s, color 0.15s;
}

nav ul a:hover {
  background: var(--bg-soft);
  color: var(--ink);
}

nav ul a.active {
  color: var(--accent);
  font-weight: 500;
}

object {
  display: block;
  margin-top: 1.5rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
}

/* ── Home Layout ──────────────────────────────────── */
.home-layout {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 6rem 2rem 4rem;
  background: var(--bg);
}

.home-inner {
  display: flex;
  flex-direction: row;
  gap: 5rem;
  max-width: var(--max-w);
  width: 100%;
  animation: fadeUp 0.5s ease both;
}

/* ── Profile Sidebar ──────────────────────────────── */
.profile-col {
  flex: 0 0 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.avatar-wrap {
  width: 300px;
  height: 350px;
  border-radius: 1%;
  overflow: hidden;
  background: var(--rule);
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.avatar {
  width: 100%;
  height: 140%;
  object-fit: cover;
  object-position: top center;
}

.profile-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

.profile-role {
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 0.2rem;
}

.profile-affil {
  font-size: 0.9rem;
  color: var(--ink-muted);
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

/* Social icons row */
.social-links {
  list-style: none;
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  color: var(--ink-muted);
  border-radius: 20%;
  transition: color 0.15s, background 0.15s;
  text-decoration: none;
}

.social-links a:hover {
  color: var(--ink);
  background: var(--bg-soft);
}

.social-links svg {
  width: 22px;
  height: 22px;
}

/* ── Bio Column ───────────────────────────────────── */
.bio-col {
  flex: 1;
  min-width: 0;
  padding-top: 1rem;
}

.bio-col p {
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1rem;
}

/* ── Page Layout (CV, Contact) ────────────────────── */
.page-layout {
  flex: 1;
  max-width: 800px;
  margin: 4rem auto;
  padding: 0 2rem;
  width: 100%;
  animation: fadeUp 0.45s ease both;
}

.page-layout > h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--ink);
}

.page-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
}

.page-header-row h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--ink);
}

/* ── CV ───────────────────────────────────────────── */
.cv-section {
  margin-bottom: 2.5rem;
}

.cv-section h2 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}

.cv-entry {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.cv-year {
  font-size: 0.8rem;
  color: var(--ink-muted);
  padding-top: 0.1rem;
  font-variant-numeric: tabular-nums;
}

.cv-content {
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.65;
}

.cv-content strong {
  color: var(--ink);
  font-weight: 600;
}

.cv-prose {
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.75;
}

.cv-prose a { color: var(--accent); }

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.4rem 1rem;
  border-radius: 5px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.download-btn:hover {
  background: var(--accent);
  color: white;
  text-decoration: none;
}
.download-btn svg { width: 15px; height: 15px; }

/* ── Footer ───────────────────────────────────────── */
footer {
  text-align: center;
  padding: 2rem 1rem;
  border-top: 1px solid var(--rule);
  font-size: 0.78rem;
  color: var(--ink-muted);
}

footer a { color: var(--accent); }
footer a:hover { color: var(--accent-hover); }

/* ── Animation ────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 720px) {
  .home-layout { padding: 2.5rem 1.25rem; }

  .home-inner {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }

  .profile-col { flex: none; width: 100%; }
  .avatar-wrap { width: 150px; height: 150px; }
  
  .contact-grid { grid-template-columns: 1fr; }

  .cv-entry { grid-template-columns: 1fr; gap: 0.2rem; }
  .page-header-row { flex-direction: column; align-items: flex-start; gap: 1rem; }

  nav ul { gap: 0; }
}

/* ── Resource Cards — add to bottom of style.css ─── */

.resource-card {
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: white;
  padding: 1.5rem;
  transition: box-shadow 0.15s;
}

.resource-card:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.resource-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.resource-icon img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 6px;
}

.resource-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.2rem;
}

.resource-name code {
  font-family: 'Menlo', 'Consolas', monospace;
  font-size: 0.95rem;
  background: var(--bg-soft);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  border: 1px solid var(--rule);
}

.resource-badge {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
}

.resource-desc {
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.7;
  margin-bottom: 1.1rem;
}

.resource-links {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.resource-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.4rem 0.9rem;
  border-radius: 5px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.resource-btn svg { width: 14px; height: 14px; }

.resource-btn.primary {
  background: var(--accent);
  color: white;
}
.resource-btn.primary:hover {
  background: var(--accent-hover);
  text-decoration: none;
}

.resource-btn.secondary {
  border: 1px solid var(--rule);
  color: var(--ink-soft);
  background: var(--bg);
}
.resource-btn.secondary:hover {
  border-color: #9ca3af;
  color: var(--ink);
  text-decoration: none;
}