/* Montserrat, self-hosted (Latin, variable 400–800) and preloaded in index.html so it
   arrives with the page instead of after a Google Fonts round trip */
@font-face {
  font-family: Montserrat;
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/fonts/montserrat-latin.woff2") format("woff2");
}

/* Stop phones from enlarging some text and not the links beside it. iOS needs the prefix. */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #151113;
}

/* Grain + vignette, fixed so content scrolls over it (matches tej.as approach) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url%28%23n%29' opacity='0.55'/%3E%3C/svg%3E")
    repeat;
  background-size: 160px 160px;
  mix-blend-mode: screen;
  opacity: 0.15;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: radial-gradient(145% 115% at 50% 35%, rgb(0 0 0 / 0%) 58%, #151113 100%);
  opacity: 0.55;
}

h1,
h2,
h3,
p,
ul,
dl {
  margin: 0;
}

a {
  color: #f2efe9;
  text-decoration: none;
}

a:hover {
  color: #fff;
}

/* Signature underline */
.ul {
  position: relative;
  display: inline-block;
}

.ul::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -3px;
  transform: translateX(-50%);
  height: 1px;
  width: 0;
  background: #ef3340;
  transition:
    width 0.25s ease-out,
    height 0.2s ease-out;
}

.ul:hover::after,
.ul:focus-visible::after {
  width: 100%;
  height: 2px;
}

.ul:focus-visible {
  outline: none;
}

@media (hover: none) {
  .ul::after {
    width: 100%;
    opacity: 0.35;
  }
}

li::marker {
  color: #ef3340;
}

/* Layout */
.page {
  min-height: 100vh;
  background: #151113;
  color: #d9d3cc;
  font-family: Montserrat, sans-serif;
  line-height: 1.65;
}

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 32px;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  padding: 28px 0;
}

.section {
  padding: 56px 0;
  border-top: 1px solid #2a2426;
}

.section-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #a39b98;
}

.site-footer {
  padding: 28px 0 40px;
  border-top: 1px solid #2a2426;
  font-size: 14px;
  color: #a39b98;
}

/* Back link, after StrayDevs' IconLink: just the label at rest. On hover or keyboard focus, a
   soft pill grows in and the arrow slides out to the left of the label and turns red. */
.icon-link {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  margin-left: -8px; /* keeps the label lined up with the content edge */
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  line-height: 24px;
  color: #a39b98;
  transition: color 0.2s ease-out;
}

.icon-link::before {
  content: "";
  position: absolute;
  inset: 0 0 0 -24px; /* reaches left to take in the arrow */
  z-index: -1;
  border-radius: inherit;
  background: rgb(242 239 233 / 6%);
  opacity: 0;
  transform: scale(0.75);
  transition:
    opacity 0.2s ease-out,
    transform 0.2s ease-out;
}

.icon-link:hover,
.icon-link:focus-visible {
  color: #f2efe9;
}

.icon-link:focus-visible {
  outline: none;
}

.icon-link:hover::before,
.icon-link:focus-visible::before {
  opacity: 1;
  transform: scale(1);
}

/* Sits in the gutter left of the label, so showing it doesn't move the text. At rest it's
   hidden, tucked 8px to the right (behind the label's start). */
