:root {
  color-scheme: light;
  --paper: #fff;
  --ink: #151515;
  --secondary: #50504f;
  --rule: #dededb;
  --soft: #f7f7f5;
  --landscape: .29;
  --gutter: clamp(20px, 4vw, 48px);
  --content: 68rem;
  --edge: max(6.3vw, calc((100vw - 108rem) / 2));
  font-family: "Avenir Next", Avenir, "Segoe UI", Arial, sans-serif;
  scroll-behavior: smooth;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #141414;
  --ink: #f5f5f3;
  --secondary: #c3c3c0;
  --rule: #373737;
  --soft: #1c1c1b;
  --landscape: 1;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
a { color: inherit; }
button, summary { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.skip { position: absolute; left: 1rem; top: -9rem; z-index: 10; padding: .7rem 1rem; background: var(--paper); color: var(--ink); }
.skip:focus { top: 1rem; }

.chapter, footer {
  width: min(calc(100% - var(--gutter) - var(--gutter)), var(--content));
  margin-inline: auto;
}
.mast {
  position: absolute; inset: 0 0 auto; z-index: 3; display: flex; align-items: center;
  gap: clamp(1rem,3.9vw,4.5rem); height: clamp(62px,5.2vw,88px); padding-inline: var(--edge);
}
.brand { margin-right: auto; white-space: nowrap; font-size: clamp(1.65rem,2.65vw,2.9rem); line-height: 1.1; font-weight: 600; letter-spacing: -.045em; }
.mast a, .meet, .contact-link { text-decoration: none; }
.main-nav { display: flex; align-items: center; gap: clamp(1.4rem,3.6vw,4.2rem); }
.main-nav a { font-size: clamp(1rem,1.32vw,1.3rem); font-weight: 550; }
.main-nav a:hover, .menu-panel a:hover, footer a:hover { text-decoration: underline; text-underline-offset: .27em; }
.theme-picker { display: inline-flex; flex: none; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--rule); border-radius: 100px; }
.theme-picker button { width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 0; background: transparent; color: var(--secondary); border-radius: 50%; }
.theme-picker button:hover { background: var(--soft); color: var(--ink); }
.theme-picker button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.theme-picker svg { width: 16px; height: 16px; stroke-width: 1.6; }
.site-menu { display: none; position: relative; }
.site-menu summary { list-style: none; display: grid; align-content: center; justify-items: center; gap: 4px; width: 38px; height: 40px; }
.site-menu summary::-webkit-details-marker { display: none; }
.site-menu summary span { display: block; width: 20px; height: 1.5px; background: currentColor; }
.site-menu[open] summary span:first-child { transform: translateY(5.5px) rotate(45deg); }
.site-menu[open] summary span:nth-child(2) { opacity: 0; }
.site-menu[open] summary span:last-child { transform: translateY(-5.5px) rotate(-45deg); }
.menu-panel { position: absolute; right: 0; top: calc(100% + .4rem); display: grid; min-width: 155px; background: var(--paper); padding: .4rem 1rem; border: 1px solid var(--rule); box-shadow: 0 8px 25px #0002; }
.menu-panel a { padding: .6rem 0; }

.cover {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(42.5vw, 49rem);
  background: var(--paper); color: var(--ink);
}
.cover::before {
  content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 100% at 76% -32%, transparent 88%, #dfdfdf55 94%, #eee7 96%, transparent 102%),
    radial-gradient(ellipse 58% 75% at 76% 120%, transparent 82%, #e7e7e780 94%, transparent 105%),
    radial-gradient(ellipse at 76% 75%, #e4e4e4, #f6f6f6 32%, #fff 69%);
  mask-image: linear-gradient(to right, transparent 20%, black 62%);
}
:root[data-theme="dark"] .cover::before {
  background:
    radial-gradient(ellipse 61% 100% at 76% -32%, transparent 86%, #74747430 92%, #b8b8b860 95%, #50505035 98%, transparent 104%),
    radial-gradient(ellipse 55% 77% at 76% 121%, transparent 83%, #5555 92%, #83838355 95%, #37373740 101%, transparent 108%),
    radial-gradient(ellipse at 62% 59%, #373737 0%, #1b1b1b 38%, var(--paper) 73%);
}
.portrait {
  position: absolute; z-index: -1; right: 0; bottom: 0; width: min(58%,67rem);
  aspect-ratio: 858/574; overflow: hidden; pointer-events: none;
  transform: translateX(-20%) scale(.8);
  mask-image: linear-gradient(to right,transparent,#000 23%),linear-gradient(to bottom,#000 79%,transparent 100%);
  mask-composite: intersect;
}
.portrait img {
  position: absolute; width: 175.76%; height: auto; right: 0; top: -11.15%; max-width: none;
  mask: url("assets/obris-portreta.svg") center / 100% 100% no-repeat;
}
:root[data-theme="dark"] .portrait img { mask: none; }
:root[data-theme="dark"] .portrait {
  mask-image: linear-gradient(to right,transparent,#000 25%,#000 82%,transparent),linear-gradient(to bottom,transparent,#000 5%,#000 83%,transparent 100%);
}
.intro {
  position: relative; width: 50%; padding: clamp(100px,8.7vw,158px) 0 clamp(30px,2.9vw,56px) var(--edge);
}
.overline, .label { margin: 0; font-size: clamp(.875rem,1.13vw,1.12rem); font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.overline::after, .label::after { content: ""; display: block; width: 2.25rem; height: 1px; margin-top: .78rem; background: currentColor; }
h1 { margin: clamp(19px,1.85vw,34px) 0 clamp(16px,1.5vw,29px); font-weight: 400; font-size: clamp(3.05rem,5.45vw,6.2rem); line-height: 1.035; letter-spacing: -.045em; }
h1 span { display: block; }
.lead { margin: 0; width: min(31vw,26rem); font-size: clamp(1rem,1.45vw,1.45rem); line-height: 1.34; color: var(--secondary); }
.meet { display: inline-flex; align-items: center; justify-content: center; gap: 1.8rem; min-height: 44px; margin-top: clamp(18px,1.7vw,32px); padding: .62rem 1.7rem; border: 1px solid currentColor; color: var(--ink); border-radius: 100px; font-size: clamp(1rem,1.16vw,1.2rem); font-weight: 600; }
.meet:hover, .meet:focus-visible { background: var(--ink); color: var(--paper); }
.meet svg { width: 21px; height: 21px; stroke-width: 1.4; }

.themes { list-style: none; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); margin: 0; padding: clamp(19px,1.6vw,32px) var(--edge) clamp(24px,2.45vw,47px); background: var(--paper); }
.themes li { text-align: center; padding: 0 clamp(8px,1.35vw,24px); border-inline-start: 1px solid var(--rule); }
.themes li:first-child { border: 0; }
.themes svg { width: clamp(34px,3.05vw,53px); height: clamp(34px,3.05vw,53px); stroke-width: 1.9; }
.themes h2 { margin: .4rem 0 .25rem; font-size: clamp(1.2rem,1.7vw,1.85rem); font-weight: 600; letter-spacing: -.035em; }
.themes p { margin: 0 auto; max-width: 26ch; font-size: clamp(1rem,1.12vw,1.18rem); line-height: 1.32; color: var(--secondary); }
.vista {
  position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: flex-end; justify-content: space-between;
  min-height: clamp(170px,16vw,285px); padding: clamp(23px,2.55vw,46px) var(--edge); background: var(--paper);
}
.vista::before { content: ""; position: absolute; z-index: -1; inset: 0; opacity: var(--landscape); background: url("assets/osebni-prostor.png") 65% bottom / 192% 410% no-repeat; mask-image: linear-gradient(to bottom,transparent,#000 24%); }
.vista::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg,#ffffff45,transparent 65%); }
:root[data-theme="dark"] .vista::after { background: linear-gradient(0deg,#10101080,transparent 80%); }
blockquote { margin: 0; font-size: clamp(1.2rem,1.8vw,2rem); line-height: 1.22; font-style: italic; letter-spacing: -.025em; }
blockquote span { display: block; height: .52em; font: 700 2.6em/.72 Georgia,serif; }
blockquote::after { content: ""; display: block; width: 2rem; height: 1px; margin-top: .7em; background: currentColor; }
.share { flex: none; display: grid; place-items: center; width: clamp(42px,4.5vw,68px); aspect-ratio: 1; border-radius: 50%; background: var(--paper); color: var(--ink); border: 1px solid var(--rule); }
.share:hover { color: var(--paper); background: var(--ink); }
.share svg { width: 36%; height: 36%; stroke-width: 1.65; }
.share-status { position: absolute; margin: 0; bottom: .45em; right: var(--edge); font-size: .875rem; background: var(--paper); color: var(--ink); }

.chapter { padding-block: clamp(36px,4vw,57px); border-bottom: 1px solid var(--rule); }
.section-grid { display: grid; grid-template-columns: minmax(125px,1fr) minmax(0,3.8fr); gap: clamp(24px,4vw,65px); }
.label { margin-top: .4em; }
.label::after { content: ""; display: block; width: 1.5rem; height: 1px; margin-top: .55rem; background: currentColor; }
.section-body { max-width: 39rem; }
.section-body h3 { margin: 0; font-size: clamp(1.85rem,2.8vw,2.45rem); font-weight: 500; letter-spacing: -.045em; line-height: 1.13; }
.section-body p { margin: .8rem 0 0; font-size: 1.0625rem; line-height: 1.53; color: var(--secondary); }
.profile-links { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.profile-links a { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--rule); text-decoration: none; }
.profile-links strong { font-size: 1.35rem; font-weight: 500; letter-spacing: -.03em; }
.profile-links span { color: var(--secondary); }
.profile-links a:hover strong { text-decoration: underline; text-underline-offset: .16em; text-decoration-thickness: 1px; }
.contact-links { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: 1rem; }
.contact-link { display: inline-block; padding: .35rem 0; border-bottom: 1px solid; font-weight: 550; }
.email-reveal { background: transparent; color: inherit; border: 0; border-bottom: 1px solid; }
footer { display: flex; justify-content: space-between; gap: 1rem; padding-block: 1.3rem; font-size: .875rem; color: var(--secondary); }
footer a { text-decoration: none; }

@media(max-width: 730px) {
  :root {
    --edge: clamp(17px, 5.2vw, 36px);
    scroll-padding-top: 4.75rem;
  }
  .mast {
    position: sticky; inset: 0 0 auto; height: 62px; gap: .25rem;
    background: var(--paper); border-bottom: 1px solid var(--rule);
  }
  .brand { display: inline-flex; align-items: center; min-height: 44px; font-size: clamp(1.22rem,5.7vw,1.6rem); }
  .main-nav { display: none; }
  .site-menu { display: block; position: static; }
  .site-menu summary { width: 44px; height: 44px; }
  .menu-panel {
    inset: 100% 0 auto; padding: .4rem var(--edge) .75rem;
    border: 0; border-bottom: 1px solid var(--rule); box-shadow: 0 12px 20px #0001;
  }
  .menu-panel a { display: flex; align-items: center; min-height: 48px; font-size: 1.12rem; }
  .menu-panel a + a { border-top: 1px solid var(--rule); }
  .theme-picker { gap: 0; padding: 0; }
  .theme-picker button { width: 44px; height: 44px; position: relative; isolation: isolate; }
  .theme-picker button[aria-pressed="true"] { background: transparent; }
  .theme-picker button[aria-pressed="true"]::before {
    content: ""; position: absolute; z-index: -1; inset: 4px; border-radius: 50%; background: var(--ink);
  }
  .cover {
    min-height: 0; padding-block: clamp(22px,5vw,38px) clamp(30px,7vw,48px);
  }
  .cover::before { mask-image: none; }
  .cover::before, :root[data-theme="dark"] .cover::before {
    background: radial-gradient(ellipse at 68% 28%,var(--soft),transparent 70%);
  }
  .portrait, :root[data-theme="dark"] .portrait {
    display: block; position: relative; inset: auto; left: 68%;
    width: min(50%,16rem); aspect-ratio: 1.04; transform: translateX(-50%);
    mask-image: linear-gradient(to right,transparent,#000 14%,#000 88%,transparent),linear-gradient(to bottom,transparent,#000 5%,#000 76%,transparent 100%);
  }
  .portrait img { width: 280%; right: -38%; top: -12.9%; }
  .intro { width: 100%; padding: clamp(15px,4vw,27px) var(--edge) 0; }
  .overline { font-size: .875rem; letter-spacing: .12em; }
  .overline::after { display: none; }
  h1 { margin: .55rem 0 0; font-size: clamp(2.16rem,9vw,3.55rem); line-height: 1.02; letter-spacing: -.055em; }
  .lead { width: auto; max-width: 40ch; font-size: 1.0625rem; line-height: 1.48; margin: clamp(18px,4vw,26px) 0 0; }
  .meet { gap: 1.35rem; min-height: 46px; margin-top: 1rem; padding: .55rem 1.3rem; color: var(--paper); background: var(--ink); border-color: var(--ink); }
  .meet svg { width: 18px; height: 18px; }
  .themes { margin-inline: var(--edge); padding: 0; grid-template-columns: repeat(2,minmax(0,1fr)); border-block: 1px solid var(--rule); }
  .themes li { text-align: left; padding: 1rem .9rem 1.1rem; }
  .themes li:nth-child(odd) { padding-left: 0; border-inline-start: 0; }
  .themes li:nth-child(even) { padding-right: 0; }
  .themes li:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .themes svg { display: block; width: 26px; height: 26px; }
  .themes h2 { font-size: 1.18rem; margin: .5rem 0 .2rem; }
  .themes p { margin: 0; max-width: 23ch; font-size: 1rem; line-height: 1.4; }
  .vista { min-height: 146px; margin-top: .9rem; }
  .vista::before { background-image: url("assets/osebni-prostor-mobilni.jpg"); background-size: 215% 410%; background-position: 63% bottom; }
  .share { width: 44px; }
  .section-grid { grid-template-columns: 1fr; gap: 1rem; }
  .label { margin: 0; }
  .chapter { padding-block: 2.15rem; }
  .profile-links a { flex-wrap: wrap; min-height: 48px; }
  .contact-link, footer a { display: inline-flex; align-items: center; min-height: 44px; }
  footer { align-items: center; padding-block: .7rem; }
}
@media(prefers-reduced-motion: reduce) { :root { scroll-behavior: auto; } }
