:root {
  --ink: #17171c;
  --muted: #686873;
  --line: rgba(23, 23, 28, 0.1);
  --line-strong: rgba(23, 23, 28, 0.18);
  --surface: rgba(255, 255, 255, 0.68);
  --surface-strong: rgba(255, 255, 255, 0.88);
  --shadow: 0 22px 70px rgba(74, 58, 112, 0.12);
  --radius-lg: 30px;
  --radius-md: 20px;
  --page-width: 1120px;
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-width: 280px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 10%, rgba(255, 190, 231, 0.28), transparent 28rem),
    radial-gradient(circle at 90% 12%, rgba(181, 214, 255, 0.3), transparent 30rem),
    linear-gradient(135deg, #ffffff 0%, #fbfbfd 48%, #f5f4fa 100%);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: auto -10rem -14rem auto;
  width: 28rem;
  height: 28rem;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 225, 164, 0.2), rgba(177, 162, 255, 0.22));
  filter: blur(36px);
  content: "";
  pointer-events: none;
  z-index: -1;
}

a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 1rem 1.25rem;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 0.65rem 0.75rem 0.65rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 12px 40px rgba(59, 46, 88, 0.07);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.92rem;
  font-weight: 750;
  letter-spacing: 0.04em;
}

.brand-mark {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid rgba(23, 23, 28, 0.12);
  border-radius: 50%;
  background: linear-gradient(135deg, #ffffff, #f0eaff);
  font-size: 0.82rem;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.navbar-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.48rem 0.78rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.navbar-links a:hover,
.navbar-links a.active {
  color: var(--ink);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.66);
}

.navbar-toggle {
  display: none;
  width: 2.6rem;
  height: 2.6rem;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.28rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.65);
  cursor: pointer;
}

.navbar-toggle span { width: 1rem; height: 1px; background: var(--ink); }

.site-main {
  width: min(calc(100% - 2.5rem), var(--page-width));
  margin: 0 auto;
  padding: 4.25rem 0 6rem;
}

.glass-panel {
  border: 1px solid rgba(255, 255, 255, 0.88);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: clamp(2rem, 8vw, 7rem);
  align-items: center;
}

.hero-copy {
  min-height: 400px;
  padding: clamp(2rem, 5vw, 4.5rem);
  border-radius: var(--radius-lg);
}

.eyebrow {
  margin: 0 0 1.15rem;
  color: #77717f;
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

h1, h2, p { margin-top: 0; }

h1, h2 { line-height: 1.08; letter-spacing: -0.045em; }

.hero-copy h1 {
  max-width: 620px;
  margin-bottom: 1.25rem;
  font-size: clamp(3.4rem, 8vw, 6.8rem);
  font-weight: 760;
}

.hero-copy h1 span {
  display: block;
  color: transparent;
  background: linear-gradient(100deg, #18181c 8%, #756a91 48%, #c38ca7 90%);
  background-clip: text;
  -webkit-background-clip: text;
}

.hero-intro {
  max-width: 520px;
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
}

.hero-actions, .project-actions, .contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover { transform: translateY(-2px); }

.button-primary {
  color: #ffffff;
  background: var(--ink);
  border-color: var(--ink);
  box-shadow: 0 8px 22px rgba(23, 23, 28, 0.16);
}

.button-quiet { background: rgba(255, 255, 255, 0.54); }
.button-quiet:hover { background: rgba(255, 255, 255, 0.9); }

.hero-footnote {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  color: #8a8790;
  font-size: 0.8rem;
}

.status-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #9bd7b0;
  box-shadow: 0 0 0 5px rgba(155, 215, 176, 0.14);
}

.portrait-figure { margin: 0; text-align: center; }

.portrait-reveal {
  display: block;
  width: 320px;
  height: 420px;
  max-width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.portrait-image-shell {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-lg);
  background: #eeeaf3;
  box-shadow: 0 30px 80px rgba(77, 53, 97, 0.2);
  isolation: isolate;
  transform: translateZ(0);
  transition: box-shadow 250ms ease, transform 250ms ease;
}

.portrait-reveal:hover .portrait-image-shell,
.portrait-reveal:focus-visible .portrait-image-shell {
  transform: translateY(-5px);
  box-shadow: 0 35px 90px rgba(77, 53, 97, 0.26);
}

.portrait-reveal:focus-visible { outline: 3px solid rgba(143, 110, 205, 0.5); outline-offset: 6px; }

.portrait-image-shell img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 24% center;
  filter: blur(28px) saturate(0.58) contrast(0.92);
  transform: scale(1.13);
  transition: filter 500ms ease, transform 700ms cubic-bezier(.2,.75,.3,1);
}

