:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --line: #e8e8e6;
  --text: #151515;
  --muted: #5f5f5b;
  --accent: #222222;
  --btn-primary-fg: #f7f7f5;
  --radius: 12px;
  --max: 1040px;
  --nav-bg: rgba(247, 247, 245, 0.85);
  --soft: #fcfcfb;
}

html[data-theme="dark"] {
  --bg: #111111;
  --surface: #181818;
  --line: #2a2a2a;
  --text: #f2f2f2;
  --muted: #b8b8b8;
  --accent: #f2f2f2;
  --btn-primary-fg: #111111;
  --nav-bg: rgba(17, 17, 17, 0.85);
  --soft: #141414;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.wrap { width: min(92%, var(--max)); margin: 0 auto; }
.chip {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--nav-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-row {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand { font-weight: 700; text-decoration: none; color: var(--text); }
.links { display: flex; gap: 24px; list-style: none; }
.links a { text-decoration: none; color: var(--muted); font-size: 14px; }
.links a:hover { color: var(--text); }
.menu-btn {
  display: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.theme-btn {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

section { padding: 84px 0; border-bottom: 1px solid var(--line); }
h1 { font-size: clamp(2.2rem, 6vw, 4rem); line-height: 1.05; margin: 18px 0; }
h2 { font-size: clamp(1.45rem, 3vw, 2.05rem); margin-bottom: 24px; }
p { color: var(--muted); }

.hero { padding-top: 96px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: start;
}
.lead { font-size: 1.05rem; max-width: 62ch; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.btn {
  display: inline-block;
  text-decoration: none;
  padding: 12px 18px;
  border-radius: 10px;
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--surface);
  font-weight: 600;
  font-size: 14px;
}
.btn.primary {
  background: var(--accent);
  color: var(--btn-primary-fg);
  border-color: var(--accent);
}
button.btn {
  font: inherit;
  cursor: pointer;
}
button.btn.primary {
  color: var(--btn-primary-fg);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.kpis {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 14px;
}
.kpi {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  background: var(--soft);
}
.kpi strong { font-size: 1.4rem; display: block; }
.kpi span { font-size: 13px; color: var(--muted); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.list { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  background: var(--soft);
}
.project h3 { margin-bottom: 8px; }
.project p { margin-bottom: 14px; }

.timeline { display: grid; gap: 12px; }
.row {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  background: var(--soft);
}
.row small { color: var(--muted); }
.hobby-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.hobby-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  background: var(--soft);
  text-align: center;
  font-weight: 500;
  color: var(--text);
}
a.hobby-item {
  text-decoration: none;
  display: block;
  transition: border-color 0.2s ease, background 0.2s ease;
}
a.hobby-item:hover {
  border-color: var(--text);
  background: var(--surface);
}

.sketches-hero { padding: 72px 0 32px; border-bottom: 1px solid var(--line); }
.sketches-hero h1 { margin-top: 12px; }
.sketches-lead { max-width: 52ch; margin-top: 8px; }
.sketches-gallery-section { padding: 48px 0 84px; border-bottom: none; }
.sketch-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.sketch-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.sketch-card:hover {
  border-color: var(--text);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}
html[data-theme="dark"] .sketch-card:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}
.sketch-card img {
  width: 100%;
  height: auto;
  display: block;
}
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }

.contact-grid { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 16px; }

.connect-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.connect-links li {
  margin: 0;
  padding: 0;
}
.connect-email {
  margin-top: 14px;
  font-size: 14px;
}
.connect-email a {
  color: var(--muted);
  text-decoration: none;
}
.connect-email a:hover {
  color: var(--text);
  text-decoration: underline;
}
.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.social-icon:hover {
  border-color: var(--text);
  background: var(--surface);
}
.social-icon svg {
  display: block;
}

input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  font: inherit;
  background: var(--surface);
  color: var(--text);
  margin-bottom: 10px;
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}
textarea { min-height: 130px; resize: vertical; }

footer { padding: 28px 0; }
footer p { font-size: 14px; }

.reveal { opacity: 0; transform: translateY(18px); transition: 0.45s ease; }
.reveal.show { opacity: 1; transform: none; }



@media (max-width: 860px) {
  .menu-btn { display: inline-block; }
  .theme-btn { margin-left: auto; }
  .links {
    display: none;
    position: absolute;
    top: 72px;
    right: 4%;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px;
    flex-direction: column;
    gap: 10px;
    min-width: 180px;
  }
  .links.open { display: flex; }
  .hero-grid, .grid-2, .contact-grid, .hobby-grid { grid-template-columns: 1fr; }
}

/* ── Anime page specific styles ── */
.anime-hero {
  padding: 72px 0 36px;
  border-bottom: 1px solid var(--line);
}
.anime-hero h1 { margin-top: 12px; }
.anime-lead { max-width: 56ch; margin-top: 8px; color: var(--muted); }

.anime-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.anime-stat {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  min-width: 120px;
}
.anime-stat strong { font-size: 1.5rem; color: var(--text); }
.anime-stat span { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* Filter bar */
.anime-filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 32px;
  align-items: center;
}
.filter-btn {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}
.filter-btn:hover { border-color: var(--text); color: var(--text); }
.filter-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Grid */
.anime-section { padding: 56px 0 84px; }
.anime-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

/* Card */
.anime-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
  cursor: default;
}
.anime-card:hover {
  border-color: var(--text);
  box-shadow: 0 10px 32px rgba(0,0,0,0.09);
  transform: translateY(-4px);
}
html[data-theme="dark"] .anime-card:hover {
  box-shadow: 0 10px 36px rgba(0,0,0,0.4);
}
.anime-poster {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  display: block;
  background: var(--soft);
}
.anime-poster-placeholder {
  width: 100%;
  aspect-ratio: 2/3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--soft);
  font-size: 3rem;
}
.anime-info {
  padding: 14px 14px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.anime-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.anime-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.anime-type {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.type-anime { background: rgba(99,102,241,0.12); color: #6366f1; }
.type-manga { background: rgba(234,88,12,0.12); color: #ea580c; }
html[data-theme="dark"] .type-anime { background: rgba(99,102,241,0.22); color: #a5b4fc; }
html[data-theme="dark"] .type-manga { background: rgba(234,88,12,0.22); color: #fb923c; }

.anime-rank {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.anime-genre {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.anime-status {
  margin-top: auto;
  padding-top: 8px;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
}
.anime-status::before {
  content: '';
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #22c55e;
}
.anime-status.ongoing::before { background: #3b82f6; }

@media (max-width: 600px) {
  .anime-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
  .anime-stats { gap: 12px; }
}
