/* emirhodzic.com: editorial, print-first. Light is canonical; dark is a toggle. */
:root {
  --bg: #faf8f4;
  --surface: #ffffff;
  --ink: #1c1b18;
  --muted: #625f58;
  --accent: #1f4e79;
  --accent-ink: #ffffff;
  --rule: #e6e1d7;
  --rule-strong: #1f4e79;
  --link: #1f4e79;
  --shadow: 0 1px 3px rgba(28, 27, 24, 0.06), 0 10px 30px rgba(28, 27, 24, 0.07);
}
html[data-theme='dark'] {
  --bg: #13161b;
  --surface: #1a1e25;
  --ink: #e9e6e0;
  --muted: #a5a199;
  --accent: #8fb4d9;
  --accent-ink: #10141a;
  --rule: #2b303a;
  --rule-strong: #8fb4d9;
  --link: #8fb4d9;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.35);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  transition: background-color 0.25s ease, color 0.25s ease;
}
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1 { font-family: Georgia, 'Times New Roman', serif; letter-spacing: -0.01em; }

/* Theme toggle */
.theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: var(--surface);
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
}
html[data-theme='light'] .tt-sun { display: none; }
html[data-theme='dark'] .tt-moon { display: none; }

/* Landing */
.hero { min-height: 100svh; display: grid; place-items: center; padding: 2rem 1.25rem; }
.hero-card { max-width: 34rem; text-align: center; }
.portrait {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--surface);
  box-shadow: var(--shadow);
}
.eyebrow {
  margin: 1.1rem 0 0;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
}
.hero h1 { font-size: clamp(2.4rem, 7vw, 3.4rem); margin: 0.25em 0 0.1em; }
.hero .title { color: var(--accent); font-size: 1.12rem; font-weight: 600; margin: 0; }
.hero .title a { color: inherit; }
.hero .pitch { color: var(--muted); margin: 1.1rem auto 1.6rem; max-width: 30rem; }
.cta { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 0.6rem 1.3rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.1); }
.btn-ghost { border: 1.5px solid var(--rule-strong); color: var(--link); }
.social {
  margin-top: 2.2rem;
  display: flex;
  gap: 1.4rem;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.social a { text-decoration: none; color: var(--muted); }
.social a:hover { color: var(--link); }

/* CV page */
.cv-wrap { max-width: 48rem; margin: 0 auto; padding: 2.5rem 1.25rem 5rem; }
.cv-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.cv-nav > a:first-child { text-decoration: none; color: var(--muted); font-size: 0.9rem; }
.cv-sheet {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: clamp(1.5rem, 5vw, 3rem);
}
.cv-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.cv-header h1 { font-size: 2.1rem; margin: 0; }
.cv-header .headline { color: var(--accent); font-weight: 600; margin: 0.2rem 0 0.6rem; }
.cv-header .contact { font-size: 0.88rem; color: var(--muted); margin: 0.15rem 0; }
.portrait-sm { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.cv-sheet section h2 {
  font-family: inherit;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  border-bottom: 2px solid var(--rule-strong);
  padding-bottom: 0.3rem;
  margin: 2.1rem 0 0.9rem;
}
.role { break-inside: avoid; margin-bottom: 1.35rem; }
.role-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem; flex-wrap: wrap; }
.role-head h3 { font-size: 1rem; margin: 0; }
.dates { color: var(--muted); font-size: 0.84rem; white-space: nowrap; }
.role-meta { color: var(--muted); font-size: 0.86rem; font-style: italic; margin: 0.15rem 0 0.35rem; }
ul.bullets { margin: 0.35rem 0 0; padding-left: 1.15rem; }
ul.bullets li { margin-bottom: 0.35rem; }
.project { margin: 0.4rem 0; }
.skill-row { margin: 0 0 0.5rem; }
.skill-row b { color: var(--accent); }

@media (max-width: 560px) {
  .cv-header { flex-direction: column-reverse; }
}

/* Browser print of /cv (canonical PDF is generated separately, but Cmd+P should be clean) */
@media print {
  .theme-toggle, .cv-nav { display: none; }
  body { background: #fff; color: #1a1a1a; font-size: 12px; }
  .cv-wrap { padding: 0; max-width: none; }
  .cv-sheet { border: none; box-shadow: none; border-radius: 0; padding: 0; }
  .portrait-sm { display: none; }
  a { color: #1f4e79; text-decoration: none; }
}
