/* ═══════════════════════════════════════════
   PORTFOLIO — ALEJANDRO PÉREZ LÓPEZ
   Full Responsive CSS
═══════════════════════════════════════════ */

/* ── RESET & BASE ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg:         #080810;
  --surface:    #0f0f1a;
  --surface2:   #141424;
  --border:     #1c1c30;
  --border2:    #252540;
  --gold:       #c8a96e;
  --gold2:      #e0c48a;
  --gold-dim:   rgba(200,169,110,.12);
  --blue:       #4a6fa5;
  --blue-dim:   rgba(74,111,165,.15);
  --warm-dim:   rgba(200,130,80,.12);
  --text:       #e8e8f0;
  --muted:      #6b6b80;
  --muted2:     #9999b0;
  --radius:     2px;
  --nav-h:      68px;
  --max-w:      1200px;
  --section-v:  clamp(5rem, 10vw, 9rem);
  --font-head:  'Montserrat', system-ui, sans-serif;
  --font-body:  'Outfit', system-ui, sans-serif;
  --font-mono:  'JetBrains Mono', 'Courier New', monospace;
  --ease-out:   cubic-bezier(.16,1,.3,1);
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* Scrollbar */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 2px; }

/* ── TYPOGRAPHY ── */
h1, h2, h3 { font-family: var(--font-head); font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
p { color: var(--muted2); }
a { color: inherit; }
code { font-family: var(--font-mono); font-size: .85em; color: var(--gold); }

.section-label {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--gold);
  letter-spacing: .22em;
  text-transform: uppercase;
  display: block;
  margin-bottom: .6rem;
}
.section-title {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -.025em;
  color: var(--text);
  margin-bottom: .75rem;
}
.section-title .accent { color: var(--gold); }
.section-line {
  width: 2.5rem;
  height: 2px;
  background: var(--gold);
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.body-text {
  color: var(--muted2);
  font-size: clamp(.9rem, 1.5vw, .97rem);
  line-height: 1.78;
  margin-bottom: .9rem;
}

/* ── LAYOUT ── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
}
section { position: relative; padding: var(--section-v) 0; overflow: hidden; }

/* ── BUTTONS ── */
.btn-primary, .btn-outline, .btn-submit {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-body);
  font-size: clamp(.85rem, 1.4vw, .95rem);
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform .2s var(--ease-out), background .2s, color .2s, border-color .2s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--gold);
  color: #08080e;
  padding: .7rem 1.8rem;
}
.btn-primary:hover { background: var(--gold2); transform: translateY(-2px); }
.btn-outline {
  background: transparent;
  color: var(--muted2);
  padding: .7rem 1.8rem;
  border: 1px solid var(--border2);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }

/* ── REVEAL ANIMATIONS ── */
[data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
[data-reveal-delay="1"] { transition-delay: .1s; }
[data-reveal-delay="2"] { transition-delay: .2s; }
[data-reveal-delay="3"] { transition-delay: .3s; }

/* ══════════════════════════════════════════
   NAVBAR
══════════════════════════════════════════ */
#navbar {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 800;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#navbar.scrolled {
  background: rgba(8,8,16,.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: var(--font-mono);
  color: var(--gold);
  font-size: 1rem;
  letter-spacing: .18em;
  text-decoration: none;
  font-weight: 500;
}
.nav-links {
  display: flex;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  list-style: none;
}
.nav-links a {
  font-size: .82rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted2);
  text-decoration: none;
  position: relative;
  transition: color .2s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width .3s var(--ease-out);
}
.nav-links a:hover { color: var(--gold); }
.nav-links a:hover::after { width: 100%; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 1px solid var(--border2);
  padding: .5rem .6rem;
  cursor: pointer;
  border-radius: var(--radius);
  transition: border-color .2s;
}
.nav-toggle:hover { border-color: var(--gold); }
.hamburger {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--muted2);
  transition: transform .3s, opacity .3s, background .2s;
}
.nav-toggle[aria-expanded="true"] .hamburger:nth-child(1) { transform: translateY(6.5px) rotate(45deg); background: var(--gold); }
.nav-toggle[aria-expanded="true"] .hamburger:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .hamburger:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); background: var(--gold); }

