/* ===========================================================
   odd/kd — shared stylesheet
   Design tokens live at the top as CSS custom properties so
   colors / spacing can be tweaked in one place.
   =========================================================== */

:root {
  --color-bg: #f7e6ca;
  --color-text: #000000;
  --color-link: #3C3CE8;
  --color-link-hover: #FF4433;
  --color-muted: #6b6b6b;
  --color-border: #e7e3da;

  --page-width: 640px;
  --gap: 1.5rem;

  --font-body: "Sono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; }

/* ---------- base ---------- */
html {
  background: var(--color-bg);
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a:hover, a:focus {
  color: var(--color-link-hover);
}

/* ---------- layout ---------- */
.container {
  width: 100%;
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
  padding-top: 2rem;
}

/* ---------- header / nav ---------- */
.site-header {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.brand {
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.01em;
}

.brand a {
  color: var(--color-text);
}

.brand a:hover {
  color: var(--color-link-hover);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-border);
}

.site-nav a {
  font-size: 0.95rem;
}

.site-nav a[aria-current="page"] {
  color: var(--color-link-hover);
}

/* ---------- footer ---------- */
.site-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links {
  display: flex;
  gap: 1.1rem;
}

.footer-links a {
  font-size: 0.9rem;
}

.copyright {
  font-size: 0.78rem;
  color: var(--color-muted);
  margin: 0;
}

/* ---------- headings / text ---------- */
h1.page-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 1.75rem;
  color: var(--color-muted);
  text-transform: lowercase;
  letter-spacing: 0.02em;
}

p {
  margin: 0 0 1.1rem;
}

.lede {
  font-size: 1rem;
}

/* ---------- home page ---------- */
.home-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  max-width: 280px;
  overflow: hidden;
  border-radius: 6px;
  margin-bottom: 1.75rem;
  background: var(--color-border);
}

.home-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recent-posts {
  margin-top: 2.25rem;
}

.recent-posts h2 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: lowercase;
  color: var(--color-muted);
  margin: 0 0 0.9rem;
}

.post-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.post-list li {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  flex-wrap: wrap;
}

.post-list .post-date {
  font-size: 0.78rem;
  color: var(--color-muted);
  white-space: nowrap;
}

/* ---------- about (readme) page ---------- */
.accordion {
  margin-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.accordion-item {
  border-bottom: 1px solid var(--color-border);
}

.accordion-trigger {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 0.9rem 0;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.accordion-trigger:hover {
  color: var(--color-link-hover);
}

.accordion-trigger .icon {
  transition: transform 0.2s ease;
  color: var(--color-muted);
  font-size: 0.85rem;
}

.accordion-item[data-open="true"] .accordion-trigger .icon {
  transform: rotate(45deg);
}

.accordion-panel {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.25s ease;
}

.accordion-item[data-open="true"] .accordion-panel {
  max-height: 600px;
}

.accordion-panel-inner {
  padding: 0 0 1.1rem;
  color: var(--color-text);
}

/* ---------- inspiration (portfolio) page ---------- */
.photo-stage {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.photo-frame {
  width: 100%;
  aspect-ratio: 4 / 5; /* Ensures every card is the exact same height */
  border-radius: 8px;
  overflow: hidden;
  background: #f0f0f0; /* Optional placeholder color while loading */
  cursor: pointer;
  position: relative;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Fills the 4:5 box completely without stretching */
  object-position: center; /* Keeps the middle of the image focused */
  opacity: 0;
  transition: opacity 0.11s ease;
}

.photo-frame img.is-visible {
  opacity: 1;
}

.photo-hint {
  text-align: center;
  font-size: 0.78rem;
  color: var(--color-muted);
  margin-top: 0.9rem;
}
/* ---------- thoughts (blog) page ---------- */
.thoughts-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.thoughts-list li {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.thoughts-list .post-title a {
  font-size: 1rem;
}

.thoughts-list .post-excerpt {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin: 0;
}

.post-heading {
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
}

.post-meta {
  font-size: 0.78rem;
  color: var(--color-muted);
  margin-bottom: 1.75rem;
}

.post-body h1, .post-body h2, .post-body h3 {
  font-weight: 600;
  line-height: 1.35;
  margin: 1.6rem 0 0.75rem;
}

.post-body h1 { font-size: 1.2rem; }
.post-body h2 { font-size: 1.05rem; }
.post-body h3 { font-size: 0.95rem; }

.post-body ul, .post-body ol {
  margin: 0 0 1.1rem;
  padding-left: 1.4rem;
}

.post-body blockquote {
  margin: 0 0 1.1rem;
  padding-left: 1rem;
  border-left: 2px solid var(--color-border);
  color: var(--color-muted);
}

.post-body code {
  background: var(--color-border);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.85em;
}

.post-body pre {
  background: var(--color-border);
  padding: 0.9rem;
  border-radius: 6px;
  overflow-x: auto;
}

.post-body pre code {
  background: none;
  padding: 0;
}

.back-link {
  display: inline-block;
  margin-top: 2.5rem;
  font-size: 0.85rem;
}

/* ---------- responsive ---------- */
@media (max-width: 480px) {
  .container {
    padding: 1.75rem 1.1rem 2.5rem;
  }

  .site-nav {
    gap: 0.85rem;
  }
}
