/* robinkanatzar.com
   Every colour pair is checked with the web-accessibility skill's contrast.py:
     python3 ~/.claude/skills/web-accessibility/scripts/contrast.py --css assets/styles.css
   Body text and links meet WCAG AAA (7:1) in light and dark mode. */

@font-face { font-family: "Inclusive Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/InclusiveSans-normal.woff2") format("woff2"); }
@font-face { font-family: "Inclusive Sans"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("fonts/InclusiveSans-italic.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/Inter-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 400 700; font-display: swap;
  src: url("fonts/Inter-italic.woff2") format("woff2"); }

/* ---------- Colour tokens ---------- */

:root {
  color-scheme: light dark;
  --page-bg: #F4F5FB;            /* cool off-white */
  --surface-bg: #FFFFFF;         /* content panels, header, footer */
  --card-bg: #EEF0FA;            /* cards inside panels */
  --text: #2A2D3A;               /* 13.7:1 on surface, 12.0:1 on card */
  --heading: #1F2230;
  --muted: #4A4F63;              /* 8.1:1 on surface, 7.1:1 on card */
  --link: #2C36B8;               /* indigo, 9.0:1 on surface, 7.9:1 on card */
  --accent: #5B66F0;             /* decoration only (bars) */
  --button-bg: #2C36B8;
  --button-text: #FFFFFF;        /* 9.0:1 */
  --badge-bg: #E3E6FB;
  --badge-text: #232C99;         /* 9.0:1 */
  --border: #8A8F9C;             /* 3.2:1 on surface */
  --focus: #1F2230;
  --focus-halo: #FFFFFF;
  --page-text: #1F2230;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page-bg: #16181D;
    --surface-bg: #20232B;
    --card-bg: #2A2D36;
    --text: #DDE0E8;
    --heading: #F4F5F8;
    --muted: #B8BDCA;
    --link: #B3BAFF;               /* periwinkle, 8.5:1 on surface, 7.5:1 on card */
    --accent: #8F99FF;
    --button-bg: #B3BAFF;
    --button-text: #14161F;        /* 9.8:1 */
    --badge-bg: #2E3260;
    --badge-text: #D6DAFF;         /* 8.8:1 */
    --border: #7D8290;
    --focus: #FFFFFF;
    --focus-halo: #16181D;
    --page-text: #ECEEF3;
  }
}

@media (prefers-contrast: more) {
  :root { --muted: var(--text); --border: var(--text); }
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 100%;
  scroll-padding-top: 1.5rem;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--page-bg);
  overflow-wrap: break-word;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1; width: 100%; }

h1, h2, h3 {
  font-family: "Inclusive Sans", "Inter", system-ui, sans-serif;
  font-weight: 400;
  color: var(--heading);
  line-height: 1.2;
  margin: 0 0 0.75rem;
}
h1 { font-size: clamp(2.25rem, 1.8rem + 2.5vw, 3.5rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 1.3rem + 1vw, 2rem); }
h3 { font-size: 1.375rem; }

p { margin: 0 0 1rem; max-width: 68ch; }
ul, ol { padding-left: 1.25em; }
li + li { margin-top: 0.25rem; }

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--link);
  text-decoration-line: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}
a:hover { text-decoration-thickness: 0.16em; }

strong { color: var(--heading); font-weight: 600; }
.strong-link { font-weight: 700; }

/* ---------- Focus ---------- */

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--focus-halo);
  border-radius: 4px;
}
:focus:not(:focus-visible) { outline: none; }
main:focus { outline: none; }

/* ---------- Helpers ---------- */

.visually-hidden:not(:focus):not(:active) {
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 10;
  padding: 0.75rem 1.25rem;
  background: var(--surface-bg);
  color: var(--heading);
  font-weight: 600;
  border-radius: 0.5rem;
}
.skip-link:focus { top: 1rem; }

.wrap {
  width: min(100% - 2rem, 62rem);
  margin-inline: auto;
}

/* ---------- Header and navigation ---------- */

.site-header {
  background: var(--surface-bg);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding: 0.5rem 0;
}
.site-name {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: "Inclusive Sans", "Inter", system-ui, sans-serif;
  font-size: 1.5rem;
  color: var(--heading);
  text-decoration: none;
}
.site-name:hover { text-decoration: underline; text-decoration-thickness: 0.08em; }

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-nav li + li { margin-top: 0; }
.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 0.75rem;
  color: var(--heading);
  font-size: 1.0625rem;
  font-weight: 500;
  text-decoration: none;
}
.site-nav a:hover { text-decoration: underline; text-underline-offset: 0.3em; }
/* Current page: bold plus a thick bar, not colour alone. */
.site-nav a[aria-current="page"] { font-weight: 700; }
.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 4px;
  height: 4px;
  border-radius: 2px;
  background: var(--link);
}
.site-nav a[aria-current="page"]:hover { text-decoration: none; }

@media (max-width: 40rem) {
  .header-inner { justify-content: center; text-align: center; }
  .site-nav ul { justify-content: center; }
  .site-nav a { padding: 0 0.625rem; }
}

/* ---------- Panels ---------- */

main { padding: 1.5rem 0 2rem; }

.section {
  background: var(--surface-bg);
  border-radius: 1.25rem;
  padding: clamp(1.5rem, 1rem + 3vw, 3rem);
  margin: 0 0 1.25rem;
  border: 1px solid color-mix(in srgb, var(--border) 45%, transparent);
}
.section-intro { font-size: 1.1875rem; }
.more { margin-top: 1.5rem; }

/* ---------- Home ---------- */

