/* ============================================================
   TOKENS
============================================================ */
:root{
  --bg: #FFFFFF;
  --bg-soft: #F6F5F3;
  --ink: #141412;
  --grey-700: #4B4B4E;
  --grey-500: #79797E;
  --grey-300: #B7B6B4;
  --line: rgba(20,20,18,0.08);
  --line-strong: rgba(20,20,18,0.14);

  --accent: #F68B3A;
  --accent-strong: #E4752A;
  --accent-tint: #FDEEDD;
  --accent-glow: rgba(246,139,58,0.28);

  --glass-bg: rgba(255,255,255,0.55);
  --glass-bg-strong: rgba(255,255,255,0.72);
  --glass-border: rgba(255,255,255,0.65);

  --font-display: "Instrument Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --container: 1220px;
  --radius-xl: 32px;
  --radius-l: 24px;
  --radius-m: 16px;
  --radius-s: 10px;
  --ease: cubic-bezier(.19,1,.22,1);
  --ease-soft: cubic-bezier(.22,.61,.36,1);
}
.hero-portrait{
    position:relative;
    width:100%;
    height:100%;
    overflow:hidden;
    border-radius:32px;
    background:#111;
}

.profile-image{
    width:100%;
    height:100%;
    object-fit:cover;
    object-position:center top;
    display:block;
    transition:transform .6s ease;
}

.hero-portrait:hover .profile-image{
    transform:scale(1.04);
}
*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body{
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.section-inner{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 44px;
}

h1,h2{
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0;
}

em{
  font-style: italic;
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--accent);
}

a{ color: inherit; text-decoration: none; }
img{ max-width: 100%; display: block; }
::selection{ background: var(--accent); color: #fff; }

.eyebrow{
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin: 0 0 18px;
}

/* ============================================================
   OPENING TITLE CARD
============================================================ */
.titlecard{
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  animation: titlecardOut 900ms var(--ease) 1400ms forwards;
}
.titlecard-name{
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(32px, 5vw, 52px);
  letter-spacing: -0.01em;
  opacity: 0;
  animation: titlecardIn 900ms var(--ease-soft) 150ms forwards;
}
.titlecard-sub{
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey-500);
  opacity: 0;
  animation: titlecardIn 900ms var(--ease-soft) 420ms forwards;
}
@keyframes titlecardIn{
  from{ opacity: 0; transform: translateY(10px); }
  to{ opacity: 1; transform: translateY(0); }
}
@keyframes titlecardOut{
  from{ opacity: 1; visibility: visible; }
  to{ opacity: 0; visibility: hidden; pointer-events: none; }
}
@media (prefers-reduced-motion: reduce){
  .titlecard{ display: none; }
}

/* ============================================================
   SCENE RAIL (signature scroll-progress element, desktop only)
============================================================ */
.scene-rail{
  position: fixed;
  right: 34px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 700;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.scene-rail a{
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey-300);
  transition: color 300ms var(--ease);
}
.scene-rail a span{
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--grey-300);
  transition: background 300ms var(--ease), transform 300ms var(--ease), box-shadow 300ms var(--ease);
}
.scene-rail a:hover{ color: var(--grey-700); }
.scene-rail a.active{ color: var(--ink); }
.scene-rail a.active span{
  background: var(--accent);
  transform: scale(1.5);
  box-shadow: 0 0 0 5px var(--accent-glow);
}
@media (max-width: 1180px){ .scene-rail{ display: none; } }

/* ============================================================
   NAV
============================================================ */
.nav{
  position: fixed;
  top: 22px;
  left: 0; right: 0;
  z-index: 900;
  display: flex;
  justify-content: center;
  padding: 0 20px;
}
.nav-pill{
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 10px 12px 10px 22px;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  box-shadow: 0 8px 30px -12px rgba(20,20,18,0.14);
}
.nav-mark{
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 18px;
}
.nav-links{
  display: flex;
  gap: 26px;
  font-size: 14px;
  color: var(--grey-700);
}
.nav-links a{ transition: color 220ms var(--ease); }
.nav-links a:hover{ color: var(--ink); }
.nav-cta{
  background: var(--ink);
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  padding: 9px 18px;
  border-radius: 100px;
  transition: background 220ms var(--ease), transform 220ms var(--ease);
}
.nav-cta:hover{ background: var(--accent); transform: translateY(-1px); }

@media (max-width: 640px){
  .nav-links{ display: none; }
  .nav-pill{ gap: 16px; }
}

