
/* =========================================
   SUMAN MANDAL — PERSONAL WEBSITE
   Minimal editorial design
   ========================================= */

:root {
  --violet: #6226fb;
  --violet-dark: #4816d7;
  --violet-soft: #eee8ff;
  --ink: #171526;
  --muted: #777486;
  --paper: #ffffff;
  --surface: #f8f7fb;
  --line: #e9e7ef;
  --white: #ffffff;

  --font: Inter, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;

  --shell: 1120px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

button {
  font: inherit;
}

::selection {
  background: var(--violet);
  color: white;
}

.shell {
  width: min(var(--shell), calc(100% - 64px));
  margin-inline: auto;
}

/* ACCESSIBILITY */

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 1000;
  padding: 10px 16px;
  background: var(--violet);
  color: white;
}

.skip-link:focus {
  top: 16px;
}

/* HEADER */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(233, 231, 239, 0.8);
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -0.5px;
}

.mark {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  background: var(--violet);
  color: white;
  border-radius: 9px;
  font-size: 17px;
  font-weight: 800;
}

.nav {
  display: flex;
  align-items: center;
  gap: 34px;
}

.nav a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  transition: color 180ms ease;
}

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

.nav .nav-cta {
  color: var(--violet);
  border: 1px solid #d9ccff;
  padding: 8px 15px;
  border-radius: 7px;
}

.nav .nav-cta:hover {
  background: var(--violet-soft);
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  cursor: pointer;
}

/* HERO */

.hero {
  min-height: 600px;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  align-items: center;
  gap: 50px;
  padding-block: 100px 110px;
}

.eyebrow {
  margin: 0 0 22px;
  color: var(--violet);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
}

.eyebrow-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  background: #6ad7a3;
  border-radius: 50%;
  box-shadow: 0 0 0 4px #e6f8ee;
}

.hero h1 {
  max-width: 740px;
  margin: 0;
  font-size: clamp(43px, 5.5vw, 69px);
  font-weight: 760;
  line-height: 1.08;
  letter-spacing: -4px;
}

.hero h1 span {
  color: var(--violet);
}

.hero-intro {
  max-width: 590px;
  margin: 27px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.9;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 47px;
  padding: 0 21px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
  transition: transform 180ms ease, background 180ms ease;
}

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

.button-primary {
  background: var(--violet);
  color: white;
  box-shadow: 0 8px 22px rgba(98, 38, 251, 0.17);
}

.button-primary:hover {
  background: var(--violet-dark);
}

.text-link {
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
}

.text-link:hover {
  color: var(--violet);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 48px;
  color: var(--muted);
  font-size: 11px;
}

.hero-meta a:hover {
  color: var(--violet);
}

.meta-separator {
  color: #c8c5d2;
}

/* HERO ART */

.hero-art {
  position: relative;
  width: 100%;
  max-width: 350px;
  aspect-ratio: 1;
  justify-self: end;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #ffffff 0%, #f7f2ff 42%, #eee6ff 72%, #e4d8ff 100%);
}

.art-orbit {
  position: absolute;
  width: 74%;
  height: 74%;
  border: 1px solid rgba(98, 38, 251, 0.18);
  border-radius: 50%;
}

.orbit-one {
  transform: rotate(-35deg) scaleX(1.35);
}

.orbit-two {
  transform: rotate(45deg) scaleX(1.35);
}

.art-core {
  position: relative;
  z-index: 2;
  width: 45%;
  height: 45%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(98, 38, 251, 0.2);
  border-radius: 50%;
  background: white;
  box-shadow: 0 15px 55px rgba(98, 38, 251, 0.13);
}

.core-glyph {
  color: var(--ink);
  font-size: 67px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -5px;
}

.core-glyph span {
  color: var(--violet);
}

.core-caption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 2px;
  line-height: 1.5;
  text-align: center;
}

.art-label {
  position: absolute;
  z-index: 3;
  color: var(--violet);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 2px;
}

.label-top {
  top: 18%;
  right: 6%;
}

.label-bottom {
  bottom: 17%;
  left: 5%;
}

.art-grid {
  position: absolute;
  inset: 0;
  opacity: 0.13;
  background-image: radial-gradient(#6226fb 0.7px, transparent 0.7px);
  background-size: 12px 12px;
  mask-image: radial-gradient(circle, black, transparent 75%);
}

/* COMMUNITY BAND */

.signal-band {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.signal-inner {
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 35px;
}

.signal-label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.7px;
}

.signal-items {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 28px;
}

.signal-items span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
}

