/* ============================================================
   Ana Bosshard Portfolio — Styles
   ============================================================ */

/* --- Variables -------------------------------------------- */
:root {
  --red: #8B2020;
  --cream: #FAF7F4;
  --cream-dark: #F0E8E4;
  --dark: #1A1A1A;
  --mid: #555;
  --muted: #999;
  --white: #fff;
  --border: rgba(0, 0, 0, 0.1);
}

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

/* --- Base ------------------------------------------------- */
body {
  background: var(--white);
  font-family: 'Inter', -apple-system, sans-serif;
  color: var(--dark);
}

/* --- App shell -------------------------------------------- */
.app {
  width: 100%;
  background: var(--white);
  min-height: 100vh;
}

/* --- Topbar ----------------------------------------------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 0.5px solid var(--border);
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar-name { font-size: 16px; font-weight: 700; letter-spacing: -0.3px; }

/* --- App body (sidebar + content on desktop) -------------- */
.app-body { display: block; }

/* --- Sidebar ---------------------------------------------- */
.sidebar { /* mobile: just a block */ }

/* --- Profile ---------------------------------------------- */
.profile { padding: 16px; }
.profile-row { display: flex; align-items: center; gap: 20px; margin-bottom: 14px; }

.avatar-ring {
  width: 84px; height: 84px; border-radius: 50%; padding: 3px;
  background: linear-gradient(45deg, var(--red), #E05050, #F0A0A0);
  flex-shrink: 0;
}
.avatar-inner {
  width: 100%; height: 100%; border-radius: 50%;
  border: 3px solid var(--white); overflow: hidden;
  background: var(--cream-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 700; color: var(--red);
}

.stats { display: flex; flex: 1; justify-content: space-around; }
.stat { text-align: center; }
.stat-n { font-size: 17px; font-weight: 700; display: block; }
.stat-l { font-size: 12px; color: var(--mid); }

.bio-name { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.bio-tag { font-size: 13px; color: var(--red); font-weight: 500; margin-bottom: 4px; }
.bio-text { font-size: 13px; color: var(--mid); line-height: 1.5; margin-bottom: 4px; }
.bio-link {
  font-size: 13px; color: var(--red); font-weight: 500;
  text-decoration: none; display: block; margin-bottom: 2px;
}
.bio-lang { font-size: 11px; color: var(--muted); }

.action-row { display: flex; gap: 8px; margin-top: 12px; }
.btn {
  flex: 1; padding: 8px; border-radius: 8px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  border: none; text-align: center; transition: opacity .2s;
}
.btn:hover { opacity: .85; }
.btn-primary { background: var(--red); color: var(--white); }
.btn-secondary { background: var(--cream-dark); color: var(--dark); }
.btn-icon {
  width: 42px; flex: none; background: var(--cream-dark);
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}

/* --- Highlights ------------------------------------------- */
.highlights {
  display: flex; gap: 14px;
  padding: 8px 16px 16px;
  overflow-x: auto; scrollbar-width: none;
}
.highlights::-webkit-scrollbar { display: none; }

.hl { display: flex; flex-direction: column; align-items: center; gap: 5px; flex-shrink: 0; cursor: pointer; }
.hl-ring {
  width: 62px; height: 62px; border-radius: 50%; padding: 2px;
  background: linear-gradient(45deg, var(--red), #E05050);
}
.hl-inner {
  width: 100%; height: 100%; border-radius: 50%;
  border: 2px solid var(--white); overflow: hidden;
  background: var(--cream-dark);
  display: flex; align-items: center; justify-content: center; font-size: 24px;
}
.hl-label { font-size: 11px; color: var(--dark); text-align: center; max-width: 62px; }

/* --- Tabs ------------------------------------------------- */
.tabs { display: flex; border-top: 0.5px solid var(--border); border-bottom: 0.5px solid var(--border); }
.tab {
  flex: 1; padding: 12px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border-bottom: 2px solid transparent;
}
.tab.active { border-bottom-color: var(--dark); }
.tab svg { width: 20px; height: 20px; fill: var(--muted); }
.tab.active svg { fill: var(--dark); }

/* --- Grid ------------------------------------------------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.tile {
  aspect-ratio: 1; cursor: pointer; overflow: hidden; position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 10px; transition: opacity .15s;
}
.tile:hover { opacity: .88; }
.tile.dk { background: var(--dark); }
.tile.rd { background: var(--red); }
.tile.cr { background: var(--cream-dark); }
.tile.md { background: #2A3A4A; }

.t-icon { font-size: 26px; margin-bottom: 5px; position: relative; z-index: 1; }
.t-label {
  font-size: 9px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; text-align: center; position: relative; z-index: 1;
}
.t-sub { font-size: 8px; text-align: center; margin-top: 3px; position: relative; z-index: 1; line-height: 1.3; }

.tile.dk .t-label, .tile.md .t-label { color: rgba(255,255,255,.9); }
.tile.dk .t-sub, .tile.md .t-sub { color: rgba(255,255,255,.6); }
.tile.rd .t-label { color: rgba(255,255,255,.95); }
.tile.rd .t-sub { color: rgba(255,255,255,.75); }
.tile.cr .t-label { color: var(--red); }
.tile.cr .t-sub { color: var(--mid); }

/* --- Modal ------------------------------------------------ */
.modal-bg {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.6); z-index: 200;
  align-items: flex-end; justify-content: center;
}
.modal-bg.open { display: flex; }
.modal {
  background: var(--white); width: 100%; max-width: 480px;
  max-height: 88vh; overflow-y: auto;
  border-radius: 20px 20px 0 0; padding: 0 0 48px;
}
.modal-handle {
  width: 36px; height: 4px;
  background: var(--border); border-radius: 2px; margin: 12px auto 0;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 12px; border-bottom: 0.5px solid var(--border);
}
.modal-title { font-size: 17px; font-weight: 700; }
.modal-close {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--cream-dark); border: none; cursor: pointer; font-size: 15px;
}
.modal-body { padding: 20px; }

/* --- Modal content components ----------------------------- */
.section-tag {
  display: inline-block; background: var(--red); color: var(--white);
  font-size: 10px; font-weight: 700; letter-spacing: 1px;
  padding: 3px 10px; border-radius: 20px; text-transform: uppercase; margin-bottom: 12px;
}
.modal-body h2 { font-size: 22px; font-weight: 900; margin-bottom: 8px; line-height: 1.2; }
.modal-body h3 { font-size: 14px; font-weight: 700; margin: 16px 0 6px; }
.modal-body p { font-size: 14px; color: var(--mid); line-height: 1.6; margin-bottom: 8px; }
.modal-body .en { font-size: 12px; color: var(--muted); font-style: italic; margin-top: -6px; margin-bottom: 10px; }

.role-card { background: var(--cream-dark); border-radius: 10px; padding: 14px; margin: 10px 0; }
.role-title { font-size: 14px; font-weight: 700; }
.role-org { font-size: 12px; color: var(--red); font-weight: 500; margin: 2px 0; }
.role-period { font-size: 11px; color: var(--muted); }
.role-desc { font-size: 13px; color: var(--mid); margin-top: 8px; line-height: 1.5; }

.pill-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.pill {
  background: var(--cream-dark); border: 1px solid rgba(139,32,32,.2);
  color: var(--red); font-size: 11px; font-weight: 600;
  padding: 4px 10px; border-radius: 20px;
}

.lang-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.lang-card { background: var(--cream-dark); border-radius: 8px; padding: 10px 12px; }
.lang-name { font-size: 14px; font-weight: 700; }
.lang-level { font-size: 12px; color: var(--red); font-weight: 500; }

.img-ph {
  width: 100%; border-radius: 12px; background: var(--cream-dark);
  border: 2px dashed rgba(139,32,32,.3);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px 16px; margin: 14px 0; text-align: center;
}
.img-ph-icon { font-size: 28px; margin-bottom: 6px; }
.img-ph-text { font-size: 12px; color: var(--red); font-weight: 700; margin-bottom: 3px; }
.img-ph-hint { font-size: 10px; color: var(--muted); }
.img-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }

.divider { height: 0.5px; background: var(--border); margin: 14px 0; }

a.clink {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 0.5px solid var(--border); text-decoration: none;
}
a.clink:last-child { border-bottom: none; }
.cicon {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--cream-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; flex-shrink: 0;
}
.ctext { font-size: 14px; color: var(--dark); font-weight: 500; }
.csub { font-size: 12px; color: var(--muted); }

/* --- Footer ----------------------------------------------- */
.footer { text-align: center; padding: 24px 16px; border-top: 0.5px solid var(--border); }
.footer p { font-size: 11px; color: var(--muted); }
.footer strong { color: var(--red); }

/* ============================================================
   Responsive — All screens wider than mobile
   Same phone layout, centered, white background everywhere
   ============================================================ */
@media (min-width: 480px) {
  .app {
    max-width: 480px;
    margin: 0 auto;
  }

  .modal { max-width: 480px; }
}
