/*
  style.css
  Main stylesheet for Le Nguyen Binh's English Learning Journey
  Author: Le Nguyen Binh
  Description: Minimalist, timeless, responsive, bilingual personal website
*/

/* 1. CSS Variables and Base Styles */
:root {
  --font-serif: 'Georgia', 'Times New Roman', Times, serif;
  --font-sans: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --color-bg: #faf9f6;
  --color-text: #222;
  --color-accent: #2a7ae2;
  --color-muted: #888;
  --header-height: 64px;
  --footer-height: 48px;
  --max-width: 900px;
  --border-radius: 10px;
  --transition: 0.2s cubic-bezier(.4,0,.2,1);
}

html {
  box-sizing: border-box;
  font-size: 18px;
  background: var(--color-bg);
  color: var(--color-text);
  scroll-behavior: smooth;
}
*, *:before, *:after {
  box-sizing: inherit;
}

body {
  margin: 0;
  font-family: var(--font-serif);
  background: var(--color-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 2. Header */
header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  background: #fff;
  border-bottom: 1px solid #eee;
  font-family: var(--font-sans);
  position: relative;
  z-index: 10;
}
.site-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--color-accent);
  text-decoration: none;
}
.lang-switch {
  font-size: 1rem;
  color: var(--color-muted);
  text-decoration: none;
  margin-left: 1rem;
  transition: color var(--transition);
}
.lang-switch.active, .lang-switch:hover {
  color: var(--color-accent);
}

/* Hamburger (Mobile Nav) */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  width: 32px;
  height: 32px;
  cursor: pointer;
  z-index: 20;
}
.hamburger span {
  height: 3px;
  width: 100%;
  background: var(--color-accent);
  margin: 4px 0;
  border-radius: 2px;
  transition: all var(--transition);
}

/* 3. Navigation */
nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
nav ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
nav ul li a {
  color: var(--color-text);
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: color var(--transition);
}
nav ul li a:hover {
  color: var(--color-accent);
}

/* Mobile Nav */
@media (max-width: 700px) {
  nav ul {
    position: absolute;
    top: var(--header-height);
    right: 0;
    background: #fff;
    flex-direction: column;
    width: 200px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.07);
    border-radius: 0 0 0 var(--border-radius);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: all var(--transition);
  }
  nav ul.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
  .hamburger {
    display: flex;
  }
}

/* 4. Main Content */
main {
  flex: 1 0 auto;
  max-width: var(--max-width);
  margin: 2rem auto 1rem auto;
  width: 100%;
  padding: 0 1rem;
}
.intro {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: var(--color-text);
}

/* Blog Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}
.blog-card {
  background: #fff;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition);
}
.blog-card:hover {
  box-shadow: 0 6px 24px rgba(42,122,226,0.10);
}
.blog-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: #eee;
}
.blog-card-content {
  padding: 1rem;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}
.blog-card-title {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: var(--color-accent);
}
.blog-card-desc {
  font-size: 1rem;
  color: var(--color-muted);
  flex: 1 1 auto;
}

/* 5. Blog Post Template */
.post-title {
  font-family: var(--font-sans);
  font-size: 2.2rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  color: var(--color-accent);
}
.post-date {
  font-size: 1rem;
  color: var(--color-muted);
  margin-bottom: 1.5rem;
  font-family: var(--font-sans);
}
.post-content {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--color-text);
  font-family: var(--font-serif);
}
.post-content img {
  max-width: 100%;
  border-radius: var(--border-radius);
  margin: 1.5rem 0;
  display: block;
}
/* Responsive YouTube Embed */
.responsive-video {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin: 2rem 0;
}
.responsive-video iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* 6. Footer */
footer {
  height: var(--footer-height);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-top: 1px solid #eee;
  font-size: 1rem;
  color: var(--color-muted);
  font-family: var(--font-sans);
  margin-top: 2rem;
}

/* 7. Utilities */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* 8. Responsive Tweaks */
@media (max-width: 500px) {
/* ... existing code ... */
  .blog-card-content {
    padding: 0.7rem;
  }
}

/* 9. About Page Styles */
.page-content {
    padding: 2rem 0;
}

.page-title {
    font-family: var(--font-sans);
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0 0 2rem 0;
    color: var(--color-accent);
    text-align: center;
}

.profile-card {
    text-align: center;
}

.profile-pic {
    border-radius: 50%;
    width: 150px;
    height: 150px;
    object-fit: cover;
    margin-bottom: 1.5rem;
    border: 3px solid #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.profile-info h2 {
    font-family: var(--font-sans);
    font-size: 1.8rem;
    margin: 0 0 0.5rem;
}

.profile-info .bio {
    font-style: italic;
    max-width: 600px;
    margin: 0 auto 1.5rem auto;
    color: var(--color-muted);
    font-size: 1.1rem;
}

.profile-info p {
    max-width: 600px;
    margin: 0 auto 1rem auto;
    line-height: 1.7;
    text-align: justify;
}

.social-links {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f0f0f0;
    color: var(--color-text);
    text-decoration: none;
    font-family: var(--font-sans);
    font-weight: 600;
    transition: all var(--transition);
}

.social-links a:hover {
    background-color: var(--color-accent);
    color: #fff;
    transform: translateY(-2px);
}