.hero { text-align: center; }
.headshot {
  width: 10rem;
  height: 10rem;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1.25rem;
}
.hero h1 { margin-bottom: 0.5rem; font-size: clamp(2.5rem, 2rem + 3vw, 4rem); }
.roles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-weight: 600;
}
.roles li + li { margin-top: 0; }
.hero .lead {
  font-size: 1.25rem;
  margin-inline: auto;
  max-width: 40ch;
}
.pillars .card h3 { font-size: 1.5rem; }

/* ---------- About ---------- */

.about {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
  align-items: start;
}
.about .headshot { margin: 0; }
@media (max-width: 40rem) {
  .about { grid-template-columns: 1fr; }
  .about .headshot { margin: 0 auto; }
}

/* ---------- Social links ---------- */

.social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}
.social li + li { margin-top: 0; }
.social a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.5rem 1rem;
  border: 2px solid var(--border);
  border-radius: 999px;
  color: var(--heading);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  background: var(--surface-bg);
}
.social a:hover { border-color: var(--heading); text-decoration: underline; }
.social svg, .icon {
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
  flex: none;
}

/* ---------- Buttons and actions ---------- */

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.625rem 1.25rem;
  border: 2px solid transparent;
  border-radius: 999px;
  background: var(--button-bg);
  color: var(--button-text);
  font-weight: 700;
  text-decoration: none;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.button:hover { text-decoration: underline; text-underline-offset: 0.2em; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  margin: 1.5rem 0;
}
.actions > a:not(.button),
.talks h3 a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

/* ---------- Cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
}
.cards li + li { margin-top: 0; }
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 1rem;
}
.card h2, .card h3 { margin: 0; font-size: 1.375rem; }
.card p { margin: 0; font-size: 1rem; }
.card .card-icon {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 22%;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.08);
}
.card .card-logo { border-radius: 1rem; }
.card .card-link { margin-top: auto; font-size: 1rem; font-weight: 600; }

/* Apple's official "Download on the App Store" badge, shown unmodified.
   Apple asks for at least 40px onscreen height and clear space of a quarter of its height. */
.store-badge { display: inline-block; margin-top: 0.25rem; line-height: 0; }
.store-badge img { height: 3rem; width: auto; }

/* The whole card is clickable through its one main link. */
.card--linked .card-link a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 1rem;
}
.card--linked:hover { border-color: var(--heading); }
.card--linked .card-link a:focus-visible { box-shadow: none; outline: none; }
.card--linked:has(.card-link a:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--focus-halo);
}

.badge {
  align-self: flex-start;
  display: inline-block;
  padding: 0.125rem 0.625rem;
  border-radius: 999px;
  background: var(--badge-bg);
  color: var(--badge-text);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.badge-banner {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

/* ---------- Speaking ---------- */

.figure { margin: 0 0 1.5rem; }
.figure img { border-radius: 1rem; width: 100%; }

.talks { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 1rem; }
.talks li + li { margin-top: 0; }
.talks li {
  padding: 1rem 1.25rem;
  background: var(--card-bg);
  border-left: 4px solid var(--accent);
  border-radius: 0.5rem;
}
.talks h3 { font-family: inherit; font-size: 1.125rem; font-weight: 600; margin: 0 0 0.25rem; line-height: 1.4; }
.talks p { margin: 0; font-size: 1rem; }

.conferences { columns: 2 11rem; column-gap: 2rem; margin: 0 0 2rem; }

/* ---------- Mentoring ---------- */

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.panel {
  padding: 1.25rem;
  background: var(--card-bg);
  border-top: 4px solid var(--accent);
  border-radius: 0.5rem;
}
.panel h2 { font-size: 1.375rem; }
.panel p { margin: 0; }

.book {
  display: grid;
  grid-template-columns: minmax(0, 14rem) 1fr;
  gap: 1.5rem;
  align-items: center;
  margin-top: 1rem;
  padding: 1.25rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 1rem;
}
.book img { border-radius: 0.5rem; }
.book h2 { margin-bottom: 0.5rem; font-size: 1.5rem; }
@media (max-width: 34rem) { .book { grid-template-columns: 1fr; } .book img { max-width: 14rem; } }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--surface-bg);
  border-top: 1px solid var(--border);
  padding: 2rem 0 2.5rem;
  font-size: 1rem;
}
.footer-heading { font-size: 1.5rem; margin-bottom: 0.25rem; }
.footer-email {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  font-size: 1.125rem;
}
.footer-links { list-style: none; padding: 0; margin: 1.25rem 0 0; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; }
.copyright { margin: 0.5rem 0 0; color: var(--muted); }

/* ---------- Simple pages (statement, 404) ---------- */

.page h2 { margin-top: 2rem; }

/* ---------- Motion: only for people who haven't asked for less ---------- */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .card--linked, .social a, .button { transition: border-color 0.15s ease, transform 0.15s ease; }
  .card--linked:hover { transform: translateY(-2px); }
}

/* ---------- Forced colours (Windows High Contrast) ---------- */

@media (forced-colors: active) {
  .section, .card, .book, .talks li, .panel, .badge, .button, .social a { border: 1px solid CanvasText; }
  .button { border-width: 2px; }
  .site-nav a[aria-current="page"]::after { background: CanvasText; }
  :focus-visible, .card--linked:has(.card-link a:focus-visible) { outline-color: Highlight; }
  .social svg, .icon { fill: currentColor; }
}

/* ---------- Print ---------- */

@media print {
  body { background: #fff; color: #000; }
  .site-nav, .skip-link, .social { display: none; }
  .section { border: 1px solid #999; break-inside: avoid; }
  .card-link a::after { content: " (" attr(href) ")"; position: static; font-weight: 400; }
}
