/* ============================================
   egeterzi.com — Clean Minimal Light Theme
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,300;0,400;0,700;1,400&display=swap');

/* --- CSS Variables --- */
:root {
  --color-primary: #FFFFFF;
  --color-secondary: #F5F5F5;
  --color-accent: #2F2A24;
  --color-text: #2F2A24;
  --color-text-muted: #ABBBC0;
  --color-border: rgba(171, 187, 192, 0.3);
  --color-card-bg: rgba(171, 187, 192, 0.08);
  --color-card-hover: rgba(171, 187, 192, 0.15);
  --color-overlay: rgba(255, 255, 255, 0.95);

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --max-width: 820px;
  --nav-height: 100px;
  --radius: 12px;
  --radius-sm: 8px;

  --transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-fast: 0.15s ease;
}

/* --- Dark Theme Variables --- */
body.dark-mode {
  --color-primary: #1A1A1A;
  --color-secondary: #242424;
  --color-accent: #dca34b; /* A typical orange-ish accent for dark mode, but we will keep as is or just change slightly. Let's stick with #F5A623 or #2F2A24 if it was accent? The original is #2F2A24. Wait, the user said original accent was the text. Let's use #E89A4D for orange if needed, or keep #2F2A24? Let's keep #ABBBC0 or #F5F5F5 for text. Actually, let's just make the text light. */
  --color-text: #E0E0E0;
  --color-text-muted: #A0A0A0;
  --color-border: rgba(255, 255, 255, 0.1);
  --color-card-bg: rgba(255, 255, 255, 0.05);
  --color-card-hover: rgba(255, 255, 255, 0.08);
  --color-overlay: rgba(26, 26, 26, 0.95);
}

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

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

body {
  font-family: var(--font-body);
  background-color: var(--color-primary);
  color: var(--color-text);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a:hover {
  color: #ABBBC0;
}

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

::selection {
  background: var(--color-text-muted);
  color: var(--color-primary);
}

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

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  background: var(--color-overlay);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--color-text);
  letter-spacing: -0.02em;
  transition: opacity var(--transition-fast);
}

.nav-logo:hover {
  opacity: 0.8;
  color: var(--color-text);
}

.nav-logo img {
  height: 144px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  position: relative;
  padding: 4px 0;
  transition: color var(--transition);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  border-radius: 2px;
  transition: width var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-text);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Theme Toggle Button */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 50%;
  transition: background-color var(--transition);
  margin-left: auto;
  margin-right: 20px;
}
.theme-toggle:hover {
  background-color: var(--color-card-bg);
}
.theme-toggle .moon-icon { display: none; }
body.dark-mode .theme-toggle .sun-icon { display: none; }
body.dark-mode .theme-toggle .moon-icon { display: block; }

/* Logos */
.logo-dark { display: none; }
body.dark-mode .logo-dark { display: block; }
body.dark-mode .logo-light { display: none; }

/* Hamburger Menu */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1100;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: var(--transition);
  transform-origin: center;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- Page Body Offset --- */
.page-body {
  padding-top: var(--nav-height);
}

/* --- Hero Section --- */
.hero {
  padding: 80px 0 60px;
  position: relative;
}

.hero-content {
  max-width: 600px;
}

.hero-greeting {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 16px;
  position: relative;
  padding-left: 24px;
}

.hero-greeting::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 16px;
  height: 2px;
  background: var(--color-accent);
  transform: translateY(-50%);
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--color-text);
  margin-bottom: 20px;
}

.hero h1 .accent {
  color: var(--color-accent);
}

.hero-description {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  line-height: 1.75;
  max-width: 520px;
}

/* --- Section Titles --- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.section-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-accent);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--transition);
}

.section-link:hover {
  gap: 8px;
}

.section-link::after {
  content: '→';
}

/* --- Blog Post Cards --- */
.posts-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.post-card {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  transition: background var(--transition), transform var(--transition);
  cursor: pointer;
  text-decoration: none;
  position: relative;
}

.post-card:hover {
  background: var(--color-card-bg);
  transform: translateX(4px);
}

.post-card:hover .post-title {
  color: var(--color-accent);
}

.post-date {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--color-text-muted);
  white-space: nowrap;
  min-width: 90px;
  font-variant-numeric: tabular-nums;
}

.post-info {
  flex: 1;
}

.post-title {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--color-text);
  line-height: 1.4;
  transition: color var(--transition);
  margin-bottom: 4px;
}

