/* ============================================================
   Kayla Rodriguez — Portfolio
   Edit the colors / fonts in :root to re-theme the whole site.
   ============================================================ */
:root {
  --bg: #0e0e10;
  --bg-2: #161619;
  --bg-3: #1e1e23;
  --line: rgba(255, 255, 255, 0.1);
  --text: #f4f1f3;
  --muted: #c8c3ca;
  --accent: #d2549a;        /* magenta from your Notion name */
  --accent-2: #ff7ac0;      /* lighter hover */
  --blue: #3f7fc4;          /* from Science Said */
  --yellow: #8196ff;        /* from Operation: Girlhood */
  --red: #d8262f;
  --radius: 14px;
  --maxw: 1180px;
  --font-sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Playfair Display", Georgia, serif;
  --font-mono: "Space Mono", ui-monospace, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, iframe { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--accent); color: #fff; }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 200;
  background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px;
}
.skip-link:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 4px; }

/* film-grain overlay for texture */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 150; opacity: .07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.wrap { width: min(var(--maxw), 100% - 48px); margin-inline: auto; }

/* ---------- Scroll progress ---------- */
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 120;
  background: linear-gradient(90deg, var(--accent), var(--yellow), var(--blue)); }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(14, 14, 16, 0.78);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { font-family: var(--font-serif); font-size: 1.7rem; text-decoration: none; letter-spacing: .01em; }
.logo span { color: var(--accent); font-style: italic; }
.nav ul { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; align-items: center; }
.nav a.link {
  position: relative; text-decoration: none; padding: 8px 14px; font-size: .95rem;
  font-family: var(--font-mono); text-transform: lowercase; letter-spacing: .02em; color: var(--muted);
  transition: color .25s;
}
.nav a.link::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .3s ease;
}
.nav a.link:hover, .nav a.link[aria-current="page"] { color: var(--text); }
.nav a.link:hover::after, .nav a.link[aria-current="page"]::after { transform: scaleX(1); }
.nav .cta {
  text-decoration: none; background: var(--accent); color: #fff; padding: 9px 18px; border-radius: 999px;
  font-size: .92rem; font-weight: 600; margin-left: 8px; transition: transform .2s, background .2s;
}
.nav .cta:hover { background: var(--accent-2); transform: translateY(-2px); }
.menu-btn { display: none; background: none; border: 1px solid var(--line); color: var(--text);
  padding: 8px 14px; border-radius: 8px; font: inherit; font-family: var(--font-mono); cursor: pointer; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 26px; border-radius: 999px;
  font-weight: 600; text-decoration: none; border: 1.5px solid var(--accent);
  transition: transform .2s, background .2s, color .2s, box-shadow .2s; cursor: pointer; font-size: 1rem;
  font-family: var(--font-sans);
}
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); transform: translateY(-3px); box-shadow: 0 10px 30px -10px var(--accent); }
.btn.ghost { background: transparent; color: var(--text); }
.btn.ghost:hover { background: var(--accent); transform: translateY(-3px); }
.btn .arrow { transition: transform .25s; }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(48px, 9vw, 110px) 0 clamp(40px, 6vw, 70px); overflow: hidden; min-height: calc(100svh - 68px);}
.hero .blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .35; z-index: -1; animation: float 14s ease-in-out infinite alternate; }
.hero .b1 { width: 420px; height: 420px; background: var(--accent); top: -120px; left: -100px; }
.hero .b2 { width: 360px; height: 360px; background: var(--blue); bottom: -140px; right: 8%; animation-delay: -6s; opacity: .22; }
@keyframes float { to { transform: translate(60px, 40px) scale(1.12); } }

.hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.eyebrow { font-family: var(--font-mono); font-size: .85rem; color: var(--accent-2); letter-spacing: .08em; text-transform: uppercase; margin: 0 0 18px; }
.eyebrow::before { content: "● "; animation: blink 1.8s infinite; }
@keyframes blink { 50% { opacity: .2; } }
h1.hero-title { font-size: clamp(2.6rem, 6.4vw, 5rem); line-height: 1.02; margin: 0 0 22px; font-weight: 700; letter-spacing: -.02em; }
h1.hero-title .name { color: var(--accent); font-family: var(--font-serif); font-style: italic; font-weight: 400; }
.hero-role { font-size: clamp(1.25rem, 2.4vw, 1.7rem); font-weight: 500; margin: 0 0 18px; }
.hero-role em { font-family: var(--font-serif); font-size: 1.15em; color: var(--accent-2); }
.rotator { display: inline-block; min-width: 1ch; color: var(--yellow); border-right: 2px solid var(--yellow); padding-right: 4px; animation: caret .8s steps(1) infinite; }
@keyframes caret { 50% { border-color: transparent; } }
.hero-sub { color: var(--muted); max-width: 56ch; margin: 0 0 30px; font-size: 1.08rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.portrait { position: relative; justify-self: center; width: min(380px, 80vw); }
.portrait .frame {
  position: relative; border-radius: 22px; overflow: hidden; aspect-ratio: 4 / 4.6;
  border: 2px solid var(--text); transform: rotate(2.5deg); transition: transform .5s cubic-bezier(.2, .8, .2, 1);
  box-shadow: 14px 14px 0 var(--accent); background: var(--bg-3);
}
.portrait:hover .frame { transform: rotate(-1deg) scale(1.02); }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait .sticker {
  position: absolute; z-index: 2; font-family: var(--font-mono); font-size: .78rem; font-weight: 700;
  padding: 7px 12px; border-radius: 999px; border: 2px solid #111; color: #111;
  animation: bob 5s ease-in-out infinite alternate;
}
.sticker.s1 { background: var(--yellow); top: -14px; left: -22px; transform: rotate(-8deg); }
.sticker.s2 { background: #fff; bottom: 26px; right: -26px; transform: rotate(6deg); animation-delay: -2s; }
.sticker.s3 { background: var(--blue); color: #fff; bottom: -18px; left: 8%; transform: rotate(-4deg); animation-delay: -3.5s; border-color: #fff; }
@keyframes bob { to { translate: 0 -8px; } }

/* ---------- Marquee ---------- */
.marquee { border-block: 1px solid var(--line); background: var(--bg-2); overflow: hidden; padding: 16px 0; }
.marquee-track { display: flex; width: max-content; gap: 40px; animation: scroll 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee span { font-family: var(--font-serif); font-size: clamp(1.125rem, 1.6vw, 1.425rem); font-style: italic; white-space: nowrap; font-weight: 500; display: flex; align-items: center; gap: 24px; }
.marquee span::after { content: "✦"; color: var(--accent); font-style: normal; font-size: .8em; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
section.block { padding: clamp(56px, 8vw, 100px) 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 36px; }
h2.section-title { font-size: clamp(2rem, 4.5vw, 3.2rem); margin: 0; letter-spacing: -.02em; line-height: 1.1; }
h2.section-title em { font-family: var(--font-serif); color: var(--accent); font-weight: 400; }
.section-num { font-family: var(--font-mono); color: var(--muted); font-size: .9rem; }

/* ---------- Project cards ---------- */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.card {
  position: relative; display: block; text-decoration: none; border-radius: var(--radius);
  background: var(--bg-2); border: 1px solid var(--line); overflow: hidden;
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), border-color .3s, box-shadow .3s;
  transform-style: preserve-3d;
}
.card:hover { border-color: var(--accent); box-shadow: 0 24px 60px -24px rgba(210, 84, 154, .55); }
.card .thumb { aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-3); }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2, .8, .2, 1), filter .4s; }
.card:hover .thumb img { transform: scale(1.07); }
.card .meta { padding: 20px 24px 24px; display: grid; gap: 8px; }
.card .tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }
.tag.hot { border-color: var(--accent); color: var(--accent-2); }
.card h3 { font-size: 1.5rem; margin: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.card h3 .go { font-size: 1.3rem; color: var(--accent); transition: transform .3s; }
.card:hover h3 .go { transform: translate(4px, -4px) rotate(0deg); }
.card p { margin: 0; color: var(--muted); font-size: .98rem; }
.card .num { position: absolute; top: 14px; left: 16px; z-index: 2; font-family: var(--font-mono); font-size: .8rem; background: rgba(0, 0, 0, .65); padding: 4px 10px; border-radius: 999px; backdrop-filter: blur(6px); }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 0.75fr 1.45fr; gap: clamp(30px, 6vw, 80px); align-items: start; }
.about-grid p { margin: 0 0 18px; }
.about-big { font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.3; font-weight: 500; letter-spacing: -.01em; }
.about-big em { font-family: var(--font-serif); color: var(--accent-2); }
.themes { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.themes .tag { font-size: .8rem; padding: 7px 14px; transition: all .25s; }
.themes .tag:hover { background: var(--accent); color: #fff; border-color: var(--accent); transform: rotate(-2deg) scale(1.05); }
.skills { margin-top: 30px; display: grid; grid-template-columns: 1fr; gap: 12px 24px; font-family: var(--font-mono); font-size: .86rem; color: var(--muted); }
.skills b {
  color: var(--text);
  display: block;
  margin-bottom: 4px;
  font-weight: 700;
}


/* ---------- Contact ---------- */
.contact { text-align: center; background: linear-gradient(180deg, transparent, rgba(210, 84, 154, .12)); border-top: 1px solid var(--line); }
.contact h2 { font-size: clamp(2.4rem, 8vw, 6rem); line-height: 1; margin: 0 0 24px; letter-spacing: -.03em; }
.contact h2 em { font-family: var(--font-serif); color: var(--accent); font-weight: 400; }
.contact-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.email-big { font-size: clamp(1.1rem, 3vw, 1.8rem); font-family: var(--font-mono); text-decoration: none; border-bottom: 2px solid var(--accent); transition: color .2s; word-break: break-all; }
.email-big:hover { color: var(--accent-2); }

footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-family: var(--font-mono); font-size: .82rem; }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- Project pages ---------- */
.p-hero { padding: clamp(40px, 7vw, 80px) 0 30px; }
.crumbs { font-family: var(--font-mono); font-size: .82rem; color: var(--muted); margin-bottom: 22px; }
.crumbs a { text-decoration: none; } .crumbs a:hover { color: var(--accent-2); }
.p-hero h1 { font-size: clamp(2.8rem, 8vw, 6.4rem); line-height: .98; margin: 0 0 14px; letter-spacing: -.03em; }
.p-hero h1 em { font-family: var(--font-serif); font-weight: 400; color: var(--accent); }
.p-hero .kicker { font-family: var(--font-serif); font-style: italic; font-size: clamp(1.3rem, 2.6vw, 1.9rem); color: var(--muted); margin: 0 0 26px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0; border-block: 1px solid var(--line); margin-top: 30px; }
.facts div { padding: 16px 18px 16px 0; }
.facts dt { font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.facts dd { margin: 4px 0 0; font-weight: 600; }
.facts { margin-bottom: 0; }
.cover { margin: 40px 0 10px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); }
.cover img { width: 100%; max-height: 620px; object-fit: contain; margin: 0 auto; }

.article { display: grid; grid-template-columns: 200px 1fr; gap: clamp(24px, 5vw, 70px); padding: 40px 0; border-top: 1px solid var(--line); }
.article:first-of-type { border-top: none; }
.article > h2 { font-family: var(--font-mono); font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent-2); margin: 6px 0 0; font-weight: 700; position: sticky; top: 90px; align-self: start; }
.article .body { max-width: 74ch; }
.article .body p { margin: 0 0 20px; }
.article .body .lede { font-size: clamp(1.25rem, 2.2vw, 1.55rem); line-height: 1.45; font-weight: 500; }
.article .body blockquote { margin: 28px 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--accent); font-family: var(--font-serif); font-size: 1.6rem; line-height: 1.3; font-style: italic; }
.article .body ul { padding-left: 1.2em; } .article .body li { margin-bottom: 10px; }
.article .body li::marker { color: var(--accent); }
.article.wide { grid-template-columns: 1fr; }
.article.wide > h2 { position: static; margin-bottom: 4px; }

