/* Naamit portfolio. Warm off-white page, Helvetica, one red accent. */

:root {
  --bg: #f3f0eb;
  --fg: #111111;
  --accent: #dc6b63;
  --gutter: clamp(16px, 1.6vw, 28px);
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.2;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

a { color: inherit; text-decoration: none; }

a:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 4px;
}

/* Signature logo, top left. Always links to the home page. */
.logo {
  position: fixed;
  top: 0;
  left: 0;
  padding: var(--gutter);
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  z-index: 3;
  line-height: 0;
}

.logo img {
  display: block;
  --logo-w: clamp(188px, 18.8vw, 310px);
  width: var(--logo-w);
  /* the image has a little empty space on its left; this lines the letters up with the text below */
  margin-left: calc(var(--logo-w) * -0.0225);
  height: auto;
}

/* Menu, top right */
.top {
  position: fixed;
  top: 0;
  right: 0;
  padding: var(--gutter);
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
  z-index: 3;
}

.menu {
  display: flex;
  gap: 3.25em;
  font-size: 0.9375rem;
  font-weight: 500;
}

.menu a:hover,
.menu a[aria-current="page"] {
  color: var(--accent);
}

/* Flower line drawing behind the work list on the home page. */
.deco {
  position: fixed;
  left: 2.8vw;
  top: 9.9vh;
  width: 40vw;
  height: auto;
  opacity: 0.4;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

/* Work list, bottom left */
.works {
  position: fixed;
  left: max(var(--gutter), env(safe-area-inset-left, 0px));
  bottom: max(var(--gutter), env(safe-area-inset-bottom, 0px));
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: clamp(1.25rem, min(2.9vw, 5vh), 2.75rem);
  line-height: 1.5;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  z-index: 2;
}

.works a {
  display: inline-block;
  padding-block: 0.04em;
}

/* Hover image, bottom right */
.preview {
  position: fixed;
  right: max(var(--gutter), env(safe-area-inset-right, 0px));
  bottom: max(var(--gutter), env(safe-area-inset-bottom, 0px));
  width: min(44vw, 760px);
  height: 72vh;
  pointer-events: none;
  z-index: 1;
}

.preview img {
  position: absolute;
  right: 0;
  bottom: 0;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  opacity: 0;
  transition: opacity 0.12s ease-out;
  outline: 1px solid var(--fg);   /* thin black outline, same as the frame around the long scrolls */
}

.preview img.on { opacity: 1; }

/* Touch screens have no hover, so the list links straight to the work. */
@media (hover: none) {
  .preview { display: none; }
}

@media (max-width: 700px) {
  .works { font-size: clamp(1.25rem, 6vw, 2rem); }
  .preview { display: none; }

  /* Phone header: smaller logo and a tighter menu, so they sit side by side without touching */
  .logo img { --logo-w: 36vw; }
  .menu { gap: 1.25em; font-size: 0.8125rem; }

  /* Flower on the home page, larger and behind the list */
  .deco { left: -6vw; top: 9vh; width: 96vw; }
}

@media (prefers-reduced-motion: reduce) {
  .preview img { transition: none; }
}
