/* Thomas Barajas Portfolio - generated by tools/build_site.py */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; transition: color 220ms ease; }
a:hover { color: var(--accent); }

:root {
  --accent: #D69460;
  --bg: #0B0B0C; --fg: #F4F3F1; --muted: #8B8B90;
  --line: rgba(244,243,241,0.14); --chip: rgba(244,243,241,0.055);
  --skel: #151517; --shade: rgba(11,11,12,0.74);
  --pad: clamp(20px, 5.6vw, 80px);
  --gap: clamp(10px, 1.95vw, 28px);
  --hs: 1.035;
  color-scheme: dark;
}
html[data-theme="light"] {
  --bg: #FAFAF8; --fg: #131314; --muted: #74747A;
  --line: rgba(19,19,20,0.13); --chip: rgba(19,19,20,0.045);
  --skel: #EDEBE7; --shade: rgba(250,250,248,0.80);
  color-scheme: light;
}

body {
  background: var(--bg); color: var(--fg);
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 560ms cubic-bezier(0.22,1,0.36,1),
              color 560ms cubic-bezier(0.22,1,0.36,1);
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.kick { font-size: clamp(9.5px, 0.9vw, 11px); font-weight: 700; letter-spacing: 0.18em;
        text-transform: uppercase; color: var(--muted); }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 40; display: flex; align-items: center;
       justify-content: space-between; gap: 16px;
       padding: clamp(12px, 1.4vw, 18px) var(--pad);
       border-bottom: 1px solid var(--line); background: var(--shade);
       backdrop-filter: blur(20px) saturate(1.4);
       -webkit-backdrop-filter: blur(20px) saturate(1.4); }
.brand { display: flex; align-items: center; gap: clamp(10px, 1vw, 13px); min-width: 0; }
.wordmark { font-size: clamp(12px, 1.1vw, 15px); font-weight: 900;
            letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap; }
.nav-r { display: flex; align-items: center; gap: clamp(9px, 1vw, 14px); flex: 0 0 auto; }
.navbtn { border: 1px solid var(--line); background: transparent; border-radius: 999px;
          cursor: pointer; transition: border-color 260ms ease, background-color 260ms ease,
          color 260ms ease; }
.navbtn:hover { border-color: var(--fg); }
.contact { display: flex; align-items: center; height: 36px; padding: 0 clamp(16px, 1.6vw, 22px);
           background: var(--fg); color: var(--bg); border-color: var(--fg);
           font-size: clamp(10px, 0.85vw, 11.5px); font-weight: 800; letter-spacing: 0.14em;
           text-transform: uppercase; white-space: nowrap; }
