/* martingocik.com — Martin's graphic style: Figtree, white / #242424, grid with crosses,
   black-or-white glass blocks, big radii, lots of white space. No illustrations. */
@font-face { font-family: "Figtree"; src: url("Figtree-Variable.ttf") format("truetype"); font-weight: 300 900; font-display: swap; }

:root {
  --bg: #ffffff; --line: #f8f8f8; --cross: #ebebeb;
  --ink: #181818; --ink-2: #555555; --ink-3: #8a8a8a;
  --glass: rgba(255, 255, 255, .62); --glass-strong: rgba(255, 255, 255, .82);
  --glass-edge: rgba(24, 24, 24, .07); --shadow: 0 30px 80px -30px rgba(0, 0, 0, .22);
  --btn-bg: #181818; --btn-ink: #ffffff; --chip: rgba(24, 24, 24, .06);
  --field: rgba(255, 255, 255, .9); --field-edge: rgba(24, 24, 24, .12);
  --r: 48px; --r-inner: 32px; --r-sm: 20px;
  --wrap: 1180px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #242424; --line: #282828; --cross: #333333;
    --ink: #ffffff; --ink-2: #bdbdbd; --ink-3: #8c8c8c;
    --glass: rgba(24, 24, 24, .58); --glass-strong: rgba(24, 24, 24, .8);
    --glass-edge: rgba(255, 255, 255, .08); --shadow: 0 30px 80px -30px rgba(0, 0, 0, .7);
    --btn-bg: #ffffff; --btn-ink: #181818; --chip: rgba(255, 255, 255, .08);
    --field: rgba(255, 255, 255, .06); --field-edge: rgba(255, 255, 255, .14);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #242424; --line: #282828; --cross: #333333;
  --ink: #ffffff; --ink-2: #bdbdbd; --ink-3: #8c8c8c;
  --glass: rgba(24, 24, 24, .58); --glass-strong: rgba(24, 24, 24, .8);
  --glass-edge: rgba(255, 255, 255, .08); --shadow: 0 30px 80px -30px rgba(0, 0, 0, .7);
  --btn-bg: #ffffff; --btn-ink: #181818; --chip: rgba(255, 255, 255, .08);
  --field: rgba(255, 255, 255, .06); --field-edge: rgba(255, 255, 255, .14);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Figtree", system-ui, sans-serif; color: var(--ink); background-color: var(--bg);
  font-size: 18px; line-height: 1.6; min-height: 100vh; overflow-x: hidden;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cpath d='M80 70v20M70 80h20' stroke='%23999' stroke-opacity='.16' stroke-width='1.5'/%3E%3C/svg%3E"),
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 160px 160px, 40px 40px, 40px 40px;
  background-position: -80px -80px, -1px -1px, -1px -1px;
  background-attachment: fixed;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }

/* Glass block */
.glass {
  background: var(--glass); border: 1px solid var(--glass-edge); border-radius: var(--r);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(22px) saturate(140%); backdrop-filter: blur(22px) saturate(140%);
}

/* Header */
.top { position: sticky; top: 16px; z-index: 20; margin-top: 16px; }
.top .bar { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 12px 10px 24px; border-radius: 999px; }
.brand { font-weight: 800; font-size: 19px; letter-spacing: -.3px; text-decoration: none; white-space: nowrap; }
.top nav { display: flex; align-items: center; gap: 2px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center;
  color: var(--ink); background: transparent; border: 0; cursor: pointer; text-decoration: none; transition: background .15s; }
.icon-btn:hover { background: var(--chip); }
.icon-btn svg { width: 19px; height: 19px; }
.sep { width: 1px; height: 22px; background: var(--glass-edge); margin: 0 6px; }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: none; }
}

/* Type */
h1, h2, h3 { letter-spacing: -.02em; line-height: 1.05; }
.display { font-size: clamp(44px, 7.4vw, 92px); font-weight: 800; letter-spacing: -.035em; line-height: .98; }
.lead { font-size: clamp(18px, 2vw, 22px); color: var(--ink-2); max-width: 42ch; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600;
  padding: 7px 14px; border-radius: 999px; background: var(--chip); color: var(--ink-2); }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #ff0033; }