.signal-items small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 450;
}

.signal-items i {
  width: 4px;
  height: 4px;
  background: #c7c0d6;
  border-radius: 50%;
}

/* GENERAL SECTION */

.section {
  padding-block: 120px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 55px;
}

.section-heading .eyebrow {
  margin-bottom: 13px;
}

.section-heading h2,
.writing-inner h2 {
  margin: 0;
  font-size: clamp(34px, 4vw, 47px);
  line-height: 1.13;
  letter-spacing: -2px;
  font-weight: 760;
}

.section-note {
  max-width: 390px;
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.9;
}

/* WORK LIST */

.work-list {
  border-top: 1px solid var(--line);
}

.work-item {
  display: grid;
  grid-template-columns: 65px 1fr;
  gap: 20px;
  padding: 35px 0 39px;
  border-bottom: 1px solid var(--line);
  transition: padding 200ms ease;
}

.work-item:hover {
  padding-left: 8px;
}

.work-index {
  padding-top: 5px;
  color: #aaa6b6;
  font-size: 12px;
  font-weight: 700;
}

.work-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.work-topline h3 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 13px;
  margin: 0;
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.6px;
}

.work-tag {
  padding: 5px 9px;
  border-radius: 4px;
  background: var(--violet-soft);
  color: var(--violet);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.2px;
}

.arrow-link {
  color: var(--violet);
  font-size: 22px;
  transition: transform 180ms ease;
}

.arrow-link:hover {
  transform: translate(3px, -3px);
}

.work-main > p {
  max-width: 740px;
  margin: 15px 0 17px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.9;
}

.resource-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 23px;
}

.resource-links a {
  color: var(--violet);
  font-size: 11px;
  font-weight: 650;
}

.resource-links a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* WRITING SECTION */

.writing-section {
  padding-block: 105px;
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.writing-inner {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 90px;
  align-items: center;
}

.writing-inner .eyebrow {
  margin-bottom: 17px;
}

.writing-intro {
  max-width: 350px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.9;
}

.writing-links {
  border-top: 1px solid var(--line);
}

.writing-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  transition: padding 180ms ease;
}

.writing-link:hover {
  padding-left: 7px;
}

.writing-link span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
}

.writing-link small {
  display: block;
  margin-bottom: 5px;
  color: var(--violet);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.4px;
}

.writing-link b {
  color: var(--violet);
  font-size: 19px;
}

/* ABOUT */

.about-section {
  padding-bottom: 115px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 45px;
}

.about-grid > div {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.about-grid h3 {
  margin: 0 0 15px;
  font-size: 13px;
  font-weight: 750;
}

.about-grid p {
  color: var(--muted);
  font-size: 12px;
  line-height: 2;
}

.about-grid strong {
  color: var(--ink);
}

.about-grid a {
  color: var(--violet);
  font-weight: 650;
}

.about-grid a:hover {
  text-decoration: underline;
}

/* CONTACT */

.contact-band {
  padding-block: 85px;
  background: var(--violet);
  color: white;
}

.contact-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 35px;
}

.contact-band .eyebrow {
  color: #d6c8ff;
  margin-bottom: 17px;
}

.contact-band h2 {
  margin: 0;
  font-size: clamp(35px, 4.5vw, 53px);
  line-height: 1.12;
  letter-spacing: -2px;
}

.button-light {
  flex-shrink: 0;
  background: white;
  color: var(--violet);
}

.button-light:hover {
  background: #f1ecff;
}

/* FOOTER */

.site-footer {
  background: #171526;
  color: white;
}

.footer-inner {
  min-height: 105px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
}

.footer-wordmark {
  color: white;
}

.footer-inner p,
.footer-inner small,
.footer-inner > a:last-of-type {
  color: #aaa7ba;
  font-size: 10px;
}

.footer-inner > a:last-of-type:hover {
  color: white;
}

/* RESPONSIVE TABLET */

