/* ===== Colors & base ===== */
:root {
  --bg: #07070B;
  --text: #ECECF1;
  --muted: #A3A5B1;
  --soft: #C9CAD3;
  --dim: #8E90A0;
  --accent: #D94F72;      /* light burgundy: text on black */
  --wine: #8E1B3A;        /* deep burgundy: buttons, banner */
  --purple: #5C0A22;      /* dark wine glow */
  --line: rgba(255, 255, 255, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}
h1, h2, h3 { font-family: 'Space Grotesk', Inter, sans-serif; margin: 0; }
p { margin: 0; }
a { color: var(--accent); }
.accent { color: var(--accent); }
.mono, .label, .when, .badge { font-family: 'JetBrains Mono', monospace; }

.page { position: relative; overflow: hidden; min-height: 100vh; }
.container { position: relative; z-index: 2; max-width: 1200px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }

/* ===== Animations ===== */
@keyframes floaty { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(40px,-50px) scale(1.15); } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(217,79,114,.7); } 100% { box-shadow: 0 0 0 12px rgba(217,79,114,0); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@keyframes shine { to { background-position: 200% center; } }
.rise { animation: rise .9s cubic-bezier(.2,.8,.2,1) both; }

/* Sections fade in when scrolled into view */
.reveal { opacity: 0; transform: translateY(50px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.8,.2,1); }
.reveal.visible { opacity: 1; transform: none; }

/* ===== Background effects ===== */
.spotlight {
  position: absolute; z-index: 1; width: 600px; height: 600px; left: -999px; top: -999px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(217,79,114,.14), transparent 65%);
  transition: left .15s ease-out, top .15s ease-out;
}
.orb { position: absolute; border-radius: 50%; pointer-events: none; }
.orb-purple { top: -160px; left: -120px; width: 560px; height: 560px; background: var(--purple); filter: blur(140px); opacity: .8; animation: floaty 14s ease-in-out infinite; }
.orb-lime { top: 180px; right: -160px; width: 520px; height: 520px; background: var(--wine); filter: blur(160px); opacity: .5; animation: floaty 18s ease-in-out infinite reverse; }
.grid-bg {
  position: absolute; top: 0; left: 0; right: 0; height: 900px; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 70%);
  mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 70%);
}

