/* -------------------------
   Theme + tokens
-------------------------- */

:root {
  --accent: #6e5b98;
  --accent-soft: rgba(110, 91, 152, 0.12);
  --accent-muted: rgba(110, 91, 152, 0.6);

  --container: 1100px;
  --pad-x: clamp(22px, 5vw, 72px);
  --section-pad: clamp(40px, 6vw, 80px);
  --header-hint: 84px;

  /* How much of the hero strip should be visible at the bottom on load */
  --hero-peek: clamp(120px, 16vh, 220px);

  --serif: 'Playfair Display', ui-serif, Georgia, serif;
  --hook: 'Cairo Play', 'Playfair Display', ui-serif, Georgia, serif;
  --sans:
    'Inter', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto,
    Helvetica, Arial;
  --condensed:
    'Roboto Condensed', ui-sans-serif, system-ui, -apple-system, Segoe UI,
    Roboto, Helvetica, Arial;

  --kicker: 13px;
  --title: 26px;
  --body: 18px;

  --bg: #fafafa;
  --surface: #ffffff;
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --rule: rgba(26, 26, 26, 0.1);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.08);

  scroll-behavior: smooth;
}

@media (prefers-color-scheme: dark) {
  html[data-theme='auto'] {
    --bg: #0a0a0a;
    --surface: #0f0f0f;
    --ink: #f5f5f5;
    --muted: rgba(245, 245, 245, 0.65);
    --rule: rgba(245, 245, 245, 0.12);
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.6);
  }
}

html[data-theme='dark'] {
  --bg: #0a0a0a;
  --surface: #0f0f0f;
  --ink: #f5f5f5;
  --muted: rgba(245, 245, 245, 0.65);
  --rule: rgba(245, 245, 245, 0.12);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.6);
}

html[data-theme='light'] {
  --bg: #fafafa;
  --surface: #ffffff;
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --rule: rgba(26, 26, 26, 0.1);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.08);
}

/* -------------------------
   Base
-------------------------- */

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.container {
  width: min(var(--container), 100%);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

/* -------------------------
   Sticky header
-------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 9999;
  background: color-mix(in srgb, var(--surface) 95%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  min-width: 0;
  gap: 16px;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  min-width: 0;
}

.brand-trigger {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  min-width: 0;
}

/* Login dropdown */
.login-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 10000;
  min-width: 280px;
}

.brand:hover .login-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.login-dropdown.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.login-form {
  display: flex;
  gap: 8px;
}

.login-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  outline: none;
  transition: border-color 220ms ease;
}

.login-input:focus {
  border-color: var(--accent);
}

.login-button {
  padding: 10px 20px;
  background: var(--accent);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 220ms ease;
}

.login-button:hover {
  background: color-mix(in srgb, var(--accent) 85%, #000);
  transform: translateY(-1px);
}

.login-error {
  margin-top: 8px;
  padding: 8px;
  background: rgba(220, 53, 69, 0.1);
  border: 1px solid rgba(220, 53, 69, 0.3);
  border-radius: 6px;
  font-size: 12px;
  color: #dc3545;
}

/* Mobile: Click to toggle */
@media (max-width: 768px) {
  .brand:hover .login-dropdown {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
  }

  .brand-trigger {
    -webkit-tap-highlight-color: transparent;
  }
}

.brand-mark {
  width: 48px;
  height: 48px;
  color: var(--ink);
  flex-shrink: 0;
}

.brand-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.brand-subtitle {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: nowrap;
  min-width: 0;
}

.nav {
  display: flex;
  gap: 20px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.nav a {
  white-space: nowrap;
  position: relative;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-decoration: none;
  color: var(--muted);
  transition: color 220ms ease;
}

.nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0%;
  height: 1px;
  background: var(--accent);
  transition: width 200ms ease;
}

.nav a:hover {
  color: var(--ink);
}

.nav a:hover::after {
  width: 100%;
}

.theme-toggle {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: all 220ms ease;
}

.theme-toggle:hover {
  border-color: var(--accent-muted);
  background: var(--accent-soft);
}

.theme-icon {
  font-size: 16px;
  line-height: 1;
}

/* -------------------------
   Parallax Background
-------------------------- */

.parallax-bg {
  /* Fixed background image that stays in place while content scrolls over */
  min-height: calc(100vh - var(--hero-peek));
  min-height: calc(100svh - var(--hero-peek)); /* better on mobile browsers */
  background-attachment: fixed;
  background-position: top center;
  background-repeat: no-repeat;
  background-size: cover;
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: calc(var(--header-hint) + 20px) var(--pad-x) 0;
  margin-top: calc(-1 * var(--header-hint));
  padding-top: calc(var(--header-hint) + 20px);
}

/* Overlay to slightly darken the image for better text contrast */
.parallax-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(250, 250, 250, 0.05) 0%,
    rgba(250, 250, 250, 0.25) 100%
  );
  pointer-events: none;
}

