@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@500;600;700;800;900&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=DM+Sans:wght@200;300;400;500&display=swap');

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #030303;
  --bg-2: #0a0a0a;
  --surface: #141414;
  --border: #1e1e1e;
  --text-primary: #f0ece4;
  --text-secondary: #7a7672;
  --text-muted: #4a4640;
  --accent: #c8b89a;
  --accent-dim: #6e5f4a;
  --accent-hot: #e6d4b0;
  --gallery-rest-opacity: 0.1;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --nav-h: 4.6rem;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  overflow-x: hidden;
  cursor: none;
  min-height: 100vh;
  min-height: 100dvh;
}
@media (hover: none) { body { cursor: auto; } }

::selection { background: var(--accent); color: var(--bg); }

a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9997;
  opacity: 0.6;
}

/* ═════════════ CUSTOM CURSOR ═════════════ */
.cursor, .cursor-dot {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  will-change: transform;
}
.cursor {
  width: 36px; height: 36px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  transition: width 0.3s var(--ease), height 0.3s var(--ease),
              background 0.3s var(--ease), border-color 0.3s var(--ease), opacity 0.3s;
}
.cursor-dot { width: 4px; height: 4px; background: var(--accent); border-radius: 50%; }
.cursor.is-link { width: 68px; height: 68px; background: var(--accent); border-color: transparent; }
.cursor.is-text { width: 4px; height: 40px; border-radius: 2px; background: var(--accent); }
.cursor.is-soft { width: 80px; height: 80px; background: rgba(200,184,154,0.15); }
.cursor.hidden { opacity: 0; }
@media (hover: none), (max-width: 900px) { .cursor, .cursor-dot { display: none; } }

/* ═════════════ PRELOADER ═════════════ */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s var(--ease), visibility 0s linear 0.8s;
}
#preloader.done { opacity: 0; visibility: hidden; }
.pl-inner { text-align: center; padding: 0 2rem; }
.pl-name {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 300;
  color: var(--accent);
  line-height: 1.1;
  letter-spacing: -0.02em;
  opacity: 0;
  transform: translateY(20px);
  animation: plFade 1s var(--ease) 0.2s forwards;
}
.pl-role {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-top: 1.4rem;
  opacity: 0;
  transform: translateY(20px);
  animation: plFade 1s var(--ease) 0.4s forwards;
}
@keyframes plFade { to { opacity: 1; transform: translateY(0); } }
.pl-bar {
  margin: 3rem auto 1rem;
  width: 240px;
  max-width: 60vw;
  height: 1px;
  background: var(--border);
  overflow: hidden;
}
.pl-bar-fill { width: 0%; height: 100%; background: var(--accent); transition: width 0.2s linear; }
.pl-count {
  font-family: 'Archivo', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  color: var(--text-secondary);
}
.pl-pct { margin-left: 2px; }

/* ═════════════ NAV ═════════════ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.8rem 3.5rem;
  padding-top: calc(1.8rem + env(safe-area-inset-top));
  transition: transform 0.45s ease, background 0.4s ease,
              backdrop-filter 0.4s ease, padding 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}
nav.nav--hidden { transform: translateY(-110%); }
nav.nav--scrolled {
  background: rgba(10, 10, 10, 0.7);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 1.1rem 3.5rem;
  padding-top: calc(1.1rem + env(safe-area-inset-top));
}
.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}
.nav-logo sup { font-size: 0.55em; color: var(--accent); margin-left: 2px; }
.nav-logo:hover { color: var(--accent); }
.nav-links { display: flex; gap: 2.6rem; list-style: none; }
.nav-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
  padding: 0.4rem 0;
}
.nav-links a .idx { font-size: 0.6rem; color: var(--accent-dim); transition: color 0.3s ease; }
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  height: 1px; width: 0;
  background: var(--accent);
  transition: width 0.4s var(--ease);
}
.nav-links a:hover, .nav-links a:focus-visible { color: var(--accent); }
.nav-links a:hover .idx { color: var(--accent); }
.nav-links a:hover::after, .nav-links a:focus-visible::after { width: 100%; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.6rem;
  gap: 6px;
  flex-direction: column;
  z-index: 495;
  position: relative;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 1px;
  background: var(--text-primary);
  transition: transform 0.4s var(--ease), opacity 0.3s;
}
.nav-toggle.active span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

.nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 490;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.8rem;
  padding: env(safe-area-inset-top) 1.4rem env(safe-area-inset-bottom);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.6s var(--ease), visibility 0s linear 0.6s;
}
.nav-drawer.open { transform: translateX(0); visibility: visible; transition: transform 0.6s var(--ease); }
.nav-drawer a {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 8vw, 2.6rem);
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 300;
}
.nav-drawer a:hover, .nav-drawer a:focus-visible { color: var(--accent); font-style: italic; }
.drawer-meta { margin-top: 3rem; display: flex; flex-direction: column; gap: 0.8rem; align-items: center; }
.drawer-meta a {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* ═════════════ STICKY STAGE ═════════════ */
#scroll-container { height: 360vh; position: relative; }
#stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  width: 100%;
  overflow: hidden;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  z-index: 1;
  will-change: opacity, transform;
}
.hero-backdrop span {
  font-family: 'Archivo', sans-serif;
  font-weight: 900;
  font-size: clamp(6rem, 22vw, 22rem);
  line-height: 0.82;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px var(--accent-dim);
  text-transform: uppercase;
  white-space: nowrap;
}
.hero-backdrop .offset { transform: translateX(15%); }