/* ============================================================
   HERO
============================================================ */
.hero{
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 140px 0 80px;
  overflow: hidden;
}
.hero-glow{
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}
.glow-a{
  width: 620px; height: 620px;
  top: -180px; right: -160px;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
}
.glow-b{
  width: 480px; height: 480px;
  bottom: -200px; left: -140px;
  background: radial-gradient(circle, rgba(20,20,18,0.05), transparent 70%);
}

.hero-inner{
  position: relative;
  z-index: 1;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 44px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 50px;
  align-items: center;
  width: 100%;
}

.hero-name{
  font-size: clamp(48px, 6.4vw, 92px);
  line-height: 0.98;
  margin: 6px 0 4px;
}
.hero-headline{
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 500;
  color: var(--grey-700);
  margin: 0 0 26px;
}
.hero-para{
  font-size: 17px;
  line-height: 1.65;
  color: var(--grey-700);
  max-width: 480px;
  margin: 0 0 40px;
}

.hero-actions{ display: flex; gap: 14px; margin-bottom: 56px; }

.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 28px;
  border-radius: 100px;
  font-size: 14.5px;
  font-weight: 500;
  transition: background 220ms var(--ease), color 220ms var(--ease), transform 220ms var(--ease), border-color 220ms var(--ease), box-shadow 220ms var(--ease);
}
.btn-primary{
  background: var(--accent);
  color: #fff;
  box-shadow: 0 14px 30px -12px var(--accent-glow);
}
.btn-primary:hover{ background: var(--accent-strong); transform: translateY(-2px); }
.btn-ghost{
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover{ border-color: var(--accent); color: var(--accent-strong); transform: translateY(-2px); }

.hero-footer{
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.hero-email{
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--grey-700);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 3px;
  transition: color 220ms var(--ease), border-color 220ms var(--ease);
}
.hero-email:hover{ color: var(--accent-strong); border-color: var(--accent); }
.hero-socials{ display: flex; gap: 14px; }
.hero-socials a{
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 220ms var(--ease), background 220ms var(--ease), transform 220ms var(--ease);
}
.hero-socials svg{ width: 16px; height: 16px; fill: var(--grey-700); transition: fill 220ms var(--ease); }
.hero-socials a:hover{ background: var(--ink); border-color: var(--ink); transform: translateY(-2px); }
.hero-socials a:hover svg{ fill: #fff; }

.hero-portrait{ position: relative; }
.portrait-frame{
  position: relative;
  aspect-ratio: 4/5;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: linear-gradient(155deg, #1c1c1a 0%, #121210 60%, #0a0a09 100%);
  box-shadow: 0 40px 80px -30px rgba(20,20,18,0.35);
}
.portrait-frame.small{ aspect-ratio: 4/5; box-shadow: 0 30px 60px -26px rgba(20,20,18,0.3); }
.portrait-placeholder{
  position: absolute; inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.4);
  text-align: center;
  line-height: 1.6;
}
.frame-bracket{
  position: absolute;
  width: 26px; height: 26px;
  border: 1.5px solid var(--accent);
  opacity: 0.9;
}
.frame-bracket.tl{ top: -8px; left: -8px; border-right: none; border-bottom: none; border-radius: 6px 0 0 0; }
.frame-bracket.tr{ top: -8px; right: -8px; border-left: none; border-bottom: none; border-radius: 0 6px 0 0; }
.frame-bracket.bl{ bottom: -8px; left: -8px; border-right: none; border-top: none; border-radius: 0 0 0 6px; }
.frame-bracket.br{ bottom: -8px; right: -8px; border-left: none; border-top: none; border-radius: 0 0 6px 0; }

/* ============================================================
   SECTION HEAD
============================================================ */
.section-head{ max-width: 640px; margin-bottom: 64px; }
.section-head h2{
  font-size: clamp(32px, 3.6vw, 48px);
  font-weight: 600;
  margin: 0 0 16px;
}
.section-sub{
  font-size: 16px;
  color: var(--grey-500);
  line-height: 1.65;
  margin: 0;
}

/* ============================================================
   WORK / PROJECT GRID
============================================================ */
.work{ padding: 110px 0; background: var(--bg-soft); }

.project-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.project-card{
  position: relative;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-l);
  overflow: hidden;
  transition: transform 420ms var(--ease), box-shadow 420ms var(--ease), border-color 420ms var(--ease);
}
.project-card:hover{
  transform: translateY(-8px);
  box-shadow: 0 34px 60px -28px rgba(20,20,18,0.28);
  border-color: rgba(246,139,58,0.35);
}

.project-thumb{
  position: relative;
  display: block;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: linear-gradient(135deg, #1c1c1a, #0e0e0c 75%);
  cursor: pointer;
}
.project-thumb img{
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--ease);
}
.project-card:hover .project-thumb img{ transform: scale(1.06); }

.project-thumb-fallback{
  position: absolute; inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  text-align: center;
  padding: 20px;
}

.project-thumb::after{
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.45) 100%);
}
.play-btn{
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%) scale(1);
  width: 54px; height: 54px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: transform 320ms var(--ease), background 320ms var(--ease);
}
.play-btn svg{ width: 18px; height: 18px; fill: var(--ink); margin-left: 2px; }
.project-card:hover .play-btn{ transform: translate(-50%,-50%) scale(1.12); background: var(--accent); }
.project-card:hover .play-btn svg{ fill: #fff; }

.project-body{ padding: 24px 24px 28px; }
.project-category{
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin: 0 0 10px;
}
.project-title{
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}
.project-desc{
  font-size: 14px;
  line-height: 1.6;
  color: var(--grey-500);
  margin: 0 0 20px;
}
.project-link{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  padding-bottom: 2px;
  border-bottom: 1px solid var(--line-strong);
  transition: color 220ms var(--ease), border-color 220ms var(--ease), gap 220ms var(--ease);
}
.project-link svg{ width: 13px; height: 13px; transition: transform 220ms var(--ease); }
.project-link:hover{ color: var(--accent-strong); border-color: var(--accent); gap: 11px; }
.project-link:hover svg{ transform: translate(2px,-2px); }

/* ============================================================
   ABOUT
============================================================ */
.about{ padding: 130px 0; }
.about-grid{
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 70px;
  align-items: center;
}
.about-text{
  font-size: clamp(19px, 1.7vw, 22px);
  line-height: 1.75;
  color: var(--grey-700);
  max-width: 620px;
}
.about h2{ font-size: clamp(32px, 3.6vw, 48px); margin: 0 0 26px; }
.about-image{
    width:100%;
    height:600px;
    object-fit:cover;
    object-position:center top;
    border-radius:28px;
    display:block;
}
/* ============================================================
   CONTACT
============================================================ */
.contact{
  position: relative;
  padding: 150px 0 50px;
  background: var(--ink);
  color: #FAFAF8;
  overflow: hidden;
}
.contact-glow{
  position: absolute;
  width: 700px; height: 700px;
  top: -260px; left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(246,139,58,0.18), transparent 70%);
  filter: blur(60px);
  pointer-events: none;
}
.contact .section-inner{ position: relative; z-index: 1; text-align: center; }
.contact .eyebrow{ color: var(--accent); }
.contact-headline{
  font-size: clamp(38px, 6vw, 68px);
  font-weight: 600;
  line-height: 1.06;
  margin: 0 0 40px;
}
.contact-email{
  display: inline-block;
  font-family: var(--font-mono);
  font-size: clamp(18px, 2.2vw, 24px);
  border-bottom: 1px solid rgba(255,255,255,0.28);
  padding-bottom: 6px;
  transition: color 220ms var(--ease), border-color 220ms var(--ease);
}
.contact-email:hover{ color: var(--accent); border-color: var(--accent); }