html[data-theme='dark'] .parallax-bg::before,
html[data-theme='auto'] .parallax-bg::before {
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 10, 0.2) 0%,
    rgba(10, 10, 10, 0.4) 100%
  );
}

@media (prefers-color-scheme: dark) {
  html[data-theme='auto'] .parallax-bg::before {
    background: linear-gradient(
      to bottom,
      rgba(10, 10, 10, 0.2) 0%,
      rgba(10, 10, 10, 0.4) 100%
    );
  }
}

.parallax-welcome {
  position: relative;
  z-index: 1;
  font-family: 'Cairo Play', var(--serif);
  font-weight: 600;
  font-size: clamp(52px, 9vw, 110px);
  font-style: italic;
  letter-spacing: 0.01em;
  color: rgba(26, 26, 26, 0.12);
  text-shadow: 0 2px 20px rgba(255, 255, 255, 0.2);
  animation: welcomeFadeIn 1.5s ease forwards;
  opacity: 0;
  max-width: 1200px;
  margin: 0;
  line-height: 1;
}

html[data-theme='dark'] .parallax-welcome,
html[data-theme='auto'] .parallax-welcome {
  color: rgba(245, 245, 245, 0.15);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

@media (prefers-color-scheme: dark) {
  html[data-theme='auto'] .parallax-welcome {
    color: rgba(245, 245, 245, 0.15);
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
  }
}

@keyframes welcomeFadeIn {
  to {
    opacity: 1;
  }
}

/* For mobile devices where fixed background-attachment doesn't work well */
@media (max-width: 768px) {
  .parallax-bg {
    background-attachment: scroll;
    background-position: top center;
    padding: calc(var(--header-hint) + 15px) var(--pad-x) 0;
    margin-top: calc(-1 * var(--header-hint));
  }

  .parallax-welcome {
    font-size: clamp(40px, 10vw, 70px);
  }
}

/* -------------------------
   Shared: Purple Hero with Parallax Effect (DP pages)
   Used by: daniela/indexDP.html + login.html
-------------------------- */

.hero-parallax-container {
  position: relative;
  height: 35vh;
  min-height: 220px;
  max-height: 300px;
  overflow: visible;
  pointer-events: none;
  background: linear-gradient(135deg, #6e5b98 0%, #8b7ba8 100%);
}

html[data-theme='dark'] .hero-parallax-container,
html[data-theme='auto'] .hero-parallax-container {
  background: linear-gradient(135deg, #5a4a7a 0%, #6e5b98 100%);
}

@media (prefers-color-scheme: dark) {
  html[data-theme='auto'] .hero-parallax-container {
    background: linear-gradient(135deg, #5a4a7a 0%, #6e5b98 100%);
  }
}

.hero-parallax-fixed {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 35vh;
  min-height: 220px;
  max-height: 300px;
  background: linear-gradient(135deg, #6e5b98 0%, #8b7ba8 100%);
  z-index: 0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding-top: var(--header-hint);
  pointer-events: none;
}

html[data-theme='dark'] .hero-parallax-fixed,
html[data-theme='auto'] .hero-parallax-fixed {
  background: linear-gradient(135deg, #5a4a7a 0%, #6e5b98 100%);
}

@media (prefers-color-scheme: dark) {
  html[data-theme='auto'] .hero-parallax-fixed {
    background: linear-gradient(135deg, #5a4a7a 0%, #6e5b98 100%);
  }
}

.hero-title-corner {
  position: absolute;
  top: calc(var(--header-hint) + 44px);
  left: var(--pad-x);
  font-family: 'Cairo Play', var(--hook);
  font-weight: 600;
  font-size: clamp(52px, 9vw, 110px);
  font-style: italic;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.15);
  text-shadow: 0 2px 20px rgba(255, 255, 255, 0.1);
  line-height: 1;
  margin: 0;
  z-index: 2;
}

@media (max-width: 760px) {
  .hero-parallax-container {
    height: 30vh;
    min-height: 200px;
    max-height: 260px;
  }

  .hero-parallax-fixed {
    height: 30vh;
    min-height: 200px;
    max-height: 260px;
    padding-top: var(--header-hint);
  }

  .hero-title-corner {
    top: calc(var(--header-hint) + 44px);
    font-size: clamp(40px, 12vw, 70px);
  }
}

/* -------------------------
   Hero Strip (scrolls over parallax)
-------------------------- */

.hero-strip {
  width: 100%;
  background: rgba(42, 42, 42, 0.92);
  backdrop-filter: blur(12px);
  padding: clamp(24px, 4vh, 40px) 0;
  position: relative;
  z-index: 2;
  margin-bottom: clamp(60px, 10vh, 120px);
}

html[data-theme='dark'] .hero-strip,
html[data-theme='auto'] .hero-strip {
  background: rgba(20, 20, 20, 0.92);
}

@media (prefers-color-scheme: dark) {
  html[data-theme='auto'] .hero-strip {
    background: rgba(20, 20, 20, 0.92);
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s ease forwards;
  animation-delay: 0.3s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-hook {
  margin: 0;
  font-family: 'Cairo Play', var(--sans);
  font-weight: 600;
  line-height: 1.3;
  color: #ffffff;
}

.hook-line-main {
  font-size: clamp(28px, 4.5vw, 52px);
  letter-spacing: -0.01em;
  margin-bottom: 0.2em;
  display: flex;
  align-items: center;
  gap: 0.3em;
  flex-wrap: wrap;
}

.hook-crossed {
  position: relative;
  display: inline-block;
}

.hook-crossed::after {
  content: '';
  position: absolute;
  left: -0.1em;
  right: -0.1em;
  top: 50%;
  height: 5px;
  background: var(--accent);
  transform: translateY(-50%) rotate(-5deg);
}

.hook-clarity {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 1.35em;
  color: var(--accent);
  font-style: italic;
  position: relative;
  top: -0.05em;
  margin-left: -0.1em;
}

.hook-line-sub {
  font-size: clamp(18px, 3vw, 32px);
  font-weight: 400;
  letter-spacing: 0;
  opacity: 0.92;
  max-width: 90%;
}

@media (max-width: 768px) {
  .hero-strip {
    padding: clamp(20px, 5vh, 32px) 0;
  }

  .hook-line-main {
    font-size: clamp(24px, 6vw, 36px);
    flex-wrap: wrap;
  }

  .hook-line-sub {
    font-size: clamp(16px, 4vw, 24px);
    max-width: 100%;
  }
}

/* -------------------------
   Sections
-------------------------- */

.section {
  padding: var(--section-pad) 0;
  content-visibility: auto;
  contain-intrinsic-size: 800px;
}

#about,
#work,
#contact,
#top {
  scroll-margin-top: var(--header-hint);
}

.section-intro {
  padding-top: var(--section-pad);
  position: relative;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    var(--bg) clamp(100px, 15vh, 200px)
  );
}

.kicker {
  margin-bottom: 10px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: var(--kicker);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.title {
  margin: 0 0 16px 0;
  max-width: 58ch;
  font-family: var(--serif);
  font-weight: 600;
  font-size: var(--title);
  line-height: 1.3;
  color: var(--ink);
}

.body {
  margin: 0 0 16px 0;
  max-width: 68ch;
  font-family: var(--condensed);
  font-weight: 300;
  font-size: var(--body);
  line-height: 1.65;
  color: var(--ink);
}

.body:last-child {
  margin-bottom: 0;
}

/* -------------------------
   Intro Grid
-------------------------- */

.intro-grid {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: clamp(50px, 8vw, 100px);
  align-items: start;
}

.intro-text {
  max-width: 72ch;
}

.intro-accent {
  margin-top: 40px;
  opacity: 0.8;
  position: relative;
}

.accent-interactive {
  position: relative;
  cursor: pointer;
}

.accent-drawing {
  width: 100%;
  height: auto;
  color: var(--ink);
}

/* Pulse animation - continuous */
.accent-pulse .pulse-circle {
  animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    r: 60;
    opacity: 0.5;
  }
  50% {
    r: 68;
    opacity: 0.3;
  }
}

/* Plus icon indicator */
.accent-plus-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 20px;
  font-weight: 300;
  box-shadow: 0 4px 12px rgba(110, 91, 152, 0.3);
  transition: all 0.3s ease;
  pointer-events: none;
}

.accent-interactive:hover .accent-plus-icon {
  opacity: 0;
  transform: translate(-50%, -50%) scale(1.2);
}

/* Hover links */
.accent-links {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  pointer-events: none;
}

.accent-interactive:hover .accent-links {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.accent-interactive:hover .accent-drawing {
  opacity: 0.3;
}

.accent-link {
  padding: 10px 16px;
  background: var(--surface);
  border: 1.5px solid var(--accent);
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: all 220ms ease;
  box-shadow: var(--shadow);
}

.accent-link:hover {
  background: var(--accent);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Mobile: Show text links only, no graphic */
.accent-mobile-links {
  display: none;
}

@media (max-width: 980px) {
  .accent-interactive {
    display: none;
  }

  .accent-mobile-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
  }

  .accent-mobile-link {
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
    transition: color 220ms ease;
  }

  .accent-mobile-link:hover {
    color: color-mix(in srgb, var(--accent) 85%, #000);
  }
}

/* -------------------------
   Work Grid & Cards
-------------------------- */

.view-all-work {
  margin-top: 40px;
  text-align: center;
}

.view-all-button {
  padding: 14px 32px;
  background: transparent;
  border: 1.5px solid var(--accent);
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--accent);
  cursor: pointer;
  transition: all 220ms ease;
}

.view-all-button:hover {
  background: var(--accent);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(110, 91, 152, 0.2);
}

.work-grid {
  margin-top: 32px;
  display: flex;
  gap: clamp(16px, 2.5vw, 36px);
  justify-content: center;
  align-items: flex-start;
  flex-wrap: nowrap;
}

@media (max-width: 768px) {
  .work-grid {
    flex-direction: column;
    align-items: center;
    flex-wrap: wrap;
  }
}

.work-card {
  width: 320px;
  height: 427px;
  perspective: 1200px;
  perspective-origin: 50% 50%;
  cursor: pointer;
  flex-shrink: 1;
  flex-grow: 0;
  position: relative;
  min-width: 200px;
}

@media (max-width: 1100px) and (min-width: 769px) {
  .work-card {
    width: calc((100vw - var(--pad-x) * 2 - 40px) / 3);
    height: auto;
    aspect-ratio: 3 / 4;
    min-width: 200px;
  }
}

@media (max-width: 768px) {
  .work-card {
    width: min(340px, calc(100vw - var(--pad-x) * 2));
    height: auto;
    aspect-ratio: 3 / 4;
    flex-shrink: 0;
  }
}

.work-card-inner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.work-card:hover .work-card-inner {
  transform: rotateY(180deg);
}

.work-face {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--rule);
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s ease;
}

.work-card:hover .work-face {
  box-shadow: var(--shadow-lg);
}

.work-front {
  background: var(--surface);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.work-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: filter 0.3s ease;
}

.work-card:hover .work-svg {
  filter: brightness(0.96);
}

html[data-theme='dark'] .work-card:hover .work-svg,
html[data-theme='auto'] .work-card:hover .work-svg {
  filter: brightness(1.08);
}

@media (prefers-color-scheme: dark) {
  html[data-theme='auto'] .work-card:hover .work-svg {
    filter: brightness(1.08);
  }
}

.work-card-title {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: 24px 20px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.3;
  color: var(--ink);
  background: linear-gradient(
    to top,
    color-mix(in srgb, var(--surface) 98%, transparent) 0%,
    color-mix(in srgb, var(--surface) 85%, transparent) 60%,
    transparent 100%
  );
  text-align: left;
  backdrop-filter: blur(8px);
}

.work-back {
  background: var(--surface);
  transform: rotateY(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Minimal line pattern on card back */
.work-back::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--rule) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.4;
}

.work-back-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.work-back-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1.5px solid color-mix(in srgb, var(--accent) 30%, transparent);
  color: var(--accent);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

/* Subtle pulse animation to indicate clickability */
.work-back-icon::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  opacity: 0;
  animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
  0%,
  100% {
    opacity: 0;
    transform: scale(1);
  }
  50% {
    opacity: 0.3;
    transform: scale(1.1);
  }
}

.work-card:hover .work-back-icon {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  border-color: var(--accent);
  transform: scale(1.15);
  box-shadow: 0 4px 16px rgba(110, 91, 152, 0.25);
}

.work-back-icon:hover {
  transform: scale(1.2) !important;
  background: color-mix(in srgb, var(--accent) 25%, transparent);
}

/* -------------------------
   Work Detail Modal
-------------------------- */

.work-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(20px, 5vh, 60px) clamp(20px, 5vw, 60px);
  opacity: 0;
  transition: opacity 0.3s ease;
  overflow-y: auto;
  overflow-x: hidden;
}

.work-detail-overlay.is-open {
  display: flex;
  opacity: 1;
}

.work-detail-modal {
  position: relative;

  /* Narrower / more vertical, but still responsive */
  width: min(620px, calc(100vw - 40px));
  max-width: 620px;

  /* Keep the panel contained and scrollable */
  max-height: calc(100vh - 2 * clamp(20px, 5vh, 60px));
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;

  background: var(--surface);
  border-radius: 20px;
  border: 1px solid var(--rule);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);

  transform: scale(0.95);
  transition: transform 0.3s ease;
  margin: 0 auto;
}

.work-detail-overlay.is-open .work-detail-modal {
  transform: scale(1);
}

.work-detail-close {
  position: sticky;
  top: 20px;
  right: 20px;
  float: right;
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: color-mix(in srgb, var(--surface) 95%, transparent);
  backdrop-filter: blur(10px);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.22s ease;
}

.work-detail-close:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  transform: rotate(90deg);
}

.work-detail-content {
  padding: 60px 50px;
}

@media (max-width: 620px) {
  .work-detail-content {
    padding: 50px 30px;
  }

  /* Tiny screens: give a little more usable width */
  .work-detail-modal {
    width: calc(100vw - 24px);
    max-width: none;
  }
}

.work-detail-header {
  margin-bottom: 32px;
}

.work-detail-title {
  margin: 0 0 16px 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(28px, 4vw, 36px);
  line-height: 1.25;
  color: var(--ink);
}

.work-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 16px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-size: 14px;
  color: var(--muted);
}

