/* ==========================================================================
   Moon & Star Portfolio — design system
   Strict palette: white / red / near-black / neutral gray. No pink tints.
   ========================================================================== */

:root {
  --white: #ffffff;
  --red: #d9333f;
  --red-dark: #b12832;
  --red-darker: #8f1f28;
  --ink: #1a1a1a;
  --ink-soft: #3a3a3a;
  --gray-050: #fafafa;
  --gray-100: #f4f4f4;
  --gray-200: #e6e6e6;
  --gray-300: #d4d4d4;
  --gray-400: #a3a3a3;
  --gray-600: #6b6b6b;

  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --radius-pill: 999px;

  --shadow-pixel: 4px 4px 0 var(--ink);
  --shadow-pixel-sm: 3px 3px 0 var(--ink);
  --shadow-pixel-red: 4px 4px 0 var(--red-darker);

  --border-width: 2px;
  --content-max: 1180px;

  --transition-fast: 120ms ease;
  --transition-base: 220ms ease;
}

* {
  box-sizing: border-box;
}

/* Several components below set display:flex/inline-flex unconditionally
   (buttons, overlays, dropdowns). Author-origin rules beat the browser's
   default [hidden]{display:none} at equal specificity, so without this,
   toggling the hidden attribute on those elements silently does nothing. */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
  margin: 0 0 0.75em;
}

h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 24px;
}

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

/* ==========================================================================
   Layout frame
   ========================================================================== */

.page-frame {
  border: var(--border-width) solid var(--ink);
  border-radius: var(--radius-lg);
  margin: 12px;
  overflow: hidden;
  background: var(--white);
  min-height: calc(100vh - 24px);
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Nav
   ========================================================================== */

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  border-bottom: var(--border-width) solid var(--ink);
  background: var(--white);
  position: relative;
  z-index: 50;
}

.site-nav__logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav__logo .dot {
  width: 10px;
  height: 10px;
  background: var(--red);
  display: inline-block;
  border: 1.5px solid var(--ink);
}

.site-nav__links {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__links a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--ink);
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  border: var(--border-width) solid transparent;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

.site-nav__links a:hover,
.site-nav__links a[aria-current="page"] {
  border-color: var(--ink);
  color: var(--red);
}

.site-nav__toggle {
  display: none;
  background: var(--white);
  border: var(--border-width) solid var(--ink);
  border-radius: var(--radius-sm);
  width: 42px;
  height: 38px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.site-nav__toggle span {
  width: 20px;
  height: 2px;
  background: var(--ink);
  display: block;
}

@media (max-width: 760px) {
  .site-nav__toggle { display: flex; }
  .site-nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--white);
    border-bottom: var(--border-width) solid var(--ink);
    padding: 10px;
    display: none;
  }
  .site-nav__links.is-open { display: flex; }
  .site-nav__links a { text-align: center; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: var(--radius-pill);
  border: var(--border-width) solid var(--ink);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  box-shadow: var(--shadow-pixel);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--ink);
}

.btn:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 var(--ink);
}

.btn--primary {
  background: var(--red);
  color: var(--white);
  box-shadow: var(--shadow-pixel-red);
}

.btn--primary:hover { box-shadow: 5px 5px 0 var(--red-darker); }
.btn--primary:active { box-shadow: 1px 1px 0 var(--red-darker); }

.btn--sm {
  padding: 9px 16px;
  font-size: 0.8rem;
}

.btn--block { width: 100%; }

.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
}

/* ==========================================================================
   Pills / tags
   ========================================================================== */

.tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--ink);
  background: var(--gray-100);
  color: var(--ink-soft);
}

.tag--active {
  background: var(--red);
  color: var(--white);
  border-color: var(--ink);
}

.tag-filter {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--ink);
  background: var(--white);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.tag-filter:hover { background: var(--gray-100); }

.tag-filter.is-active {
  background: var(--red);
  color: var(--white);
}

/* ==========================================================================
   Hero (home)
   ========================================================================== */

