/* Main stylesheet entry. Order matters: tokens, base, components. */
@import url("tokens.css");
@import url("base.css");
@import url("components.css");

/* Page specific tweaks live here if needed */

/* Decorative section divider used between content blocks */
.divider {
  display: block;
  margin: var(--space-xl) auto;
  width: min(20rem, 60%);
  color: var(--sky-deep);
  opacity: 0.5;
}

/* About page side-by-side layout: bio paragraphs left, credentials right.
   Stacks on mobile, splits on desktop. */
.about-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-l);
  align-items: start;
}

@media (min-width: 56rem) {
  .about-layout {
    grid-template-columns: minmax(0, 1fr) 18rem;
  }
}

/* Credentials block — compact, single column. */
.creds {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-s) var(--space-m);
  padding: var(--space-m);
  background: var(--cloud);
  border: 1px solid var(--rule);
  border-radius: var(--radius-m);
  margin: 0;
}

@media (min-width: 40rem) and (max-width: 56rem) {
  /* Two columns at tablet sizes before the side-by-side layout kicks in */
  .creds:not(.creds--stacked) {
    grid-template-columns: 1fr 1fr;
  }
}

.creds__item {
  display: flex;
  gap: var(--space-xs);
  align-items: flex-start;
  margin: 0;
}

.creds__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  flex: 0 0 auto;
  color: var(--sky-ink);
  background: var(--sky-pale);
  border-radius: 999px;
  padding: 0.3rem;
  margin-top: 1px;
}

.creds__icon svg {
  width: 100%;
  height: 100%;
}

.creds__body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.creds__label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-quiet);
  font-weight: 600;
  margin: 0;
  line-height: 1.3;
}

.creds__value {
  font-size: 0.875rem;
  color: var(--ink);
  margin: 0;
  line-height: 1.4;
}

.creds__institution {
  font-size: 0.875rem;
  color: var(--ink);
  margin: 0;
  line-height: 1.4;
}

/* About page highlight paragraph — gives one line some visual weight
   without breaking the calm reading flow */
.about-highlight {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink);
  font-style: italic;
  border-left: 2px solid var(--rose-deep);
  padding-left: var(--space-m);
  margin: var(--space-s) 0;
  max-width: var(--measure);
}

.pet-row__intro {
  color: var(--ink-soft);
  margin-bottom: var(--space-s);
}

/* Blog card grid — visually richer treatment for the blog listing */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-m);
  padding: 0;
  margin: 0;
}

@media (min-width: 48rem) {
  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 72rem) {
  .blog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.blog-card {
  position: relative;
  background: var(--cloud);
  border: 1px solid var(--rule);
  border-radius: var(--radius-l);
  padding: var(--space-m);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  height: 100%;
  isolation: isolate;
  transition: transform var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out);
}

.blog-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(201, 220, 235, 0.25), transparent 50%);
  opacity: 0;
  border-radius: inherit;
  transition: opacity var(--dur-base) var(--ease-out);
  z-index: -1;
}

.blog-card:hover,
.blog-card:focus-within {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}

.blog-card:hover::before,
.blog-card:focus-within::before {
  opacity: 1;
}

.blog-card__link {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  color: inherit;
  text-decoration: none;
  flex: 1 1 auto;
}

.blog-card__link:focus-visible {
  outline: none;
}

.blog-card:focus-within {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.blog-card__meta {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}

.blog-card__title {
  font-family: var(--font-body);
  font-size: var(--step-1);
  font-weight: 600;
  margin: 0;
  color: var(--ink);
  line-height: 1.3;
  letter-spacing: -0.005em;
  transition: color var(--dur-fast) var(--ease-out);
}

.blog-card:hover .blog-card__title {
  color: var(--rose-deep);
}

.blog-card__summary {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.875rem;
  line-height: 1.5;
}

.blog-card__read {
  font-size: 0.8125rem;
  color: var(--rose-deep);
  font-weight: 600;
  margin-top: auto;
}

.blog-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3xs);
  list-style: none;
  padding: 0;
  margin: var(--space-2xs) 0 0;
  position: relative;
  z-index: 1;
}

/* Post meta line on the blog post detail page */
.post-meta {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

/* Tag index page — list of all tags with counts */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  padding: 0;
  margin: 0;
}

.tag-list__item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  background: var(--cloud);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: var(--space-2xs) var(--space-s);
  color: var(--ink);
  text-decoration: none;
  font-size: var(--step--1);
  font-weight: 400;
  transition: background var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out);
}

.tag-list__item:hover {
  background: var(--sky-pale);
  border-color: var(--sky-deep);
  color: var(--ink);
}

.tag-list__count {
  font-size: 0.75rem;
  color: var(--ink-quiet);
  background: var(--limestone);
  padding: 1px 8px;
  border-radius: 999px;
  font-weight: 600;
}