.work-detail-meta strong {
  color: var(--ink);
  font-weight: 500;
}

.work-detail-section {
  margin-top: 32px;
}

.work-detail-section-title {
  margin: 0 0 12px 0;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.work-detail-section-content {
  font-family: var(--condensed);
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink);
}

.work-detail-section-content ul {
  margin: 12px 0;
  padding-left: 24px;
}

.work-detail-section-content li {
  margin: 10px 0;
  line-height: 1.6;
}

/* -------------------------
   Contact Form
-------------------------- */

.section-contact {
  padding-top: var(--section-pad);
}

.contact-lead {
  margin-bottom: 32px;
}

.form {
  max-width: 520px;
  display: grid;
  gap: 20px;
}

.field {
  display: grid;
  gap: 8px;
}

.label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
}

input,
textarea {
  width: 100%;
  padding: 12px 0;
  border: none;
  border-bottom: 1px solid var(--rule);
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  outline: none;
  background: transparent;
  transition: border-color 220ms ease;
}

textarea {
  resize: vertical;
  min-height: 110px;
}

input:focus,
textarea:focus {
  border-bottom-color: var(--accent);
}

.form-actions {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.hp {
  display: none !important;
}

/* -------------------------
   Buttons
-------------------------- */

.btn-primary {
  padding: 14px 32px;
  border: 1.5px solid var(--accent);
  background: var(--accent);
  color: var(--surface);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 220ms ease;
  display: inline-block;
}

.btn-primary:hover {
  background: color-mix(in srgb, var(--accent) 85%, #000);
  border-color: color-mix(in srgb, var(--accent) 85%, #000);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(110, 91, 152, 0.2);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-ghost {
  padding: 14px 32px;
  border: 1.5px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 220ms ease;
  display: inline-block;
}

.btn-ghost:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(110, 91, 152, 0.2);
}

.btn-ghost:active {
  transform: translateY(0);
}

/* -------------------------
   Footer
-------------------------- */

.site-footer {
  padding: 32px 0 44px 0;
  border-top: 1px solid var(--rule);
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: var(--muted);
}

.social-icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink);
  background: transparent;
  transition: all 220ms ease;
}

