:root {
  /* Theme colors */
  --color-bg: #040303;
  --color-text: #beb0a7;
  --color-accent: #3a4e48;
  --color-muted: #6a7b76;
  --color-surface: #8b9d83;
  --color-border: #3a4e48;

  /* Typography */
  --font-display: "DynaPuff", cursive;
  --font-body: "Lexend", sans-serif;
  --font-family: var(--font-body);
  --line-height-base: 1.6;
  --max-width: 1040px;
}

/* Minimal reset for consistency */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-text);
  color: var(--color-bg);
  font-family: var(--font-family);
  line-height: var(--line-height-base);
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
.brand-name,
.hero-title {
  font-family: var(--font-display);
}

.section {
  position: relative;
}

body.reveal-ready .section {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.section-visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

.section::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(58, 78, 72, 0),
    rgba(58, 78, 72, 0.25),
    rgba(58, 78, 72, 0)
  );
  pointer-events: none;
}

body.cursor-hidden,
body.cursor-hidden a,
body.cursor-hidden button,
body.cursor-hidden .button,
body.cursor-hidden input,
body.cursor-hidden textarea {
  cursor: none;
}

.flower-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 2.1rem;
  height: 2.1rem;
  display: none;
  place-items: center;
  pointer-events: none;
  transform: translate3d(-50%, -50%, 0);
  color: var(--color-accent);
  font-size: 1.6rem;
  opacity: 0;
  transition: transform 0.18s ease-out, opacity 0.25s ease-out;
  text-shadow: 0 6px 18px rgba(58, 78, 72, 0.35);
  z-index: 1200;
}

.sparkle {
  position: fixed;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: radial-gradient(
    circle at center,
    var(--sparkle-color, var(--color-text)),
    rgba(190, 176, 167, 0.45)
  );
  pointer-events: none;
  transform: translate(-50%, -50%) scale(var(--sparkle-scale, 0.6));
  animation: sparkleFloat var(--sparkle-duration, 0.6s) ease-out forwards;
  z-index: 1100;
}

body.prefers-reduced-motion .flower-cursor,
body.prefers-reduced-motion .sparkle {
  display: none !important;
}

@keyframes sparkleFloat {
  0% {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(0.6);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -80%) scale(1.2);
  }
}

/* Hero intro animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink {
  from,
  to {
    border-color: transparent;
  }
  50% {
    border-color: var(--color-accent);
  }
}

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

a {
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

a:hover,
a:focus-visible {
  color: var(--color-bg);
  border-bottom-color: var(--color-bg);
}

.hero a {
  color: var(--color-text);
}

.hero a:hover,
.hero a:focus-visible {
  color: var(--color-text);
  border-bottom-color: var(--color-text);
}

.projects a:not(.button),
.approach a:not(.button),
.contact a:not(.button) {
  color: var(--color-bg);
}

.projects a:not(.button):hover,
.projects a:not(.button):focus-visible,
.approach a:not(.button):hover,
.approach a:not(.button):focus-visible,
.contact a:not(.button):hover,
.contact a:not(.button):focus-visible {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

button {
  font: inherit;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Layout container for consistent width */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header and navigation styling */
.site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background-color: rgba(190, 176, 167, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem;
}

.brand-name {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--color-bg);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  font-weight: 500;
  color: var(--color-bg);
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--color-accent);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  padding: 0.4rem 0.6rem;
  border-radius: 0.5rem;
  cursor: pointer;
}

.nav-toggle::after {
  content: "☰";
  font-size: 1.25rem;
  color: var(--color-bg);
}

/* Button styling for CTAs */
.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.8rem;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
  border: none;
  cursor: pointer;
}

.button::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(190, 176, 167, 0.2), rgba(139, 157, 131, 0.2));
}