#hero-image {
  position: absolute;
  top: 50%; left: 50%;
  width: 44vw;
  height: 78vh;
  will-change: transform, opacity, width, height;
  z-index: 10;
}
.img-frame { position: relative; width: 100%; height: 100%; overflow: hidden; }
#hero-image .img-placeholder { background: none; padding: 0; }
#hero-image img, #hero-image .img-placeholder img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.hero-meta {
  position: absolute;
  bottom: 1.4rem; left: 1.4rem; right: 1.4rem;
  display: flex;
  justify-content: space-between;
  font-family: 'Archivo', sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  z-index: 3;
  mix-blend-mode: difference;
}

#intro-text {
  position: absolute;
  top: 50%;
  left: 15%;
  width: 38%;
  opacity: 0;
  will-change: opacity, transform;
  z-index: 10;
}
.intro-tag {
  font-size: 0.65rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.8rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.intro-tag::before {
  content: '';
  display: inline-block;
  width: 28px; height: 1px;
  background: var(--accent);
}
#intro-text h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin-bottom: 1.8rem;
  color: var(--text-primary);
}
#intro-text h1 em { font-style: italic; color: var(--accent); }
#intro-text p {
  font-size: 0.88rem;
  line-height: 1.85;
  color: var(--text-secondary);
  font-weight: 300;
  max-width: 36ch;
  margin-bottom: 2rem;
}
.intro-stats {
  display: flex;
  gap: 2.4rem;
  border-top: 1px solid var(--border);
  padding-top: 1.4rem;
}
.intro-stats div { display: flex; flex-direction: column; gap: 0.2rem; }
.intro-stats strong {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--accent);
  letter-spacing: -0.02em;
}
.intro-stats span {
  font-size: 0.6rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* Skills + Apps: top-anchored so headers align */
#skills-text {
  position: absolute;
  top: 20%;
  left: 3.5rem;
  width: 46%;
  opacity: 0;
  will-change: opacity, transform;
  z-index: 10;
}
.skills-header {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 2.8rem;
  height: 1.6rem;
}
.skills-header h2, .softwares-header h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1;
}
.skills-header::after, .softwares-header::after {
  content: '';
  flex: 1; height: 1px;
  background: var(--border);
}
.skills-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem 3rem; }
.skill-block p {
  font-size: 0.83rem;
  line-height: 1.8;
  color: var(--text-secondary);
  font-weight: 300;
}
.skill-block strong {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  letter-spacing: 0.04em;
}

