/* ══════════════════════════════════════
   DESIGN TOKENS — DARK (default)
══════════════════════════════════════ */
:root,
[data-theme="dark"] {
  --ink:       #0d0d0d;
  --ink2:      #181818;
  --ink3:      #222222;
  --surface:   #2a2a2a;
  --rule:      rgba(255,255,255,0.07);
  --rule2:     rgba(255,255,255,0.13);
  --text:      #e8e4dc;
  --muted:     #888880;
  --faint:     rgba(232,228,220,0.35);
  --gold:      #c8a96e;
  --gold2:     #e8cc96;
  --gold-dim:  rgba(200,169,110,0.12);
  --teal:      #4db8a4;
  --teal-dim:  rgba(77,184,164,0.1);
  --shadow:    rgba(0,0,0,0.5);
  --head:      'Outfit', sans-serif;
  --body:      'Outfit', sans-serif;
  --serif:     'Lora', serif;
  --r:         10px;
  --r-lg:      16px;
}

/* ══════════════════════════════════════
   DESIGN TOKENS — LIGHT
══════════════════════════════════════ */
[data-theme="light"] {
  --ink:       #f5f3ef;
  --ink2:      #ede9e3;
  --ink3:      #e3dfd7;
  --surface:   #d8d2c8;
  --rule:      rgba(0,0,0,0.08);
  --rule2:     rgba(0,0,0,0.14);
  --text:      #1a1814;
  --muted:     #6b6760;
  --faint:     rgba(26,24,20,0.4);
  --gold:      #9e7a3a;
  --gold2:     #7a5c22;
  --gold-dim:  rgba(158,122,58,0.1);
  --teal:      #2a8a78;
  --teal-dim:  rgba(42,138,120,0.1);
  --shadow:    rgba(0,0,0,0.15);
}

/* ══════════════════════════════════════
   THEME TRANSITION
══════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  transition-property: background-color, border-color, color, fill, stroke;
  transition-duration: 0.25s;
  transition-timing-function: ease;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--body);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}

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

[data-theme="light"] body::after { opacity: .25; }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 1.5rem; }
section { padding: 5rem 0; position: relative; z-index: 1; }
.ico { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* ══════════════════════════════════════
   SCROLL PROGRESS BAR
══════════════════════════════════════ */
.progress-bar {
  position: fixed; top: 0; left: 0;
  height: 2px; width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--teal));
  z-index: 999;
  transition: width .1s linear;
  pointer-events: none;
}

/* ══════════════════════════════════════
   CURSOR GLOW (desktop only)
══════════════════════════════════════ */
.cursor-glow {
  position: fixed;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,169,110,.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  transition: opacity .4s;
  will-change: transform;
}
[data-theme="light"] .cursor-glow {
  background: radial-gradient(circle, rgba(158,122,58,.04) 0%, transparent 70%);
}

/* ══════════════════════════════════════
   THEME TOGGLE BUTTON
══════════════════════════════════════ */
.theme-toggle {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--rule2);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
  position: relative;
  overflow: hidden;
}
.theme-toggle:hover { border-color: var(--gold); color: var(--gold); background: var(--gold-dim); }
.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  position: absolute;
  transition: opacity .3s, transform .3s;
}
[data-theme="dark"] .icon-sun  { opacity: 1; transform: rotate(0deg); }
[data-theme="dark"] .icon-moon { opacity: 0; transform: rotate(90deg); }
[data-theme="light"] .icon-sun  { opacity: 0; transform: rotate(-90deg); }
[data-theme="light"] .icon-moon { opacity: 1; transform: rotate(0deg); }

/* ══════════════════════════════════════
   NAV
══════════════════════════════════════ */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100; padding: 1rem 0;
  transition: background .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(13,13,13,.92);
  backdrop-filter: blur(18px);
  border-color: var(--rule);
}
[data-theme="light"] .nav.scrolled {
  background: rgba(245,243,239,.92);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.nav__logo {
  font-family: var(--head); font-weight: 800; font-size: 1.1875rem;
  letter-spacing: .04em; text-transform: uppercase;
  color: var(--gold2);
}
.nav__links { display: flex; align-items: center; gap: .125rem; }
.nav__links a {
  font-size: .8125rem; font-weight: 400; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); padding: .4rem .875rem; border-radius: 50px;
  transition: color .2s, background .2s;
}
.nav__links a:hover, .nav__links a.active { color: var(--text); background: var(--ink3); }
.nav__cta {
  font-size: .8125rem !important; font-weight: 500 !important; letter-spacing: .06em !important;
  padding: .5rem 1.25rem !important; border-radius: 4px !important;
  border: 1px solid var(--gold) !important; color: var(--gold) !important;
  background: transparent !important;
}
.nav__cta:hover { background: var(--gold) !important; color: var(--ink) !important; }

.nav__right { display: flex; align-items: center; gap: .75rem; }

