/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box; margin: 0; padding: 0;
  -webkit-tap-highlight-color: transparent; /* kill the default mobile tap flash on every element */
}
a, button, input, textarea, [role="button"] { -webkit-tap-highlight-color: transparent; }

:root {
  --bg:       #070707;
  --bg-card:  #0d0d0d;
  --text:     #f0ede8;
  --muted:    #888;
  --accent:   #c9a96e;
  --border:   #242424;
  --display:  'Outfit', sans-serif;
  --body:     'Inter', sans-serif;
  --ease:     cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out: cubic-bezier(0.0, 0.0, 0.2, 1);

  /* Shared "card" language — reused across nav, cards, buttons, panels */
  --radius-lg:    20px;
  --radius-md:    16px;
  --radius-sm:    10px;
  --radius-pill:  100px;
  --shadow-rest:  0 1px 2px rgba(0,0,0,.5);
  --shadow-hover: 0 28px 54px -18px rgba(0,0,0,.6), 0 0 0 1px rgba(201,169,110,.12);
  --shadow-soft-hover: 0 14px 30px -12px rgba(0,0,0,.55);
}

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  cursor: none;
}
@media (pointer: coarse) { body { cursor: auto; } }

img { display: block; max-width: 100%; }
a   { color: inherit; text-decoration: none; }
button { font-family: var(--body); }

/* ============================================================
   CUSTOM CURSOR
   ============================================================ */
.cursor {
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%, -50%);
}
.cursor-follower {
  width: 30px; height: 30px;
  border: 1px solid rgba(201,169,110,.35);
  border-radius: 50%;
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width .35s var(--ease), height .35s var(--ease), border-color .35s;
}
.cursor-follower.expanded { width: 52px; height: 52px; border-color: var(--accent); }
@media (pointer: coarse) { .cursor, .cursor-follower { display: none; } }

/* ============================================================
   NAVIGATION
   ============================================================ */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; gap: 24px;
  padding: 0 28px;
  height: 76px;
  transition: background .4s, backdrop-filter .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
#nav.scrolled {
  background: rgba(7,7,7,.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--border);
}

/* Logo / home button */
.nav-home {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--display);
  font-size: .86rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--text);
  background: rgba(255,255,255,.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 10px 18px;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color .3s, color .3s, background .3s, transform .3s var(--ease);
}
.nav-home:hover { border-color: var(--accent); color: var(--accent); background: rgba(201,169,110,.08); transform: translateY(-2px); }
.home-arrow { width: 15px; height: 15px; flex-shrink: 0; }

/* Role links — centered */
.nav-roles {
  display: flex; list-style: none; gap: 0;
  flex: 1; justify-content: center;
}
.nav-roles li { display: flex; }

.nav-role {
  font-size: .94rem;
  letter-spacing: .04em;
  color: rgba(240,237,232,.5);
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  position: relative;
  transition: color .3s, background .3s;
  white-space: nowrap;
}
.nav-role:hover, .nav-role.active { color: var(--text); background: rgba(201,169,110,.1); }

/* Right side */
.nav-right { display: flex; align-items: center; gap: 20px; flex-shrink: 0; }

.nav-contact {
  font-size: .84rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 9px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,.02);
  transition: color .3s, border-color .3s, background .3s, transform .3s var(--ease);
  white-space: nowrap;
}
.nav-contact:hover { color: var(--accent); border-color: var(--accent); background: rgba(201,169,110,.08); transform: translateY(-2px); }

.nav-toggle {
  display: none; flex-direction: column; gap: 7px;
  background: none; border: none; padding: 6px; cursor: pointer;
}
.nav-toggle span {
  display: block; width: 26px; height: 2px;
  background: var(--text);
  transition: transform .35s var(--ease), opacity .3s;
}

/* Mobile menu */
.mobile-menu {
  position: fixed; inset: 0;
  background: var(--bg); z-index: 99;
  display: flex; align-items: center; justify-content: center;
  transform: translateX(100%);
  transition: transform .55s var(--ease);
}
.mobile-menu.open { transform: none; }
.mobile-menu ul { list-style: none; text-align: center; }
.mobile-menu ul li { margin: 18px 0; }
.mobile-menu ul a {
  font-family: var(--display);
  font-size: 2rem; font-weight: 600;
  color: var(--text);
  transition: color .3s;
}
.mobile-menu ul a:hover { color: var(--accent); }

