/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

:root {
  --ink: #171411;
  --paper: #fbf7f0;
  --muted: #766b61;
  --ruby: #b7183c;
  --ruby-dark: #78152c;
  --gold: #d8b46a;
  --forest: #1e4f46;
  --line: rgba(31, 25, 19, 0.12);
  --shadow: 0 24px 80px rgba(25, 18, 10, 0.18);
  --radius: 8px;
  --hero-y: 0px;
  --parallax-y: 0px;
}

.foliox-page {
  background:
    radial-gradient(circle at 14% 10%, rgba(0, 171, 240, 0.22), transparent 20rem),
    radial-gradient(circle at 82% 12%, rgba(0, 88, 128, 0.3), transparent 24rem),
    radial-gradient(circle at 84% 66%, rgba(0, 171, 240, 0.16), transparent 25rem),
    linear-gradient(180deg, #061923 0%, #081f2c 36%, #0d3144 54%, #061923 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.foliox-hero {
  /* Phones get the 960px image; the view preloads the matching one. */
  --hero-image: url("/assets/profile-hero-universe-960-9c3cd595.webp");
  min-height: min(100vh, 980px) !important;
  min-height: min(100svh, 980px) !important;
  background:
    linear-gradient(90deg, rgba(6, 25, 35, 0.98), rgba(7, 36, 52, 0.88), rgba(7, 36, 52, 0.5)),
    radial-gradient(circle at 8% 26%, rgba(0, 171, 240, 0.2), transparent 18rem),
    var(--hero-image) center calc(50% + var(--hero-y)) / cover no-repeat;
  isolation: isolate;
}

@media (min-width: 768px) {
  .foliox-hero {
    --hero-image: url("/assets/profile-hero-universe-1717-77be71ae.webp");
  }
}

.foliox-hero > .mx-auto.grid {
  min-height: min(calc(100vh - 92px), 850px) !important;
}

.foliox-hero::before,
.foliox-hero::after {
  position: absolute;
  content: "";
  pointer-events: none;
  z-index: 0;
}

.foliox-hero::before {
  inset: 0;
  background:
    radial-gradient(circle at 16% 38%, rgba(0, 171, 240, 0.8), transparent 0.12rem),
    radial-gradient(circle at 32% 18%, rgba(255, 255, 255, 0.45), transparent 0.11rem),
    radial-gradient(circle at 88% 20%, rgba(255, 255, 255, 0.36), transparent 0.1rem),
    repeating-linear-gradient(125deg, transparent 0 58px, rgba(255, 255, 255, 0.035) 59px 60px);
  opacity: 0.55;
  transform: translate3d(0, calc(var(--parallax-y) * 0.45), 0);
}

.foliox-hero::after {
  inset: auto 0 0;
  height: 12rem;
  background: linear-gradient(180deg, transparent, #081f2c);
}

.foliox-logo,
.foliox-hero nav,
.foliox-hero > div {
  position: relative;
  z-index: 1;
}

.nav-link:hover svg {
  color: currentColor;
}

.portrait-orbit {
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(0, 171, 240, 0.24), transparent 62%),
    conic-gradient(from 45deg, transparent, rgba(0, 171, 240, 0.52), transparent, rgba(255, 255, 255, 0.18), transparent);
  filter: blur(0.2px);
  animation: orbit-spin 18s linear infinite;
}

.portrait-orb {
  transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 180ms ease;
}

.portrait-photo {
  filter: drop-shadow(0 24px 36px rgba(0, 0, 0, 0.42));
  transform: scale(1.08) translateY(5%);
}

.about-photo {
  filter: drop-shadow(0 22px 30px rgba(0, 0, 0, 0.28));
  transform: scale(1.08) translateY(3%);
}

.code-lines span {
  display: block;
  height: 0.55rem;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(0, 171, 240, 0.92), rgba(255, 255, 255, 0.22));
}

.code-lines span:nth-child(2) {
  width: 72%;
}

.code-lines span:nth-child(3) {
  width: 52%;
}

.foliox-card,
.portfolio-tile {
  transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
}

.about-image-main {
  transform: rotate(-1.5deg);
}

.skill-bar {
  transform-origin: left center;
  animation: skill-load 1200ms ease both;
}

.tool-chip {
  position: relative;
  overflow: hidden;
}

.tool-chip::before {
  position: absolute;
  inset: -2px;
  content: "";
  background: linear-gradient(135deg, rgba(0, 171, 240, 0.96), rgba(0, 88, 128, 0.72), rgba(255, 255, 255, 0.2));
  opacity: 0;
  transform: translateX(-38%);
  transition: opacity 220ms ease, transform 420ms ease;
  z-index: -1;
}

.tool-chip:hover {
  color: #07111f;
  background: #00abf0;
  border-color: rgba(0, 171, 240, 0.9);
  box-shadow: 0 20px 48px rgba(0, 171, 240, 0.3);
  transform: translateY(-6px) scale(1.035);
}

.tool-chip svg {
  position: relative;
  z-index: 1;
}

.tool-chip:hover svg {
  color: #07111f;
}

.tool-chip:hover::before {
  opacity: 1;
  transform: translateX(20%);
}

.footer-wave {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  filter: drop-shadow(0 -1px 0 rgba(125, 231, 255, 0.4));
  pointer-events: none;
}

.footer-wave-border {
  fill: none;
  stroke: rgba(125, 231, 255, 0.5);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

/* Portfolio password prompt: a blurred hint of the hero behind the dialog,
   without sending any of the portfolio itself. */
.portfolio-gate-backdrop {
  position: absolute;
  inset: -3rem;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(6, 25, 35, 0.55), rgba(6, 25, 35, 0.92)),
    url("/assets/profile-hero-universe-960-9c3cd595.webp") center / cover no-repeat;
  filter: blur(14px);
  pointer-events: none;
}

@keyframes orbit-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes skill-load {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #00abf0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.motion-ready [data-profile-motion-target~="reveal"] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.motion-ready [data-profile-motion-target~="reveal"].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }

  .motion-ready [data-profile-motion-target~="reveal"] {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 900px) {
  .deep-footer {
    min-height: 700px;
  }
}

/* Small-screen menu: below each page's nav breakpoint the header nav opens as
   a dropdown under the menu button (nav_menu_controller.js closes it when the
   button disappears). Unlayered, so it wins over Tailwind's `hidden`. */
/* Lift the open menu's header above the page content that follows it. */
[data-controller~="nav-menu"]:has(> .site-nav[data-open]) {
  z-index: 60;
}

.site-nav[data-open] {
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 0;
  left: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.25rem;
  border-radius: 1rem;
  padding: 0.75rem;
  background: rgba(2, 6, 23, 0.96);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

/* "On this page" menu (shared/_page_with_section_nav). On small screens it is a
   sticky bar that scrolls sideways; the scrollbar would only add noise. */
.section-nav-list {
  scrollbar-width: none;
}

.section-nav-list::-webkit-scrollbar {
  display: none;
}

/* Keep a section's heading clear of the sticky bar when jumped to. */
main section[id] {
  scroll-margin-top: 5rem;
}

@media (min-width: 1280px) {
  main section[id] {
    scroll-margin-top: 2rem;
  }
}

.site-nav[data-open] > a,
.site-nav[data-open] form,
.site-nav[data-open] form > button {
  min-height: 2.75rem;
  padding: 0.625rem 0.75rem;
}