.social-icon:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.social-icon svg {
  width: 20px;
  height: 20px;
}

.footer-copy {
  color: var(--muted);
}

/* -------------------------
   Floating Back-to-Top
-------------------------- */

.fab-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  text-decoration: none;
  z-index: 12000;
  border: 1px solid var(--rule);
  background: color-mix(in srgb, var(--surface) 95%, transparent);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  color: var(--muted);
  transition: all 220ms ease;
}

.fab-top:hover {
  color: var(--ink);
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-4px);
}

.fab-top span {
  font-size: 20px;
  line-height: 1;
}

/* -------------------------
   Responsive
-------------------------- */

@media (max-width: 980px) {
  .intro-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .intro-accent {
    display: none;
  }
}

@media (max-width: 640px) {
  :root {
    --header-hint: 110px;
  }

  .header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 12px var(--pad-x);
  }

  .nav {
    gap: 16px;
  }

  .footer-meta {
    flex-wrap: wrap;
  }

  .fab-top {
    right: 16px;
    bottom: 16px;
  }
}

@media (max-width: 520px) {
  .footer-meta {
    row-gap: 10px;
  }
}

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

  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .parallax-window,
  .parallax-image,
  .parallax-overlay {
    transition: none !important;
  }

  .parallax-revealed .parallax-window {
    width: 90%;
    height: 85%;
  }
}

