/* ============================================================
   PORTFOLIO — dimensional, electric, cyan/violet duotone
   EDIT: theme tokens below (gradient stops: --g1 / --g2)
   ============================================================ */

:root {
  --bg: #f4f7fc;
  --bg-raised: #ffffff;
  --text: #0e1322;
  --text-muted: #54607a;
  --accent: #0a7c95;                 /* cyan — AA on light bg */
  --g1: #06b6d4;                     /* gradient start — cyan */
  --g2: #8b5cf6;                     /* gradient end — violet */
  --glow-1: rgba(6, 182, 212, 0.22);
  --glow-2: rgba(139, 92, 246, 0.20);
  --line: rgba(14, 19, 34, 0.12);
  --shadow: 0 24px 60px -24px rgba(14, 19, 34, 0.25);
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --space: clamp(4rem, 9vw, 8.5rem);
  --radius: 18px;
}

[data-theme="dark"] {
  --bg: #090d1a;
  --bg-raised: #111729;
  --text: #e9edf7;
  --text-muted: #97a3bd;
  --accent: #67e8f9;                 /* cyan-300 — AA on dark bg */
  --glow-1: rgba(6, 182, 212, 0.30);
  --glow-2: rgba(139, 92, 246, 0.28);
  --line: rgba(233, 237, 247, 0.14);
  --shadow: 0 24px 70px -20px rgba(0, 0, 0, 0.6);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  transition: background-color 0.35s ease, color 0.35s ease;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ambient corner glows behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(40rem 40rem at 110% -10%, var(--glow-2), transparent 60%),
    radial-gradient(38rem 38rem at -10% 110%, var(--glow-1), transparent 60%);
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 0.6em;
  letter-spacing: -0.02em;
}

h2 { font-size: clamp(1.9rem, 3.8vw, 3rem); max-width: 22ch; }
h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); }
p  { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -3rem;
  background: var(--accent);
  color: var(--bg);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  z-index: 100;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 1rem; }

/* gradient utility for display text */
.grad-text,
.hero__name,
.section-head h2 {
  background: linear-gradient(94deg, var(--text) 30%, var(--g1) 70%, var(--g2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--text); /* fallback */
}

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

section { padding: var(--space) clamp(1.25rem, 6vw, 6rem); }
.section-head { margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.section-head--minor h2 { font-size: clamp(1.5rem, 2.8vw, 2.2rem); }
.section-head__note { max-width: 46ch; }

/* ---------- header / nav (glass) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.9rem clamp(1.25rem, 6vw, 6rem);
}

.nav__logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}

.nav__links { display: flex; gap: 1.4rem; list-style: none; }
.nav__links a {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}
.nav__links a:hover { color: var(--accent); }

.theme-toggle {
  width: 2.2rem; height: 2.2rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: box-shadow 0.25s ease;
}
.theme-toggle:hover { box-shadow: 0 0 0 4px var(--glow-1); }
.theme-toggle__icon {
  width: 0.85rem; height: 0.85rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--g1), var(--g2));
  transition: transform 0.3s ease;
}
[data-theme="dark"] .theme-toggle__icon { transform: scale(0.7) rotate(180deg); }

/* ---------- hero with floating 3D orbs ---------- */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  /* JS sets --mx / --my (-0.5 .. 0.5) for cursor parallax */
}

.hero__scene { position: absolute; inset: 0; z-index: -1; }

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(55px);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  animation: orb-pulse 7s ease-in-out infinite alternate;
}
.orb--1 {
  width: clamp(16rem, 32vw, 28rem); aspect-ratio: 1;
  top: 6%; right: 4%;
  background: radial-gradient(circle at 30% 30%, var(--glow-1), transparent 70%),
              radial-gradient(circle at 70% 70%, var(--glow-2), transparent 70%);
  transform: translate3d(calc(var(--mx, 0) * 70px), calc(var(--my, 0) * 70px), 0);
}
.orb--2 {
  width: clamp(10rem, 20vw, 17rem); aspect-ratio: 1;
  bottom: 8%; right: 28%;
  background: radial-gradient(circle, var(--glow-2), transparent 70%);
  transform: translate3d(calc(var(--mx, 0) * -45px), calc(var(--my, 0) * -45px), 0);
  animation-delay: 1.5s;
}
.orb--3 {
  width: clamp(8rem, 16vw, 13rem); aspect-ratio: 1;
  top: 22%; left: -3%;
  background: radial-gradient(circle, var(--glow-1), transparent 70%);
  transform: translate3d(calc(var(--mx, 0) * 30px), calc(var(--my, 0) * 30px), 0);
  animation-delay: 3s;
}
@keyframes orb-pulse {
  from { opacity: 0.65; }
  to   { opacity: 1; }
}

