:root {
  --bg: #fcfbfa;
  --text: #2c2c2c;
  --muted: #888888;
  --accent: #f0e6d2;
}

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

html, body {
  height: 100%;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-top: 64px;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* Header Styles */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 8%;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid rgba(0, 0, 0, 0.14);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  margin-left: 1.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  transition: opacity 0.2s, color 0.2s;
}

.nav-links a:hover {
  opacity: 0.85;
}

.nav-toggle {
  display: none;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

@media (max-width: 768px) {
  .header {
    padding: 1rem 1.5rem;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.98);
    border-top: 2px solid rgba(0, 0, 0, 0.12);
    padding: 1rem 0;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    margin-left: 0;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  }

  .nav-toggle {
    display: flex;
    flex-direction: column;
  }

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

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

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

/* Home Page - Hero */
.hero {
  height: 60vh;
  background: url('/ndws.jpg') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  position: relative;
  text-align: center;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.hero h1 {
  position: relative;
  z-index: 2;
  font-family: 'Playfair Display', serif;
  font-size: 3.5rem;
  line-height: 1.1;
  font-weight: 700;
}

/* Container & Grid */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.card {
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.card-body span {
  color: var(--muted);
  font-size: 0.85rem;
  display: block;
  margin-bottom: 0.5rem;
}

.card-body h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  margin: 1rem 0;
  font-weight: 700;
}

.card-body h2 a {
  color: var(--text);
  text-decoration: none;
}

.card-body h2 a:hover {
  color: var(--accent);
}

.card-body p {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.card-body a[href*="→"] {
  color: var(--text);
  font-weight: 600;
  transition: 0.2s;
}

.card-body a[href*="→"]:hover {
  opacity: 0.7;
}

/* About Page */
.spacer {
  height: 8vh;
  background: var(--text);
}

.about-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 3rem 2rem;
  background: #fff;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: center;
}

.profile-img img {
  width: 100%;
  max-width: 420px;
  border-radius: 20px;
  box-shadow: 20px 20px 0px var(--accent);
}

.profile-text {
  margin-top: 0;
}

.profile-text span {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.8rem;
}

.profile-text h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  margin: 1rem 0 2rem;
  line-height: 1.2;
}

.profile-text p {
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
  .spacer {
    height: 6vh;
  }

  .about-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2.5rem;
  }

  .profile-text {
    margin-top: 1.5rem;
  }

  .about-container {
    padding: 2rem 1.5rem;
  }

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

  .grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .about-container {
    margin: 0 auto;
    padding: 1.5rem 1rem;
  }

  .profile-text h1 {
    font-size: 1.8rem;
  }

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

/* Post Page */
.post {
  max-width: 800px;
  margin: 3rem auto;
  padding: 0 1.25rem;
}

.post header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.post time {
  color: var(--muted);
  font-size: 0.9rem;
}

.post section {
  margin-top: 2rem;
  line-height: 1.8;
  color: var(--text);
}

.post section p {
  margin-bottom: 1.5rem;
}

.post section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  margin: 2rem 0 1rem;
  color: var(--text);
}

.post section h3 {
  font-size: 1.2rem;
  margin: 1.5rem 0 0.75rem;
  color: var(--text);
}

.post section ul, .post section ol {
  margin: 1rem 0 1rem 1.5rem;
  color: var(--text);
}

.post section li {
  margin-bottom: 0.5rem;
}

.post section blockquote {
  border-left: 4px solid var(--accent);
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: var(--muted);
  font-style: italic;
}

.post section code {
  background: #f5f5f5;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 0.9em;
}

.post section pre {
  background: #f5f5f5;
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.post section pre code {
  background: transparent;
  padding: 0;
}

@media (max-width: 768px) {
  .post {
    margin: 2rem auto;
  }

  .post header h1 {
    font-size: 1.6rem;
  }
}

/* Footer */
.footer {
  background: transparent;
  padding: 4rem 8%;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
  margin-top: 6rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.socials a {
  color: var(--text);
  text-decoration: none;
  margin-left: 1.25rem;
  transition: 0.2s;
}

.socials a:hover {
  opacity: 0.8;
}

@media (max-width: 768px) {
  .footer {
    padding: 3rem 1.5rem;
  }

  .footer-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .socials a {
    margin-left: 0.75rem;
  }
}

/* Search Styles */
.search-container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1.25rem;
}

.search-box {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.3s;
}

.search-box:focus {
  outline: none;
  border-color: var(--accent);
}

.search-results {
  margin-top: 2rem;
}

.search-result {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.search-result h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.search-result a {
  color: var(--text);
  text-decoration: none;
}

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

.search-result p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.search-result-date {
  color: var(--muted);
  font-size: 0.85rem;
}
