/* Struō — standalone rebuild of atstruo.com (originally built on Cargo) */

:root {
  /* Sizes scale with the window, like the original Cargo site (measured at 1719px wide) */
  --pad: max(16px, 1.5vw);      /* page side margin */
  --gutter: max(14px, 1.4vw);   /* column gutter */
  --fs-small: max(13px, 0.821vw);
  --fs-hello: max(18px, 1.418vw);
  --fs-title: max(24px, 1.866vw);
  --fs-tags: max(11px, 0.672vw);
  --ink: #000;
  --paper: #fff;
  --muted: #827e7e;     /* tag / caption gray */
  --rule: #000;
  /* Original uses Cargo's licensed Diatype + Favorit Mono; these are the closest free matches */
  --sans: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: var(--fs-small);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { opacity: .6; }
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 0; }
b, strong { font-weight: 700; }

.wrap { padding-left: var(--pad); padding-right: var(--pad); }

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Header ---------- */

.nav { align-items: start; padding: max(18px, 1.35vw) 0 max(14px, 1.1vw); }
.logo { grid-column: 1 / span 5; width: max(72px, 5.93vw); }
.logo:hover { opacity: 1; }
.nav-link { font-size: var(--fs-small); font-weight: 300; line-height: 1.4; }
.nav-info { grid-column: 6 / span 4; }
.nav-contact { grid-column: 10 / span 3; }

.hello {
  margin: 0;
  padding: max(18px, 1.5vw) 0 max(20px, 1.6vw);
  font-size: var(--fs-hello);
  line-height: 1.2;
  font-weight: 300;
  letter-spacing: -0.005em;
}

/* ---------- Projects ---------- */

.project-head { padding: max(36px, 3.3vw) 0 max(32px, 2.9vw); align-items: start; }

