/* Jamie Sefton — personal site
   Warm paper, ink type, PawLoop coral. Key facts up front; the experience reads as a git commit graph. */
:root {
  --paper: #f2efe7;
  --paper-2: #e8e3d7;
  --card: #fbfaf6;
  --ink: #121319;
  --ink-2: #4b4c57;
  --muted: #858274;
  --line: rgba(18, 19, 25, .12);
  --line-2: rgba(18, 19, 25, .24);
  --accent: #ef4b3c;          /* PawLoop coral */
  --navy: #1d2b47;            /* PawLoop navy */
  --c-endor: #0a2463;
  --c-scc: #0069ff;
  --c-pawloop: #ef4b3c;
  --c-es: #7a7f8c;
  --c-freelance: #f0506e;
  --c-rldatix: #f05a22;
  --c-parallax: #2b2b2b;
  --c-little: #e64a3f;
  --c-rejuvenate: #1a9bcf;
  --sans: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --wrap: 1320px;
  --ease: cubic-bezier(.2, .75, .15, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; font-family: var(--sans); font-size: 18px; line-height: 1.6; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }

.skip { position: absolute; left: -999px; top: 16px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 8px; }
.skip:focus { left: 16px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 48px; }
.mono { font-family: var(--mono); font-size: 13px; }

/* ---------- Links + buttons ---------- */
.ul { background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1.5px no-repeat; padding-bottom: 2px; transition: background-size .45s var(--ease); }
.ul:hover { background-size: 0% 1.5px; background-position: 100% 100%; }
.btn { display: inline-flex; align-items: center; gap: 12px; height: 54px; padding: 0 24px; border-radius: 999px; border: 1.5px solid var(--ink); font: 600 16px/1 var(--sans); white-space: nowrap; position: relative; overflow: hidden; isolation: isolate; transition: color .35s var(--ease), border-color .35s; }
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--ink); clip-path: circle(0% at var(--mx, 50%) var(--my, 50%)); transition: clip-path .55s var(--ease); }
.btn:hover { color: var(--paper); }
.btn:hover::before { clip-path: circle(150% at var(--mx, 50%) var(--my, 50%)); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink::before { background: var(--accent); }
.btn--ink:hover { border-color: var(--accent); }
.btn svg { width: 18px; height: 18px; }

/* ---------- Header ---------- */
.header { position: fixed; inset: 0 0 auto; z-index: 60; transition: background .35s, box-shadow .35s; }
.header.is-scrolled { background: rgba(242, 239, 231, .88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.header__in { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 24px; }
.mark { display: inline-flex; align-items: center; gap: 12px; font: 700 18px/1 var(--sans); letter-spacing: -.02em; }
.mark i { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font: 600 13px/1 var(--mono); font-style: normal; }
.nav { display: flex; align-items: center; gap: 30px; font-size: 15.5px; }
.nav a:not(.btn) { color: var(--ink-2); transition: color .25s; }
.nav a:not(.btn):hover { color: var(--ink); }
.nav .btn { height: 44px; padding: 0 18px; font-size: 15px; }
.menu-btn { display: none; height: 44px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--ink); background: none; font: 600 15px/1 var(--sans); color: var(--ink); cursor: pointer; }
.mnav { display: none; }

/* ---------- Hero: who, what, where — all visible ---------- */
.hero { padding: 140px 0 100px; }
.hero__grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 72px; align-items: center; }
.hero__status { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; color: var(--ink-2); padding: 7px 14px 7px 10px; border: 1px solid var(--line-2); border-radius: 999px; }
.hero__status i { width: 8px; height: 8px; border-radius: 50%; background: #1ea672; box-shadow: 0 0 0 0 rgba(30, 166, 114, .5); animation: pulse 2.4s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(30, 166, 114, 0); } 100% { box-shadow: 0 0 0 0 rgba(30, 166, 114, 0); } }
.hero h1 { font-weight: 800; font-size: clamp(58px, 7.4vw, 112px); line-height: .92; letter-spacing: -.05em; }
.hero__role { font-weight: 600; font-size: clamp(24px, 2.4vw, 34px); line-height: 1.15; letter-spacing: -.025em; margin-top: 20px; }
.hero__role a { color: var(--accent); }
.hero__intro { color: var(--ink-2); font-size: 18.5px; margin-top: 18px; max-width: 590px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; margin-top: 34px; border-top: 1px solid var(--line-2); }
.facts > div { padding: 16px 18px 16px 0; border-bottom: 1px solid var(--line); }
.facts > div:nth-child(2n) { padding-left: 18px; border-left: 1px solid var(--line); }
.facts dt { font-family: var(--mono); font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.facts dd { font-weight: 600; font-size: 17px; margin-top: 4px; line-height: 1.35; }
.facts dd span { display: block; font-weight: 400; color: var(--ink-2); font-size: 15px; }
.hero__acts { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 34px; }
.socials { display: flex; gap: 8px; margin-left: 6px; }
.socials a { width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; transition: background .3s, color .3s, border-color .3s, transform .4s var(--ease); }
.socials a:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); transform: translateY(-3px); }
.socials svg { width: 19px; height: 19px; }

/* Portrait + "now building" card, tilting together */
.hero__visual { perspective: 1400px; }
.stage { position: relative; transform-style: preserve-3d; transition: transform .7s var(--ease); }
.portrait { position: relative; border-radius: 32px; overflow: hidden; aspect-ratio: 4 / 4.6; background: var(--paper-2); box-shadow: 0 50px 90px -50px rgba(18, 19, 25, .55); transform: translateZ(0); }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.now { position: absolute; left: -16%; bottom: -8%; width: 74%; background: var(--card); border-radius: 22px; padding: 14px 14px 16px; box-shadow: 0 40px 70px -30px rgba(18, 19, 25, .45), 0 0 0 1px var(--line); transform: translateZ(60px); transition: transform .5s var(--ease); }
.now:hover { transform: translateZ(80px) translateY(-4px); }
.now img { border-radius: 12px; background: #fdf3f1; }
.now__cap { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; padding: 0 4px; }
.now__cap b { display: block; font-weight: 700; font-size: 16px; }
.now__cap span { display: block; font-size: 13.5px; color: var(--ink-2); }
.now__go { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; }
.now__go svg { width: 18px; height: 18px; }

.js .hero .in { opacity: 0; transform: translateY(22px); animation: in .9s var(--ease) forwards; animation-delay: calc(var(--d, 0) * 90ms + 100ms); }
@keyframes in { to { opacity: 1; transform: none; } }

/* ---------- Sections ---------- */
.sec { padding: 140px 0; position: relative; }
.sec--card { background: var(--card); }
.sec-title { display: flex; justify-content: space-between; align-items: baseline; gap: 30px; border-bottom: 1.5px solid var(--ink); padding-bottom: 22px; margin-bottom: 64px; flex-wrap: wrap; }
.sec-title h2 { font-weight: 800; font-size: clamp(44px, 6vw, 92px); line-height: .9; letter-spacing: -.05em; }
.sec-title .mono { color: var(--muted); }

/* About */
.about { display: grid; grid-template-columns: 1fr 1.25fr; gap: 80px; align-items: start; }
.about__lead { font-weight: 600; font-size: clamp(26px, 2.6vw, 38px); line-height: 1.18; letter-spacing: -.03em; }
.about__lead a { color: var(--accent); }
.about__text { display: grid; gap: 22px; color: var(--ink-2); font-size: 18.5px; }

/* ---------- PawLoop: the product, fanned out in 3D ---------- */
.pawloop { background: #fbf1ee; overflow: hidden; }
.pawloop__grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 64px; align-items: center; }
.pawloop__logo { width: 190px; }
.pawloop h2 { font-weight: 800; font-size: clamp(40px, 4.6vw, 70px); line-height: .95; letter-spacing: -.045em; margin-top: 30px; }
.pawloop h2 em { font-style: normal; color: var(--accent); }
.pawloop p { color: var(--ink-2); margin-top: 20px; max-width: 520px; }
.pawloop__list { display: grid; gap: 10px; margin-top: 26px; }
.pawloop__list li { display: flex; gap: 12px; align-items: baseline; font-weight: 500; }
.pawloop__list li::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); transform: translateY(-2px); }
.pawloop .btn { margin-top: 32px; }
.fan { position: relative; height: 560px; perspective: 1800px; }
.fan figure { position: absolute; left: 50%; top: 50%; width: 78%; margin: 0; border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 40px 80px -40px rgba(29, 43, 71, .55), 0 0 0 1px rgba(29, 43, 71, .08); transform-origin: 50% 100%; transition: transform .2s linear; will-change: transform; }
.fan figure img { width: 100%; height: auto; }
.fan figure:nth-child(1) { transform: translate(-50%, -50%) translate3d(calc(var(--f, 1) * -26%), calc(var(--f, 1) * -12%), -120px) rotateY(calc(var(--f, 1) * 18deg)) rotateZ(calc(var(--f, 1) * -4deg)); }
.fan figure:nth-child(2) { transform: translate(-50%, -50%) translate3d(0, calc(var(--f, 1) * 2%), 0) rotateX(calc(var(--f, 1) * 6deg)); z-index: 2; }
.fan figure:nth-child(3) { transform: translate(-50%, -50%) translate3d(calc(var(--f, 1) * 26%), calc(var(--f, 1) * 14%), -60px) rotateY(calc(var(--f, 1) * -18deg)) rotateZ(calc(var(--f, 1) * 4deg)); }
.fan .phone { position: absolute; z-index: 3; right: 2%; bottom: -2%; width: 23%; border-radius: 26px; overflow: hidden; border: 6px solid #111; box-shadow: 0 40px 70px -30px rgba(29, 43, 71, .6); transform: translateY(calc((1 - var(--f, 1)) * 60px)) rotate(calc(var(--f, 1) * 4deg)); }
.fan .phone img { width: 100%; height: auto; }

/* ---------- Experience: the commit graph ---------- */
.log { position: relative; display: grid; grid-template-columns: 110px 1fr; gap: 0 28px; }
.log__graph { position: relative; }
.log__graph svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.log__graph .rail { fill: none; stroke: var(--line-2); stroke-width: 2.5; }
.log__graph .draw { fill: none; stroke-width: 2.5; stroke-linecap: round; }
.log__graph .node { stroke: var(--paper); stroke-width: 3; }
.log__graph .sub { fill: var(--paper); stroke-width: 2.5; }
.log__graph text { font: 500 11px var(--mono); fill: var(--muted); }
.log__list { display: grid; gap: 22px; min-width: 0; }
.job { --c: var(--ink); position: relative; display: grid; grid-template-columns: 64px 1fr; gap: 6px 22px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 28px; min-width: 0; transition: border-color .3s, box-shadow .4s var(--ease); }
.job:hover { border-color: var(--line-2); box-shadow: 0 30px 60px -40px rgba(18, 19, 25, .35); }
.job__logo { width: 64px; height: 64px; border-radius: 16px; overflow: hidden; grid-row: span 2; background: var(--paper-2); }
.job__logo img { width: 100%; height: 100%; object-fit: cover; }
.job__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; min-width: 0; }
.job h3 { font-weight: 800; font-size: 28px; line-height: 1.05; letter-spacing: -.035em; }
.job h3 a { background: linear-gradient(var(--c), var(--c)) 0 100% / 0% 2px no-repeat; transition: background-size .4s var(--ease); }
.job h3 a:hover { background-size: 100% 2px; }
.job__when { font-family: var(--mono); font-size: 13px; color: var(--muted); white-space: nowrap; }
.job__role { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; }
.job__role::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }
.job__body { grid-column: 2; min-width: 0; }
.job ul.pts { display: grid; gap: 8px; margin-top: 14px; color: var(--ink-2); font-size: 16.5px; }
.job ul.pts li { position: relative; padding-left: 20px; }
.job ul.pts li::before { content: ""; position: absolute; left: 0; top: .72em; width: 9px; height: 1.5px; background: var(--c); }
.job ul.pts li.more { display: none; }
.job.open ul.pts li.more { display: list-item; animation: fadeup .45s var(--ease) both; }
@keyframes fadeup { from { opacity: 0; transform: translateY(6px); } }
.job__toggle { margin-top: 14px; display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 0; font: 600 14.5px/1 var(--sans); color: var(--ink); cursor: pointer; }
.job__toggle svg { width: 16px; height: 16px; transition: transform .35s var(--ease); }
.job.open .job__toggle svg { transform: rotate(45deg); }
.role { margin-top: 22px; padding-top: 20px; border-top: 1px dashed var(--line-2); }
.role:first-of-type { margin-top: 18px; }
.role h4 { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-weight: 700; font-size: 17.5px; }
.role h4 span { font-family: var(--mono); font-size: 12.5px; font-weight: 400; color: var(--muted); }
.job--branch { margin-left: 34px; border-style: dashed; background: transparent; }