/* =========================
   Resume page
   ========================= */

.brand-link {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  text-decoration: none;
}

.resume-hero {
  background: linear-gradient(135deg, #6e5b98 0%, #9888ba 100%);
  position: relative;
  overflow: hidden;
  padding: clamp(72px, 14vh, 120px) 0 clamp(48px, 8vh, 80px);
}

.resume-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 84px 84px;
  opacity: 0.3;
}

html[data-theme='dark'] .resume-hero,
html[data-theme='auto'] .resume-hero {
  background: linear-gradient(135deg, #5a4a7a 0%, #7a6a9d 100%);
}

@media (prefers-color-scheme: dark) {
  html[data-theme='auto'] .resume-hero {
    background: linear-gradient(135deg, #5a4a7a 0%, #7a6a9d 100%);
  }
}

.resume-hero-inner {
  position: relative;
  z-index: 1;
}

.resume-name {
  margin: 0 0 6px;
  font-family: var(--hook);
  font-weight: 800;
  font-size: clamp(2.8rem, 7vw, 6rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: #fff;
}

.resume-title {
  margin: 0 0 20px;
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(0.75rem, 1.4vw, 0.88rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}

.resume-tagline {
  margin: 0 0 24px;
  font-family: 'Caveat', cursive;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.1;
}

.resume-summary {
  max-width: 68ch;
  font-family: var(--condensed);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.72);
  margin: 0 0 28px;
}

.resume-domains {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.resume-domain-tag {
  padding: 5px 14px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.08);
}

.resume-actions {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.resume-dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    transform 180ms ease,
    background 180ms ease,
    color 180ms ease,
    border-color 180ms ease;
}

.resume-dl-btn:hover {
  transform: translateY(-2px);
}

.resume-dl-btn--solid {
  background: #fff;
  color: var(--accent);
  border: 2px solid #fff;
}

.resume-dl-btn--ghost {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.6);
}

.resume-dl-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}

.resume-section {
  padding: clamp(56px, 8vh, 96px) 0;
  border-bottom: 1px solid var(--rule);
}

.resume-section:last-of-type {
  border-bottom: none;
}

.section-kicker {
  font-family: 'Caveat', cursive;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--accent);
  margin: 0 0 clamp(28px, 4vh, 48px);
  line-height: 1.1;
}