/* ============================================================
   CONTAINER
   ============================================================ */
.container { max-width: 1680px; margin: 0 auto; padding: 0 28px; }

/* ============================================================
   VIEW SYSTEM
   ============================================================ */
.view { display: none; }
.view.active {
  display: block;
  animation: viewIn .45s var(--ease-out) forwards;
}
@keyframes viewIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ============================================================
   HERO (inside view-home)
   ============================================================ */
#hero {
  position: relative;
  width: 100%; height: 100vh; min-height: 680px;
  display: flex; align-items: center; overflow: hidden;
  padding-top: 76px;
  background-image: url('img/perfil/back.jpeg');
  background-size: cover;
  background-position: center;
}
/* Dark gradient overlay so text is legible over the photo */
#hero::before {
  content: '';
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(
    to right,
    rgba(7,7,7,0.88) 40%,
    rgba(7,7,7,0.55) 100%
  );
}
#grain-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: .03; pointer-events: none;
  z-index: 2;
}
.hero-bg-lines {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.012) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
  z-index: 2;
}

.hero-content {
  position: relative; z-index: 2;
  padding: 0 28px;
  max-width: 1680px; width: 100%; margin: 0 auto;
}

.hero-eyebrow {
  font-size: .7rem; letter-spacing: .24em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 28px;
  opacity: 0;
  transition: opacity .8s var(--ease-out) .2s;
}
.hero-eyebrow.visible { opacity: 1; }

.hero-name {
  font-family: var(--display);
  font-size: clamp(4.5rem, 11vw, 10rem);
  font-weight: 800; line-height: .92; letter-spacing: -.03em;
  margin-bottom: 36px;
}
.name-line { display: block; overflow: hidden; }
.name-inner {
  display: block;
  transform: translateY(105%);
  transition: transform 1s cubic-bezier(.16,1,.3,1);
}
.name-line:nth-child(1) .name-inner { transition-delay: .35s; }
.name-line:nth-child(2) .name-inner { transition-delay: .5s; }
.name-inner.outline {
  color: transparent;
  -webkit-text-stroke: 1px rgba(240,237,232,.55);
}
.hero-name.visible .name-inner { transform: none; }

.hero-role {
  display: flex; align-items: center;
  font-family: var(--display);
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 300; letter-spacing: .04em; color: var(--muted);
  margin-bottom: 44px;
  opacity: 0; transform: translateY(14px);
  transition: opacity .8s var(--ease-out) .75s, transform .8s var(--ease-out) .75s;
}
.hero-role.visible { opacity: 1; transform: none; }
.role-dash { color: var(--accent); }
.role-typed { color: var(--text); }
.cursor-blink { color: var(--accent); animation: blink 1.1s step-end infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* Role pill links in hero */
.hero-role-links {
  display: flex; flex-wrap: wrap; gap: 10px;
  opacity: 0; transform: translateY(14px);
  transition: opacity .8s var(--ease-out) 1s, transform .8s var(--ease-out) 1s;
}
.hero-role-links.visible { opacity: 1; transform: none; }

.role-pill {
  font-size: .98rem; letter-spacing: .03em;
  color: rgba(240,237,232,.55);
  padding: 13px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,.02);
  transition: border-color .3s, color .3s, background .3s, transform .3s var(--ease), box-shadow .3s var(--ease);
}
.role-pill:hover {
  border-color: var(--accent); color: var(--accent);
  background: rgba(201,169,110,.08);
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft-hover);
}

/* Scroll indicator */
.hero-scroll {
  position: absolute; bottom: 44px; left: 28px; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.scroll-line {
  width: 1px; height: 56px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  transform-origin: top;
  animation: scrollAnim 2.2s ease-in-out infinite;
}
@keyframes scrollAnim {
  0%   { transform: scaleY(0); transform-origin: top; }
  45%  { transform: scaleY(1); transform-origin: top; }
  55%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}
.hero-scroll span {
  font-size: .6rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--muted); writing-mode: vertical-rl;
}
.hero-year {
  position: absolute; bottom: 44px; right: 28px; z-index: 2;
  font-size: .68rem; letter-spacing: .22em; color: var(--muted);
}