.nav__burger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; background: none; border: none; }
.nav__burger span { display: block; width: 22px; height: 1.5px; background: var(--text); border-radius: 1px; transition: transform .3s, opacity .3s; }
.nav__burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__burger.open span:nth-child(2) { opacity: 0; }
.nav__burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media(max-width: 768px) {
  .nav__burger { display: flex; }
  .nav__links {
    display: none; position: absolute; top: calc(100% + 1px); left: 0; right: 0;
    flex-direction: column;
    background: rgba(13,13,13,.97); backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--rule); padding: .75rem 0 1.25rem; gap: 0;
  }
  [data-theme="light"] .nav__links {
    background: rgba(245,243,239,.97);
  }
  .nav__links.open { display: flex; }
  .nav__links a { border-radius: 0; text-align: center; padding: .75rem 2rem; }
  .nav__cta { margin: .5rem 1.5rem 0 !important; text-align: center; border-radius: 4px !important; }
}

/* ══════════════════════════════════════
   HERO
══════════════════════════════════════ */
.hero {
  min-height: 100svh; display: flex; align-items: center;
  padding-top: 5rem; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 100%);
  pointer-events: none;
}
[data-theme="light"] .hero::before {
  background-image:
    linear-gradient(rgba(0,0,0,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,.04) 1px, transparent 1px);
}
.hero__glow {
  position: absolute; width: 560px; height: 560px; right: -80px; top: -60px;
  background: radial-gradient(circle, rgba(200,169,110,.08) 0%, transparent 65%);
  border-radius: 50%; pointer-events: none;
  animation: glowPulse 6s ease-in-out infinite;
}
.hero__glow2 {
  position: absolute; width: 320px; height: 320px; left: -40px; bottom: 10%;
  background: radial-gradient(circle, rgba(77,184,164,.05) 0%, transparent 70%);
  border-radius: 50%; pointer-events: none;
  animation: glowPulse 8s 2s ease-in-out infinite;
}
@keyframes glowPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .6; transform: scale(1.1); }
}
.hero__grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3.5rem; align-items: center; position: relative; z-index: 1; width: 100%;
}
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .75rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 1.75rem;
  animation: fadeUp .5s ease both;
}
.hero__eyebrow-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--teal);
  animation: blink 2.4s ease-in-out infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .3; transform: scale(.7); }
}
.hero__name {
  font-family: var(--head); font-size: clamp(2.75rem, 5.5vw, 4.75rem);
  font-weight: 800; line-height: 1.05; letter-spacing: -.035em;
  margin-bottom: .625rem;
  animation: fadeUp .5s .08s ease both;
}
.hero__name-line {
  display: block;
  background: linear-gradient(100deg, var(--text) 0%, var(--gold2) 60%, var(--gold) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero__role {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  color: var(--muted); margin-bottom: 1.75rem;
  animation: fadeUp .5s .14s ease both;
  min-height: 2em;
}
/* Typewriter cursor */
.tw-cursor {
  display: inline-block;
  width: 2px; height: .85em;
  background: var(--gold);
  margin-left: 3px;
  vertical-align: text-bottom;
  animation: blink-cur .75s ease-in-out infinite;
  border-radius: 1px;
}
@keyframes blink-cur {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.hero__desc {
  font-size: 1rem; color: var(--muted); max-width: 420px;
  line-height: 1.8; margin-bottom: 2.25rem;
  animation: fadeUp .5s .19s ease both;
}
.hero__actions {
  display: flex; gap: .875rem; flex-wrap: wrap; margin-bottom: 2.5rem;
  animation: fadeUp .5s .24s ease both;
}
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .6875rem 1.5rem; border-radius: 4px;
  font-size: .875rem; font-weight: 500; letter-spacing: .03em;
  font-family: var(--body); cursor: pointer; border: none;
  transition: all .25s cubic-bezier(.34,1.56,.64,1);
  position: relative; overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(255,255,255,0);
  transition: background .2s;
}
.btn:hover::after { background: rgba(255,255,255,0.08); }
/* Shimmer effect on gold button */
.btn-gold::before {
  content: '';
  position: absolute; top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.2), transparent);
  transform: skewX(-20deg);
  transition: none;
}
.btn-gold:hover::before {
  left: 160%;
  transition: left .55s ease;
}
.btn-gold { background: var(--gold); color: var(--ink); font-weight: 600; }
.btn-gold:hover { background: var(--gold2); transform: translateY(-3px); box-shadow: 0 10px 28px rgba(200,169,110,0.35); }
.btn-outline { background: transparent; border: 1px solid var(--rule2); color: var(--text); }
.btn-outline:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-3px); box-shadow: 0 8px 20px rgba(200,169,110,.1); }