.button.primary {
  background-image: linear-gradient(135deg, rgba(58, 78, 72, 0.96), rgba(106, 123, 118, 0.9));
  color: var(--color-text);
  box-shadow: 0 12px 24px rgba(58, 78, 72, 0.25);
}

.button.secondary {
  background-image: linear-gradient(135deg, rgba(190, 176, 167, 0.95), rgba(139, 157, 131, 0.9));
  color: var(--color-bg);
  box-shadow: 0 10px 20px rgba(190, 176, 167, 0.3);
}

.button.tertiary {
  padding: 0.65rem 1.5rem;
  border-radius: 0.9rem;
  border: 1px dashed rgba(58, 78, 72, 0.6);
  background-color: rgba(190, 176, 167, 0.1);
  color: var(--color-bg);
  box-shadow: 0 8px 18px rgba(139, 157, 131, 0.35);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 16px 32px rgba(58, 78, 72, 0.25);
}

.button:hover::after,
.button:focus-visible::after {
  opacity: 1;
}

.button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(190, 176, 167, 0.65), 0 16px 32px rgba(58, 78, 72, 0.25);
}

/* Hero section styling */
.hero-section {
  background-color: var(--color-bg);
  color: var(--color-text);
}

.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  padding: 4rem 0;
  overflow: visible;
}

.typing-container {
  display: inline-flex;
  justify-content: center;
  font-size: clamp(2.3rem, 6vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

.typing-text,
.typing-text::after {
  position: relative;
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  padding-right: 0;
  width: 0;
  animation: typing 3.2s steps(17, end) 0.3s forwards;
}

.typing-text::after {
  content: "";
  position: absolute;
  top: 0;
  right: -0.12em;
  width: 0.14em;
  height: 100%;
  background-color: var(--color-accent);
  animation:
    caretBlink 0.9s step-end infinite 3.5s,
    caretHide 3.5s forwards;
}

@keyframes caretBlink {
  from,
  to {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

@keyframes caretHide {
  to {
    opacity: 0;
  }
}

.hero-text {
  position: relative;
  z-index: 2;
  max-width: none;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  flex: 0 0 70%;
}

.hero h1 {
  font-size: clamp(2.75rem, 6vw, 3.75rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--color-text);
}

.hero-role {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text);
}

.hero-subtitle,
.hero-tagline {
  max-width: 70%;
  font-size: 1.05rem;
  color: var(--color-text);
  opacity: 0.85;
}

.hero-actions {
  margin-top: 0;
}

.hero-bubbles {
  position: relative;
  flex: 0 0 390px;
  width: 390px;
  height: 390px;
  z-index: 1;
  pointer-events: none;
  transform: translateX(-4%);
}

.logo-bubbles-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

.bubble {
  position: absolute;
  width: 105px;
  height: 105px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
}

.bubble img {
  max-width: 65%;
  max-height: 65%;
}

@keyframes bubbleFloatIn {
  0% {
    transform: translateY(120px) scale(0.7);
    opacity: 0;
  }
  45% {
    opacity: 1;
  }
  100% {
    transform: translateY(-10px) scale(1);
    opacity: 1;
  }
}

@keyframes bubbleDrift {
  0% {
    transform: translateY(-10px);
  }
  50% {
    transform: translateY(-18px);
  }
  100% {
    transform: translateY(-10px);
  }
}

.bubble-1 {
  top: 4%;
  right: 5%;
  animation:
    bubbleFloatIn 0.9s ease-out forwards,
    bubbleDrift 5s ease-in-out 0.9s infinite;
}

.bubble-2 {
  top: 34%;
  left: 6%;
  animation:
    bubbleFloatIn 1.05s ease-out 0.1s forwards,
    bubbleDrift 5.4s ease-in-out 1.05s infinite;
}

.bubble-3 {
  bottom: 6%;
  right: 0%;
  animation:
    bubbleFloatIn 1.1s ease-out 0.2s forwards,
    bubbleDrift 5.2s ease-in-out 1.1s infinite;
}

.bubble-4 {
  bottom: 14%;
  left: 26%;
  animation:
    bubbleFloatIn 1.15s ease-out 0.3s forwards,
    bubbleDrift 5.6s ease-in-out 1.15s infinite;
}

.bubble-5 {
  top: 18%;
  right: 35%;
  animation:
    bubbleFloatIn 1.2s ease-out 0.4s forwards,
    bubbleDrift 5.8s ease-in-out 1.2s infinite;
}

.bubble-6 {
  top: 52%;
  left: 58%;
  animation:
    bubbleFloatIn 1.25s ease-out 0.5s forwards,
    bubbleDrift 6.2s ease-in-out 1.25s infinite;
}

.hero-title,
.hero-subtitle,
.hero-actions {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeInUp 0.7s ease-out forwards;
}

.hero-title {
  animation-delay: 0.15s;
}

.hero-text .typing-container {
  justify-content: flex-start;
}

.hero-role {
  animation-delay: 0.3s;
}

.hero-tagline {
  animation-delay: 0.45s;
}

.hero-actions {
  animation-delay: 0.6s;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
  justify-content: flex-start;
}

@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-bubbles {
    display: none;
  }
}

/* About section layout */
.about {
  padding: 5rem 0;
  background: linear-gradient(135deg, rgba(190, 176, 167, 0.92), rgba(139, 157, 131, 0.95));
  color: var(--color-bg);
}

.about-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.about-text h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--color-bg);
}