/* Mobile overlay & drawer */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 810;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
  backdrop-filter: blur(4px);
}
.mobile-overlay.open { opacity: 1; pointer-events: all; }

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 85vw);
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 820;
  display: flex;
  flex-direction: column;
  padding: 5rem 2rem 2rem;
  transform: translateX(100%);
  transition: transform .35s var(--ease-out);
}
.mobile-drawer.open { transform: translateX(0); }

.drawer-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: none;
  border: 1px solid var(--border2);
  color: var(--muted2);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: color .2s, border-color .2s;
  border-radius: var(--radius);
}
.drawer-close:hover { color: var(--gold); border-color: var(--gold); }

.mobile-drawer nav ul { list-style: none; display: flex; flex-direction: column; gap: 0; }
.drawer-link {
  display: block;
  font-family: var(--font-head);
  font-size: clamp(1.4rem, 5vw, 1.8rem);
  color: var(--muted2);
  text-decoration: none;
  padding: .75rem 0;
  border-bottom: 1px solid var(--border);
  transition: color .2s, padding-left .2s;
}
.drawer-link:hover { color: var(--gold); padding-left: .5rem; }

.drawer-socials {
  margin-top: auto;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.drawer-socials a {
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: .08em;
  transition: color .2s;
}
.drawer-socials a:hover { color: var(--gold); }

/* ══════════════════════════════════════════
   HERO
══════════════════════════════════════════ */
#hero {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: calc(var(--nav-h) + 3rem) clamp(1.25rem, 5vw, 3rem) 5rem;
  text-align: center;
  position: relative;
}
#heroCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: .6;
}
.hero-glow {
  position: absolute;
  top: 25%;
  left: 50%;
  transform: translateX(-50%);
  width: min(600px, 100vw);
  height: min(600px, 100vw);
  background: radial-gradient(circle, rgba(200,169,110,.06) 0%, transparent 65%);
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-mono);
  font-size: clamp(.7rem, 1.2vw, .78rem);
  color: var(--muted2);
  border: 1px solid var(--border2);
  padding: .4rem 1rem;
  border-radius: 99px;
  margin-bottom: 1.5rem;
  letter-spacing: .06em;
}
.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: .3; }
}
.hero-name {
  font-size: clamp(2.8rem, 9vw, 6.5rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--text);
  margin-bottom: 1.25rem;
  text-transform: uppercase;
}
.hero-name em {
  font-style: normal;
  color: var(--gold);
  font-weight: 300;
  letter-spacing: .02em;
  text-transform: none;
}
.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--muted2);
  margin-bottom: 2.5rem;
  min-height: 1.7em;
  font-weight: 300;
}
#typewriter::after {
  content: '▌';
  color: var(--gold);
  animation: blink .7s step-end infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.hero-ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .65rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  animation: scroll-bounce 2.5s ease-in-out infinite;
}
@keyframes scroll-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}
.scroll-line {
  width: 1px;
  height: 42px;
  background: linear-gradient(to bottom, var(--gold), transparent);
}

/* ══════════════════════════════════════════
   ABOUT
══════════════════════════════════════════ */
#about { background: linear-gradient(to bottom, transparent, var(--surface) 40%, transparent); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: clamp(3rem, 6vw, 6rem);
  align-items: start;
}
.about-visual { display: flex; flex-direction: column; gap: 1.5rem; }