/* ============================================================
   SECTION COMMONS
   ============================================================ */
.section-tag {
  font-size: .8rem; letter-spacing: .26em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}
.section-title {
  font-family: var(--display);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 700; line-height: 1.0; letter-spacing: -.025em;
}

/* ============================================================
   ABOUT
   ============================================================ */
#about {
  padding: 130px 0;
  border-top: 1px solid var(--border);
}
.about-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 80px;
  align-items: start;
}

/* Photo column */
.about-photo-col { position: sticky; top: 84px; }

.about-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-rest);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .5s var(--ease);
}
.about-photo:hover {
  transform: translateY(-8px);
  border-color: rgba(201,169,110,.35);
  box-shadow: var(--shadow-hover);
}
/* Inner frame overlay */
.about-photo::before {
  content: '';
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(201,169,110,.18);
  border-radius: calc(var(--radius-md) - 8px);
  pointer-events: none;
  z-index: 2;
  transition: inset .55s var(--ease), border-color .55s;
}
.about-photo:hover::before {
  inset: 8px;
  border-color: rgba(201,169,110,.45);
}
/* Bottom gradient, matching project-card image treatment */
.about-photo::after {
  content: '';
  position: absolute; inset: auto 0 0 0; height: 40%;
  background: linear-gradient(to top, rgba(7,7,7,.5), transparent);
  pointer-events: none;
  z-index: 1;
}
.about-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform .7s var(--ease);
}
.about-photo:hover img {
  transform: scale(1.04);
}

/* Bottom label */
.about-photo-label {
  padding: 16px 4px 0;
  text-align: center;
}
.apl-name {
  display: block;
  font-family: var(--display);
  font-size: .85rem; font-weight: 600;
  color: var(--text);
  letter-spacing: .04em;
}

/* Content column */
.about-content { padding-top: 8px; }
.about-bio { color: var(--muted); font-size: 1.05rem; line-height: 1.85; margin-bottom: 22px; }
.about-bio:first-of-type { margin-top: 0; }

.about-skills { margin: 20px 0 30px; display: flex; flex-wrap: wrap; gap: 12px; }
.skill-item {
  display: flex; align-items: center; gap: 9px;
  font-size: .82rem; letter-spacing: .02em; color: var(--muted);
  padding: 9px 16px; border: 1px solid var(--border);
  border-radius: var(--radius-pill); background: rgba(255,255,255,.02);
  transition: color .3s, border-color .3s, background .3s, transform .3s var(--ease);
}
.skill-item:hover {
  color: var(--text); border-color: rgba(201,169,110,.35);
  background: rgba(201,169,110,.08); transform: translateY(-2px);
}
.skill-dot { width: 4px; height: 4px; background: var(--accent); border-radius: 50%; flex-shrink: 0; }

/* ============================================================
   ROLE SECTION HEADER
   ============================================================ */
.role-section { padding: 100px 0 80px; }

.role-header {
  display: flex; align-items: flex-end; gap: 32px; flex-wrap: wrap;
  margin-bottom: 56px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
.role-header .section-tag { margin-bottom: 0; align-self: flex-start; margin-top: 6px; }
.role-header .section-title { flex: 1; }
.role-count {
  font-family: var(--display);
  font-size: .84rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); padding-bottom: 4px;
}

/* ============================================================
   PROJECTS GRID
   ============================================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px 24px;
}
.projects-grid--small {
  grid-template-columns: repeat(2, 1fr);
}

/* Card */
.project-card {
  display: block;
  position: relative; background: var(--bg-card); overflow: hidden; cursor: pointer;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-rest);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .5s var(--ease);
}
.project-card:hover {
  transform: translateY(-8px);
  border-color: rgba(201,169,110,.35);
  box-shadow: var(--shadow-hover);
}
.card-image { aspect-ratio: 16/10; overflow: hidden; position: relative; }
.card-placeholder {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  transition: transform .7s var(--ease);
}
.card-image img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .7s var(--ease);
}
.project-card:hover .card-placeholder,
.project-card:hover .card-image img { transform: scale(1.06); }
/* Subtle bottom gradient for legibility / polish where image meets body */
.card-image::after {
  content: '';
  position: absolute; inset: auto 0 0 0; height: 45%;
  background: linear-gradient(to top, rgba(7,7,7,.5), transparent);
  pointer-events: none;
}

