:root {
  color-scheme: light;
  --bg: #f7f4ee;
  --paper: #fffdf8;
  --paper-2: #f0ece3;
  --ink: #171717;
  --muted: #62605b;
  --line: #d8d1c4;
  --line-strong: #171717;
  --accent: #0f766e;
  --accent-2: #1d4ed8;
  --shadow: 0 22px 70px rgba(23, 23, 23, .08);
  --radius: 0;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d0f12;
  --paper: #15171b;
  --paper-2: #101216;
  --ink: #f5f2ea;
  --muted: #aaa397;
  --line: #34373d;
  --line-strong: #f5f2ea;
  --accent: #2dd4bf;
  --accent-2: #93c5fd;
  --shadow: 0 24px 80px rgba(0, 0, 0, .34);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(0,0,0,.035) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(rgba(0,0,0,.028) 1px, transparent 1px) 0 0 / 72px 72px,
    var(--bg);
  color: var(--ink);
  font: 16px/1.65 var(--sans);
  text-rendering: optimizeLegibility;
}

[data-theme="dark"] body {
  background:
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px) 0 0 / 72px 72px,
    radial-gradient(circle at 82% 12%, rgba(45, 212, 191, .12), transparent 32rem),
    var(--bg);
}

a { color: inherit; }
::selection { background: var(--ink); color: var(--paper); }

.shell {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 72px;
}

.masthead {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 18px;
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  text-decoration: none;
}

.mark::before {
  content: "pn";
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line-strong);
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: lowercase;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0;
  border: 1px solid var(--line-strong);
  background: var(--paper);
}

nav a,
.mode {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  border: 0;
  border-right: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 0 13px;
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  font: inherit;
  cursor: pointer;
}

nav a:last-of-type { border-right: 1px solid var(--line-strong); }
.mode { border-right: 0; color: var(--muted); }
nav a:hover,
.mode:hover { background: var(--ink); color: var(--paper); }

.layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.identity {
  position: sticky;
  top: 24px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.portrait {
  min-height: 430px;
  display: grid;
  align-items: end;
  padding: 0;
  background:
    linear-gradient(to bottom, transparent 58%, rgba(0,0,0,.72)),
    url("Tino-Avatar.jpg") center 8% / cover no-repeat;
  border-bottom: 1px solid var(--line-strong);
}

.portrait-card {
  margin: 0;
  border: 0;
  border-top: 1px solid rgba(255,255,255,.34);
  padding: 16px 20px 18px;
  background: rgba(0,0,0,.34);
  backdrop-filter: blur(6px);
}

.portrait-card strong {
  display: block;
  margin-bottom: 4px;
  color: #fff;
  font-size: 1.32rem;
  line-height: 1.05;
  letter-spacing: -.04em;
}

.portrait-card p { margin: 0; color: rgba(255,255,255,.82); }
.identity-body { padding: 22px; }

.status {
  display: block;
  margin: 0 0 20px;
  border-left: 4px solid var(--accent);
  padding-left: 12px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.status::before { content: none; }

.quick-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.quick-list li {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  color: var(--muted);
}
.quick-list span:last-child { color: var(--ink); text-align: left; }

.hero,
.panel {
  border: 1px solid var(--line-strong);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.hero {
  position: relative;
  min-height: 620px;
  display: grid;
  align-content: space-between;
  overflow: hidden;
  padding: clamp(36px, 6vw, 72px);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 22px;
  border: 1px solid var(--line);
  pointer-events: none;
}

.hero::after {
  content: "PRINOVA";
  position: absolute;
  right: -10px;
  bottom: -28px;
  color: transparent;
  -webkit-text-stroke: 1px var(--line);
  font-size: clamp(5rem, 14vw, 12rem);
  font-weight: 900;
  line-height: .8;
  letter-spacing: -.08em;
  opacity: .55;
  pointer-events: none;
}

.hero > * { position: relative; z-index: 1; }
.kicker {
  display: inline-flex;
  margin: 0 0 26px;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 8px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p { margin-top: 0; }

h1 {
  max-width: 820px;
  margin-bottom: 26px;
  font-size: clamp(3.6rem, 7.2vw, 7rem);
  line-height: .9;
  letter-spacing: -.075em;
}

.lead {
  max-width: 680px;
  margin-bottom: 36px;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.55vw, 1.28rem);
  line-height: 1.72;
}

.cta-row,
.chips { display: flex; flex-wrap: wrap; gap: 10px; }

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  padding: 0 18px;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
}
.button.primary { background: var(--ink); color: var(--paper); }
.button.secondary { background: transparent; }
.button:hover { transform: translateY(-1px); box-shadow: 5px 5px 0 var(--accent); }

.sections {
  display: grid;
  gap: 28px;
  margin-top: 28px;
}
.panel { padding: clamp(26px, 4vw, 44px); }

.section-head {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: start;
  gap: 18px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}
.number {
  color: var(--accent);
  font-family: var(--mono);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  padding-top: .25rem;
}
h2 {
  margin-bottom: 0;
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: .95;
  letter-spacing: -.06em;
}

.focus-grid,
.project-grid { display: grid; gap: 0; }
.focus-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.project-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.tile {
  position: relative;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 22px;
  background: transparent;
  color: inherit;
  text-decoration: none;
}
.tile:hover { background: var(--paper-2); }
.tile:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tile h3 {
  margin-bottom: 12px;
  font-size: 1.08rem;
  line-height: 1.25;
  letter-spacing: -.02em;
}
.tile p { margin-bottom: 0; color: var(--muted); }

.chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  padding: 6px 9px;
  color: var(--muted);
  background: transparent;
  font-family: var(--mono);
  font-size: .76rem;
  letter-spacing: .02em;
}

.case {
  min-height: 290px;
  display: grid;
  align-content: space-between;
  overflow: hidden;
}
.case::before {
  content: attr(data-label);
  position: absolute;
  right: 14px;
  top: 6px;
  color: transparent;
  -webkit-text-stroke: 1px var(--line);
  font-size: 5.2rem;
  font-weight: 900;
  letter-spacing: -.08em;
  line-height: 1;
  opacity: .8;
}
.case h3,
.case p,
.case .chips { position: relative; z-index: 1; }
.case { text-decoration: none; }
.case h3 {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
}
.case p,
.case .chips { text-decoration: none; }

.stack-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.statement {
  display: grid;
  grid-template-columns: .9fr 1fr;
  gap: 34px;
  align-items: start;
}
.statement .big {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: .98;
  letter-spacing: -.055em;
}
.statement p:not(.big) { color: var(--muted); }
.statement p:last-child { margin-bottom: 0; }

.contact-block {
  display: grid;
  gap: 0;
}
.contact-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 28px;
  background: var(--ink);
  color: var(--paper);
}
.contact-panel p { margin-bottom: 0; color: color-mix(in srgb, var(--paper) 72%, transparent); }
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  border: 1px solid var(--line-strong);
  border-top: 0;
  padding: 14px 18px;
  background: var(--paper);
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.social-links a {
  color: var(--muted);
  text-decoration: none;
}
.social-links span {
  color: var(--ink);
  font-weight: 700;
}
.social-links a:hover { color: var(--accent); }
.contact-panel .button.primary {
  border-color: var(--paper);
  background: var(--paper);
  color: var(--ink);
}

@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .identity { position: relative; top: auto; display: grid; grid-template-columns: 320px 1fr; }
  .portrait { min-height: 320px; border-bottom: 0; border-right: 1px solid var(--line-strong); }
  .hero { min-height: 520px; }
}

@media (max-width: 740px) {
  .shell { width: min(100% - 24px, 1240px); padding-top: 16px; }
  .masthead { grid-template-columns: 1fr; }
  nav { justify-content: stretch; width: 100%; }
  nav a,
  .mode { flex: 1; justify-content: center; padding-inline: 8px; }
  .identity { grid-template-columns: 1fr; }
  .portrait { border-right: 0; border-bottom: 1px solid var(--line-strong); }
  .hero { min-height: auto; padding: 32px; }
  .hero::before { inset: 12px; }
  h1 { font-size: clamp(3rem, 15vw, 4.7rem); }
  .focus-grid,
  .project-grid,
  .stack-row,
  .statement,
  .contact-panel { grid-template-columns: 1fr; }
  .button { width: 100%; }
}
