/* Desktop custom cursor */
@media (hover: hover) and (pointer: fine) {
  html,
  body,
  body * {
    cursor: none !important;
  }
}

/* Tablet */
@media (max-width: 1100px) {
  :root {
    --side-padding: 28px;
    --ticker-height: 48px;
  }

  .site_menu a { font-size: 42px; }
  .hero_intro { padding: 80px var(--side-padding) 22px; }
  .hero_intro h1 { font-size: 72px; }
  .intro_arrow { width: 82px; font-size: 38px; }
  .project_count strong { font-size: 48px; }
  .featured_header h2 { font-size: 36px; }
  .featured_card { width: 210px; }
  .featured_card h3 { font-size: 24px; }
  .projects_header h2 { font-size: 82px; }
  .about_section h2 { font-size: clamp(72px, 9vw, 96px); }
  .about_layout {
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.9fr);
    gap: 42px;
  }
  .about_text > p { font-size: 21px; }
  .category_header h3 { font-size: 48px; }
  .project_info h3 { font-size: 30px; }
  .contact_section > a { font-size: 135px; }
  .project_modal_layout {
    grid-template-columns: 1fr;
    gap: 34px;
  }
  .project_modal { width: min(760px, 100vw); }
}

/* Short desktop screens */
@media (max-height: 760px) and (min-width: 641px) {
  .landing_section { min-height: min(560px, 100svh); }
  .hero_intro { padding-top: 68px; padding-bottom: 16px; }
  .hero_intro h1 { font-size: 68px; }
  .intro_footer { font-size: 9px; }
  .featured_projects { padding-top: 62px; padding-bottom: 12px; gap: 8px; }
  .featured_header { padding-bottom: 7px; }
  .featured_header h2 { font-size: 36px; }
  .featured_header > p:last-child { display: none; }
  .featured_card h3 { font-size: 22px; }
  .ticker_track span { font-size: 18px; }
}

/* Tablet portrait and compact windows */
@media (max-width: 900px) {
  .landing_section {
    height: auto;
    display: block;
    overflow: visible;
  }
  .landing_content {
    height: auto;
    display: block;
    overflow: visible;
  }
  .hero_intro {
    min-height: min(720px, 100svh);
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .hero_intro h1 {
    max-width: 720px;
    font-size: clamp(72px, 12vw, 106px);
  }
  .intro_footer {
    grid-template-columns: 1fr auto auto;
  }
  .featured_projects {
    height: auto;
    min-height: 820px;
    padding-top: 76px;
  }
  .featured_grid { min-height: 680px; }
  .featured_card { width: clamp(210px, 31vw, 260px); }
  .projects_header { display: block; }
  .category_links {
    justify-content: flex-start;
    overflow-x: auto;
    margin-top: 24px;
    padding-bottom: 6px;
  }
  .about_layout {
    grid-template-columns: 1fr;
    gap: 34px;
  }
  .about_section h2 { max-width: 760px; }
  .contact_section > a { font-size: clamp(86px, 17vw, 138px); }
}

/* Mobile */
@media (max-width: 640px) {
  :root {
    --side-padding: 18px;
    --ticker-height: 42px;
  }

  .custom_cursor { display: none; }
  .site_header { grid-template-columns: 1fr auto; }
  .header_info { display: none; }
  .site_menu {
    right: var(--side-padding);
    max-width: calc(100vw - (var(--side-padding) * 2));
  }
  .site_menu a {
    font-size: clamp(34px, 12vw, 48px);
    line-height: 1.08;
  }
  .landing_section {
    height: auto;
    display: block;
    overflow: visible;
  }
  .landing_content {
    height: auto;
    display: block;
    overflow: visible;
  }
  .hero_intro {
    height: auto;
    min-height: 700px;
    padding: 110px var(--side-padding) 24px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .hero_intro h1 { font-size: 19vw; line-height: 0.92; }
  .featured_projects {
    height: auto;
    min-height: 900px;
    padding-top: 84px;
  }
  .featured_grid { min-height: 780px; }
  .featured_card { width: 48vw; }
  .featured_card:nth-child(1) { left: 3%; top: 4%; }
  .featured_card:nth-child(2) { right: 3%; top: 26%; }
  .featured_card:nth-child(3) { left: 5%; bottom: 22%; }
  .featured_card:nth-child(4) { right: 4%; bottom: 3%; }
  .project_sections { padding-top: 70px; }
  .projects_header h2 { font-size: 58px; }
  .category_links {
    margin-top: 25px;
    padding-bottom: 6px;
  }
  .category_section { padding-top: 60px; padding-bottom: 60px; }
  .category_header { grid-template-columns: 1fr auto; }
  .category_header h3 { font-size: 42px; }
  .category_header p { grid-column: 1 / 3; }
  .project_slider.slider_fallback .project_grid { grid-template-columns: 1fr; }
  .project_preview { aspect-ratio: 16 / 9; }
  .about_section { padding-top: 54px; padding-bottom: 54px; }
  .about_layout {
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 20px;
  }
  .about_section h2 { font-size: clamp(58px, 16vw, 82px); }
  .about_text { margin-top: 0; }
  .about_text > p { font-size: 20px; }
  .about_text dl div {
    grid-template-columns: 100px 1fr;
    font-size: 11px;
  }
  .contact_section > a { font-size: 21vw; }
  .contact_footer { gap: 12px; }
  .contact_footer span:nth-child(2) { display: none; }
  .project_modal,
  .contact_modal { padding: 24px; }
  .project_modal {
    width: 100vw;
    border-left: 0;
  }
  .project_modal_layout { margin-top: 30px; }
  .project_modal h2 { font-size: clamp(36px, 11vw, 48px); }
  .modal_details div { grid-template-columns: minmax(90px, 30%) minmax(0, 1fr); }
  .project_actions {
    flex-direction: column;
  }
  .project_info_button,
  .project_website_link {
    width: 100%;
  }
}

/* Small mobile */
@media (max-width: 520px) {
  .hero_intro h1 { font-size: 20vw; line-height: 0.94; }
  .intro_footer { grid-template-columns: auto 1fr auto; }
  .project_count { grid-column: 1; }
  .intro_footer > a:not(.intro_arrow) { grid-column: 2; justify-self: end; }
  .intro_arrow { grid-column: 3; }
  .featured_grid { min-height: 1100px; }
  .featured_card { width: 76vw; }
  .featured_card:nth-child(1) { left: 2%; top: 3%; }
  .featured_card:nth-child(2) { right: 2%; top: 27%; }
  .featured_card:nth-child(3) { left: 3%; bottom: 25%; }
  .featured_card:nth-child(4) { right: 3%; bottom: 2%; }
  .category_header { grid-template-columns: 1fr; }
  .category_header p {
    grid-column: 1;
    grid-row: 2;
  }
  .category_header i {
    grid-column: 1;
    grid-row: 3;
    text-align: left;
  }
  .modal_details div {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .contact_footer {
    flex-wrap: wrap;
  }
  .contact_footer a {
    width: 100%;
    margin-top: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .ticker_track { animation: none; }
  .reveal_on_scroll { opacity: 1; transform: none; }
}
