@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=Manrope:wght@500;600;700;800&display=swap');

:root {
  --brand: #bc4c83;
  --accent: #f18494;
  --slate: #8795a3;
  --light-slate: #b6c1cc;
  --ink: #292e32;
  --black: #101214;
  --paper: #f7f7f5;
  --surface: #eceff1;
  --surface-2: #ffffff;
  --line: #292e32;
  --shadow: #292e32;
  --muted: #606870;
  --max-width: 1440px;
}

html[data-theme='dark'] {
  --paper: #101214;
  --surface: #1c2024;
  --surface-2: #292e32;
  --line: #b6c1cc;
  --ink: #f7f7f5;
  --black: #f7f7f5;
  --shadow: #bc4c83;
  --muted: #b6c1cc;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 118px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  transition: background-color .25s ease, color .25s ease;
}
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
::selection { color: var(--paper); background: var(--brand); }

.skip-link { position: fixed; left: 16px; top: -80px; z-index: 100; padding: 10px 14px; background: var(--ink); color: var(--paper); }
.skip-link:focus { top: 16px; }

.ticker { height: 34px; overflow: hidden; background: var(--ink); color: var(--paper); border-bottom: 2px solid var(--line); font: 600 .72rem/34px 'IBM Plex Mono', monospace; letter-spacing: .1em; white-space: nowrap; }
.ticker__track { display: inline-flex; min-width: 200%; gap: 28px; animation: ticker 28s linear infinite; }
.ticker i { color: var(--accent); font-style: normal; }
.ticker b { color: var(--accent); font-weight: 600; }
@keyframes ticker { to { transform: translateX(-50%); } }

.site-header { position: sticky; top: 0; z-index: 20; min-height: 82px; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 30px; padding: 16px clamp(20px, 4vw, 64px); border-bottom: 3px solid var(--line); background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(12px); }
.brand { display: inline-flex; align-items: center; width: max-content; text-decoration: none; font-size: clamp(1.2rem, 2vw, 1.65rem); font-weight: 800; letter-spacing: -.06em; }
.brand b { color: var(--paper); background: var(--brand); padding: 1px 5px; margin-left: 4px; }
.brand em { width: 9px; height: 9px; margin: 2px 0 0 5px; background: var(--accent); }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a, .control-button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; padding: 0 15px; border: 2px solid var(--line); background: transparent; color: var(--ink); text-decoration: none; text-transform: uppercase; font: 600 .76rem/1 'IBM Plex Mono', monospace; letter-spacing: .04em; transition: .18s ease; }
.nav a:hover, .nav a:focus-visible, .control-button:hover, .control-button:focus-visible { color: var(--paper); background: var(--ink); transform: translateY(-2px); outline: none; }
.header-actions { display: flex; gap: 8px; }
.control-button { width: 46px; padding: 0; cursor: pointer; border-radius: 50%; }
.theme-icon { display: grid; place-items: center; width: 24px; height: 24px; transition: transform .35s ease; }
.theme-icon::before { content: '☾'; font: 500 1.35rem/1 Georgia, serif; transform: translateY(-1px); }
.theme-button:hover .theme-icon { transform: rotate(-18deg); }
html[data-theme='dark'] .theme-icon::before { content: '☼'; font-size: 1.25rem; transform: none; }
html[data-theme='dark'] .theme-button:hover .theme-icon { transform: rotate(28deg); }

