:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --border: #e5e5e5;
  --accent: #2563eb;
  --card-bg: #fafafa;
  --max-width: 960px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-header {
  padding: 64px 0 24px;
  text-align: center;
}

.back-link {
  display: inline-block;
  margin-bottom: 24px;
  font-size: 0.9rem;
  font-weight: 500;
}

.site-title {
  font-size: 2.5rem;
  margin: 0;
  letter-spacing: -0.02em;
}

.site-byline {
  margin: 16px 0 0;
  font-size: 1.15rem;
  font-weight: 500;
}

.site-tagline {
  color: var(--muted);
  margin: 4px 0 0;
  font-size: 1.1rem;
}

.site-nav {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  margin-bottom: 48px;
}

.site-nav .container {
  display: flex;
  gap: 24px;
  justify-content: center;
}

.site-nav a {
  color: var(--text);
  font-weight: 500;
}

.section-title {
  font-size: 1.5rem;
  margin-bottom: 24px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 80px;
}

.project-description {
  color: var(--muted);
  margin: 0 0 32px;
}

.animation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 80px;
}

.animation-card {
  display: block;
  padding: 16px 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.animation-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border-color: var(--accent);
  text-decoration: none;
}

.viewer-container {
  margin-bottom: 24px;
  overflow: hidden;
}

.viewer-pager {
  display: flex;
  justify-content: space-between;
  margin-bottom: 80px;
}

.viewer-pager .back-link {
  margin-bottom: 0;
}

.viewer-stage {
  transform-origin: top left;
}

.viewer-frame {
  display: block;
  box-sizing: content-box;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  text-decoration: none;
}

.card-image {
  aspect-ratio: 16 / 9;
  background: var(--border);
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 1.05rem;
  margin: 0 0 8px;
}

.card-description {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 16px;
  flex: 1;
}

.card-link {
  font-weight: 500;
  font-size: 0.9rem;
}

.contact {
  margin-bottom: 80px;
}

.social-links {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 16px;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}
