/* Jian Adornado — Product Design Portfolio
   Recreated from a Framer site. Design tokens reverse-engineered from
   computed styles: Gabarito type, near-black canvas, warm gold accent. */

@import url('https://fonts.googleapis.com/css2?family=Gabarito:wght@400;500;600;700&display=swap');

:root {
  --bg: #0a0908;
  --text: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.72);
  --muted: #7a7a7a;
  --gold: #d1bb77;
  --font: 'Gabarito', sans-serif;

  --container-max: 1440px;
  --container-pad: 100px;
  --grid-gap: 16px;
  --radius: 8px;
  --nav-height: 82px;
}

@media (max-width: 1100px) {
  :root {
    --container-pad: 56px;
    --grid-gap: 14px;
  }
}

@media (max-width: 800px) {
  :root {
    --container-pad: 32px;
    --grid-gap: 12px;
    --nav-height: 72px;
  }
}

@media (max-width: 480px) {
  :root {
    --container-pad: 16px;
    --grid-gap: 10px;
    --nav-height: 64px;
  }
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: clip;
}

/* Soft vignette — fixed over the page, under the nav */
html::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  background: radial-gradient(
    ellipse 78% 72% at 50% 42%,
    transparent 38%,
    rgba(0, 0, 0, 0.22) 72%,
    rgba(0, 0, 0, 0.5) 100%
  );
}

body {
  background: var(--bg);
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  min-height: 100vh;
}

/* Subtle dotted field — soft gold, strongest from the top */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(
    circle,
    rgba(209, 187, 119, 0.22) 0.45px,
    transparent 1px
  );
  background-size: 16px 16px;
  background-position: 0 0;
  mix-blend-mode: screen;
  -webkit-mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 22%,
    rgba(0, 0, 0, 0.45) 48%,
    transparent 78%
  );
  mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 22%,
    rgba(0, 0, 0, 0.45) 48%,
    transparent 78%
  );
  animation: dot-drift 120s linear infinite;
}

/* Soft ambient glows — sparse, dark, elegant */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse 42% 36% at 12% 18%,
      rgba(209, 187, 119, 0.07) 0%,
      transparent 70%
    ),
    radial-gradient(
      ellipse 38% 32% at 88% 28%,
      rgba(120, 140, 160, 0.05) 0%,
      transparent 72%
    ),
    radial-gradient(
      ellipse 48% 40% at 72% 78%,
      rgba(209, 187, 119, 0.045) 0%,
      transparent 70%
    ),
    radial-gradient(
      ellipse 36% 30% at 18% 72%,
      rgba(90, 110, 130, 0.04) 0%,
      transparent 70%
    ),
    radial-gradient(
      ellipse 30% 26% at 48% 48%,
      rgba(255, 255, 255, 0.02) 0%,
      transparent 75%
    );
  animation: glow-drift 28s ease-in-out infinite alternate;
}

@keyframes dot-drift {
  from { background-position: 0 0; }
  to { background-position: 160px 160px; }
}

@keyframes glow-drift {
  from {
    opacity: 0.75;
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    opacity: 1;
    transform: translate3d(-1.5%, 1%, 0) scale(1.03);
  }
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  body::after {
    animation: none;
  }
}

h1, h2, h3, p, figure {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
  padding-left: max(var(--container-pad), env(safe-area-inset-left));
  padding-right: max(var(--container-pad), env(safe-area-inset-right));
}

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 24px var(--container-pad);
  padding-left: max(var(--container-pad), env(safe-area-inset-left));
  padding-right: max(var(--container-pad), env(safe-area-inset-right));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: transparent;
  border-bottom: 1px solid transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition:
    background 0.4s ease,
    backdrop-filter 0.4s ease,
    border-color 0.4s ease,
    padding 0.4s ease;
  animation: nav-fade 1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.nav.is-scrolled {
  padding-top: 18px;
  padding-bottom: 18px;
  background: rgba(10, 9, 8, 0.45);
  backdrop-filter: blur(10px) saturate(1.05);
  -webkit-backdrop-filter: blur(10px) saturate(1.05);
  border-bottom-color: rgba(255, 255, 255, 0.04);
}