.hero__socials {
  display: flex; gap: .625rem;
  animation: fadeUp .5s .29s ease both;
}
.hero__soc {
  width: 38px; height: 38px; border-radius: 4px;
  border: 1px solid var(--rule2);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); transition: all .3s cubic-bezier(.34,1.56,.64,1);
}
.hero__soc:hover {
  border-color: var(--gold); color: var(--gold); background: var(--gold-dim);
  transform: translateY(-4px) scale(1.08);
}

/* Hero visual */
.hero__visual {
  display: flex; justify-content: center; align-items: center;
  animation: fadeUp .6s .15s ease both;
}
.hero__frame { position: relative; width: 340px; }
.hero__img-box {
  border-radius: var(--r-lg); overflow: hidden;
  aspect-ratio: 3/4; background: var(--ink3);
  border: 1px solid var(--rule2);
  position: relative;
}
.hero__img-box img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s cubic-bezier(.16,1,.3,1);
}
.hero__frame:hover .hero__img-box img { transform: scale(1.04); }
.hero__img-box::before, .hero__img-box::after {
  content: ''; position: absolute; width: 20px; height: 20px;
  border-color: var(--gold); border-style: solid; opacity: .6;
  transition: none;
}
.hero__img-box::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; border-radius: 2px 0 0 0; }
.hero__img-box::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; border-radius: 0 0 2px 0; }

.hero__badge {
  position: absolute;
  background: var(--ink2); border: 1px solid var(--rule2); border-radius: var(--r);
  padding: .625rem .875rem; backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px var(--shadow);
}
.hero__badge-top { top: 1.5rem; right: -1.5rem; animation: floatA 4s ease-in-out infinite; }
.hero__badge-bot { bottom: 2rem; left: -1.75rem; animation: floatB 4s 1.8s ease-in-out infinite; }
@keyframes floatA { 0%, 100% { transform: translateY(0) rotate(-.5deg); } 50% { transform: translateY(-10px) rotate(.5deg); } }
@keyframes floatB { 0%, 100% { transform: translateY(0) rotate(.5deg); } 50% { transform: translateY(9px) rotate(-.5deg); } }
.badge__row { display: flex; align-items: center; gap: .5rem; }
.badge__icon { width: 32px; height: 32px; border-radius: 6px; display: flex; align-items: center; justify-content: center; }
.badge__icon--gold { background: var(--gold-dim); }
.badge__icon--teal { background: var(--teal-dim); }
.badge__val { font-family: var(--head); font-weight: 700; font-size: 1.125rem; line-height: 1; }
.badge__lbl { font-size: .6875rem; color: var(--muted); margin-top: 1px; letter-spacing: .04em; }

.hero__scroll {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  color: var(--muted); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase;
  animation: fadeUp .5s .5s ease both;
}
.hero__scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(var(--gold), transparent);
  animation: scrollLine 1.8s ease-in-out infinite;
}
@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

@media(max-width: 900px) {
  .hero__badge-top { right: -.75rem; }
  .hero__badge-bot { left: -.75rem; }
}
@media(max-width: 768px) {
  .hero__grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero__visual { order: -1; }
  .hero__frame { width: 260px; }
  .hero__badge-top { top: .75rem; right: -1rem; }
  .hero__badge-bot { bottom: 1rem; left: -1rem; }
  .hero__scroll { display: none; }
  .hero__desc { max-width: 100%; }
  .hero__name { font-size: clamp(2.25rem, 10vw, 3.25rem); }
}

/* ══════════════════════════════════════
   SECTION COMMON
══════════════════════════════════════ */
.sec-head { margin-bottom: 2.75rem; }
.sec-label {
  font-size: .6875rem; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: var(--gold);
  display: flex; align-items: center; gap: .625rem;
  margin-bottom: .875rem;
}
.sec-label::after { content: ''; flex: 0 0 32px; height: 1px; background: var(--gold); opacity: .5; transition: none; }
.sec-title {
  font-family: var(--head); font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700; letter-spacing: -.025em; line-height: 1.15;
}
.sec-sub { font-size: 1rem; color: var(--muted); max-width: 480px; margin-top: .75rem; line-height: 1.75; }
.h-rule { border: none; border-top: 1px solid var(--rule); margin: 0; }

