/* ─────────────────────────────────────────────────
   CV STYLESHEET  v3
   Tokens → Base → Components → Timeline → Project Cards → Layout → Responsive
   ───────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=Inter:wght@300;400;500;600&display=swap');

/* ── Tokens ───────────────────────────────────────── */
:root {
  --bg:             #F7F6F3;
  --surface:        #FFFFFF;
  --border:         #E2DDD6;
  --text-1:         #1A1916;
  --text-2:         #5C5954;
  --text-3:         #9C9890;
  --accent:         #2563EB;
  --accent-tint:    #EFF4FF;
  --accent-dim:     #BFCFEF;
  --bar-bg:         #E8E6E1;
  --tag-bg:         #EDECE9;
  --timeline-line:  #D8D4CD;
  --dot-current:    #2563EB;
  --dot-past:       #C8C4BC;
  --card-hover:     #F4F3F0;

  --mono: 'IBM Plex Mono', monospace;
  --sans: 'Inter', sans-serif;

  --r:   8px;
  --gap: 20px;
}

/* ── Reset / Base ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text-1);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

/* ── Typography helpers ───────────────────────────── */
.label {
  font-family: var(--mono);
  font-size: 0.67rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 14px;
  display: block;
}
.mono { font-family: var(--mono); }

/* ── Card ─────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 24px 22px;
}

/* ── Tags ─────────────────────────────────────────── */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}
.tag {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.02em;
  color: var(--text-2);
  background: var(--tag-bg);
  padding: 3px 8px;
  border-radius: 4px;
}

/* ══════════════════════════════════════════════════
   PROFILE
   ══════════════════════════════════════════════════ */
.profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border);
  background: var(--bar-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-initials {
  font-family: var(--mono);
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: -0.02em;
}
.profile-name {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-1);
}
.profile-title {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: var(--accent-tint);
  padding: 3px 10px;
  border-radius: 20px;
}
.contact-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  margin-top: 6px;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  color: var(--text-2);
  text-align: left;
  transition: color 0.15s;
  overflow-wrap: anywhere;
}
.contact-item:hover { color: var(--accent); }
.contact-item svg { flex-shrink: 0; opacity: 0.55; }

/* ── Download CV button ───────────────────────────── */
.btn-download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  margin-top: 16px;
  padding: 9px 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--r);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.btn-download:hover  { background: #1d4ed8; }
.btn-download:active { transform: scale(0.98); }
.btn-download svg    { flex-shrink: 0; }

/* ══════════════════════════════════════════════════
   ABOUT
   ══════════════════════════════════════════════════ */
.about-paras p {
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.8;
  margin-bottom: 10px;
}
.about-paras p:last-child { margin-bottom: 0; }

.stats-row {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.stat { flex: 1; min-width: 60px; text-align: center; }
.stat-value {
  font-family: var(--mono);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--text-1);
  display: block;
  line-height: 1.2;
}
.stat-label {
  font-size: 0.68rem;
  color: var(--text-3);
  letter-spacing: 0.04em;
}

/* ══════════════════════════════════════════════════
   SKILLS
   ══════════════════════════════════════════════════ */
.skill-group + .skill-group { margin-top: 20px; }
.skill-group-title {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 10px;
}
.skill-item { margin-bottom: 10px; }
.skill-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 5px;
}
.skill-name { font-size: 0.82rem; font-weight: 500; color: var(--text-1); }
.skill-pct  { font-family: var(--mono); font-size: 0.66rem; color: var(--text-3); }
.bar-track {
  height: 4px;
  background: var(--bar-bg);
  border-radius: 3px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  width: 0;
  transition: width 0.7s cubic-bezier(.4,0,.2,1);
}

/* ══════════════════════════════════════════════════
   TIMELINE EXPERIENCE
   ══════════════════════════════════════════════════ */
.timeline {
  position: relative;
  padding-left: 28px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--timeline-line);
  border-radius: 2px;
}
.tl-item {
  position: relative;
  padding-bottom: 30px;
}
.tl-item:last-child { padding-bottom: 0; }

