*, *::before, *::after { box-sizing: border-box; }
:root { --bg: #0a0a0c; --surface: #121217; --surface-hover: #1a1a24; --red: #ff3b30; --text: #ededed; --muted: #a1a1aa; --border: #27272a; --cursor-near: 0; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "DM Sans", sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img, video { display: block; max-width: 100%; }
h1, h2, h3 { font-family: "Space Grotesk"; margin: 0; }

/* Header */
.site-header { align-items: center; display: flex; height: 80px; justify-content: space-between; left: 0; padding: 0 5vw; position: fixed; right: 0; top: 0; transition: background-color .3s ease, border-color .3s ease, height .3s ease; z-index: 20; }
.site-header.is-scrolled { background: rgba(10,10,12,.84); border-bottom: 1px solid rgba(255,255,255,.08); backdrop-filter: blur(18px); height: 68px; }
.brand, .nav-links button { background: none; border: 0; color: var(--text); }
.brand { align-items: center; display: flex; font-family: "Space Grotesk"; font-size: 15px; font-weight: 600; gap: 10px; }
.brand-mark { align-items: center; background: var(--red); border-radius: 50%; color: #fff; display: inline-flex; font-size: 11px; height: 31px; justify-content: center; width: 31px; }
.nav-links { display: flex; gap: 28px; margin-left: 8%; }
.nav-links button, .nav-links a { align-items: center; color: var(--muted); display: flex; font-size: 12px; letter-spacing: .03em; text-transform: uppercase; transition: color .2s ease, transform .2s ease; }
.nav-links button:hover, .nav-links a:hover { color: var(--text); transform: translateY(-2px); }
.nav-links button { position: relative; }
.nav-links button::after { background: var(--red); border-radius: 50%; bottom: -8px; content: ""; height: 4px; left: 50%; opacity: 0; position: absolute; transform: translate(-50%, 4px); transition: opacity .25s ease, transform .25s ease; width: 4px; }
.nav-links button.is-active { color: var(--text); }
.nav-links button.is-active::after { opacity: 1; transform: translate(-50%, 0); }
.header-actions, .header-email { align-items: center; display: flex; gap: 7px; }
.header-email { border-bottom: 1px solid var(--red); font-size: 12px; padding-bottom: 5px; text-transform: uppercase; transition: color .2s ease; }
.header-email:hover { color: var(--red); }
.menu-toggle { display: none; background: transparent; border: 0; color: var(--text); font-size: 22px; line-height: 1; }

/* Lightbox */
.lightbox { align-items: center; animation: fadeIn .3s ease both; background: rgba(6,6,8,.92); backdrop-filter: blur(14px); display: flex; flex-direction: column; gap: 18px; inset: 0; justify-content: center; padding: 24px; position: fixed; z-index: 500; }
.lightbox[hidden] { display: none; }
.lightbox-player { animation: rise .45s cubic-bezier(.2,.8,.2,1) both; aspect-ratio: 16 / 9; background: #000; box-shadow: 0 30px 80px rgba(0,0,0,.7), 0 0 0 1px var(--border); max-height: 82vh; width: min(1120px, 100%); }
.lightbox-player iframe { border: 0; display: block; height: 100%; width: 100%; }
.lightbox-close { align-items: center; background: none; border: 1px solid var(--border); border-radius: 50%; color: var(--text); display: flex; font-size: 18px; height: 46px; justify-content: center; position: absolute; right: 28px; top: 24px; transition: background-color .2s ease, border-color .2s ease, transform .2s ease; width: 46px; }
.lightbox-close:hover { background: var(--red); border-color: var(--red); transform: rotate(90deg); }
.lightbox-caption { color: var(--muted); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; }
.lightbox-caption b { color: var(--red); }
.lightbox-caption a { border-bottom: 1px solid var(--border); color: var(--text); transition: color .2s ease, border-color .2s ease; }
.lightbox-caption a:hover { border-color: var(--red); color: var(--red); }

/* Layout */
.section-pad { margin: 0 auto; max-width: 1280px; padding: 140px 5vw; position: relative; }
.hero { align-items: center; display: grid; grid-template-columns: 1.05fr .95fr; min-height: 100vh; padding-top: 150px; }
.eyebrow, .section-kicker { color: var(--red); font-family: "Space Grotesk"; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.red-dot { background: var(--red); border-radius: 50%; display: inline-block; height: 7px; margin-right: 8px; width: 7px; }
h1 { font-size: clamp(4.5rem, 10vw, 9rem); letter-spacing: -.09em; line-height: .84; margin: 31px 0 35px; }
h1 em, .section-heading span, .contact-heading em { color: transparent; font-style: normal; -webkit-text-stroke: 1px rgba(237,237,237,.8); }
.hero-summary { color: var(--muted); font-size: 16px; line-height: 1.65; max-width: 375px; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 38px; }
.button { align-items: center; border: 1px solid transparent; display: inline-flex; font-size: 12px; font-weight: 600; gap: 10px; justify-content: center; letter-spacing: .03em; padding: 15px 19px; text-transform: uppercase; transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease; }
.button:hover { transform: translateY(-3px); }
.button-red { background: var(--red); color: #fff; }
.button-red:hover { box-shadow: 0 12px 28px rgba(255,59,48,.23); }
.button-ghost { border-color: var(--border); color: var(--text); }
.button-ghost:hover { background: var(--surface-hover); border-color: #555; }

/* Hero visual */
.hero-visual { justify-self: end; max-width: 450px; width: 100%; }
.portrait-frame { aspect-ratio: .82; background: #18181c; overflow: hidden; position: relative; transition: box-shadow .3s ease, transform .3s ease; }
.portrait-frame::after { border: 1px solid var(--red); content: ""; inset: 18px; opacity: .6; pointer-events: none; position: absolute; transition: inset .3s ease, opacity .3s ease; }
.portrait-frame img { height: 100%; object-fit: cover; object-position: center top; opacity: 1; transition: transform .45s cubic-bezier(.2,.8,.2,1), filter .3s ease; width: 100%; }
.portrait-frame:hover { box-shadow: 0 18px 55px rgba(255,59,48,.28); transform: translateY(-7px) rotate(1deg); }
.portrait-frame:hover::after { inset: 12px; opacity: 1; }
.portrait-frame:hover img { filter: saturate(1.12) contrast(1.04); transform: scale(1.045) rotate(-1deg); }
.portrait-label { bottom: 30px; color: #fff; font-size: 9px; font-weight: 700; letter-spacing: .12em; line-height: 1.8; position: absolute; right: 32px; text-align: right; text-shadow: 0 1px 6px rgba(0,0,0,.6); z-index: 1; }
.portrait-label b { color: #fff; font-weight: 700; }
.play-reel { display: flex; justify-content: flex-end; padding-top: 18px; }
.play-reel a { align-items: center; color: var(--muted); display: flex; font-size: 11px; gap: 9px; text-transform: uppercase; transition: color .2s ease; }
.play-reel a:hover { color: var(--red); }
.hero-note { bottom: 42px; color: var(--muted); font-size: 10px; letter-spacing: .15em; position: absolute; text-transform: uppercase; }
.hero-note span { color: var(--red); font-size: 16px; margin-left: 8px; }

/* About */
.about-section, .skills-section, .education-section { border-top: 1px solid var(--border); }
.about-grid, .education-layout { display: grid; gap: 11vw; grid-template-columns: 1fr 1fr; margin-top: 72px; }
.about-heading-wrap { position: relative; }
.about-showcase { --tx: 0px; --ty: 0px; --rx: 0deg; --ry: 0deg; --near: 0; align-items: flex-end; display: flex; justify-content: center; margin: 56px auto 0; max-width: 520px; perspective: 900px; position: relative; width: 100%; }
.about-showcase::before { background: radial-gradient(circle, rgba(255,59,48,calc(.08 + var(--near) * .3)) 0%, transparent 65%); border-radius: 50%; content: ""; inset: 10% -10% -5%; position: absolute; transition: opacity .3s ease; z-index: 0; }
.about-showcase img { display: block; filter: drop-shadow(0 22px 30px rgba(0,0,0,.55)) drop-shadow(0 0 calc(var(--near) * 34px) rgba(255,59,48,calc(var(--near) * .45))); height: auto; position: relative; transform: translate3d(var(--tx), var(--ty), 0) rotateX(var(--rx)) rotateY(var(--ry)) scale(calc(1 + var(--near) * .07)); transition: transform .25s cubic-bezier(.2,.8,.2,1), filter .3s ease; width: 100%; z-index: 1; }
.showcase-tag { bottom: 10px; color: var(--muted); font-size: 9px; letter-spacing: .28em; line-height: 1.7; opacity: 0; position: absolute; right: -4%; text-align: right; transform: translateX(-10px); transition: opacity .35s ease, transform .35s ease; z-index: 2; }
.showcase-tag b { color: var(--red); display: block; font-weight: 600; }
.about-showcase.is-near .showcase-tag { opacity: 1; transform: translateX(0); }
.section-heading { font-size: clamp(3rem, 6vw, 6rem); letter-spacing: -.08em; line-height: .9; }
.large-copy { font-family: "Space Grotesk"; font-size: 23px; line-height: 1.25; margin: 0 0 27px; max-width: 460px; }
.body-copy { color: var(--muted); font-size: 14px; line-height: 1.75; max-width: 510px; }
.stat-row { border-top: 1px solid var(--border); display: flex; gap: 40px; margin-top: 47px; padding-top: 22px; }
.stat-row div { display: flex; flex-direction: column; }
.stat-row strong { color: var(--red); font-family: "Space Grotesk"; font-size: 32px; letter-spacing: -.06em; }
.stat-row span { color: var(--muted); font-size: 10px; margin-top: 4px; text-transform: uppercase; }

/* Experience */
.section-title-row { align-items: end; display: flex; justify-content: space-between; margin: 72px 0 56px; }
.title-aside { color: var(--muted); font-size: 11px; line-height: 1.7; text-align: right; text-transform: uppercase; }
.experience-section { background: linear-gradient(180deg, transparent, rgba(255,255,255,.018)); }
.experience-list { --progress: 0%; border-top: 1px solid var(--border); position: relative; }
.experience-list::before { background: var(--border); bottom: 0; content: ""; left: 5px; position: absolute; top: 0; width: 1px; }
.experience-list::after { background: var(--red); box-shadow: 0 0 14px rgba(255,59,48,.6); content: ""; height: var(--progress); left: 5px; position: absolute; top: 0; transition: height .15s linear; width: 1px; }
.experience-card { display: grid; gap: 30px; grid-template-columns: 48px 1fr; padding: 35px 0 42px 28px; position: relative; transition: padding-left .25s ease, background-color .25s ease; }
.experience-card::before { background: var(--bg); border: 1px solid var(--border); border-radius: 50%; content: ""; height: 9px; left: 1px; position: absolute; top: 37px; transition: background-color .3s ease, border-color .3s ease, box-shadow .3s ease, transform .3s ease; width: 9px; z-index: 1; }
.experience-card.is-passed::before { background: var(--red); border-color: var(--red); box-shadow: 0 0 12px rgba(255,59,48,.7); transform: scale(1.25); }
.experience-card:hover { background: var(--surface); padding-left: 40px; }
.experience-num { color: var(--red); font-family: "Space Grotesk"; font-size: 12px; }
.experience-top { align-items: start; display: flex; justify-content: space-between; }
.experience-top h3 { font-size: 22px; font-weight: 500; letter-spacing: -.04em; }
.company, .experience-top time { color: var(--muted); font-size: 12px; margin: 9px 0 0; }
.company span { color: var(--red); margin: 0 5px; }
.experience-top time { margin: 3px 0 0; text-transform: uppercase; }
.experience-main ul { color: var(--muted); display: grid; font-size: 13px; gap: 9px; line-height: 1.55; list-style: none; margin: 28px 0 0; max-width: 750px; padding: 0; }
.experience-main li::before { color: var(--red); content: "—"; margin-right: 12px; }

/* Skills */
.skills-grid { display: grid; gap: 1px; grid-template-columns: repeat(3, 1fr); margin-top: 72px; }
.skill-group { border: 1px solid var(--border); min-height: 190px; padding: 25px; transition: background-color .25s ease, transform .25s ease; }
.skill-group:hover { background: var(--surface-hover); transform: translateY(-5px); }
.skill-group h3 { color: var(--red); font-size: 12px; font-weight: 500; margin-bottom: 23px; text-transform: uppercase; }
.skill-group span { border-bottom: 1px solid var(--border); color: var(--text); display: block; font-size: 13px; padding: 8px 0; }
.tag-stagger .skill-group span { opacity: 0; transform: translateX(-14px); }
.tag-stagger.in-view .skill-group span { animation: tagLight .7s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i) * 70ms); }
@keyframes tagLight { 0% { color: var(--red); opacity: 0; transform: translateX(-14px); } 45% { color: var(--red); border-color: var(--red); opacity: 1; transform: translateX(0); } 100% { color: var(--text); opacity: 1; transform: translateX(0); } }

/* Projects */
.projects-section { border-top: 1px solid var(--border); }
.project-link { color: var(--red); transition: color .2s ease, transform .2s ease; }
.project-link:hover { color: var(--text); transform: translateX(4px); }
.projects-grid { display: grid; gap: 1px; grid-template-columns: repeat(2, 1fr); }
.project-card { background: var(--surface); display: grid; gap: 28px; grid-template-columns: 35px 1fr; isolation: isolate; min-height: 220px; overflow: hidden; padding: 28px; position: relative; transition: background-color .25s ease, transform .25s ease; }
.project-card:hover { background: var(--surface-hover); transform: translateY(-5px); }
.project-card > * { position: relative; z-index: 2; }
.project-thumb { height: 100%; inset: 0; object-fit: cover; object-position: center 30%; opacity: 0; position: absolute !important; transform: scale(1.12); transition: opacity .45s ease, transform .9s cubic-bezier(.2,.8,.2,1); width: 100%; z-index: 0 !important; }
.project-card::after { background: linear-gradient(180deg, rgba(10,10,12,.35) 0%, rgba(10,10,12,.88) 65%, rgba(10,10,12,.96) 100%); content: ""; inset: 0; opacity: 0; position: absolute; transition: opacity .45s ease; z-index: 1; }
.project-card:hover .project-thumb { opacity: .85; transform: scale(1); }
.project-thumb--zoom { transform: scale(3.3); }
.project-card:hover .project-thumb--zoom { transform: scale(3); }
.project-card:hover::after { opacity: 1; }
.project-card.is-autoplaying .project-thumb { opacity: .85; transform: scale(1); }
.project-card.is-autoplaying::after { opacity: 1; }
.project-number { color: var(--red); font-family: "Space Grotesk"; font-size: 12px; }
.project-card p { color: var(--red); font-size: 10px; letter-spacing: .1em; margin: 0 0 23px; text-transform: uppercase; }
.project-card h3 { align-items: center; display: flex; font-size: 24px; font-weight: 500; gap: 8px; letter-spacing: -.05em; }
.project-card h3 span.arrow { color: var(--red); transition: transform .2s ease; }
.project-card:hover h3 span.arrow { transform: translate(3px, -3px); }
.project-copy { color: var(--muted); display: block; font-size: 13px; line-height: 1.6; margin-top: 17px; max-width: 360px; }

/* Education */
.education-item { align-items: start; border-top: 1px solid var(--border); display: grid; gap: 30px; grid-template-columns: 115px 1fr; padding: 25px 0; }
.education-item time { color: var(--red); font-size: 11px; }
.education-item h3 { font-size: 18px; font-weight: 500; }
.education-item p { color: var(--muted); font-size: 13px; margin: 8px 0 0; }

/* Contact */
.contact-section { background: #111115; border-top: 1px solid var(--border); max-width: none; padding-left: 10vw; padding-right: 10vw; }
.contact-layout { display: grid; gap: 12vw; grid-template-columns: 1fr .8fr; margin: 72px auto 0; max-width: 1120px; }
.contact-heading { font-family: "Space Grotesk"; font-size: clamp(3.5rem, 7vw, 7rem); letter-spacing: -.09em; line-height: .86; }
.contact-details { display: flex; flex-direction: column; gap: 14px; margin-top: 42px; }
.contact-details a, .contact-details span { align-items: center; color: var(--muted); display: flex; font-size: 13px; gap: 10px; transition: color .2s ease; }
.contact-details a:hover { color: var(--red); }
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.contact-form label { color: var(--muted); display: flex; flex-direction: column; font-size: 10px; gap: 9px; letter-spacing: .12em; text-transform: uppercase; }
.contact-form input, .contact-form textarea, .contact-form select { background: transparent; border: 0; border-bottom: 1px solid #3b3b40; color: var(--text); font-family: inherit; outline: none; padding: 11px 0; resize: vertical; transition: border-color .2s ease; }
.contact-form input:focus, .contact-form textarea:focus, .contact-form select:focus { border-color: var(--red); }
.contact-form input::placeholder, .contact-form textarea::placeholder { color: #5c5c63; }
.contact-form select[multiple] { background: var(--surface); border: 1px solid #3b3b40; padding: 8px; }
.contact-form select[multiple] option { color: var(--text); padding: 6px 8px; }
.submit-button { align-self: start; margin-top: 12px; }
.hidden-field { display: none; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); color: var(--muted); display: flex; font-size: 10px; justify-content: space-between; padding: 25px 5vw; text-transform: uppercase; }
.site-footer a { color: var(--red); }

/* Back to top */
.back-to-top { align-items: center; background: var(--red); border: 0; border-radius: 50%; bottom: 30px; box-shadow: 0 10px 30px rgba(255,59,48,.35); color: #fff; display: flex; font-size: 20px; height: 50px; justify-content: center; opacity: 0; pointer-events: none; position: fixed; right: 30px; transform: translateY(24px) scale(.85); transition: opacity .35s ease, transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .25s ease; width: 50px; z-index: 400; }
.back-to-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }
.back-to-top:hover { box-shadow: 0 14px 38px rgba(255,59,48,.5); transform: translateY(-4px) scale(1.06); }

/* Reveal animations */
.reveal { animation: rise .8s ease both; }
.reveal.delay-2 { animation-delay: .2s; }
.scroll-reveal { opacity: 0; transform: translateY(56px); transition: opacity .9s cubic-bezier(.2,.8,.2,1), transform .9s cubic-bezier(.2,.8,.2,1); }
.scroll-reveal.delay-2 { transition-delay: .18s; }
.scroll-reveal.in-view { opacity: 1; transform: translateY(0); }
.about-showcase.scroll-reveal img { transition: transform .25s cubic-bezier(.2,.8,.2,1), filter .3s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(25px); } to { opacity: 1; transform: translateY(0); } }

/* Custom cursor */
.cursor-dot { display: none; }
@media (pointer: fine) {
  body, button, a, input, textarea { cursor: none; }
  .cursor-dot { background: var(--red); border-radius: 50%; box-shadow: 0 0 calc(6px + var(--cursor-near) * 22px) rgba(255,59,48,calc(.35 + var(--cursor-near) * .5)); display: block; height: 10px; left: -20px; mix-blend-mode: screen; opacity: 0; pointer-events: none; position: fixed; top: -20px; transform: translate(-50%, -50%) scale(calc(1 + var(--cursor-near) * 2.6)); transition: transform .18s ease, opacity .25s ease, box-shadow .2s ease; width: 10px; z-index: 9999; }
  .cursor-dot.is-visible { opacity: 1; }
  .cursor-dot.is-link { background: transparent; border: 1.5px solid var(--red); box-shadow: 0 0 18px rgba(255,59,48,.35); height: 34px; mix-blend-mode: normal; width: 34px; }
}

/* Mobile */
@media (max-width: 760px) {
  .site-header { height: 68px; padding: 0 22px; }
  .header-email { display: none; }
  .menu-toggle { display: block; }
  .nav-links { background: rgba(10,10,12,.97); border-bottom: 1px solid var(--border); display: none; flex-direction: column; gap: 23px; left: 0; margin: 0; padding: 28px 22px; position: absolute; right: 0; top: 68px; }
  .nav-links.open { display: flex; }
  .section-pad { padding: 90px 22px; }
  .hero { display: block; min-height: 720px; padding-top: 130px; }
  h1 { font-size: clamp(4.1rem, 20vw, 7rem); }
  .hero-copy { padding-right: 128px; }
  .hero-summary { font-size: 14px; }
  .hero-buttons { align-items: flex-start; flex-direction: column; gap: 9px; margin-top: 28px; }
  .hero-visual { position: absolute; right: 22px; top: 545px; width: 112px; }
  .portrait-frame { aspect-ratio: .78; }
  .portrait-frame::after { inset: 8px; }
  .portrait-label { bottom: 15px; font-size: 6px; right: 12px; }
  .play-reel { padding-top: 10px; }
  .play-reel a { font-size: 8px; gap: 4px; }
  .hero-note { display: none; }
  .about-grid, .education-layout, .contact-layout { display: flex; flex-direction: column; gap: 45px; margin-top: 45px; }
  .about-showcase { margin: 30px auto 0; max-width: 250px; }
  .about-showcase::before { inset: 15% -20% 0; }
  .showcase-tag { display: none; }
  .about-grid { gap: 28px; margin-top: 28px; }
  .about-grid .section-heading { font-size: clamp(2.6rem, 13vw, 4rem); }
  .large-copy { font-size: 19px; }
  .section-title-row { margin: 45px 0 35px; }
  .section-heading { font-size: clamp(3rem, 15vw, 5rem); }
  .experience-top { flex-direction: column; gap: 15px; }
  .experience-card { grid-template-columns: 22px 1fr; gap: 16px; padding-left: 22px; }
  .experience-card:hover { padding-left: 30px; }
  .experience-top h3 { font-size: 19px; }
  .skills-grid, .projects-grid { grid-template-columns: 1fr; margin-top: 45px; }
  .skill-group { min-height: unset; }
  .stat-row { gap: 18px; justify-content: space-between; }
  .stat-row strong { font-size: 27px; }
  .education-item { gap: 14px; grid-template-columns: 88px 1fr; }
  .contact-section { padding-left: 22px; padding-right: 22px; }
  .site-footer { gap: 10px; padding: 22px; }
  .site-footer span:nth-child(2) { display: none; }
}
