:root {
  --bg: #f6f3fb;
  --surface: #ffffff;
  --ink: #1f1f2e;
  --muted: #5a5a72;
  --accent: #a68eff;
  --accent-strong: #6a4fe0;
  --highlight: #f0e8ff;
  --border: rgba(31, 31, 46, 0.08);
  --shadow: 0 20px 40px rgba(45, 22, 84, 0.1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
}

body {
  margin: 0;
  font-family: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  padding-left: 1.1rem;
}

body > header,
body > main,
body > footer {
  width: min(1200px, 90vw);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

body::before,
body::after {
  content: "";
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: 2000px;
  height: 420px;
  background: url("assets/images/wave.svg") center / cover no-repeat;
  opacity: 0.65;
  z-index: 0;
  pointer-events: none;
  animation: waveFloat 12s ease-in-out infinite;
  will-change: transform;
  backface-visibility: hidden;
  transform-origin: center;
}

body::before {
  bottom: -220px;
  opacity: 0.35;
  width: 2400px;
  height: 520px;
  filter: blur(2px);
  animation-duration: 18s;
  animation-direction: alternate-reverse;
}

body::after {
  bottom: -120px;
  animation-delay: -2s;
}

main {
  background: var(--surface);
  border-radius: 32px;
  padding: 0 3rem 3.5rem;
  box-shadow: 0 25px 60px rgba(30, 20, 60, 0.08);
  margin-top: 2rem;
}

.hero {
  min-height: 90vh;
  padding: 2.5rem 0 5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
      circle at top right,
      rgba(166, 142, 255, 0.35),
      transparent 50%
    ),
    linear-gradient(135deg, #fefcff 0%, #eef2ff 60%, #f3f0ff 100%);
  z-index: -1;
  border-radius: 36px;
  filter: blur(0);
  background-size: 140% 140%;
  animation: heroGlow 18s ease-in-out infinite alternate;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 36px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.35) 0%,
    rgba(255, 255, 255, 0) 70%
  );
  z-index: -1;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  position: sticky;
  top: 1rem;
  box-shadow: 0 10px 35px rgba(30, 20, 60, 0.15);
  gap: 1.5rem;
  margin-bottom: 2rem;
  z-index: 20;
  transition: transform 0.4s ease, opacity 0.4s ease;
  will-change: transform;
  backface-visibility: hidden;
  overflow: visible;
}

.nav.nav-hidden {
  transform: translate3d(0, -200%, 0);
  opacity: 0;
  pointer-events: none;
}

.logo {
  font-family: "Playfair Display", serif;
  font-size: 1.3rem;
  letter-spacing: 0.2em;
}

.nav-menu {
  position: static;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-left: auto;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
}

.nav-links a {
  position: relative;
  padding-bottom: 0.2rem;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(31, 31, 46, 0.1);
  background: rgba(255, 255, 255, 0.9);
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: transform 0.3s ease;
  margin-left: auto;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 999px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(3px) rotate(45deg);
}

.nav.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.nav.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-3px) rotate(-45deg);
}

.hero-body {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  align-items: center;
  padding: 3.5rem 2rem 0;
}

.hero-content {
  flex: 1 1 320px;
  max-width: 620px;
}