#softwares-panel {
  position: absolute;
  top: 20%;
  right: 3.5rem;
  width: 42%;
  opacity: 0;
  will-change: opacity, transform;
  z-index: 10;
}
.softwares-header {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 2.8rem;
  height: 1.6rem;
}
.softwares-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border);
}
.sw-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: background 0.4s ease;
}
.sw-tile:nth-child(4n) { border-right: none; }
.sw-tile:nth-last-child(-n+4) { border-bottom: none; }
.sw-tile img {
  width: 52%;
  height: 52%;
  object-fit: contain;
  display: block;
  opacity: 0.85;
  transition: opacity 0.4s ease, transform 0.5s var(--ease);
}
.sw-name {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.4rem;
  font-family: 'Archivo', sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.sw-tile:hover { background: rgba(200,184,154,0.04); }
.sw-tile:hover img { opacity: 0.15; transform: scale(0.9); }
.sw-tile:hover .sw-name { opacity: 1; }

#scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  z-index: 50;
  opacity: 1;
  transition: opacity 0.5s;
}
#scroll-indicator span {
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 1.8s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(0.6); }
}

#progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 1px;
  background: linear-gradient(to right, var(--accent-dim), var(--accent));
  z-index: 600;
  width: 0%;
  transition: width 0.1s linear;
}

#float-btn {
  position: fixed;
  right: 2.2rem;
  bottom: 2.2rem;
  bottom: calc(2.2rem + env(safe-area-inset-bottom));
  z-index: 700;
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 1px solid var(--accent-dim);
  background: rgba(20, 20, 20, 0.7);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease, background 0.3s ease, color 0.3s ease;
}
#float-btn.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
#float-btn:hover { background: var(--accent); color: var(--bg); }
#float-btn svg { width: 20px; height: 20px; }

.img-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #1a1a1a 0%, #222 50%, #181818 100%);
}

/* ═════════════ SECTION TITLE ═════════════ */
.section-title {
  min-height: 62vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12vh 3.5rem 6vh;
  border-top: 1px solid var(--border);
  position: relative;
}
.section-title.alt { text-align: right; align-items: flex-end; }
.section-title h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(3.2rem, 9vw, 8rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 1.6rem;
}
.section-title h2 em { font-style: italic; color: var(--accent); }
.section-title p {
  max-width: 44ch;
  font-size: 0.9rem;
  line-height: 1.85;
  color: var(--text-secondary);
  font-weight: 300;
}
.section-title.alt p { margin-left: auto; }

/* ═════════════ PROJECTS ═════════════ */
.project {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 3.5rem;
  border-top: 1px solid var(--border);
  overflow: hidden;
}
.project-vlabel {
  position: absolute;
  left: 3.5rem; top: 50%;
  transform: translateY(-50%) rotate(180deg);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 0.62rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.project-info {
  position: relative;
  z-index: 3;
  width: 42%;
  margin-left: 4.5rem;
}
.project-meta {
  display: flex;
  gap: 1.2rem;
  font-family: 'Archivo', sans-serif;
  font-size: 0.6rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.8rem;
  align-items: center;
}
.project-meta span:first-child::after {
  content: '';
  display: inline-block;
  width: 24px; height: 1px;
  background: var(--accent-dim);
  margin-left: 1.2rem;
  vertical-align: middle;
}
.project-name {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: clamp(2.8rem, 5.5vw, 5.2rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2rem;
}
.project-sub {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  margin-top: -0.6rem;
}
.project-block { margin-bottom: 1.6rem; }
.project-block h3 {
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.project-block p {
  font-size: 0.82rem;
  line-height: 1.75;
  color: var(--text-secondary);
  font-weight: 300;
  max-width: 42ch;
}

.project-collage {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 56%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  grid-auto-rows: 150px;
  grid-auto-flow: dense;
  gap: 8px;
  padding: 9vh 3.5rem 9vh 0;
  align-content: center;
  z-index: 1;
}
.ptile { position: relative; overflow: hidden; opacity: 0.9; }
.ptile:nth-child(3n) { opacity: 0.72; }
.ptile:nth-child(4n) { opacity: 0.82; }
.ptile.wide { grid-column: span 2; }
.ptile.tall { grid-row: span 2; }
.ptile.big  { grid-column: span 2; grid-row: span 2; }
.ptile img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(15%) contrast(1.05);
  transition: filter 0.5s ease, transform 0.7s ease;
}
.ptile:hover img { filter: grayscale(0%) contrast(1.1); transform: scale(1.05); }
.project-collage::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, var(--bg) 0%, transparent 14%),
    linear-gradient(to bottom, var(--bg) 0%, transparent 9%),
    linear-gradient(to top, var(--bg) 0%, transparent 9%);
  z-index: 5;
  pointer-events: none;
}
.project-collage::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 60% 50%, transparent 70%, rgba(13,13,13,0.2) 100%);
  z-index: 6;
  pointer-events: none;
}
.project-num {
  position: absolute;
  right: 3rem; bottom: 2.5rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 7rem;
  font-weight: 300;
  line-height: 1;
  color: rgba(200, 184, 154, 0.07);
  letter-spacing: -0.02em;
  z-index: 4;
  user-select: none;
  pointer-events: none;
}

