/* ==========================================================================
   Ali Raza — Portfolio
   Dark luxury / cinematic theme
   ========================================================================== */

:root {
  --black: #0a0a0a;
  --black-deep: #050505;
  --black-soft: #121212;
  --black-card: #141414;
  --gold: #c5a358;
  --gold-soft: #ddc187;
  --gold-dim: #8a743a;
  --ivory: #eef0f2;
  --grey: #9a9da3;
  --grey-dim: #6c6f74;
  --line: rgba(197, 163, 88, 0.16);

  --font-display: 'Space Grotesk', 'Manrope', -apple-system, sans-serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --container: 1240px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--black);
  color: var(--ivory);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font-family: inherit; }

::selection { background: var(--gold); color: var(--black); }

::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--gold-dim), var(--gold)); border-radius: 10px; }

/* ==========================================================================
   Texture / Atmosphere layers
   ========================================================================== */

.grain {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

#particles {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.55;
}

.cursor-glow {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(197,163,88, 0.06) 0%, rgba(197,163,88, 0) 70%);
  transition: opacity 0.4s ease;
  opacity: 0;
}
.cursor-glow.active { opacity: 1; }

/* ==========================================================================
   Loader
   ========================================================================== */

.loader {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--black-deep);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  transition: opacity 0.8s var(--ease), visibility 0.8s var(--ease);
}
.loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-name {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3.4rem);
  letter-spacing: 0.2em;
  font-weight: 700;
  color: var(--ivory);
}
.loader-name span { color: var(--gold); }
.loader-bar {
  width: 220px;
  height: 1px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
  position: relative;
}
.loader-bar span {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  width: 40%;
  animation: loaderSlide 1.2s ease-in-out infinite;
}
@keyframes loaderSlide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(350%); }
}

/* ==========================================================================
   Layout helpers
   ========================================================================== */

.section-glow {
  position: absolute;
  top: 0; left: 50%;
  width: 900px; height: 900px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(197, 163, 88, 0.045) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}
.skills-glow { top: 10%; }
.projects-glow { top: 0; }

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 22px;
}
.section-kicker.centered { display: flex; justify-content: center; }
.kicker-num {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--gold-dim);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
}
.section-kicker::before {
  content: '';
  display: inline-block;
  width: 30px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  line-height: 1.18;
  color: var(--ivory);
  letter-spacing: -0.01em;
}
.section-title.centered { text-align: center; max-width: 720px; margin: 0 auto; }
.accent-text {
  color: var(--gold);
  font-weight: 600;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold) 65%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-head { text-align: center; margin-bottom: 64px; position: relative; z-index: 1; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), color 0.4s ease, border-color .4s ease;
  white-space: nowrap;
}
.btn svg { transition: transform 0.4s var(--ease); position: relative; z-index: 1; }
.btn span { position: relative; z-index: 1; }
.btn:hover svg { transform: translate(3px, -3px); }

.btn-primary {
  background: var(--gold);
  color: #1a1503;
  border: 1px solid var(--gold);
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, var(--gold-soft), var(--gold) 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.btn-primary:hover {
  box-shadow: 0 14px 40px -8px rgba(197,163,88, 0.55);
  transform: translateY(-3px);
}
.btn-primary:hover::before { opacity: 1; }

.btn-ghost {
  background: transparent;
  color: var(--ivory);
  border: 1px solid rgba(243, 241, 234, 0.22);
}
.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-3px);
  box-shadow: 0 14px 32px -12px rgba(197,163,88, 0.35);
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 26px 0;
  transition: padding 0.4s var(--ease), background 0.4s var(--ease), border-color .4s var(--ease), backdrop-filter .4s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  padding: 14px 0;
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-logo {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ivory);
  transition: transform 0.4s var(--ease), filter 0.4s ease;
}
.nav-logo span { color: var(--gold); }
.nav-logo img {
  height: 76px;
  width: auto;
  filter: drop-shadow(0 0 16px rgba(197, 163, 88, 0.28));
  transition: filter 0.4s ease, transform 0.4s var(--ease);
}
.nav-logo:hover img {
  filter: drop-shadow(0 0 24px rgba(197, 163, 88, 0.5));
  transform: scale(1.05);
}
.footer .nav-logo img { height: 64px; }
.nav-links {
  display: flex;
  gap: 36px;
  margin: 0 auto;
}
.nav-links a {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--grey);
  font-weight: 500;
  position: relative;
  transition: color 0.3s ease;
  padding-bottom: 4px;
}
.nav-links a span {
  color: var(--gold-dim);
  font-family: var(--font-display);
  font-weight: 600;
  margin-right: 4px;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 0.4s var(--ease);
}
.nav-links a:hover { color: var(--ivory); }
.nav-links a:hover::after { width: 100%; }