/* ══════════════════════════════════════
   ABOUT
══════════════════════════════════════ */
.about { background: var(--ink2); }
.about__grid {
  display: grid; grid-template-columns: 360px 1fr;
  gap: 4rem; align-items: start;
}
.about__img-wrap { position: relative; }
.about__img-box {
  border-radius: var(--r-lg); overflow: hidden;
  aspect-ratio: 4/5; background: var(--ink3);
  border: 1px solid var(--rule); position: relative;
}
.about__img-box img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s cubic-bezier(.16,1,.3,1);
}
.about__img-wrap:hover .about__img-box img { transform: scale(1.04); }
.about__img-box::before, .about__img-box::after {
  content: ''; position: absolute; width: 16px; height: 16px;
  border-color: var(--gold); border-style: solid; opacity: .5; transition: none;
}
.about__img-box::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.about__img-box::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }
.about__tag {
  position: absolute; bottom: -1rem; right: -1rem;
  background: var(--gold); color: var(--ink);
  font-family: var(--head); font-weight: 700; font-size: .8125rem;
  letter-spacing: .04em; padding: .75rem 1.125rem; border-radius: var(--r);
  line-height: 1.35;
}
.about__stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: .75rem; margin-bottom: 2rem;
}
.about__stat {
  background: var(--ink3); border: 1px solid var(--rule); border-radius: var(--r);
  padding: 1.125rem 1rem; text-align: center;
  transition: border-color .25s, transform .3s cubic-bezier(.34,1.56,.64,1), box-shadow .25s;
}
.about__stat:hover { border-color: var(--gold); transform: translateY(-4px); box-shadow: 0 8px 24px var(--shadow); }
.about__stat-val {
  font-family: var(--head); font-size: 1.75rem; font-weight: 800;
  color: var(--gold2); letter-spacing: -.02em; line-height: 1;
}
.about__stat-label { font-size: .75rem; color: var(--muted); margin-top: .375rem; letter-spacing: .04em; }
.about__text { font-size: .9375rem; color: var(--muted); line-height: 1.85; margin-bottom: 1.25rem; }
.about__list { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1.75rem; }
.about__list-item {
  display: flex; align-items: center; gap: .625rem;
  font-size: .875rem; color: var(--faint);
}
.about__list-item svg { color: var(--gold); flex-shrink: 0; }

@media(max-width: 900px) {
  .about__grid { grid-template-columns: 1fr; }
  .about__img-box { aspect-ratio: 4/3; }
  .about__img-box img { object-position: top center; }
  .about__tag { bottom: -.75rem; right: -.75rem; }
}
@media(max-width: 560px) {
  .about__img-box { aspect-ratio: 3/2; }
}

/* ══════════════════════════════════════
   SKILLS
══════════════════════════════════════ */
.skills__outer {
  display: grid; grid-template-columns: 280px 1fr; gap: 3.5rem; align-items: start;
}
.skills__sidebar-text { font-size: .9375rem; color: var(--muted); line-height: 1.8; }
.skills__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.skill-card {
  background: var(--ink2); border: 1px solid var(--rule); border-radius: var(--r);
  padding: 1.375rem 1.25rem;
  transition: border-color .25s, transform .3s cubic-bezier(.34,1.56,.64,1), box-shadow .25s;
}
.skill-card:hover {
  border-color: var(--gold);
  transform: translateY(-5px);
  box-shadow: 0 12px 32px var(--shadow);
}
.skill-card__head {
  display: flex; align-items: center; gap: .625rem; margin-bottom: 1rem;
}
.skill-card__icon {
  width: 32px; height: 32px; border-radius: 6px;
  background: var(--gold-dim);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
}
.skill-card:hover .skill-card__icon { transform: rotate(-8deg) scale(1.1); }
.skill-card__icon--teal { background: var(--teal-dim); }
.skill-card__icon--sub { background: rgba(255,255,255,.05); }
[data-theme="light"] .skill-card__icon--sub { background: rgba(0,0,0,.05); }
.skill-card__title { font-size: .875rem; font-weight: 600; letter-spacing: .03em; }
.chips { display: flex; flex-wrap: wrap; gap: .375rem; }
.chip {
  font-size: .75rem; padding: .25rem .625rem; border-radius: 4px;
  border: 1px solid var(--rule2); color: var(--muted);
  transition: all .2s cubic-bezier(.34,1.56,.64,1); cursor: default;
}
.chip:hover { border-color: var(--gold); color: var(--gold); background: var(--gold-dim); transform: translateY(-2px); }
.chip.hi { border-color: rgba(200,169,110,.3); color: var(--gold2); background: var(--gold-dim); }

@media(max-width: 900px) { .skills__outer { grid-template-columns: 1fr; } }
@media(max-width: 560px) { .skills__grid { grid-template-columns: 1fr; } }

/* ══════════════════════════════════════
   WORK
══════════════════════════════════════ */
.work { background: var(--ink2); position: relative; overflow: hidden; }

/* Floating ambient particles */
.work__particles { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.wp {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle, rgba(200,169,110,.18) 0%, transparent 70%);
  animation: wpFloat linear infinite;
}
.wp1 { width: 260px; height: 260px; top: 5%;  left: -8%;  animation-duration: 18s; animation-delay: 0s; }
.wp2 { width: 180px; height: 180px; top: 40%; right: -5%; animation-duration: 24s; animation-delay: -6s; }
.wp3 { width: 120px; height: 120px; top: 70%; left: 30%;  animation-duration: 20s; animation-delay: -3s; opacity: .6; }
.wp4 { width: 90px;  height: 90px;  top: 10%; left: 60%;  animation-duration: 15s; animation-delay: -9s; opacity: .5;
       background: radial-gradient(circle, rgba(80,200,200,.12) 0%, transparent 70%); }