@keyframes nav-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.nav-brand img {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.nav-brand span {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 2.4px;
  color: var(--gold);
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-shrink: 0;
}

.nav-links a {
  font-size: 15px;
  font-weight: 400;
  color: var(--text-secondary);
  transition: color 0.25s ease;
  padding: 8px 0;
}

.nav-links a:hover {
  color: var(--text);
}

@media (max-width: 800px) {
  .nav {
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .nav.is-scrolled {
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .nav-links {
    gap: 20px;
  }

  .nav-brand span {
    letter-spacing: 1.6px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .nav-brand span { display: none; }
  .nav-brand img {
    width: 30px;
    height: 30px;
  }
  .nav-links {
    gap: 16px;
  }
  .nav-links a {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav { animation: none; }
}

/* ---------- Hero ---------- */

.hero {
  padding-top: clamp(120px, 22vw, 420px);
  padding-bottom: clamp(40px, 6vw, 64px);
}

.hero h1 {
  font-size: clamp(34px, 7vw, 83px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text);
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (max-width: 800px) {
  .hero {
    padding-top: calc(var(--nav-height) + 72px);
    padding-bottom: 40px;
  }
}

@media (max-width: 480px) {
  .hero {
    padding-top: calc(var(--nav-height) + 48px);
    padding-bottom: 28px;
  }

  .hero h1 {
    letter-spacing: -0.02em;
  }
}

.hero.is-fading h1 {
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
}

.hero-line {
  display: block;
}

.hero h1 .muted,
.hero-line.muted {
  color: var(--muted);
}

.hero-lede {
  margin-top: 32px;
  max-width: 720px;
  font-size: 16px;
  color: var(--text-secondary);
}

.hero-lede + .hero-lede {
  margin-top: 16px;
}

/* ---------- Project grid (home) ---------- */

.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--grid-gap);
  padding-bottom: 120px;
}

.project-card {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  isolation: isolate;
  aspect-ratio: var(--ar, 16 / 7);
  background: #12110f;
  border: none;
  box-shadow: none;
}

.project-card.wide {
  grid-column: 1 / -1;
}

.project-card img.cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translateZ(0);
  backface-visibility: hidden;
  transition:
    transform 1s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.7s ease;
}

.project-card:hover img.cover {
  transform: scale(1.1) translateZ(0);
  filter: brightness(1.08);
}

/* Soft glass highlight — no blur, no sheen */
.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.02) 32%,
    transparent 55%
  );
  opacity: 0.55;
  transition: opacity 0.6s ease, background 0.6s ease;
}

.project-card:hover::before {
  opacity: 0.35;
  background: radial-gradient(
    ellipse 80% 70% at 50% 40%,
    transparent 30%,
    rgba(0, 0, 0, 0.35) 100%
  );
}

/* Bottom gradient for label legibility */
.project-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(10, 9, 8, 0.58) 0%,
    rgba(10, 9, 8, 0.18) 38%,
    transparent 68%
  );
  transition: background 0.65s ease, opacity 0.65s ease;
}

.project-card:hover::after {
  background: linear-gradient(
    to top,
    rgba(10, 9, 8, 0.82) 0%,
    rgba(10, 9, 8, 0.35) 36%,
    transparent 70%
  );
}

