/* Theme variables - Default to system preference, fallback to dark */
:root {
  --bg-primary: #282c39;
  --bg-secondary: #1c1b22;
  --bg-hover: rgba(255, 255, 255, 0.1);
  --text-primary: #f3f4f6;
  --text-secondary: #d1d5db;
  --text-muted: #6b7280;
  --text-hover: #4f6276;
  --border-color: #3d4150;
  --shadow-color: rgba(0, 0, 0, 0.15);
  --shadow-hover: rgba(0, 0, 0, 0.25);
}

/* Light mode */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg-primary: #f9fafb;
    --bg-secondary: #ffffff;
    --bg-hover: rgba(0, 0, 0, 0.05);
    --text-primary: #282c39;
    --text-secondary: #3d4150;
    --text-muted: #6b7280;
    --text-hover: #1c1b22;
    --border-color: #e5e7eb;
    --shadow-color: rgba(0, 0, 0, 0.08);
    --shadow-hover: rgba(0, 0, 0, 0.12);
  }
}

/* Explicit theme overrides */
:root[data-theme="light"] {
  --bg-primary: #f9fafb;
  --bg-secondary: #ffffff;
  --bg-hover: rgba(0, 0, 0, 0.05);
  --text-primary: #282c39;
  --text-secondary: #3d4150;
  --text-muted: #6b7280;
  --text-hover: #1c1b22;
  --border-color: #e5e7eb;
  --shadow-color: rgba(0, 0, 0, 0.08);
  --shadow-hover: rgba(0, 0, 0, 0.12);
}

:root[data-theme="dark"] {
  --bg-primary: #282c39;
  --bg-secondary: #1c1b22;
  --bg-hover: rgba(255, 255, 255, 0.1);
  --text-primary: #f3f4f6;
  --text-secondary: #d1d5db;
  --text-muted: #6b7280;
  --text-hover: #4f6276;
  --border-color: #3d4150;
  --shadow-color: rgba(0, 0, 0, 0.15);
  --shadow-hover: rgba(0, 0, 0, 0.25);
}

.content {
  background-color: var(--bg-primary);
  width: 100%;
  max-width: 670px;
  margin: auto;
  color: var(--text-primary);
}

.title {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 2.3rem;
  font-weight: 600;
  margin: 0;
  padding: 0;
  padding-top: 2rem;
  padding-left: 2rem;
  margin-bottom: 1rem;
}

.name {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.8rem;
  margin: 0;
  padding: 0;
  margin-bottom: 1rem;
  font-weight: 600;
}

.body {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-top: 0;
  margin-bottom: 1.5rem;
  padding-top: 0;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Georgia", serif;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.ascii-art {
  font-family: 'SF Mono', 'Menlo', 'Consolas', 'Monaco', monospace;
  white-space: pre;
  font-size: 0.7rem;
  line-height: 1.2;
  margin-top: 32px;
  margin-bottom: 1.5rem;
  background-color: var(--bg-secondary);
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px var(--shadow-color);
  width: fit-content;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  overflow-x: hidden;
  overflow-y: hidden;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  box-sizing: border-box;
  position: relative;
}

.content {
  position: relative; /* Add this to allow absolute positioning of child elements */
}

.hero-section {
  margin-top: 3rem;
  padding-left: 2rem;
}

@media (max-width: 768px) {
  .container {
    padding: 0;
  }

  .content {
    max-width: 100%;
    width: 100%;
    padding: 15px;
    box-sizing: border-box;
  }

  .title {
    font-size: 2rem;
    padding-left: 0;
  }

  .hero-section {
    padding-left: 0;
    margin-top: 2.5rem;
  }

  .name {
    font-size: 1.5rem;
  }

  .body {
    font-size: 1rem;
    padding-bottom: 20px;
  }

  .ascii-art {
    font-size: 0.6rem;
    padding: 0.75rem;
    margin-bottom: 1rem;
  }

  .dog-photo-section {
    margin-left: 0;
    margin-right: 0;
  }

  .dog-photo {
    max-width: 100%;
  }

  .kiwi-photo-section {
    margin: 2rem auto 3rem;
    padding: 0 1rem;
  }

  .kiwi-photo {
    max-width: 80%;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0;
  }

  .content {
    width: 100%;
    max-width: 100%;
    padding: 15px;
    box-sizing: border-box;
  }

  .title {
    font-size: 1.8rem;
    padding-left: 0;
  }

  .hero-section {
    padding-left: 0;
    margin-top: 2rem;
  }

  .name {
    font-size: 1.4rem;
  }

  .body {
    font-size: 0.9rem;
    padding-bottom: 15px;
  }

  .ascii-art {
    font-size: 0.5rem;
    padding: 0.5rem;
    margin-bottom: 1rem;
  }

  .kiwi-photo-section {
    margin: 1.5rem auto 2.5rem;
    padding: 0 0.75rem;
  }

  .kiwi-photo {
    max-width: 80%;
  }
}

