:root {
  --bg: #0d0d0d;
  --bg-subtle: #111111;
  --text: #cccccc;
  --text-dim: #555555;
  --accent: #888888;
  --border: #1e1e1e;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

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

html { font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
}

a { color: var(--text); text-decoration: none; }
a:hover { color: #fff; }

.article__content a,
.photo-view__description a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--text-dim);
}

.article__content a:hover,
.photo-view__description a:hover {
  text-decoration-color: var(--text);
}

/* --- Navigation --- */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  background: linear-gradient(to bottom, rgba(13,13,13,0.95), transparent);
}

.site-name {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: #fff;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.site-nav ul a {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color 0.2s;
}

.site-nav ul a:hover,
.site-nav ul a.active { color: var(--text); }

/* --- Hero (home) --- */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13,13,13,0.7) 0%, transparent 50%);
}

.hero-caption {
  position: relative;
  padding: 2.5rem 2.5rem;
  max-width: 600px;
}

.hero-caption p {
  font-size: 0.9rem;
  color: rgba(204, 204, 204, 0.8);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.hero-caption a.view-photo {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}

.hero-caption a.view-photo:hover {
  color: #fff;
  border-color: #555;
}

/* --- Contact sheet (photos index) --- */
.contact-sheet {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 3px;
  background: #000;
  padding: 3.5rem 0 0;
  min-height: 100vh;
}

.contact-sheet__cell {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  display: block;
  background: #0a0a0a;
}

.contact-sheet__cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.contact-sheet__cell:hover img {
  opacity: 1;
}

@media (max-width: 768px) {
  .contact-sheet {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 2px;
  }
}

/* --- Photo single view --- */
.photo-view {
  display: flex;
  min-height: 100vh;
  padding-top: 4rem;
}

.photo-view__image-side {
  flex: 1.4;
  position: sticky;
  top: 4rem;
  height: calc(100vh - 4rem);
  overflow: hidden;
}

.photo-view__image-side img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #000;
}

.photo-view__text-side {
  flex: 1;
  padding: 3rem 2.5rem;
  overflow-y: auto;
  max-height: calc(100vh - 4rem);
  border-left: 1px solid var(--border);
}

.photo-view__description {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text);
  margin-bottom: 2rem;
}

.photo-view__description p {
  margin-bottom: 1.5rem;
}

/* EXIF metadata — styled as compact secondary info */
.photo-view__description ul {
  list-style: none;
  padding: 0.875rem 1rem;
  margin: 0.25rem 0 2rem;
  background: var(--bg-subtle);
  border-left: 2px solid var(--border);
}

.photo-view__description ul li {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.76rem;
  line-height: 1.7;
  color: var(--text-dim);
}

.photo-view__description ul li strong {
  color: var(--accent);
}

/* Model name labels e.g. *gpt-4o* on its own line */
.photo-view__description p:has(> em:only-child:not(:has(a))) {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}

.photo-view__description p:has(> em:only-child:not(:has(a))) em {
  font-style: normal;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: inline-block;
  padding: 0.2em 0.6em;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 2px;
}

.photo-view__meta {
  font-size: 0.75rem;
  color: var(--text-dim);
  line-height: 1.8;
  margin-bottom: 2.5rem;
}

.photo-view__meta strong { color: var(--accent); }

.photo-view__image-side a {
  display: block;
  width: 100%;
  height: 100%;
  cursor: zoom-in;
}

.photo-view__original {
  margin-bottom: 2rem;
}

.photo-view__original a {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  transition: color 0.2s;
}

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

.photo-nav {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

.photo-nav a { color: var(--text-dim); transition: color 0.2s; }
.photo-nav a:hover { color: var(--text); }

/* --- Blog / Projects list --- */
.post-list {
  max-width: 680px;
  margin: 0 auto;
  padding: 7rem 2rem 4rem;
}

.post-list__title {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 3rem;
}

.post-list__item {
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
}

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

.post-list__item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
}

.post-list__item-title {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text);
}

.post-list__item-date {
  font-size: 0.75rem;
  color: var(--text-dim);
  white-space: nowrap;
  margin-left: 2rem;
}

.post-list__item-excerpt {
  font-size: 0.875rem;
  color: var(--text-dim);
  line-height: 1.6;
}

/* --- Article (blog/project post) --- */
.article {
  max-width: 680px;
  margin: 0 auto;
  padding: 7rem 2rem 4rem;
}

.article__header { margin-bottom: 3rem; }

.article__title {
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.article__date {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.article__content {
  font-size: 0.975rem;
  line-height: 1.8;
  color: var(--text);
}

.article__content h1,
.article__content h2,
.article__content h3 {
  margin: 2rem 0 0.75rem;
  font-weight: 500;
  color: #e0e0e0;
}

.article__content p { margin-bottom: 1.25rem; }
.article__content code {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.1em 0.4em;
  font-size: 0.875em;
}

.article__content pre {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.25rem;
}

.article__content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.85rem;
}

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

/* --- Responsive --- */
@media (max-width: 768px) {
  /* Nav */
  .site-nav {
    padding: 1rem 1.25rem;
  }

  .site-nav ul {
    gap: 1.25rem;
  }

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

  /* Hero */
  .hero-caption {
    padding: 1.5rem 1.25rem;
  }

  .hero-caption p {
    font-size: 0.85rem;
  }

  /* Photo single view: stack vertically */
  .photo-view {
    flex-direction: column;
    min-height: auto;
    padding-top: 3.5rem;
  }

  .photo-view__image-side {
    position: static;
    height: auto;
    aspect-ratio: 4 / 3;
    flex: none;
    width: 100%;
  }

  .photo-view__image-side img {
    object-fit: contain;
    background: #000;
  }

  .photo-view__text-side {
    flex: none;
    width: 100%;
    max-height: none;
    overflow-y: visible;
    border-left: none;
    border-top: 1px solid var(--border);
    padding: 2.25rem 1.5rem 3rem;
  }

  .photo-view__description {
    font-size: 1.05rem;
    line-height: 1.95;
  }

  .photo-view__description p {
    margin-bottom: 1.75rem;
  }

  .photo-view__description ul li {
    font-size: 0.8rem;
    line-height: 1.8;
  }

  /* Photo nav — larger tap targets on mobile */
  .photo-nav {
    margin-top: 0.5rem;
  }

  .photo-nav a,
  .photo-nav span {
    display: inline-block;
    padding: 0.875rem 0;
    font-size: 0.85rem;
    min-height: 44px;
    line-height: 44px;
    padding-top: 0;
    padding-bottom: 0;
  }

  /* Post list */
  .post-list {
    padding: 5rem 1.25rem 3rem;
  }

  .post-list__item-header {
    flex-direction: column;
    gap: 0.25rem;
  }

  .post-list__item-date {
    margin-left: 0;
  }

  /* Article */
  .article {
    padding: 5rem 1.25rem 3rem;
  }

  .article__title {
    font-size: 1.3rem;
  }
}