.avatar-card {
  position: relative;
  aspect-ratio: 4/5;
  background: var(--surface2);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.avatar-initials {
  font-family: var(--font-head);
  font-size: clamp(4rem, 10vw, 8rem);
  font-weight: 900;
  color: var(--gold);
  opacity: .12;
  user-select: none;
  letter-spacing: .1em;
}
.avatar-glow {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to top, rgba(200,169,110,.06), transparent);
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border: 1px solid var(--border);
  background: var(--border);
}
.stat-item {
  background: var(--surface);
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.stat-num {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--gold);
  font-weight: 700;
  line-height: 1;
}
.stat-label {
  font-size: .72rem;
  color: var(--muted);
  font-family: var(--font-mono);
  line-height: 1.3;
}

.about-quote {
  border-left: 2px solid var(--gold);
  padding: .8rem 1.25rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.7;
  background: var(--gold-dim);
}

.skills-section { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 1.25rem; }
.skill-cat {
  font-family: var(--font-mono);
  font-size: .68rem;
  color: var(--muted);
  letter-spacing: .17em;
  text-transform: uppercase;
  margin-bottom: .6rem;
  font-weight: 400;
}
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip {
  font-family: var(--font-mono);
  font-size: .72rem;
  padding: .28rem .75rem;
  border: 1px solid var(--border2);
  color: var(--muted2);
  cursor: default;
  transition: border-color .2s, color .2s;
  border-radius: var(--radius);
}
.chip:hover { border-color: var(--gold); color: var(--gold); }
.chip.chip-blue:hover { border-color: #6a8fc5; color: #6a8fc5; }
.chip.chip-warm:hover { border-color: #c8824e; color: #c8824e; }

/* ══════════════════════════════════════════
   PROJECTS IT
══════════════════════════════════════════ */
#projects-it { background: var(--bg); }
.section-bg-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(200,169,110,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200,169,110,.025) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-bottom: 2.5rem;
}
.project-card {
  background: var(--surface);
  padding: clamp(1.5rem, 3vw, 2rem);
  position: relative;
  overflow: hidden;
  transition: background .25s;
  outline: none;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}
.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--gold-dim), transparent 60%);
  opacity: 0;
  transition: opacity .3s;
}
.project-card:hover, .project-card:focus-visible { background: var(--surface2); }
.project-card:hover::before, .project-card:focus-visible::before { opacity: 1; }
.project-card:focus-visible { box-shadow: inset 0 0 0 2px var(--gold); }
.card-icon { font-size: 1.6rem; margin-bottom: .75rem; display: block; }
.card-number {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  font-family: var(--font-mono);
  font-size: .65rem;
  color: var(--border2);
  letter-spacing: .1em;
}
.card-title {
  font-family: var(--font-head);
  font-size: clamp(1rem, 2vw, 1.1rem);
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--text);
  margin-bottom: .6rem;
}
.card-desc {
  color: var(--muted2);
  font-size: clamp(.82rem, 1.3vw, .88rem);
  line-height: 1.7;
  margin-bottom: 1.25rem;
  flex: 1;
}
.card-link-hint {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--muted);
  letter-spacing: .1em;
  margin-top: 1rem;
  transition: color .2s;
  text-transform: uppercase;
}
.project-card:hover .card-link-hint { color: var(--gold); }
.card-tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.tag {
  font-family: var(--font-mono);
  font-size: .67rem;
  padding: .22rem .65rem;
  background: var(--blue-dim);
  color: #7a9fd5;
  border: 1px solid rgba(74,111,165,.25);
  border-radius: var(--radius);
}
.projects-cta { display: flex; justify-content: center; }

/* ══════════════════════════════════════════
   PHOTOGRAPHY
══════════════════════════════════════════ */
#photography { background: linear-gradient(to bottom, transparent, var(--surface) 30%, transparent); }