.wp5 { width: 200px; height: 200px; top: 80%; right: 15%;  animation-duration: 22s; animation-delay: -12s; opacity: .4; }
.wp6 { width: 70px;  height: 70px;  top: 50%; left: 10%;  animation-duration: 13s; animation-delay: -4s; opacity: .5;
       background: radial-gradient(circle, rgba(80,200,200,.1) 0%, transparent 70%); }
@keyframes wpFloat {
  0%   { transform: translateY(0)   rotate(0deg); }
  33%  { transform: translateY(-30px) rotate(120deg); }
  66%  { transform: translateY(15px)  rotate(240deg); }
  100% { transform: translateY(0)   rotate(360deg); }
}
.work .container { position: relative; z-index: 1; }
.work__top {
  display: flex; align-items: flex-end; justify-content: space-between;
  flex-wrap: wrap; gap: 1.5rem; margin-bottom: 2.25rem;
}
.work__filters { display: flex; gap: .375rem; flex-wrap: wrap; }
.filt {
  font-size: .75rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  padding: .375rem .875rem; border-radius: 4px;
  border: 1px solid var(--rule2); background: transparent;
  color: var(--muted); cursor: pointer; font-family: var(--body);
  transition: all .2s;
}
.filt:hover, .filt.active { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.work__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem;
}
.proj {
  background: var(--ink3); border: 1px solid var(--rule); border-radius: var(--r);
  overflow: hidden; position: relative;
  transition: border-color .3s, transform .4s cubic-bezier(.34,1.56,.64,1), box-shadow .35s; cursor: pointer;
}
/* Shine sweep on hover */
.proj::before {
  content: '';
  position: absolute;
  top: 0; left: -80%;
  width: 55%; height: 100%;
  background: linear-gradient(to right, transparent, rgba(255,255,255,.05), transparent);
  transform: skewX(-15deg);
  z-index: 2; pointer-events: none;
  transition: left 0s;
}
.proj:hover::before { left: 140%; transition: left .65s ease; }
.proj:hover {
  border-color: rgba(200,169,110,.35);
  transform: translateY(-10px);
  box-shadow: 0 24px 56px var(--shadow), 0 0 0 1px rgba(200,169,110,.18);
}
.proj.hidden { display: none; }

/* ── PORTRAIT CARD — phone screenshot style ── */
.proj--portrait .proj__thumb {
  background: radial-gradient(ellipse 90% 80% at 50% 110%, rgba(200,169,110,.07) 0%, var(--ink) 65%);
}
.proj--portrait .proj__thumb img {
  width: auto; height: 90%;
  object-fit: contain;
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 16px;
  box-shadow:
    0 0 0 6px rgba(255,255,255,.07),
    0 0 0 7px rgba(0,0,0,.55),
    0 18px 48px rgba(0,0,0,.75);
  transition: transform .5s cubic-bezier(.16,1,.3,1), box-shadow .4s;
}
.proj--portrait:hover .proj__thumb img {
  transform: translate(-50%, -50%) scale(1.04) translateY(-4px);
  box-shadow:
    0 0 0 6px rgba(255,255,255,.1),
    0 0 0 7px rgba(0,0,0,.55),
    0 28px 60px rgba(0,0,0,.8);
}
/* ── LANDSCAPE CARD — default desktop screenshot style ── */
.proj--landscape .proj__thumb img { width: 100%; height: 100%; object-fit: cover; }

.proj__thumb {
  aspect-ratio: 16/9; background: var(--ink2);
  position: relative; overflow: hidden;
}
.proj__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s cubic-bezier(.16,1,.3,1); }
.proj:not(.proj--portrait):hover .proj__thumb img { transform: scale(1.06); }
.proj__thumb-ph {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  color: var(--muted);
}
.proj__overlay {
  position: absolute; inset: 0; z-index: 3;
  background: rgba(13,13,13,.78);
  display: flex; align-items: center; justify-content: center; gap: .75rem;
  opacity: 0; transition: opacity .3s;
}
.proj:hover .proj__overlay { opacity: 1; }
.proj__ob {
  font-size: .8125rem; font-weight: 500; padding: .45rem 1rem; border-radius: 4px;
  cursor: pointer; border: none; font-family: var(--body);
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .15s;
}
.proj__ob:hover { transform: scale(1.1); box-shadow: 0 6px 18px rgba(0,0,0,.45); }
.ob-demo { background: var(--gold); color: var(--ink); }
.ob-info { background: rgba(255,255,255,.13); color: var(--text); border: 1px solid rgba(255,255,255,.2); backdrop-filter: blur(4px); }
.proj__body { padding: 1rem 1.125rem 1.25rem; }
.proj__tags { display: flex; gap: .375rem; flex-wrap: wrap; margin-bottom: .5rem; }
.ptag {
  font-size: .625rem; text-transform: uppercase; letter-spacing: .08em;
  padding: .175rem .55rem; border-radius: 3px; font-weight: 600;
}
.ptag-web  { background: rgba(200,169,110,.12); color: var(--gold); }
.ptag-site { background: rgba(80,200,200,.1);  color: var(--teal); }
.ptag-bot  { background: var(--teal-dim);      color: var(--teal); }
.ptag-crm  { background: rgba(255,255,255,.06); color: var(--muted); }
[data-theme="light"] .ptag-crm  { background: rgba(0,0,0,.06); }
[data-theme="light"] .ptag-site { background: rgba(0,160,160,.1); }

