@font-face { font-family: Onest; src: url("assets/Onest-Regular.woff2") format("woff2"); font-weight: 400; }
@font-face { font-family: Onest; src: url("assets/Onest-Medium.woff2") format("woff2"); font-weight: 500; }

:root {
  --white: #fafafa;
  --black: #191919;
  --line: rgba(25, 25, 25, .16);
  --soft: rgba(25, 25, 25, .06);
  --muted: rgba(25, 25, 25, .62);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--white); color: var(--black); font-family: Onest, sans-serif; -webkit-font-smoothing: antialiased; }
button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
strong, b, h1, h2, h3, h4, h5, h6 { font-weight: 500; }

body.auth-locked { overflow: hidden; }
body.auth-locked > .topbar,
body.auth-locked > .layout { visibility: hidden; }
.login-gate {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; padding: 24px;
  background: var(--black);
}
.login-gate[hidden] { display: none; }
.login-card { width: min(100%, 420px); padding: 36px; background: var(--white); border-radius: 12px; }
.login-card > img { display: block; width: 138px; padding: 14px 18px; background: var(--black); }
.login-card > p:first-of-type { margin: 28px 0 4px; color: var(--muted); font-size: 14px; }
.login-card h1 { margin: 0 0 28px; font-size: 38px; letter-spacing: -.04em; }
.login-card > label:not(.remember-login) { display: block; margin: 18px 0 8px; font-size: 14px; font-weight: 500; }
.login-card > input { width: 100%; min-height: 50px; padding: 0 14px; border: 1px solid var(--line); border-radius: 6px; background: #fff; outline: none; font: inherit; }
.login-card > input:focus { border: 2px solid var(--black); }
.remember-login { margin-top: 18px; display: flex; align-items: center; gap: 10px; font-size: 14px; }
.remember-login input { width: 18px; height: 18px; accent-color: var(--black); }
.login-error { min-height: 20px; margin: 14px 0 0; color: #a12424; font-size: 13px; }
.login-card > button { width: 100%; min-height: 50px; margin-top: 8px; border: 0; border-radius: 6px; background: var(--black); color: var(--white); font-weight: 500; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  min-height: 64px; padding: 0 24px 0 0;
  display: grid; grid-template-columns: 270px 1fr auto; align-items: center; gap: 28px;
  background: rgba(250,250,250,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px);
}
.brand { align-self: stretch; display: flex; align-items: center; padding: 0 26px; background: var(--black); text-decoration: none; }
.brand img { display: block; width: 150px; height: auto; }
.topbar-center { display: flex; align-items: baseline; gap: 18px; }
.topbar-center strong { font-size: 15px; }
.topbar-center span { font-size: 14px; color: var(--muted); }
.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.save-status { font-size: 13px; color: var(--muted); margin-right: 6px; }
.save-status.flash { color: var(--black); }
.quiet-button, .dark-button { min-height: 42px; border: 1px solid var(--black); border-radius: 8px; padding: 0 16px; background: transparent; font-size: 14px; font-weight: 500; }
.dark-button { background: var(--black); color: var(--white); }
.link-button { display: inline-flex; align-items: center; text-decoration: none; }

.layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); min-height: calc(100vh - 64px); }
.sidebar {
  position: sticky; top: 64px; height: calc(100vh - 64px); padding: 26px 20px;
  border-right: 1px solid var(--line); display: flex; flex-direction: column;
}
.overline { margin: 0 0 14px; font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.candidate { width: 100%; display: grid; grid-template-columns: 1fr; align-items: start; padding: 18px 12px; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; }
.candidate:last-child { border-bottom: 1px solid var(--line); }
.candidate.active { background: var(--black); color: var(--white); border-color: var(--black); }
.candidate strong, .candidate small { display: block; }
.candidate strong { font-size: 15px; line-height: 1.25; }
.candidate small { margin-top: 5px; font-size: 13px; opacity: .62; }
.main-nav { margin-top: 44px; }
.nav-button { width: 100%; display: flex; align-items: center; gap: 16px; padding: 17px 12px; border: 0; border-bottom: 1px solid var(--line); background: #f0f0f0; text-align: left; font-size: 17px; transition: background .18s ease; }
.nav-button:hover { background: #e9e9e9; }
.nav-button span { width: 24px; color: var(--muted); font-size: 12px; }
.nav-button.active { background: #e2e2e2; font-weight: 500; }
.nav-button.active::after { content: "→"; margin-left: auto; }
.private-note { margin-top: auto; padding-top: 24px; border-top: 1px solid var(--line); }
.private-note strong { font-size: 14px; }
.private-note p { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }

.main { min-width: 0; }
.candidate-header { min-height: 0; padding: 18px clamp(36px, 6vw, 96px); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: flex-end; gap: 36px; }
.candidate-header .overline { margin-bottom: 9px; }
.candidate-header h1 { margin: 0; font-size: clamp(38px, 3.4vw, 48px); line-height: .9; letter-spacing: -.055em; text-transform: uppercase; }
.candidate-header > div > p:last-child { margin: 10px 0 0; font-size: 15px; color: var(--muted); }
.header-links { min-width: 210px; display: grid; }
.header-links a { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; text-decoration: none; font-size: 14px; }

.view { display: none; max-width: 1260px; margin: 0 auto; padding: 42px clamp(36px, 6vw, 96px) 80px; animation: enter .28s ease both; }
.view.active { display: block; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } }
.page-heading { margin-bottom: 58px; }
.page-heading h2 { margin: 0; max-width: 850px; font-size: clamp(48px, 6vw, 86px); line-height: .96; letter-spacing: -.065em; }
.intro-grid { display: grid; grid-template-columns: 1fr; gap: 26px; align-items: start; }
.summary-block h3, .section-title h3, .closing-notes h3 { margin: 0; font-size: 25px; letter-spacing: -.035em; }
.summary-block p { margin: 10px 0 0; max-width: none; font-size: 18px; line-height: 1.45; letter-spacing: -.015em; }
.facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts > div { min-width: 0; padding: 14px 18px 14px 0; }
.facts > div + div { padding-left: 18px; border-left: 1px solid var(--line); }
.facts dt { font-size: 13px; color: var(--muted); }
.facts dd { margin: 6px 0 0; font-size: 17px; font-weight: 500; }

.work-note { margin-top: 36px; padding: 18px 20px; border: 1px solid var(--black); display: flex; align-items: center; gap: 16px; }
.work-note > span { flex: 0 0 auto; width: 30px; height: 30px; display: grid; place-items: center; background: var(--black); color: var(--white); font-weight: 500; }
.work-note strong { font-size: 15px; }
.work-note p { display: inline; margin: 0 0 0 10px; color: var(--muted); font-size: 14px; }

.simple-section { margin-top: 58px; }
.section-title { display: grid; grid-template-columns: .4fr 1fr; gap: 30px; align-items: end; padding-bottom: 24px; border-bottom: 2px solid var(--black); }
.section-title .overline { margin: 0; }
.section-title h3 { font-size: 36px; }
.portfolio-title { display: block; padding-bottom: 16px; }
.portfolio-title .overline { margin: 0; }
.experience-list article { display: grid; grid-template-columns: .4fr 1fr; gap: 30px; padding: 27px 0; border-bottom: 1px solid var(--line); }
.experience-list time { font-size: 15px; color: var(--muted); }
.experience-list h4 { margin: 0; font-size: 20px; }
.experience-list p { margin: 8px 0 0; font-size: 16px; color: var(--muted); }
.portfolio-groups { display: grid; grid-template-columns: repeat(2, 1fr); border-bottom: 1px solid var(--line); }
.portfolio-groups article { min-height: 190px; padding: 28px 26px 28px 0; border-bottom: 1px solid var(--line); }
.portfolio-groups article:nth-child(odd) { border-right: 1px solid var(--line); }
.portfolio-groups article:nth-child(even) { padding-left: 28px; }
.portfolio-groups span { color: var(--muted); font-size: 13px; }
.portfolio-groups h4 { margin: 34px 0 8px; font-size: 22px; }
.portfolio-groups p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.5; }
.text-link { display: inline-block; margin-top: 28px; font-weight: 500; font-size: 16px; }

.interview-title, .material-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.interview-title { margin-bottom: 20px; }
.interview-title h2 { font-size: 45px; }
.add-question-button { min-height: 44px; padding: 0 18px; border: 1px solid var(--black); border-radius: 8px; background: var(--black); color: var(--white); font-size: 14px; font-weight: 500; }
.interviewer-select { margin-bottom: 50px; padding: 30px; border: 1px solid var(--line); }
.interviewer-select > p { margin: 0 0 16px; font-size: 18px; font-weight: 500; }
.interviewer-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.interviewer-buttons button { min-height: 58px; border: 1px solid rgba(25, 25, 25, .22); background: var(--person-color); color: var(--black); font-size: 16px; }
.interviewer-buttons button[data-interviewer="daniela"] { --person-color: #f6e7a9; }
.interviewer-buttons button[data-interviewer="virginia"] { --person-color: #f5d5df; }
.interviewer-buttons button[data-interviewer="nico"] { --person-color: #cfe8f5; }
.interviewer-buttons button.active { background: var(--person-color); color: var(--black); border-color: var(--black); box-shadow: inset 0 0 0 1px var(--black); }
.interviewer-select > strong { display: block; margin-top: 20px; font-size: 15px; }
.question-card { padding: 30px 0 42px; border-top: 1px solid var(--line); }
.question-card:first-child { border-top: 2px solid var(--black); }
.question-editor { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px; }
.question-input { width: 100%; min-height: 68px; padding: 14px 16px; border: 1px solid var(--line); background: var(--white); resize: vertical; outline: none; font-size: clamp(19px, 2vw, 24px); font-weight: 500; line-height: 1.3; }
.remove-question-button { min-height: 42px; padding: 0 14px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 13px; }
.answer-input, .closing-notes textarea { width: 100%; min-height: 180px; margin: 16px 0 0; padding: 20px; border: 1px solid var(--line); border-radius: 0; background: var(--soft); resize: vertical; outline: none; font-size: 17px; line-height: 1.55; }
.question-input:focus, .answer-input:focus, .closing-notes textarea:focus, .closing-notes select:focus { border: 2px solid var(--black); background: var(--white); }
.questions-empty { min-height: 180px; padding: 38px; border: 1px dashed var(--line); display: grid; place-items: center; align-content: center; gap: 18px; text-align: center; }
.questions-empty p { margin: 0; color: var(--muted); font-size: 17px; }
.questions-actions { padding: 22px 0 8px; text-align: right; }
.question-add-link { padding: 8px 0; border: 0; border-bottom: 1px solid var(--black); background: transparent; font-size: 14px; font-weight: 500; }
.closing-notes { margin-top: 44px; padding: 38px; border: 2px solid var(--black); }
.closing-notes label { display: block; margin: 30px 0 10px; font-size: 16px; font-weight: 500; }
.closing-notes textarea { width: 100%; min-height: 220px; margin: 0; }
.closing-notes select { width: 100%; min-height: 54px; padding: 0 14px; border: 1px solid var(--line); background: var(--white); font-size: 16px; }

.material-heading { margin-bottom: 36px; }
.material-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 30px; border: 1px solid var(--line); }
.material-links a { min-height: 96px; padding: 22px 24px; display: block; text-decoration: none; }
.material-links a + a { border-left: 1px solid var(--line); }
.material-links strong, .material-links span { display: block; }
.material-links span { margin-top: 7px; color: var(--muted); font-size: 14px; }
.cv-viewer { width: 100%; display: grid; gap: 24px; }
.cv-viewer img { display: block; width: 100%; height: auto; border: 1px solid var(--line); background: var(--white); }

@media (max-width: 980px) {
  .topbar { grid-template-columns: 200px 1fr; }
  .brand { padding: 0 20px; }
  .brand img { width: 138px; }
  .topbar-center { display: none; }
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; padding: 18px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar-section { display: block; }
  .sidebar-section > .overline { display: none; }
  #candidate-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
  .candidate { min-height: 74px; border: 1px solid var(--line); }
  .candidate + .candidate { border-left: 0; }
  .private-note { display: none; }
  .main-nav { margin: 12px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); }
  .nav-button { justify-content: center; border: 1px solid var(--line); }
  .nav-button span, .nav-button.active::after { display: none; }
  .candidate-header { min-height: 0; padding: 22px 28px; }
  .view { padding: 42px 28px 80px; }
}

@media (max-width: 680px) {
  .login-card { padding: 28px 22px; }
  .topbar { min-height: 58px; padding: 0 12px 0 0; grid-template-columns: 150px 1fr; }
  .brand { padding: 0 16px; }
  .brand img { width: 112px; }
  .sidebar { padding: 12px; }
  .candidate { min-height: 70px; grid-template-columns: 1fr; gap: 4px; padding: 12px; }
  .candidate strong { font-size: 13px; }
  .candidate small { font-size: 11px; }
  .save-status, .quiet-button { display: none; }
  .dark-button { min-height: 40px; padding: 0 12px; font-size: 13px; }
  .candidate-header { min-height: auto; padding: 28px 20px; display: block; }
  .candidate-header h1 { font-size: 42px; }
  .candidate-header > div > p:last-child { margin-top: 12px; font-size: 14px; }
  .header-links { margin-top: 20px; }
  .main-nav { overflow: hidden; }
  .nav-button { font-size: 15px; padding: 15px 6px; }
  .view { padding: 32px 20px 70px; }
  .page-heading { margin-bottom: 42px; }
  .page-heading h2 { font-size: 46px; }
  .intro-grid { gap: 24px; }
  .facts { grid-template-columns: 1fr; }
  .facts > div { padding: 14px 0; }
  .facts > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .summary-block p { font-size: 18px; }
  .work-note { align-items: flex-start; }
  .work-note p { display: block; margin: 4px 0 0; }
  .simple-section { margin-top: 52px; }
  .section-title, .experience-list article { grid-template-columns: 1fr; gap: 10px; }
  .portfolio-groups { grid-template-columns: 1fr; }
  .portfolio-groups article, .portfolio-groups article:nth-child(even) { padding: 24px 0; border-right: 0; }
  .interview-title, .material-heading { display: block; }
  .interview-title > p { margin-top: 18px; }
  .interviewer-select { padding: 22px 18px; }
  .interviewer-buttons { grid-template-columns: 1fr; }
  .question-editor { grid-template-columns: 1fr; }
  .remove-question-button { justify-self: start; }
  .answer-input { min-height: 220px; }
  .closing-notes { padding: 26px 18px; }
  .material-heading .dark-button { margin-top: 24px; }
  .material-links { grid-template-columns: 1fr; }
  .material-links a + a { border-left: 0; border-top: 1px solid var(--line); }
  .material-links a { display: block; }
  .material-links span { display: block; margin-top: 7px; }
  .cv-viewer { gap: 14px; }
}

@media print {
  .topbar, .sidebar, .interviewer-select, .top-actions, .header-links { display: none !important; }
  .layout { display: block; }
  .candidate-header { min-height: 0; padding: 0 0 24px; border-bottom: 2px solid var(--black); display: block; }
  .candidate-header h1 { font-size: 34px; line-height: 1; }
  .candidate-header > div > p:last-child { margin-top: 8px; }
  .view { display: none !important; max-width: none; padding: 0; }
  #view-entrevista { display: block !important; }
  .page-heading { margin-bottom: 24px; }
  .page-heading h2 { font-size: 38px; }
  .question-card { break-inside: avoid; padding: 18px 0; }
  .add-question-button, .question-add-link, .remove-question-button { display: none !important; }
  .question-input { min-height: auto; padding: 0; border: 0; font-size: 18px; background: white; }
  .answer-input { min-height: 85px; background: white; }
  .closing-notes { break-inside: avoid; }
}