@media (max-width: 850px) {
  .hero {
    grid-template-columns: 1fr 0.55fr;
    gap: 20px;
    padding-block: 85px;
  }

  .hero h1 {
    letter-spacing: -2.5px;
  }

  .hero-art {
    max-width: 270px;
  }

  .signal-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding-block: 25px;
  }

  .writing-inner {
    gap: 45px;
  }

  .section {
    padding-block: 90px;
  }
}

/* RESPONSIVE MOBILE */

@media (max-width: 620px) {
  .shell {
    width: min(100% - 40px, var(--shell));
  }

  .header-inner {
    min-height: 68px;
  }

  .menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 9px;
  }

  .menu-toggle span {
    display: block;
    width: 21px;
    height: 2px;
    background: var(--ink);
  }

  .nav {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    display: none;
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    padding: 12px 20px 20px;
    background: white;
    border-bottom: 1px solid var(--line);
  }

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

  .nav a {
    padding: 12px 0;
  }

  .nav .nav-cta {
    align-self: flex-start;
    padding: 8px 14px;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 55px;
    padding-block: 75px 65px;
  }

  .hero h1 {
    font-size: clamp(42px, 12vw, 58px);
    letter-spacing: -2.8px;
  }

  .hero-intro {
    font-size: 14px;
  }

  .hero-meta {
    margin-top: 32px;
    gap: 8px;
  }

  .hero-art {
    width: min(75%, 285px);
    justify-self: center;
  }

  .signal-inner {
    gap: 19px;
    padding-block: 27px;
  }

  .signal-items {
    gap: 15px;
  }

  .signal-items i {
    display: none;
  }

  .signal-items span {
    min-width: 42%;
  }

  .section {
    padding-block: 75px;
  }

  .section-heading {
    display: block;
    margin-bottom: 38px;
  }

  .section-note {
    margin-top: 18px;
  }

  .work-item {
    grid-template-columns: 30px 1fr;
    gap: 10px;
    padding-block: 28px;
  }

  .work-item:hover {
    padding-left: 0;
  }

  .work-topline h3 {
    font-size: 17px;
    gap: 9px;
  }

  .work-tag {
    font-size: 8px;
  }

  .resource-links {
    gap: 10px 16px;
  }

  .writing-section {
    padding-block: 75px;
  }

  .writing-inner {
    grid-template-columns: 1fr;
    gap: 35px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .contact-band {
    padding-block: 65px;
  }

  .contact-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding-block: 25px;
  }

  .footer-inner p {
    margin: 5px 0;
  }
}

/* REDUCED MOTION */

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


/* =========================================
   PURPLE — INTERACTIVE CAT COMPANION
   ========================================= */

.purple-companion {
  position: fixed;
  z-index: 999;
  right: 25px;
  bottom: 18px;
  width: 150px;
  height: 175px;
  pointer-events: none;
  transition: right 1.2s ease, bottom 1.2s ease;
}

/* SPEECH BUBBLE */

.purple-bubble {
  position: absolute;
  right: 0;
  bottom: 145px;
  width: 205px;
  padding: 15px 17px;
  background: white;
  border: 1px solid #e8ddff;
  border-radius: 13px;
  box-shadow: 0 10px 35px rgba(47, 24, 95, 0.12);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 250ms ease, transform 250ms ease;
  pointer-events: auto;
}

.purple-bubble::after {
  content: "";
  position: absolute;
  right: 32px;
  bottom: -8px;
  width: 14px;
  height: 14px;
  background: white;
  border-right: 1px solid #e8ddff;
  border-bottom: 1px solid #e8ddff;
  transform: rotate(45deg);
}

.purple-bubble-label {
  color: #6226fb;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 1.6px;
}

.purple-bubble p {
  margin: 6px 12px 0 0;
  color: #29233c;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
}

.purple-close {
  position: absolute;
  top: 7px;
  right: 9px;
  border: 0;
  background: transparent;
  color: #9992a8;
  font-size: 18px;
  cursor: pointer;
}

.purple-close:hover {
  color: #6226fb;
}

/* CAT BUTTON */

.purple-cat {
  position: absolute;
  right: 4px;
  bottom: 0;
  width: 120px;
  height: 120px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  animation: purple-idle 3s ease-in-out infinite;
}

.purple-cat svg {
  position: relative;
  z-index: 2;
  width: 100%;
  overflow: visible;
}

.purple-cat:hover {
  animation-play-state: paused;
}