/* Tag pop-in when card reveals */
.proj.in .ptag { animation: tagPop .4s cubic-bezier(.34,1.56,.64,1) both; }
.proj.in .ptag:nth-child(1) { animation-delay: .15s; }
.proj.in .ptag:nth-child(2) { animation-delay: .22s; }
.proj.in .ptag:nth-child(3) { animation-delay: .29s; }
@keyframes tagPop {
  from { opacity: 0; transform: scale(.7) translateY(4px); }
  to   { opacity: 1; transform: none; }
}
.proj__title {
  font-family: var(--head); font-weight: 600; font-size: .9375rem;
  letter-spacing: -.01em; margin-bottom: .375rem; line-height: 1.35;
}
.proj__desc { font-size: .8125rem; color: var(--muted); line-height: 1.6; }

@media(max-width: 900px) { .work__grid { grid-template-columns: repeat(2, 1fr); } }
@media(max-width: 560px) { .work__grid { grid-template-columns: 1fr; gap: .875rem; } }

/* ══════════════════════════════════════
   GALLERY CAROUSEL
══════════════════════════════════════ */
.g-track {
  display: flex;
  width: 100%; height: 100%;
  transition: transform .48s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}
.g-img {
  flex: 0 0 100%;
  width: 100%; height: 100%;
  object-fit: cover;
  user-select: none;
  pointer-events: none;
  -webkit-user-drag: none;
}
.g-img.g-img--portrait {
  object-fit: contain;
  background: radial-gradient(ellipse 80% 70% at 50% 108%, rgba(200,169,110,.07) 0%, #0a0a0a 68%);
}
[data-theme="light"] .g-img.g-img--portrait {
  background: radial-gradient(ellipse 80% 70% at 50% 108%, rgba(200,169,110,.12) 0%, #f2f2f2 68%);
}

/* Dots */
.g-dots {
  position: absolute;
  bottom: .55rem; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: .375rem;
  z-index: 4;
  background: rgba(0,0,0,.38);
  backdrop-filter: blur(6px);
  padding: .28rem .5rem;
  border-radius: 20px;
  pointer-events: auto;
}
.g-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,.38);
  border: none; cursor: pointer; padding: 0;
  transition: background .25s, width .25s, border-radius .25s;
  flex-shrink: 0;
}
.g-dot.active {
  background: var(--gold);
  width: 16px;
  border-radius: 4px;
}

/* Arrows */
.g-arrow {
  position: absolute; top: 50%;
  transform: translateY(-50%);
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(0,0,0,.52);
  border: 1px solid rgba(255,255,255,.14);
  color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 4;
  opacity: 0;
  transition: opacity .22s, background .22s, transform .22s;
  backdrop-filter: blur(6px);
  padding: 0;
}
.g-arrow--prev { left: .45rem; }
.g-arrow--next { right: .45rem; }
.proj:hover .g-arrow { opacity: 1; }
.g-arrow:hover {
  background: rgba(200,169,110,.38);
  transform: translateY(-50%) scale(1.1);
}

/* Touch devices — arrows always visible */
@media (pointer: coarse) {
  .g-arrow { opacity: .82; width: 34px; height: 34px; }
  .g-arrow--prev { left: .35rem; }
  .g-arrow--next { right: .35rem; }
}