.hero-portrait {
  flex: 1 1 260px;
  display: flex;
  justify-content: center;
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.portrait-frame {
  width: min(320px, 70vw);
  aspect-ratio: 3 / 4;
  border-radius: 28px 28px 80px 28px;
  background: linear-gradient(160deg, rgba(166, 142, 255, 0.25), rgba(106, 79, 224, 0.15));
  padding: 12px;
  box-shadow: 0 30px 60px rgba(30, 20, 60, 0.2);
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px 20px 70px 20px;
  filter: saturate(1.05);
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

h1 {
  font-size: clamp(2.6rem, 6vw, 3.8rem);
  line-height: 1.1;
  margin: 0 0 1rem;
}

h1 span {
  display: block;
  font-family: "Playfair Display", serif;
  font-size: 1.1rem;
  letter-spacing: 0.03em;
  color: var(--muted);
  margin-top: 0.5rem;
}

.lede {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.primary-btn,
.secondary-btn,
.ghost-btn {
  border-radius: 999px;
  padding: 0.85rem 1.8rem;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.primary-btn {
  background: linear-gradient(120deg, var(--accent-strong), var(--accent));
  color: white;
  box-shadow: var(--shadow);
}

.secondary-btn {
  background: transparent;
  border-color: var(--accent);
  color: var(--accent-strong);
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
}

.nav-cta {
  min-width: 130px;
  text-align: center;
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 12px 30px rgba(106, 79, 224, 0.15);
}

.section {
  padding: 4rem 0;
}

.section-heading {
  margin-bottom: 2rem;
}

.section-heading h2 {
  margin: 0.3rem 0;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.card-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1.8rem;
  box-shadow: 0 15px 35px rgba(30, 20, 60, 0.08);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 25px 50px rgba(30, 20, 60, 0.16);
}

.card-meta {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.card h3 {
  margin: 0;
  font-size: 1.1rem;
}

.card ul {
  margin: 1rem 0 0;
  color: var(--muted);
}

.split-grid {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.soft-card {
  background: var(--highlight);
  border: 1px solid rgba(166, 142, 255, 0.2);
}

.wide-card {
  display: grid;
  gap: 1rem;
}

.card-grid.three {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
}

.gallery-card {
  background: var(--surface);
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 25px 45px rgba(30, 20, 60, 0.18);
}

.gallery-card img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  display: block;
}

.gallery-card figcaption {
  display: none;
}

.personal-projects {
  margin-top: 1rem;
}

.personal-projects .project-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  background: var(--surface);
  border-radius: 28px;
  padding: 2rem;
  border: 1px solid var(--border);
  box-shadow: 0 22px 40px rgba(30, 20, 60, 0.12);
}

.personal-projects ul {
  margin: 0.8rem 0 0;
  color: var(--muted);
}

.personal-projects .project-note {
  color: var(--muted);
  max-width: 720px;
  margin-top: 0.5rem;
}

.personal-projects .primary-btn {
  min-width: 220px;
  justify-content: center;
}

.recommendations .single details {
  margin-bottom: 0;
}

.recommendations details {
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  padding: 1.5rem 2rem;
  margin-bottom: 1rem;
  box-shadow: 0 10px 25px rgba(30, 20, 60, 0.08);
  transition: transform 0.3s, box-shadow 0.3s;
}

.recommendations details:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 25px 40px rgba(30, 20, 60, 0.12);
}

.recommendations summary {
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.recommendations summary span:first-child {
  flex: 1;
}

.recommendations summary::-webkit-details-marker {
  display: none;
}

.chevron {
  font-size: 1.4rem;
  color: var(--accent-strong);
  transition: transform 0.3s ease;
}

details[open] .chevron {
  transform: rotate(180deg);
}

.download-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent-strong);
  font-weight: 600;
  margin-top: 0.5rem;
}

.downloads-grid {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.contact .contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  align-items: flex-start;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.contact-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.contact-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--highlight);
}

.contact-icon svg {
  width: 14px;
  height: 14px;
  fill: var(--accent-strong);
}

.contact-value {
  margin: 0;
}

.contact-item p.contact-value {
  color: var(--muted);
}

.contact a {
  color: var(--accent-strong);
}

.footer {
  padding: 2rem 0 4rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer p {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-mail {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.5rem;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
}

.footer-mail svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.scroll-top {
  position: fixed;
  right: 2rem;
  bottom: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--accent-strong);
  color: white;
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(106, 79, 224, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.scroll-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(-6px);
}

@keyframes heroGlow {
  0% {
    background-position: 0% 0%, 50% 50%;
  }
  100% {
    background-position: 25% 20%, 60% 60%;
  }
}

@keyframes waveFloat {
  0% {
    transform: translate(-50%, -8px) scaleX(1);
  }
  50% {
    transform: translate(-47%, -2px) scaleX(1.04);
  }
  100% {
    transform: translate(-50%, -8px) scaleX(1);
  }
}


/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(30px) scale(0.97);
  transition: opacity 0.55s ease, transform 0.55s ease;
  will-change: transform, opacity;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@media (max-width: 900px) {
  .nav {
    padding: 0.85rem 1.2rem;
  }

  .nav-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 1rem;
    right: 1rem;
    flex-direction: column;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 24px;
    padding: 1.25rem;
    box-shadow: 0 18px 45px rgba(30, 20, 60, 0.15);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  .nav.nav-open .nav-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 1rem;
  }

  .nav-cta {
    width: 100%;
    justify-content: center;
    border-radius: 18px;
  }

  .nav-toggle {
    display: flex;
  }

  .hero-body {
    flex-direction: column-reverse;
    padding: 2rem 1.2rem 0;
    text-align: center;
  }

  .hero-ctas {
    justify-content: center;
  }
}

@media (max-width: 700px) {
  .hero-content {
    padding-inline: 1rem;
  }

  body > header,
  body > main,
  body > footer {
    width: 94vw;
  }

  main {
    padding: 0 1.2rem 2.5rem;
  }

  .card {
    padding: 1.4rem;
  }

  .hero {
    min-height: auto;
    padding: 1.5rem 0 3rem;
  }

  .hero::before {
    border-radius: 24px;
  }

  .hero-ctas {
    width: 100%;
    flex-direction: column;
  }

  .card-grid,
  .split-grid,
  .card-grid.three {
    grid-template-columns: 1fr;
  }

  .downloads-grid {
    flex-direction: column;
    width: 100%;
  }

  .scroll-top {
    right: 1rem;
    bottom: 1rem;
  }
}
.recommendations details::marker,
.recommendations summary::marker {
  content: "";
}