.tl-dot {
  position: absolute;
  left: -28px;
  top: 5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--dot-past);
  z-index: 1;
}
.tl-item.current .tl-dot {
  border-color: var(--dot-current);
  background: var(--accent-tint);
}
.tl-item.current .tl-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid var(--accent-dim);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0%   { opacity: 1; transform: scale(1);   }
  70%  { opacity: 0; transform: scale(1.6); }
  100% { opacity: 0; transform: scale(1.6); }
}

.tl-inner { padding-left: 4px; }
.tl-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 1px;
}
.tl-role {
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-1);
}
.tl-period {
  font-family: var(--mono);
  font-size: 0.67rem;
  color: var(--text-3);
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: 2px;
}
.tl-company {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 10px;
}
.tl-bullets { display: flex; flex-direction: column; gap: 5px; }
.tl-bullets li {
  font-size: 0.83rem;
  color: var(--text-2);
  line-height: 1.65;
  padding-left: 14px;
  position: relative;
}
.tl-bullets li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent-dim);
  font-size: 0.78rem;
}

/* ══════════════════════════════════════════════════
   PROJECT CARDS
   ══════════════════════════════════════════════════ */

/* Tab bar */
.proj-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.proj-tab {
  font-family: var(--mono);
  font-size: 0.67rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  background: none;
  border: none;
  padding: 7px 12px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.proj-tab:hover  { color: var(--text-1); }
.proj-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Card grid — 2 columns on desktop, adapts down */
.proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

/* Individual project card */
.proj-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.18s, transform 0.18s;
}
.proj-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.07);
  transform: translateY(-2px);
}
.proj-card[hidden] { display: none; }

/* Cover image / placeholder */
.proj-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bar-bg);
  overflow: hidden;
  position: relative;
}
.proj-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.proj-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--text-3);
  user-select: none;
  background: linear-gradient(135deg, #EDECE9 0%, #E2DDD6 100%);
}

/* Engine badge overlaid on cover */
.proj-engine-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  color: #fff;
  background: rgba(0,0,0,0.52);
  padding: 2px 7px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}

/* Card body */
.proj-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.proj-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 5px;
  letter-spacing: -0.01em;
}

/* Platform pills */
.proj-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}
.proj-platform {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-tint);
  border: 1px solid var(--accent-dim);
  padding: 2px 6px;
  border-radius: 3px;
}

.proj-desc {
  font-size: 0.8rem;
  color: var(--text-2);
  line-height: 1.65;
  flex: 1;
}

.proj-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  flex-wrap: wrap;
  gap: 6px;
}
.proj-link {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.proj-link:hover { text-decoration: underline; }

/* ══════════════════════════════════════════════════
   EDUCATION + CERTIFICATIONS
   ══════════════════════════════════════════════════ */
.edu-cert-card .label:not(:first-child) {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.edu-list { display: flex; flex-direction: column; gap: 12px; }
.edu-degree { font-size: 0.84rem; font-weight: 600; }
.edu-school { font-size: 0.78rem; color: var(--text-2); margin-top: 1px; }
.edu-year   { font-family: var(--mono); font-size: 0.67rem; color: var(--text-3); margin-top: 2px; }
.edu-notes  { font-size: 0.76rem; color: var(--text-3); margin-top: 3px; font-style: italic; }

.cert-list { display: flex; flex-direction: column; gap: 10px; }
.cert-item { display: flex; align-items: flex-start; gap: 10px; }
.cert-badge {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--accent-tint);
  border: 1px solid var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.cert-badge svg { opacity: 0.7; }
.cert-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-1);
  line-height: 1.3;
}
.cert-name a { color: var(--accent); }
.cert-name a:hover { text-decoration: underline; }
.cert-meta { font-size: 0.73rem; color: var(--text-3); margin-top: 1px; }