.purple-cat:hover svg {
  transform: translateY(-7px) rotate(-4deg);
}

.cat-tail {
  transform-origin: 89px 74px;
  animation: purple-tail 2s ease-in-out infinite;
}

.cat-shadow {
  position: absolute;
  z-index: 1;
  bottom: 1px;
  left: 25px;
  width: 72px;
  height: 12px;
  background: rgba(53, 28, 101, 0.13);
  border-radius: 50%;
  filter: blur(5px);
}

/* WALKING STATE */

.purple-companion.is-walking .purple-cat {
  animation: purple-walk 500ms ease-in-out infinite alternate;
}

.purple-companion.is-walking .cat-tail {
  animation-duration: 500ms;
}

/* HIDDEN SPEECH */

.purple-bubble.is-hidden {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

/* DISMISSED STATE */

.purple-companion.is-dismissed {
  display: none;
}

/* ANIMATIONS */

@keyframes purple-idle {
  0%, 100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-7px);
  }
}

@keyframes purple-tail {
  0%, 100% {
    transform: rotate(0deg);
  }

  50% {
    transform: rotate(15deg);
  }
}

@keyframes purple-walk {
  from {
    transform: translateY(0) rotate(-5deg);
  }

  to {
    transform: translateY(-5px) rotate(5deg);
  }
}

/* MOBILE */

@media (max-width: 620px) {
  .purple-companion {
    right: 5px;
    bottom: 8px;
    transform: scale(0.82);
    transform-origin: bottom right;
  }

  .purple-bubble {
    width: 185px;
  }
}

/* REDUCED MOTION ACCESSIBILITY */

@media (prefers-reduced-motion: reduce) {
  .purple-cat,
  .cat-tail {
    animation: none !important;
  }

  .purple-bubble,
  .purple-companion {
    transition: none !important;
  }
}


/* PURPLE — CONTEXTUAL ACTION LINK */

.purple-action {
  display: inline-block;
  margin-top: 10px;
  color: #6226fb;
  font-size: 10px;
  font-weight: 800;
  text-decoration: none;
  transition: color 180ms ease;
}

.purple-action:hover {
  color: #4013c6;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* CAT INTERACTION */

.purple-cat:focus-visible {
  outline: 3px solid #6226fb;
  outline-offset: 5px;
  border-radius: 50%;
}


/* =========================================
   MEOW — INTERACTIVE VIRTUAL PET
   ========================================= */

.meow-pet {
  position: fixed;
  right: 22px;
  bottom: 12px;
  width: 190px;
  z-index: 999;
  text-align: center;
  font-family: inherit;
  pointer-events: none;
}

.meow-stage {
  position: relative;
  height: 165px;
  width: 190px;
  pointer-events: none;
}

.meow-cat {
  position: absolute;
  bottom: 0;
  left: 25px;
  width: 140px;
  height: 155px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  transform-origin: 50% 90%;
  animation: meow-breathe 3s ease-in-out infinite;
}

.meow-cat svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 7px 9px rgba(64, 29, 130, .18));
}

.meow-cat:focus-visible,
.meow-ball:focus-visible {
  outline: 3px solid #a98aff;
  outline-offset: 5px;
  border-radius: 50%;
}

.meow-tail {
  transform-origin: 115px 130px;
  animation: meow-tail-sway 2.5s ease-in-out infinite;
}

.meow-pupil {
  transition: transform .12s ease-out;
}

.meow-message {
  position: absolute;
  right: 0;
  bottom: 175px;
  width: 220px;
  padding: 14px 16px;
  background: #fff;
  color: #24123f;
  border: 1px solid rgba(98, 38, 251, .15);
  border-radius: 15px 15px 4px 15px;
  box-shadow: 0 8px 30px rgba(36, 18, 63, .13);
  text-align: left;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(.97);
  transform-origin: bottom right;
  transition: .25s ease;
  pointer-events: auto;
}

.meow-message.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.meow-label {
  display: block;
  margin-bottom: 7px;
  color: #713bfa;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.5px;
}

.meow-message p {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
}

#meowClose {
  position: absolute;
  top: 7px;
  right: 9px;
  border: 0;
  background: transparent;
  color: #8a7b9d;
  font-size: 19px;
  cursor: pointer;
}