/* ===== Header ===== */
.header { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; padding-top: 28px; padding-bottom: 28px; }
.logo { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 22px; color: #fff; text-decoration: none; letter-spacing: -.02em; }
.nav { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(12px); font-size: 14px; font-weight: 500; }
.nav a { padding: 8px 16px; color: var(--soft); text-decoration: none; border-radius: 999px; transition: color .2s; }
.nav a:hover { color: var(--accent); }
.nav a.nav-cta { background: var(--wine); color: #fff; font-weight: 600; }

/* ===== Hero ===== */
.hero { display: flex; flex-direction: column; gap: 32px; padding-top: 120px; padding-bottom: 140px; }
.badge { display: inline-flex; align-self: flex-start; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(217,79,114,.35); background: rgba(217,79,114,.08); font-size: 13px; color: var(--accent); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1.6s infinite; }
.hero h1 { font-size: clamp(52px, 9vw, 132px); line-height: .95; font-weight: 700; letter-spacing: -.045em; }
.shine {
  background: linear-gradient(90deg, #D94F72, #F2A0B4, #D94F72); background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shine 4s linear infinite; transition: opacity .25s;
}
.shine.out { opacity: 0; }
.cursor { color: var(--accent); animation: blink 1s steps(1) infinite; }
.lead { font-size: 21px; color: var(--muted); max-width: 620px; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 30px; border-radius: 999px; font-weight: 700; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
.btn:hover { transform: translateY(-3px); box-shadow: 0 12px 40px -8px rgba(217,79,114,.6); }
.btn-primary { background: var(--wine); color: #fff; }
.btn-ghost { border: 1.5px solid rgba(255,255,255,.25); color: #fff; font-weight: 600; backdrop-filter: blur(8px); }
.btn-white { align-self: flex-start; min-height: 64px; padding: 0 34px; background: #fff; color: var(--bg); font-family: 'Space Grotesk', sans-serif; font-size: 22px; }

/* ===== Ticker ===== */
.ticker { position: relative; z-index: 2; background: var(--wine); color: #fff; overflow: hidden; transform: rotate(-1.5deg); margin: 0 -40px; }
.ticker-track { display: flex; width: max-content; padding: 18px 0; animation: marquee 28s linear infinite; }
.ticker-track span { font-family: 'Space Grotesk', sans-serif; font-size: 28px; font-weight: 700; padding: 0 28px; white-space: nowrap; }

/* ===== Sections ===== */
.section { padding-top: 80px; padding-bottom: 80px; }
#about { padding-top: 140px; }
.split { display: flex; flex-wrap: wrap; gap: 56px; }
.section-head { flex: 1 1 240px; display: flex; flex-direction: column; gap: 8px; margin-bottom: 0; }
#projects .section-head { margin-bottom: 48px; }
.section-body { flex: 999 1 560px; min-width: 0; }
.label { font-size: 14px; color: var(--accent); }
.section h2 { font-size: 48px; letter-spacing: -.03em; line-height: 1; }

/* About */
.about { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.photo {
  width: 220px; height: 260px; border-radius: 24px; object-fit: cover;
  background: linear-gradient(135deg, #1A1A24, #2A1F45); border: 1px solid rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: center; color: var(--dim); font-size: 14px;
  transform: rotate(-3deg); box-shadow: 16px 16px 0 var(--wine); transition: transform .4s;
}
.photo:hover { transform: rotate(0deg) scale(1.03); }
.about-text { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 18px; color: var(--soft); font-size: 19px; }

/* Projects */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.card {
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); border-radius: 24px; overflow: hidden;
  transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease;
}
.card:hover { transform: translateY(-8px) rotate(-.4deg); border-color: var(--accent); box-shadow: 0 20px 60px -20px rgba(217,79,114,.45); }
.card-img { height: 220px; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.85); font-size: 14px; }
.grad-1 { background: linear-gradient(135deg, #8E1B3A, #2A0A14); }
.grad-2 { background: linear-gradient(135deg, #5C0A22, #14080C); }
.grad-3 { background: linear-gradient(135deg, #B8304F, #3A0716); }
.card-body { padding: 26px; display: flex; flex-direction: column; gap: 10px; }
.card-body .mono { font-size: 13px; color: var(--dim); }
.card-body h3 { font-size: 24px; color: #fff; }
.card-body p:last-child { color: var(--muted); font-size: 16px; }

/* Experience */
.timeline { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.row { display: flex; flex-wrap: wrap; gap: 8px 32px; padding: 28px 0; border-bottom: 1px solid var(--line); transition: background .3s, padding .3s; }
.row:hover { background: rgba(255,255,255,.03); padding-left: 16px; }
.row > div { flex: 1 1 320px; min-width: 0; }
.when { flex: 0 0 160px; font-size: 14px; color: var(--accent); }
.row h3 { font-size: 22px; color: #fff; }
.row div p { margin-top: 6px; color: var(--muted); font-size: 16px; }

/* Skills */
.chips { display: flex; flex-wrap: wrap; gap: 12px; align-content: flex-start; }
.chip { padding: 12px 22px; border-radius: 999px; border: 1px solid rgba(255,255,255,.18); font-size: 16px; font-weight: 500; transition: all .2s; cursor: default; }
.chip:hover { background: var(--wine); color: #fff; border-color: var(--wine); transform: scale(1.08); }
#skills { padding-bottom: 120px; }

/* Contact */
.contact { position: relative; z-index: 2; border-top: 1px solid rgba(255,255,255,.1); }
.contact .container { display: flex; flex-direction: column; gap: 28px; padding-top: 120px; padding-bottom: 48px; }
.huge { font-size: clamp(56px, 10vw, 150px); letter-spacing: -.05em; line-height: .9; }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; margin-top: 80px; padding-top: 28px; border-top: 1px solid rgba(255,255,255,.1); font-size: 15px; }
.footer p { color: var(--dim); }
.footer nav { display: flex; flex-wrap: wrap; gap: 28px; font-weight: 500; }
.footer nav a { color: var(--soft); text-decoration: none; transition: color .2s; }
.footer nav a:hover { color: var(--accent); }

/* ===== Phones ===== */
@media (max-width: 640px) {
  .container { padding-left: 20px; padding-right: 20px; }
  .hero { padding-top: 64px; padding-bottom: 96px; }
  .section h2 { font-size: 38px; }
  .nav a { padding: 8px 12px; }
  .btn-white { font-size: 17px; padding: 0 24px; }
}

/* Respect users who turn off motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