.resume-strip {
  min-height: clamp(220px, 24vh, 280px);
  display: flex;
  align-items: center;
  background: rgba(42, 42, 42, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
}

html[data-theme='dark'] .resume-strip,
html[data-theme='auto'] .resume-strip {
  background: rgba(20, 20, 20, 0.92);
}

@media (prefers-color-scheme: dark) {
  html[data-theme='auto'] .resume-strip {
    background: rgba(20, 20, 20, 0.92);
  }
}

.resume-strip__inner {
  width: 100%;
  padding: clamp(28px, 4vh, 44px) 0;
}

.resume-strip--closing {
  min-height: clamp(150px, 18vh, 190px); /* was 170–220 */
  background: linear-gradient(135deg, #6e5b98 0%, #9888ba 100%);
}

html[data-theme='dark'] .resume-strip--closing,
html[data-theme='auto'] .resume-strip--closing {
  background: linear-gradient(135deg, #5a4a7a 0%, #7a6a9d 100%);
}

@media (prefers-color-scheme: dark) {
  html[data-theme='auto'] .resume-strip--closing {
    background: linear-gradient(135deg, #5a4a7a 0%, #7a6a9d 100%);
  }
}

.resume-strip__content {
  width: min(100%, 960px);
  margin-inline: auto;
}

/* ── Resume closing CTA (mirrors About page) ── */

.resume-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.resume-cta-portrait {
  margin: 0 0 14px;
  width: clamp(72px, 10vw, 104px);
  height: clamp(72px, 10vw, 104px);
  border-radius: 999px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.resume-cta-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.resume-cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.competencies-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2.4vw, 36px);
}

.competency-cell {
  padding: clamp(10px, 1.4vw, 16px) 0 0;
}

.competency-label {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 10px;
}

.competency-items {
  font-family: var(--condensed);
  font-size: clamp(0.92rem, 1.2vw, 1.05rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.82);
}

.competency-items span::after {
  content: ' •';
  color: rgba(255, 255, 255, 0.3);
  margin: 0 0.15em;
}

.competency-items span:last-child::after {
  content: '';
}

.exp-entries {
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 6vh, 64px);
}

.exp-entry {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0 clamp(32px, 4vw, 56px);
  align-items: start;
}

.exp-meta {
  padding-top: 4px;
}

.exp-company {
  font-family: var(--hook);
  font-weight: 700;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 4px;
}

.exp-title {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(120, 120, 130, 0.9);
  letter-spacing: 0.02em;
  line-height: 1.4;
  margin-bottom: 14px;
}

.exp-domain {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.02em;
  line-height: 1.4;
  margin-bottom: 8px;
}

.exp-entry {
  position: relative;
}

.exp-entry::after {
  content: '';
  position: absolute;
  left: 220px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--rule);
}

.exp-lead {
  font-family: var(--condensed);
  font-size: clamp(1rem, 1.35vw, 1.12rem);
  line-height: 1.7;
  color: var(--ink);
  margin: 0 0 18px;
}

.exp-bullets {
  margin: 0;
  padding-left: 1.1em;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.exp-bullets li {
  font-family: var(--condensed);
  font-size: clamp(0.92rem, 1.2vw, 1.05rem);
  line-height: 1.68;
  color: var(--ink);
}

.exp-bullets li::marker {
  color: var(--accent);
}

.foundational-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 24px);
  margin-top: 28px;
}