.nav-cta {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--gold);
  border: 1px solid var(--line);
  padding: 11px 22px;
  border-radius: 2px;
  transition: all 0.35s ease;
}
.nav-cta:hover {
  background: var(--gold);
  color: #1a1503;
  border-color: var(--gold);
  box-shadow: 0 10px 28px -10px rgba(197,163,88,.6);
}

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 6px;
  width: 26px;
  z-index: 110;
}
.nav-burger span {
  display: block;
  height: 1px;
  width: 100%;
  background: var(--ivory);
  transition: all 0.35s var(--ease);
}
.nav-burger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); background: var(--gold); }
.nav-burger.active span:nth-child(2) { opacity: 0; }
.nav-burger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); background: var(--gold); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(8,8,8,0.98);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.55s var(--ease), opacity 0.4s ease;
  pointer-events: none;
}
.mobile-menu.active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu a {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--ivory);
  letter-spacing: 0.04em;
  transition: color 0.3s ease, letter-spacing 0.3s ease;
}
.mobile-menu a:hover { color: var(--gold); letter-spacing: 0.12em; }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 150px 32px 120px;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(197,163,88,0.06), transparent 62%),
    radial-gradient(ellipse 55% 45% at 90% 105%, rgba(197,163,88,0.035), transparent 60%),
    var(--black-deep);
}

.spotlight {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}
.spotlight-1 {
  width: 60vw; height: 60vw;
  max-width: 820px; max-height: 820px;
  top: -28%; left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(197,163,88,0.105) 0%, rgba(197,163,88,0) 70%);
  animation: spotlightPulse 9s ease-in-out infinite;
}
.spotlight-2 {
  width: 40vw; height: 40vw;
  max-width: 560px; max-height: 560px;
  bottom: -22%; right: -8%;
  background: radial-gradient(circle, rgba(197,163,88,0.07) 0%, rgba(197,163,88,0) 70%);
  animation: spotlightPulse 11s ease-in-out infinite reverse;
}
.spotlight-3 {
  width: 50vw; height: 50vw;
  max-width: 700px; max-height: 700px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(197,163,88,0.06) 0%, rgba(197,163,88,0) 70%);
  animation: spotlightPulse 13s ease-in-out infinite;
}
@keyframes spotlightPulse {
  0%, 100% { opacity: 0.5; transform: translateX(-50%) scale(1); }
  50% { opacity: 0.85; transform: translateX(-50%) scale(1.12); }
}
.spotlight-2, .spotlight-3 { transform-origin: center; }

.hero-beam {
  position: absolute;
  top: -10%;
  left: 50%;
  width: 1px;
  height: 60%;
  background: linear-gradient(180deg, rgba(197,163,88,0.5), rgba(197,163,88,0) 80%);
  transform: translateX(-50%) rotate(8deg);
  opacity: 0.5;
  filter: blur(0.5px);
  z-index: 0;
}
.hero-beam::before, .hero-beam::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 1px;
  height: 100%;
  background: inherit;
}
.hero-beam::before { transform: translateX(-160px) rotate(-3deg); opacity: 0.5; }
.hero-beam::after { transform: translateX(180px) rotate(5deg); opacity: 0.35; }

.hero-figure {
  position: absolute;
  top: 50%;
  right: 6%;
  width: min(34vw, 480px);
  aspect-ratio: 896 / 1195;
  transform: translateY(-46%);
  z-index: 1;
  pointer-events: none;
  opacity: 0.42;
  mix-blend-mode: normal;
  filter: grayscale(1) brightness(1.2) contrast(1.12);
  animation: heroFigureDrift 30s ease-in-out infinite alternate;
  will-change: transform;
}
.hero-figure img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
  display: block;
}
@keyframes heroFigureDrift {
  0%   { transform: translateY(-46%) scale(1); }
  100% { transform: translateY(-48.5%) scale(1.045); }
}
@media (max-width: 1080px) {
  /* .hero-grid stacks to a single centered column here — an absolutely
     positioned side figure would overlap and wash out the title text. */
  .hero-figure { display: none; }
}