/* ── Awards & Achievements ── */
.awards-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.award-item {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.award-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.award-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 2px;
}
.award-title {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-1);
}
.award-year {
  font-size: 0.67rem;
  color: var(--text-3);
  white-space: nowrap;
  flex-shrink: 0;
}
.award-issuer {
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 3px;
}
.award-desc {
  font-size: 0.78rem;
  color: var(--text-2);
  line-height: 1.6;
}

/* ══════════════════════════════════════════════════
   PAGE SHELL
   ══════════════════════════════════════════════════ */
.page {
  flex: 1;
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
  padding: 36px 20px 40px;
}

/*
  Desktop 3-column grid — explicit named areas so
  order is crystal-clear and responsive overrides
  just redefine the same names.

  [left 230px] [center 1fr] [right 230px]
  Row 1: profile | about      | skills (span all rows)
  Row 2: sidebar | experience | ↑
  Row 3: sidebar | projects   | ↑
*/
.grid {
  display: grid;
  grid-template-columns: 230px 1fr 230px;
  grid-template-rows: auto;
  grid-template-areas:
    "profile  about    skills"
    "sidebar  exp      skills"
    "sidebar  projects skills";
  gap: var(--gap);
  align-items: start;
}

.area-profile  { grid-area: profile; }
.area-about    { grid-area: about;   }
.area-skills   { grid-area: skills;  position: sticky; top: 20px; }
.area-sidebar  { grid-area: sidebar; display: flex; flex-direction: column; gap: var(--gap); }
.area-exp      { grid-area: exp;     }
.area-projects { grid-area: projects;}

/* ══════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════ */
.site-footer {
  text-align: center;
  padding: 20px;
  font-size: 0.74rem;
  color: var(--text-3);
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  letter-spacing: 0.03em;
}

/* ══════════════════════════════════════════════════
   RESPONSIVE — TABLET  ≤ 860px
   Order: profile → about → skills → experience → projects → sidebar(edu)
   ══════════════════════════════════════════════════ */
@media (max-width: 860px) {
  .grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "profile"
      "about"
      "skills"
      "exp"
      "projects"
      "sidebar";
  }
  .area-skills  { position: static; }
  .area-sidebar { grid-area: sidebar; flex-direction: row; flex-wrap: wrap; gap: var(--gap); }
  .area-sidebar > * { flex: 1; min-width: 260px; }
  .skills-grid  {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0 28px;
  }
  .skill-group + .skill-group { margin-top: 0; }
}

/* ══════════════════════════════════════════════════
   RESPONSIVE — MOBILE  ≤ 560px
   ══════════════════════════════════════════════════ */
@media (max-width: 560px) {
  .page { padding: 16px 12px 32px; }

  /* Profile: horizontal layout on mobile */
  .profile-card {
    flex-direction: row;
    text-align: left;
    gap: 14px;
    align-items: flex-start;
    flex-wrap: wrap;       /* prevent overflow on very small screens */
  }
  .profile-card-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    flex: 1;
    min-width: 0;          /* allow text to shrink */
  }
  .avatar { width: 68px; height: 68px; flex-shrink: 0; }
  .avatar-initials { font-size: 1rem; }
  .profile-name { font-size: 0.92rem; }
  .contact-list {
    width: 100%;           /* full row below avatar + text */
    border-top: 1px solid var(--border);
    padding-top: 12px;
    margin-top: 4px;
  }

  .skills-grid { display: block; }
  .skill-group + .skill-group { margin-top: 20px; }

  .tl-header { flex-direction: column; gap: 1px; }
  .tl-period { align-self: flex-start; }

  .proj-grid { grid-template-columns: 1fr; }
  .proj-tabs { flex-wrap: wrap; }

  .area-sidebar { flex-direction: column; }
  .stats-row    { flex-wrap: wrap; }
  .stat         { min-width: 40%; }
}

@media (prefers-reduced-motion: reduce) {
  .bar-fill { transition: none; }
  .tl-item.current .tl-dot::after { animation: none; }
  .proj-card { transition: none; }
}