/* Buttons + fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 56px; padding: 0 28px;
  border-radius: 999px; border: 0; background: var(--btn-bg); color: var(--btn-ink); font: 700 17px/1 "Figtree", sans-serif;
  cursor: pointer; text-decoration: none; transition: transform .15s, opacity .15s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: progress; transform: none; }
.btn.ghost { background: var(--chip); color: var(--ink); }
.btn svg { width: 18px; height: 18px; }
.field { width: 100%; height: 56px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--field-edge);
  background: var(--field); color: var(--ink); font: 500 17px "Figtree", sans-serif; outline: none; transition: border-color .15s, box-shadow .15s; }
.field::placeholder { color: var(--ink-3); }
.field:focus { border-color: var(--ink); box-shadow: 0 0 0 4px var(--chip); }

/* Gate form */
.gate { padding: clamp(24px, 4vw, 40px); }
.gate h2 { font-size: clamp(24px, 3vw, 30px); font-weight: 800; margin-bottom: 6px; }
.gate p.sub { color: var(--ink-2); font-size: 16px; margin-bottom: 22px; }
.gate form { display: grid; gap: 12px; }
.gate .btn { width: 100%; }
.gate .fine { font-size: 13.5px; color: var(--ink-3); text-align: center; margin-top: 4px; line-height: 1.5; }
.gate .fine a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.gate .err { display: none; font-size: 14px; color: #e5484d; text-align: center; }
.gate .err.on { display: block; }
.field.bad { border-color: #e5484d; }
.gate .err .fix { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; }
.gate .err .fix button { font: inherit; font-size: 14px; padding: 8px 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--field-edge); background: var(--chip); color: var(--ink); }
.gate .err .fix .fix-yes { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.cf-turnstile { min-height: 0; display: flex; justify-content: center; }
.cf-turnstile:empty { display: none; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 5vw, 72px); align-items: center;
  padding: clamp(56px, 9vw, 120px) 0 clamp(48px, 7vw, 96px); }
.hero-copy { display: grid; gap: 26px; justify-items: start; }
.me { display: flex; align-items: center; gap: 14px; }
.me img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; object-position: 50% 18%;
  background: transparent; border: 0; box-shadow: var(--shadow); }
.me span { font-size: 15px; color: var(--ink-2); line-height: 1.35; }
.me b { color: var(--ink); display: block; font-size: 17px; }
.proof { display: flex; flex-wrap: wrap; gap: 8px; }
.proof span { font-size: 14px; font-weight: 600; padding: 9px 16px; border-radius: 999px; color: var(--ink); box-shadow: 0 10px 30px -18px rgba(0,0,0,.25); }

/* Locked preview grid under the hero */
.preview { position: relative; padding-bottom: 96px; }
.preview .grid { filter: blur(7px) saturate(.9); opacity: .7; pointer-events: none; user-select: none; }
.preview .veil { position: absolute; inset: -20px 0 0; display: grid; place-items: start center; padding-top: 18%;
  background: linear-gradient(to bottom, transparent, var(--bg) 92%); }
.lock-pill { display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 999px; font-weight: 700; font-size: 15px; }
.lock-pill svg { width: 16px; height: 16px; }

/* Welcome (unlocked) */
.welcome { padding: clamp(48px, 7vw, 96px) 0 clamp(32px, 5vw, 56px); text-align: center; display: grid; gap: 22px; justify-items: center; }
.welcome .lead { max-width: 52ch; margin-inline: auto; }
.video { width: min(920px, 100%); aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden; margin-top: 12px; padding: 10px; }
.video iframe, .video .ph { width: 100%; height: 100%; border: 0; border-radius: calc(var(--r) - 10px); display: block; }
.video .ph { display: grid; place-items: center; background: var(--chip); color: var(--ink-3); font-weight: 600; }