.foundational-card {
  padding: clamp(18px, 2.5vw, 28px);
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--surface);
  transition:
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.foundational-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(110, 91, 152, 0.1);
}

.foundational-co {
  font-family: var(--hook);
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  margin-bottom: 3px;
}

.foundational-domain {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.foundational-desc {
  font-family: var(--condensed);
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--muted);
}

.edu-tools-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 clamp(40px, 6vw, 80px);
  align-items: start;
}

.edu-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.edu-item:last-child {
  border-bottom: none;
}

.edu-degree {
  font-family: var(--hook);
  font-weight: 600;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.3;
}

.edu-school {
  font-family: var(--condensed);
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.5);
}

.tools-group {
  margin-bottom: 24px;
}

.tools-group:last-child {
  margin-bottom: 0;
}

.tools-group-label {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 8px;
}

.tools-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tools-pill {
  padding: 4px 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.06);
}

.resume-strip__text {
  font-family: var(--condensed);
  font-size: clamp(0.9rem, 1.2vw, 1rem);
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  max-width: 64ch;
  line-height: 1.7;
}

@media (max-width: 780px) {
  .competencies-grid,
  .foundational-grid,
  .edu-tools-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .exp-entry {
    grid-template-columns: 1fr;
    gap: 16px 0;
  }

  .exp-entry::after {
    display: none;
  }
}

