/* franklippes.com: one-pager styles. No JavaScript, no external requests. */

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-latin.woff2") format("woff2");
  font-weight: 600 800;
  font-style: normal;
  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: "Inter";
  src: url("/fonts/inter-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  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 {
  --bg: #f4f4f1;
  --surface: #ffffff;
  --ink: #111111;
  --text: #3f444d;
  --muted: #4a4f58;
  --subtle: #50555e;
  --line: #d9d9d2;
  --border: #e6e6e1;
  --tag-border: #d5d7db;
  --hover: #e6e6e0;
  --accent: #de0000;
  --highlight: #ffe27a;
  --on-dark: #ffffff;
  --on-dark-muted: #d4d4d4;

  --radius-lg: 28px;
  --radius: 24px;
  --radius-sm: 14px;

  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.55;
}

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

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 800;
  margin: 0;
}

/* Text for screen readers only */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link: visible only when focused */
.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--on-dark);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
}

.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px) 40px;
}

/* External-link arrow (decorative) */
.ext::after {
  content: "";
  display: inline-block;
  flex: none;
  width: 0.7em;
  height: 0.7em;
  margin-left: 0.35em;
  background: currentColor;
  -webkit-mask: url("/img/icons/arrow-up-right.svg") center / contain no-repeat;
  mask: url("/img/icons/arrow-up-right.svg") center / contain no-repeat;
}

/* Header */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.dot {
  color: var(--accent);
}

.header-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.pill-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  font-weight: 500;
  text-decoration: none;
}

.pill-link:hover {
  background: var(--hover);
}

/* Intro */
.intro {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
}