.icon-link-icon {
  position: absolute;
  top: 50%;
  left: -16px;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentcolor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transform: translate(8px, -50%);
  transition:
    color 0.2s ease-out,
    opacity 0.2s ease-out,
    transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.icon-link:hover .icon-link-icon,
.icon-link:focus-visible .icon-link-icon {
  color: #ef3340;
  opacity: 1;
  transform: translate(0, -50%);
}

/* Touch screens can't hover, so the arrow stays out (muted) to show it's a back link */
@media (hover: none) {
  .icon-link-icon {
    opacity: 1;
    transform: translate(0, -50%);
  }
}

/* With reduced motion the arrow just fades in, without sliding */
@media (prefers-reduced-motion: reduce) {
  .icon-link-icon {
    transform: translate(0, -50%);
  }
}

/* Intro */
.intro {
  padding: 80px 0 64px;
}

.name {
  font-size: clamp(44px, 7vw, 80px);
  font-weight: 800;
  line-height: 1.05;
  color: #f2efe9;
  letter-spacing: -0.02em;
}

.tagline {
  margin-top: 14px;
  font-size: 20px;
  font-weight: 500;
  color: #a39b98;
}

.rule {
  width: 40px;
  height: 2px;
  background: #ef3340;
  margin: 28px 0;
}

.bio {
  max-width: 640px;
  font-size: 18px;
}

.seeking {
  margin-top: 20px;
  font-size: 16px;
}

.label {
  font-weight: 600;
  color: #f2efe9;
}

.contact {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 28px;
  font-size: 16px;
  font-weight: 500;
}

/* Experience */
.jobs {
  display: flex;
  flex-direction: column;
  gap: 48px;
  margin-top: 32px;
}

.job {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 32px;
}

.job-dates {
  flex: 0 0 150px;
  font-size: 15px;
  color: #a39b98;
}

.job-details {
  flex: 1 1 420px;
  min-width: 0;
}

.job-title {
  font-size: 19px;
  font-weight: 600;
  color: #f2efe9;
}

.job-company {
  margin: 2px 0 10px;
  font-weight: 500;
  color: #ef3340;
}

.job-summary {
  margin-bottom: 10px;
}

.job-highlights {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Strengths */
.strengths {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 48px;
  margin-top: 28px;
}

.strength {
  flex: 1 1 320px;
  min-width: 0;
}

.strength-title {
  margin-bottom: 6px;
  font-size: 18px;
  font-weight: 600;
  color: #f2efe9;
}

/* Support groups */
.section-intro {
  max-width: 640px;
  margin-top: 20px;
}

.groups-title {
  margin: 32px 0 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a39b98;
}

.group {
  display: flex;
  flex-wrap: wrap;
  gap: 0 32px;
  padding: 12px 0;
  border-bottom: 1px solid #2a2426;
}

.group-name {
  flex: 0 0 220px;
  font-weight: 600;
  color: #f2efe9;
}

.group-focus {
  flex: 1 1 320px;
  min-width: 0;
  margin: 0;
}

/* Certifications + education */
.credentials {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}

.credential-group {
  flex: 1 1 320px;
  min-width: 0;
}

.credential-group .section-title {
  margin-bottom: 20px;
}

.credential-name {
  font-weight: 600;
  color: #f2efe9;
}

.credential-detail {
  font-size: 15px;
  color: #a39b98;
}

.credential-detail:not(:last-child) {
  margin-bottom: 16px;
}

.credential-spaced {
  margin-top: 16px;
}

/* Entrance: blocks on screen at load fade up in turn and the red rule grows in. Blocks below
   the fold wait until they're scrolled into view (the script in index.html adds .in to them). */
.site-header,
.intro > *,
.section > :not(.jobs),
.jobs > *,
.site-footer {
  animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.intro > :nth-child(1) {
  animation-delay: 0.1s;
}

.intro > :nth-child(2) {
  animation-delay: 0.2s;
}

.intro > .rule {
  animation: grow 0.7s 0.35s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.intro > :nth-child(4) {
  animation-delay: 0.45s;
}

.intro > :nth-child(5) {
  animation-delay: 0.55s;
}

.intro > :nth-child(6) {
  animation-delay: 0.65s;
}

.section > :not(.jobs),
.jobs > *,
.site-footer {
  animation-delay: 0.75s;
}

/* Paused until the font is ready and the block is on screen (see index.html). Without JS it just plays. */
.anim .site-header,
.anim .intro > *,
.anim .section > :not(.jobs),
.anim .jobs > *,
.anim .site-footer {
  animation-play-state: paused;
}

/* Equal specificity to the paused rules above, so this wins by coming later */
.anim.ready .in {
  animation-play-state: running;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
}

@keyframes grow {
  from {
    width: 0;
  }
}

@media (prefers-reduced-motion: reduce), print {
  .site-header,
  .intro > *,
  .section > :not(.jobs),
  .jobs > *,
  .site-footer {
    animation: none;
  }
}
