@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");

/* colours and sizes I reuse everywhere */
:root {
  --bg: #ebeae5;
  --white: #ffffff;
  --light: #f2f1ed;
  --dark: #141414;
  --muted: #6b6b65;
  --border: #deddd6;
  --lime: #d5f26a;

  --font: "Plus Jakarta Sans", system-ui, sans-serif;
  --radius: 28px;
  --radius-small: 18px;
  --max-width: 1160px;
  --pad: clamp(16px, 4vw, 32px);
  --tile-pad: clamp(20px, 2.4vw, 30px);
  --gap: 12px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* so the sticky header doesn't cover section titles */
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--dark);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

h1, h2, h3, h4, p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

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

[hidden] {
  display: none !important;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--dark);
  color: var(--bg);
  font-weight: 600;
}

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

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--pad);
}


/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 12px var(--pad) 0;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 60px;
  max-width: calc(var(--max-width) - 2 * var(--pad));
  padding: 0 8px 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgb(255 255 255 / .82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  font-weight: 700;
  letter-spacing: -.01em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 50%;
  background: var(--lime);
  color: var(--dark);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .02em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: .94rem;
  font-weight: 500;
  transition: color .2s, background-color .2s;
}

.nav-link:hover,
.nav-link.is-active {
  background: var(--light);
  color: var(--dark);
}

/* the Contact link looks like a button */
.nav-cta {
  margin-left: 8px;
  padding-inline: 16px;
  background: var(--dark);
  color: #fff;
}

.nav-cta:hover {
  background: var(--dark);
  color: #fff;
  opacity: .9;
}

/* hamburger button, only shown on small screens */
.nav-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  flex: none;
  border: 1px solid transparent;
  border-radius: 50%;
  background: var(--light);
  color: var(--dark);
  cursor: pointer;
}

.nav-toggle-bar {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .25s var(--ease), top .25s var(--ease);
}

.nav-toggle-bar:first-child {
  top: 16px;
}

.nav-toggle-bar:last-child {
  top: 24px;
}

/* turns the two bars into an X */
.site-header.is-open .nav-toggle-bar:first-child {
  top: 20px;
  transform: rotate(45deg);
}

.site-header.is-open .nav-toggle-bar:last-child {
  top: 20px;
  transform: rotate(-45deg);
}


/* Buttons and links */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: .95rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .2s var(--ease), background-color .2s, color .2s, border-color .2s, box-shadow .2s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn .icon {
  width: 1.05em;
  height: 1.05em;
}

.btn-primary {
  background: var(--dark);
  color: #fff;
}

.btn-primary:hover {
  background: #000;
}

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

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

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--white);
  font-weight: 600;
}

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

.link-arrow .icon {
  transition: transform .2s var(--ease);
}

.link-arrow:hover .icon {
  transform: translateX(3px);
}


/* Hero (the grid of tiles at the top of the home page) */

.hero {
  padding: clamp(24px, 4vw, 40px) 0 clamp(36px, 6vw, 72px);
}

.hero-inner {
  display: grid;
  gap: var(--gap);
  align-items: stretch;
}

/* lets the tiles inside sit straight in the hero grid */
.hero-content {
  display: contents;
}

.hero-heading,
.hero-tagline,
.hero-meta,
.hero-actions,
.hero .social-links,
.hero-media {
  padding: var(--tile-pad);
  border-radius: var(--radius);
  background: var(--white);
}

.hero-heading {
  grid-area: heading;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: clamp(220px, 26vw, 320px);
  background: var(--dark);
  color: #fff;
}

.hero-title {
  font-size: clamp(2.6rem, 6.2vw, 5.2rem);
  font-weight: 800;
  line-height: .95;
  letter-spacing: -.055em;
}

.hero-role {
  margin-top: 16px;
  color: var(--lime);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  font-weight: 600;
}

.hero-role-sep {
  margin: 0 10px;
  color: rgb(255 255 255 / .4);
  font-weight: 400;
}

.hero-tagline {
  grid-area: tagline;
  display: flex;
  align-items: center;
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  font-weight: 600;
  line-height: 1.45;
}

.hero-meta {
  grid-area: meta;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  background: var(--lime);
  color: var(--dark);
  font-size: .9rem;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 10px;
  border: 1px solid rgb(0 0 0 / .12);
  border-radius: 999px;
  background: rgb(255 255 255 / .45);
  color: var(--dark);
  font-weight: 500;
}

/* little green dot that pulses */
.status-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgb(34 197 94 / .18);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    box-shadow: 0 0 0 7px rgb(34 197 94 / .06);
  }
}

