/* portfolio2 — minimal black on white. v1 visual baseline. System fonts only. */

:root {
  --measure: 42rem;
  --gap: 1.5rem;
  --ink: #111;
  --paper: #fff;
  --rule: #111;
  --soft: #666;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}

/* ===== Nav ===== */
nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--rule);
  font-size: 0.95rem;
}
nav a {
  color: var(--ink);
  text-decoration: none;
  text-underline-offset: 3px;
}
nav a:hover { text-decoration: underline; }
nav .lang-switch { margin-left: auto; font-variant: small-caps; }

/* ===== Main ===== */
main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

main.linktree { max-width: 24rem; text-align: center; }

h1, h2, h3 {
  font-weight: 600;
  line-height: 1.2;
  margin: 1.75em 0 0.5em;
}
h1 { font-size: 2rem; margin-top: 0; }
h2 { font-size: 1.3rem; border-bottom: 1px solid var(--rule); padding-bottom: 0.25rem; }
h3 { font-size: 1.05rem; }

p { margin: 0.7em 0; }

a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
a:hover { text-decoration: none; }

ul, ol { padding-left: 1.4em; }
li { margin: 0.25em 0; }

img { max-width: 100%; height: auto; display: block; }

/* ===== Hero ===== */
.hero h1 { margin-bottom: 0.25rem; }
.hero .role { margin: 0 0 1rem; color: var(--soft); }
.hero .bio { max-width: 38rem; }

/* ===== Project card grid ===== */
.projects { margin-top: 2rem; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
  gap: var(--gap);
}
.card { display: flex; flex-direction: column; }
.card img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  background: #f3f3f3;
  border: 1px solid var(--rule);
}
.card h3 { margin: 0.6rem 0 0.2rem; font-size: 1rem; }
.card .meta { margin: 0; color: var(--soft); font-size: 0.85rem; }
.card p { margin: 0.4rem 0 0; font-size: 0.92rem; }

/* ===== Project detail page ===== */
.project-detail header { margin-bottom: 1.5rem; }
.project-detail .meta { color: var(--soft); font-style: italic; margin: 0.25rem 0; }
.project-detail .credits { color: var(--soft); margin: 0.25rem 0; font-size: 0.92rem; }
.project-detail figure.cover { margin: 0 0 1.5rem; }
.project-detail figure.cover img { border: 1px solid var(--rule); }
.project-detail .summary { font-size: 1.1rem; margin: 1rem 0; }
.project-media {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
  margin: 2rem 0;
}
.project-media .media-item {
  grid-column: 1 / -1;
  min-width: 0;
  margin: 0;
}
.project-media .media-item--mobile-half { grid-column: span 1; }
.project-media img,
.project-media video {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--rule);
}
.project-media video { object-fit: contain; background: #000; }
.project-media img { background: #f3f3f3; }
.project-media figcaption {
  margin-top: 0.4rem;
  color: var(--soft);
  font-size: 0.85rem;
}
@media (min-width: 45rem) {
  .project-media .media-item--half { grid-column: span 1; }
  .project-media .media-item--full { grid-column: 1 / -1; }
}
.project-detail .links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.project-detail .links a {
  display: inline-block; padding: 0.3rem 0.75rem;
  border: 1px solid var(--rule); border-radius: 999px;
  text-decoration: none; font-size: 0.9rem;
}
.project-detail .links a:hover { background: var(--ink); color: var(--paper); }
.project-detail .tech-footer { color: var(--soft); font-size: 0.9rem; margin-top: 1.5rem; }

/* ===== Contacts list ===== */
.contacts { margin-top: 2rem; }
.contact-list, .link-list {
  list-style: none; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.5rem 1rem;
}
.linktree .link-list { flex-direction: column; gap: 0.5rem; }
.linktree .link-list a {
  display: block; padding: 0.6rem 1rem;
  border: 1px solid var(--rule); border-radius: 0.5rem;
  text-decoration: none;
}
.linktree .link-list a:hover { background: var(--ink); color: var(--paper); }

/* ===== Footer ===== */
footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9rem;
  color: var(--soft);
}