.photo-filters {
  display: flex;
  gap: .5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.filter-btn {
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--muted2);
  padding: .38rem 1.1rem;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: .82rem;
  transition: border-color .2s, color .2s, background .2s;
  border-radius: var(--radius);
  touch-action: manipulation; /* elimina el delay de 300ms en móvil */
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
.filter-btn.active {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-dim);
}
/* Hover solo en dispositivos con puntero real (ratón), no en táctil */
@media (hover: hover) and (pointer: fine) {
  .filter-btn:not(.active):hover {
    border-color: rgba(200,169,110,.4);
    color: var(--muted2);
    background: transparent;
  }
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-flow: dense;
  gap: .75rem;
}
.photo-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: var(--surface2);
  border: 1px solid var(--border);
  transition: opacity .4s, transform .25s;
}
.photo-item:hover { transform: scale(1.01); }
.photo-item.hidden { opacity: .15; pointer-events: none; }
.photo-tall { grid-row: span 2; }
.photo-wide { grid-column: span 2; }

.photo-bg {
  width: 100%;
  min-height: 220px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-tall .photo-bg { min-height: 460px; }
.photo-wide .photo-bg { min-height: 220px; }
.photo-emoji { font-size: clamp(2rem, 5vw, 3.5rem); }

.photo-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.25rem 1rem .9rem;
  background: linear-gradient(to top, rgba(8,8,16,.92) 0%, transparent 100%);
  transform: translateY(6px);
  opacity: 0;
  transition: opacity .3s, transform .3s;
}
.photo-item:hover .photo-overlay { opacity: 1; transform: none; }
.photo-name {
  font-family: var(--font-head);
  font-size: clamp(.85rem, 1.5vw, .98rem);
  color: var(--text);
  margin-bottom: .2rem;
}
.photo-cat-tag {
  font-family: var(--font-mono);
  font-size: .67rem;
  color: var(--gold);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.photo-footer {
  margin-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.photo-note {
  font-size: .8rem;
  color: var(--muted);
  font-family: var(--font-mono);
}
.ig-btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--muted2);
  text-decoration: none;
  font-size: .88rem;
  border: 1px solid var(--border2);
  padding: .6rem 1.25rem;
  transition: border-color .2s, color .2s;
  border-radius: var(--radius);
}
.ig-btn:hover { border-color: var(--gold); color: var(--gold); }

/* ══════════════════════════════════════════
   CONTACT
══════════════════════════════════════════ */
#contact { background: var(--bg); }
.contact-bg {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: radial-gradient(ellipse at 50% 100%, rgba(200,169,110,.04) 0%, transparent 70%);
  pointer-events: none;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(3rem, 6vw, 6rem);
  align-items: start;
}

/* Social links */
.social-list {
  display: flex;
  flex-direction: column;
  margin-top: 2rem;
}
.social-row {
  display: grid;
  grid-template-columns: 40px 1fr 1fr auto;
  align-items: center;
  gap: .75rem;
  padding: .85rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--muted2);
  font-size: .88rem;
  transition: color .2s;
}
.social-row:hover { color: var(--gold); }
.social-row:hover .social-icon-wrap { border-color: var(--gold); color: var(--gold); }
.social-row:hover .social-arrow { transform: translateX(4px); }
.social-icon-wrap {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted2);
  transition: border-color .2s, color .2s;
  flex-shrink: 0;
}
.social-name { font-weight: 500; color: inherit; }
.social-handle { font-family: var(--font-mono); font-size: .75rem; color: var(--muted); }
.social-arrow { font-size: .8rem; transition: transform .2s; }

/* Form */
.contact-form-wrap { position: relative; }
.form-success {
  border: 1px solid rgba(200,169,110,.3);
  padding: 3rem 2rem;
  text-align: center;
  background: var(--gold-dim);
}
.form-success h3 { font-family: var(--font-head); font-size: 1.4rem; color: var(--gold); margin-bottom: .5rem; }
.form-success p { color: var(--muted2); font-size: .9rem; }
.success-icon { font-size: 2rem; color: var(--gold); margin-bottom: 1rem; }
[hidden] { display: none !important; }