.hero-location {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

.hero-actions {
  grid-area: actions;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.hero .social-links {
  grid-area: social;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.hero .social-link {
  width: 46px;
  height: 46px;
}

.hero-media {
  grid-area: media;
  display: flex;
  justify-content: center;
  min-height: 240px;
  padding: 0;
  overflow: hidden;
}

.avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(160deg, #e5e3d9, #d2d0c4);
}

.avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* only seen if the photo is missing */
.avatar-initials {
  color: var(--dark);
  font-size: clamp(4rem, 9vw, 7rem);
  font-weight: 800;
  letter-spacing: -.05em;
  opacity: .85;
  user-select: none;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.social-link {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid transparent;
  border-radius: 50%;
  background: var(--light);
  color: var(--dark);
  transition: color .2s, border-color .2s, background-color .2s, transform .2s var(--ease);
}

.social-link:hover {
  background: var(--lime);
  transform: translateY(-2px);
}

.social-link .icon {
  width: 18px;
  height: 18px;
}


/* Sections */

.section {
  padding: clamp(36px, 6vw, 72px) 0;
}

/* first section on projects.html and work.html */
.section-page {
  padding-top: clamp(48px, 8vw, 96px);
}

.section-head {
  max-width: 760px;
  margin-bottom: 24px;
}

.section-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* lime dot before each section label */
.section-kicker::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 3px var(--dark);
}

.section-title {
  font-size: clamp(1.9rem, 3.6vw, 2.75rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.045em;
}

.section-page .section-title {
  font-size: clamp(2.6rem, 6.4vw, 4.75rem);
  line-height: 1.04;
  letter-spacing: -.055em;
}

.section-lead {
  margin-top: 16px;
  max-width: 62ch;
  color: var(--muted);
  font-size: 1.1rem;
}

.section-more {
  margin-top: var(--gap);
}


/* About */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: var(--gap);
  align-items: stretch;
}

.about-text {
  padding: var(--tile-pad);
  border-radius: var(--radius);
  background: var(--white);
  font-size: 1.12rem;
  line-height: 1.7;
}

.about-text p + p {
  margin-top: 1em;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
}

.stat {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 150px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--white);
}

.stat-value {
  display: block;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.04em;
}

.stat-label {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.4;
}

/* first stat is lime, a 4th one would be dark */
.stat:first-child {
  background: var(--lime);
}

.stat:first-child .stat-label {
  color: var(--dark);
}

.stat:nth-child(4) {
  background: var(--dark);
  color: #fff;
}

.stat:nth-child(4) .stat-label {
  color: rgb(255 255 255 / .6);
}


/* Expertise */

.expertise-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
}

.expertise-card {
  padding: clamp(24px, 3.5vw, 40px);
  border-radius: var(--radius);
  background: var(--white);
}

.expertise-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 28px;
}

.expertise-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--light);
  color: var(--dark);
}

.expertise-icon .icon {
  width: 24px;
  height: 24px;
}

.expertise-title {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -.02em;
}

.expertise-text {
  color: var(--muted);
}

.skill-groups {
  display: grid;
  gap: 22px;
}

.skill-group-title {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* business card is dark */
.expertise-card[data-kind="business"] {
  background: var(--dark);
  color: #fff;
}

.expertise-card[data-kind="business"] .expertise-icon {
  background: var(--lime);
}

.expertise-card[data-kind="business"] .expertise-text,
.expertise-card[data-kind="business"] .skill-group-title {
  color: rgb(255 255 255 / .6);
}

.expertise-card[data-kind="business"] .tag {
  background: rgb(255 255 255 / .09);
  color: #fff;
}

/* AI card is lime */
.expertise-card[data-kind="ai"] {
  background: var(--lime);
  color: var(--dark);
}

.expertise-card[data-kind="ai"] .expertise-icon {
  background: var(--dark);
  color: var(--lime);
}

.expertise-card[data-kind="ai"] .expertise-text,
.expertise-card[data-kind="ai"] .skill-group-title {
  color: rgb(20 20 20 / .68);
}

.expertise-card[data-kind="ai"] .tag {
  background: rgb(255 255 255 / .62);
}


/* Tags */

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--light);
  font-size: .84rem;
  font-weight: 600;
  line-height: 1.4;
}


/* Work and education (both use the timeline classes) */

.timeline {
  display: grid;
  gap: var(--gap);
}