.about-text p {
  color: var(--color-bg);
  margin-bottom: 1.25rem;
}

.about-visual {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 3 / 4;
  border-radius: 2rem;
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(4, 3, 3, 0.2);
  border: 1px solid rgba(58, 78, 72, 0.25);
  background: rgba(4, 3, 3, 0.12);
  margin: 0 auto;
}

.about-reel {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Projects section styling */
.projects {
  padding: 5rem 0;
  background: linear-gradient(135deg, rgba(190, 176, 167, 0.96), rgba(106, 123, 118, 0.78));
  color: var(--color-bg);
}

.projects .container {
  max-width: none;
  padding: 0 clamp(1.5rem, 4vw, 4rem);
}

.projects h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  text-align: left;
}

.project-grid {
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 4vw, 3.5rem);
}

.project-card {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: stretch;
  background: linear-gradient(135deg, rgba(190, 176, 167, 0.95), rgba(139, 157, 131, 0.85));
  border-radius: 1.75rem;
  padding: clamp(1.75rem, 4vw, 3.5rem);
  border: 1px solid rgba(4, 3, 3, 0.15);
  gap: clamp(1.5rem, 3vw, 3rem);
  min-height: 100%;
  color: var(--color-bg);
  box-shadow: 0 32px 60px rgba(4, 3, 3, 0.22);
}

.project-image {
  width: 100%;
  min-height: 260px;
  max-height: 320px;
  aspect-ratio: 4 / 3;
  align-self: center;
  border-radius: 1.35rem;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(106, 123, 118, 0.35), rgba(190, 176, 167, 0.4));
  border: 1px solid rgba(4, 3, 3, 0.12);
  box-shadow: 0 18px 36px rgba(4, 3, 3, 0.18);
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.25rem;
}

.project-card:nth-child(even) .project-image {
  order: 2;
}

.project-card:nth-child(even) .project-content {
  order: 1;
}

.project-card h3 {
  font-size: 1.4rem;
  line-height: 1.3;
}

.project-card p {
  color: inherit;
  opacity: 0.92;
}

.project-card--listen {
  background: linear-gradient(140deg, rgba(222, 189, 184, 0.95), rgba(190, 176, 167, 0.88));
  color: var(--color-bg);
  box-shadow: 0 36px 64px rgba(58, 78, 72, 0.22);
}

.project-card--listen .project-image {
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 20px 44px rgba(222, 189, 184, 0.3);
  background: rgba(255, 255, 255, 0.5);
}