.placeholder-note {
  border: 1.5px dashed var(--yellow); color: var(--yellow); border-radius: 10px; padding: 14px 18px;
  font-family: var(--font-mono); font-size: .85rem; background: rgba(243, 216, 107, .06); margin: 0 0 18px;
}
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.gallery figure { margin: 0; }
.gallery button { all: unset; display: block; cursor: zoom-in; width: 100%; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); transition: transform .3s, border-color .3s; }
.gallery button:hover { transform: translateY(-6px) rotate(-.6deg); border-color: var(--accent); }
.gallery button:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }
.gallery img { width: 100%; height: auto; }
.gallery figcaption { font-family: var(--font-mono); font-size: .76rem; color: var(--muted); padding: 8px 2px; }
.media-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); }
.media-frame iframe, .media-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.media-frame.tall { aspect-ratio: 3 / 4; max-width: 560px; }
.flip-frame { aspect-ratio: 4 / 3; max-width: 900px; }

.next-prev { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.next-prev a { padding: 44px 24px; text-decoration: none; transition: background .3s; }
.next-prev a:hover { background: var(--bg-2); }
.next-prev a:last-child { text-align: right; border-left: 1px solid var(--line); }
.next-prev small { font-family: var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.next-prev strong { display: block; font-size: clamp(1.4rem, 3.4vw, 2.4rem); letter-spacing: -.02em; margin-top: 6px; }
.next-prev a:hover strong { color: var(--accent-2); }

/* ---------- Résumé ---------- */
.job { display: grid; grid-template-columns: 230px 1fr; gap: 30px; padding: 30px 0; border-top: 1px solid var(--line); }
.job .when { font-family: var(--font-mono); font-size: .85rem; color: var(--muted); }
.job h3 { margin: 0 0 2px; font-size: 1.35rem; }
.job .where { color: var(--accent-2); font-family: var(--font-mono); font-size: .86rem; margin-bottom: 12px; }
.job ul { margin: 0; padding-left: 1.2em; } .job li { margin-bottom: 8px; } .job li::marker { color: var(--accent); }
.resume-embed { height: 80vh; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg-2); }
.resume-embed iframe, .resume-embed object { width: 100%; height: 100%; border: 0; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(0, 0, 0, .92); display: none; place-items: center; padding: 30px; }
.lightbox.open { display: grid; }
.lightbox img { max-height: 90vh; max-width: 92vw; width: auto; border-radius: 8px; animation: pop .3s ease; }
.lightbox button { position: absolute; top: 18px; right: 22px; background: var(--accent); color: #fff; border: 0; font-size: 1.1rem; border-radius: 999px; padding: 10px 16px; cursor: pointer; font-family: var(--font-mono); }
@keyframes pop { from { transform: scale(.94); opacity: 0; } }

/* ---------- Custom cursor (desktop only) ---------- */
.cursor { position: fixed; left: 0; top: 0; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--accent-2); pointer-events: none; z-index: 400; transform: translate(-50%, -50%); transition: width .2s, height .2s, background .2s; mix-blend-mode: difference; opacity: 0; }
.cursor.on { opacity: 1; }
.cursor.big { width: 54px; height: 54px; background: rgba(255, 255, 255, .15); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .about-grid { grid-template-columns: 1fr; }
  .portrait { order: -1; width: min(300px, 70vw); margin-bottom: 20px; }
  .projects { grid-template-columns: 1fr; }
  .article, .job { grid-template-columns: 1fr; gap: 10px; }
  .article > h2 { position: static; }
}
@media (max-width: 760px) {
  .menu-btn { display: block; }
  .nav ul { position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--bg); border-bottom: 1px solid var(--line); padding: 10px 24px 20px; display: none; }
  .nav ul.open { display: flex; }
  .nav a.link { padding: 14px 0; } .nav a.link::after { left: 0; right: 0; bottom: 8px; }
  .nav .cta { text-align: center; margin: 8px 0 0; }
}
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
@media print {
  .nav, .progress, .cursor, .marquee, footer, .no-print, body::after { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .job { break-inside: avoid; } .job .where, .eyebrow { color: #444; }
}