/* Contact list */
.contact-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  font-size: var(--step-0);
}

/* Welcome / name change splash from the old cassandracardiff.com domain */
.welcome {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-l) var(--space-m);
  max-width: 40rem;
  margin-inline: auto;
  margin-block: 0;
  box-sizing: border-box;
  width: 100%;
}

.welcome > * {
  width: 100%;
  margin-inline: auto;
  max-width: none;
}

.welcome__eyebrow {
  margin-bottom: var(--space-l);
}

.welcome__line {
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-weight: 400;
  line-height: 1.3;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}

.welcome__line--old {
  margin-bottom: var(--space-s);
  opacity: 0;
  animation: welcomeAppear 600ms cubic-bezier(0.22, 1, 0.36, 1) 200ms forwards;
}

.welcome__line--new {
  margin: 0;
  opacity: 0;
  animation: welcomeAppear 600ms cubic-bezier(0.22, 1, 0.36, 1) 2400ms forwards;
}

.welcome__name {
  position: relative;
  display: inline-block;
}

.welcome__strike {
  position: relative;
  display: inline-block;
}

.welcome__strike::after {
  content: "";
  position: absolute;
  left: -2%;
  right: -2%;
  top: 55%;
  height: 2px;
  background: var(--rose-deep);
  transform-origin: left center;
  transform: scaleX(0);
  animation: welcomeStrike 700ms cubic-bezier(0.65, 0, 0.35, 1) 1500ms forwards;
}

.welcome__name--new {
  background-image: linear-gradient(transparent 70%, rgba(243, 222, 219, 0.7) 70%, rgba(243, 222, 219, 0.7) 92%, transparent 92%);
  background-repeat: no-repeat;
  background-size: 0% 100%;
  animation: welcomeUnderline 700ms cubic-bezier(0.65, 0, 0.35, 1) 3100ms forwards;
}

.welcome__heart {
  margin: var(--space-m) 0 var(--space-s);
  opacity: 0;
  animation: welcomeHeart 600ms cubic-bezier(0.34, 1.56, 0.64, 1) 3600ms forwards;
}

.welcome__sub {
  font-size: var(--step-0);
  color: var(--ink-soft);
  margin: 0 0 var(--space-l);
  opacity: 0;
  animation: welcomeAppear 600ms cubic-bezier(0.22, 1, 0.36, 1) 4000ms forwards;
}

.welcome__continue {
  margin: 0;
  opacity: 0;
  animation: welcomeAppear 600ms cubic-bezier(0.22, 1, 0.36, 1) 4400ms forwards;
}

@media (max-width: 36rem) {
  .welcome {
    padding: var(--space-m) var(--space-s);
    min-height: 80vh;
  }
  .welcome__eyebrow {
    margin-bottom: var(--space-m);
  }
  .welcome__line {
    font-size: var(--step-2);
    line-height: 1.35;
  }
  .welcome__heart {
    margin: var(--space-s) 0;
  }
}

.welcome__link {
  display: inline-block;
  padding: var(--space-s) var(--space-m);
  background: var(--ink);
  color: var(--cloud);
  text-decoration: none;
  border-radius: var(--radius-m);
  font-weight: 600;
  font-size: var(--step--1);
  letter-spacing: 0.02em;
  transition: background var(--dur-fast) var(--ease-out);
}

.welcome__link:hover {
  background: var(--ink-soft);
  color: var(--cloud);
}

@keyframes welcomeAppear {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes welcomeStrike {
  to { transform: scaleX(1); }
}

@keyframes welcomeUnderline {
  to { background-size: 100% 100%; }
}

@keyframes welcomeHeart {
  from { opacity: 0; transform: scale(0.6); }
  to { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .welcome__line--old,
  .welcome__line--new,
  .welcome__sub,
  .welcome__continue,
  .welcome__heart {
    opacity: 1;
    animation: none;
  }
  .welcome__strike::after { transform: scaleX(1); }
  .welcome__name--new { background-size: 100% 100%; }
}

/* Compact pet row for the About page */
.pet-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-l);
  align-items: flex-end;
  justify-content: flex-start;
  margin: 0;
}

.pet-row__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 0 1 7rem;
}

.pet-row__item svg {
  width: 100%;
  max-width: 6rem;
  height: auto;
}

.pet-row__name {
  font-family: var(--font-display);
  font-size: var(--step-0);
  color: var(--ink);
  margin-top: var(--space-3xs);
}

@media (prefers-reduced-motion: no-preference) {
  .pet-row__item svg {
    transition: transform var(--dur-base) var(--ease-out);
  }
  .pet-row__item:hover svg,
  .pet-row__item:focus-within svg {
    transform: translateY(-4px) rotate(-2deg);
  }
}