.timeline-item {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 12px 40px;
  padding: var(--tile-pad);
  border-radius: var(--radius);
  background: var(--white);
}

.timeline-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  color: var(--muted);
  font-size: .9rem;
}

.timeline-date {
  color: var(--dark);
  font-weight: 600;
}

.timeline-badge {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--dark);
  font-size: .76rem;
  font-weight: 600;
}

.timeline-title {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.3;
}

.timeline-subtitle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 0;
  margin-top: 4px;
  color: var(--muted);
}

.timeline-org {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--dark);
  font-weight: 600;
}

.timeline-org .icon {
  width: .85em;
  height: .85em;
}

a.timeline-org:hover {
  color: var(--muted);
}

.timeline-place::before {
  content: "·";
  margin: 0 10px;
}

.timeline-text {
  margin-top: 14px;
}

.timeline-points {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.timeline-points li {
  position: relative;
  padding-left: 20px;
  color: var(--muted);
}

/* round bullet */
.timeline-points li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .68em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dark);
}

.timeline-body .tag-list {
  margin-top: 18px;
}


/* Certifications */

.cert-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: var(--gap);
}

.cert-card {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: var(--tile-pad);
  border-radius: var(--radius);
  background: var(--white);
}

.cert-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--dark);
}

.cert-icon .icon {
  width: 24px;
  height: 24px;
}

.cert-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.cert-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 600;
}

.cert-title {
  margin-top: 6px;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.3;
}

.nowrap {
  white-space: nowrap;
}

.cert-title-link {
  cursor: pointer;
  color: inherit;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: text-decoration-color .2s ease;
}

.cert-title-link:hover,
.cert-title-link:focus-visible {
  text-decoration-color: currentColor;
}

.cert-title-link .icon {
  display: inline-block;
  width: .85em;
  height: .85em;
  margin-left: 6px;
  vertical-align: -.08em;
  opacity: .55;
  transition: opacity .2s ease, transform .2s ease;
}

.cert-title-link:hover .icon,
.cert-title-link:focus-visible .icon {
  opacity: 1;
  transform: translate(2px, -2px);
}

.cert-text {
  margin-top: 8px;
  color: var(--muted);
}

.cert-body .tag-list {
  margin-top: 14px;
}

.cert-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--light);
  color: var(--dark);
  font-size: .9rem;
  font-weight: 600;
}

.cert-link .icon {
  width: 18px;
  height: 18px;
}

.cert-link:hover {
  background: var(--dark);
  color: var(--lime);
}


/* Projects */

.filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--white);
  color: var(--muted);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: color .2s, border-color .2s, background-color .2s;
}

.filter-btn:hover {
  border-color: var(--dark);
  color: var(--dark);
}

.filter-btn.is-active {
  background: var(--dark);
  border-color: var(--dark);
  color: #fff;
}

.filter-count {
  font-size: .78em;
  opacity: .6;
}

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

.project-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 8px;
  border-radius: var(--radius);
  background: var(--white);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 40px -28px rgb(0 0 0 / .45);
}

.project-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 20px;
  background: var(--light);
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
}

.project-card:hover .project-image {
  transform: scale(1.04);
}

/* coloured dotted box when a project has no screenshot yet.
   --hue is set on each card in components.js */
.project-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 1px 1px, rgb(0 0 0 / .09) 1px, transparent 0) 0 0 / 16px 16px,
    hsl(var(--hue) 55% 86%);
  transition: transform .6s var(--ease);
}

.project-card:hover .project-placeholder {
  transform: scale(1.04);
}

.project-placeholder-text {
  color: var(--dark);
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -.05em;
}

.project-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 18px 16px 14px;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.project-category {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--light);
  color: var(--dark);
}

.project-card[data-category="ai"] .project-category {
  background: var(--dark);
  color: var(--lime);
}

.project-title {
  margin-top: 10px;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.25;
}

.project-title a:hover {
  color: var(--muted);
}

.project-summary {
  margin-top: 8px;
  color: var(--muted);
  font-size: .97rem;
}

.project-impact {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-small);
  background: var(--lime);
  color: var(--dark);
  font-size: .9rem;
  line-height: 1.45;
}

.project-impact .icon {
  margin-top: 2px;
  color: var(--dark);
}

.project-impact-label {
  display: block;
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.project-body .tag-list {
  margin-top: 18px;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: auto;
  padding-top: 20px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .9rem;
  font-weight: 600;
}

.project-link:hover {
  color: var(--muted);
}


/* Contact */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: var(--gap);
  align-items: start;
}