.hero-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 30px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}
.hero-info li,
.hero-info a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.84rem;
  letter-spacing: 0.01em;
  color: var(--grey);
}
.hero-info svg { color: var(--gold); flex-shrink: 0; }
.hero-info a {
  transition: color 0.35s var(--ease);
}
.hero-info a:hover { color: var(--gold-soft); }

.hero-grid {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1280px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 60px;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.hero-taglines {
  position: relative;
  height: 28px;
  margin-top: 26px;
  overflow: hidden;
}
.hero-taglines .tagline {
  position: absolute;
  left: 0; top: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--gold-soft);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.hero-taglines .tagline::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 1px;
  background: var(--gold);
  flex-shrink: 0;
}
.hero-taglines .tagline.active {
  opacity: 1;
  transform: translateY(0);
}
.hero-taglines .tagline.exit {
  opacity: 0;
  transform: translateY(-14px);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey);
  border: 1px solid var(--line);
  padding: 9px 20px;
  border-radius: 100px;
  margin-bottom: 36px;
  background: rgba(197,163,88,0.03);
}
.hero-eyebrow .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 0 rgba(197,163,88,0.5);
  animation: dotPulse 2.4s ease-out infinite;
}
@keyframes dotPulse {
  0% { box-shadow: 0 0 0 0 rgba(197,163,88,0.45); }
  70% { box-shadow: 0 0 0 9px rgba(197,163,88,0); }
  100% { box-shadow: 0 0 0 0 rgba(197,163,88,0); }
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: -0.03em;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-title .line {
  display: block;
  font-size: clamp(4rem, 14vw, 9.5rem);
  color: var(--ivory);
  position: relative;
  overflow: hidden;
}
.hero-title .line.accent {
  text-shadow: 0 0 70px rgba(197, 163, 88, 0.28);
}
/* Gradient is applied per-character because the JS wraps each glyph in its
   own <i> — clipping it to the parent span would leave the (now childless)
   parent painting a plain rectangle instead of clipped text. */
.hero-title .line.accent i {
  background: linear-gradient(135deg, var(--gold-soft) 15%, var(--gold) 60%, var(--gold-dim) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub-row {
  margin-top: 34px;
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 620px;
}
.hero-rule {
  flex-shrink: 0;
  width: 56px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
}
.hero-subtitle {
  font-size: clamp(0.95rem, 1.6vw, 1.12rem);
  color: var(--grey);
  font-weight: 300;
  text-align: left;
  letter-spacing: 0.01em;
}

.hero-actions {
  margin-top: 52px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-scroll {
  position: absolute;
  bottom: 52px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  z-index: 2;
}
.hero-scroll span {
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--grey-dim);
}
.hero-scroll-line {
  width: 1px;
  height: 64px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
  position: relative;
}
.hero-scroll-line i {
  position: absolute;
  top: -100%; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(180deg, transparent, var(--gold));
  animation: scrollDrip 2.4s ease-in-out infinite;
}
@keyframes scrollDrip {
  0% { top: -100%; }
  60% { top: 100%; }
  100% { top: 100%; }
}

.hero-meta {
  position: absolute;
  bottom: 52px;
  right: 60px;
  display: flex;
  gap: 44px;
  z-index: 2;
}
.hero-meta-item h3 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 4px;
}
.hero-meta-item p {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey-dim);
}

/* ---- Hero portrait ---- */
.hero-portrait {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-self: center;
}
.hero-portrait-glow {
  position: absolute;
  top: 50%; left: 50%;
  width: 120%;
  height: 120%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(197,163,88,0.16) 0%, rgba(197,163,88,0) 65%);
  filter: blur(40px);
  z-index: 0;
  pointer-events: none;
  animation: spotlightPulse 10s ease-in-out infinite;
}
.hero-portrait-frame {
  position: relative;
  z-index: 1;
  width: min(380px, 78vw);
  aspect-ratio: 4 / 5;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(197, 163, 88, 0.22);
  box-shadow: 0 60px 140px -40px rgba(0,0,0,0.85), 0 0 0 1px rgba(255,255,255,0.02) inset;
  transform-style: preserve-3d;
}
.hero-portrait-frame img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 18%;
  filter: grayscale(55%) contrast(1.12) brightness(0.78);
  transition: filter 0.7s ease, transform 0.9s var(--ease);
}
.hero-portrait-frame:hover img {
  filter: grayscale(20%) contrast(1.12) brightness(0.92);
  transform: scale(1.045);
}
.hero-portrait-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5,5,5,0) 38%, rgba(5,5,5,0.92) 100%),
    linear-gradient(0deg, rgba(5,5,5,0.55) 0%, transparent 30%),
    radial-gradient(120% 90% at 50% 105%, rgba(5,5,5,0.9), transparent 60%),
    linear-gradient(115deg, rgba(197,163,88,0.16), transparent 45%);
  mix-blend-mode: multiply;
}
.hero-portrait-edge {
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(197,163,88,0.12), inset 0 -90px 90px -40px rgba(5,5,5,0.95);
  pointer-events: none;
}
.hero-portrait-tag {
  position: relative;
  z-index: 1;
  margin-top: -22px;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--black-card);
  border: 1px solid var(--line);
  padding: 11px 24px;
  border-radius: 100px;
  box-shadow: 0 20px 50px -20px rgba(0,0,0,0.8);
  white-space: nowrap;
}