/* Mobile-specific thumbnail height */
@media (max-width: 560px) {
  .proj__thumb { aspect-ratio: 4/3; }
  .g-dots { bottom: .45rem; }
  .g-dot { width: 5px; height: 5px; }
  .g-dot.active { width: 14px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .g-track { transition: none; }
}

/* ══════════════════════════════════════
   MODAL
══════════════════════════════════════ */
.modal-bd {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.88); backdrop-filter: blur(10px);
  z-index: 200; display: flex; align-items: center; justify-content: center;
  padding: 1rem; opacity: 0; pointer-events: none; transition: opacity .3s;
}
.modal-bd.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--ink2); border: 1px solid var(--rule2); border-radius: var(--r-lg);
  width: 100%; max-width: 880px; max-height: 92vh; overflow-y: auto;
  transform: translateY(24px) scale(.97); transition: transform .35s cubic-bezier(.16,1,.3,1);
}
.modal-bd.open .modal { transform: none; }
.modal__hd {
  padding: 1.375rem 1.625rem .5rem;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem;
}
.modal__close {
  width: 34px; height: 34px; border-radius: 6px; background: var(--ink3); border: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--muted); flex-shrink: 0; transition: background .2s, color .2s, transform .2s;
}
.modal__close:hover { background: var(--rule2); color: var(--text); transform: rotate(90deg); }
.modal__bd { padding: .75rem 1.625rem 1.75rem; }
.browser { border: 1px solid var(--rule2); border-radius: var(--r); overflow: hidden; margin-bottom: 1.25rem; }
.browser__bar {
  background: var(--ink3); padding: .5rem .875rem;
  display: flex; align-items: center; gap: .5rem;
  border-bottom: 1px solid var(--rule);
}
.traff { display: flex; gap: .4rem; }
.traff span { width: 9px; height: 9px; border-radius: 50%; transition: none; }
.traff-r { background: #ff5f57; } .traff-y { background: #febc2e; } .traff-g { background: #28c840; }
.browser__url {
  flex: 1; text-align: center; font-size: .75rem; color: var(--muted);
  background: var(--ink2); border-radius: 50px; padding: .2rem .75rem;
}
.browser__iframe { height: 400px; position: relative; background: var(--ink); }
.modal__img {
  width: 100%; height: 100%; border: none; display: block;
  object-fit: cover;
}
.modal__img--portrait {
  object-fit: contain;
  background: radial-gradient(ellipse 80% 80% at 50% 110%, rgba(200,169,110,.07) 0%, var(--ink) 65%);
}
.modal__img--landscape { object-fit: cover; }
.modal__desc { font-size: .9375rem; color: var(--muted); line-height: 1.75; margin-bottom: 1.25rem; }
.modal__meta { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.modal__meta-item { font-size: .875rem; }
.modal__meta-label { color: var(--muted); font-size: .75rem; letter-spacing: .06em; margin-bottom: .2rem; text-transform: uppercase; }
.modal__meta-val { font-weight: 500; }

/* ══════════════════════════════════════
   CONTACT
══════════════════════════════════════ */
.contact__grid {
  display: grid; grid-template-columns: 1fr 1.5fr; gap: 4rem; align-items: start;
}
.contact__intro { font-size: .9375rem; color: var(--muted); line-height: 1.8; margin-bottom: 1.75rem; }
.cinfo-list { display: flex; flex-direction: column; gap: .625rem; }
.cinfo {
  display: flex; align-items: center; gap: .875rem;
  background: var(--ink2); border: 1px solid var(--rule); border-radius: var(--r);
  padding: .875rem 1rem; transition: border-color .2s, background .2s, transform .3s cubic-bezier(.34,1.56,.64,1);
}
a.cinfo:hover { border-color: var(--gold); background: var(--gold-dim); transform: translateX(6px); }
.cinfo__icon {
  width: 36px; height: 36px; border-radius: 6px; background: var(--gold-dim);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); flex-shrink: 0;
}
.cinfo__icon--teal { background: var(--teal-dim); color: var(--teal); }
.cinfo__icon--sub { background: rgba(255,255,255,.05); color: var(--muted); }
[data-theme="light"] .cinfo__icon--sub { background: rgba(0,0,0,.05); }
.cinfo__lbl { font-size: .75rem; color: var(--muted); letter-spacing: .04em; }
.cinfo__val { font-size: .9rem; font-weight: 500; }
.form-box {
  background: var(--ink2); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 1.75rem;
}
.form-title { font-family: var(--head); font-size: 1.125rem; font-weight: 600; margin-bottom: 1.5rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .875rem; }
.fg { margin-bottom: 1rem; }
.flabel { display: block; font-size: .75rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin-bottom: .425rem; }
.finput, .ftarea {
  width: 100%; background: var(--ink3); border: 1px solid var(--rule2);
  border-radius: 6px; color: var(--text); font-family: var(--body); font-size: .9rem;
  padding: .6875rem .875rem; outline: none; transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
}
.finput:focus, .ftarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200,169,110,.15);
}
.finput.error { border-color: #e86c5a; box-shadow: 0 0 0 3px rgba(232,108,90,.12); }
.finput::placeholder, .ftarea::placeholder { color: rgba(136,134,128,.45); }
.ftarea { resize: vertical; min-height: 110px; }
.char-count { font-size: .7rem; color: var(--muted); text-align: right; margin-top: .25rem; }
.fsub {
  width: 100%; padding: .8125rem; border-radius: 4px;
  background: var(--gold); color: var(--ink); font-family: var(--body);
  font-size: .9375rem; font-weight: 600; letter-spacing: .03em;
  border: none; cursor: pointer; transition: all .25s cubic-bezier(.34,1.56,.64,1);
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  position: relative; overflow: hidden;
}
.fsub::before {
  content: '';
  position: absolute; top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.2), transparent);
  transform: skewX(-20deg);
  transition: none;
}
.fsub:hover::before { left: 160%; transition: left .55s ease; }
.fsub:hover { background: var(--gold2); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(200,169,110,0.3); }
.fsub:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