.post-excerpt {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-accent);
  background: rgba(171, 187, 192, 0.15);
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 6px;
}

/* --- Blog Page Specific --- */
.blog-section {
  padding: 60px 0 80px;
}

.blog-section .section-header {
  margin-bottom: 12px;
}

.posts-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.posts-grid .post-card {
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
  padding: 22px 20px;
}

.posts-grid .post-card:last-child {
  border-bottom: none;
}

.posts-grid .post-card:hover {
  border-radius: var(--radius-sm);
}

/* --- Latest Posts Section (Home) --- */
.latest-posts {
  padding: 20px 0 80px;
}

/* --- About Page --- */
.about-section {
  padding: 80px 0;
}

.about-header {
  text-align: center;
  margin-bottom: 48px;
}

.about-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 24px;
  border: 3px solid var(--color-accent);
  padding: 3px;
  background: var(--color-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.about-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.about-avatar .avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-accent), #ABBBC0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--color-primary);
}

.about-name {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.about-role {
  font-size: 1rem;
  color: var(--color-accent);
  font-weight: 500;
}

.about-content {
  max-width: 640px;
  margin: 0 auto;
}

.about-content h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 12px;
  margin-top: 36px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
}

.about-content h2:first-child {
  margin-top: 0;
}

.about-content p {
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.about-content ul {
  list-style: none;
  padding: 0;
}

.about-content ul li {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  padding: 8px 0;
  padding-left: 20px;
  position: relative;
  border-bottom: 1px solid rgba(171, 187, 192, 0.15);
}

.about-content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}

.about-content a {
  border-bottom: 1px solid rgba(171, 187, 192, 0.4);
  transition: border-color var(--transition);
}

.about-content a:hover {
  border-bottom-color: var(--color-accent);
}

/* --- Contact / Social Links --- */
.social-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 40px;
  flex-wrap: wrap;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition);
}

.social-link:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: rgba(171, 187, 192, 0.1);
}

.social-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* --- Newsletter Section --- */
.newsletter-section {
  padding: 40px 0 60px;
}

.newsletter-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 48px 40px;
  text-align: center;
  transition: border-color var(--transition);
}

.newsletter-card:hover {
  border-color: rgba(171, 187, 192, 0.5);
}

.newsletter-icon {
  font-size: 2.2rem;
  margin-bottom: 16px;
  opacity: 0.9;
}

.newsletter-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.newsletter-desc {
  font-size: 0.92rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: 440px;
  margin: 0 auto 24px;
}

.newsletter-form {
  max-width: 420px;
  margin: 0 auto;
}

.newsletter-input-group {
  display: flex;
  gap: 8px;
  background: var(--color-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 5px;
  transition: border-color var(--transition);
}

.newsletter-input-group:focus-within {
  border-color: var(--color-accent);
}

#newsletter-email {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 10px 14px;
}

#newsletter-email::placeholder {
  color: var(--color-text-muted);
  opacity: 0.6;
}

.newsletter-btn {
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 22px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition), transform var(--transition-fast);
}

.newsletter-btn:hover {
  background: #4a4540;
  transform: translateY(-1px);
}

.newsletter-btn:active {
  transform: translateY(0);
}

.newsletter-status {
  font-size: 0.82rem;
  margin-top: 12px;
  min-height: 20px;
  transition: opacity var(--transition);
}

.newsletter-status.success {
  color: #6ecf8e;
}

.newsletter-status.error {
  color: #e85c5c;
}

.newsletter-status.info {
  color: var(--color-text-muted);
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--color-border);
  padding: 32px 0;
  text-align: center;
}