/* ==========================================================================
   About
   ========================================================================== */

.about {
  position: relative;
  padding: 160px 32px;
  background: var(--black);
  overflow: hidden;
}
.about-inner {
  position: relative;
  z-index: 1;
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 100px;
  align-items: center;
}

.about-media { perspective: 1200px; }
.about-frame {
  position: relative;
  border-radius: 6px;
  transform-style: preserve-3d;
}
.about-photo {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(155deg, #1c1a14, #0c0c0c 60%);
  box-shadow: 0 40px 100px -30px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,255,255,0.02) inset;
}
.about-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(35%) contrast(1.08) brightness(0.92);
  transition: filter 0.6s ease, transform 0.8s var(--ease);
}
.about-frame:hover .about-photo img { filter: grayscale(10%) contrast(1.1) brightness(1); transform: scale(1.04); }
.about-photo-fallback {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--gold-dim);
  background: radial-gradient(circle at 50% 30%, rgba(197,163,88,0.12), transparent 60%);
}
.about-photo.no-photo .about-photo-fallback { display: flex; }
.about-photo.no-photo img { display: none; }
.about-photo-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,0) 40%, rgba(10,10,10,0.85) 100%),
              linear-gradient(115deg, rgba(197,163,88,0.18), transparent 50%);
  mix-blend-mode: multiply;
  opacity: 0.9;
}
.about-photo-corner {
  position: absolute;
  width: 34px; height: 34px;
  border: 1px solid var(--gold);
  opacity: 0.7;
}
.about-photo-corner.tl { top: 16px; left: 16px; border-right: none; border-bottom: none; }
.about-photo-corner.br { bottom: 16px; right: 16px; border-left: none; border-top: none; }
.about-photo-tag {
  position: absolute;
  bottom: -18px;
  left: 28px;
  background: var(--black-card);
  border: 1px solid var(--line);
  color: var(--gold);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 11px 22px;
  border-radius: 2px;
  box-shadow: 0 18px 40px -16px rgba(0,0,0,0.7);
}

.about-copy { position: relative; }
.about-lead {
  font-size: 1.18rem;
  color: var(--ivory);
  font-weight: 300;
  margin: 26px 0 18px;
  line-height: 1.65;
}
.about-text {
  color: var(--grey);
  font-size: 0.98rem;
  font-weight: 300;
  max-width: 56ch;
  margin-bottom: 44px;
}
.about-stats { display: flex; flex-direction: column; gap: 22px; margin-bottom: 46px; }
.about-stat h4 {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ivory);
  font-weight: 500;
  margin-bottom: 12px;
}
.about-stat .bar {
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
  overflow: hidden;
}
.about-stat .bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold));
  box-shadow: 0 0 18px rgba(197,163,88,0.5);
  transition: width 1.4s var(--ease);
}
.about-stat.in-view .bar span { width: var(--w); }

/* ==========================================================================
   Skills
   ========================================================================== */

