/* roryhansen.com — one page, no build step, no third-party requests.
   Type is shared with rorz.net (self-hosted Newsreader + Libre Franklin, OFL). */

@font-face {
  font-family: 'Libre Franklin';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(../fonts/libre-franklin-var.woff2) format('woff2');
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/newsreader-400.woff2) format('woff2');
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/newsreader-400-italic.woff2) format('woff2');
}

/* Colours are taken from the two illustrations: the dusk navy at the top of
   the sky, the cloud-lit peach, the leaf green and the glass teal. */
:root {
  --bg: #0b1428;
  --bg-2: #111d38;
  --line: rgba(196, 214, 255, 0.14);
  --fg: #f3f5fb;
  --fg-2: #c3cbe0;
  --muted: #8f9bbb;
  --peach: #ffc9a8;
  --sky: #8fb6ff;
  --leaf: #b6dc6a;

  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'Libre Franklin', -apple-system, 'Segoe UI', Roboto, sans-serif;

  --col: 34rem;
  --gutter: 1.25rem;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font: 400 1rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

/* ---- Sky banner ------------------------------------------------------- */

.sky {
  position: relative;
  height: clamp(15rem, 44vw, 30rem);
  overflow: hidden;
}
.sky__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 45% 40%;
}
/* Fade the bottom of the city into the page colour. */
.sky::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 55%;
  background: linear-gradient(to bottom, rgba(11, 20, 40, 0) 0%, rgba(11, 20, 40, 0.55) 45%, var(--bg) 100%);
}

/* ---- Card ------------------------------------------------------------- */

.card {
  position: relative;
  width: 100%;
  max-width: calc(var(--col) + 2 * var(--gutter));
  margin: -5.5rem auto 0;
  padding: 0 var(--gutter);
  flex: 1;
}

.portrait {
  display: block;
  width: 8.75rem;
  height: 8.75rem;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg);
  box-shadow:
    0 0 0 2px var(--peach),
    0 18px 40px -12px rgba(0, 0, 0, 0.6);
}

.name {
  margin: 1.5rem 0 0.25rem;
  font: 400 clamp(2.5rem, 7vw, 3.25rem)/1.05 var(--serif);
  letter-spacing: -0.015em;
}

.tagline {
  margin: 0 0 0.75rem;
  max-width: 30rem;
  font: 400 1.0625rem/1.55 var(--sans);
  color: var(--fg-2);
}
.tagline--more {
  margin-bottom: 2.5rem;
  font-size: 0.9375rem;
  color: var(--muted);
}
.tagline em {
  font: italic 400 1.1875rem/1.4 var(--serif);
  color: var(--peach);
}

/* ---- Links ------------------------------------------------------------ */

.links {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.link {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    'title arrow'
    'desc  arrow';
  align-items: center;
  column-gap: 1rem;
  padding: 1.05rem 0.25rem;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition: background-color 160ms ease, padding 160ms ease;
}
.link__title {
  grid-area: title;
  font: 400 1.375rem/1.25 var(--serif);
}
.link__desc {
  grid-area: desc;
  font-size: 0.875rem;
  color: var(--muted);
}
.link__arrow {
  grid-area: arrow;
  font-size: 1.25rem;
  color: var(--muted);
  transition: transform 160ms ease, color 160ms ease;
}

.link:hover,
.link:focus-visible {
  background: linear-gradient(90deg, rgba(143, 182, 255, 0.08), rgba(143, 182, 255, 0));
  padding-left: 0.75rem;
}
.link:hover .link__title,
.link:focus-visible .link__title { color: var(--sky); }
.link:hover .link__arrow,
.link:focus-visible .link__arrow {
  color: var(--leaf);
  transform: translateX(4px);
}
.link:focus-visible {
  outline: 2px solid var(--sky);
  outline-offset: 2px;
  border-radius: 4px;
}


/* ---- Sections --------------------------------------------------------- */

.section { margin-bottom: 3rem; }
.section__h {
  margin: 0 0 0.75rem;
  font: 600 0.75rem/1 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Things I've built */
.built {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.built__row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    'name url'
    'desc desc';
  column-gap: 1rem;
  row-gap: 0.15rem;
  padding: 0.85rem 0.25rem;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition: background-color 160ms ease, padding 160ms ease;
}
.built__name { grid-area: name; font: 400 1.1875rem/1.3 var(--serif); }
.built__url  { grid-area: url; align-self: center; font-size: 0.75rem; color: var(--muted); }
.built__desc { grid-area: desc; font-size: 0.875rem; line-height: 1.5; color: var(--muted); }
.built__row:hover,
.built__row:focus-visible {
  background: linear-gradient(90deg, rgba(143, 182, 255, 0.08), rgba(143, 182, 255, 0));
  padding-left: 0.75rem;
}
.built__row:hover .built__name,
.built__row:focus-visible .built__name { color: var(--sky); }
.built__row:hover .built__url,
.built__row:focus-visible .built__url { color: var(--leaf); }
.built__row:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; border-radius: 4px; }

.more {
  display: inline-block;
  margin-top: 0.9rem;
  font-size: 0.9375rem;
  color: var(--peach);
  text-decoration: none;
}
.more:hover, .more:focus-visible { text-decoration: underline; text-underline-offset: 3px; }

/* LinkedIn profile card (static — no LinkedIn scripts or requests) */
.li-card {
  display: block;
  margin-bottom: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-2);
  color: inherit;
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease;
}
.li-card__banner {
  display: block;
  height: 3.5rem;
  background:
    linear-gradient(to bottom, rgba(17, 29, 56, 0) 0%, var(--bg-2) 100%),
    url(../img/sky-720.jpg) center 40% / cover;
}
.li-card__body {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    'avatar text'
    'cta    cta';
  gap: 0.25rem 1rem;
  padding: 0 1.1rem 1.1rem;
}
.li-card__avatar {
  grid-area: avatar;
  width: 4rem;
  height: 4rem;
  margin-top: -1.75rem;
  border-radius: 50%;
  border: 3px solid var(--bg-2);
  object-fit: cover;
}
.li-card__text { grid-area: text; display: flex; flex-direction: column; padding-top: 0.4rem; min-width: 0; }
.li-card__name { font: 400 1.25rem/1.2 var(--serif); }
.li-card__headline { margin-top: 0.15rem; font-size: 0.875rem; line-height: 1.45; color: var(--fg-2); }
.li-card__handle { margin-top: 0.2rem; font-size: 0.75rem; color: var(--muted); }
.li-card__cta {
  grid-area: cta;
  justify-self: start;
  margin-top: 0.75rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: #0a66c2;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
}
.li-card:hover, .li-card:focus-visible { border-color: rgba(143, 182, 255, 0.45); transform: translateY(-2px); }
.li-card:hover .li-card__cta { background: #004182; }
.li-card:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }

/* ---- Footer ----------------------------------------------------------- */

.footer {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: calc(var(--col) + 2 * var(--gutter));
  margin: 1rem auto 0;
  padding: 1.25rem var(--gutter) 2rem;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 480px) {
  :root { --gutter: 1rem; }
  .card { margin-top: -4.5rem; }
  .portrait { width: 7.5rem; height: 7.5rem; }
  .link__title { font-size: 1.25rem; }
  .built__row { grid-template-areas: 'name' 'desc'; grid-template-columns: 1fr; }
  .built__url { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .link, .link__arrow, .built__row, .li-card { transition: none; }
}