.card-body { padding: 20px 22px 24px; }
.card-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; }
.card-year {
  font-family: var(--display); font-size: .8rem; font-weight: 600;
  letter-spacing: .12em; color: var(--accent);
}
.card-category { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.card-title { font-family: var(--display); font-size: 1.18rem; font-weight: 600; line-height: 1.28; margin-bottom: 13px; transition: color .3s; }
.project-card:hover .card-title { color: var(--accent); }
.card-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.card-tags span {
  font-size: .72rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); padding: 5px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-pill); background: rgba(255,255,255,.02);
  transition: border-color .3s, color .3s, background .3s;
}
.project-card:hover .card-tags span { border-color: rgba(201,169,110,.35); color: rgba(240,237,232,.8); background: rgba(201,169,110,.06); }

/* Card hover overlay */
.card-hover {
  position: absolute; inset: 0;
  background: rgba(7,7,7,.78);
  backdrop-filter: blur(2px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  opacity: 0; transition: opacity .4s var(--ease);
}
.project-card:hover .card-hover { opacity: 1; }
.hover-label {
  font-size: .88rem; letter-spacing: .2em; text-transform: uppercase; color: var(--accent);
  transform: translateY(8px); transition: transform .4s var(--ease);
}
.project-card:hover .hover-label { transform: none; }
.card-hover svg {
  width: 30px; height: 30px; color: var(--accent);
  padding: 10px; box-sizing: content-box;
  border: 1px solid rgba(201,169,110,.4); border-radius: 50%;
  transform: translateY(8px) scale(.9); transition: transform .4s var(--ease) .05s;
}
.project-card:hover .card-hover svg { transform: none; }

/* ============================================================
   FINISHING GRID — poster cards (2:3 vertical)
   ============================================================ */
.finishing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px 18px;
}

.fcard {
  position: relative; background: var(--bg-card); overflow: hidden; cursor: pointer;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-rest);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .5s var(--ease);
}
.fcard:hover {
  transform: translateY(-8px);
  border-color: rgba(201,169,110,.35);
  box-shadow: var(--shadow-hover);
}

.fcard-image {
  aspect-ratio: 3 / 4;   /* vertical poster */
  overflow: hidden;
  position: relative;
}
.fcard-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(160deg, var(--c1), var(--c2));
  transition: transform .6s var(--ease);
}
.fcard-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
}
.fcard:hover .fcard-placeholder,
.fcard:hover .fcard-image img { transform: scale(1.05); }
.fcard-image::after {
  content: '';
  position: absolute; inset: auto 0 0 0; height: 40%;
  background: linear-gradient(to top, rgba(7,7,7,.5), transparent);
  pointer-events: none;
}

.fcard-body {
  padding: 13px 15px 16px;
}
.fcard-title {
  font-family: var(--display);
  font-size: .94rem; font-weight: 600; line-height: 1.3;
  margin-bottom: 9px;
  color: var(--text);
  transition: color .3s;
}
.fcard:hover .fcard-title { color: var(--accent); }

.fcard-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap;
}
.fcard-year {
  font-size: .72rem; letter-spacing: .08em; color: var(--muted);
}