.skills {
  position: relative;
  padding: 160px 32px;
  background: linear-gradient(180deg, var(--black) 0%, var(--black-deep) 100%);
  overflow: hidden;
}
.skills-inner { position: relative; z-index: 1; max-width: var(--container); margin: 0 auto; }
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.skill-card {
  position: relative;
  background: linear-gradient(160deg, var(--black-card), #0d0d0d);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 38px 32px;
  transition: border-color 0.45s ease, box-shadow 0.45s ease, transform 0.45s var(--ease);
  transform-style: preserve-3d;
}
.skill-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 8px;
  padding: 1px;
  background: linear-gradient(135deg, var(--gold), transparent 40%, transparent 60%, var(--gold));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.skill-card:hover {
  border-color: rgba(197,163,88,0.45);
  box-shadow: 0 30px 70px -28px rgba(197,163,88,0.32), 0 0 0 1px rgba(197,163,88,0.06) inset;
}
.skill-card:hover::before { opacity: 1; }
.skill-icon {
  width: 58px; height: 58px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--gold);
  margin-bottom: 26px;
  background: radial-gradient(circle at 30% 30%, rgba(197,163,88,0.14), transparent 70%);
  transition: transform 0.5s var(--ease), box-shadow .5s ease;
}
.skill-card:hover .skill-icon {
  transform: rotate(-8deg) scale(1.08);
  box-shadow: 0 0 30px -6px rgba(197,163,88,0.55);
}
.skill-card h3 {
  font-family: var(--font-display);
  font-size: 1.34rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--ivory);
}
.skill-card p {
  color: var(--grey);
  font-size: 0.92rem;
  font-weight: 300;
  margin-bottom: 24px;
  min-height: 66px;
}
.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-tags span {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--line);
  padding: 6px 13px;
  border-radius: 100px;
  background: rgba(197,163,88,0.04);
}

/* ==========================================================================
   Projects
   ========================================================================== */

.projects {
  position: relative;
  padding: 160px 32px;
  background: var(--black-deep);
  overflow: hidden;
}
.projects-inner { position: relative; z-index: 1; max-width: var(--container); margin: 0 auto; }
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}
.project-card {
  position: relative;
  background: var(--black-card);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.5s ease, box-shadow 0.5s ease, transform 0.5s var(--ease);
  transform-style: preserve-3d;
}
.project-card:hover {
  border-color: rgba(197,163,88,0.5);
  box-shadow: 0 50px 100px -30px rgba(197,163,88,0.28);
}
.project-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.project-shot {
  position: absolute; inset: 0;
  background-size: cover, auto, cover;
  background-position: center, center, center;
  background-repeat: no-repeat, repeat, no-repeat;
  transform: scale(1.05);
  transition: transform 1s var(--ease), filter 0.6s ease;
  filter: saturate(0.7) brightness(0.62);
}
.project-card:hover .project-shot {
  transform: scale(1.12);
  filter: saturate(0.95) brightness(0.78);
}
.shot-1 { background-image: linear-gradient(150deg, rgba(197,163,88,0.32), rgba(10,10,10,0.92)), repeating-linear-gradient(115deg, rgba(255,255,255,0.05) 0 2px, transparent 2px 26px), url("https://picsum.photos/seed/nimbus-finance/900/600"); }
.shot-2 { background-image: linear-gradient(150deg, rgba(197,163,88,0.22), rgba(10,10,10,0.94)), repeating-linear-gradient(60deg, rgba(255,255,255,0.05) 0 2px, transparent 2px 30px), url("https://picsum.photos/seed/atlas-commerce/900/600"); }
.shot-3 { background-image: linear-gradient(150deg, rgba(197,163,88,0.28), rgba(10,10,10,0.92)), repeating-radial-gradient(circle at 70% 30%, rgba(255,255,255,0.06) 0 2px, transparent 2px 34px), url("https://picsum.photos/seed/mono-studio/900/600"); }
.shot-4 { background-image: linear-gradient(150deg, rgba(197,163,88,0.24), rgba(10,10,10,0.94)), repeating-linear-gradient(20deg, rgba(255,255,255,0.05) 0 2px, transparent 2px 28px), url("https://picsum.photos/seed/pulse-health/900/600"); }

.project-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, var(--black-card) 0%, transparent 55%);
}
.project-tag {
  position: absolute;
  top: 20px; left: 20px;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #1a1503;
  background: var(--gold);
  padding: 8px 16px;
  border-radius: 100px;
  font-weight: 700;
  z-index: 2;
}
.project-body { padding: 34px 34px 38px; position: relative; }
.project-index {
  position: absolute;
  top: -26px; right: 34px;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.08em;
  font-size: 1rem;
  color: var(--gold-dim);
}
.project-body h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--ivory);
  transition: color 0.4s ease;
}
.project-card:hover .project-body h3 { color: var(--gold); }
.project-body p {
  color: var(--grey);
  font-size: 0.94rem;
  font-weight: 300;
  margin-bottom: 22px;
  max-width: 46ch;
}
.project-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.project-tags span {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--grey);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 6px 13px;
  border-radius: 100px;
}
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--gold);
  position: relative;
}
.project-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 100%; height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}
.project-link:hover::after { transform: scaleX(1); transform-origin: left; }
.project-link svg { transition: transform 0.4s var(--ease); }
.project-link:hover svg { transform: translate(3px, -3px); }