/* honeypot — hidden from real users, visible to bots */
.hp-field { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }

@media(max-width: 768px) {
  .contact__grid { grid-template-columns: 1fr; gap: 2.25rem; }
  .form-row { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
.footer {
  border-top: 1px solid var(--rule); padding: 2.5rem 0 2rem; background: var(--ink);
}
.footer__inner {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1.25rem;
}
.footer__logo {
  font-family: var(--head); font-weight: 800; font-size: 1.125rem;
  letter-spacing: .04em; text-transform: uppercase; color: var(--gold2);
}
.footer__nav { display: flex; flex-wrap: wrap; gap: .25rem; }
.footer__nav a {
  font-size: .75rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); padding: .35rem .625rem; border-radius: 3px; transition: color .2s;
}
.footer__nav a:hover { color: var(--text); }
.footer__soc { display: flex; gap: .5rem; }
.footer__soc a {
  width: 32px; height: 32px; border-radius: 4px; border: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: center; color: var(--muted);
  transition: all .25s cubic-bezier(.34,1.56,.64,1);
}
.footer__soc a:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-3px) scale(1.1); }
.footer__copy {
  width: 100%; text-align: center; font-size: .75rem; color: var(--muted);
  margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--rule);
  letter-spacing: .04em;
}

/* ══════════════════════════════════════
   TOAST
══════════════════════════════════════ */
.toast {
  position: fixed; bottom: 1.75rem; right: 1.75rem;
  background: var(--ink2); border: 1px solid var(--rule2); border-radius: var(--r);
  padding: .875rem 1.125rem; display: flex; align-items: center; gap: .625rem;
  z-index: 9999; font-size: .875rem; max-width: 300px;
  transform: translateY(90px); opacity: 0;
  transition: transform .4s cubic-bezier(.34,1.56,.64,1), opacity .3s;
  box-shadow: 0 8px 32px var(--shadow);
}
.toast.show { transform: translateY(0); opacity: 1; }
@media (max-width: 600px) {
  .toast { bottom: auto; top: 1rem; right: 1rem; left: 1rem; max-width: 100%; transform: translateY(-80px); }
  .toast.show { transform: translateY(0); }
}
.toast.ok { border-left: 2px solid var(--teal); }
.toast.err { border-left: 2px solid #e86c5a; }
.toast svg { flex-shrink: 0; transition: none; }

/* ══════════════════════════════════════
   REVEAL ANIMATIONS (Intersection Observer)
══════════════════════════════════════ */
.rv {
  opacity: 0; transform: translateY(32px);
  transition: opacity .75s ease, transform .75s cubic-bezier(.16,1,.3,1);
}
.rv.in { opacity: 1; transform: none; }
.rv-left {
  opacity: 0; transform: translateX(-32px);
  transition: opacity .75s ease, transform .75s cubic-bezier(.16,1,.3,1);
}
.rv-left.in { opacity: 1; transform: none; }
.rv-right {
  opacity: 0; transform: translateX(32px);
  transition: opacity .75s ease, transform .75s cubic-bezier(.16,1,.3,1);
}
.rv-right.in { opacity: 1; transform: none; }

/* Staggered children inside rv containers */
.skills__grid .skill-card:nth-child(1) { transition-delay: .05s; }
.skills__grid .skill-card:nth-child(2) { transition-delay: .12s; }
.skills__grid .skill-card:nth-child(3) { transition-delay: .19s; }
.skills__grid .skill-card:nth-child(4) { transition-delay: .26s; }

/* Stagger for project cards */
.work__grid .proj:nth-child(1)  { transition-delay: .03s; }
.work__grid .proj:nth-child(2)  { transition-delay: .07s; }
.work__grid .proj:nth-child(3)  { transition-delay: .11s; }
.work__grid .proj:nth-child(4)  { transition-delay: .15s; }
.work__grid .proj:nth-child(5)  { transition-delay: .19s; }
.work__grid .proj:nth-child(6)  { transition-delay: .23s; }
.work__grid .proj:nth-child(7)  { transition-delay: .27s; }
.work__grid .proj:nth-child(8)  { transition-delay: .31s; }
.work__grid .proj:nth-child(9)  { transition-delay: .35s; }
.work__grid .proj:nth-child(10) { transition-delay: .39s; }
.work__grid .proj:nth-child(11) { transition-delay: .43s; }
.work__grid .proj:nth-child(12) { transition-delay: .47s; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Spin for loading button */
@keyframes spin {
  to { transform: rotate(360deg); }
}
.spin { animation: spin .8s linear infinite; transform-origin: center; }

/* ══════════════════════════════════════
   SCROLLBAR
══════════════════════════════════════ */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--ink3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--surface); }

/* ══════════════════════════════════════
   FOCUS ACCESSIBILITY
══════════════════════════════════════ */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}