.contact-form { display: flex; flex-direction: column; gap: 1.1rem; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: .35rem; }
.form-label {
  font-family: var(--font-mono);
  font-size: .68rem;
  color: var(--muted);
  letter-spacing: .14em;
  text-transform: uppercase;
}
.form-input {
  background: var(--surface);
  border: 1px solid var(--border2);
  color: var(--text);
  padding: .75rem 1rem;
  font-family: var(--font-body);
  font-size: .92rem;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  width: 100%;
  border-radius: var(--radius);
  -webkit-appearance: none;
  appearance: none;
}
.form-input::placeholder { color: var(--muted); }
.form-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200,169,110,.08);
}
.form-input.error { border-color: #e05a5a; }
.form-textarea { resize: vertical; min-height: 130px; line-height: 1.65; }
.select-wrap { position: relative; }
.select-wrap .form-input { padding-right: 2.5rem; cursor: pointer; }
.select-arrow {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  font-size: .75rem;
}
.form-select option { background: var(--surface); color: var(--text); }
.form-error {
  font-size: .75rem;
  color: #e07070;
  font-family: var(--font-mono);
  min-height: 1em;
}

.btn-submit {
  align-self: flex-start;
  background: var(--gold);
  color: #08080e;
  padding: .8rem 2rem;
  font-weight: 500;
  letter-spacing: .02em;
  position: relative;
  overflow: hidden;
}
.btn-submit:hover { background: var(--gold2); transform: translateY(-2px); }
.btn-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.btn-loading { display: inline-flex; align-items: center; gap: .5rem; }
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(8,8,14,.3);
  border-top-color: #08080e;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.form-notice {
  font-size: .75rem;
  color: var(--muted);
  font-family: var(--font-mono);
  line-height: 1.5;
}
.form-notice a { color: var(--gold); }

/* ══════════════════════════════════════════
   FOOTER
══════════════════════════════════════════ */
footer {
  border-top: 1px solid var(--border);
  padding: clamp(2rem, 4vw, 3.5rem) 0;
  position: relative;
  z-index: 1;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}
.footer-brand { display: flex; flex-direction: column; gap: .25rem; }
.footer-name { font-family: var(--font-head); font-size: clamp(1rem, 2vw, 1.2rem); color: var(--text); }
.footer-tagline { font-size: .78rem; color: var(--muted); font-family: var(--font-mono); }
.footer-nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer-nav a {
  font-size: .82rem;
  color: var(--muted2);
  text-decoration: none;
  transition: color .2s;
}
.footer-nav a:hover { color: var(--gold); }
.footer-socials { display: flex; gap: .75rem; }
.footer-socials a {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted2);
  text-decoration: none;
  transition: border-color .2s, color .2s;
  border-radius: var(--radius);
}
.footer-socials a:hover { border-color: var(--gold); color: var(--gold); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  font-size: .78rem;
  color: var(--muted);
}
.footer-mono { font-family: var(--font-mono); }

/* FAB */
#fab {
  position: fixed;
  bottom: clamp(1.25rem, 3vw, 2rem);
  right: clamp(1.25rem, 3vw, 2rem);
  width: 44px;
  height: 44px;
  background: var(--gold);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #08080e;
  z-index: 700;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .3s, transform .3s, background .2s;
  border-radius: var(--radius);
}
#fab.show { opacity: 1; transform: translateY(0); }
#fab:hover { background: var(--gold2); }

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

/* Large screens: 1400px+ (TVs, 4K) */
@media (min-width: 1400px) {
  :root { --max-w: 1380px; }
  body { font-size: 18px; }
}

/* Tablets landscape / small desktops: 1024px - 1200px */
@media (max-width: 1200px) {
  .about-grid { grid-template-columns: 1fr 1.3fr; gap: 3rem; }
  .contact-grid { grid-template-columns: 1fr 1fr; gap: 3rem; }
}