.portrait-reveal.is-revealed .portrait-image-shell img {
  filter: saturate(1.35) contrast(1.04) hue-rotate(-8deg);
  transform: scale(1.035);
}

.portrait-rainbow {
  position: absolute;
  inset: -25%;
  z-index: 1;
  opacity: 0;
  background: conic-gradient(from 210deg, rgba(255, 108, 176, 0.5), rgba(255, 209, 95, 0.34), rgba(126, 226, 209, 0.4), rgba(150, 134, 255, 0.52), rgba(255, 108, 176, 0.5));
  mix-blend-mode: screen;
  filter: blur(18px);
  transform: rotate(-14deg) scale(0.7);
  transition: opacity 350ms ease, transform 800ms cubic-bezier(.2,.75,.3,1);
  pointer-events: none;
}

.portrait-reveal.is-revealed .portrait-rainbow { opacity: 0.82; transform: rotate(18deg) scale(1.1); }

.portrait-image-shell::after {
  position: absolute;
  inset: -15% auto -15% -55%;
  z-index: 2;
  width: 42%;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.76), transparent);
  filter: blur(10px);
  transform: skewX(-18deg) translateX(0);
  transition: transform 650ms cubic-bezier(.2,.75,.3,1);
  pointer-events: none;
}

.portrait-reveal.is-revealed .portrait-image-shell::after { transform: skewX(-18deg) translateX(420%); }

.portrait-sparkles { position: absolute; inset: 0; z-index: 3; pointer-events: none; }

.sparkle {
  position: absolute;
  color: #ffffff;
  font-size: 1.35rem;
  opacity: 0;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.95), 0 0 24px rgba(202, 119, 255, 0.85);
  transform: scale(0.2) rotate(-20deg);
}

.sparkle-one { top: 14%; left: 15%; }
.sparkle-two { top: 28%; right: 14%; font-size: 1rem; }
.sparkle-three { top: 52%; left: 10%; font-size: 0.95rem; }
.sparkle-four { top: 64%; right: 12%; }
.sparkle-five { bottom: 15%; left: 27%; font-size: 1rem; }
.sparkle-six { bottom: 25%; right: 28%; font-size: 0.9rem; }

.portrait-reveal.is-revealed .sparkle { animation: sparkle-pop 1.1s ease-out forwards; }
.portrait-reveal.is-revealed .sparkle-two { animation-delay: 100ms; }
.portrait-reveal.is-revealed .sparkle-three { animation-delay: 180ms; }
.portrait-reveal.is-revealed .sparkle-four { animation-delay: 260ms; }
.portrait-reveal.is-revealed .sparkle-five { animation-delay: 340ms; }
.portrait-reveal.is-revealed .sparkle-six { animation-delay: 420ms; }

@keyframes sparkle-pop {
  0% { opacity: 0; transform: scale(0.2) rotate(-20deg); }
  35% { opacity: 1; transform: scale(1.25) rotate(12deg); }
  100% { opacity: 0.72; transform: scale(0.85) rotate(0deg); }
}

.portrait-label {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(23, 23, 28, 0.3);
  font-size: 0.78rem;
  font-weight: 700;
  backdrop-filter: blur(12px);
}