.project-card-label {
  position: absolute;
  left: 28px;
  bottom: 28px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.project-card-label img {
  height: 20px;
  width: auto;
  max-width: 88px;
  object-fit: contain;
  object-position: left bottom;
  opacity: 0.88;
}

.project-card-label img[src*="AoIZWPYc0eyfwmUZPqj6jH8xokY"] {
  height: 17px;
}

.project-card-label img[src*="6ywx5PBMBfuBV6TLf2mYcUYGI8"],
.project-card-label img[src*="A2gCLVKfAIZhcGCuJejWxleJC0E"] {
  height: 30px;
  max-width: none;
}

.project-card-label span {
  font-size: 14px;
  letter-spacing: 0.01em;
  color: var(--gold);
}

@media (max-width: 900px) {
  .project-grid {
    grid-template-columns: 1fr;
    padding-bottom: 80px;
  }

  .project-card,
  .project-card.wide {
    aspect-ratio: 16 / 10;
  }

  .project-card-label {
    left: 20px;
    bottom: 20px;
  }
}

@media (max-width: 480px) {
  .project-grid {
    padding-bottom: 56px;
  }

  .project-card,
  .project-card.wide {
    aspect-ratio: 4 / 3;
    border-radius: 6px;
  }

  .project-card-label {
    left: 16px;
    bottom: 16px;
    gap: 6px;
  }

  .project-card-label img {
    height: 16px;
    max-width: 72px;
  }

  .project-card-label img[src*="AoIZWPYc0eyfwmUZPqj6jH8xokY"] {
    height: 14px;
  }

  .project-card-label img[src*="6ywx5PBMBfuBV6TLf2mYcUYGI8"],
  .project-card-label img[src*="A2gCLVKfAIZhcGCuJejWxleJC0E"] {
    height: 22px;
  }

  .project-card-label span {
    font-size: 13px;
  }

  /* Touch devices: keep hover motion gentle */
  .project-card:hover img.cover {
    transform: scale(1.04) translateZ(0);
  }
}

@media (hover: none) {
  .project-card:hover img.cover {
    transform: none;
    filter: none;
  }

  .project-card:active img.cover {
    transform: scale(1.03) translateZ(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-card,
  .project-card img.cover,
  .project-card::before,
  .project-card::after {
    transition: none;
  }

  .project-card:hover img.cover,
  .project-card:active img.cover {
    transform: none;
    filter: none;
  }
}

/* ---------- Case study page ---------- */

.content-col {
  max-width: 868px;
}

.section-heading {
  font-size: 22px;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 40px;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px 30px;
  padding-top: 64px;
}

.feature img {
  width: 100%;
  aspect-ratio: 605 / 286;
  object-fit: cover;
  border-radius: var(--radius);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature:hover img {
  transform: scale(1.015);
}

.feature h3 {
  margin-top: 24px;
  font-size: 20px;
  font-weight: 400;
  color: var(--text);
}

.feature p {
  margin-top: 10px;
  font-size: 16px;
  color: var(--text-secondary);
}

.gallery-section {
  padding-top: 96px;
}

.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.gallery img {
  width: 100%;
  aspect-ratio: 605 / 286;
  object-fit: cover;
  border-radius: var(--radius);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery img:hover {
  transform: scale(1.015);
}

.notables-section {
  padding-top: 96px;
}

.notables-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px 30px;
}

.notables-grid h3 {
  font-size: 20px;
  font-weight: 400;
  color: var(--text);
}

.notables-grid p {
  margin-top: 10px;
  font-size: 16px;
  color: var(--text-secondary);
}

@media (max-width: 800px) {
  .section-heading {
    font-size: 20px;
    margin-bottom: 28px;
  }

  .feature-grid,
  .gallery-section,
  .notables-section {
    padding-top: 64px;
  }

  .feature-grid,
  .gallery {
    gap: 20px;
  }

  .notables-grid {
    gap: 28px 20px;
  }
}

@media (max-width: 700px) {
  .feature-grid,
  .gallery,
  .notables-grid {
    grid-template-columns: 1fr;
  }

  .feature h3,
  .notables-grid h3 {
    font-size: 18px;
  }

  .feature p,
  .notables-grid p,
  .about-bio p {
    font-size: 15px;
    line-height: 1.6;
  }
}

/* ---------- About page ---------- */

.about-hero h1:first-child {
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 400;
  color: var(--gold);
}

.about-hero h1.statement {
  margin-top: 20px;
  font-size: clamp(24px, 4.5vw, 44px);
  font-weight: 400;
  line-height: 1.3;
  color: var(--text);
  max-width: 900px;
}

.logo-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--grid-gap);
  padding: clamp(40px, 8vw, 72px) 0;
}

.logo-card {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 2 / 1;
  min-height: 64px;
  background: #141210;
  border-radius: var(--radius);
}

.logo-card img {
  height: auto;
  width: auto;
  max-height: 22px;
  max-width: 55%;
  object-fit: contain;
  opacity: 0.95;
}

@media (max-width: 1100px) {
  .logo-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 700px) {
  .logo-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .logo-card {
    min-height: 56px;
  }

  .logo-card img {
    max-height: 18px;
    max-width: 60%;
  }
}

@media (max-width: 380px) {
  .logo-row {
    grid-template-columns: 1fr 1fr;
  }
}

.about-bio {
  max-width: 868px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-bottom: 24px;
}

.about-bio p {
  font-size: 16px;
  color: var(--text-secondary);
}

/* ---------- Footer CTA ---------- */

.cta {
  padding-top: 120px;
  padding-bottom: calc(48px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 64px;
}

.about-hero ~ .cta {
  margin-top: 48px;
  padding-top: 64px;
}

.cta h2 {
  font-size: clamp(28px, 5.5vw, 48px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
  max-width: 720px;
}

.cta-lede {
  margin-top: 20px;
  max-width: 620px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 28px;
  padding: 14px 28px;
  border-radius: 6px;
  background: var(--gold);
  color: #0a0908;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: background 0.25s ease, color 0.25s ease;
  min-height: 48px;
}

.btn:hover {
  background: #e0cf9a;
}

.copyright {
  margin-top: 64px;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--muted);
}

@media (max-width: 800px) {
  .cta {
    padding-top: 72px;
    margin-top: 40px;
  }

  .about-hero ~ .cta {
    margin-top: 32px;
    padding-top: 48px;
  }

  .btn {
    margin-top: 28px;
  }

  .copyright {
    margin-top: 48px;
  }
}

@media (max-width: 480px) {
  .cta {
    padding-top: 56px;
    padding-bottom: calc(36px + env(safe-area-inset-bottom));
  }

  .btn {
    width: 100%;
    max-width: 100%;
  }

  .copyright {
    margin-top: 40px;
    font-size: 12px;
  }
}

main {
  padding-top: 0;
}

/* ---------- Scroll-reveal ---------- */

.reveal {
  opacity: 0;
  transform: translate3d(0, 56px, 0) scale(0.96);
  filter: blur(8px);
  transition:
    opacity 1.15s cubic-bezier(0.16, 1, 0.3, 1),
    transform 1.25s cubic-bezier(0.16, 1, 0.3, 1),
    filter 1.1s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform, filter;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

.hero-line.reveal {
  transform: translate3d(0, 24px, 0);
  filter: none;
  clip-path: none;
  transition:
    opacity 1.1s cubic-bezier(0.16, 1, 0.3, 1),
    transform 1.15s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

.hero-line.reveal.is-visible {
  opacity: 1;
  transform: none;
  filter: none;
  clip-path: none;
}

.project-card.reveal {
  transform: translate3d(0, 64px, 0) scale(0.94);
  filter: blur(10px);
}

.project-card.reveal.is-visible {
  transform: none;
  filter: none;
}

@media (max-width: 800px) {
  .reveal {
    transform: translate3d(0, 32px, 0) scale(0.98);
    filter: blur(4px);
  }

  .project-card.reveal {
    transform: translate3d(0, 36px, 0) scale(0.97);
    filter: blur(5px);
  }
}

@media (max-width: 480px) {
  .reveal,
  .project-card.reveal {
    filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .hero-line.reveal,
  .project-card.reveal {
    opacity: 1;
    transform: none;
    filter: none;
    clip-path: none;
    transition: none;
    will-change: auto;
  }
}