/* ---------- Skills ---------- */
.stack { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1.5px solid var(--ink); }
.stack > div { padding: 34px 34px 40px 0; border-bottom: 1px solid var(--line); }
.stack > div:nth-child(2n) { padding-left: 34px; padding-right: 0; border-left: 1px solid var(--line); }
.stack h3 { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; font-size: 26px; letter-spacing: -.03em; }
.stack h3 span { font-family: var(--mono); font-size: 13px; font-weight: 400; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chips li { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 15px; transition: background .25s, color .25s, border-color .25s, transform .3s var(--ease); cursor: default; }
.chips li:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); transform: translateY(-2px); }
.chips li small { color: var(--muted); font-size: 13px; }
.chips li:hover small { color: #bdbab0; }

/* ---------- Education ---------- */
.edu { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.edu > div { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 30px; display: grid; gap: 6px; }
.edu .mono { color: var(--muted); }
.edu h3 { font-weight: 800; font-size: 32px; letter-spacing: -.035em; line-height: 1.05; margin-top: 30px; }
.edu h3 em { font-style: normal; color: var(--accent); font-weight: 600; }
.edu p { color: var(--ink-2); }

/* ---------- Contact ---------- */
.contact { background: var(--ink); color: var(--paper); padding: 140px 0 60px; overflow: hidden; }
.contact h2 { font-weight: 800; font-size: clamp(52px, 8vw, 128px); line-height: .9; letter-spacing: -.055em; }
.contact h2 em { font-style: normal; color: var(--accent); }
.contact__mail { display: inline-block; margin-top: 46px; font-weight: 600; font-size: clamp(24px, 3.4vw, 52px); letter-spacing: -.035em; }
.contact__grid { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 84px; border-top: 1px solid rgba(242, 239, 231, .18); }
.contact__grid a { padding: 24px 20px 24px 0; display: grid; gap: 4px; }
.contact__grid a + a { padding-left: 20px; border-left: 1px solid rgba(242, 239, 231, .18); }
.contact__grid a span { font-family: var(--mono); font-size: 12.5px; color: #a8a597; }
.contact__grid a b { font-weight: 600; font-size: 18px; transition: color .25s; }
.contact__grid a:hover b { color: var(--accent); }
.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 80px; padding-top: 24px; border-top: 1px solid rgba(242, 239, 231, .18); font-size: 14px; color: #a8a597; }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1060px) {
  .nav { display: none; }
  .menu-btn { display: block; }
  .mnav { display: block; position: fixed; inset: 76px 0 0; z-index: 59; background: var(--paper); padding: 20px 24px 40px; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: opacity .3s, transform .4s var(--ease), visibility .3s; }
  .menu-open .mnav { opacity: 1; visibility: visible; transform: none; }
  .menu-open .header { background: var(--paper); }
  .mnav a { display: block; font-weight: 800; font-size: 40px; letter-spacing: -.045em; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .mnav .btn { display: inline-flex; margin-top: 28px; font-size: 16px; letter-spacing: 0; border-bottom: 1.5px solid var(--ink); padding: 0 24px; height: 54px; }
  .hero__grid { grid-template-columns: 1fr; gap: 80px; }
  .hero__visual { max-width: 520px; margin-left: 12%; }
  .about { grid-template-columns: 1fr; gap: 36px; }
  .pawloop__grid { grid-template-columns: 1fr; gap: 50px; }
}
@media (max-width: 760px) {
  body { font-size: 17px; }
  .wrap { padding: 0 20px; }
  .header__in { height: 66px; }
  .mnav { inset: 66px 0 0; }
  .hero { padding: 100px 0 80px; }
  .hero h1 { font-size: 15vw; }
  .facts { grid-template-columns: 1fr; }
  .facts > div:nth-child(2n) { padding-left: 0; border-left: 0; }
  .hero__acts .btn { flex: 1 1 100%; justify-content: center; }
  .socials { margin-left: 0; }
  .hero__visual { margin: 0 0 30px 14%; }
  .now { left: -18%; width: 82%; }
  .sec { padding: 100px 0; }
  .sec-title { margin-bottom: 44px; }
  .fan { height: 320px; }
  .log { grid-template-columns: 36px 1fr; gap: 0 12px; }
  .log__graph text { display: none; }
  .job { grid-template-columns: 1fr; padding: 22px; }
  .job__logo { width: 52px; height: 52px; grid-row: auto; }
  .job__body { grid-column: 1; }
  .job__when { white-space: normal; }
  .job--branch { margin-left: 0; }
  .stack { grid-template-columns: 1fr; }
  .stack > div, .stack > div:nth-child(2n) { padding: 28px 0 32px; border-left: 0; }
  .edu { grid-template-columns: 1fr; }
  .contact { padding: 110px 0 50px; }
  .contact__grid { grid-template-columns: 1fr 1fr; }
  .contact__grid a:nth-child(3) { padding-left: 0; border-left: 0; }
  .contact__grid a:nth-child(n+3) { border-top: 1px solid rgba(242, 239, 231, .18); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .js .hero .in, .js .reveal { opacity: 1; transform: none; }
}

/* Hero visual: contained portrait, card overlaps the lower-left corner */
.hero__visual { max-width: 500px; justify-self: end; width: 100%; }
.now { display: block; height: auto; }
.now img { width: 100%; height: auto; aspect-ratio: 1467 / 788; object-fit: contain; }
.now__cap b, .now__cap span span { white-space: normal; }
.now__go svg { stroke: #fff; }
.pawloop__logo { width: 190px; height: auto; }

/* Phones: portrait + card sit below the facts, in normal flow */
@media (max-width: 1060px) {
  .hero__visual { justify-self: start; max-width: 440px; margin: 0 0 40px; }
  .now { position: relative; left: auto; bottom: auto; width: 88%; margin: -26% 0 0 -4%; transform: none; }
  .now:hover { transform: translateY(-4px); }
}
.contact__grid { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .contact__grid { grid-template-columns: 1fr; } .contact__grid a + a { padding-left: 0; border-left: 0; border-top: 1px solid rgba(242, 239, 231, .18); } }