.project-card--listen .button.tertiary {
  color: var(--color-bg);
  border-color: rgba(4, 3, 3, 0.2);
  background-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 18px 34px rgba(222, 189, 184, 0.35);
}

.project-card--outreach {
  background: linear-gradient(140deg, rgba(186, 206, 207, 0.95), rgba(139, 157, 131, 0.9));
  color: var(--color-bg);
  box-shadow: 0 36px 64px rgba(58, 78, 72, 0.22);
}

.project-card--outreach .project-image {
  border-color: rgba(4, 3, 3, 0.12);
  box-shadow: 0 20px 44px rgba(139, 157, 131, 0.28);
  background: rgba(255, 255, 255, 0.45);
}

.project-card--outreach .button.tertiary {
  color: var(--color-bg);
  border-color: rgba(4, 3, 3, 0.2);
  background-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 18px 34px rgba(139, 157, 131, 0.35);
}

.project-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--color-bg);
}

.project-role {
  font-weight: 600;
}

/* Approach section styling */
.approach {
  padding: 5rem 0;
  background: linear-gradient(135deg, rgba(106, 123, 118, 0.95), rgba(58, 78, 72, 0.85));
  color: var(--color-text);
}

.approach h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: var(--color-text);
}

.approach-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.approach-item {
  background-color: var(--color-surface);
  border-radius: 1.25rem;
  padding: 2rem;
  border: 1px solid rgba(4, 3, 3, 0.18);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  color: var(--color-bg);
  box-shadow: 0 14px 28px rgba(4, 3, 3, 0.14);
}

.approach-item h3 {
  font-size: 1.25rem;
}

.icon-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(140deg, rgba(58, 78, 72, 0.6), rgba(139, 157, 131, 0.4));
}

/* Contact section styling */
.contact {
  padding: 5rem 0 6rem;
  background: linear-gradient(135deg, rgba(139, 157, 131, 0.94), rgba(190, 176, 167, 0.88));
  border-top: 1px solid var(--color-border);
  color: var(--color-bg);
}

.contact-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}

.contact h2 {
  font-size: 2rem;
  color: var(--color-bg);
}

.contact p {
  color: var(--color-bg);
  max-width: 520px;
}

.contact-email {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-bg);
}

.social-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.social-links a {
  font-weight: 500;
  color: var(--color-bg);
}

.social-links a:hover,
.social-links a:focus-visible {
  color: var(--color-accent);
}

/* Footer styling */
.site-footer {
  padding: 2rem 0;
  text-align: center;
  font-size: 0.95rem;
  color: var(--color-text);
  background-color: var(--color-bg);
}

/* Focus indicator improvements */
a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(190, 176, 167, 0.8);
  outline-offset: 3px;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  /* Layout tweaks for tablet */
  .about-layout {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .avatar-placeholder {
    width: 220px;
    height: 220px;
  }

  .approach-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-card {
    grid-template-columns: 1fr;
  }

  .project-image {
    min-height: 220px;
    max-height: 280px;
    aspect-ratio: 4 / 3;
  }

  .project-card:nth-child(even) .project-image,
  .project-card:nth-child(even) .project-content {
    order: initial;
  }
}

@media (max-width: 720px) {
  /* Mobile navigation */
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    right: 1.5rem;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    padding: 1rem;
    flex-direction: column;
    gap: 1rem;
    min-width: 200px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
    display: none;
  }

  .nav-links.is-open {
    display: flex;
  }

  .hero-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .hero-text {
    width: 100%;
  }

  .approach-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    padding: 1.75rem;
  }

  .project-image {
    min-height: 200px;
    max-height: 240px;
  }

  .project-card,
  .approach-item {
    padding: 1.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  body.reveal-ready .section {
    opacity: 1 !important;
    transform: none !important;
  }

  .sparkle {
    display: none !important;
  }
}

