@font-face {
  font-family: Inter;
  src: url("./assets/fonts/InterVariable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
:root { --bg: #f4f8f9; --ink: #0d0d0d; --muted: rgba(13,13,13,.5); --line: #d8dddf; --content: 850px; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--ink); font-family: Inter, "Helvetica Neue", Arial, sans-serif; font-optical-sizing: none; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
h1, h2, h3, strong { font-weight: 600; }
a { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible { outline: 2px solid #526b83; outline-offset: 5px; }
::selection { background: #d9e6ec; }

/* Static fallback; canvas animates the dots themselves, without a glow layer. */
.dot-grid { position: absolute; inset: 0 0 auto; height: 900px; z-index: 0; overflow: hidden; pointer-events: none; background-image: radial-gradient(circle, rgba(80,94,98,.32) .8px, transparent 1px); background-size: 30px 30px; mask-image: linear-gradient(#000 0 52%, transparent 100%); }
.dot-grid.is-animated { background-image: none; }
.dot-grid canvas { display: block; width: 100%; height: 100%; }
.home-hero, .home-main, .case-page { position: relative; z-index: 1; }
.home-hero, .case-hero, .case-intro { animation: page-enter .65s cubic-bezier(.2,.7,.3,1) both; }
.home-hero { display: flex; flex-direction: column; align-items: center; padding-top: 170px; text-align: center; }
.home-hero__portrait { width: 190px; height: 190px; object-fit: cover; border-radius: 20px; }
.home-hero h1 { margin: 24px 16px 0; font-size: 36px; line-height: 44px; }
.home-hero > p { width: 560px; max-width: calc(100% - 32px); margin: 16px 0 0; font-size: 20px; line-height: 1.35; }
.contact-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 24px; margin-top: 24px; }
.contact-links a, .contact-links button, .button-link, .back-link { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 16px; border: 0; border-radius: 8px; background: #fff; color: var(--ink); font: inherit; font-size: 18px; line-height: 20px; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease; }
:is(.contact-links a, a.button-link, .back-link):hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(15,25,28,.07); }
:is(.contact-links a, a.button-link, .back-link):active { transform: translateY(0) scale(.98); }
.contact-links button[aria-disabled="true"] { color: #7b8386; cursor: default; }
.home-main { width: var(--content); max-width: calc(100% - 32px); margin: 120px auto 160px; }
.section-title { display: flex; justify-content: space-between; align-items: center; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.section-title h2, .section-title strong { margin: 0; font-size: 24px; line-height: 29px; }
.home-case { display: flex; flex-direction: column; gap: 32px; margin-top: 56px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.home-case:first-of-type { margin-top: 32px; padding-bottom: 0; border-bottom: 0; }
.opportunity-preview, .neural-preview, .museum-preview { display: block; width: 100%; aspect-ratio: 850 / 550; border-radius: 20px; overflow: hidden; text-decoration: none; background: transparent; }
:is(.opportunity-preview, .neural-preview, .museum-preview) > img { display: block; width: 100%; height: auto; background: transparent; transition: transform .45s cubic-bezier(.2,.7,.3,1); }
@media (hover: hover) { :is(.opportunity-preview, .neural-preview, .museum-preview):hover > img { transform: scale(1.015); } }
.project-summary { display: flex; flex-direction: column; align-items: flex-start; gap: 32px; }
.project-heading { display: flex; align-items: center; gap: 20px; min-width: 0; }
.project-heading > div { min-width: 0; }
.project-heading h3 { margin: 0 0 6px; font-size: 24px; line-height: 29px; }
.project-heading p { margin: 6px 0 0; color: var(--muted); font-size: 24px; line-height: 29px; }
.project-icon { display: block; flex: 0 0 99px; width: 99px; height: 99px; border-radius: 12px; object-fit: cover; }
.project-description { width: 100%; margin: 0; font-size: 20px; line-height: 1.35; }

.back-link { position: fixed; top: 24px; left: 24px; z-index: 10; padding: 12px 16px; background: rgba(255,255,255,.9); backdrop-filter: blur(8px); box-shadow: 0 4px 20px rgba(0,0,0,.04); }
.case-page { padding: 120px 0 180px; }
.case-hero { width: 1140px; max-width: calc(100% - 40px); aspect-ratio: 1140 / 625; margin: 0 auto 32px; border-radius: 20px; overflow: hidden; }
.case-hero__image { display: block; width: 100%; height: 100%; object-fit: cover; }
.case-intro, .case-content { width: var(--content); max-width: calc(100% - 32px); margin: 0 auto; }
.case-intro { display: flex; flex-direction: column; gap: 32px; padding-bottom: 56px; border-bottom: 1px solid var(--line); }
.case-content { display: flex; flex-direction: column; gap: 56px; padding-top: 56px; }
.case-content h1 { margin: 0; font-size: 36px; line-height: 1.22; }
.case-content section { display: flex; flex-direction: column; gap: 24px; }
.case-content h2 { margin: 0; font-size: 24px; line-height: 29px; }
.case-content p, .case-content li { margin: 0; font-size: 20px; line-height: 1.35; }
.case-content ul { margin: 0; padding-left: 30px; }
.case-content section > h2:not(:first-child) { margin-top: 32px; }
.case-media { width: 100%; aspect-ratio: 850 / 500; margin: 0; border-radius: 20px; overflow: hidden; background: transparent; }
.case-media img { display: block; width: 100%; height: auto; border-radius: inherit; }
.case-chapter { padding-top: 56px; border-top: 1px solid var(--line); }
.case-links { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; padding-top: 56px; border-top: 1px solid var(--line); }
.case-links h2 { font-size: 36px; line-height: 44px; }
.case-link-buttons { display: flex; flex-wrap: wrap; gap: 16px; }
.account-card-image { display: block; width: 100%; height: auto; aspect-ratio: 1275 / 321; border-radius: 20px; }

/* Local Tabler Icons. */
.ui-icon { display: inline-block; flex: 0 0 20px; width: 20px; height: 20px; background: currentColor; mask: var(--icon) center / contain no-repeat; }
.icon-telegram { --icon: url("./assets/icons/brand-telegram.svg"); }
.icon-mail { --icon: url("./assets/icons/mail.svg"); }
.icon-resume { --icon: url("./assets/icons/file-text.svg"); }
.icon-arrow-right { --icon: url("./assets/icons/arrow-right.svg"); }
.icon-arrow-left { --icon: url("./assets/icons/arrow-left.svg"); }
.icon-world { --icon: url("./assets/icons/world-www.svg"); }
.icon-figma { --icon: url("./assets/icons/brand-figma.svg"); }
.icon-lock { --icon: url("./assets/icons/lock.svg"); }
.icon-external { --icon: url("./assets/icons/external-link.svg"); }
.button-link .icon-arrow-right, .back-link .icon-arrow-left { transition: transform .2s ease; }
a.button-link:hover .icon-arrow-right { transform: translateX(3px); }
.back-link:hover .icon-arrow-left { transform: translateX(-3px); }
.reveal-pending { opacity: 0; transform: translateY(16px); }
.reveal-visible { opacity: 1; transform: none; transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.3,1); }
@keyframes page-enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
  .home-hero { padding-top: 96px; }
  .home-main { margin-top: 88px; margin-bottom: 100px; }
  .project-heading p { font-size: 20px; line-height: 27px; }
  .case-page { padding-top: 88px; }
  .back-link { top: 12px; left: 12px; }
}
@media (max-width: 600px) {
  .dot-grid { height: 680px; }
  .home-hero { padding-top: 72px; }
  .home-hero__portrait { width: 150px; height: 150px; border-radius: 16px; }
  .home-hero h1 { font-size: 28px; line-height: 35px; }
  .home-hero > p { max-width: calc(100% - 40px); font-size: 17px; }
  .contact-links { gap: 8px; }
  .contact-links a, .contact-links button, .button-link { padding: 12px; font-size: 14px; }
  .contact-links .ui-icon { flex-basis: 18px; width: 18px; height: 18px; }
  .home-main { margin-top: 72px; margin-bottom: 80px; }
  .section-title h2, .section-title strong { font-size: 24px; }
  .home-case { margin-top: 40px; gap: 24px; }
  .project-heading { gap: 14px; align-items: flex-start; }
  .project-icon { flex-basis: 64px; width: 64px; height: 64px; border-radius: 10px; }
  .project-heading h3 { font-size: 20px; line-height: 25px; margin-bottom: 4px; }
  .project-heading p { margin-top: 4px; font-size: 15px; line-height: 20px; }
  .project-summary { gap: 24px; }
  .project-description, .case-content p, .case-content li { font-size: 17px; line-height: 1.45; }
  .opportunity-preview, .neural-preview, .museum-preview, .case-media, .account-card-image { border-radius: 12px; }
  .case-page { padding-bottom: 100px; }
  .case-hero { max-width: calc(100% - 32px); border-radius: 12px; margin-bottom: 24px; }
  .case-intro { gap: 24px; padding-bottom: 40px; }
  .case-content { gap: 40px; padding-top: 40px; }
  .case-content section { gap: 18px; }
  .case-content h1, .case-links h2 { font-size: 28px; line-height: 1.22; }
  .case-content h2 { font-size: 21px; line-height: 27px; }
  .case-content section > h2:not(:first-child) { margin-top: 22px; }
  .case-chapter, .case-links { padding-top: 40px; }
  .back-link { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal-pending { opacity: 1; transform: none; }
}