.projects-more { display: flex; justify-content: center; margin-top: 64px; }

/* ==========================================================================
   Contact
   ========================================================================== */

.contact {
  position: relative;
  padding: 160px 32px;
  background: var(--black);
  overflow: hidden;
}
.contact-inner {
  position: relative;
  z-index: 1;
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 90px;
}
.contact-lead {
  color: var(--grey);
  font-size: 1.02rem;
  font-weight: 300;
  max-width: 50ch;
  margin: 24px 0 46px;
}
.contact-info { display: flex; flex-direction: column; gap: 0; margin-bottom: 40px; }
.contact-info-item {
  display: flex;
  align-items: baseline;
  gap: 22px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.4s var(--ease), color .3s ease;
}
a.contact-info-item:hover { padding-left: 12px; color: var(--gold); }
.contact-info-label {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--grey-dim);
  width: 90px;
  flex-shrink: 0;
}
.contact-info-value {
  font-family: var(--font-display);
  font-size: 1.18rem;
  color: var(--ivory);
}
a.contact-info-item:hover .contact-info-value { color: var(--gold); }

.contact-socials { display: flex; gap: 14px; flex-wrap: wrap; }
.contact-socials a {
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  padding: 12px 24px;
  border-radius: 100px;
  color: var(--grey);
  transition: all 0.35s ease;
}
.contact-socials a:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(197,163,88,0.06);
  transform: translateY(-3px);
}

.contact-form {
  background: var(--black-card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 44px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.form-field { display: flex; flex-direction: column; gap: 10px; }
.form-field label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey-dim);
}
.form-field input, .form-field textarea {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 4px;
  padding: 15px 18px;
  color: var(--ivory);
  font-size: 0.94rem;
  transition: border-color 0.35s ease, box-shadow 0.35s ease, background 0.35s ease;
  resize: vertical;
}
.form-field input::placeholder, .form-field textarea::placeholder { color: var(--grey-dim); }
.form-field input:focus, .form-field textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(197,163,88,0.04);
  box-shadow: 0 0 0 4px rgba(197,163,88,0.08);
}
.form-submit { justify-content: center; margin-top: 6px; }
.form-note {
  font-size: 0.85rem;
  color: var(--gold);
  text-align: center;
  min-height: 18px;
  letter-spacing: 0.02em;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  border-top: 1px solid var(--line);
  background: var(--black-deep);
  padding: 36px 32px;
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-inner p {
  font-size: 0.82rem;
  color: var(--grey-dim);
  text-align: center;
}
.footer-top {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey);
  transition: color 0.3s ease, transform 0.3s ease;
}
.footer-top:hover { color: var(--gold); transform: translateY(-2px); }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1080px) {
  .about-inner { grid-template-columns: 1fr; gap: 70px; }
  .about-media { max-width: 460px; margin: 0 auto; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: 1fr; }
  .contact-inner { grid-template-columns: 1fr; gap: 60px; }
  .hero-meta { position: static; margin-top: 64px; justify-content: center; }
  .hero-scroll { display: none; }
  .hero-grid {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 56px;
  }
  .hero-grid { grid-template-areas: "portrait" "content"; }
  .hero-portrait { grid-area: portrait; }
  .hero-content { grid-area: content; align-items: center; text-align: center; }
  .hero-sub-row { flex-direction: column; align-items: center; gap: 14px; }
  .hero-subtitle { text-align: center; }
  .hero-taglines { display: flex; justify-content: center; }
  .hero-taglines .tagline { left: auto; }
}

@media (max-width: 760px) {
  .nav-links, .nav-cta { display: none; }
  .nav-burger { display: flex; }
  .skills-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero { padding: 120px 24px 90px; }
  .about, .skills, .projects, .contact { padding: 100px 22px; }
  .about-inner, .contact-inner { gap: 50px; }
  .contact-form { padding: 30px 26px; }
  .hero-meta { gap: 28px; }
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .hero-meta { flex-wrap: wrap; row-gap: 20px; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .about-photo-tag { left: 16px; padding: 9px 16px; font-size: 0.66rem; }
}

/* Reduced 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;
  }
}