/* ═════════════ GALLERY — B&W 30% at rest, color 100% on hover ═════════════ */
.gallery { padding: 9vh 3.5rem; border-top: 1px solid var(--border); }
.gallery-grid { column-count: 3; column-gap: 14px; }
@media (max-width: 1100px) { .gallery-grid { column-count: 2; } }
@media (max-width: 680px)  { .gallery-grid { column-count: 1; } }
.g-item {
  width: 100%;
  margin: 0 0 14px;
  break-inside: avoid;
  overflow: hidden;
  background: linear-gradient(135deg, #161616 0%, #1f1f1f 100%);
  border-radius: 2px;
  position: relative;
}
.g-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  opacity: var(--gallery-rest-opacity);
  filter: grayscale(100%);
  transition: opacity 0.5s ease, filter 0.5s ease, transform 0.6s ease;
}
.g-item:hover img { opacity: 1; filter: grayscale(0%); transform: scale(1.04); }
.r-portrait { aspect-ratio: 1080 / 1920; }
.r-tall     { aspect-ratio: 1080 / 1440; }
.r-wide     { aspect-ratio: 1920 / 1080; }

/* ═════════════ BRANDING CAROUSEL ═════════════ */
.branding {
  position: relative;
  height: 100vh;
  height: 100svh;
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.branding-scene {
  position: relative;
  height: 100%;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-track { position: absolute; inset: 0; }
.brand-page {
  position: absolute;
  top: 50%; left: 50%;
  width: 62vw;
  height: 78vh;
  background: #111;
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
  z-index: 1;
  pointer-events: none;
  transition: transform 0.85s var(--ease),
              opacity 0.85s ease, filter 0.85s ease, box-shadow 0.85s ease;
  will-change: transform, opacity, filter;
}
.brand-page img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-page.is-active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  z-index: 30;
  box-shadow: 0 50px 130px rgba(0, 0, 0, 0.75), 0 12px 45px rgba(0, 0, 0, 0.55);
  pointer-events: auto;
  filter: none;
}
.brand-page.is-next {
  opacity: 0.12;
  transform: translate(-8%, -50%) scale(0.86);
  z-index: 20;
  filter: grayscale(100%) sepia(45%) saturate(120%) brightness(0.25);
}
.brand-page.is-prev {
  opacity: 0.12;
  transform: translate(-92%, -50%) scale(0.86);
  z-index: 20;
  filter: grayscale(100%) sepia(45%) saturate(120%) brightness(0.25);
}
.brand-page.is-far-next { opacity: 0; transform: translate(35%, -50%) scale(0.8); z-index: 1; }
.brand-page.is-far-prev { opacity: 0; transform: translate(-135%, -50%) scale(0.8); z-index: 1; }

.brand-overlay {
  position: absolute;
  top: 14vh;
  left: 3vw;
  z-index: 40;
  background: transparent;
  max-width: 12ch;
  width: 16vw;
  pointer-events: none;
}
.brand-index {
  display: inline-block;
  font-family: 'Archivo', sans-serif;
  font-size: 0.6rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.brand-title {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: clamp(1.4rem, 2.1vw, 3.4rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
  word-break: break-word;
}
.brand-desc {
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  font-size: 0.76rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin-bottom: 1.4rem;
}
.brand-hint {
  display: inline-block;
  font-family: 'Archivo', sans-serif;
  font-size: 0.58rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.brand-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  width: 52px; height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--accent-dim);
  background: rgba(20, 20, 20, 0.45);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--accent);
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease, opacity 0.3s ease;
}
.brand-prev { left: 1.6vw; }
.brand-next { right: 1.6vw; }
.brand-arrow:hover { background: var(--accent); color: var(--bg); }
.brand-arrow svg { width: 22px; height: 22px; }
.brand-arrow.disabled { opacity: 0.2; pointer-events: none; }
.brand-counter {
  position: absolute;
  bottom: 5vh;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
}
.brand-counter .bc-cur { color: var(--accent); }
.brand-counter .bc-sep { opacity: 0.5; }

/* ═════════════ ABOUT ═════════════ */
.about {
  padding: 16vh 3.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: center;
}
.about-inner { max-width: 900px; text-align: center; }
.about h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(2rem, 4.5vw, 4rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: 2rem;
}
.about p {
  font-size: 1rem;
  line-height: 1.9;
  color: var(--text-secondary);
  font-weight: 300;
  max-width: 60ch;
  margin: 0 auto;
}

/* ═════════════ CONTACT ═════════════ */
.contact {
  padding: 18vh 3.5rem;
  border-top: 1px solid var(--border);
  background:
    radial-gradient(ellipse at 20% 30%, rgba(200,184,154,0.06), transparent 60%),
    radial-gradient(ellipse at 80% 70%, rgba(200,184,154,0.04), transparent 60%),
    var(--bg);
  position: relative;
  overflow: hidden;
}
.contact::before {
  content: 'GET IN TOUCH';
  position: absolute;
  bottom: -1.5rem;
  left: -1rem;
  right: -1rem;
  font-family: 'Archivo', sans-serif;
  font-weight: 900;
  font-size: clamp(4rem, 20vw, 20rem);
  line-height: 0.82;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(200,184,154,0.08);
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
  overflow: hidden;
}
.contact-inner {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}
.contact-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(2.2rem, 6vw, 5.4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 3rem;
}
.contact-title em { font-style: italic; color: var(--accent); }
.contact-cta {
  display: inline-flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}
.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 1.05rem 1.9rem;
  font-family: 'Archivo', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 999px;
  transition: background 0.35s var(--ease), color 0.35s var(--ease),
              border-color 0.35s var(--ease), transform 0.35s var(--ease);
  white-space: nowrap;
}
.cta-btn.primary { background: var(--accent); color: var(--bg); border: 1px solid var(--accent); }
.cta-btn.primary:hover, .cta-btn.primary:focus-visible {
  background: var(--accent-hot); border-color: var(--accent-hot); transform: translateY(-2px);
}
.cta-btn.ghost { background: transparent; color: var(--text-primary); border: 1px solid var(--accent-dim); }
.cta-btn.ghost:hover, .cta-btn.ghost:focus-visible {
  border-color: var(--accent); color: var(--accent); transform: translateY(-2px);
}
.cta-btn svg { width: 16px; height: 16px; }

