/* =========================================================
   Leyaja Akter — Personal Portfolio
   Dark mode | Responsive (mobile → tablet → desktop)
   ========================================================= */

/* ---------- CSS Variables (Dark Theme) ---------- */
:root {
  --bg: #0d0d0f;
  --bg-elevated: #16161a;
  --bg-card: #1c1c22;
  --border: #2a2a32;
  --text: #f2f2f5;
  --text-muted: #9a9aa8;
  --accent: #c9a227;          /* warm gold — literary feel */
  --accent-soft: rgba(201, 162, 39, 0.15);
  --accent-hover: #e0b93a;
  --radius: 14px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  --max: 1100px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
}

/* ---------- Layout Container ---------- */
.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

/* =========================================================
   HEADER / HERO
   ========================================================= */
.hero {
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(201, 162, 39, 0.12), transparent),
    var(--bg);
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
}

.avatar-wrap {
  position: relative;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, var(--accent), #5c4a1a);
  box-shadow: var(--shadow);
}

.avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--bg);
}

.hero-text h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}

.hero-text .role {
  color: var(--accent);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 14px;
}

.hero-meta {
  list-style: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hero-meta li strong {
  color: var(--text);
  font-weight: 600;
}

/* =========================================================
   SECTIONS
   ========================================================= */
section {
  padding: 48px 0;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: 0.03em;
}

.section-title span {
  color: var(--accent);
}

.section-sub {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 28px;
}

/* =========================================================
   BOOKS GRID — static cover images
   ========================================================= */
.books-grid {
  display: grid;
  /* Mobile default: 2 columns */
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.book-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.book-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.book-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: var(--bg-elevated);
}

.book-card .book-label {
  padding: 10px 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  border-top: 1px solid var(--border);
}

/* Showcase strip of full catalog image */
.books-showcase {
  margin-top: 28px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.books-showcase img {
  width: 100%;
  height: auto;
  opacity: 0.95;
}

/* =========================================================
   YOUTUBE VIDEO GRID — 2 columns on larger screens
   ========================================================= */
.video-grid {
  display: grid;
  /* Mobile: 1 column */
  grid-template-columns: 1fr;
  gap: 20px;
}

.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.video-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.video-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.video-card:hover .video-thumb img {
  transform: scale(1.04);
}

/* Play icon overlay */
.video-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  transition: background 0.2s;
}

.video-card:hover .video-thumb::after {
  background: rgba(0, 0, 0, 0.15);
}

.play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(201, 162, 39, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

.play-btn svg {
  width: 22px;
  height: 22px;
  fill: #111;
  margin-left: 3px;
}

.video-info {
  padding: 14px 16px;
}

.video-info h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}

.video-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* View All Videos button */
.view-all-wrap {
  text-align: center;
  margin-top: 32px;
}

.btn-view-all {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: var(--accent);
  color: #111 !important;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  box-shadow: 0 4px 18px rgba(201, 162, 39, 0.35);
}

.btn-view-all:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  color: #111 !important;
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  background: var(--bg-elevated);
}

.site-footer strong {
  color: var(--text);
}

/* =========================================================
   RESPONSIVE — Tablet (≥ 640px)
   Comment: 2-col videos, 3-col books, hero side-by-side start
   ========================================================= */
@media (min-width: 640px) {
  .hero-inner {
    flex-direction: row;
    text-align: left;
    gap: 36px;
    align-items: center;
  }

  .avatar-wrap {
    width: 180px;
    height: 180px;
    flex-shrink: 0;
  }

  .hero-text h1 {
    font-size: 2.25rem;
  }

  .books-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }

  .video-grid {
    /* Two-column video grid on tablet+ */
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
  }
}

/* =========================================================
   RESPONSIVE — Desktop (≥ 900px)
   Comment: fuller book grid, larger hero, more spacing
   ========================================================= */
@media (min-width: 900px) {
  .hero {
    padding: 64px 0 52px;
  }

  .avatar-wrap {
    width: 200px;
    height: 200px;
  }

  .hero-text h1 {
    font-size: 2.6rem;
  }

  .books-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }

  section {
    padding: 56px 0;
  }

  .section-title {
    font-size: 1.5rem;
  }
}

/* =========================================================
   RESPONSIVE — Large Desktop (≥ 1100px)
   Comment: 5-column book shelf matching catalog feel
   ========================================================= */
@media (min-width: 1100px) {
  .books-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* =========================================================
   Small phones (≤ 380px) — tighter padding
   ========================================================= */
@media (max-width: 380px) {
  .container {
    padding: 0 14px;
  }

  .hero-text h1 {
    font-size: 1.7rem;
  }

  .avatar-wrap {
    width: 130px;
    height: 130px;
  }

  .btn-view-all {
    width: 100%;
    justify-content: center;
  }
}

/* Prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
