/* salemkode.com
   A plain, fast page: who I am, what I built, how to reach me.
   The islands are pictures (see art/), so nothing here needs JavaScript. */

@font-face {
  font-family: "Handjet";
  src: url("fonts/handjet-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Readex Pro";
  src: url("fonts/readexpro-latin.woff2") format("woff2");
  font-weight: 160 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --sky-top: #ffd9b3;
  --sky-low: #cfe8ee;
  --ink: #2a2118;
  --ink-soft: #5a4c3e;
  --leaf: #2d6e2a;
  --paper: #fffaf2;
  --garden: #e6f2d9;
  --stone: #e8eaf1;
  --night: #0b1220;
  --mint: #34d399;
  --blocky: "Handjet", "Courier New", monospace;
  --text: "Readex Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pad: clamp(1.15rem, 5vw, 5rem);
  --wide: 76rem;
  --round: clamp(1.25rem, 2.4vw, 2.25rem);
  --ease: cubic-bezier(0.22, 0.8, 0.2, 1);
}

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

html {
  font-size: clamp(100%, 0.6rem + 0.45vw, 118.75%);
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--text);
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; border-radius: 6px; }

h1, h2, h3, h4, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }

.skip {
  position: absolute;
  top: -4rem;
  left: 0.6rem;
  z-index: 20;
  padding: 0.5rem 0.9rem;
  border-radius: 99px;
  background: var(--ink);
  color: #fff;
}
.skip:focus { top: 0.6rem; }

/* shared pieces */

.kind {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--leaf);
}
.section-title {
  font-family: var(--blocky);
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  font-weight: 700;
  font-variation-settings: "ELGR" 1, "ELSH" 2;
  line-height: 0.9;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-wrap: balance;
}
.points { display: grid; gap: 0.5rem; }
.points li { position: relative; padding-left: 1.35rem; }
.points li::before {
  content: "";
  position: absolute;
  top: 0.5em;
  left: 0;
  width: 0.55em;
  height: 0.55em;
  background: var(--leaf);
}
.stack { font-size: 0.86rem; font-weight: 500; color: var(--ink-soft); }
.links { display: flex; flex-wrap: wrap; gap: 0.3rem 1.1rem; font-weight: 500; }
.links a { text-underline-offset: 0.22em; }

.doors { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.door {
  display: inline-flex;
  align-items: center;
  min-height: 2.9rem;
  padding: 0 1.35rem;
  border: 1.5px solid var(--ink);
  border-radius: 99px;
  background: var(--ink);
  color: #fff;
  font-weight: 500;
  text-decoration: none;
  transition: translate 0.2s var(--ease), background-color 0.2s, color 0.2s;
}
.door--plain { border-color: rgb(42 33 24 / 0.3); background: transparent; color: var(--ink); }
.door:hover { translate: 0 -2px; }
.door:active { translate: 0 0; }
.door--plain:hover { background: #fff; }

/* ------------------------------------------------------------------ top */

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem var(--pad);
  background: rgb(255 217 179 / 0.86);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
}
.top-name {
  font-family: var(--blocky);
  font-size: 1.55rem;
  font-weight: 700;
  font-variation-settings: "ELGR" 1, "ELSH" 2;
  letter-spacing: 0.02em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}
.top-nav { display: flex; align-items: center; gap: clamp(0.7rem, 2vw, 1.6rem); font-size: 0.92rem; font-weight: 500; }
.top-nav a { text-decoration: none; }
.top-nav a:hover { text-decoration: underline; text-underline-offset: 0.25em; }
.top-mail {
  padding: 0.5rem 1rem;
  border-radius: 99px;
  background: var(--ink);
  color: #fff;
}
.top-nav .top-mail:hover { text-decoration: none; background: var(--leaf); }

/* ---------------------------------------------------------------- hello */

.hello {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: 1.5rem clamp(1.5rem, 4vw, 4rem);
  margin-top: -3.6rem;
  padding: calc(3.6rem + clamp(2rem, 6vw, 5rem)) var(--pad) clamp(2.5rem, 6vw, 5rem);
  overflow: hidden;
  background: linear-gradient(180deg, var(--sky-top), var(--sky-low));
}
.hello-text { display: grid; gap: 1.25rem; max-width: 37rem; justify-self: end; }
.eyebrow { display: flex; align-items: center; gap: 0.55rem; font-size: 0.9rem; font-weight: 500; }
.hello h1 {
  font-family: var(--blocky);
  font-size: clamp(2.9rem, 6.4vw, 5.3rem);
  font-weight: 700;
  font-variation-settings: "ELGR" 1, "ELSH" 2;
  line-height: 0.86;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  text-wrap: balance;
}
.lede { font-size: 1.14rem; line-height: 1.5; text-wrap: pretty; }
.tools { font-size: 0.9rem; color: var(--ink-soft); text-wrap: pretty; }
.tools span { font-weight: 600; color: var(--ink); }

/* The picture: islands from the art folder, floating. */
.sky { position: relative; aspect-ratio: 1 / 0.94; max-width: 44rem; width: 100%; }
.sky img { position: absolute; }
.sky-garden { bottom: -9%; left: 1%; width: 80%; animation: bob 7s ease-in-out infinite; }
.sky-venn { top: 2%; right: -5%; width: 40%; animation: bob 8s ease-in-out -3s infinite; }
.sky-light { top: -2%; left: 6%; width: 15%; animation: bob 6s ease-in-out -1s infinite; }
.sky-cloud { opacity: 0.92; }
.sky-cloud--a { top: 12%; left: 20%; width: 40%; animation: drift 22s ease-in-out infinite alternate; }
.sky-cloud--b { top: 46%; right: -12%; width: 34%; animation: drift 28s ease-in-out -8s infinite alternate; }
@keyframes bob { 50% { translate: 0 -1.6%; } }
@keyframes drift { to { translate: 9% 0; } }

/* ----------------------------------------------------------------- work */

.work {
  display: grid;
  gap: clamp(1.25rem, 2.6vw, 2rem);
  max-width: calc(var(--wide) + 2 * var(--pad));
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) var(--pad);
}