main, footer { width: min(100%, var(--max-width)); margin: 0 auto; }
.hero { min-height: calc(100vh - 116px); display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(340px, .8fr); align-items: center; gap: clamp(32px, 7vw, 100px); padding: clamp(44px, 6vw, 84px) clamp(20px, 5vw, 80px) 48px; }
.kicker, .eyebrow { font: 600 .78rem/1.4 'IBM Plex Mono', monospace; letter-spacing: .12em; }
.kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 28px; }
.kicker > span:first-child { width: 12px; height: 12px; background: var(--brand); box-shadow: 4px 4px 0 var(--ink); }
h1, h2, h3, p { margin-top: 0; }
.hero-title { max-width: 900px; display: flex; flex-direction: column; align-items: flex-start; gap: .02em; margin-bottom: 30px; font-size: clamp(3.25rem, 6.3vw, 6.7rem); line-height: .82; letter-spacing: -.075em; font-weight: 800; }
.hero-title span, .hero-title strong, .hero-title em { display: block; }
.hero-title strong { color: transparent; font: inherit; -webkit-text-stroke: 2px var(--ink); text-stroke: 2px var(--ink); }
.hero-title em { position: relative; z-index: 0; color: var(--brand); font-style: normal; }
.hero-title em::after { content: ''; position: absolute; z-index: -1; left: -.02em; right: -.04em; bottom: .02em; height: .12em; background: var(--accent); transform: rotate(-1deg); }
.hero__intro { max-width: 700px; margin-bottom: 34px; color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.3rem); font-weight: 600; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button { display: inline-flex; align-items: center; justify-content: space-between; min-width: 220px; min-height: 54px; padding: 0 18px; border: 2px solid var(--line); text-decoration: none; font: 600 .78rem/1 'IBM Plex Mono', monospace; letter-spacing: .03em; box-shadow: 5px 5px 0 var(--shadow); transition: transform .18s ease, box-shadow .18s ease; }
.button:hover, .button:focus-visible { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--shadow); outline: none; }
.button--primary { color: #f7f7f5; background: var(--brand); }
.button--ghost { background: var(--surface-2); }
.button b { font-size: 1.15rem; }

.hero-card { position: relative; transform: rotate(1.6deg); }
.hero-card__label { position: absolute; z-index: 2; right: -12px; top: -19px; padding: 8px 14px; color: #f7f7f5; background: var(--brand); border: 2px solid var(--line); font: 600 .7rem/1 'IBM Plex Mono', monospace; letter-spacing: .12em; box-shadow: 4px 4px 0 var(--shadow); }
.hero-visual { aspect-ratio: 1 / 1; overflow: hidden; border: 3px solid var(--line); background: var(--surface-2); box-shadow: 12px 12px 0 var(--shadow); }
.hero-visual img { width: 100%; height: 100%; display: block; object-fit: cover; filter: saturate(.94) contrast(1.03); }
.hero-card__stamp { position: absolute; left: -22px; bottom: -18px; padding: 9px 14px; color: #101214; background: var(--accent); border: 2px solid var(--line); font: 600 .72rem/1 'IBM Plex Mono', monospace; transform: rotate(-3deg); }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 3px solid var(--line); }
.metrics div { display: flex; flex-direction: column; min-height: 130px; justify-content: center; padding: 22px clamp(18px, 3vw, 42px); border-right: 2px solid var(--line); }
.metrics div:last-child { border-right: 0; }
.metrics strong { font-size: clamp(2rem, 3vw, 3.4rem); line-height: 1; letter-spacing: -.06em; }
.metrics span { margin-top: 10px; color: var(--muted); font: 500 .66rem/1.45 'IBM Plex Mono', monospace; letter-spacing: .06em; }

.section { padding: clamp(82px, 10vw, 150px) clamp(20px, 5vw, 80px); border-bottom: 3px solid var(--line); }
.section-heading { display: grid; grid-template-columns: auto 1fr minmax(280px, 430px); align-items: end; gap: 24px; margin-bottom: 54px; }
.section-heading--stack { grid-template-columns: auto 1fr; }
.section-index { align-self: start; display: grid; place-items: center; width: 48px; height: 48px; color: #f7f7f5; background: var(--brand); border: 2px solid var(--line); box-shadow: 4px 4px 0 var(--shadow); font: 600 .8rem/1 'IBM Plex Mono', monospace; }
.eyebrow { margin-bottom: 12px; color: var(--brand); }
h2 { margin-bottom: 0; font-size: clamp(2.5rem, 5vw, 5.4rem); line-height: .95; letter-spacing: -.065em; }
.section-heading > p { margin: 0; color: var(--muted); font-weight: 600; }

.service-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.service-card { min-height: 320px; display: flex; flex-direction: column; padding: 28px; border: 2px solid var(--line); background: var(--surface-2); transition: transform .2s ease, box-shadow .2s ease; }
.service-card:hover { transform: translateY(-5px); box-shadow: 8px 8px 0 var(--shadow); }
.service-card--accent { background: var(--brand); color: #f7f7f5; }
.service-card__top, .service-card__bottom { display: flex; justify-content: space-between; align-items: center; }
.service-card__top { font: 500 .75rem/1 'IBM Plex Mono', monospace; }
.service-card__top i { padding: 7px 10px; border: 1px solid currentColor; font-style: normal; }
.service-card h3 { max-width: 520px; margin: 52px 0 16px; font-size: clamp(1.55rem, 3vw, 2.8rem); line-height: 1.05; letter-spacing: -.045em; }
.service-card p { max-width: 520px; margin-bottom: 30px; color: var(--muted); }
.service-card--accent p { color: #f7f7f5; }
.service-card__bottom { margin-top: auto; padding-top: 22px; border-top: 2px solid currentColor; }
.service-card__bottom strong { font: 600 1rem/1 'IBM Plex Mono', monospace; }
.service-card__bottom a { display: grid; place-items: center; width: 42px; height: 42px; color: var(--paper); background: var(--ink); border: 2px solid currentColor; text-decoration: none; font-size: 1.2rem; }
.service-card--accent .service-card__bottom a { color: var(--brand); background: #f7f7f5; }

.experience { background: var(--surface); }
.experience-layout { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(40px, 8vw, 120px); }
.timeline { border-top: 2px solid var(--line); }
.timeline-item { display: grid; grid-template-columns: 180px 1fr; gap: 24px; padding: 32px 0; border-bottom: 2px solid var(--line); }
.timeline-date { font: 500 .72rem/1.45 'IBM Plex Mono', monospace; color: var(--brand); }
.timeline-content h3 { margin-bottom: 10px; font-size: clamp(1.3rem, 2.3vw, 2rem); letter-spacing: -.035em; }
.timeline-content p { margin-bottom: 0; color: var(--muted); }
.project-list { align-self: start; position: sticky; top: 130px; border: 2px solid var(--line); background: var(--paper); box-shadow: 9px 9px 0 var(--shadow); transform: rotate(-.7deg); }
.project-list > p { margin: 0; padding: 22px; border-bottom: 2px solid var(--line); }
.project-list a { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 20px; padding: 20px 22px; border-bottom: 1px solid var(--line); text-decoration: none; transition: background .18s ease, color .18s ease; }
.project-list a:last-child { border-bottom: 0; }
.project-list a:hover, .project-list a:focus-visible { color: #f7f7f5; background: var(--brand); outline: none; }
.project-list a span { display: flex; flex-direction: column; gap: 4px; }
.project-list a small { font: 500 .66rem/1 'IBM Plex Mono', monospace; color: var(--muted); }
.project-list a:hover small { color: #f7f7f5; }
.project-list a i { font-style: normal; font-size: 1.25rem; }

.interlude { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 22px; padding: 20px clamp(20px, 5vw, 80px); color: var(--muted); background: var(--paper); border-bottom: 3px solid var(--line); }
.interlude span { height: 2px; background: var(--line); }
.interlude p { margin: 0; font: 600 .72rem/1.35 'IBM Plex Mono', monospace; letter-spacing: .08em; text-align: center; }

.media { padding-block: clamp(56px, 7vw, 88px); }
.media .section-heading { margin-bottom: 30px; }
.media .section-heading h2 { font-size: clamp(2.8rem, 5vw, 4.8rem); }
.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 2px solid var(--line); border-bottom: 0; }
.media-card { position: relative; min-height: 136px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; overflow: hidden; padding: 24px; border-right: 2px solid var(--line); border-bottom: 2px solid var(--line); text-decoration: none; background: var(--surface-2); transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease; }
.media-card::before { content: ''; position: absolute; inset: 0 0 auto; height: 6px; background: var(--slate); }
.media-card:nth-child(3n) { border-right: 0; }
.media-card:nth-child(2n)::before { background: var(--accent); }
.media-card:nth-child(3n)::before { background: var(--light-slate); }
.media-card:hover:not(.media-card--muted), .media-card:focus-visible { color: var(--paper); background: var(--ink); transform: translateY(-4px); box-shadow: inset 0 -6px 0 var(--accent); outline: none; }
.media-card__index { display: grid; place-items: center; width: 40px; height: 40px; border: 2px solid var(--line); background: var(--paper); box-shadow: 3px 3px 0 var(--shadow); font: 600 .72rem/1 'IBM Plex Mono', monospace; transform: rotate(-2deg); }
.media-card small { font: 500 .65rem/1 'IBM Plex Mono', monospace; letter-spacing: .08em; }
.media-card h3 { margin: 6px 0 0; font-size: clamp(1.05rem, 1.6vw, 1.45rem); letter-spacing: -.04em; }
.media-card i { font-style: normal; font-size: 1.2rem; }
.media-card--muted { color: var(--muted); background: color-mix(in srgb, var(--surface) 82%, var(--paper)); }
.contact { display: grid; grid-template-columns: 1fr minmax(320px, .7fr); gap: clamp(40px, 8vw, 120px); align-items: center; padding: clamp(90px, 12vw, 170px) clamp(20px, 5vw, 80px); color: #f7f7f5; background: #292e32; border-bottom: 3px solid #f7f7f5; }
.contact-title { max-width: 850px; display: flex; flex-direction: column; align-items: flex-start; font-size: clamp(3rem, 6vw, 6.5rem); line-height: .82; }
.contact-title span, .contact-title strong { display: block; }
.contact-title strong { color: transparent; font: inherit; -webkit-text-stroke: 2px #f7f7f5; text-stroke: 2px #f7f7f5; }
.contact__copy > p:last-child { max-width: 650px; margin: 28px 0 0; color: #b6c1cc; }
.contact__button { position: relative; min-height: 220px; display: flex; flex-direction: column; justify-content: center; padding: 34px; color: #101214; background: #f18494; border: 3px solid #f7f7f5; box-shadow: 12px 12px 0 #bc4c83; text-decoration: none; transform: rotate(1.5deg); transition: transform .2s ease, box-shadow .2s ease; }
.contact__button:hover, .contact__button:focus-visible { transform: translate(5px, 5px) rotate(0); box-shadow: 5px 5px 0 #bc4c83; outline: none; }
.contact__button small { font: 600 .72rem/1 'IBM Plex Mono', monospace; }
.contact__button strong { margin-top: 16px; font-size: clamp(2rem, 4vw, 4rem); letter-spacing: -.06em; }
.contact__button span { position: absolute; right: 24px; bottom: 18px; font-size: 2rem; }

footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 28px clamp(20px, 5vw, 80px); color: #f7f7f5; background: #292e32; font: 500 .68rem/1.4 'IBM Plex Mono', monospace; letter-spacing: .06em; }
footer a { text-decoration: none; }

.reveal { opacity: 0; transform: translateY(20px); transition: opacity .55s ease, transform .55s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.hero-card.reveal.visible { transform: rotate(1.6deg); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

@media (max-width: 980px) {
  .site-header { grid-template-columns: 1fr auto; }
  .nav { grid-column: 1 / -1; order: 3; overflow-x: auto; padding-bottom: 2px; }
  .nav a { flex: 1 0 auto; }
  .hero { min-height: auto; grid-template-columns: 1fr; padding-top: 70px; }
  .hero-card { max-width: 620px; margin: 22px auto 16px; width: 90%; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metrics div:nth-child(2) { border-right: 0; }
  .metrics div:nth-child(-n+2) { border-bottom: 2px solid var(--line); }
  .section-heading { grid-template-columns: auto 1fr; }
  .section-heading > p { grid-column: 2; }
  .experience-layout { grid-template-columns: 1fr; }
  .project-list { position: static; }
  .media-grid { grid-template-columns: repeat(2, 1fr); }
  .media-card:nth-child(3n) { border-right: 2px solid var(--line); }
  .media-card:nth-child(2n) { border-right: 0; }
  .contact { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .site-header { gap: 14px; padding-inline: 16px; }
  .brand { font-size: 1.15rem; }
  .header-actions { gap: 5px; }
  .control-button { width: 40px; min-height: 40px; }
  .nav { margin-inline: -16px; padding: 10px 16px 0; border-top: 1px solid var(--line); }
  .nav a { min-height: 38px; padding-inline: 12px; font-size: .68rem; }
  h1 { font-size: clamp(3rem, 15vw, 5rem); }
  .hero { padding-inline: 18px; overflow: hidden; }
  .hero__actions { flex-direction: column; }
  .button { width: 100%; }
  .hero-card { width: calc(100% - 16px); transform: rotate(.8deg); }
  .metrics div { min-height: 110px; padding: 18px; }
  .section { padding-inline: 18px; }
  .section-heading { grid-template-columns: 1fr; }
  .section-heading > p { grid-column: auto; }
  .service-grid { grid-template-columns: 1fr; }
  .service-card { min-height: 300px; }
  .timeline-item { grid-template-columns: 1fr; gap: 10px; }
  .media-grid { grid-template-columns: 1fr; }
  .media-card, .media-card:nth-child(2n), .media-card:nth-child(3n) { border-right: 0; }
  .contact { padding-inline: 18px; }
  .contact__button { min-height: 180px; }
  footer { align-items: flex-start; flex-direction: column; }
}