.contact-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius-small);
  background: var(--white);
  transition: border-color .2s, transform .2s var(--ease), background-color .2s, color .2s;
}

.contact-link:hover {
  background: var(--lime);
  transform: translateY(-2px);
}

.contact-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  background: var(--light);
}

.contact-link:hover .contact-icon {
  background: var(--dark);
  color: var(--lime);
}

.contact-icon .icon {
  width: 20px;
  height: 20px;
}

.contact-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.contact-label {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* long emails get cut off with ... */
.contact-value {
  overflow: hidden;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.contact-arrow {
  margin-left: auto;
  color: var(--muted);
}

.contact-form {
  display: grid;
  gap: 16px;
  padding: clamp(22px, 3vw, 36px);
  border-radius: var(--radius);
  background: var(--white);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-field {
  display: grid;
  gap: 6px;
}

.form-label {
  font-size: .85rem;
  font-weight: 600;
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: var(--light);
  transition: border-color .2s, box-shadow .2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--dark);
  box-shadow: 0 0 0 3px var(--lime);
}

.form-textarea {
  min-height: 140px;
  resize: vertical;
}

.form-submit {
  justify-self: start;
}

.form-status {
  min-height: 1.4em;
  color: var(--muted);
  font-size: .9rem;
}


/* Footer */

.site-footer {
  padding: 0 var(--pad) var(--gap);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  max-width: calc(var(--max-width) - 2 * var(--pad));
  padding: 18px 22px;
  border-radius: var(--radius);
  background: var(--white);
}

.footer-note {
  color: var(--muted);
  font-size: .9rem;
}

.footer-social .social-link {
  width: 36px;
  height: 36px;
}

.footer-social .social-link .icon {
  width: 16px;
  height: 16px;
}

.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .9rem;
  font-weight: 600;
}


/* Fade in on scroll. main.js adds the "reveal" and "is-visible" classes */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}


/* Big screens */

@media (min-width: 861px) {
  .hero-inner {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-areas:
      "heading heading heading media"
      "tagline tagline meta    media"
      "actions actions social  social";
  }

  /* if there's an odd number of expertise cards, the last one goes full width */
  .expertise-card:last-child:nth-child(odd):not(:first-child) {
    grid-column: 1 / -1;
  }

  .expertise-card:last-child:nth-child(odd):not(:first-child) .skill-groups {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 22px 32px;
  }

  /* first project (and a last one on its own) is a wide card with the picture on the left */
  .project-card:first-child,
  .project-card:last-child:nth-child(even) {
    flex-direction: row;
  }

  .project-card:first-child .project-media,
  .project-card:last-child:nth-child(even) .project-media {
    flex: 0 0 56%;
    aspect-ratio: auto;
    min-height: 340px;
  }

  .project-card:first-child .project-body,
  .project-card:last-child:nth-child(even) .project-body {
    padding: 28px 28px 20px;
  }

  .project-card:first-child .project-title {
    font-size: 2rem;
  }

  .project-card:first-child .project-placeholder-text {
    font-size: 6rem;
  }
}

@media (min-width: 601px) {
  .project-card:first-child,
  .project-card:last-child:nth-child(even) {
    grid-column: 1 / -1;
  }
}


/* Tablets and phones */

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }

  /* the menu drops down as a card under the header */
  .site-nav {
    position: absolute;
    top: calc(100% + 8px);
    left: var(--pad);
    right: var(--pad);
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px var(--pad) 18px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: var(--white);
    box-shadow: 0 18px 30px -18px rgb(0 0 0 / .25);
  }

  .site-header.is-open .site-nav {
    display: flex;
  }

  .nav-link {
    padding: 12px;
    font-size: 1rem;
  }

  .nav-cta {
    margin: 6px 0 0;
    text-align: center;
  }

  .hero-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas: "heading heading" "media meta" "tagline tagline" "actions actions" "social social";
  }

  .hero-media {
    justify-content: flex-start;
    aspect-ratio: 1;
    min-height: 0;
  }

  .avatar-initials {
    font-size: 3.4rem;
  }

  .hero .social-links {
    gap: 6px;
  }

  .hero .social-link {
    width: 42px;
    height: 42px;
  }

  .about-grid,
  .expertise-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .timeline-meta {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
  }
}

@media (max-width: 600px) {
  .project-grid,
  .contact-list,
  .form-row {
    grid-template-columns: 1fr;
  }

  .hero-actions .btn {
    flex: 1 1 auto;
  }

  .timeline-subtitle {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .timeline-place::before {
    display: none;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