.meow-ball {
  position: absolute;
  left: 5px;
  bottom: 18px;
  width: 25px;
  height: 25px;
  border: 0;
  border-radius: 50%;
  background: #ffb4d5;
  box-shadow: inset -4px -4px 0 rgba(173, 66, 126, .15),
              0 3px 8px rgba(0, 0, 0, .12);
  cursor: pointer;
  pointer-events: auto;
  z-index: 3;
}

.meow-ball span {
  position: absolute;
  top: 0;
  left: 11px;
  width: 3px;
  height: 25px;
  border-left: 2px solid rgba(255,255,255,.8);
  border-right: 2px solid rgba(255,255,255,.8);
  border-radius: 50%;
  transform: rotate(35deg);
}

.meow-ball:hover {
  transform: scale(1.15);
}

.meow-pillow {
  position: absolute;
  display: none;
  bottom: 4px;
  left: 35px;
  width: 120px;
  height: 34px;
  background: #d9caff;
  border-radius: 50%;
  box-shadow: inset 0 -5px 0 rgba(98, 38, 251, .12);
}

.meow-pillow span {
  position: absolute;
  inset: 5px 12px;
  border: 1px dashed rgba(98, 38, 251, .25);
  border-radius: 50%;
}

.meow-sleep-symbol {
  position: absolute;
  display: none;
  top: 0;
  right: 12px;
  color: #713bfa;
  font-size: 23px;
  font-weight: 800;
  animation: meow-zzz 2s ease-in-out infinite;
}

.meow-sleep-symbol sup {
  font-size: 13px;
}

/* Breathing and tail movement */

@keyframes meow-breathe {
  0%, 100% { transform: translateY(0) scaleY(1); }
  50% { transform: translateY(-3px) scaleY(1.015); }
}

@keyframes meow-tail-sway {
  0%, 100% { transform: rotate(0); }
  50% { transform: rotate(12deg); }
}

@keyframes meow-zzz {
  0% { opacity: 0; transform: translateY(8px); }
  50% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-12px); }
}

/* Sleeping */

.meow-pet.is-sleeping .meow-cat {
  transform: rotate(12deg) scale(.86);
  animation: none;
  bottom: -3px;
}

.meow-pet.is-sleeping .meow-pillow,
.meow-pet.is-sleeping .meow-sleep-symbol {
  display: block;
}

.meow-pet.is-sleeping .meow-cat svg {
  filter: drop-shadow(0 5px 5px rgba(64, 29, 130, .12));
}

.meow-pet.is-sleeping .meow-ball {
  opacity: .45;
}

/* Playing */

.meow-pet.is-playing .meow-cat {
  animation: meow-breathe .35s ease-in-out infinite;
}

.meow-pet.is-playing .meow-ball {
  animation: meow-ball-play .65s ease-in-out 3;
}

@keyframes meow-ball-play {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  35% { transform: translate(55px, -35px) rotate(160deg); }
  70% { transform: translate(95px, 0) rotate(300deg); }
}

/* Mobile layout */

@media (max-width: 600px) {
  .meow-pet {
    right: 5px;
    bottom: 5px;
    transform: scale(.82);
    transform-origin: bottom right;
  }

  .meow-message {
    width: 195px;
  }
}

/* Accessibility */

@media (prefers-reduced-motion: reduce) {
  .meow-cat,
  .meow-tail,
  .meow-sleep-symbol,
  .meow-ball {
    animation: none !important;
    transition: none !important;
  }
}


/* =========================================
   THEME SYSTEM — LIGHT & DARK MODE
   ========================================= */

:root {
  color-scheme: light;

  --page-bg: #ffffff;
  --surface-bg: #f8f7fc;
  --text-primary: #24123f;
  --text-secondary: #716b7d;
  --border-color: #e9e5f1;
  --accent: #713bfa;
  --accent-hover: #5622d8;
  --card-bg: #ffffff;
  --nav-bg: rgba(255, 255, 255, .9);
  --shadow-color: rgba(36, 18, 63, .08);
}

html[data-theme="dark"] {
  color-scheme: dark;

  --page-bg: #111019;
  --surface-bg: #191724;
  --text-primary: #f2efff;
  --text-secondary: #aaa3ba;
  --border-color: #302b3d;
  --accent: #a98aff;
  --accent-hover: #c2adff;
  --card-bg: #1c1928;
  --nav-bg: rgba(17, 16, 25, .92);
  --shadow-color: rgba(0, 0, 0, .25);
}