.intro-text {
  font-family: "Georgia", serif;
  margin: 0;
  line-height: 1.8;
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 600px;
}

.intro-text a {
  font-family: "Georgia", serif;
}

.coming-soon {
  margin: 0;
  font-size: 1rem;
  color: var(--text-muted);
  font-style: italic;
}

.dog-photo-section {
  margin-top: 2.5rem;
  margin-left: 2rem;
  margin-right: 2rem;
  margin-bottom: 4rem;
}

.dog-photo {
  display: block;
  width: 100%;
  max-width: 550px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dog-photo:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.kiwi-photo-section {
  margin: 3rem auto 4rem;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 2rem;
}

.kiwi-photo {
  display: block;
  width: 80%;
  max-width: 350px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.kiwi-photo:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}


p {
  margin: 0;
}

a {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-primary);
  transition: color 0.2s ease;
}

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

/* Header row - title and nav on same line */
.header-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 3rem;
}

/* Navigation */
.nav {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  display: flex;
  gap: 1.25rem;
  font-size: 1rem;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link.active {
  color: var(--text-primary);
  font-weight: 500;
}

/* Posts page styles */
.posts-list {
  margin-top: 3rem;
}

.post-item {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.post-item:last-child {
  border-bottom: none;
}

.post-link {
  text-decoration: none;
  display: block;
}

.post-link:hover .post-title {
  color: var(--text-muted);
}

.post-title {
  font-size: 1.2rem;
  margin: 0 0 0.5rem 0;
  color: var(--text-primary);
  transition: color 0.2s ease;
}

.post-date {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

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

@media (max-width: 480px) {
  .nav {
    gap: 1.5rem;
    font-size: 0.9rem;
  }
}

/* Theme Toggle Button */
.theme-toggle {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px var(--shadow-color);
  z-index: 100;
}

.theme-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--shadow-hover);
}

.theme-toggle:active {
  transform: translateY(0);
}

/* Sun icon */
.theme-icon {
  width: 20px;
  height: 20px;
  stroke: var(--text-primary);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s ease;
}

.theme-toggle:hover .theme-icon {
  transform: rotate(20deg);
}

/* ASCII Art embedded toggle variant */
.theme-toggle-ascii {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 0 0 10px var(--bg-secondary), 0 2px 6px var(--shadow-color);
  z-index: 10;
}

.theme-toggle-ascii .theme-icon {
  width: 16px;
  height: 16px;
  opacity: 0.7;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.theme-toggle-ascii:hover .theme-icon {
  opacity: 1;
  transform: rotate(20deg);
}

.theme-toggle-ascii:hover {
  box-shadow: 0 0 16px var(--text-primary);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 16px var(--text-primary);
  }
  50% {
    box-shadow: 0 0 24px var(--text-primary);
  }
}

@media (max-width: 768px) {
  .theme-toggle {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 37px;
    height: 37px;
  }
}

@media (max-width: 480px) {
  .theme-toggle {
    bottom: 1rem;
    right: 1rem;
    width: 33px;
    height: 33px;
  }

  .theme-icon {
    width: 18px;
    height: 18px;
  }

  .theme-toggle-ascii {
    top: 0.5rem;
    right: 0.5rem;
    width: 28px;
    height: 28px;
    box-shadow: 0 0 0 8px var(--bg-secondary), 0 2px 6px var(--shadow-color);
  }

  .theme-toggle-ascii:hover {
    box-shadow: 0 0 16px var(--text-primary);
  }

  .theme-toggle-ascii .theme-icon {
    width: 14px;
    height: 14px;
  }
}