/* Platform badges — shared by fcard and old f-row */
.f-platform {
  font-size: .64rem; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 9px; border: 1px solid;
  border-radius: var(--radius-pill);
  white-space: nowrap; flex-shrink: 0;
}
.f-platform.netflix   { color: #ff5a5a; border-color: rgba(255,90,90,.3);  background: rgba(255,90,90,.06); }
.f-platform.prime     { color: #5bbef5; border-color: rgba(91,190,245,.3); background: rgba(91,190,245,.06); }
.f-platform.disney    { color: #6699ff; border-color: rgba(102,153,255,.3);background: rgba(102,153,255,.06); }
.f-platform.max       { color: #a78bfa; border-color: rgba(167,139,250,.3);background: rgba(167,139,250,.06); }
.f-platform.star      { color: #c084fc; border-color: rgba(192,132,252,.3);background: rgba(192,132,252,.06); }
.f-platform.paramount { color: #60a5fa; border-color: rgba(96,165,250,.3); background: rgba(96,165,250,.06); }
.f-platform.flow      { color: #fb923c; border-color: rgba(251,146,60,.3); background: rgba(251,146,60,.06); }
.f-platform.none      { color: var(--muted); border-color: var(--border);  background: transparent; }

/* ============================================================
   CONTACT
   ============================================================ */
#contact { padding: 130px 0; border-top: 1px solid var(--border); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 80px; align-items: start; }
.contact-sub { margin-top: 28px; color: var(--muted); font-size: 1rem; line-height: 1.75; }
.contact-links { margin-top: 52px; display: flex; flex-direction: column; gap: 4px; }
.contact-link {
  display: flex; align-items: center; gap: 20px;
  padding: 18px 20px; margin: 0 -20px;
  border-radius: var(--radius-md);
  color: var(--muted); font-size: 1.05rem;
  transition: color .3s, background .3s, transform .3s var(--ease);
}
.contact-link:hover { color: var(--accent); background: rgba(255,255,255,.03); transform: translateX(6px); }
.link-icon {
  width: 42px; height: 42px; border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.02);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: border-color .3s, background .3s;
}
.contact-link:hover .link-icon { border-color: var(--accent); background: rgba(201,169,110,.08); }
.link-icon svg { width: 18px; height: 18px; }

/* Form */
.contact-form {
  display: flex; flex-direction: column; gap: 32px;
  padding: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-rest);
}
.form-field { position: relative; }
.form-field input, .form-field textarea {
  width: 100%; background: transparent; border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text); font-family: var(--body); font-size: 1.1rem;
  padding: 16px 0; outline: none; resize: none; transition: border-color .3s;
}
.form-field label {
  position: absolute; top: 16px; left: 0;
  color: var(--muted); font-size: .95rem; letter-spacing: .04em;
  pointer-events: none;
  transition: transform .3s var(--ease), font-size .3s, color .3s, letter-spacing .3s;
}
.form-field input:focus + label,
.form-field input:not(:placeholder-shown) + label,
.form-field textarea:focus + label,
.form-field textarea:not(:placeholder-shown) + label {
  transform: translateY(-26px); font-size: .68rem;
  letter-spacing: .16em; text-transform: uppercase; color: var(--accent);
}
.field-line {
  position: absolute; bottom: 0; left: 0;
  width: 0; height: 1px; background: var(--accent);
  transition: width .4s var(--ease);
}
.form-field input:focus ~ .field-line,
.form-field textarea:focus ~ .field-line { width: 100%; }
.form-field input:focus, .form-field textarea:focus { border-bottom-color: transparent; }

.form-status {
  font-size: .85rem; line-height: 1.5;
  min-height: 1.3em;
  margin-top: -14px;
  opacity: 0; transform: translateY(-4px);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.form-status:empty { display: none; }
.form-status.success,
.form-status.error { opacity: 1; transform: none; }
.form-status.success { color: var(--accent); }
.form-status.error { color: #e0796f; }

.form-btn {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 16px;
  border: 1px solid var(--accent); background: transparent;
  border-radius: var(--radius-pill);
  color: var(--accent);
  font-size: .92rem; letter-spacing: .16em; text-transform: uppercase;
  padding: 19px 38px;
  transition: background .35s, color .35s, gap .3s, transform .3s var(--ease), box-shadow .3s var(--ease);
  cursor: pointer;
}
.form-btn svg { width: 17px; height: 17px; transition: transform .3s var(--ease); }
.form-btn:hover { background: var(--accent); color: var(--bg); gap: 20px; transform: translateY(-3px); box-shadow: var(--shadow-soft-hover); }
.form-btn:hover svg { transform: translate(4px, -4px); }

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.fade-in {
  opacity: 0; transform: translateY(26px);
  transition: opacity .85s var(--ease-out), transform .85s var(--ease-out);
}
.fade-in.delay-1 { transition-delay: .12s; }
.fade-in.visible { opacity: 1; transform: none; }

/* Stagger cards */
.projects-grid .project-card:nth-child(3n+2) { transition-delay: .08s; }
.projects-grid .project-card:nth-child(3n+3) { transition-delay: .16s; }
.projects-grid--small .project-card:nth-child(even) { transition-delay: .08s; }

/* ============================================================
   VIDEO PLAYER MODAL
   ============================================================ */
.video-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
  opacity: 0; pointer-events: none;
  transition: opacity .4s var(--ease);
}
.video-modal.open { opacity: 1; pointer-events: auto; }

.video-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(5,5,5,.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.video-modal-panel {
  position: relative;
  width: min(94vw, 1680px);
  max-height: 88vh;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-hover);
  transform: scale(.96) translateY(10px);
  transition: transform .45s var(--ease);
}
.video-modal.open .video-modal-panel { transform: none; }
.video-modal-panel:fullscreen,
.video-modal-panel:-webkit-full-screen {
  width: 100vw; max-height: 100vh; border-radius: 0;
  display: flex; align-items: center;
  border: none; outline: none;
}
.video-modal-panel:fullscreen .video-player,
.video-modal-panel:fullscreen .video-player-el,
.video-modal-panel:-webkit-full-screen .video-player,
.video-modal-panel:-webkit-full-screen .video-player-el { max-height: 100vh; }
/* In fullscreen you exit via the player's own fullscreen button or Esc —
   the X would just be a confusing second way to close the whole modal */
.video-modal-panel:fullscreen .video-modal-close,
.video-modal-panel:-webkit-full-screen .video-modal-close { display: none; }
/* Fades out with the rest of the controls once playback is idle */
.video-player.is-playing.is-idle ~ .video-modal-close { opacity: 0; pointer-events: none; }

.video-modal-close,
.gallery-modal-close {
  position: absolute; top: 16px; right: 16px; z-index: 5;
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(240,237,232,.25);
  border-radius: 50%;
  background: rgba(7,7,7,.5);
  backdrop-filter: blur(6px);
  color: var(--text);
  cursor: pointer;
  opacity: 1;
  transition: opacity .4s var(--ease), border-color .3s, color .3s, background .3s, transform .3s var(--ease);
}
.video-modal-close svg,
.gallery-modal-close svg { width: 17px; height: 17px; }
.video-modal-close:hover,
.gallery-modal-close:hover { border-color: var(--accent); color: var(--accent); background: rgba(7,7,7,.75); transform: rotate(90deg); }

/* Player */
.video-player {
  position: relative;
  width: 100%; max-height: 88vh;
  display: flex; align-items: center; justify-content: center;
  background: #000;
  cursor: pointer;
}
.video-player-el {
  width: 100%; max-height: 88vh;
  display: block;
  background: #000;
  outline: none; /* browsers draw a focus ring on <video> once it's focused, which fullscreen does */
  touch-action: manipulation; /* kill native double-tap-to-zoom so our seek gesture owns it */
}
.video-player-el:focus,
.video-player-el:focus-visible { outline: none; }

/* Double-tap seek feedback (functional, not decorative) */
.vp-seek-flash {
  position: absolute; top: 50%; z-index: 3;
  transform: translateY(-50%);
  font-family: var(--display);
  font-size: 1rem; font-weight: 600;
  color: var(--text);
  background: rgba(0,0,0,.55);
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s var(--ease);
}
.vp-seek-flash--left  { left: 8%; }
.vp-seek-flash--right { right: 8%; }
.vp-seek-flash.show { opacity: 1; }

.vp-title {
  position: absolute; top: 0; left: 0; right: 0; z-index: 3;
  padding: 24px 80px 40px 28px;
  background: linear-gradient(to bottom, rgba(0,0,0,.65), transparent);
  font-family: var(--display);
  font-size: 1.05rem; font-weight: 600; letter-spacing: .02em;
  color: var(--text);
  opacity: 1; transition: opacity .4s var(--ease);
  pointer-events: none;
}

.vp-center-play {
  position: absolute; top: 50%; left: 50%; z-index: 3;
  width: 76px; height: 76px;
  transform: translate(-50%, -50%);
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(201,169,110,.5);
  background: rgba(7,7,7,.55);
  backdrop-filter: blur(4px);
  color: var(--accent);
  cursor: pointer;
  opacity: 1; transition: opacity .3s var(--ease), transform .3s var(--ease), background .3s;
}
.vp-center-play svg { width: 26px; height: 26px; }
.vp-center-play:hover { background: rgba(201,169,110,.15); transform: translate(-50%, -50%) scale(1.06); }
/* Hidden only once playback is idle (mouse hasn't moved / no tap) — same
   rule as the rest of the controls, so it reappears on mouse move or tap
   showing whichever icon (play/pause) matches the current state */
.video-player.is-playing.is-idle .vp-center-play { opacity: 0; pointer-events: none; }

/* Controls bar */
.vp-controls {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
  display: flex; align-items: center; gap: 16px;
  padding: 34px 22px 18px;
  background: linear-gradient(to top, rgba(0,0,0,.78), transparent);
  opacity: 1; transition: opacity .4s var(--ease);
}
.video-player.is-playing.is-idle .vp-controls,
.video-player.is-playing.is-idle .vp-title { opacity: 0; }
.video-player.is-playing.is-idle { cursor: none; }

.vp-btn {
  flex-shrink: 0;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border: none; background: none;
  color: var(--text);
  cursor: pointer;
  border-radius: 50%;
  transition: color .3s, background .3s;
}
.vp-btn:hover { color: var(--accent); background: rgba(255,255,255,.06); }
.vp-btn svg { width: 19px; height: 19px; }

.vp-time {
  flex-shrink: 0;
  font-size: .78rem; letter-spacing: .03em; color: rgba(240,237,232,.7);
  font-variant-numeric: tabular-nums;
}

.vp-progress {
  position: relative;
  flex: 1;
  height: 18px;
  display: flex; align-items: center;
  cursor: pointer;
}
.vp-progress::before {
  content: '';
  position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%);
  height: 3px; border-radius: var(--radius-pill);
  background: rgba(255,255,255,.15);
}
.vp-progress-buffer {
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  height: 3px; width: 0%; border-radius: var(--radius-pill);
  background: rgba(255,255,255,.28);
}
.vp-progress-fill {
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  height: 3px; width: 0%; border-radius: var(--radius-pill);
  background: var(--accent);
}
.vp-progress-handle {
  position: absolute; top: 50%; left: 0%;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%) scale(0);
  transition: transform .2s var(--ease);
  box-shadow: 0 0 0 4px rgba(201,169,110,.2);
}
.vp-progress:hover .vp-progress-handle,
.video-player.is-scrubbing .vp-progress-handle { transform: translate(-50%, -50%) scale(1); }
.video-player.is-scrubbing .vp-progress-fill,
.video-player.is-scrubbing .vp-progress-handle { transition: none; }
.video-player.is-scrubbing .vp-controls,
.video-player.is-scrubbing .vp-title { opacity: 1 !important; }

.vp-volume {
  flex-shrink: 0;
  width: 80px; height: 3px;
  -webkit-appearance: none; appearance: none;
  background: rgba(255,255,255,.15);
  border-radius: var(--radius-pill);
  outline: none;
  cursor: pointer;
}
.vp-volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 0 4px rgba(201,169,110,.2);
}
.vp-volume::-moz-range-thumb {
  width: 11px; height: 11px; border-radius: 50%; border: none;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 0 4px rgba(201,169,110,.2);
}

@media (max-width: 720px) {
  /* Pre-fullscreen: sized to the video's real aspect ratio instead of
     stretched to fill the whole screen (that stretch is reserved for
     when the user actually taps fullscreen), but centered vertically
     in the viewport rather than docked to the top. */
  .video-modal { padding: 0; }
  .video-modal-panel { width: 100vw; height: auto; max-height: none; border-radius: 0; }
  .video-player, .video-player-el { max-height: none; }

  .video-modal-panel:fullscreen,
  .video-modal-panel:-webkit-full-screen { height: 100vh; }

  .vp-volume { display: none; }
  .vp-controls { padding: 16px 10px 8px; gap: 8px; }
  .vp-title { padding: 12px 50px 20px 12px; font-size: .85rem; }
  .vp-center-play { width: 46px; height: 46px; }
  .vp-center-play svg { width: 17px; height: 17px; }
}

/* ============================================================
   STILLS GALLERY MODAL — same visual language as the video modal
   ============================================================ */
.gallery-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
  opacity: 0; pointer-events: none;
  transition: opacity .4s var(--ease);
}
.gallery-modal.open { opacity: 1; pointer-events: auto; }

.gallery-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(5,5,5,.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.gallery-modal-panel {
  position: relative;
  width: min(92vw, 1400px);
  max-height: 88vh;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-hover);
  transform: scale(.96) translateY(10px);
  transition: transform .45s var(--ease);
}
.gallery-modal.open .gallery-modal-panel { transform: none; }

.gm-title {
  position: absolute; top: 0; left: 0; right: 0; z-index: 3;
  padding: 24px 80px 40px 28px;
  background: linear-gradient(to bottom, rgba(0,0,0,.65), transparent);
  font-family: var(--display);
  font-size: 1.05rem; font-weight: 600; letter-spacing: .02em;
  color: var(--text);
  pointer-events: none;
}

.gm-stage {
  width: 100%; max-height: 88vh;
  display: flex; align-items: center; justify-content: center;
  background: #000;
}
.gm-img {
  max-width: 100%; max-height: 88vh;
  display: block; margin: auto;
  object-fit: contain;
  user-select: none; -webkit-user-drag: none;
}

.gm-nav {
  position: absolute; top: 50%; z-index: 4;
  width: 48px; height: 48px;
  transform: translateY(-50%);
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(240,237,232,.25);
  border-radius: 50%;
  background: rgba(7,7,7,.5);
  backdrop-filter: blur(6px);
  color: var(--text);
  cursor: pointer;
  transition: border-color .3s, color .3s, background .3s, transform .3s var(--ease);
}
.gm-nav svg { width: 20px; height: 20px; }
.gm-nav:hover { border-color: var(--accent); color: var(--accent); background: rgba(7,7,7,.75); }
.gm-prev { left: 16px; }
.gm-next { right: 16px; }

.gm-counter {
  position: absolute; left: 50%; bottom: 16px; z-index: 4;
  transform: translateX(-50%);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(7,7,7,.55);
  backdrop-filter: blur(6px);
  font-size: .78rem; letter-spacing: .04em; color: rgba(240,237,232,.85);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

@media (max-width: 720px) {
  .gallery-modal { padding: 0; }
  /* dvh accounts for the mobile browser's address/tab bar; vh alone
     overshoots and pushes the counter behind that chrome */
  .gallery-modal-panel {
    width: 100vw; max-height: 100vh; height: 100vh;
    max-height: 100dvh; height: 100dvh;
    border-radius: 0; display: flex; align-items: center;
  }
  /* Stage fills the full panel height (not just the image) so a swipe
     anywhere on screen works, not only right on top of the photo */
  .gm-stage { height: 100%; max-height: 100vh; max-height: 100dvh; touch-action: pan-y; }
  .gm-img { max-height: 100vh; max-height: 100dvh; }
  .gm-nav { width: 40px; height: 40px; }
  .gm-prev { left: 8px; }
  .gm-next { right: 8px; }
  .gm-title { padding: 18px 60px 30px 16px; font-size: .92rem; }
  .gm-counter { bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .nav-roles { gap: 0; }
  .nav-role { padding: 9px 11px; font-size: .86rem; }

  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .finishing-grid { grid-template-columns: repeat(3, 1fr); }

  .about-grid { grid-template-columns: 280px 1fr; gap: 56px; }
}

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; gap: 0; }
  .about-photo-col { position: static; max-width: 320px; margin-bottom: 52px; }
  .contact-grid { grid-template-columns: 1fr; gap: 52px; }
  .about-content { padding-top: 0; }
  .projects-grid--small { grid-template-columns: repeat(2, 1fr); }
  .finishing-grid { grid-template-columns: repeat(2, 1fr); }

  .role-header { flex-direction: column; align-items: flex-start; gap: 12px; }
}

@media (max-width: 720px) {
  .container { padding: 0 20px; }
  #nav { padding: 0 20px; }
  .hero-content { padding: 0 20px; }
  .hero-scroll { left: 20px; }
  .hero-year { right: 20px; }

  .nav-roles { display: none; }
  .nav-contact { display: none; }
  .nav-toggle { display: flex; }

  #about, #contact { padding: 80px 0; }
  .role-section { padding: 80px 0 60px; }

  .projects-grid { grid-template-columns: 1fr; }
  .projects-grid--small { grid-template-columns: 1fr; }
  .finishing-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .hero-role-links { gap: 8px; }
  .role-pill { padding: 10px 18px; font-size: .82rem; }
  .finishing-grid { grid-template-columns: repeat(2, 1fr); }
  .fcard-title { font-size: .82rem; }
}
