/* kabirnaik.com: "Framing", refined
   Nothing about a frame is neutral. The site uses the edges that would surround a
   picture, never the picture: outlined rectangles, one corner bracket, and a red
   square that marks what is in focus. Red always meets black; it never floats alone.
   Colour: paper with a faint grain, charcoal text, stone lines, vermilion accent.
   Type: Schibsted Grotesk (name, headings, menu, codes) + Source Serif 4 (reading),
   served from the site itself. Written phone-first; wider screens add columns. */

@font-face { font-family: "Schibsted Grotesk"; font-weight: 400; font-display: swap; src: url(fonts/schibsted-grotesk-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2212; }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 600; font-display: swap; src: url(fonts/schibsted-grotesk-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2212; }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 700; font-display: swap; src: url(fonts/schibsted-grotesk-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2212; }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 800; font-display: swap; src: url(fonts/schibsted-grotesk-latin-800-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2212; }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 400; font-display: swap; src: url(fonts/schibsted-grotesk-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-0130,U+0132-02BA,U+1E00-1EFF,U+20A0-20AB,U+20AD-20C0,U+A720-A7FF; }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 600; font-display: swap; src: url(fonts/schibsted-grotesk-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-0130,U+0132-02BA,U+1E00-1EFF,U+20A0-20AB,U+20AD-20C0,U+A720-A7FF; }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 700; font-display: swap; src: url(fonts/schibsted-grotesk-latin-ext-700-normal.woff2) format("woff2"); unicode-range: U+0100-0130,U+0132-02BA,U+1E00-1EFF,U+20A0-20AB,U+20AD-20C0,U+A720-A7FF; }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 800; font-display: swap; src: url(fonts/schibsted-grotesk-latin-ext-800-normal.woff2) format("woff2"); unicode-range: U+0100-0130,U+0132-02BA,U+1E00-1EFF,U+20A0-20AB,U+20AD-20C0,U+A720-A7FF; }
@font-face { font-family: "Source Serif 4"; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/source-serif-4-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2212; }
@font-face { font-family: "Source Serif 4"; font-weight: 600; font-style: normal; font-display: swap; src: url(fonts/source-serif-4-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2212; }
@font-face { font-family: "Source Serif 4"; font-weight: 400; font-style: italic; font-display: swap; src: url(fonts/source-serif-4-latin-400-italic.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2212; }
@font-face { font-family: "Source Serif 4"; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/source-serif-4-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-0130,U+0132-02BA,U+1E00-1EFF,U+A720-A7FF; }
@font-face { font-family: "Source Serif 4"; font-weight: 600; font-style: normal; font-display: swap; src: url(fonts/source-serif-4-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-0130,U+0132-02BA,U+1E00-1EFF,U+A720-A7FF; }
@font-face { font-family: "Source Serif 4"; font-weight: 400; font-style: italic; font-display: swap; src: url(fonts/source-serif-4-latin-ext-400-italic.woff2) format("woff2"); unicode-range: U+0100-0130,U+0132-02BA,U+1E00-1EFF,U+A720-A7FF; }

:root {
  --paper: #f3f2ee;
  --ink: #1f1f1f;
  --soft: #5b5f58;
  --line: #b9bdb4;
  --red: #b23a2e;
  --sans: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
  --max: 64rem;
  --pad: 1.25rem;
  /* faint paper grain, drawn in the browser, no image file */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .12 0 0 0 0 .11 0 0 0 0 .09 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (min-width: 48rem) { :root { --pad: 2.5rem; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body {
  margin: 0; color: var(--ink);
  background: var(--grain), var(--paper);
  font-family: var(--serif); font-size: 1.0625rem; line-height: 1.65;
  overflow-x: clip;
}
@media (min-width: 48rem) { body { font-size: 1.125rem; } }
p { margin: 0; }
a { color: var(--ink); text-decoration-color: var(--soft); text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { color: var(--red); text-decoration-color: var(--red); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: .5rem; background: var(--ink); color: var(--paper); padding: .6rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; color: var(--paper); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
h1, h2, h3 { font-family: var(--sans); margin: 0; line-height: 1.15; text-wrap: balance; }

/* the accent: important words, in red */
.hl { color: var(--red); font-weight: 600; }

/* ---------- top bar ---------- */
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem 1.5rem; padding-top: 1rem; padding-bottom: .5rem; }
.top.home .wrap { justify-content: flex-start; }
@media (min-width: 48rem) { .top.home .wrap { justify-content: flex-end; } }
.name-link { font-family: var(--sans); font-weight: 700; font-size: 1.05rem; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.nav { list-style: none; margin: 0 0 0 -.6rem; padding: 0; display: flex; font-family: var(--sans); font-size: 1rem; }
.nav a { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: 0 .6rem; text-decoration: none; }
.nav a[aria-current="page"]::before { content: ""; width: .5rem; height: .5rem; background: var(--red); }

/* ---------- page header: title + one small composition ---------- */
.mast { padding: 1.75rem 0 2.25rem; border-bottom: 1px solid var(--line); }
.mast .wrap { display: grid; gap: 1.25rem; }
.mast h1 { font-size: clamp(2.1rem, 9vw, 3.4rem); font-weight: 700; letter-spacing: -.015em; }
.mast .line { margin-top: .6rem; max-width: 34rem; font-size: 1.15rem; line-height: 1.5; }
.mast .line .sub { display: block; }
.mast .line em { display: block; color: var(--soft); font-size: 1rem; margin-top: .25rem; }
@media (min-width: 48rem) {
  .mast { padding: 2.75rem 0 3rem; }
  .mast .wrap { grid-template-columns: minmax(0, 1fr) 13rem; align-items: center; gap: 3rem; }
}

/* compositions: rectangles in stone and charcoal, each with exactly one red element */
.fig { position: relative; width: 100%; max-width: 13rem; height: 8.5rem; }
.fig b { position: absolute; border: 1.5px solid var(--line); }
.fig .k { border-color: var(--ink); }
.fig .r { border-color: var(--red); }
.fig .fill { border: 0; background: var(--red); }
.fig .sq { border: 0; background: var(--red); width: .75rem; height: .75rem; }

/* research: looking closer, frame within frame */
.fig.nested b:nth-child(1) { inset: 0; }
.fig.nested b:nth-child(2) { inset: 15% 15%; }
.fig.nested b:nth-child(3) { inset: 34% 36%; }

/* practice: a sequence of frames, one selected */
.fig.strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: .45rem; align-items: center; }
.fig.strip b { position: static; height: 62%; }

/* now: one frame, one point of focus */
.fig.single b:nth-child(1) { inset: 0 18% 0 0; }
.fig.single .sq { top: -.375rem; right: calc(18% - .375rem); }

/* about: layers, the front one in focus */
.fig.layers b:nth-child(1) { inset: 0 24% 24% 0; }
.fig.layers b:nth-child(2) { inset: 12% 12% 12% 12%; }
.fig.layers b:nth-child(3) { inset: 24% 0 0 24%; }
.fig.layers .sq { left: calc(24% - .375rem); bottom: calc(100% - 24% - .375rem); }

@media (max-width: 47.99rem) { .fig { order: -1; height: 3.5rem; max-width: 6.5rem; } }

/* ---------- home ---------- */
.hero { margin-top: 2.25rem; }
.hero h1 { position: relative; display: inline-block; font-size: clamp(3rem, 14vw, 5.75rem); font-weight: 800; letter-spacing: -.03em; line-height: .95; padding: .16em .14em 0 0; }
/* one corner bracket over the k, with the red square at its corner */
.hero h1 .corner { position: absolute; top: 0; right: 0; width: .38em; height: .38em; border-top: .04em solid var(--ink); border-right: .04em solid var(--ink); }
.hero h1 .corner::after { content: ""; position: absolute; top: -.09em; right: -.09em; width: .14em; height: .14em; background: var(--red); }
/* red square tittles on the two i's */
.hero h1 .i { position: relative; }
.hero h1 .i::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); top: .2em; width: .14em; height: .14em; background: var(--red); }
.hero .role { font-family: var(--sans); font-size: clamp(1.1rem, 4vw, 1.45rem); margin-top: .35rem; }
@media (min-width: 48rem) { .hero { margin-top: 4rem; } }

.points { list-style: none; margin: 2.5rem 0 0; padding: 2rem 0 0; max-width: 38rem; border-top: 1px solid var(--line); }
.points li { position: relative; padding-left: 1.6rem; }
.points li + li { margin-top: 1rem; }
.points li::before, .now-list li::before { content: ""; position: absolute; left: 0; top: .55em; width: .55rem; height: .55rem; background: var(--red); }

/* ---------- content ---------- */
.content { padding-top: 2.25rem; padding-bottom: 3.5rem; }
.block + .block { margin-top: 2.5rem; padding-top: 2.25rem; border-top: 1px solid var(--line); }
.block > h2 { font-size: 1.15rem; font-weight: 700; color: var(--red); margin-bottom: 1rem; display: flex; align-items: baseline; gap: .6rem; }
.block > h2 .count { font-weight: 400; color: var(--soft); font-size: .9rem; }
.lead { max-width: 38rem; }
.lead + .lead { margin-top: 1.1rem; }

.cat { list-style: none; margin: 0; padding: 0; }
.cat > li { padding: 1rem 0 1.1rem; display: grid; gap: .2rem; }
.cat > li + li { border-top: 1px solid var(--line); }
.code { font-family: var(--sans); font-size: .85rem; color: var(--soft); font-variant-numeric: tabular-nums; display: flex; gap: .75rem; align-items: center; }
.code .now { display: inline-flex; align-items: center; gap: .35rem; color: var(--red); font-weight: 600; }
.code .now::before { content: ""; width: .5rem; height: .5rem; background: var(--red); }
.cat h3 { font-size: 1.1rem; font-weight: 600; margin-top: .1rem; }
.cat .where { font-family: var(--sans); font-size: .9rem; color: var(--soft); }
.cat p.desc { margin-top: .3rem; max-width: 38rem; }
.acts { display: flex; flex-wrap: wrap; gap: 0 1.25rem; margin-top: .2rem; font-family: var(--sans); font-size: .95rem; }
.acts a { display: inline-flex; align-items: center; min-height: 44px; }
@media (min-width: 48rem) {
  .cat > li { grid-template-columns: 7rem minmax(0, 1fr); column-gap: 1.5rem; }
  .cat > li > .code { grid-row: 1 / span 5; align-items: flex-start; flex-direction: column; gap: .35rem; padding-top: .2rem; }
  .cat > li > :not(.code) { grid-column: 2; }
}

.plain { list-style: none; margin: 0; padding: 0; max-width: 40rem; }
.plain li { padding: .75rem 0; }
.plain li + li { border-top: 1px solid var(--line); }
.plain .code { margin-bottom: .15rem; }

.interests { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; font-family: var(--sans); font-size: .95rem; }
.interests li { border: 1.5px solid var(--red); padding: .35rem .7rem; }

.now-list { list-style: none; margin: 0; padding: 0; max-width: 38rem; }
.now-list li { position: relative; padding-left: 1.6rem; }
.now-list li + li { margin-top: 1rem; }

.jump ul { list-style: none; margin: 0 0 1.5rem -.6rem; padding: 0; display: flex; flex-wrap: wrap; font-family: var(--sans); font-size: .95rem; }
.jump a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .6rem; }

.links { list-style: none; margin: 1.5rem 0 0 -.5rem; padding: 0; display: flex; flex-wrap: wrap; font-family: var(--sans); }
.links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .5rem; }
.email { font-family: var(--sans); font-weight: 700; font-size: clamp(1.3rem, 6vw, 2rem); letter-spacing: -.01em; word-break: break-word; display: inline-block; margin-top: .4rem; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 2rem; padding-top: 1.25rem; padding-bottom: 1.75rem; font-family: var(--sans); font-size: .95rem; color: var(--soft); }
.foot ul { list-style: none; margin: 0 0 0 -.5rem; padding: 0; display: flex; flex-wrap: wrap; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .5rem; color: var(--ink); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- accessibility and print ---------- */
/* Windows high-contrast and other forced-colour modes: keep the squares and frames visible */
@media (forced-colors: active) {
  .nav a[aria-current="page"]::before, .points li::before, .now-list li::before, .code .now::before,
  .hero h1 .i::after, .hero h1 .corner::after, .fig .fill, .fig .sq { forced-color-adjust: none; background: Highlight; }
  .fig b, .interests li, .hero h1 .corner { border-color: CanvasText; }
}
@media print {
  body { background: #fff; font-size: 11pt; }
  .top, .fig, .jump, .skip, .foot ul { display: none; }
  .mast { border: 0; padding: 0 0 1rem; }
  .hl { color: #000; }
  .acts a::after, .links a::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
  .cat > li { break-inside: avoid; }
}