/* ══════════════════════════════════════════════════
   PRINT  —  "Download CV" triggers window.print()
   ══════════════════════════════════════════════════ */
@media print {
  @page { margin: 15mm 12mm; size: A4; }

  body { background: #fff; font-size: 11px; }

  .btn-download,
  .proj-tabs { display: none !important; }

  .page { padding: 0; max-width: 100%; }

  .grid {
    display: block;
  }

  .area-profile,
  .area-about,
  .area-skills,
  .area-exp,
  .area-projects,
  .area-sidebar {
    display: block;
    break-inside: avoid;
    margin-bottom: 14px;
  }

  .card {
    border: 1px solid #ccc;
    box-shadow: none;
    padding: 12px 14px;
    break-inside: avoid;
  }

  .proj-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .proj-card {
    break-inside: avoid;
    box-shadow: none;
    transform: none !important;
  }

  .tl-item.current .tl-dot::after { animation: none; }

  .site-footer { border-top: 1px solid #ccc; padding: 8px 0 0; }

  a[href]::after { content: none; }
}

/* ══════════════════════════════════════════════════
   PROJECT MODAL
   ══════════════════════════════════════════════════ */

/* Backdrop */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 14, 12, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}
.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

/* Modal box */
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 100%;
  max-width: 620px;
  max-height: 88vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  transform: translateY(18px) scale(0.98);
  transition: transform 0.22s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
  position: relative;
}
.modal-backdrop.open .modal {
  transform: translateY(0) scale(1);
}

/* Close button */
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bar-bg);
  border: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  transition: background 0.15s, color 0.15s;
  z-index: 2;
  flex-shrink: 0;
}
.modal-close:hover { background: var(--border); color: var(--text-1); }

/* Hero image */
.modal-hero {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bar-bg);
  overflow: hidden;
  flex-shrink: 0;
  border-radius: 12px 12px 0 0;
}
.modal-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.modal-hero-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  background: linear-gradient(135deg, #EDECE9 0%, #D8D4CD 100%);
}

/* Gallery strip */
.modal-gallery {
  display: flex;
  gap: 8px;
  padding: 10px 22px 0;
  overflow-x: auto;
  scrollbar-width: thin;
}
.modal-gallery-thumb {
  width: 72px;
  height: 48px;
  border-radius: 5px;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.15s;
}
.modal-gallery-thumb.active { border-color: var(--accent); }
.modal-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Content */
.modal-content { padding: 22px 24px 28px; }

.modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 14px;
}
.modal-engine-badge {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  color: var(--text-2);
  background: var(--tag-bg);
  padding: 3px 9px;
  border-radius: 4px;
}
.modal-year {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-3);
}
.modal-role {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--accent);
  background: var(--accent-tint);
  padding: 3px 9px;
  border-radius: 4px;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-1);
  margin-bottom: 6px;
}
.modal-desc {
  font-size: 0.88rem;
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 16px;
}

/* Detail bullets */
.modal-details-title {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 10px;
}
.modal-details {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 18px;
}
.modal-details li {
  font-size: 0.84rem;
  color: var(--text-2);
  line-height: 1.65;
  padding-left: 16px;
  position: relative;
}
.modal-details li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent-dim);
}

/* Platforms */
.modal-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 14px;
}

/* Footer row */
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 10px;
}
.modal-url {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: #fff;
  background: var(--accent);
  padding: 7px 14px;
  border-radius: var(--r);
  transition: background 0.15s;
}
.modal-url:hover { background: #1d4ed8; }

/* Project card — clickable cursor */
.proj-card { cursor: pointer; }

/* Scroll-lock on body when modal open */
body.modal-open { overflow: hidden; }

/* Mobile adjustments */
@media (max-width: 560px) {
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal {
    max-height: 92vh;
    border-radius: 16px 16px 0 0;
    transform: translateY(40px);
  }
  .modal-backdrop.open .modal { transform: translateY(0); }
  .modal-content { padding: 18px 18px 28px; }
}

@media print {
  .modal-backdrop { display: none !important; }
}