/* Tablets: 768px - 1024px (iPad, iPad Pro) */
@media (max-width: 1024px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }

  .about-grid { grid-template-columns: 1fr; }
  .about-visual { display: grid; grid-template-columns: 200px 1fr; gap: 1.5rem; }
  .avatar-card { aspect-ratio: 1; }
  .about-stats { grid-template-columns: 1fr; height: auto; }

  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .photo-tall { grid-row: span 1; }
  .photo-wide { grid-column: span 2; }
  .photo-tall .photo-bg { min-height: 260px; }

  .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
  .social-row { grid-template-columns: 40px 1fr auto; }
  .social-handle { display: none; }

  .footer-inner { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
}

/* Tablet portrait / large phones: 600px - 768px */
@media (max-width: 768px) {
  :root { --section-v: 4rem; --nav-h: 60px; }

  .hero-name { font-size: clamp(2.4rem, 10vw, 3.8rem); }
  .hero-ctas { flex-direction: column; align-items: center; }
  .btn-primary, .btn-outline { width: 100%; max-width: 280px; justify-content: center; }

  .about-visual { grid-template-columns: 1fr; }
  .avatar-card { aspect-ratio: 16/9; max-height: 200px; }
  .about-stats { grid-template-columns: repeat(3, 1fr); }

  .projects-grid { grid-template-columns: 1fr; }

  .photo-grid { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .photo-wide { grid-column: span 2; }

  .form-row-2 { grid-template-columns: 1fr; }
  .btn-submit { width: 100%; justify-content: center; }
}

/* Mobile: up to 600px (iPhone SE, standard phones) */
@media (max-width: 600px) {
  :root { --section-v: 3.5rem; }

  .hero-badge { font-size: .65rem; padding: .35rem .8rem; }
  .hero-scroll-indicator { display: none; }

  .about-visual { display: none; }

  .photo-grid { grid-template-columns: 1fr; }
  .photo-wide { grid-column: span 1; }
  .photo-tall { grid-row: span 1; }
  .photo-tall .photo-bg { min-height: 200px; }

  .photo-footer { flex-direction: column; align-items: flex-start; }
  .photo-note { display: none; }

  .social-row { grid-template-columns: 40px 1fr auto; }

  .footer-nav { gap: 1rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* Extra small: iPhone SE, Galaxy S */
@media (max-width: 380px) {
  .hero-name { font-size: 2.2rem; }
  .about-stats { grid-template-columns: repeat(3, 1fr); }
  .stat-num { font-size: 1.4rem; }
  .section-title { font-size: 1.7rem; }
}

/* ── LIGHTBOX ── */
.lb-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(4,4,10,.93);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s;
}
.lb-overlay.open { opacity: 1; pointer-events: all; }
.lb-img {
  max-width: min(92vw, 1280px);
  max-height: 88vh;
  object-fit: contain;
  border: 1px solid var(--border2);
  box-shadow: 0 0 80px rgba(0,0,0,.9);
  display: block;
}
.lb-close {
  position: fixed;
  top: 1.25rem;
  right: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border2);
  color: var(--muted2);
  font-size: 1rem;
  width: 2.2rem;
  height: 2.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .2s, border-color .2s;
  z-index: 9001;
  border-radius: var(--radius);
  line-height: 1;
}
.lb-close:hover { color: var(--gold); border-color: var(--gold); }

/* TV / large displays: 1800px+ */
@media (min-width: 1800px) {
  :root { --max-w: 1600px; }
  body { font-size: 20px; }
  .projects-grid { grid-template-columns: repeat(3, 1fr); }
}

/* High DPI (Retina) */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .avatar-card { border-width: .5px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* Print */
@media print {
  #navbar, #fab, .hero-scroll-indicator, .mobile-drawer, .mobile-overlay { display: none; }
  body { background: white; color: black; }
  section { padding: 2rem 0; }
}
