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

/* Catppuccin Mocha */
:root {
  --base:     #1e1e2e;
  --mantle:   #181825;
  --crust:    #11111b;
  --text:     #cdd6f4;
  --subtext0: #a6adc8;
  --subtext1: #bac2de;
  --surface0: #313244;
  --surface1: #45475a;
  --blue:     #89b4fa;
  --mauve:    #cba6f7;
  --lavender: #b4befe;
}

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

html {
  font-size: 17px;
}

body {
  background-color: var(--base);
  color: var(--text);
  font-family: "JetBrains Mono", monospace;
  line-height: 1.7;
  padding: 0 1.5rem;
}

/* Two-column layout */
.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 3.5rem 0 4rem;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 0 3.5rem;
  align-items: start;
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 3.5rem;
}

.sidebar .site-name {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.sidebar .site-name a {
  color: var(--text);
  text-decoration: none;
}

.sidebar .site-name a:hover {
  color: var(--mauve);
  text-decoration: none;
}

nav {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

nav a {
  color: var(--subtext1);
  text-decoration: none;
  font-size: 0.88rem;
}

nav a:hover {
  color: var(--mauve);
  text-decoration: none;
}

nav a.active {
  color: var(--mauve);
}

/* Links (general) */
a {
  color: var(--mauve);
  text-decoration: none;
}

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

/* Main content */
main p {
  color: var(--subtext1);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

main p:last-child {
  margin-bottom: 0;
}

/* Home intro */
.intro {
  margin-bottom: 2.5rem;
}

.intro .tagline {
  color: var(--subtext0);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.intro .bio {
  color: var(--subtext1);
  font-size: 0.95rem;
}

/* Section blocks */
.section {
  margin-bottom: 2.5rem;
}

.section h2 {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--subtext0);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--surface0);
}

/* List styles */
ul.plain {
  list-style: none;
  padding: 0;
}

ul.plain li {
  color: var(--subtext1);
  padding: 0.25rem 0;
  font-size: 0.95rem;
}

ul.plain li a {
  color: var(--mauve);
}

ul.plain li span.meta {
  color: var(--surface1);
  font-size: 0.85rem;
  margin-left: 0.5rem;
}

/* Writing list */
.writing-list {
  list-style: none;
  padding: 0;
}

.writing-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--surface0);
  gap: 1rem;
}

.writing-list li:last-child {
  border-bottom: none;
}

.writing-list .title {
  color: var(--text);
  font-size: 0.95rem;
}

.writing-list .date {
  color: var(--subtext0);
  font-size: 0.85rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.empty-state {
  color: var(--subtext0);
  font-size: 0.9rem;
  font-style: italic;
}

/* Photo grid (masonry via CSS columns) */
.photo-grid {
  columns: 2;
  column-gap: 1rem;
}

.photo-item {
  break-inside: avoid;
  margin-bottom: 1rem;
}

.photo-item img {
  width: 100%;
  display: block;
  image-orientation: from-image;
}

.photo-section {
  margin-bottom: 2.5rem;
}

.photo-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--subtext0);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--surface0);
}

.photo-item {
  cursor: pointer;
}

.photo-item img:hover {
  opacity: 0.85;
  transition: opacity 0.15s ease;
}

@media (max-width: 480px) {
  .photo-grid {
    columns: 1;
  }
}

/* Lightbox */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(17, 17, 27, 0.95);
  z-index: 100;
  align-items: center;
  justify-content: center;
}

#lightbox.active {
  display: flex;
}

#lb-content {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#lb-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  image-orientation: from-image;
}

#lb-caption {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.75rem;
  font-size: 0.85rem;
}

#lb-location {
  color: var(--subtext1);
}

#lb-date {
  color: var(--subtext0);
}

#lb-close,
#lb-prev,
#lb-next {
  position: fixed;
  background: none;
  border: none;
  color: var(--subtext0);
  cursor: pointer;
  font-size: 1.25rem;
  padding: 0.5rem;
  line-height: 1;
}

#lb-close:hover,
#lb-prev:hover,
#lb-next:hover {
  color: var(--text);
}

#lb-close { top: 1.25rem; right: 1.5rem; }
#lb-prev  { left: 1.5rem; top: 50%; transform: translateY(-50%); font-size: 1.75rem; }
#lb-next  { right: 1.5rem; top: 50%; transform: translateY(-50%); font-size: 1.75rem; }

/* Social bar */
.social {
  margin-top: 1.75rem;
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.social a {
  color: var(--subtext0);
  display: flex;
  align-items: center;
  text-decoration: none;
}

.social a:hover {
  color: var(--mauve);
  text-decoration: none;
}

/* Footer */
.footer {
  grid-column: 1 / -1;
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--surface0);
  color: var(--surface1);
  font-size: 0.8rem;
}

/* Mobile */
@media (max-width: 620px) {
  .container {
    grid-template-columns: 1fr;
    gap: 2rem 0;
    padding: 2rem 0 3rem;
  }

  .sidebar {
    position: static;
  }

  .sidebar .site-name {
    margin-bottom: 0.75rem;
  }

  nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
  }
}
