/* ============================================
   Otaku — Anime Portfolio  (Pure HTML/CSS)
   ============================================ */

:root {
  /* Colors */
  --background: #f7f8fb;
  --foreground: #181d2e;
  --card: #ffffff;
  --muted: #eef0f5;
  --muted-foreground: #6b7280;
  --border: #e4e7ee;
  --primary: #4b5cf5;
  --primary-glow: #8b5cf6;

  /* Effects */
  --radius: 1rem;
  --shadow-card: 0 4px 20px -4px rgba(24, 29, 46, 0.10), 0 2px 6px rgba(24, 29, 46, 0.05);
  --shadow-hover: 0 20px 40px -10px rgba(75, 92, 245, 0.28);
  --gradient-primary: linear-gradient(135deg, #4b5cf5, #8b5cf6);
  --gradient-hero:
    radial-gradient(ellipse at top, rgba(75, 92, 245, 0.12), transparent 60%),
    radial-gradient(ellipse at bottom right, rgba(139, 92, 246, 0.10), transparent 55%);
  --transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--background);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: relative;
  top: 0;
  z-index: 50;
  width: 100%;
  height: 85px;
  padding: 1rem;
  display: flex;
  justify-content: center;
  background: transparent;
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #1a1a1a;
  border-radius: 999px;
  padding: 0.35rem 0.35rem 0.35rem 0.5rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
  max-width: 700px;
  width: 100%;
}

.nav-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-logo svg {
  width: 18px;
  height: 18px;
  color: #1a1a1a;
}

.nav-links {
  display: flex;
  gap: 0.15rem;
  align-items: center;
  flex: 1;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
}

.nav-links a {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
}

.nav-links a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-links a.active {
  color: #fff;
  background: none;
  box-shadow: none;
}

.nav-email {
  margin-left: auto;
  padding: 0.5rem 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.8rem;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  transition: var(--transition);
}

.nav-email:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.08);
}

/* Mobile navbar tweaks */
@media (max-width: 600px) {
  .nav-inner {
    padding: 0.3rem;
    gap: 0.25rem;
  }
  .nav-links a {
    padding: 0.45rem 0.6rem;
    font-size: 0.78rem;
  }
  .nav-email {
    padding: 0.45rem 0.75rem;
    font-size: 0.72rem;
  }
  .nav-logo {
    width: 30px;
    height: 30px;
  }
  .nav-logo svg {
    width: 14px;
    height: 14px;
  }
}



/* ============================================
   HERO
   ============================================ */
.hero {
  background: var(--gradient-hero);
}

.hero-content {
  max-width: 700px;
  margin: 0 auto;
  padding: 1.5rem 1rem 0.5rem;
  text-align: center;
}

.hero h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.hero p {
  font-size: 0.95rem;
  color: var(--muted-foreground);
  max-width: 36rem;
  margin: 0 auto;
}

.hero-inner {
  max-width: 400px;
  margin: 0 auto;
  padding: 5rem 1rem;
  text-align: center;
}

@media (min-width: 768px) {
  .hero-content { padding: 2rem 1rem 0.75rem; }
  .hero h1 { font-size: 2.5rem; }
  .hero p { font-size: 1rem; }
  .hero-inner { padding: 7rem 1rem; }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted-foreground);
  margin-bottom: 1.5rem;
  animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ping {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin-bottom: 1.25rem;
  animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 80ms;
}

@media (min-width: 768px) {
  .hero-title { font-size: 3.75rem; }
}

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: 1rem;
  color: var(--muted-foreground);
  line-height: 1.6;
  max-width: 36rem;
  margin: 0 auto;
  animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 160ms;
}

@media (min-width: 768px) {
  .hero-sub { font-size: 1.125rem; }
}

/* ============================================
   SECTION
   ============================================ */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem;
}

@media (min-width: 768px) {
  .section { padding: 2rem 1rem 5rem; }
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2.5rem;
}

.eyebrow {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

@media (min-width: 768px) {
  .section-title { font-size: 2.25rem; }
}

.count {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  display: none;
}

@media (min-width: 640px) { .count { display: block; } }

/* ============================================
   GRID + CARD
   ============================================ */
.grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}

.card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.card:nth-child(1) { animation-delay: 0ms; }
.card:nth-child(2) { animation-delay: 80ms; }
.card:nth-child(3) { animation-delay: 160ms; }
.card:nth-child(4) { animation-delay: 240ms; }
.card:nth-child(5) { animation-delay: 320ms; }

.card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.card:hover .card-media img {
  transform: scale(1.05);
}

.card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(24, 29, 46, 0.7), rgba(24, 29, 46, 0.1) 60%, transparent);
  opacity: 0.9;
  pointer-events: none;
}

.chip {
  position: absolute;
  top: 0.75rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--foreground);
}

.chip-left { left: 0.75rem; }
.chip-right { right: 0.75rem; }

.chip svg {
  width: 12px;
  height: 12px;
  color: var(--primary);
}

.card-body {
  padding: 1.25rem;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.card-head h3 {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: break-word;
  word-break: break-word;
}

.card-head .year {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted-foreground);
  flex-shrink: 0;
  margin-top: 0.35rem;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  border-top: 1px solid var(--border);
  margin-top: 2.5rem;
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.page-numbers {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: center;
}

.page-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--foreground);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.page-btn:hover:not(:disabled):not(.active) {
  background: #f2f2f2;
  border-color: #1a1a1a;
  color: #1a1a1a;
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-btn.active {
  background: #1a1a1a;
  color: #fff;
  border-color: #1a1a1a;
  box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.35);
}

.page-btn.active:hover {
  background: #000;
  border-color: #000;
  color: #fff;
}

.page-info {
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-top: 1rem;
}

@media (max-width: 480px) {
  .page-btn { min-width: 36px; height: 36px; font-size: 0.8rem; padding: 0 0.5rem; }
}