.contact-buttons{
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 46px;
  flex-wrap: wrap;
}
.contact .btn-ghost{
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.88);
}
.contact .btn-ghost:hover{ border-color: var(--accent); color: var(--accent); }

.contact-bottom{
  display: flex;
  justify-content: space-between;
  margin-top: 110px;
  padding-top: 26px;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.4);
  text-align: left;
}

/* ============================================================
   REVEAL ANIMATION
============================================================ */
.reveal{
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 800ms var(--ease), transform 800ms var(--ease);
}
.reveal.in-view{ opacity: 1; transform: translateY(0); }

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 980px){
  .hero-inner{ grid-template-columns: 1fr; }
  .hero-portrait{ order: -1; max-width: 420px; margin: 0 auto; }
  .project-grid{ grid-template-columns: repeat(2, 1fr); }
  .about-grid{ grid-template-columns: 1fr; }
  .about-portrait{ max-width: 340px; margin: 0 auto; }
}

@media (max-width: 640px){
  .section-inner{ padding: 0 24px; }
  .hero-inner{ padding: 0 24px; }
  .hero{ padding: 120px 0 60px; }
  .work, .about{ padding: 80px 0; }
  .project-grid{ grid-template-columns: 1fr; }
  .hero-actions{ flex-wrap: wrap; }
  .contact-bottom{ flex-direction: column; gap: 8px; text-align: center; }
  .nav-pill{ width: 100%; justify-content: space-between; }
}