/* Category / post grid */
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin: 24px 0 28px; }
.section-head h2 { font-size: clamp(30px, 4vw, 48px); font-weight: 800; }
.section-head p { color: var(--ink-2); max-width: 46ch; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.card { display: flex; flex-direction: column; padding: 12px; text-decoration: none; color: inherit;
  transition: transform .2s ease, box-shadow .2s ease; min-height: 100%; }
a.card:hover { transform: translateY(-4px); }
.card .cover { aspect-ratio: 16 / 9; border-radius: calc(var(--r) - 12px); overflow: hidden; background: #181818; }
.card .cover img { width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 24px 18px 14px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card h3 { font-size: 23px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; }
.card p { color: var(--ink-2); font-size: 16px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; min-height: 3.2em; }
.card .meta { font-size: 14px; color: var(--ink-3); font-weight: 600; }
.card .btn { margin-top: auto; align-self: flex-start; height: 46px; padding: 0 20px; font-size: 15px; }
.card .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 10px; }
.empty { padding: 48px; text-align: center; color: var(--ink-2); }

/* Category page */
.page-head { padding: clamp(48px, 7vw, 88px) 0 clamp(28px, 4vw, 44px); display: grid; gap: 18px; justify-items: start; }
.page-head p { color: var(--ink-2); font-size: clamp(18px, 2vw, 21px); max-width: 52ch; }
.back { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 15px; }
.back:hover { color: var(--ink); }
.back svg { width: 16px; height: 16px; }

/* Post */
.post { display: grid; grid-template-columns: minmax(0, 1fr) 380px; grid-template-areas: "main side" "body side";
  column-gap: 32px; row-gap: 24px; align-items: start; padding-bottom: 96px; }
.post-main { grid-area: main; display: grid; gap: 22px; min-width: 0; justify-items: start; }
.post-body { grid-area: body; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.side { grid-area: side; position: sticky; top: 100px; display: grid; gap: 16px; }
.post-cover { padding: 10px; width: 100%; }
.post-cover > img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: calc(var(--r) - 10px); }
.post-title { font-size: clamp(36px, 5vw, 60px); font-weight: 800; letter-spacing: -.03em; }
.post-desc { color: var(--ink-2); font-size: clamp(18px, 2vw, 21px); max-width: 60ch; }
.inside { display: flex; flex-wrap: wrap; gap: 8px; }
.inside span { font-size: 15px; font-weight: 600; padding: 9px 15px; border-radius: 999px; background: var(--chip); }
.yt { position: relative; display: block; border-radius: calc(var(--r) - 10px); overflow: hidden; aspect-ratio: 16 / 9; background: #000; }
.yt img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.yt:hover img { transform: scale(1.02); }
.yt .play { position: absolute; inset: 0; display: grid; place-items: center; }
.yt .play span { width: 76px; height: 54px; border-radius: 16px; background: #ff0033; display: grid; place-items: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .35); transition: transform .2s; }
.yt:hover .play span { transform: scale(1.06); }
.yt .play svg { width: 26px; height: 26px; fill: #fff; margin-left: 3px; }
.yt-cap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 14px 6px; font-weight: 700; font-size: 15px; }
.yt-cap a { color: var(--ink-2); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.yt-cap a:hover { color: var(--ink); }
.yt-cap svg { width: 15px; height: 15px; }
.locked-box .sub { color: var(--ink-2); }
.locked-box .lock-pill { padding: 0; }

/* Gated body */
.gated { display: none; }
:root.unlocked .gated { display: block; }
:root.unlocked .locked-only { display: none !important; }
:root:not(.unlocked) .unlocked-only { display: none !important; }

.prose { padding: clamp(28px, 4vw, 48px); font-size: 18px; line-height: 1.7; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: 30px; font-weight: 800; margin-top: 1.8em; }
.prose h3 { font-size: 22px; font-weight: 800; margin-top: 1.6em; }
.prose h2 + *, .prose h3 + * { margin-top: .55em; }
.prose li > p { margin: 0; }
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .35em; }
.prose img { border-radius: var(--r-sm); margin: 1.4em 0; border: 1px solid var(--glass-edge); }
.prose blockquote { border-left: 3px solid var(--ink); padding: 4px 0 4px 20px; color: var(--ink-2); }
.prose code { font: 500 .88em ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--chip); padding: 2px 7px; border-radius: 8px; }
.prose pre { background: #181818; color: #f2f2f2; padding: 20px 22px; border-radius: var(--r-sm); overflow-x: auto; font-size: 15px; line-height: 1.55; }
.prose pre code { background: none; padding: 0; color: inherit; }
.prose hr { border: 0; height: 1px; background: var(--glass-edge); margin: 2em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--glass-edge); }

/* Downloads: inverted block (dark on the light page, white on the dark one) with a soft colour beam around it */
:root { --inv-bg: #181818; --inv-ink: #ffffff; --inv-ink-2: #a9a9a9; --inv-chip: rgba(255, 255, 255, .1); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --inv-bg: #ffffff; --inv-ink: #181818; --inv-ink-2: #6b6b6b; --inv-chip: rgba(24, 24, 24, .07); }
}
:root[data-theme="dark"] { --inv-bg: #ffffff; --inv-ink: #181818; --inv-ink-2: #6b6b6b; --inv-chip: rgba(24, 24, 24, .07); }
@property --beam { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.files-wrap { position: relative; border-radius: calc(var(--r) - 8px); padding: 2px; isolation: isolate; }
:root.unlocked .files-wrap.gated { display: block; }
.files-wrap::before, .files-wrap::after { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1;
  background: conic-gradient(from var(--beam), transparent 0deg, transparent 200deg, #ff0033 250deg, #ff8a00 285deg,
    #8b5cf6 320deg, transparent 360deg);
  animation: beam 5s linear infinite; }
.files-wrap::after { inset: 14px 6px -18px; filter: blur(26px); opacity: .55; }
@keyframes beam { to { --beam: 360deg; } }
.files { position: relative; overflow: hidden; padding: 14px; display: grid; gap: 8px; border-radius: calc(var(--r) - 10px);
  background: var(--inv-bg); color: var(--inv-ink); box-shadow: var(--shadow); }
.files .file .sz { color: var(--inv-ink-2); }
.files .file:hover { background: var(--inv-chip); }
.files .file .ic { background: var(--inv-ink); color: var(--inv-bg); }
.files .file .dl { background: var(--inv-chip); color: var(--inv-ink); }
:root { --shine: rgba(255, 255, 255, .26); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --shine: rgba(120, 130, 160, .22); } }
:root[data-theme="dark"] { --shine: rgba(120, 130, 160, .22); }
.files > * { position: relative; z-index: 1; }
.files::after { content: ""; position: absolute; z-index: 0; top: -40%; bottom: -40%; left: 0; width: 34%; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--shine) 45%, var(--shine) 55%, transparent);
  filter: blur(14px); transform: translateX(-160%) skewX(-18deg); animation: shine 6s ease-in-out infinite 1.2s; }
@keyframes shine { 0% { transform: translateX(-160%) skewX(-18deg); } 38%, 100% { transform: translateX(420%) skewX(-18deg); } }
@media (prefers-reduced-motion: reduce) { .files-wrap::before, .files-wrap::after { animation: none; --beam: 210deg; } .files::after { display: none; } }
.files h3 { font-size: 18px; font-weight: 800; padding: 10px 12px 4px; }
.file { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 24px; text-decoration: none; transition: background .15s; }
.file:hover { background: var(--chip); }
.file .ic { width: 46px; height: 46px; border-radius: 15px; background: var(--btn-bg); color: var(--btn-ink); display: grid; place-items: center;
  font: 800 11px/1 "Figtree", sans-serif; text-transform: uppercase; flex: none; }
.file .nm { font-weight: 700; font-size: 16px; line-height: 1.3; word-break: break-word; }
.file .sz { font-size: 13.5px; color: var(--ink-3); }
.file .dl { margin-left: auto; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--chip); flex: none; }
.file .dl svg { width: 17px; height: 17px; }

.locked-box { padding: clamp(24px, 4vw, 40px); display: grid; gap: 10px; }

/* Footer */
.foot { padding: 48px 0 40px; }
.foot .bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px 18px 18px 28px; border-radius: 999px; }
.foot .links { display: flex; gap: 20px; flex-wrap: wrap; font-size: 15px; color: var(--ink-2); }
.foot .links a { text-decoration: none; }
.foot .links a:hover { color: var(--ink); }
.foot nav { display: flex; gap: 2px; }

/* Legal page */
.legal { padding: clamp(28px, 4vw, 56px); margin-bottom: 64px; }
.legal h1 { font-size: clamp(34px, 4.6vw, 52px); font-weight: 800; margin-bottom: 8px; }
.legal h2 { font-size: 22px; font-weight: 800; margin-top: 1.8em; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post { grid-template-columns: 1fr; grid-template-areas: "main" "side" "body"; }
  .side { position: static; }
}
@media (max-width: 640px) {
  :root { --r: 28px; --r-inner: 22px; --r-sm: 16px; }
  body { font-size: 17px; }
  .grid { grid-template-columns: 1fr; gap: 16px; }
  .top { top: 10px; margin-top: 10px; }
  .top .bar { padding: 6px 6px 6px 18px; }
  .top nav { gap: 0; }
  .top .icon-btn { width: 32px; height: 32px; }
  .top .icon-btn svg { width: 16px; height: 16px; }
  .top nav .sep { margin: 0 2px; }
  .brand { font-size: 17px; }
  .section-head { flex-direction: column; align-items: start; }
  .foot .bar { border-radius: var(--r); flex-direction: column; align-items: start; padding: 22px; }
  .card .body { padding: 18px 12px 10px; }
  .prose { padding: 24px 20px; font-size: 17px; }
}
@media (max-width: 380px) {
  .top .bar { flex-wrap: wrap; justify-content: center; border-radius: 28px; padding: 10px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
