@font-face { font-family: Poppins; font-weight: 400; font-display: swap; src: url(fonts/poppins-400.woff2) format("woff2"); }
@font-face { font-family: Poppins; font-weight: 500; font-display: swap; src: url(fonts/poppins-500.woff2) format("woff2"); }
@font-face { font-family: Poppins; font-weight: 600; font-display: swap; src: url(fonts/poppins-600.woff2) format("woff2"); }
@font-face { font-family: Poppins; font-weight: 700; font-display: swap; src: url(fonts/poppins-700.woff2) format("woff2"); }

:root {
  --teal: #09c3b3;        /* fills, always with dark text */
  --teal-ink: #087f75;    /* teal text on light backgrounds */
  --teal-deep: #0b6f67;   /* counter band */
  --ink: #292929;
  --text: #5c5c62;
  --hero: #c8ced7;
  --tint: #f7f6ff;
  --line: #e6e6ee;
  --shadow: 0 2px 14px rgba(41, 41, 70, .09);
  --rail: 60px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; padding-left: var(--rail); font: 400 15px/1.65 Poppins, system-ui, sans-serif; color: var(--text); background: #fff; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; text-wrap: balance; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--teal-ink); }
button { font: inherit; cursor: pointer; }
svg.i { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; display: block; }
::selection { background: var(--teal); color: #10201f; }
:focus-visible { outline: 3px solid var(--teal-ink); outline-offset: 3px; }
.skip { position: fixed; left: 8px; top: -60px; z-index: 200; background: var(--ink); color: #fff; padding: 10px 16px; }
.skip:focus { top: 8px; }

.container { width: min(1140px, 100% - 48px); margin-inline: auto; }
.section { padding: 96px 0; }
.tint { background: var(--tint); }
.teal { color: var(--teal-ink); }

.title { max-width: 600px; margin-bottom: 52px; }
.eyebrow { display: flex; align-items: center; gap: 12px; color: var(--ink); font-size: 13px; font-weight: 500; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 10px; }
.eyebrow::before { content: ""; width: 20px; height: 2px; background: var(--teal); }
.title h2 { font-size: 36px; font-weight: 700; letter-spacing: .5px; margin-bottom: 18px; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 28px; border: 0; border-radius: 3px; background: var(--teal); color: #10201f; font-size: 13px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; text-decoration: none; transition: background .25s, color .25s; }
.btn:hover { background: var(--ink); color: #fff; }
.btn.line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.btn.line:hover { background: var(--ink); color: #fff; }
.btns { display: flex; flex-wrap: wrap; gap: 14px; }

/* Side rail */
.rail { position: fixed; inset: 0 auto 0 0; width: var(--rail); z-index: 100; background: #fff; box-shadow: 0 0 13px rgba(0, 0, 0, .17); display: flex; flex-direction: column; align-items: center; padding: 10px 0 18px; }
.mark { width: 40px; height: 40px; border: 1px solid var(--ink); display: grid; place-items: center; color: var(--ink); font-weight: 600; font-size: 15px; text-decoration: none; }
.toggle { width: 40px; height: 40px; margin-top: 14px; padding: 0 5px; border: 1px solid var(--ink); background: none; display: grid; gap: 6px; align-content: center; }
.toggle span { height: 2px; background: var(--ink); transition: transform .3s, width .3s, opacity .3s; }
.toggle span:nth-child(2) { width: 75%; }
.toggle span:nth-child(3) { width: 50%; }
.toggle[aria-expanded=true] span { width: 100%; }
.toggle[aria-expanded=true] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.toggle[aria-expanded=true] span:nth-child(2) { opacity: 0; }
.toggle[aria-expanded=true] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
.social { margin-top: auto; display: grid; gap: 4px; }
.social a { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); font-size: 17px; transition: background .25s, color .25s; }
.social a:hover { background: var(--ink); color: #fff; }

.menu { position: fixed; inset: 0 auto 0 var(--rail); width: 190px; background: #fff; box-shadow: 6px 0 14px -4px rgba(0, 0, 0, .16); display: flex; flex-direction: column; justify-content: center; transform: perspective(700px) rotateY(90deg); transform-origin: left; opacity: 0; visibility: hidden; transition: transform .3s, opacity .3s, visibility 0s .3s; }
.menu.open { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
.menu a { display: flex; align-items: center; gap: 14px; padding: 13px 22px; color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 500; }
.menu a .i { font-size: 18px; }
.menu a:hover, .menu a.active { color: var(--teal-ink); background: var(--tint); }

/* Hero */
.hero { background: var(--hero); min-height: 100vh; min-height: 100svh; display: grid; align-items: center; padding: 60px 0; overflow: hidden; }
.hero .container { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.hello { color: var(--ink); font-size: 15px; font-weight: 500; letter-spacing: 3px; text-transform: uppercase; margin-bottom: 18px; }
.hero h1 { font-size: clamp(38px, 5vw, 68px); font-weight: 600; letter-spacing: 1px; line-height: 1.06; margin-bottom: 22px; }
.role { color: var(--ink); font-size: 17px; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 22px; min-height: 1.8em; }
.role b { font-weight: 500; background: var(--teal); color: #10201f; padding: 2px 8px; white-space: nowrap; }
.role b::after { content: "|"; margin-left: 3px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.lede { color: #42464d; max-width: 470px; margin-bottom: 34px; font-size: 16px; }
.scene { position: relative; width: 100%; max-width: 560px; margin-inline: auto; }
.scene > img { width: 100%; }
.scene li, .years { position: absolute; background: #fff; color: var(--ink); border-radius: 4px; box-shadow: 0 8px 22px -6px rgba(30, 38, 55, .35); animation: drift 5s ease-in-out infinite alternate; }
.scene li { padding: 8px 16px; font-size: 15px; font-weight: 500; border-left: 3px solid var(--teal); }
.scene li:nth-child(1) { left: 8%; top: 10%; }
.scene li:nth-child(2) { right: 8%; top: 7%; animation-delay: -1s; }
.scene li:nth-child(3) { left: 0; top: 36%; animation-delay: -2s; }
.scene li:nth-child(4) { right: 0; top: 30%; animation-delay: -3s; }
.scene li:nth-child(5) { right: 2%; top: 52%; animation-delay: -4s; }
.years { left: 50%; bottom: 1%; translate: -50% 0; padding: 10px 20px; font-size: 14px; white-space: nowrap; animation: none; background: var(--ink); color: #fff; }
.years b { color: var(--teal); font-size: 19px; font-weight: 600; margin-right: 4px; }
@keyframes drift { from { transform: translateY(-5px); } to { transform: translateY(6px); } }

/* About */
.about { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 56px; align-items: stretch; }
.facts { background: #22252b; color: #d6dae1; padding: 44px 38px; display: flex; flex-direction: column; gap: 30px; }
.facts h3 { color: #fff; font-size: 24px; font-weight: 600; padding-bottom: 18px; border-bottom: 2px solid var(--teal); }
.facts dt { color: var(--teal); font-size: 13px; font-weight: 500; }
.facts dd { color: #fff; margin-bottom: 22px; }
.facts dd:last-child { margin: 0; }
.about h2 { font-size: 32px; font-weight: 700; margin: 4px 0 20px; }
.about .copy p + p { margin-top: 14px; }
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 32px; margin: 34px 0; }
.feature { display: grid; grid-template-columns: 46px 1fr; gap: 18px; }
.feature .ic, .ci .ic { display: grid; place-items: center; }
.feature .ic { width: 46px; height: 46px; border-radius: 4px; background: var(--ink); color: #fff; font-size: 21px; }
.feature h3 { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.feature p { font-size: 14px; }

/* Counters */
.counters { background: var(--teal-deep); padding: 72px 0; }
.counters ul { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; text-align: center; }
.counters strong { display: block; color: #fff; font-size: 42px; line-height: 1.1; margin-bottom: 14px; font-variant-numeric: tabular-nums; }
.counters span { display: inline-block; color: #fff; background: rgba(0, 0, 0, .18); padding: 6px 10px; font-size: 13px; white-space: nowrap; }

/* Resume */
.resume { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 34px; align-items: start; }
.credentials { background: #fff; box-shadow: var(--shadow); padding: 32px; position: sticky; top: 24px; }
.credentials h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.credentials p, .credentials ul { margin-bottom: 24px; }
.credentials ul { margin-bottom: 0; }
.jobs { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; align-items: start; }
.col { display: grid; gap: 34px; position: relative; }
.col::before { content: ""; position: absolute; left: 22px; top: 10px; bottom: 60px; width: 2px; background: var(--line); }
.job { position: relative; margin-left: 44px; background: #fff; box-shadow: var(--shadow); padding: 46px 24px 24px 20px; margin-top: 14px; }
.job .when { position: absolute; left: -44px; top: -14px; display: flex; align-items: center; gap: 10px; background: var(--teal); color: #10201f; border: 5px solid #fff; box-shadow: var(--shadow); padding: 7px 14px 7px 12px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.job h3 { font-size: 16px; font-weight: 600; }
.job .org { color: var(--teal-ink); font-size: 14px; font-weight: 500; margin-bottom: 8px; }
.job p { font-size: 14px; }

/* Skills */
.skills { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 48px; align-items: start; }
.statement { border: 1px solid var(--line); padding: 32px; }
.statement h3 { font-size: 22px; font-weight: 600; margin-bottom: 18px; }
.groups { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 40px; }
.group h3 { font-size: 15px; font-weight: 600; padding-bottom: 8px; margin-bottom: 14px; border-bottom: 2px solid var(--line); position: relative; }
.group h3::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 44px; height: 2px; background: var(--teal); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { background: var(--tint); color: var(--ink); font-size: 13px; padding: 4px 12px; border-radius: 3px; }

/* Work slider */
.slider { display: flex; gap: 26px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 6px 22px; margin: 0 -6px; scrollbar-width: none; }
.slider::-webkit-scrollbar { display: none; }
.card { flex: 0 0 calc((100% - 52px) / 3); scroll-snap-align: start; scroll-margin-left: 6px; background: #fff; box-shadow: var(--shadow); padding: 9px; display: flex; flex-direction: column; text-align: center; border: 0; color: inherit; }
.cover { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #eef0f5; }
.cover img { width: 100%; height: 100%; object-fit: cover; object-position: left top; transition: transform .5s; }
.card:hover .cover img { transform: scale(1.04); }
.cover .open { position: absolute; inset: auto 0 0; background: rgba(41, 41, 41, .82); color: #fff; font-size: 14px; font-weight: 500; padding: 12px; transform: translateY(100%); transition: transform .3s; }
.card:hover .open, .card:focus-visible .open { transform: none; }
.cover.type { color: #fff; padding: 26px; display: flex; flex-direction: column; justify-content: flex-end; text-align: left; }
.cover.type .i { font-size: 46px; position: absolute; left: 26px; top: 26px; stroke-width: 1.4; }
.cover.type b { font-size: 25px; font-weight: 600; line-height: 1.2; }
.cover.type small { font-size: 14px; margin-top: 6px; }
.c-school { background: #2d4f8a; }
.c-home { background: #8a3f52; }
.card .info { display: flex; flex-direction: column; padding: 20px 12px 16px; flex: 1; }
.card .name { color: var(--ink); font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.card .sum { font-size: 14px; }
.card .stack { color: var(--teal-ink); font-size: 13px; font-weight: 500; margin-top: auto; padding-top: 10px; }
.slidenav { display: flex; align-items: center; justify-content: center; gap: 18px; }
.slidenav button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--ink); background: none; color: var(--ink); font-size: 19px; display: grid; place-items: center; transition: background .25s, color .25s; }
.slidenav button:hover:not(:disabled) { background: var(--ink); color: #fff; }
.slidenav button:disabled { opacity: .3; cursor: default; }

dialog { width: min(980px, 100vw - 32px); max-height: calc(100vh - 32px); border: 0; padding: 0; background: #fff; color: var(--text); overscroll-behavior: contain; }
dialog::backdrop { background: rgba(20, 22, 28, .75); }
.dlg { padding: 36px 40px 40px; }
.dlg h3 { font-size: 27px; font-weight: 700; margin: 0 50px 14px 0; }
.dlg > p { max-width: 68ch; }
.dlg h4 { font-size: 15px; font-weight: 600; margin: 24px 0 8px; }
.ticks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 30px; }
.ticks li { padding-left: 20px; position: relative; font-size: 14px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 9px; width: 8px; height: 8px; background: var(--teal); }
.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; }
.shots img { width: 100%; border: 1px solid var(--line); }
.shots .wide { grid-column: 1 / -1; }
.note { font-size: 13px; margin-top: 14px; }
.close { position: sticky; float: right; top: 14px; margin: 14px 14px 0 0; z-index: 2; width: 44px; height: 44px; border: 0; background: var(--ink); color: #fff; font-size: 20px; display: grid; place-items: center; }
.dlg .btn { margin-top: 24px; }

/* Client work */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.filters button { border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 9px 18px; border-radius: 3px; font-size: 14px; }
.filters button:hover { border-color: var(--ink); }
.filters [aria-pressed=true] { background: var(--teal); border-color: var(--teal); color: #10201f; font-weight: 500; }
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.proj { box-shadow: var(--shadow); padding: 26px; background: #fff; }
.proj[hidden] { display: none; }
.proj h3 { font-size: 17px; font-weight: 600; margin-bottom: 2px; }
.proj .org { color: var(--teal-ink); font-size: 13px; font-weight: 500; margin-bottom: 10px; }
.proj p { font-size: 14px; }

/* Contact */
.contact { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 34px; }
.panel { border: 1px solid var(--line); background: #fff; padding: 32px; }
.ci { display: grid; grid-template-columns: 40px 1fr; gap: 16px; align-items: center; }
.ci + .ci { margin-top: 24px; }
.ci .ic { width: 40px; height: 40px; border-radius: 50%; background: var(--teal); color: #10201f; font-size: 19px; }
.ci span { display: block; font-size: 14px; }
.ci a, .ci b { color: var(--ink); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.ci a:hover { color: var(--teal-ink); }
form h3 { font-size: 20px; font-weight: 600; margin-bottom: 20px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 28px; margin-bottom: 26px; }
.fields .full { grid-column: 1 / -1; }
.fields label { color: var(--ink); font-size: 14px; display: block; }
.fields input, .fields textarea { width: 100%; border: 0; border-bottom: 1px solid #8b8b95; background: none; font: inherit; color: var(--ink); padding: 8px 0; border-radius: 0; resize: vertical; }
.fields :is(input, textarea):focus { outline: 0; border-color: var(--teal-ink); box-shadow: 0 1px 0 var(--teal-ink); }

.footer { background: #141414; color: #b9b9bf; text-align: center; padding: 60px 24px; }
.footer .name { color: #fff; font-size: 27px; font-weight: 700; }
.footer .social { display: flex; justify-content: center; margin: 16px 0; }
.footer .social a { color: #d5d5da; }
.footer :focus-visible { outline-color: var(--teal); }

@media (max-width: 1080px) {
  .about { grid-template-columns: 300px minmax(0, 1fr); gap: 36px; }
  .features, .groups { grid-template-columns: 1fr; }
  .resume, .skills, .contact { grid-template-columns: 1fr; }
  .credentials { position: static; }
  .card { flex-basis: calc((100% - 26px) / 2); }
  .projects { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .hero .container, .about { grid-template-columns: 1fr; }
  .scene { max-width: 460px; }
  .jobs { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  html { scroll-padding-top: 60px; }
  body { padding: 60px 0 0; }
  .rail { inset: 0 0 auto 0; width: 100%; height: 60px; flex-direction: row; justify-content: space-between; padding: 0 16px; }
  .rail .social { display: none; }
  .toggle { margin: 0; }
  .menu { inset: 60px 0 auto 0; width: 100%; transform: perspective(700px) rotateX(-90deg); transform-origin: top; padding: 8px 0; }
  .section { padding: 60px 0; }
  .scene li { padding: 5px 10px; font-size: 13px; }
  .years { bottom: -5%; padding: 5px 14px; font-size: 13px; }
  .years b { font-size: 16px; }
  .hero { min-height: 0; padding: 56px 0; }
  .title { margin-bottom: 36px; }
  .title h2, .about h2 { font-size: 28px; }
  .hello, .role { letter-spacing: 1.5px; font-size: 14px; }
  .counters ul { grid-template-columns: 1fr 1fr; }
  .card { flex-basis: 88%; }
  .projects, .fields, .ticks, .shots { grid-template-columns: 1fr; }
  .dlg { padding: 24px 20px 28px; }
  .panel, .statement, .credentials { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