.intro-card {
  grid-column: span 2;
  padding: clamp(28px, 4vw, 56px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
}

.chip {
  margin: 0;
  align-self: flex-start;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
}

h1 {
  font-size: clamp(2.25rem, 4.4vw, 3.75rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.marker {
  /* Highlighter pen: a soft band behind the words, with slightly ragged ends */
  padding: 0 0.12em;
  margin: 0 -0.04em;
  border-radius: 0.18em 0.32em 0.22em 0.4em;
  background: linear-gradient(180deg, transparent 14%, var(--highlight) 14%, var(--highlight) 90%, transparent 90%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.lede {
  margin: 0;
  max-width: 34em;
  color: var(--text);
  font-size: clamp(1.125rem, 1.5vw, 1.25rem);
}

.photo {
  margin: 0;
  min-height: 440px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #e4e2db;
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% 40%;
}

/* Projects */
.projects {
  margin-top: 88px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px 32px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--ink);
}

.section-head h2 {
  font-size: clamp(2.125rem, 4vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.section-head p {
  margin: 0;
  max-width: 30em;
  color: var(--subtle);
}

.project-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px;
}

.project {
  position: relative;
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 14px 24px;
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(17, 17, 17, 0.08);
}

.project:focus-within {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.project img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.project-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 10px 0;
}

.project-body p {
  margin: 0;
  color: var(--muted);
}

.project h3 {
  font-size: 1.5rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

/* The title link covers the whole card */
.project h3 a {
  text-decoration: none;
}

.project h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.project h3 a:focus-visible {
  outline: none;
}

.project .tag {
  padding: 3px 12px;
  border: 1.5px solid var(--tag-border);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.8125rem;
  font-weight: 600;
}

.project .url {
  display: inline-flex;
  align-items: center;
  color: var(--subtle);
  font-size: 0.875rem;
  font-weight: 600;
}

.project--wide {
  grid-column: span 3;
  padding-bottom: 28px;
}

.project--wide .project-body {
  padding: 12px 14px 0;
}

.project--wide h3 {
  font-size: clamp(1.625rem, 2.4vw, 2rem);
}

.project--banner {
  grid-column: span 6;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 40px;
  padding: clamp(24px, 3vw, 36px) clamp(24px, 3.6vw, 44px);
  background: var(--ink);
  color: var(--on-dark);
}

.project--banner .project-body {
  flex: 1 1 320px;
  padding: 0;
}

.project--banner .project-body p {
  color: var(--on-dark-muted);
}

.project--banner .tag {
  border-color: #5a5a5a;
  color: #e0e0e0;
}

.project--banner h3 {
  font-size: clamp(1.625rem, 2.4vw, 2rem);
}

.banner-logo {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 6vw, 5.5rem);
  font-weight: 800;
  line-height: 0.85;
  letter-spacing: -0.05em;
}

.badge {
  margin: 0;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1.5px solid var(--on-dark);
  border-radius: 999px;
  font-weight: 600;
}

/* Contact */
.contact {
  margin-top: 88px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding: clamp(36px, 5vw, 64px);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
}

.contact h2 {
  font-size: clamp(2.75rem, 6vw, 5.25rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.contact p {
  margin: 12px 0 0;
  color: var(--text);
  max-width: 30em;
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.btn--light {
  background: var(--ink);
  color: var(--on-dark);
}

.btn--light:hover {
  background: #2b2b2b;
}

.btn--outline {
  border: 1.5px solid var(--ink);
  color: var(--ink);
}

.btn--outline:hover {
  background: var(--hover);
}

/* Footer */
.site-footer {
  padding-top: 20px;
  color: var(--subtle);
  font-size: 0.875rem;
}

.site-footer p {
  margin: 0;
}

/* Text pages (e.g. /itslearning/privacy) */
.brand a {
  color: inherit;
  text-decoration: none;
}

.doc {
  padding: 24px 0 48px;
}

.doc-card {
  max-width: 46rem;
  padding: clamp(24px, 4vw, 48px);
  color: var(--text);
  font-size: 1.0625rem;
  line-height: 1.65;
}

.doc-card h1 {
  color: var(--ink);
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  line-height: 1.15;
}

.doc-card h2 {
  margin: 32px 0 8px;
  color: var(--ink);
  font-size: 1.25rem;
}

.doc-card .doc-title-2 {
  margin-top: 0;
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  line-height: 1.15;
}

.doc-card ul {
  padding-left: 1.2em;
}

.doc-card li {
  margin: 6px 0;
}

.doc-card a {
  color: var(--ink);
  text-underline-offset: 3px;
}

.doc-card code {
  font-size: 0.9em;
}

.doc-card hr {
  margin: 48px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.doc-meta {
  margin: 8px 0 24px;
  color: var(--muted);
  font-size: 0.9375rem;
}

.doc-lead {
  margin: 0 0 16px;
  padding: 4px 0 4px 16px;
  border-left: 4px solid var(--accent);
  color: var(--ink);
}

.site-footer a {
  color: inherit;
}

/* Error page */
.error-page {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
  padding: 48px 0;
}

.error-page h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
}

.error-page p {
  margin: 0;
  color: var(--text);
}

.btn--dark {
  background: var(--ink);
  color: var(--on-dark);
}

/* Responsive */
@media (max-width: 960px) {
  .intro {
    grid-template-columns: minmax(0, 1fr);
  }

  .intro-card {
    grid-column: auto;
  }

  .photo {
    /* On its own row: show the photo at its own size (width/height in
       content.json), centred, never wider than the screen. */
    min-height: 0;
    max-width: 100%;
    justify-self: center;
  }

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

  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project {
    grid-column: span 1;
  }

  .project--wide,
  .project--banner {
    grid-column: span 2;
  }
}

@media (max-width: 620px) {
  /* Align the wrapped header links with the text edge */
  .header-links {
    margin-left: -16px;
  }

  .project-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .project,
  .project--wide,
  .project--banner {
    grid-column: auto;
  }

  .projects,
  .contact {
    margin-top: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project,
  .btn {
    transition: none;
  }

  .project:hover {
    transform: none;
  }
}