/* ═════════════ CLOSING ═════════════ */
.closing {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;
  padding: 8vh 3.5rem;
  border-top: 1px solid var(--border);
}
.closing-text { flex: 1; max-width: 46%; }
.closing-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: 1.4rem;
}
.closing-sub {
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
}
.closing-photo {
  flex: 0 0 38%;
  max-width: 400px;
  aspect-ratio: 541 / 318;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.closing-photo img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
  filter: brightness(0.85);
  transition: filter 0.6s var(--ease), transform 0.6s var(--ease);
}
.closing-photo:hover img { filter: brightness(1); transform: scale(1.04); }

/* ═════════════ FOOTER ═════════════ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.4rem 3.5rem;
  padding-bottom: calc(2.4rem + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer-info { display: flex; flex-wrap: wrap; align-items: center; gap: 2.2rem; }
.foot-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}
.foot-item:hover, .foot-item:focus-visible { color: var(--accent); }
.foot-item svg { width: 13px; height: 13px; stroke: var(--accent); fill: none; flex-shrink: 0; }
.footer-credit {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.credit-icons { display: inline-flex; align-items: center; gap: 0.5rem; }
.credit-icons svg { width: 14px; height: 14px; stroke: var(--accent); fill: none; }

/* ═════════════ IMAGE PROTECTION ═════════════ */
img {
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  -webkit-touch-callout: none;
  max-width: 100%;
  display: block;
}

/* ═════════════ RESPONSIVE ═════════════ */

/* Large laptops */
@media (max-width: 1280px) {
  nav, .project, .gallery, .closing, .site-footer,
  .section-title, .about, .contact { padding-left: 2.5rem; padding-right: 2.5rem; }
  #skills-text  { width: 50%; }
  #softwares-panel { width: 44%; }
}