/* Smooth theme transitions */

html {
  background: var(--page-bg);
}

body,
header,
nav,
section,
footer,
article,
.card,
.work-item {
  transition:
    background-color .25s ease,
    color .25s ease,
    border-color .25s ease;
}

/* Main page */

body {
  background-color: var(--page-bg);
  color: var(--text-primary);
}

/* Common text */

h1, h2, h3, h4, p, li, span {
  color: inherit;
}

a {
  color: var(--accent);
}

/* Navigation */

header,
.site-header,
.navbar {
  background-color: var(--nav-bg);
}

/* Cards and project sections */

.work-item,
.card {
  background-color: var(--card-bg);
  border-color: var(--border-color);
  box-shadow: 0 8px 30px var(--shadow-color);
}

/* Secondary surfaces */

section:nth-of-type(even) {
  background-color: var(--surface-bg);
}

/* Borders */

hr,
.work-item,
.card {
  border-color: var(--border-color);
}

/* Form controls */

input,
textarea,
select {
  background-color: var(--card-bg);
  color: var(--text-primary);
  border-color: var(--border-color);
}

/* Theme toggle */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  background: var(--surface-bg);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 17px;
  transition: .2s ease;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: rotate(12deg);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* Meow message in dark mode */

html[data-theme="dark"] .meow-message {
  background: #252132;
  color: #f2efff;
  border-color: #40365b;
}

html[data-theme="dark"] .meow-message p {
  color: #f2efff;
}

html[data-theme="dark"] .meow-label {
  color: #bca1ff;
}

/* Respect reduced-motion preferences */

@media (prefers-reduced-motion: reduce) {
  body,
  header,
  nav,
  section,
  footer,
  article {
    transition: none;
  }
}


/* =========================================
   RESPONSIVE THEME TOGGLE
   ========================================= */

.site-header .header-inner {
  display: flex;
  align-items: center;
}

.site-header .nav {
  margin-left: auto;
}

.site-header .theme-toggle {
  flex-shrink: 0;
  margin-left: 16px;
}

/* Mobile navigation */

@media (max-width: 760px) {
  .site-header .header-inner {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .site-header .nav {
    margin-left: 0;
  }

  .site-header .menu-toggle {
    order: 2;
    flex-shrink: 0;
  }

  .site-header .theme-toggle {
    order: 1;
    flex-shrink: 0;
    margin-left: auto;
    width: 36px;
    height: 36px;
  }

  .site-header .nav {
    order: 3;
  }
}

/* =========================================
   CV REQUEST FORM
   ========================================= */

.cv-request-form {
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.cv-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.cv-request-form label {
  display: flex;
  flex-direction: column;
  gap: 9px;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 700;
}

.cv-request-form input,
.cv-request-form textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--text-primary);
  font: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.cv-request-form input::placeholder,
.cv-request-form textarea::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

.cv-request-form input:focus,
.cv-request-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(113, 59, 250, 0.12);
}

.cv-request-form textarea {
  min-height: 120px;
  resize: vertical;
}

.cv-request-form button {
  align-self: flex-start;
  border: none;
  cursor: pointer;
}

.cv-request-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

#cvRequestMessage {
  min-height: 20px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
}

#cvRequestMessage.success {
  color: #168653;
}

#cvRequestMessage.error {
  color: #dc4545;
}

/* Mobile form layout */
@media (max-width: 620px) {
  .cv-form-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .cv-request-form {
    gap: 20px;
  }

  .cv-request-form button {
    width: 100%;
  }
}

/* =========================================
   HERO PROFILE PHOTO — RESPONSIVE
   ========================================= */

.art-core {
  position: relative;
  z-index: 2;
  width: 45%;
  aspect-ratio: 1;
  height: auto;
  padding: 0;
  overflow: hidden;
  border-radius: 50%;
  background: #ffffff;
  isolation: isolate;
}

.profile-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  border-radius: inherit;
  transform: none;
}

/* Tablet */
@media (max-width: 850px) {
  .art-core {
    width: 45%;
  }
}

/* Mobile */
@media (max-width: 620px) {
  .art-core {
    width: 46%;
  }

  .profile-photo {
    object-position: center 35%;
  }
}
