@keyframes floatCreature {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-5px) rotate(1deg); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

:root {
  --bg: #433f38;
  --bg-raised: #070707;
  --text: #f6f0f0;
  --text-dim: #d3d0c8;
  --heading: #d4ccb2;
  --border: #2a2a2a;
  --border-light: #222;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 20px;
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === HEADER === */
.header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 60px 20px 40px;
  border-bottom: 1px solid var(--border);
  position: relative;
  text-align: center;
}

.header::after {
  content: '· · ·';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg);
  padding: 0 16px;
  color: #666;
  letter-spacing: 6px;
}

.header-creature {
  animation: floatCreature 5s ease-in-out infinite;
  width: min(180px, 32vw);
  height: auto;
}

.header-creature-right {
  transform: scaleX(-1);
}

.site-title {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-style: italic;
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  color: var(--heading);
  letter-spacing: 1px;
  margin-top: 0;
  flex: 0 1 auto;
}

.site-title a {
  color: inherit;
  text-decoration: none;
}

@media (max-width: 640px) {
  .header {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .header-creature {
    width: min(160px, 50vw);
  }
}

/* === NAV === */
nav {
  display: flex;
  justify-content: center;
  gap: 36px;
  padding: 24px 20px;
  flex-wrap: wrap;
  animation: fadeIn 0.8s ease-out;
}

nav a {
  font-family: 'Fraunces', serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  padding: 4px 0;
  transition: color 0.25s;
  position: relative;
}

nav a:hover { color: var(--heading); }

nav a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--heading);
  transition: width 0.3s;
}

nav a:hover::after { width: 100%; }

/* === CONTAINER === */
.container {
  max-width: 700px;
  margin: 0 auto;
  padding: 48px 24px;
}

section {
  margin-bottom: 72px;
  animation: fadeIn 0.8s ease-out;
}

.section-title {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-style: italic;
  font-size: 1.4rem;
  color: var(--heading);
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.section-sub {
  margin-bottom: 28px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* === ABOUT === */
.about-text {
  font-size: 1.1rem;
  color: var(--text);
}

.about-text p { margin-bottom: 16px; }

.about-text a, .post-body a, .cv-detail a {
  color: var(--heading);
  text-decoration: none;
  border-bottom: 1px solid var(--text-dim);
  transition: border-color 0.25s;
}

.about-text a:hover, .post-body a:hover, .cv-detail a:hover {
  border-color: var(--heading);
}

.aside-note {
  margin: 24px 0;
  padding: 14px 18px;
  border-left: 2px solid #666;
  font-size: 1.05rem;
  color: var(--text);
  font-style: italic;
  background: var(--bg-raised);
}

/* === BLOG ENTRIES === */
.entry {
  padding: 24px 0;
  border-bottom: 1px solid var(--border-light);
  transition: all 0.25s;
}

.entry a {
  text-decoration: none;
  display: block;
}

.entry:hover {
  padding-left: 14px;
  border-left: 2px solid #666;
}

.entry-date {
  font-family: 'Fraunces', serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  text-transform: uppercase;
}

.entry-title {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--heading);
  margin: 6px 0 8px;
  transition: color 0.25s;
}

.entry:hover .entry-title { color: var(--text); }

.entry-excerpt {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.7;
}

.tag {
  display: inline-block;
  font-family: 'Fraunces', serif;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid #444;
  padding: 2px 8px;
  margin-top: 10px;
  margin-right: 5px;
}

/* === CV === */
.cv-block {
  margin-bottom: 32px;
}

.cv-block-title {
  font-family: 'Fraunces', serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.cv-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
}

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

.cv-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}

.cv-role {
  font-weight: 700;
  color: var(--heading);
  font-size: 1.05rem;
}

.cv-date {
  font-size: 0.9rem;
  color: var(--text-dim);
  font-style: italic;
  white-space: nowrap;
}

.cv-detail {
  font-size: 0.95rem;
  color: var(--text);
  margin-top: 4px;
  line-height: 1.65;
}

/* === LINKS === */
.links-list { list-style: none; }

.links-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}
.header img, .section-title img {
  mix-blend-mode: lighten;
}
.links-list a {
  color: var(--heading);
  text-decoration: none;
  font-family: 'Fraunces', serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: color 0.25s;
}

.links-list a:hover { text-decoration: underline; }

.links-list .desc {
  color: var(--text);
  font-size: 0.95rem;
  margin-left: 6px;
}

/* === POST PAGE === */
.post-header {
  margin-bottom: 40px;
}

.post-header .entry-title {
  font-size: 1.6rem;
  margin: 8px 0 12px;
}

.post-body {
  font-size: 1.1rem;
}

.post-body p {
  margin-bottom: 18px;
}

.post-body h2 {
  font-family: 'Fraunces', serif;
  font-size: 1.15rem;
  font-weight: 600;
  font-style: italic;
  color: var(--heading);
  letter-spacing: 0.5px;
  margin: 36px 0 14px;
}

.post-body code {
  background: var(--bg-raised);
  padding: 2px 6px;
  font-size: 0.92rem;
  color: var(--text);
}

.post-body pre {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  padding: 16px;
  overflow-x: auto;
  margin: 18px 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text);
}

.post-body blockquote {
  border-left: 2px solid #666;
  padding: 4px 18px;
  margin: 18px 0;
  color: var(--text);
  font-style: italic;
}

.back-link {
  display: inline-block;
  margin-top: 48px;
  font-family: 'Fraunces', serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.25s;
}

.back-link:hover { color: var(--heading); }

/* === FOOTER === */
footer {
  text-align: center;
  padding: 50px 20px 36px;
  border-top: 1px solid var(--border-light);
  color: var(--text-dim);
  font-size: 0.9rem;
}

footer .ornament {
  color: #555;
  margin-bottom: 10px;
  letter-spacing: 10px;
}

footer p { margin-bottom: 3px; }

::selection {
  background: #444;
  color: #fff;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #333; }
::-webkit-scrollbar-thumb:hover { background: #555; }

@media (max-width: 600px) {
  .header { padding: 40px 16px 32px; }
  nav { gap: 18px; }
  .container { padding: 32px 16px; }
  .cv-row { flex-direction: column; gap: 0; }
}