.footer p {
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.footer a {
  color: var(--color-text-muted);
  border-bottom: 1px solid transparent;
}

.footer a:hover {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

/* --- Page Transitions / Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeInUp 0.5s ease forwards;
}

.fade-in-delay-1 {
  animation-delay: 0.1s;
}

.fade-in-delay-2 {
  animation-delay: 0.2s;
}

.fade-in-delay-3 {
  animation-delay: 0.3s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Stagger animation for posts */
.post-card {
  opacity: 0;
  animation: fadeInUp 0.4s ease forwards;
}

.post-card:nth-child(1) {
  animation-delay: 0.05s;
}

.post-card:nth-child(2) {
  animation-delay: 0.1s;
}

.post-card:nth-child(3) {
  animation-delay: 0.15s;
}

.post-card:nth-child(4) {
  animation-delay: 0.2s;
}

.post-card:nth-child(5) {
  animation-delay: 0.25s;
}

.post-card:nth-child(6) {
  animation-delay: 0.3s;
}

.post-card:nth-child(7) {
  animation-delay: 0.35s;
}

.post-card:nth-child(8) {
  animation-delay: 0.4s;
}

.post-card:nth-child(9) {
  animation-delay: 0.45s;
}

.post-card:nth-child(10) {
  animation-delay: 0.5s;
}

/* --- Post Detail Page --- */
.post-detail {
  padding: 60px 0 80px;
}

.post-detail-header {
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--color-border);
}

.post-detail-tag {
  margin-bottom: 16px;
}

.post-detail-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--color-text);
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.post-detail-meta {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.post-detail-body {
  max-width: 100%;
  font-family: 'Merriweather', serif;
  text-align: justify;
}

.post-detail-body p {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--color-text);
  margin-bottom: 20px;
}

.post-detail-body h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 40px 0 16px;
}

.post-detail-body h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 32px 0 12px;
}

.post-detail-body blockquote {
  border-left: 3px solid var(--color-accent);
  padding: 16px 24px;
  margin: 24px 0;
  background: var(--color-card-bg);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--color-text-muted);
}

.post-detail-body code {
  background: var(--color-secondary);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--color-accent);
}

.post-detail-body ul,
.post-detail-body ol {
  padding-left: 24px;
  margin-bottom: 20px;
}

.post-detail-body li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: 32px;
  transition: color var(--transition), gap var(--transition);
}

.back-link:hover {
  color: var(--color-accent);
  gap: 10px;
}

.back-link::before {
  content: '←';
}

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--color-text-muted);
}

.empty-state p {
  font-size: 1rem;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet (768px and below) */
@media (max-width: 768px) {
  :root {
    --nav-height: 64px;
  }

  .hero {
    padding: 60px 0 40px;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--color-primary);
    flex-direction: column;
    align-items: flex-start;
    padding: 100px 32px 40px;
    gap: 0;
    border-left: 1px solid var(--color-border);
    transition: right var(--transition);
    z-index: 1050;
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 14px 0;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--color-border);
  }

  .nav-links a::after {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1040;
  }

  .nav-overlay.open {
    display: block;
  }

  .post-card {
    flex-direction: column;
    gap: 6px;
    padding: 16px;
  }

  .post-date {
    font-size: 0.78rem;
    min-width: auto;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .about-section {
    padding: 60px 0;
  }

  .about-name {
    font-size: 1.6rem;
  }

  .post-detail-title {
    font-size: 1.7rem;
  }

  .social-links {
    flex-direction: column;
    align-items: center;
  }

  .social-link {
    width: 100%;
    max-width: 260px;
    justify-content: center;
  }

  .nav-logo img {
    height: 64px;
  }

  .newsletter-card {
    padding: 36px 24px;
  }

  .newsletter-input-group {
    flex-direction: column;
  }

  .newsletter-btn {
    width: 100%;
    padding: 12px;
  }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
  html {
    font-size: 15px;
  }

  .container {
    padding: 0 16px;
  }

  .hero {
    padding: 40px 0 32px;
  }

  .hero h1 {
    font-size: 1.85rem;
  }

  .hero-greeting {
    font-size: 0.78rem;
  }

  .hero-description {
    font-size: 0.92rem;
  }

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

  .post-title {
    font-size: 0.95rem;
  }

  .post-excerpt {
    font-size: 0.82rem;
    -webkit-line-clamp: 1;
  }

  .about-content h2 {
    font-size: 1.1rem;
  }

  .post-detail-title {
    font-size: 1.5rem;
  }

  .post-detail-body p {
    font-size: 0.95rem;
  }

  .latest-posts {
    padding: 16px 0 60px;
  }

  .blog-section {
    padding: 40px 0 60px;
  }

  .footer {
    padding: 24px 0;
  }
}

/* Large screens */
@media (min-width: 1200px) {
  :root {
    --max-width: 860px;
  }
}

/* Print styles */
@media print {

  .nav,
  .nav-toggle,
  .nav-overlay {
    display: none !important;
  }

  body {
    background: #fff;
    color: #2F2A24;
  }

  .page-body {
    padding-top: 0;
  }

  a {
    color: #2F2A24;
  }
}