.p-title {
  grid-column: 1 / span 5;
  margin: 0;
  display: flex;
  gap: 10px;
  font-size: var(--fs-title);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.x-icon {
  flex: none;
  width: 0.62em; height: 0.62em;
  margin: 0.3em 0 0 0.35em;
  fill: none; stroke: currentColor; stroke-width: 2;
}
.p-desc { grid-column: 6 / span 4; margin: 0; padding-top: 0.3em; font-size: var(--fs-small); line-height: 1.4; }
.p-desc a { text-decoration: underline; text-underline-offset: 2px; }
.p-tags {
  grid-column: 11 / span 2; margin: 0; padding-top: 0.45em;
  font-family: var(--mono); font-size: var(--fs-tags); font-weight: 400; line-height: 1.4; color: var(--muted);
}

.project-end { margin-top: max(48px, 4vw); }

/* ---------- Slideshow ---------- */

.slideshow {
  position: relative;
  margin-top: max(28px, 3vw);
  aspect-ratio: var(--ratio);
  outline: none;
}
.slides { position: absolute; inset: 0; }
.slide {
  position: absolute; inset: 0;
  display: flex; align-items: flex-start; justify-content: flex-start;
  opacity: 0; visibility: hidden;
  transition: opacity .8s ease, visibility 0s linear .8s;
}
.align-center .slide { justify-content: center; }
.slide.is-active { opacity: 1; visibility: visible; transition: opacity .8s ease, visibility 0s; }
.slide img { width: 100%; height: 100%; object-fit: contain; object-position: left top; }
.align-center .slide img { object-position: center top; }

.slide .video { width: 100%; aspect-ratio: 16 / 9; max-height: 100%; }
.slide .video iframe { width: 100%; height: 100%; border: 0; display: block; }

.ss-zone {
  position: absolute; top: 0; bottom: 0; width: 50%;
  padding: 0; border: 0; background: transparent; z-index: 2;
}
.ss-prev { left: 0; cursor: w-resize; }
.ss-next { right: 0; cursor: e-resize; }
.slideshow.on-video .ss-zone { width: 12%; }

.slideshow:focus-visible { outline: 1px dashed var(--muted); outline-offset: 6px; }

/* single freeform image (RE_) */
.project-single { margin-top: max(28px, 3vw); }
.single-img { grid-column: 6 / span 4; }
.single-img img { width: 100%; }

/* ---------- Information page ---------- */

.info { padding-top: max(48px, 6.5vw); padding-bottom: max(72px, 7vw); }
.info-grid { align-items: start; }
.info-photo { grid-column: 1 / span 6; display: flex; justify-content: center; }
.info-photo img { width: max(240px, 20vw); }
.info-bio { grid-column: 7 / span 5; font-size: var(--fs-small); line-height: 1.35; }
.info-bio p { margin: 0 0 1.3em; }
.info-contact { margin-top: 2.2em !important; }
.mail { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; margin-top: 2px; }
.arrow-icon { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }

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

.site-footer { padding-bottom: 14px; }
.footer-gap { height: max(36px, 3.3vw); }
.footer-row { padding-top: 10px; font-size: var(--fs-small); font-weight: 300; }
.f-left { grid-column: 1 / span 5; }
.f-mid { grid-column: 6 / span 4; }
.f-right { grid-column: 10 / span 3; text-align: right; }

/* ---------- Contact dialog ---------- */

.contact {
  width: min(443px, calc(100vw - 32px));
  height: min(610px, calc(100vh - 48px));
  padding: 0; border: 0; border-radius: 10px;
  background: #fff; color: #000;
  box-shadow: 0 10px 40px rgba(0,0,0,.18);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}
.contact::backdrop { background: rgba(0,0,0,.35); }
.contact-form { display: flex; flex-direction: column; height: 100%; padding: 0 10px 10px; }
.contact-head { position: relative; padding: 12px 0 8px; text-align: center; }
.contact-head h2 { margin: 0; font-size: 13px; font-weight: 600; }
.contact-close {
  position: absolute; right: 0; top: 9px; width: 20px; height: 20px; padding: 0;
  border: 0; border-radius: 50%; background: #ccc; color: #fff; cursor: pointer;
}
.contact-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.contact input, .contact textarea {
  width: 100%; border: 0; outline: none; font: inherit; font-size: 12px; color: #000;
  background: transparent; padding: 8px 4px;
}
.contact input { border-bottom: 1px solid #eee; }
.contact-msg { flex: 1; display: flex; }
.contact textarea { resize: none; flex: 1; }
.contact ::placeholder { color: #aaa; }
.contact-actions { display: flex; justify-content: flex-end; gap: 4px; padding-top: 8px; border-top: 1px solid #eee; }
.btn { border: 0; border-radius: 999px; font: inherit; font-size: 12px; padding: 5px 0; width: 132px; text-align: left; padding-left: 14px; cursor: pointer; }
.btn-cancel { background: #e5e5e5; color: #555; text-align: center; padding-left: 0; }
.btn-send { background: #222; color: #fff; }
.btn:hover { opacity: .8; }

/* ---------- Mobile ---------- */

@media (max-width: 768px) {
  :root { --pad: 16px; --gutter: 1rem; }
  .logo { grid-column: 1 / span 6; width: 68px; }
  .nav-info { grid-column: 7 / span 3; }
  .nav-contact { grid-column: 10 / span 3; text-align: right; }

  .project-head { padding: 36px 0 28px; row-gap: 14px; }
  .p-title, .p-desc, .p-tags { grid-column: 1 / -1; }
  .project-end { margin-top: 52px; }
  .slideshow, .project-single { margin-top: 28px; }
  .single-img { grid-column: 2 / span 10; }
  .info { padding-top: 48px; padding-bottom: 72px; }
  .info-photo, .info-bio { grid-column: 1 / -1; }
  .info-photo { margin-bottom: 36px; }
  .info-photo img { width: min(342px, 100%); }
  .footer-gap { height: 36px; }
  .f-left, .f-mid, .f-right { grid-column: 1 / -1; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .slide, .slide.is-active { transition: none; }
}