.hero__inner { max-width: 62rem; }

.hero__name {
  font-size: clamp(2.9rem, 8vw, 6rem);
  font-weight: 700;
}

.hero__title {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1.4rem;
}

.hero__tagline {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.2rem, 2.4vw, 1.7rem);
  color: var(--text-muted);
  max-width: 34ch;
}

.hero__scroll {
  display: inline-block;
  margin-top: 2.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}

/* ---------- selected work (3D tilt cards) ---------- */
.case {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
  padding: clamp(2.5rem, 5vw, 4.5rem) 0;
  border-top: 1px solid var(--line);
}
.case--flip { grid-template-columns: 5fr 7fr; }
.case--flip .case__media { order: 2; }
.case--flip .case__body  { order: 1; }

/* JS applies perspective/rotate on mousemove (pointer: fine only) */
.case__media {
  border-radius: var(--radius);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  will-change: transform;
  box-shadow: var(--shadow);
}
.case__media:hover {
  box-shadow: 0 18px 50px -12px var(--glow-1), 0 30px 80px -20px var(--glow-2);
}

.case__index {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.case__tags {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.4rem;
}

.case__ppo { margin: 0 0 1.5rem; }
.case__ppo > div { margin-bottom: 1rem; }
.case__ppo dt {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.2rem;
}
.case__ppo dd { margin: 0; color: var(--text-muted); }

.case__link {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
}
.case__link:hover { text-decoration: underline; }

/* image placeholders — EDIT: swap for real <img> */
.img-ph {
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--g1) 8%, var(--bg-raised)),
                            color-mix(in srgb, var(--g2) 10%, var(--bg-raised)));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.img-ph--lg { aspect-ratio: 4 / 3; }
.img-ph--sm { aspect-ratio: 16 / 9; margin-bottom: 1.25rem; }