.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 100px 28px 64px;
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding: 56px 20px 40px; }
}

.hero__eyebrow {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--red);
  margin-bottom: 14px;
  display: inline-block;
}

.hero__name {
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  letter-spacing: -0.02em;
}

.hero__tagline {
  color: var(--ink-soft);
  font-size: 1.15rem;
  max-width: 46ch;
}

.hero__actions {
  display: flex;
  gap: 14px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.hero__scene-wrap {
  border: var(--border-width) solid var(--ink);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: linear-gradient(180deg, #14213a 0%, #1a1a2e 55%, #0d1220 100%);
  box-shadow: var(--shadow-pixel);
  aspect-ratio: 4 / 3;
}

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

.hero__scene-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--gray-300);
  font-family: var(--font-body);
  font-size: 0.85rem;
  text-align: center;
  padding: 20px;
}

.hero__scene-placeholder__hint {
  font-size: 0.72rem;
  color: var(--gray-400);
}

/* ==========================================================================
   Sections
   ========================================================================== */

section {
  padding: 48px 28px;
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.section-title__label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--red);
}

.section-divider {
  border: none;
  border-top: var(--border-width) dashed var(--gray-300);
  margin: 0;
}

/* ==========================================================================
   Cards / grids
   ========================================================================== */

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

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

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

@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
}

.card {
  border: var(--border-width) solid var(--ink);
  border-radius: var(--radius-md);
  background: var(--white);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-pixel-sm);
  will-change: transform;
  /* Only transform is animated — it's GPU-composited and stays smooth.
     box-shadow forces a repaint on every frame, which is what made this
     feel janky, especially on cards with large images; it just snaps
     to the new shadow instantly instead, which reads fine at this size.
     A snappy overshoot easing ("pop") on a real 8px lift is what actually
     reads as the card popping up — the old 2px diagonal nudge was too
     small to notice, so the shadow jump was the only thing visible. */
  transition: transform 280ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 7px 9px 0 var(--ink);
}

.card__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  background: var(--gray-100);
  border-bottom: var(--border-width) solid var(--ink);
}

.card__image--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--gray-400);
}

.card__body {
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  margin: 0;
}

.card__desc {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin: 0;
  flex: 1;
}

.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card__actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.card__badge {
  position: absolute;
  margin: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.68rem;
  background: var(--red);
  color: var(--white);
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--ink);
}

.card__media {
  position: relative;
}

/* ==========================================================================
   Stats (count-up)
   ========================================================================== */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 18px;
}

.stat {
  border: var(--border-width) solid var(--ink);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  background: var(--gray-050);
}

.stat__value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--red);
}

.stat__label {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-top: 6px;
}

/* ==========================================================================
   Skill bars
   ========================================================================== */

.skills {
  display: grid;
  gap: 20px;
}

.skill {
  display: grid;
  grid-template-columns: 140px 1fr 46px;
  align-items: center;
  gap: 14px;
}

@media (max-width: 560px) {
  .skill { grid-template-columns: 1fr; gap: 6px; }
}

.skill__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
}

.skill__bar {
  height: 18px;
  border: var(--border-width) solid var(--ink);
  border-radius: var(--radius-sm);
  background: var(--gray-100);
  overflow: hidden;
  position: relative;
}

.skill__bar-fill {
  height: 100%;
  background: repeating-linear-gradient(
    90deg,
    var(--red),
    var(--red) 8px,
    var(--red-dark) 8px,
    var(--red-dark) 16px
  );
  width: 0%;
  transition: width 1.1s steps(20);
}

.skill__pct {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.8rem;
  text-align: right;
}

/* ==========================================================================
   Timeline
   ========================================================================== */

.timeline {
  position: relative;
  padding-left: 32px;
  border-left: var(--border-width) solid var(--gray-300);
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.timeline__item {
  position: relative;
}

.timeline__item::before {
  content: '';
  position: absolute;
  left: -40px;
  top: 4px;
  width: 14px;
  height: 14px;
  background: var(--red);
  border: var(--border-width) solid var(--ink);
}

.timeline__date {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--red);
  margin-bottom: 6px;
  display: block;
}

