/*
  cemo.tr — stylesheet
  ────────────────────────────────────────────────────────────────────────────

  FONT: Schibsted Grotesk (400, 500)
  Sharp, confident grotesque with strong legibility at small sizes.
  Fallback: system-ui, sans-serif.

  PALETTE:
    #ffffff  background — pure white, nothing to hide behind
    #111111  foreground — near black, high contrast without being harsh
    #6b7280  muted gray-blue — used only for metadata, footer, webring.
             Not a brand color; just ink at lower opacity.
    #555555  visited links — barely perceptible shift, respectful of the user

  DECISIONS:
    - No shadows, no gradients, no rounded corners
    - Border separators use #e5e5e5 — light enough to recede
    - Focus states use a 2px outline instead of the default glow — visible,
      on-brand, not distracting
    - Single max-width container, centered. That's the whole layout.
    - Type scale: 0.75rem / 0.875rem / 1rem / 1.1rem — four sizes, no more

  ────────────────────────────────────────────────────────────────────────────
*/

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

html {
  font-size: 17px;
  overflow-x: clip;
}

body {
  margin: 0;
  background: #f9f7f4;
  color: #111111;
  font-family: 'Schibsted Grotesk', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* ── container ── */
:root {
  --c-margin: clamp(1.5rem, 8vw, 8rem);
  --c-padding: 1.5rem;
}

.container {
  max-width: 80ch;
  margin-left: var(--c-margin);
  margin-right: 0;
  padding: 0 var(--c-padding);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container main {
  flex: 1;
}

/* ── nav ── */
nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  padding: 1.75rem 0 1.5rem;
  margin-left: 0.25rem;
  position: relative;
}

nav::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: calc(-1 * (var(--c-margin) + var(--c-padding)));
  width: 100vw;
  height: 1px;
  background: #e5e5e5;
}

.nav-dot {
  display: block;
  width: 16px;
  height: 16px;
  background: #111111;
  text-decoration: none;
  transition: background 0.15s ease;
}

.nav-dot:hover {
  background: #888888;
}

.nav-dot:focus-visible {
  outline: 2px solid #111111;
  outline-offset: 3px;
}

/* ── icons ── */
.icon {
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  flex-shrink: 0;
}

.icon-inline {
  width: 0.8em;
  height: 0.8em;
  vertical-align: -0.1em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── portrait ── */
.portrait {
  display: block;
  width: 80px;
  height: 80px;
  object-fit: cover;
  object-position: center top;
  border-radius: 2px;
  margin-top: 2.5rem;
  margin-left: auto;
  filter: grayscale(30%);
}

/* ── main ── */
main {
  padding: 3rem 0 2rem;
}

/* ── typography ── */
h1 {
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0 0 1.25rem;
  letter-spacing: 0em;
}

p {
  margin: 0 0 1.25rem;
}

/* ── links ── */
a {
  color: #111111;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: text-decoration-color 0.15s ease;
}

a:visited {
  color: #555555;
}

a:hover {
  text-decoration-color: transparent;
}

a:focus-visible {
  outline: 2px solid #111111;
  outline-offset: 2px;
  text-decoration: none;
  border-radius: 1px;
}

/* ── works table ── */
.works {
  margin: 3.5rem 0 0;
  border-collapse: collapse;
  width: 100%;
}

.works th {
  padding: 0 0 0.6rem;
  text-align: left;
  font-weight: 400;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9ca3af;
  border-bottom: 1px solid #e5e5e5;
}

.works td {
  padding: 0.85rem 0;
  vertical-align: middle;
  line-height: 1.5;
}

.works tbody tr + tr td {
  border-top: 1px solid #e5e5e5;
}

.works-icon {
  width: 72px;
  min-width: 72px;
  padding-right: 1.25rem;
}

.works-icon img {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.works-name {
  white-space: nowrap;
  min-width: 8rem;
  padding-right: 2rem;
  font-weight: 500;
}

.works-year {
  white-space: nowrap;
  min-width: 4rem;
  padding-right: 2rem;
  color: #9ca3af;
  font-size: 0.8rem;
}

.works-desc {
  color: #6b7280;
  font-size: 0.875rem;
  width: 100%;
}

/* ── contact form ── */
.field {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.875rem;
}

.optional {
  color: #6b7280;
  font-size: 0.75rem;
}

input[type="text"],
input[type="email"],
textarea {
  display: block;
  width: 100%;
  border: 1px solid #cccccc;
  padding: 0.5rem 0.625rem;
  font-family: inherit;
  font-size: inherit;
  color: #111111;
  background: #f9f7f4;
  border-radius: 0;
  appearance: none;
  transition: border-color 0.1s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  outline: 2px solid #111111;
  outline-offset: 0;
  border-color: transparent;
}

textarea {
  resize: vertical;
  line-height: 1.6;
}

button[type="submit"] {
  background: #111111;
  color: #ffffff;
  border: none;
  padding: 0.5rem 1.5rem;
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: background 0.15s ease;
}

button[type="submit"]:hover {
  background: #333333;
}

button[type="submit"]:focus-visible {
  outline: 2px solid #111111;
  outline-offset: 3px;
}

/* ── contact feedback ── */
.contact-feedback {
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
}

.contact-feedback:empty {
  display: none;
}

.contact-feedback.success {
  color: #111111;
}

.contact-feedback.error {
  color: #c0392b;
}

/* ── footer ── */
footer {
  margin-top: 2rem;
  padding: 1.5rem 0 2rem;
  font-size: 0.75rem;
  color: #6b7280;
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: calc(-1 * (var(--c-margin) + var(--c-padding)));
  width: 100vw;
  height: 1px;
  background: #e5e5e5;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.footer-links a {
  color: #6b7280;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.footer-links a:hover {
  color: #111111;
  text-decoration-color: transparent;
}

.footer-links a:visited {
  color: #6b7280;
}

.webring {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.webring a {
  color: #6b7280;
  text-decoration-color: transparent;
}

.webring a:hover {
  color: #111111;
}

.webring a:visited {
  color: #6b7280;
}


/* ── mobile ── */
@media (max-width: 600px) {
  html {
    font-size: 16px;
  }

  :root {
    --c-margin: 0px;
    --c-padding: 1.25rem;
  }

  .works-year {
    display: none;
  }

  .works-name {
    min-width: 4rem;
  }

  .container {
    margin-left: 0;
    padding: 0 1.25rem;
    min-height: unset;
  }

  nav {
    padding: 1.25rem 0 1rem;
  }

  main {
    padding: 2rem 0 1.5rem;
  }

  footer {
    margin-top: 3rem;
  }
}
