/* Local fonts load directly in Live Server and are bundled by Vite for release. */
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('../assets/fonts/inter-latin-wght-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Fira Code Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 300 700;
  src: url('../assets/fonts/fira-code-latin-wght-normal.woff2') format('woff2');
}

/* CRUFT design tokens — change the shared palette and typography here. */
:root {
  color-scheme: dark;
  --color-background: #111111;
  --color-surface: #171a18;
  --color-text: #f5f4ed;
  --color-muted: #bbbfbc;
  --color-mint: #28f196;
  --color-pink: #f12883;
  --color-divider: #24493b;
  --font-display: 'Inter Variable', Arial, sans-serif;
  --font-mono: 'Fira Code Variable', monospace;
  --page-width: 1288px;
  --page-gutter: clamp(24px, 5.3vw, 76px);
}

/* Small reset; native semantic elements retain responsibility for behavior. */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 32px; }
body { margin: 0; background: var(--color-background); color: var(--color-text); font-family: var(--font-mono); -webkit-font-smoothing: antialiased; }
body.dialog-is-open { overflow: hidden; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
::selection { background: var(--color-mint); color: var(--color-background); }
:focus-visible { outline: 2px solid var(--color-mint); outline-offset: 7px; }
[hidden] { display: none !important; }
.accent-text { color: var(--color-mint); }
.page-shell { max-width: calc(var(--page-width) + var(--page-gutter) * 2); padding-inline: var(--page-gutter); margin-inline: auto; }
.skip-link { position: fixed; left: 20px; top: -100px; z-index: 20; padding: 14px 20px; background: var(--color-mint); color: #111; }
.skip-link:focus { top: 20px; }

/* Official Remix Icon files take their color from the surrounding text. */
.icon { display: inline-block; width: 1.5em; height: 1.5em; flex: 0 0 auto; background: currentColor; mask: var(--icon-source) center / contain no-repeat; }
.icon-arrow-up-right { --icon-source: url('../assets/icons/arrow-right-up-line.svg'); }
.icon-close { --icon-source: url('../assets/icons/close-line.svg'); }

/* Shared wordmark and navigation, including the temporarily hidden header links. */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding-top: 60px; }
.brand-link { display: inline-flex; flex-shrink: 0; }
.brand-logo { width: 122px; height: auto; }
.primary-navigation, .footer-navigation { display: flex; align-items: center; font-size: 18px; color: var(--color-mint); }
.navigation-link { padding-block: 10px; transition: color 160ms ease; }
.navigation-link:hover { color: var(--color-text); }
.navigation-link-contact { border: 1px solid var(--color-mint); padding: 13px 24px; }
.navigation-link-contact:hover { background: var(--color-mint); color: var(--color-background); }

/* Hero typography and controls; responsive spacing lives in minimal.css. */
.hero-title-row { display: flex; align-items: flex-end; position: relative; }
.hero-heading { font-family: var(--font-display); font-weight: 850; letter-spacing: -0.057em; }
.hero-heading-line { display: block; }
.hero-description { letter-spacing: .01em; }
/* Each neon button fades its own text without collapsing the layout.
   Reduced-motion preferences disable these transitions below. */
.hero-heading, .hero-description, .services-ticker, .about-description {
  transition: opacity 360ms ease;
}
.hero-text-is-hidden .hero-heading,
.hero-text-is-hidden .hero-description,
.about-text-is-hidden .services-ticker,
.about-text-is-hidden .about-description { opacity: 0; }
.hero-actions { display: flex; align-items: center; gap: 54px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 18px; border: 0; padding: 22px 34px; min-height: 64px; font-size: 20px; font-weight: 500; letter-spacing: -.02em; transition: background 160ms ease, transform 160ms ease; }
.button-primary { background: var(--color-pink); color: var(--color-background); }
.button-primary:hover { background: #71ffbb; transform: translateY(-2px); }
.button-primary:focus-visible { outline-color: var(--color-text); }
.button-primary .icon { width: 1.35em; height: 1.35em; }
.text-link { display: inline-flex; align-items: center; gap: 13px; padding: 6px 0; background: none; border: 0; border-bottom: 1px solid currentColor; color: var(--color-mint); font-size: 18px; line-height: 1.6; transition: color 160ms ease; }
.text-link:hover { color: var(--color-text); }

/* The generated mark includes transparent padding. This frame reveals only
   its artwork bounds, preserving the asset's actual shape and proportions. */
.hero-accent { position: absolute; aspect-ratio: 451 / 410; overflow: hidden; }
.hero-accent-image { position: absolute; max-width: none; width: 256.54%; height: 331.7%; left: -78.05%; top: -119.51%; }

/* Apply the neon glow to the cropped frame, so its overflow clipping does not
   cut off the halo. Both pages reuse the original pink slash artwork. */
.hero-accent, .thank-you-accent {
  filter: brightness(1.1)
    drop-shadow(0 0 2px rgb(255 174 211 / .9))
    drop-shadow(0 0 6px var(--color-pink))
    drop-shadow(0 0 14px rgb(241 40 131 / .65));
}

/* The inner frame keeps the asset crop intact; the button lets its glow and
   focus ring extend beyond the artwork. Use the original alpha for mint too. */
.hero-neon-button { padding: 0; border: 0; background: transparent; overflow: visible; transition: filter 220ms ease; }
.hero-accent-frame { position: absolute; inset: 0; overflow: hidden; }
.hero-neon-button[aria-pressed="true"] {
  filter: drop-shadow(0 0 3px var(--color-mint))
    drop-shadow(0 0 12px var(--color-mint))
    drop-shadow(0 0 24px rgb(40 241 150 / .55));
}
/* A mask recolours the existing raster without the dimming caused by hue
   rotation. Its crop matches the original image, and its fill matches the ring. */
.hero-neon-button[aria-pressed="true"] .hero-accent-image { visibility: hidden; }
.hero-neon-button[aria-pressed="true"] .hero-accent-frame::before {
  content: ''; position: absolute; width: 256.54%; height: 331.7%;
  left: -78.05%; top: -119.51%; background: var(--color-mint);
  mask: url('../assets/pink-slashes.png') center / 100% 100% no-repeat;
}
/* Expand the transparent touch area without enlarging the visible slashes. */
.hero-neon-button::after { content: ''; position: absolute; inset: -8px; }
.hero-neon-button:focus-visible { outline: 2px solid var(--color-text); outline-offset: 8px; }

/* Selected work uses flat previews, open captions and lightweight rules. */
.section-heading-row { display: flex; align-items: center; gap: 24px; margin-bottom: 52px; }
.section-heading-row::after { content: ''; height: 1px; background: var(--color-divider); flex: 1; }
.section-eyebrow { color: var(--color-mint); font-family: var(--font-mono); font-weight: 400; font-size: 18px; line-height: 1.5; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px; }
.project-link { display: block; }
.project-image-frame { overflow: hidden; background: var(--color-surface); aspect-ratio: 1.27; }
.project-image { width: 100%; height: 100%; object-fit: cover; transition: transform 350ms ease; }
.project-link:hover .project-image { transform: scale(1.018); }
.project-caption { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; }
.project-title { font-family: var(--font-mono); font-size: 23px; line-height: 1.6; font-weight: 400; letter-spacing: -.045em; }
.project-caption .icon { color: var(--color-mint); font-size: 21px; transition: transform 160ms ease; }
.project-link:hover .project-caption .icon { transform: translate(2px, -2px); }
.project-fallback-details { margin-top: 22px; font-size: 16px; line-height: 1.8; }
html[data-enhanced] .project-fallback-details { display: none; }

/* About typography; list and copy layout lives in minimal.css. */
.about-section { display: grid; }
.about-heading { font-family: var(--font-display); font-weight: 800; letter-spacing: -.055em; }
.footer-navigation { font-size: 16px; }
.footer-navigation .text-link { font-size: inherit; }
.no-script-contact { margin-top: 24px; line-height: 1.8; }

/* Modal content extends the design without introducing additional page routes. */
.content-dialog { border: 1px solid var(--color-divider); padding: 0; background: var(--color-background); color: var(--color-text); width: min(760px, calc(100% - 40px)); max-height: calc(100dvh - 48px); margin: auto; }
.content-dialog::backdrop { background: rgb(0 0 0 / .78); backdrop-filter: blur(5px); }
/* Keep the native modal and its backdrop in the top layer during both fades. */
.content-dialog[open] { animation: dialog-enter 260ms cubic-bezier(.2, .8, .2, 1) both; }
.content-dialog[open]::backdrop { animation: backdrop-enter 260ms ease both; }
.content-dialog[open].is-closing { animation: dialog-leave 180ms ease-in both; }
.content-dialog[open].is-closing::backdrop { animation: backdrop-leave 180ms ease-in both; }
@keyframes dialog-enter {
  from { opacity: 0; transform: translateY(16px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes dialog-leave {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(10px) scale(.98); }
}
@keyframes backdrop-enter { from { opacity: 0; } to { opacity: 1; } }
@keyframes backdrop-leave { from { opacity: 1; } to { opacity: 0; } }
.dialog-shell { padding: 42px; }
.dialog-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 27px; gap: 20px; }
.dialog-close { display: inline-grid; place-items: center; padding: 10px; width: 44px; height: 44px; background: transparent; border: 1px solid var(--color-divider); color: var(--color-mint); flex: 0 0 auto; }
.dialog-close:hover { border-color: var(--color-mint); }
.dialog-heading { font-family: var(--font-display); font-size: 48px; line-height: 1.05; letter-spacing: -.045em; font-weight: 800; }
.dialog-introduction, .about-biography, .project-dialog-description { margin-top: 24px; font-size: 16px; line-height: 1.8; color: var(--color-muted); }
.about-biography { margin-bottom: 32px; }
.about-biography p + p { margin-top: 18px; }
.contact-form { margin-top: 30px; }
.contact-field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.form-field { margin-bottom: 23px; }
.field-label { display: block; font-size: 14px; margin-bottom: 10px; }
.required-indicator { color: var(--color-mint); }
.optional-label { color: var(--color-muted); font-size: 12px; }
.form-field input, .form-field textarea { width: 100%; border: 1px solid #4a5550; padding: 13px 15px; background: var(--color-surface); color: var(--color-text); font-size: 15px; border-radius: 0; }
.form-field input { min-height: 48px; }
.form-field textarea { resize: vertical; min-height: 125px; }
.form-field input::placeholder, .form-field textarea::placeholder { color: #9ca69f; }
.form-field input:focus-visible, .form-field textarea:focus-visible { outline-offset: 3px; border-color: var(--color-mint); }
.form-honeypot { display: none; }
.form-submit { font-size: 16px; padding: 16px 24px; min-height: 54px; }
.form-privacy-note, .form-status, .project-image-note { font-size: 12px; line-height: 1.7; margin-top: 16px; color: var(--color-muted); }
.form-status:empty { display: none; }
.form-status { color: var(--color-mint); }
.project-dialog { width: min(900px, calc(100% - 40px)); }
.project-dialog-image { margin-top: 30px; width: 100%; height: auto; }
.project-dialog-tools { color: var(--color-mint); font-size: 14px; line-height: 1.7; margin-top: 15px; }
.project-dialog .text-link { margin-top: 24px; }

/* Tablet scales spacing and type together while keeping the editorial layout. */
@media (max-width: 1100px) {
  .site-header { padding-top: 42px; }
  .brand-logo { width: 90px; }
  .primary-navigation { font-size: 14px; }
  .navigation-link-contact { padding: 10px 18px; }
  .hero-heading { transform: translateX(-.05em); }
  .hero-actions { gap: 38px; }
  .button { font-size: 14px; padding: 16px 24px; min-height: 54px; }
  .text-link { font-size: 14px; }
  .section-eyebrow { font-size: 14px; }
  .section-heading-row { margin-bottom: 34px; }
  .project-grid { gap: 24px; }
  .project-title { font-size: 18px; }
  .project-caption .icon { font-size: 17px; }
  .footer-navigation { font-size: 13px; }
}

/* Mobile stacks previews and keeps the two header links directly accessible. */
@media (max-width: 650px) {
  .site-header { flex-wrap: nowrap; padding-top: 28px; gap: 12px; }
  .brand-logo { width: 98px; }
  .primary-navigation { width: auto; font-size: 13px; flex-shrink: 0; }
  .primary-navigation .navigation-link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; white-space: nowrap; }
  .primary-navigation .navigation-link-contact { padding: 10px 13px; }
  .hero-heading { letter-spacing: -.06em; }
  .hero-description { max-width: 39ch; }
  .desktop-line-break { display: none; }
  .hero-actions { align-items: flex-start; flex-wrap: wrap; gap: 17px 26px; }
  .hero-actions .button { gap: 10px; }
  .hero-actions .text-link { margin-top: 4px; font-size: 12px; min-height: 44px; }
  .section-heading-row { gap: 16px; margin-bottom: 26px; }
  .section-eyebrow { font-size: 12px; }
  .project-grid { grid-template-columns: 1fr; gap: 33px; }
  .project-title { font-size: 16px; letter-spacing: -.04em; }
  .project-caption { padding-top: 10px; min-height: 44px; }
  .about-content .text-link { padding-block: 10px; }
  .footer-navigation { justify-content: flex-end; font-size: 12px; }
  .footer-navigation .navigation-link, .footer-navigation .text-link { min-height: 44px; }
  .content-dialog { width: calc(100% - 24px); max-height: calc(100dvh - 24px); }
  .dialog-shell { padding: 24px; }
  .dialog-heading { font-size: 32px; }
  .dialog-topbar { margin-bottom: 22px; }
  .dialog-introduction, .about-biography, .project-dialog-description { font-size: 14px; }
  .contact-field-row { grid-template-columns: 1fr; gap: 0; }
  .form-field input, .form-field textarea { font-size: 16px; }
}

/* Respect reduced-motion preferences for scrolling and hover movement. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .button-primary:hover, .project-link:hover .project-image, .project-link:hover .project-caption .icon { transform: none; }
}
