/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Ibarra+Real+Nova:wght@400;500;600&family=Inter:wght@400;500;600&display=swap');

@view-transition {
  navigation: auto; /* enables cross-document transitions */
}
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: .24s;
  animation-timing-function: ease;
}

:root {
  --cream: #F2EEE6;
  --lilac: #F5DBFC;
  --gray: #666666;
  --black: #000000;
  --white: #FFFFFF;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--black);
  background: var(--cream);
}

/* Background for desktop */
@media (min-width: 768px) {
  body {
    background: url('./assets/Portfolio Background.png') center/cover fixed no-repeat;
  }
}

.main-panel {
  background: var(--cream);
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 3.25rem 2rem;
}

@media (min-width: 1024px) {
  .main-panel {
    height: auto;
    min-height: 0;
    margin-top: 12vh;
    margin-bottom: 12vh;
    border-radius: 0;
  }
}

/* Header */
header h1 {
  font-family: 'Ibarra Real Nova', serif;
  font-size: 2.5rem;
  line-height: 1.2;
}

header p {
  color: var(--gray);
  margin-top: 0.5rem;
}

/* Cards */
.cards {
  margin-top: 2.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.cards > p {
  font-family: 'Ibarra Real Nova', serif;
  font-size: 1.2rem;
  line-height: 1.25;
  margin-bottom: 0.4rem;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: none;
  border-bottom: 1px solid #ddd;
  text-decoration: none;
  color: inherit;
  transition: background 220ms ease, transform 280ms ease, box-shadow 280ms ease;
  padding: 1.5rem;
}

.card:hover {
  background: #f9f9f9;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.08);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.card h2 {
  font-family: 'Ibarra Real Nova', serif;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.card svg {
  flex-shrink: 0;
  margin-left: 1rem;
  transition: transform 240ms ease, opacity 240ms ease;
}

.card:hover svg {
  transform: translateX(4px);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 640ms cubic-bezier(0.22, 1, 0.36, 1), transform 640ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .card, .card svg, [data-reveal] {
    transition: none !important;
    transform: none !important;
  }

  [data-reveal] {
    opacity: 1 !important;
  }
}

.card p {
  color: var(--gray);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.card-chips span {
  background: var(--lilac);
  color: var(--black);
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
}

/* Footer links */
footer {
  margin-top: 2rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--black);
  text-decoration-line: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  font-weight: 500;
  transition: text-decoration-color 180ms ease, color 180ms ease;
}

.footer-links a::after {
  content: '↗';
  font-size: 0.8em;
  line-height: 1;
  transform: translateY(-0.02em);
  transition: transform 180ms ease;
}

.footer-links a:hover {
  text-decoration-color: currentColor;
}

.footer-links a:hover::after {
  transform: translate(1px, -1px);
}

/* See also */
.see-also {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.see-also img {
  height: 28px;
  width: auto;
}