/* Small laptops / iPad landscape */
@media (max-width: 1024px) {
  #intro-text       { left: 8%; width: 46%; }
  #skills-text      { left: 2.5rem; width: 52%; }
  #softwares-panel  { right: 2.5rem; width: 46%; }
  .project-info     { width: 46%; margin-left: 3.5rem; }
  .project-collage  { width: 52%; }
  .project-name     { font-size: clamp(2.4rem, 5vw, 4.2rem); }
  .brand-page       { width: 72vw; height: 72vh; }
  .brand-overlay    { max-width: 14ch; width: 20vw; }
  .gallery-grid     { column-count: 3; }
  .hero-backdrop span { font-size: clamp(5rem, 18vw, 16rem); }
}

/* iPad portrait / tablet */
@media (max-width: 900px) {
  .gallery-grid    { column-count: 2; }
  #intro-text      { left: 7vw; width: 82vw; }
  #intro-text p    { max-width: 46ch; }
  #skills-text     { left: 6vw; width: 88vw; top: 10%; }
  #softwares-panel { right: auto; left: 6vw; width: 88vw; top: 54%; }
  .skills-header, .softwares-header { margin-bottom: 1.6rem; }
  .skills-grid     { gap: 1.2rem 2rem; }
  .brand-page      { width: 82vw; height: 66vh; }
  .brand-overlay   { top: 4vh; left: 5vw; max-width: 40vw; width: auto; }
  .brand-title     { font-size: clamp(1.6rem, 4vw, 2.6rem); }
  .brand-desc      { font-size: 0.78rem; }
  .nav-links       { display: none; }
  .nav-toggle      { display: flex; }
  .section-title   { padding-top: 16vh; }
  .contact-cta     { flex-direction: column; align-items: stretch; width: 100%; max-width: 360px; }
  .contact-cta .cta-btn { width: 100%; }
}

