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

:root {
  --bg: #120c0d;
  --surface: #1d1315;
  --surface2: #251619;
  --brown: #a62639;
  --amaranth: #db324d;
  --red: #ff3b54;
  --pink: #ff8a99;
  --ink: #f6ecec;
  --muted: #b29a9a;
  --soft: rgba(246, 236, 236, 0.62);
  --line: rgba(255, 255, 255, 0.1);
  --grad: linear-gradient(120deg, #ff3b54 0%, #db324d 46%, #a62639 100%);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Manrope', -apple-system, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: #db324d;
  color: #fff;
}

@keyframes gradShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes floatA {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -30px) scale(1.12); }
}

@keyframes floatB {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-50px, 40px) scale(1.08); }
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@keyframes shimmer {
  to { background-position: 200% center; }
}

@keyframes pulseDark {
  0% { box-shadow: 0 0 0 0 rgba(18, 12, 13, 0.45); }
  70% { box-shadow: 0 0 0 10px rgba(18, 12, 13, 0); }
  100% { box-shadow: 0 0 0 0 rgba(18, 12, 13, 0); }
}

.nav-link:hover { color: var(--red) !important; opacity: 1 !important; }

@keyframes revealUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@supports (animation-timeline: view()) {
  [data-reveal] {
    animation: revealUp both;
    animation-timeline: view();
    animation-range: entry 2% entry 44%;
  }
}

.site-root {
  --bg: #120c0d;
  --surface: #1d1315;
  --surface2: #251619;
  --brown: #a62639;
  --amaranth: #db324d;
  --red: #ff3b54;
  --pink: #ff8a99;
  --ink: #f6ecec;
  --muted: #b29a9a;
  --soft: rgba(246, 236, 236, 0.62);
  --line: rgba(255, 255, 255, 0.1);
  --grad: linear-gradient(120deg, #ff3b54 0%, #db324d 46%, #a62639 100%);
  background: var(--bg);
  color: var(--ink);
  font-family: 'Manrope', -apple-system, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

.grad-text {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
  background: linear-gradient(90deg, #ff8a99, #db324d, #ff8a99);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 5s linear infinite;
}

.hero-grad-text {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-style: italic;
  font-size: 1.04em;
  letter-spacing: 0;
  background: linear-gradient(90deg, #120c0d, #7a1a2a, #120c0d);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 5s linear infinite;
}

.hero-dark .nav-link:hover { color: #7a1a2a !important; }

.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(18, 12, 13, 0.35) !important; }
.hero-btn-dark:hover { transform: translateY(-3px); box-shadow: 0 16px 44px rgba(18, 12, 13, 0.42) !important; }
.hero-btn-outline:hover { background: rgba(18, 12, 13, 0.08) !important; }
.card-hover:hover { transform: translateY(-6px); box-shadow: 0 22px 54px rgba(219, 50, 77, 0.28); border-color: rgba(219, 50, 77, 0.45) !important; }
.project-card:hover { transform: translateY(-6px); box-shadow: 0 24px 58px rgba(219, 50, 77, 0.3); border-color: rgba(219, 50, 77, 0.45) !important; }
.case-card:hover .case-meta { border-color: rgba(219, 50, 77, 0.25) !important; }
.skill-card:hover { border-color: rgba(219, 50, 77, 0.4) !important; }
.step-card:hover { transform: translateY(-6px); }
.social-btn:hover { background: #120c0d !important; transform: translateY(-3px); }
.form-input:focus { border-color: var(--red) !important; outline: none; }
.submit-btn:hover { transform: translateY(-2px); }

.results-section {
  background: linear-gradient(180deg, var(--bg) 0%, var(--surface2) 50%, var(--bg) 100%);
}

.title-inline {
  white-space: nowrap;
}

.results-section .results-grid {
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
}

.pathway-section {
  opacity: 0.92;
}

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

.hero-microcopy {
  animation: revealUp 0.8s ease both;
  animation-delay: 0.15s;
}

.contact-note {
  opacity: 0.85;
}

.about-image {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid var(--line);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(219, 50, 77, 0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-image-wrapper:hover .about-image {
  transform: translateY(-4px);
  box-shadow: 0 28px 64px rgba(219, 50, 77, 0.22), 0 0 0 1px rgba(219, 50, 77, 0.28);
}

.flash-messages {
  position: fixed;
  top: 88px;
  right: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
}

.flash-message {
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.flash-message.success { border-color: rgba(219, 50, 77, 0.45); color: var(--ink); }
.flash-message.error { border-color: rgba(255, 59, 84, 0.5); color: #ffd9df; }

.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: inherit;
}

.mobile-nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px 0;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

@media (max-width: 1100px) {
  .value-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr !important; }
  .about-grid { grid-template-columns: 1fr !important; }
  .about-image-wrapper { margin-bottom: 8px; }
  .about-image { max-width: 220px; margin: 0 auto; display: block; }
  .pathway-grid { grid-template-columns: 1fr !important; }
  .value-grid { grid-template-columns: 1fr !important; }
  .skills-grid { grid-template-columns: 1fr !important; }
  .approach-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .projects-grid { grid-template-columns: 1fr !important; }
  .contact-grid { grid-template-columns: 1fr !important; }
  .results-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .nav-links { display: none !important; }
  .nav-links.open {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    padding: 20px 28px 24px;
    background: rgba(18, 12, 13, 0.96);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    gap: 16px !important;
  }
  .mobile-nav-toggle { display: block; }
  .site-nav { position: relative; }
}

@media (max-width: 560px) {
  .approach-grid { grid-template-columns: 1fr !important; }
  .results-grid { grid-template-columns: 1fr !important; }
  .title-inline { white-space: normal; }
}

/* Project page */
.project-page {
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

.project-shell {
  max-width: 860px;
  margin: 0 auto;
  padding: 110px 28px 80px;
}

.project-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--soft);
  text-decoration: none;
  margin-bottom: 32px;
  transition: color 0.2s ease;
}

.project-back:hover { color: var(--red); }

.project-shell h1 {
  margin: 0 0 12px;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: clamp(32px, 5vw, 52px);
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.project-subtitle {
  margin: 0 0 28px;
  font-size: 17px;
  color: var(--soft);
  line-height: 1.5;
}

.project-section {
  margin-top: 40px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.project-section h2 {
  margin: 0 0 14px;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
}

.project-section p {
  margin: 0;
  font-size: 16px;
  line-height: 1.65;
  color: var(--soft);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.project-tag {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--soft);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  color: var(--red);
  text-decoration: none;
}

.project-link:hover { text-decoration: underline; }