/* ---------- beyond the screen (inverted deep-navy band) ---------- */
.beyond {
  background:
    radial-gradient(50rem 24rem at 85% 0%, rgba(139, 92, 246, 0.18), transparent 65%),
    radial-gradient(40rem 24rem at 0% 100%, rgba(6, 182, 212, 0.15), transparent 65%),
    #0b1124;
}
.beyond .eyebrow { color: #7df3ff; }
.beyond h2, .beyond h3 { color: #f0f3fb; }
.beyond .section-head h2 {
  background: linear-gradient(94deg, #f0f3fb 30%, #67e8f9 75%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.beyond .section-head__note,
.beyond .beyond-card p,
.beyond .case__tags { color: #a3aecb; }
.beyond .section-head { margin-left: clamp(0rem, 8vw, 8rem); }

.beyond__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 3rem);
  max-width: 60rem;
  margin-left: auto;
}

/* glass cards, tilted by JS */
.beyond-card {
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 1.6rem;
  backdrop-filter: blur(10px);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  will-change: transform;
}
.beyond-card:hover {
  box-shadow: 0 18px 50px -12px rgba(6, 182, 212, 0.35);
}
.beyond-card h3 { font-size: 1.2rem; }
.beyond-card .img-ph {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  color: #a3aecb;
}
.beyond-card__result { color: #e6eaf5; }
.beyond-card__result strong { color: #7df3ff; font-weight: 600; }

/* ---------- toolkit ---------- */
.toolkit__groups {
  display: grid;
  grid-template-columns: 8fr 4fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.tags { display: flex; flex-wrap: wrap; gap: 0.6rem; list-style: none; }
.tags li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font-size: 0.88rem;
  font-weight: 500;
  background: var(--bg-raised);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.tags li:hover {
  transform: translateY(-3px);
  border-color: var(--g1);
  box-shadow: 0 10px 24px -10px var(--glow-1);
}
.tags--minor li {
  padding: 0.3rem 0.8rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: transparent;
}
.tags--minor li:hover { border-color: var(--g2); box-shadow: 0 10px 24px -10px var(--glow-2); }
.toolkit__group--minor .eyebrow { color: var(--text-muted); }

/* ---------- about ---------- */
.about__grid {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: clamp(2rem, 5vw, 5rem);
}
.about__copy { max-width: 52ch; padding-top: 0.5rem; }
.about__copy p { color: var(--text-muted); }
.about__copy p:first-child { color: var(--text); }

/* ---------- experience timeline (gradient spine) ---------- */
.timeline {
  list-style: none;
  position: relative;
  max-width: 44rem;
  padding-left: 2rem;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 0.3rem; top: 0.4rem; bottom: 0.4rem;
  width: 2px;
  background: linear-gradient(to bottom, var(--g1), var(--g2));
  border-radius: 2px;
}

.timeline__item { position: relative; padding-bottom: 2.4rem; }
.timeline__item::before {
  content: "";
  position: absolute;
  left: -2rem; top: 0.45rem;
  width: 0.7rem; height: 0.7rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--g1), var(--g2));
  box-shadow: 0 0 12px var(--glow-1);
}

.timeline__date {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}
.timeline__item p:last-child { color: var(--text-muted); margin: 0; }

.timeline__item--major h3 { font-size: 1.35rem; }
.timeline__item--minor h3 { font-size: 1.05rem; font-family: var(--font-sans); font-weight: 600; }
.timeline__item--minor::before {
  background: var(--bg);
  border: 2px solid var(--g2);
  width: 0.5rem; height: 0.5rem;
  box-shadow: none;
}
.timeline__item--minor p:last-child { font-size: 0.92rem; }

/* ---------- contact ---------- */
.contact { border-top: 1px solid var(--line); }
.contact__inner { max-width: 46rem; }

.contact__email {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.4rem, 3.4vw, 2.4rem);
  display: inline-block;
  margin-bottom: 2rem;
}

.contact__actions {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  background: linear-gradient(94deg, var(--g1), var(--g2));
  color: #ffffff;
  padding: 0.8rem 1.7rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 12px 30px -10px var(--glow-2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -10px var(--glow-1), 0 18px 40px -10px var(--glow-2);
}

.contact__social { display: flex; gap: 1.4rem; list-style: none; }
.contact__social a {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-footer {
  padding: 2rem clamp(1.25rem, 6vw, 6rem);
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ---------- scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .orb { transition: none; animation: none; }
  .case__media, .beyond-card, .tags li, .btn { transition: none; }
  *, *::before, *::after { animation: none !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .case, .case--flip { grid-template-columns: 1fr; }
  .case--flip .case__media { order: 0; }
  .about__grid { grid-template-columns: 1fr; }
  .toolkit__groups { grid-template-columns: 1fr; }
  .beyond__grid { max-width: none; }
}

@media (max-width: 768px) {
  .beyond__grid { grid-template-columns: 1fr; }
  .beyond .section-head { margin-left: 0; }
  .nav__links { display: none; } /* EDIT: add a burger menu if you want mobile nav links */
  .hero { min-height: 72vh; }
}

@media (max-width: 480px) {
  body { font-size: 1rem; }
  .contact__actions { gap: 1.2rem; }
}
