/* haijak.tv: one stylesheet for every page. Keeps the Wix site's charcoal + blue identity. */
@font-face { font-family: "Anton"; src: url(../fonts/anton.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Open Sans"; src: url(../fonts/open-sans.woff2) format("woff2"); font-weight: 300 800; font-display: swap; }

:root {
  --bg: #1c1c1e;
  --panel: #2a2a2d;
  --line: #3d3d42;
  --text: #f2f2f2;
  --muted: #b9b9be;
  --blue: #4aa8ff;      /* lifted from Wix #3899EC so it passes 4.5:1 on --bg */
  --wrap: 1240px;
  --display: "Anton", Impact, "Arial Narrow", sans-serif;
  --body: "Open Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--body); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--blue); color: #000; padding: .6rem 1rem; z-index: 20; }
.skip:focus { left: 1rem; }

/* header */
.site-head { position: sticky; top: 0; z-index: 10; background: rgba(20,20,22,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; flex-wrap: wrap; }
.brand { color: var(--text); text-decoration: none; font-family: var(--display); letter-spacing: .3em; font-size: 1.15rem; text-transform: uppercase; }
.nav { display: flex; gap: .25rem; flex-wrap: wrap; }
.nav a { color: var(--text); text-decoration: none; text-transform: uppercase; font-size: .8rem; font-weight: 600; letter-spacing: .12em; padding: .75rem .7rem; min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--blue); }

/* hero */
.hero { position: relative; display: grid; align-items: end; min-height: min(78vh, 760px); overflow: hidden; }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, var(--bg) 0%, rgba(28,28,30,.55) 45%, rgba(28,28,30,.1) 100%); }
.hero .wrap { position: relative; z-index: 1; padding-block: 3rem; }
.hero.short { min-height: min(46vh, 440px); }
.hero.focus-right > img { object-position: 74% 50%; } /* keeps the mech in frame on narrow screens */
h1, h2 { font-family: var(--display); font-weight: 400; text-transform: uppercase; line-height: 1.05; margin: 0 0 .5rem; }
h1 { font-size: clamp(2.4rem, 7vw, 5rem); letter-spacing: .12em; }
.tagline { color: var(--blue); font-family: var(--display); font-size: clamp(1.05rem, 2.6vw, 1.6rem); letter-spacing: .18em; text-transform: uppercase; margin: 0 0 1.5rem; line-height: 1.3; }
.btns { display: flex; gap: .75rem; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; min-height: 48px; padding: .7rem 1.4rem; border-radius: 4px; font-weight: 700; text-decoration: none; text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; border: 2px solid var(--blue); background: var(--blue); color: #08131f; cursor: pointer; font-family: var(--body); }
.btn.ghost { background: transparent; color: var(--text); }

/* home video header: matches the Wix header (980px stage, name left, nav + icon bar right, logo top centre) */
.vhead { --h: clamp(440px, 56.25vw, 88vh); position: relative; height: var(--h); overflow: hidden; background: #000; }
.vbg { position: absolute; inset: 0; }
.vbg img, .vbg iframe { position: absolute; top: 50%; left: 50%; width: max(100%, calc(var(--h) * 16 / 9)); height: auto; aspect-ratio: 16 / 9; max-width: none; transform: translate(-50%, -50%); border: 0; pointer-events: none; }
.vbg iframe { opacity: 0; transition: opacity .8s; transform: translate(-50%, -50%) scale(1.2); } /* oversize so YouTube's title bar and control strip fall outside the header */
.vbg iframe.on { opacity: 1; }
.vbg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,.45), rgba(0,0,0,.25) 35%, rgba(0,0,0,.25) 75%, var(--bg)); }
.vhead .stage { position: relative; z-index: 1; width: min(100% - 2.5rem, 980px); margin-inline: auto; display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem; padding-top: 2rem; }
.vlogo { position: absolute; left: 50%; top: 0; transform: translateX(-50%); width: 143px; opacity: .85; }
.vid { text-align: center; }
/* HAIJAK: one span per letter, spread edge to edge so the word spans the full width of the lines below it */
.vname { display: flex; justify-content: space-between; font-family: var(--display); font-weight: 400; font-size: 76px; line-height: 1; letter-spacing: 0; margin: 0; color: #fff; text-shadow: 0 0 3px #000, 2px 2px 0 rgba(0,0,0,.55); }
/* negative right margins cancel the trailing letter-spacing, so each line's box ends at its last letter */
.vsub { font-size: 15px; font-weight: 600; letter-spacing: .2em; margin: .5rem -.2em 0 0; color: #fff; text-shadow: 0 0 2px #000, 1px 1px 0 rgba(0,0,0,.6); }
.vtag { font-family: var(--display); font-size: 17px; letter-spacing: .5em; line-height: 1.6; color: #00a9ff; text-transform: uppercase; margin: .3rem -.5em 0 0; text-align: center; text-shadow: -1px -1px 0 rgba(0,0,0,.5), 1px 1px 0 rgba(0,0,0,.5), -1px 1px 0 rgba(0,0,0,.5), 1px -1px 0 rgba(0,0,0,.5); }
.vright { display: flex; flex-direction: column; align-items: flex-end; }
.vhead .nav a { text-shadow: 0 1px 3px #000; font-weight: 400; letter-spacing: .04em; font-size: .85rem; }
.linkbar { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0; }
.linkbar a, .linkbar span { display: grid; place-items: center; width: 34px; height: 44px; }
.linkbar img { width: 20px; height: 20px; object-fit: contain; filter: drop-shadow(0 1px 2px #000); }
.linkbar a:hover img { transform: scale(1.15); }
.vpause { position: absolute; z-index: 1; right: 1rem; bottom: 1rem; min-height: 44px; padding: .5rem 1rem; border: 1px solid rgba(255,255,255,.5); border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; font: 600 .8rem var(--body); cursor: pointer; }
.vpause:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

/* reel slot waiting for media (Belkin) */
.reel.pending .thumb img { filter: grayscale(1) brightness(.45); }
.reel.pending .soon { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font: 700 .85rem var(--body); letter-spacing: .12em; text-transform: uppercase; }
.reel.pending h3 { color: var(--muted); }

/* cv experience */
.src { color: var(--muted); margin: -.75rem 0 1.5rem; }
.jobs { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.job { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--blue); border-radius: 6px; padding: 1.1rem 1.4rem; }
.job h3 { margin: 0; font-size: 1.1rem; }
.job .org { margin: 0; color: var(--blue); font-weight: 600; }
.job .when { margin: 0 0 .5rem; color: var(--muted); font-size: .85rem; }
.job p { margin: 0 0 .4rem; overflow-wrap: anywhere; }
.job .hl { margin: 0; padding-left: 1.1rem; color: var(--muted); font-size: .9rem; }

/* sections */
.section { padding-block: 3.5rem; scroll-margin-top: 64px; }
.section > .wrap > h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); letter-spacing: .08em; margin-bottom: 1.5rem; }

/* reel grid */
.reels { list-style: none; margin: 0; padding: 0; display: grid; gap: 2rem 1.5rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.reel button { all: unset; cursor: pointer; display: block; width: 100%; }
.reel button:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.thumb { display: block; position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 4px; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.reel button:hover .thumb img { transform: scale(1.04); }
.thumb .play { display: block; position: absolute; inset: 0; margin: auto; width: 56px; height: 56px; border-radius: 50%; background: rgba(0,0,0,.65); border: 2px solid #fff; }
.thumb .play::after { content: ""; position: absolute; left: 22px; top: 16px; border: 12px solid transparent; border-left: 18px solid #fff; border-right: 0; }
.dur { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.75); color: #fff; font-size: .75rem; padding: 1px 6px; border-radius: 2px; }
.reel h3 { font-size: 1.05rem; line-height: 1.35; margin: .8rem 0 .3rem; overflow-wrap: anywhere; }
.reel p { color: var(--muted); font-size: .88rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* player dialog */
dialog.player { width: min(100% - 1.5rem, 1100px); max-height: calc(100dvh - 1.5rem); padding: 0; border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 6px; }
dialog.player::backdrop { background: rgba(0,0,0,.85); }
.player .frame { aspect-ratio: 16 / 9; background: #000; }
.player iframe { width: 100%; height: 100%; border: 0; display: block; }
.player .meta { padding: 1rem 1.25rem 1.25rem; }
.player h3 { margin: 0 0 .5rem; font-size: 1.15rem; }
.player .desc { color: var(--muted); font-size: .9rem; white-space: pre-line; max-height: 30vh; overflow: auto; overflow-wrap: anywhere; }
.player .close { position: absolute; top: .4rem; right: .4rem; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(0,0,0,.7); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; }

/* cards (cv, contact) */
.cards { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 1.5rem; }
.card h2 { font-size: 1.35rem; letter-spacing: .08em; color: var(--blue); }
.card ul { margin: 0; padding-left: 1.1rem; }
.card li { margin: .2rem 0; }
.social { list-style: none; padding: 0 !important; display: flex; flex-wrap: wrap; gap: .5rem; }
.social a { display: inline-flex; align-items: center; gap: .55rem; min-height: 44px; padding: .4rem .9rem .4rem .5rem; border: 1px solid var(--line); border-radius: 999px; color: var(--text); text-decoration: none; }
.social a:hover { border-color: var(--blue); }
.social img { width: 24px; height: 24px; object-fit: contain; }

/* contact form */
.contact-grid { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
.contact-info { display: grid; gap: 1.5rem; }
.cform .field { margin-bottom: 1rem; }
.cform label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .35rem; }
.cform input, .cform textarea { width: 100%; min-height: 48px; padding: .7rem .85rem; font: inherit; color: var(--text); background: #18181a; border: 1px solid #6b6b72; border-radius: 4px; }
.cform textarea { resize: vertical; min-height: 10rem; }
.cform input:focus-visible, .cform textarea:focus-visible { outline: 3px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.cform .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; align-items: center; justify-content: flex-end; gap: 1rem; flex-wrap: wrap; }
.form-status { margin: 0 auto 0 0; font-size: .92rem; }
.form-status.ok { color: #7fd99a; }
.form-status.err { color: #ff8a8a; }
.btn:disabled { opacity: .6; cursor: wait; }

/* footer */
.site-foot { border-top: 1px solid var(--line); background: #141416; color: var(--muted); font-size: .82rem; padding-block: 2rem; text-align: center; }
.site-foot p { margin: .25rem 0; }
.site-foot .social { justify-content: center; margin-bottom: 1rem; }

@media (max-width: 640px) {
  .contact-grid { grid-template-columns: 1fr; }
  .form-foot .btn { width: 100%; justify-content: center; }
  .site-head .wrap { justify-content: center; padding-block: .4rem; }
  .brand { font-size: 1rem; letter-spacing: .22em; }
  .nav a { padding: .6rem .55rem; font-size: .75rem; }
  .hero { min-height: 70vh; }
  .section { scroll-margin-top: 104px; }
  .vhead .stage { flex-direction: column-reverse; align-items: center; text-align: center; padding-top: 1rem; gap: .5rem; }
  .vright { align-items: center; }
  .vlogo { position: static; transform: none; width: 110px; margin: 0 auto; order: 3; }
  .vname { font-size: 62px; }
  .vsub { font-size: 13px; letter-spacing: .15em; margin-right: -.15em; }
  .vid { background: rgba(0,0,0,.75); padding: .5rem .9rem .6rem; border-radius: 8px; } /* YouTube's centre overlay (pause/arrows) lands behind this block on phones */
  .vtag { font-size: 14px; letter-spacing: .3em; margin-right: -.3em; }
}
@media (prefers-reduced-motion: reduce) { .thumb img { transition: none; } }