.timeline__title {
  font-weight: 700;
  margin: 0 0 6px;
}

.timeline__desc {
  color: var(--ink-soft);
  margin: 0;
}

/* ==========================================================================
   Contact
   ========================================================================== */

.contact-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border: var(--border-width) solid var(--ink);
  border-radius: var(--radius-pill);
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  background: var(--white);
  box-shadow: var(--shadow-pixel-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), color var(--transition-fast);
}

.contact-pill:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--ink);
  color: var(--red);
}

.contact-pill__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ==========================================================================
   Reveal on scroll
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms ease, transform 600ms ease;
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================================
   Empty / loading states
   ========================================================================== */

.state-msg {
  font-family: var(--font-body);
  color: var(--gray-600);
  text-align: center;
  padding: 40px 20px;
  border: var(--border-width) dashed var(--gray-300);
  border-radius: var(--radius-md);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  margin-top: auto;
  border-top: var(--border-width) solid var(--ink);
  padding: 26px 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-size: 0.85rem;
  background: var(--red);
  color: rgba(255, 255, 255, 0.85);
}

.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

.site-footer__top {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 40ch;
}

.site-footer__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-footer__name .dot {
  width: 10px;
  height: 10px;
  background: var(--white);
  display: inline-block;
  border: 1.5px solid var(--ink);
}

.site-footer__tag {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}

.site-footer__links,
.site-footer__contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.82rem;
}

.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 16px;
  border-top: 1.5px solid rgba(255, 255, 255, 0.35);
  font-size: 0.78rem;
}

.site-footer__social {
  display: flex;
  gap: 10px;
  margin-left: auto;
}

.site-footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--white);
  border-radius: 50%;
  color: var(--white);
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.site-footer__social a:hover {
  background: var(--white);
  border-color: var(--white);
  color: var(--red);
  transform: translateY(-2px);
}

.site-footer__social svg {
  width: 16px;
  height: 16px;
}

@media (max-width: 640px) {
  .site-footer__top { flex-direction: column; gap: 20px; }
}

/* ==========================================================================
   Service / expertise cards
   ========================================================================== */

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.service-card {
  border: var(--border-width) solid var(--ink);
  border-radius: var(--radius-md);
  background: var(--white);
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-pixel-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.service-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}

.service-card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  margin: 0;
}

.service-card__desc {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin: 0;
}

.service-card__list {
  margin: 6px 0 0;
  padding-left: 18px;
  color: var(--ink-soft);
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* ==========================================================================
   Journey items (About)
   ========================================================================== */

.journey-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.journey-item {
  border: var(--border-width) solid var(--ink);
  border-radius: var(--radius-md);
  padding: 22px;
  background: var(--gray-050);
}

.journey-item__date {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--red);
  margin-bottom: 10px;
  display: inline-block;
}

.journey-item__title {
  font-weight: 700;
  margin: 0 0 8px;
}

.journey-item__desc {
  color: var(--ink-soft);
  margin: 0;
}

/* ==========================================================================
   Process steps (Services page)
   ========================================================================== */

.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
}

.process-step {
  border: var(--border-width) solid var(--ink);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  background: var(--white);
}

.process-step__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.7rem;
  color: var(--white);
  background: var(--red);
  border: 1.5px solid var(--ink);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.process-step__title {
  font-weight: 700;
  margin: 0 0 6px;
}

.process-step__desc {
  color: var(--ink-soft);
  font-size: 0.85rem;
  margin: 0;
}

/* ==========================================================================
   Forms (public — contact)
   ========================================================================== */

.field {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--ink-soft);
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="password"],
.field input[type="url"],
.field textarea,
.field select {
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 11px 14px;
  border: var(--border-width) solid var(--ink);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: 2px solid var(--red);
  outline-offset: 1px;
}