/* Phones */
@media (max-width: 768px) {
  nav { padding: 1.2rem 1.4rem; padding-top: calc(1.2rem + env(safe-area-inset-top)); }
  nav.nav--scrolled { padding: 0.9rem 1.4rem; padding-top: calc(0.9rem + env(safe-area-inset-top)); }

  /* Stage phases retuned for phones */
  #hero-image  { top: 27%; width: 66vw; height: 44vh; }
  #intro-text  { top: 62%; left: 6vw; width: 88vw; }
  .intro-tag   { margin-bottom: 1rem; font-size: 0.6rem; }
  #intro-text h1 { font-size: clamp(1.6rem, 7vw, 2.2rem); line-height: 1.08; margin-bottom: 1rem; }
  #intro-text p  { font-size: 0.78rem; line-height: 1.65; max-width: 100%; margin-bottom: 0; }
  .intro-stats   { display: none; }

  #skills-text     { top: 5%; }
  #softwares-panel { top: 50%; }
  .skills-grid     { grid-template-columns: 1fr 1fr; gap: 0.7rem 1.2rem; }
  .skill-block strong { font-size: 0.88rem; margin-bottom: 0.25rem; }
  .skill-block p   { font-size: 0.68rem; line-height: 1.55; }
  .skills-header, .softwares-header { margin-bottom: 1rem; }
  .skills-header h2, .softwares-header h2 { font-size: 0.88rem; }

  .hero-backdrop span { font-size: clamp(3rem, 15vw, 7rem); -webkit-text-stroke-width: 0.5px; }
  .hero-meta { font-size: 0.55rem; letter-spacing: 0.24em; bottom: 1rem; left: 1rem; right: 1rem; }

  .section-title { padding-left: 1.4rem; padding-right: 1.4rem; padding-top: 18vh; padding-bottom: 8vh; min-height: 50vh; }
  .section-title.alt { text-align: left; align-items: flex-start; }
  .section-title.alt p { margin-left: 0; }

  .project {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-height: auto;
    padding: 14vh 1.4rem 8vh;
    gap: 2rem;
  }
  .project-vlabel { display: none; }
  .project-info   { width: 100%; margin-left: 0; }
  .project-name   { font-size: clamp(2.4rem, 12vw, 3.4rem); margin-bottom: 1.4rem; }
  .project-collage {
    position: relative;
    right: auto; top: auto; bottom: auto;
    width: 100%;
    padding: 0;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 130px;
  }
  .project-collage::before,
  .project-collage::after { display: none; }
  .ptile { opacity: 1 !important; }
  .project-num { font-size: 4rem; right: 1.4rem; bottom: 1rem; }

  .gallery { padding: 6vh 1.4rem; }

  .branding      { height: auto; min-height: 80vh; padding: 12vh 0 8vh; }
  .branding-scene { height: 68vh; }
  .brand-page    { width: 88vw; height: 60vh; }
  .brand-overlay { top: 2vh; left: 5vw; max-width: 60vw; width: auto; }
  .brand-title   { font-size: clamp(1.8rem, 8vw, 2.6rem); }
  .brand-desc    { font-size: 0.75rem; max-width: 36ch; }
  .brand-arrow   { width: 42px; height: 42px; }
  .brand-prev    { left: 0.6rem; }
  .brand-next    { right: 0.6rem; }
  .brand-counter { bottom: 2vh; font-size: 0.85rem; }

  .about { padding: 12vh 1.4rem; }
  .about h2 { font-size: clamp(1.8rem, 6.5vw, 2.6rem); margin-bottom: 1.4rem; }
  .about p { font-size: 0.88rem; line-height: 1.75; }

  .contact { padding: 14vh 1.4rem 12vh; }
  .contact-title { margin-bottom: 2.4rem; }
  .contact::before { font-size: 4rem; bottom: 1vh; }

  .closing {
    flex-direction: column-reverse;
    text-align: center;
    gap: 2rem;
    padding: 10vh 1.4rem;
    min-height: auto;
  }
  .closing-text, .closing-photo { max-width: 100%; flex: none; width: 100%; }
  .closing-photo { aspect-ratio: auto; height: auto; max-height: 30vh; }
  .closing-photo img { max-height: 24vh; margin: 0 auto; }

  .site-footer { padding: 1.8rem 1.4rem; padding-bottom: calc(1.8rem + env(safe-area-inset-bottom)); flex-direction: column; align-items: flex-start; gap: 1.4rem; }
  .footer-info { flex-direction: column; align-items: flex-start; gap: 0.9rem; }

  #float-btn { width: 44px; height: 44px; right: 1rem; bottom: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom)); }
}

/* Small phones */
@media (max-width: 560px) {
  .gallery-grid    { column-count: 1; }
  #hero-image      { top: 26%; width: 72vw; height: 40vh; }
  #intro-text      { top: 60%; }
  #softwares-panel { top: 48%; }
  .softwares-grid  { grid-template-columns: repeat(4, 1fr); }
  .sw-tile img     { width: 46%; height: 46%; }
  .closing-title   { font-size: clamp(2rem, 10vw, 2.8rem); }
  .contact-title   { font-size: clamp(1.8rem, 8vw, 2.4rem); }
}

/* Tiny phones */
@media (max-width: 400px) {
  nav { padding: 1rem 1rem; padding-top: calc(1rem + env(safe-area-inset-top)); }
  .project, .gallery, .closing, .site-footer,
  .section-title, .about, .contact { padding-left: 1rem; padding-right: 1rem; }
  #intro-text h1 { font-size: 1.6rem; }
  #intro-text p { font-size: 0.72rem; }
  .project-collage { grid-template-columns: 1fr; grid-auto-rows: 150px; }
  .skill-block p { font-size: 0.64rem; }
  .skills-grid { gap: 0.6rem 1rem; }
  .brand-page { width: 92vw; height: 52vh; }
  .branding-scene { height: 60vh; }
}

/* Touch — center-of-screen gallery item = 100% */
@media (hover: none) {
  .g-item img { opacity: var(--gallery-rest-opacity); filter: grayscale(100%); }
  .g-item.is-focus img { opacity: 1; filter: grayscale(0%); }
  .sw-tile img { opacity: 0.9; }
  .ptile img { filter: grayscale(0%) contrast(1.05); }
  body { cursor: auto; }
}

/* Accessibility — reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .cursor, .cursor-dot { display: none; }
  body { cursor: auto; }
  #preloader { display: none; }
}