/* ── Resume page additions ── */

/* Closing strip: keep existing purple bg, stack text + buttons */
.resume-strip__closing-content {
  display: flex;
  flex-direction: column;
  align-items: center; /* was flex-start */
  text-align: center; /* add this */
}

/* Education layout: left col = kicker + items 2-4, right col = Oxford featured */
.edu-tools-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 clamp(40px, 6vw, 80px);
  align-items: start;
}

.edu-left-col {
  display: flex;
  flex-direction: column;
}

.edu-right-col {
  display: flex;
  align-items: flex-start;
  padding-top: 4px;
}

.edu-item--featured {
  border-bottom: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: clamp(14px, 2vw, 22px) clamp(16px, 2vw, 24px);
  width: 100%;
}

.edu-item--featured .edu-degree {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.95);
}

.edu-item--featured .edu-school {
  color: rgba(255, 255, 255, 0.6);
}

/* Footer portrait circle — mirrors About page cta-portrait */
.footer-portrait {
  margin: 0;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--rule);
  flex-shrink: 0;
}

.footer-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

@media (max-width: 780px) {
  .edu-tools-grid {
    grid-template-columns: 1fr;
  }

  .edu-right-col {
    padding-top: 0;
    margin-top: 24px;
  }
}

/* Section 5 — education on light background */
.resume-section--edu {
  background: var(--bg);
}

.section-kicker--resume {
  margin-bottom: 24px;
}

.section-kicker--strip {
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 24px;
}

.edu-light-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 clamp(40px, 6vw, 80px);
  align-items: start;
}

.edu-light-col {
  display: flex;
  flex-direction: column;
}

.edu-light-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}

.edu-light-item:last-child {
  border-bottom: none;
}

.edu-light-degree {
  font-family: var(--hook);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.3;
  color: var(--ink);
}

.edu-light-school {
  font-family: var(--condensed);
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--muted);
}

@media (max-width: 780px) {
  .edu-light-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
}