/* The main project gets the room: a dark panel in the explorer's own colours. */
.lead {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3rem);
  padding: clamp(1.5rem, 4.5vw, 4rem) clamp(1.4rem, 4.5vw, 4rem) 0;
  border-radius: var(--round);
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 85% 0%, rgb(52 211 153 / 0.16), transparent 60%),
    linear-gradient(180deg, #101a33, var(--night) 62%);
  color: #f3f6fb;
}
.lead-text {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: end;
  gap: 1.75rem clamp(1.5rem, 5vw, 5rem);
}
.lead-text > div { display: grid; gap: 1rem; }
.lead .kind { color: var(--mint); }
.lead h2 {
  font-family: var(--blocky);
  font-size: clamp(4rem, 10vw, 8rem);
  font-weight: 700;
  font-variation-settings: "ELGR" 1, "ELSH" 2;
  line-height: 0.78;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.lead .pitch { max-width: 34rem; font-size: 1.12rem; line-height: 1.5; text-wrap: pretty; }
.lead h3 { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #9fb0c8; }
.lead .points li::before { background: var(--mint); }
.lead .stack { color: #9fb0c8; }
.lead .door { border-color: var(--mint); background: var(--mint); color: #06281c; }
.lead .door--plain { border-color: rgb(255 255 255 / 0.3); background: transparent; color: #fff; }
.lead .door--plain:hover { background: #fff; color: var(--night); }

/* Two real pages from the explorer, in plain browser frames. */
.browsers { position: relative; padding-right: 9%; }
.browser {
  border: 1px solid rgb(255 255 255 / 0.16);
  border-bottom: 0;
  border-radius: 0.9rem 0.9rem 0 0;
  overflow: hidden;
  background: #05080f;
  box-shadow: 0 30px 70px rgb(0 0 0 / 0.5);
}
.browser::before {
  content: "";
  display: block;
  height: 1.7rem;
  background:
    radial-gradient(circle at 1rem 50%, #ff5f57 0.27rem, transparent 0.3rem),
    radial-gradient(circle at 2rem 50%, #febc2e 0.27rem, transparent 0.3rem),
    radial-gradient(circle at 3rem 50%, #28c840 0.27rem, transparent 0.3rem),
    #161d2c;
}
.browser img { width: 100%; }
.browser--side { position: absolute; right: 0; bottom: 0; width: 46%; }

/* A place kept empty on purpose. */
.soon {
  display: grid;
  justify-items: start;
  gap: 0.5rem;
  padding: clamp(1.6rem, 4vw, 3rem) clamp(1.4rem, 4.5vw, 4rem);
  border: 2px dashed rgb(42 33 24 / 0.3);
  border-radius: var(--round);
  background: repeating-linear-gradient(135deg, transparent 0 14px, rgb(42 33 24 / 0.035) 14px 28px);
}
.soon h2 {
  font-family: var(--blocky);
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  font-weight: 700;
  font-variation-settings: "ELGR" 1, "ELSH" 2;
  line-height: 0.85;
  text-transform: uppercase;
  color: rgb(42 33 24 / 0.45);
}
.soon p:last-child { color: var(--ink-soft); }

/* The hackathon pair: smaller, and labelled as what they are. */
.sprint {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
  padding-top: clamp(1.5rem, 4vw, 3rem);
}
.sprint-head {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  align-items: end;
  gap: 0.8rem clamp(1.5rem, 5vw, 5rem);
  padding-bottom: 0.5rem;
}
.sprint-head p { color: var(--ink-soft); text-wrap: pretty; }
.mini {
  display: grid;
  grid-template-columns: clamp(8.5rem, 16vw, 12.5rem) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.1rem, 2.4vw, 2rem);
  padding: clamp(1.2rem, 2.6vw, 2.2rem);
  border-radius: var(--round);
}
.mini--garden { background: var(--garden); }
.mini--venn { background: var(--stone); }
.mini-text { display: grid; gap: 0.75rem; font-size: 0.95rem; }
.mini h3 {
  font-family: var(--blocky);
  font-size: clamp(2.2rem, 3.8vw, 3rem);
  font-weight: 700;
  font-variation-settings: "ELGR" 1, "ELSH" 2;
  line-height: 0.85;
  text-transform: uppercase;
}
.mini .points { gap: 0.3rem; font-size: 0.9rem; }

/* A phone: dark body, thin bezel, the screenshot inside. */
.phone {
  padding: 0.42rem;
  border-radius: 2.1rem;
  background: #15120e;
  box-shadow: inset 0 0 0 1.5px #4a4138, 0 20px 40px rgb(42 33 24 / 0.24);
}
.phone img { width: 100%; border-radius: 1.7rem; }

/* Older work, shown as older. */
.archive {
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 1fr);
  align-items: start;
  gap: 1rem clamp(1.5rem, 4vw, 4rem);
  padding-top: clamp(1.5rem, 4vw, 3rem);
  border-top: 1.5px solid rgb(42 33 24 / 0.14);
  color: var(--ink-soft);
}
.archive h2 { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.archive ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 2rem; }
.archive li { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); align-items: start; gap: 0.9rem; font-size: 0.9rem; }
.archive img { filter: grayscale(1) contrast(0.9); opacity: 0.75; }
.archive h3 { font-size: 1rem; font-weight: 600; color: var(--ink); }
.archive a { font-weight: 500; text-underline-offset: 0.22em; }

/* ---------------------------------------------------------------- about */

.about {
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 1fr);
  align-items: start;
  gap: 1.25rem clamp(1.5rem, 4vw, 4rem);
  padding: clamp(3rem, 7vw, 5.5rem) max(var(--pad), calc((100% - var(--wide)) / 2));
  background: linear-gradient(180deg, var(--sky-low), var(--sky-top));
}
.about .points { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem 2rem; font-size: 1.04rem; }

/* ---------------------------------------------------------------- reach */

.reach {
  display: grid;
  justify-items: center;
  gap: 1.1rem;
  padding: clamp(3.5rem, 9vw, 7rem) var(--pad) clamp(2rem, 4vw, 3rem);
  background: var(--ink);
  color: #fff;
  text-align: center;
}
.reach h2 { font-size: 1.1rem; font-weight: 500; color: #e9dccb; }
.reach-mail {
  font-family: var(--blocky);
  font-size: clamp(2.3rem, 7.4vw, 5.6rem);
  font-weight: 700;
  font-variation-settings: "ELGR" 1, "ELSH" 2;
  line-height: 0.9;
  letter-spacing: 0.01em;
  text-decoration: none;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.reach-mail:hover { color: #ffd9b3; }
.reach-more { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-top: 0.6rem; }
.reach-more a {
  padding: 0.55rem 1.1rem;
  border: 1.5px solid rgb(255 255 255 / 0.35);
  border-radius: 99px;
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
}
.reach-more a:hover { background: #fff; color: var(--ink); }
.reach-note { max-width: 34rem; margin-top: clamp(2rem, 5vw, 3.5rem); font-size: 0.8rem; color: #b9aa98; text-wrap: pretty; }

/* -------------------------------------------------------- smaller screens */

@media (max-width: 960px) {
  .hello { grid-template-columns: minmax(0, 1fr); }
  .hello-text { justify-self: start; }
  .sky { margin: 0 auto; max-width: 34rem; }
  .lead-text { grid-template-columns: minmax(0, 1fr); }
  .sprint { grid-template-columns: minmax(0, 1fr); }
  .sprint-head, .archive, .about { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .top-nav a:not(.top-mail) { display: none; }
  .browsers { padding-right: 0; }
  .browser--side { display: none; }
  .mini { grid-template-columns: minmax(0, 1fr); }
  .phone { width: min(62%, 13rem); margin: 0 auto; }
  .archive ul, .about .points { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