.field textarea {
  resize: vertical;
  min-height: 110px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
  max-width: 640px;
}

.form-grid .field--full { grid-column: 1 / -1; }

@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
}

.alert {
  padding: 12px 16px;
  border: var(--border-width) solid var(--ink);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 18px;
}

.alert--error {
  background: #fdecec;
  border-color: var(--red-darker);
  color: var(--red-darker);
}

.alert--success {
  background: #edf7ed;
  border-color: #2f7a3d;
  color: #2f7a3d;
}

.contact-pill--static {
  cursor: default;
}

.contact-pill--static:hover {
  transform: none;
  box-shadow: var(--shadow-pixel-sm);
  color: var(--ink);
}

/* ==========================================================================
   Misc page content
   ========================================================================== */

.prose p { color: var(--ink-soft); }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

/* ==========================================================================
   Account: profile widget (nav), login FAB + panel, cookie banner
   ========================================================================== */

.profile-widget-li {
  list-style: none;
  display: flex;
  align-items: center;
}

@media (max-width: 760px) {
  .profile-widget-li {
    justify-content: center;
    width: 100%;
    margin-top: 10px;
    padding-top: 14px;
    border-top: 1.5px solid var(--gray-200);
  }
}

.profile-widget {
  position: relative;
}

.profile-widget__trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  padding: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.7rem;
  transition: background var(--transition-fast);
}

.profile-widget__trigger:hover { background: var(--gray-100); }

.profile-widget__trigger.is-avatar {
  background: var(--red);
  color: var(--white);
  border-color: var(--ink);
}

.profile-widget__trigger.is-avatar:hover { background: var(--red-dark); }

.profile-widget__trigger svg { width: 18px; height: 18px; }

.profile-widget__menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 210px;
  background: var(--white);
  border: var(--border-width) solid var(--ink);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-pixel);
  padding: 10px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-widget__info {
  padding: 6px 8px 12px;
  border-bottom: 1.5px solid var(--gray-200);
  margin-bottom: 6px;
}

.profile-widget__info strong { display: block; font-size: 0.85rem; }
.profile-widget__info span { font-size: 0.75rem; color: var(--gray-600); }

.profile-widget__link {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 9px 8px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}

.profile-widget__link:hover { background: var(--gray-100); color: var(--red); }

@media (max-width: 760px) {
  .profile-widget__menu {
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    width: min(240px, calc(100vw - 48px));
  }
}

.login-fab-wrap {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 8px;
}

.login-fab {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.7rem;
  padding: 14px 22px;
  border-radius: var(--radius-pill);
  border: var(--border-width) solid var(--ink);
  background: var(--red);
  color: var(--white);
  box-shadow: var(--shadow-pixel-red);
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.login-fab:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--red-darker);
}

.login-fab-close {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  padding: 0;
}

@media (prefers-reduced-motion: reduce) {
  .login-fab:hover { transform: none; }
}

.login-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 26, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 400;
  padding: 20px;
}

.login-panel {
  position: relative;
  width: 100%;
  max-width: 380px;
  background: var(--white);
  border: var(--border-width) solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pixel);
  padding: 32px 26px 26px;
  max-height: 90vh;
  overflow-y: auto;
}

.login-panel__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  background: var(--white);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
}

.login-panel__title { font-size: 1rem; margin-bottom: 18px; }

.login-panel__oauth {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.login-panel__divider {
  text-align: center;
  font-size: 0.75rem;
  color: var(--gray-600);
  margin: 4px 0;
}

.login-panel__toggle {
  margin-top: 16px;
  font-size: 0.82rem;
  text-align: center;
  color: var(--gray-600);
}

.login-panel__toggle button {
  background: none;
  border: none;
  color: var(--red);
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  font-size: inherit;
  font-family: inherit;
}

.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  max-width: 640px;
  margin: 0 auto;
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  z-index: 350;
  box-shadow: var(--shadow-pixel);
}

.cookie-banner p { margin: 0; font-size: 0.8rem; flex: 1; min-width: 200px; }