.contact:hover { background: var(--accent); border-color: var(--accent); color: #0B0B0C; }
.tt { position: relative; width: 62px; height: 36px; padding: 0; flex: 0 0 auto; }
.tt-knob { position: absolute; top: 3px; left: 3px; width: 30px; height: 30px;
           border-radius: 999px; background: var(--fg);
           transition: transform 460ms cubic-bezier(0.66,-0.24,0.28,1.28); }
html[data-theme="light"] .tt-knob { transform: translateX(26px); }
.tt-ico { position: absolute; top: 0; bottom: 0; width: 32px; display: flex;
          align-items: center; justify-content: center; color: var(--muted);
          transition: color 380ms ease; }
.tt-ico svg { position: relative; z-index: 2; width: 13px; height: 13px; }
.tt-ico.a { left: 0; color: var(--bg); }
.tt-ico.b { right: 0; }
html[data-theme="light"] .tt-ico.a { color: var(--muted); }
html[data-theme="light"] .tt-ico.b { color: var(--bg); }

/* ---------- hero ---------- */
.hero { padding: clamp(52px, 8vw, 116px) var(--pad) clamp(40px, 6.6vw, 96px);
        border-bottom: 1px solid var(--line); }
.hero-meta { display: flex; align-items: baseline; justify-content: space-between;
             gap: 16px; margin-bottom: clamp(24px, 3.2vw, 46px); }
.hero-h { margin: 0; font-size: clamp(48px, 13.7vw, 200px); font-weight: 900;
          line-height: 0.855; letter-spacing: -0.046em; text-transform: uppercase; }
.hl { display: block; overflow: hidden; }
.hl > span { display: block; animation: rise 1.25s cubic-bezier(0.16,1,0.3,1) both; }
.hl:nth-child(1) > span { animation-delay: 0.05s; }
.hl:nth-child(2) > span { animation-delay: 0.17s; }
.hl:nth-child(3) > span { animation-delay: 0.29s; }
@keyframes rise { from { transform: translateY(106%) skewY(3deg); } to { transform: none; } }
.quiet { color: var(--fg); opacity: 0.38; }
.rule { height: 1px; background: var(--line); margin: clamp(30px, 4vw, 58px) 0 clamp(18px, 1.9vw, 28px);
        transform-origin: 0 50%; animation: ruleIn 1.5s 0.5s cubic-bezier(0.16,1,0.3,1) both; }
@keyframes ruleIn { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.hero-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 48px;
             animation: fade 1s 0.72s cubic-bezier(0.16,1,0.3,1) both; }
.hero-foot p { margin: 0; max-width: 560px; font-size: clamp(14px, 1.2vw, 17px);
               font-weight: 500; line-height: 1.58; color: var(--muted); text-wrap: pretty; }
@keyframes fade { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.scroll-cue { white-space: nowrap; }

/* ---------- gallery ---------- */
main { padding: clamp(32px, 5vw, 74px) var(--pad) clamp(44px, 5.4vw, 78px); }
.sec-head { display: flex; align-items: baseline; justify-content: space-between;
            gap: 16px; margin-bottom: clamp(18px, 2.4vw, 34px); }
.masonry { column-count: 2; column-gap: var(--gap); }
.tile { break-inside: avoid; -webkit-column-break-inside: avoid; margin: 0 0 var(--gap);
        opacity: 0; transform: translateY(30px);
        transition: opacity 1s cubic-bezier(0.16,1,0.3,1), transform 1s cubic-bezier(0.16,1,0.3,1); }
.tile.in { opacity: 1; transform: none; }
.frame { position: relative; display: block; width: 100%; padding: 0; border: 0;
         background: var(--skel); overflow: hidden; cursor: pointer; }
.frame picture { display: block; }
.shot { width: 100%; height: auto; transform: scale(1); }
.tile.in .frame:hover .shot { transform: scale(var(--hs));
  transition: transform 760ms cubic-bezier(0.22,1,0.36,1); }
.vig { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0;
       background: linear-gradient(to top, rgba(0,0,0,0.58) 0%, rgba(0,0,0,0.12) 34%, rgba(0,0,0,0) 62%);
       transition: opacity 700ms cubic-bezier(0.22,1,0.36,1); }
.frame:hover .vig { opacity: 1; }
.meta { position: absolute; left: clamp(9px, 1.4vw, 20px); right: clamp(9px, 1.4vw, 20px);
        bottom: clamp(8px, 1.25vw, 18px); z-index: 3; display: flex; align-items: flex-end;
        justify-content: space-between; gap: 8px; color: #F4F3F1; pointer-events: none;
        opacity: 0; transform: translateY(10px);
        transition: opacity 620ms cubic-bezier(0.22,1,0.36,1), transform 620ms cubic-bezier(0.22,1,0.36,1); }
.frame:hover .meta { opacity: 1; transform: none; }
.meta-l { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.num { font-size: clamp(7px, 0.7vw, 10px); font-weight: 800; letter-spacing: 0.16em; opacity: 0.7; }
.ttl { font-size: clamp(11px, 1vw, 14px); font-weight: 800; letter-spacing: -0.01em; }
.phs { display: flex; gap: 4px; flex: 0 0 auto; }
.phs i { font-style: normal; display: flex; align-items: center; justify-content: center;
         width: clamp(15px, 1.35vw, 19px); height: clamp(15px, 1.35vw, 19px);
         border: 1px solid rgba(244,243,241,0.6); border-radius: 2px;
         font-size: clamp(8px, 0.68vw, 9.5px); font-weight: 800; color: #F4F3F1; }

/* ---------- lightbox ---------- */
.lb { position: fixed; inset: 0; z-index: 90; display: none; }
.lb.open { display: block; }
.lb-bd { position: absolute; inset: 0; background: var(--bg); animation: bdIn 380ms ease both; }
.lb.out .lb-bd { animation: bdOut 300ms ease both; }
@keyframes bdIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes bdOut { from { opacity: 1; } to { opacity: 0; } }
.lb-in { position: relative; z-index: 2; display: flex; flex-direction: column; height: 100%; }
.lb-in:focus { outline: none; }
.lb-chrome { animation: chromeIn 480ms 300ms cubic-bezier(0.16,1,0.3,1) both; }
.lb-chrome.b { animation-name: chromeUp; animation-delay: 380ms; }
.lb.out .lb-chrome { animation: chromeOut 140ms ease both; }
@keyframes chromeIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes chromeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes chromeOut { from { opacity: 1; } to { opacity: 0; } }
.lb-top { display: flex; align-items: center; justify-content: space-between; gap: 16px;
          padding: clamp(12px, 1.6vw, 22px) var(--pad); border-bottom: 1px solid var(--line);
          flex: 0 0 auto; }
.lb-title { font-size: clamp(13px, 1.1vw, 15px); font-weight: 900; letter-spacing: -0.01em; }
.lb-stage { position: relative; flex: 1 1 auto; min-height: 0;
            padding: clamp(8px, 3vw, 40px) clamp(16px, 7.5vw, 108px); }
.lb-stage img { position: absolute; top: 50%; left: 50%; max-width: 100%; max-height: 100%;
                width: auto; height: auto; opacity: 0; pointer-events: none;
                transform: translate(-50%,-50%) scale(1.018);
                transition: opacity 620ms cubic-bezier(0.22,1,0.36,1),
                            transform 900ms cubic-bezier(0.22,1,0.36,1); }
.lb-stage img.on { opacity: 1; transform: translate(-50%,-50%) scale(1); }
.lb-frame { position: absolute; inset: clamp(8px, 3vw, 40px) clamp(16px, 7.5vw, 108px); }
.arw { position: absolute; top: 50%; width: 52px; height: 52px; margin-top: -26px;
       border-radius: 999px; border: 1px solid var(--line); background: transparent;
       display: flex; align-items: center; justify-content: center; cursor: pointer;
       opacity: 0.62; z-index: 3;
       transition: border-color 280ms ease, transform 420ms cubic-bezier(0.22,1,0.36,1), opacity 280ms ease; }
.arw:hover { border-color: var(--fg); opacity: 1; }
.arw svg { width: 16px; height: 16px; }
.arw.l { left: clamp(6px, 1.8vw, 32px); }
.arw.r { right: clamp(6px, 1.8vw, 32px); }
.arw.l:hover { transform: translateX(-4px); }
.arw.r:hover { transform: translateX(4px); }
.xbtn { width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line);
        background: transparent; display: flex; align-items: center; justify-content: center;
        cursor: pointer; flex: 0 0 auto;
        transition: border-color 280ms ease, transform 460ms cubic-bezier(0.22,1,0.36,1); }
.xbtn:hover { border-color: var(--fg); transform: rotate(90deg); }
.xbtn svg { width: 15px; height: 15px; }
.lb-bot { display: flex; align-items: center; justify-content: space-between; gap: 32px;
          padding: clamp(12px, 1.5vw, 20px) var(--pad) clamp(18px, 2.2vw, 30px);
          border-top: 1px solid var(--line); flex: 0 0 auto; }
.lb-hint, .lb-sub { flex: 1 1 0; min-width: 0; }
.lb-sub { text-align: right; color: var(--fg); }
.seg { position: relative; display: flex; padding: 4px; border: 1px solid var(--line);
       border-radius: 999px; flex: 0 0 auto; }
.seg-ind { position: absolute; top: 4px; bottom: 4px; left: 4px; border-radius: 999px;
           background: var(--fg);
           transition: transform 520ms cubic-bezier(0.66,-0.14,0.24,1.12), width 420ms ease; }
.seg-b { position: relative; z-index: 2; border: 0; background: none; cursor: pointer;
         height: 44px; width: 124px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.15em;
         text-transform: uppercase; color: var(--muted); transition: color 320ms ease; }
.seg-b:hover { color: var(--fg); }
.seg-b.on { color: var(--bg); }

/* ---------- contact ---------- */
.foot { padding: clamp(48px, 7vw, 96px) var(--pad) clamp(30px, 3.4vw, 46px);
        border-top: 1px solid var(--line); }
.foot-grid { display: grid; grid-template-columns: 1fr 560px; gap: 96px; align-items: start; }
.foot-h { margin: clamp(14px, 1.6vw, 20px) 0 clamp(12px, 1.4vw, 18px);
          font-size: clamp(32px, 4.2vw, 60px); font-weight: 900; letter-spacing: -0.042em;
          line-height: 0.98; }
.foot-p { margin: 0 0 clamp(22px, 2.2vw, 30px); max-width: 420px;
          font-size: clamp(14px, 1.15vw, 16px); font-weight: 500; line-height: 1.58;
          color: var(--muted); text-wrap: pretty; }
.foot-mail { font-size: clamp(15px, 1.2vw, 17px); font-weight: 700; letter-spacing: -0.01em; }
.foot-links { display: flex; flex-wrap: wrap; gap: clamp(18px, 2vw, 26px);
              margin-top: clamp(18px, 2.4vw, 34px); font-size: clamp(12.5px, 1vw, 13.5px);
              font-weight: 600; color: var(--muted); }
.form { display: flex; flex-direction: column; gap: 22px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.fld { display: flex; flex-direction: column; gap: 9px; }
.fld input, .fld textarea { width: 100%; background: transparent; border: 0;
  border-bottom: 1px solid var(--line); color: var(--fg); font: inherit; font-size: 15px;
  font-weight: 600; letter-spacing: -0.005em; padding: 9px 0; outline: none; border-radius: 0;
  transition: border-color 320ms ease; }
.fld input:focus, .fld textarea:focus { border-bottom-color: var(--fg); }
.fld textarea { resize: vertical; min-height: 92px; line-height: 1.5; }
.fld input::placeholder, .fld textarea::placeholder { color: var(--muted); opacity: 0.55; font-weight: 500; }
.send { display: inline-flex; align-items: center; justify-content: center; gap: 12px;
        align-self: flex-start; background: var(--fg); color: var(--bg);
        border: 1px solid var(--fg); border-radius: 999px; padding: 15px 28px;
        font-size: 11.5px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
        cursor: pointer; white-space: nowrap;
        transition: background-color 260ms ease, border-color 260ms ease, color 260ms ease; }
.send:hover { background: var(--accent); border-color: var(--accent); color: #0B0B0C; }
.send svg { width: 14px; height: 14px; transition: transform 420ms cubic-bezier(0.22,1,0.36,1); }
.send:hover svg { transform: translateX(4px); }
.back:hover svg { transform: translateX(-4px); }
.hp { position: absolute; left: -9999px; opacity: 0; }
.foot-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px;
            margin-top: clamp(34px, 5vw, 72px); padding-top: 20px; border-top: 1px solid var(--line); }

/* ---------- thank you / 404 ---------- */
.ty { position: relative; display: flex; flex-direction: column; justify-content: center;
      min-height: calc(100vh - 190px); padding: clamp(48px, 6vw, 80px) var(--pad); }
.tapzone { position: absolute; inset: 0; z-index: 1; cursor: pointer; }
.burst { position: absolute; left: 50%; top: 46%; width: 0; height: 0; z-index: 0; pointer-events: none; }
.cf { position: absolute; left: 0; top: 0; opacity: 0; will-change: transform, opacity; }
.cf.a { animation: popA 2900ms cubic-bezier(0.12,0.72,0.28,1) both; }
.cf.b { animation: popB 2900ms cubic-bezier(0.12,0.72,0.28,1) both; }
@keyframes popA {
  0% { transform: translate(0,0) rotate(0deg) scale(0.35); opacity: 0; }
  9% { opacity: 1; }
  48% { transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(1); opacity: 1; }
  100% { transform: translate(calc(var(--x) * 1.16), calc(var(--y) + 520px)) rotate(calc(var(--r) * 1.7)) scale(0.86); opacity: 0; } }
@keyframes popB {
  0% { transform: translate(0,0) rotate(0deg) scale(0.35); opacity: 0; }
  9% { opacity: 1; }
  48% { transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(1); opacity: 1; }
  100% { transform: translate(calc(var(--x) * 1.16), calc(var(--y) + 520px)) rotate(calc(var(--r) * 1.7)) scale(0.86); opacity: 0; } }
.ty-kick { position: relative; z-index: 2; margin-bottom: clamp(18px, 2.4vw, 30px); }
.ty-h { position: relative; z-index: 2; margin: 0; font-size: clamp(44px, 9.2vw, 132px);
        font-weight: 900; line-height: 0.855; letter-spacing: -0.046em; text-transform: uppercase;
        cursor: pointer; }
.ty-foot { position: relative; z-index: 2; display: flex; align-items: flex-end;
           justify-content: space-between; gap: 48px; margin-top: clamp(28px, 3.6vw, 52px);
           animation: fade 1s 0.82s cubic-bezier(0.16,1,0.3,1) both; }
.ty-foot p { margin: 0; max-width: 470px; font-size: clamp(14px, 1.2vw, 17px); font-weight: 500;
             line-height: 1.58; color: var(--muted); text-wrap: pretty; }
.cue { position: relative; z-index: 2; align-self: flex-start; margin-top: clamp(26px, 3vw, 42px);
       display: inline-flex; align-items: center; gap: 10px; padding: 9px 17px 9px 14px;
       border: 1px solid var(--line); border-radius: 999px; pointer-events: none;
       font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
       color: var(--muted); animation: cueIn 760ms 3100ms cubic-bezier(0.16,1,0.3,1) both; }
.cue.gone { display: none; }
@keyframes cueIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.cue svg { width: 14px; height: 14px; color: var(--accent);
           animation: cuePulse 2.4s 3800ms ease-in-out infinite; }
@keyframes cuePulse { 0%,100% { transform: scale(1); opacity: 0.7; } 50% { transform: scale(1.25); opacity: 1; } }
.cue .touch { display: none; }
@media (hover: none) { .cue .mouse { display: none; } .cue .touch { display: inline; } }
.ty-bar { margin: 0; padding: 22px var(--pad); border-top: 1px solid var(--line); }

/* ---------- narrow ---------- */
@media (max-width: 900px) {
  .foot-grid { grid-template-columns: 1fr; gap: clamp(28px, 5vw, 48px); }
  .pair { grid-template-columns: 1fr; }
  .send { width: 100%; }
  .hero-foot, .ty-foot { flex-direction: column; align-items: flex-start; gap: 22px; }
  .scroll-cue { display: none; }
}
@media (max-width: 767px) {
  .lb-bot { flex-wrap: wrap; gap: 14px; }
  .seg { order: -1; width: 100%; }
  .seg-b { flex: 1 1 0; width: auto; min-width: 0; font-size: 10px; letter-spacing: 0.06em; }
  .lb-hint { display: none; }
  .lb-sub { text-align: left; font-size: 12px; font-weight: 800; }
  .arw { width: 44px; height: 44px; margin-top: -22px; }
  .meta { opacity: 1; transform: none; }
  .vig { opacity: 0.9; }
}

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