.portrait-label-revealed[hidden], .portrait-label-default[hidden] { display: none; }
.portrait-label-icon { color: #ffe5fb; }
.portrait-figure figcaption { margin-top: 0.85rem; color: #898590; font-size: 0.78rem; }

.contact-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: end;
  margin-top: 2rem;
  padding: 2rem clamp(1.5rem, 5vw, 3.5rem);
  border-radius: var(--radius-md);
}

.contact-panel .eyebrow { margin-bottom: 0.7rem; }
.contact-panel h2 { margin-bottom: 0.7rem; font-size: clamp(1.8rem, 3vw, 2.8rem); }
.contact-panel p:not(.eyebrow) { max-width: 580px; margin-bottom: 0; color: var(--muted); }
.contact-links { justify-content: flex-end; }
.contact-link { padding: 0.5rem 0; border-bottom: 1px solid var(--line-strong); font-size: 0.88rem; font-weight: 700; }
.contact-link:hover { border-color: var(--ink); }

.page-heading { max-width: 720px; margin-bottom: 3rem; }
.page-heading h1 { margin-bottom: 1rem; font-size: clamp(2.8rem, 6vw, 5.4rem); }
.page-heading > p:last-child { max-width: 580px; color: var(--muted); font-size: 1.05rem; }

.projects-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.project-card { min-height: 360px; padding: clamp(1.5rem, 4vw, 2.5rem); border-radius: var(--radius-md); }
.project-card-topline { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 3.4rem; color: #898590; font-size: 0.78rem; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; }
.project-number { color: #9a70ae; }
.project-card h2 { margin-bottom: 0.8rem; font-size: clamp(1.8rem, 3vw, 2.6rem); }
.project-card p { min-height: 3.2rem; margin-bottom: 1.25rem; color: var(--muted); }
.project-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 2rem; }
.project-tags span { padding: 0.28rem 0.58rem; border: 1px solid var(--line); border-radius: 999px; color: #77717f; font-size: 0.78rem; }
.project-actions { align-items: flex-start; }
.project-card-placeholder { border-style: dashed; box-shadow: none; background: rgba(255, 255, 255, 0.38); }

.detail-page { max-width: 820px; }
.back-link { display: inline-flex; margin-bottom: 2.5rem; color: #77717f; font-size: 0.86rem; font-weight: 700; }
.back-link:hover { color: var(--ink); }
.detail-hero { padding: clamp(1.5rem, 5vw, 3.5rem); border-radius: var(--radius-lg); }
.detail-hero h1 { margin-bottom: 1rem; font-size: clamp(3rem, 7vw, 5.8rem); }
.detail-hero > p { max-width: 600px; color: var(--muted); font-size: 1.08rem; }
.detail-body { display: grid; gap: 1rem; margin-top: 1rem; }
.detail-block { padding: 1.5rem; border-radius: var(--radius-md); }
.detail-block h2 { margin-bottom: 0.55rem; font-size: 1.25rem; letter-spacing: -0.02em; }
.detail-block p { margin-bottom: 0; color: var(--muted); }

.site-footer { padding: 1.5rem 1.25rem 2.5rem; color: #8a8790; text-align: center; font-size: 0.8rem; }
.site-footer a { text-decoration: underline; text-underline-offset: 0.2em; }

@media (max-width: 800px) {
  .site-main { padding-top: 2.5rem; }
  .hero-section { grid-template-columns: 1fr; gap: 1.25rem; }
  .hero-copy { min-height: auto; }
  .portrait-figure { order: 2; }
  .portrait-reveal { margin: 0 auto; }
  .contact-panel { grid-template-columns: 1fr; align-items: start; }
  .contact-links { justify-content: flex-start; }
  .projects-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .site-header { padding: 0.7rem; }
  .navbar { padding-left: 0.75rem; }
  .navbar-toggle { display: flex; }
  .navbar-links { position: absolute; top: calc(100% + 0.5rem); right: 0.7rem; left: 0.7rem; display: none; flex-direction: column; align-items: stretch; padding: 0.55rem; border: 1px solid rgba(255, 255, 255, 0.9); border-radius: 1.2rem; background: rgba(255, 255, 255, 0.85); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
  .navbar-links.active { display: flex; }
  .navbar-links a { justify-content: space-between; padding: 0.75rem 0.85rem; }
  .site-main { width: min(calc(100% - 1.4rem), var(--page-width)); padding-bottom: 4rem; }
  .hero-copy { padding: 1.5rem; border-radius: 1.5rem; }
  .hero-copy h1 { font-size: clamp(3rem, 15vw, 4.4rem); }
  .hero-actions .button { flex: 1 1 auto; justify-content: center; }
  .portrait-reveal { width: 320px; height: 420px; }
  .contact-panel { padding: 1.5rem; border-radius: 1.5rem; }
  .contact-links { align-items: flex-start; flex-direction: column; }
  .project-card { min-height: auto; padding: 1.5rem; }
  .project-card-topline { margin-bottom: 2.5rem; }
}

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