.photography-shell {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

.photography-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 0 14px;
}

.photography-heading h1 {
  color: var(--text, #f2f2f2);
  font-size: 22px;
  font-weight: 600;
}

.photography-count {
  color: var(--muted, #a9a9a9);
  font-size: 13px;
}

.photography-grid {
  display: grid;
  grid-template-columns: repeat(var(--thumbnail-columns, 12), minmax(0, 1fr));
  gap: 8px;
  align-items: start;
}

.photo-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.1));
  border-radius: 8px;
  background: var(--surface, #171717);
  color: inherit;
  text-decoration: none;
}

.photo-card img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
}

.photo-card:hover,
.photo-card:focus-visible {
  border-color: var(--accent-line, rgba(237, 176, 73, 0.48));
  outline: none;
}

.photography-detail-shell {
  width: 100%;
}

.photo-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 16px;
  min-height: 520px;
}

.photo-detail-media {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.1));
  border-radius: 8px;
  background: var(--bg, #101010);
}

.photo-detail-media img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 190px);
  object-fit: contain;
  object-position: center;
}

.photo-detail-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.1));
  border-radius: 8px;
  background: var(--surface, #171717);
}

.photo-detail-info h1 {
  color: var(--text, #f2f2f2);
  font-size: 24px;
  font-weight: 600;
}

.photo-counter,
.photo-file-name {
  color: var(--muted, #a9a9a9);
  font-size: 14px;
  line-height: 1.5;
}

.photo-file-name {
  overflow-wrap: anywhere;
}

.photo-back-link,
.photo-action {
  color: var(--accent, #edb049);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.photo-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.photo-action {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid rgba(237, 176, 73, 0.32);
  border-radius: 8px;
  background: rgba(237, 176, 73, 0.08);
}

.photo-action:hover,
.photo-action:focus-visible {
  border-color: var(--accent-line, rgba(237, 176, 73, 0.48));
  background: var(--surface-raised, #202020);
}

.photo-action-secondary {
  margin-top: auto;
  color: var(--text, #f2f2f2);
  border-color: rgba(255, 255, 255, 0.12);
  background: var(--bg, #101010);
}

@media (max-width: 700px) {
  .photography-heading {
    padding-bottom: 12px;
  }

  .photography-heading h1 {
    font-size: 20px;
  }

  .photography-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .photo-detail {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .photo-detail-media img {
    height: auto;
    max-height: none;
  }

  .photo-detail-info {
    padding: 14px;
  }
}

body.photography-project-mode {
  height: 100vh;
  overflow: hidden;
  background: var(--bg, #101010);
}

body.photography-project-mode .main-container {
  display: block;
  height: 100vh;
  min-height: 100vh;
  background: var(--bg, #101010);
}

body.photography-project-mode .main-container > .top-container,
body.photography-project-mode .photography-heading {
  display: none;
}

body.photography-project-mode .bottom-container {
  height: 100vh;
  padding: 0;
  background: var(--bg, #101010);
}

body.photography-project-mode .photography-shell,
body.photography-project-mode #photography-gallery {
  width: 100%;
  max-width: none;
  height: 100%;
}

body.photography-project-mode .photo-detail {
  display: flex;
  width: 100%;
  height: 100vh;
  min-height: 0;
  gap: 0;
  background: var(--bg, #101010);
}

body.photography-project-mode .photo-detail-media {
  flex: 0 0 80%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--surface, #171717);
}

body.photography-project-mode .photo-detail-media img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100vh;
  padding: 0;
  margin: auto;
  object-fit: contain;
}

body.photography-project-mode .photo-detail-info {
  flex: 0 0 20%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  border: 0;
  border-radius: 0;
  padding: 10px;
  background: var(--bg, #101010);
}

body.photography-project-mode .project-description-container {
  padding: 10px;
}

body.photography-project-mode .project-description-container h1 {
  margin: 0 0 5px;
  color: var(--text, #d7d7d7);
  font-size: 16px;
  font-weight: 400;
}

body.photography-project-mode .project-description-container p,
body.photography-project-mode .stat {
  margin: 0;
  color: var(--muted, #a9a9a9);
  font-size: 14px;
  line-height: 1.4;
}

body.photography-project-mode h3 {
  padding-left: 10px;
  color: var(--text, #d7d7d7);
  font-size: 16px;
  font-weight: 100;
}

body.photography-project-mode hr {
  width: 100%;
  opacity: 0.05;
}

body.photography-project-mode .project-tags-container,
body.photography-project-mode .project-stats-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 10px;
}

body.photography-project-mode .project-stats-container {
  flex-direction: column;
  align-items: stretch;
}

body.photography-project-mode .software-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--surface, #171717);
  color: var(--text, #d7d7d7);
  font-size: 12px;
}

body.photography-project-mode .photo-back-link {
  padding: 10px;
}

body.photography-project-mode .photo-detail-actions {
  padding: 0 10px;
}

@media (max-width: 600px) {
  body.photography-project-mode {
    height: auto;
    overflow: auto;
  }

  body.photography-project-mode .main-container,
  body.photography-project-mode .bottom-container,
  body.photography-project-mode .photography-shell,
  body.photography-project-mode #photography-gallery {
    height: auto;
    min-height: 100vh;
  }

  body.photography-project-mode .photo-detail {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
  }

  body.photography-project-mode .photo-detail-media,
  body.photography-project-mode .photo-detail-info {
    flex: 1 1 auto;
    width: 100%;
    overflow: visible;
  }
}

.photo-nav-button {
  position: fixed;
  z-index: 1800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 50%;
  background-color: rgba(18, 18, 18, 0.52);
  color: var(--text, #f2f2f2);
  font-size: 24px;
  cursor: pointer;
  opacity: 1;
  box-sizing: border-box;
  background-clip: padding-box;
  box-shadow: 0 8px 24px var(--shadow-accent), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  -webkit-backdrop-filter: blur(8px) saturate(145%);
  backdrop-filter: blur(8px) saturate(145%);
  overflow: hidden;
  transition: opacity 180ms ease, color 180ms ease, background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.photo-nav-button:hover,
.photo-nav-button:focus-visible {
  opacity: 1;
  color: var(--accent, #edb049);
  background-color: rgba(24, 24, 24, 0.68);
  border-color: rgba(237, 176, 73, 0.36);
  box-shadow: 0 10px 28px var(--shadow-accent-strong), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.photo-nav-button:focus-visible {
  outline: 2px solid var(--accent, #edb049);
  outline-offset: 3px;
}

.photo-nav-prev:hover,
.photo-nav-prev:focus-visible,
.photo-nav-next:hover,
.photo-nav-next:focus-visible {
  transform: translateY(-50%) scale(1.05);
}

.photo-nav-back:hover,
.photo-nav-back:focus-visible {
  transform: scale(1.05);
}

.photo-nav-prev:active,
.photo-nav-next:active {
  transform: translateY(-50%) scale(0.96);
}

.photo-nav-back:active {
  transform: scale(0.96);
}

.photo-nav-button .material-symbols-outlined {
  font-size: 24px;
  line-height: 1;
  pointer-events: none;
}

.photo-nav-prev,
.photo-nav-next {
  top: 50%;
  transform: translateY(-50%);
}

.photo-nav-prev {
  left: 10px;
}

.photo-nav-next {
  right: calc(20% + 15px);
}

.photo-nav-back {
  top: 10px;
  left: 10px;
}

body.theme-light .photo-nav-button {
  background: rgba(255, 255, 255, 0.64);
  border-color: rgba(255, 255, 255, 0.86);
  color: #171717;
  box-shadow: 0 8px 24px var(--shadow-accent), inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

body.theme-light .photo-nav-button:hover,
body.theme-light .photo-nav-button:focus-visible {
  color: #a46312;
  background: rgba(255, 246, 229, 0.76);
  border-color: rgba(164, 99, 18, 0.48);
}

@media (max-width: 600px) {
  .photo-nav-prev {
    left: 10px;
  }

  .photo-nav-next {
    right: 10px;
  }
}


.photo-caption {
  margin: 0 0 12px;
  color: var(--text, #d7d7d7);
  font-size: 14px;
  line-height: 1.6;
}

body.theme-light .photo-caption {
  color: var(--muted);
}

.photography-collections {
  width: 100%;
  max-width: 900px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
  margin: 0 auto;
  padding: 34px 28px 56px;
  box-sizing: border-box;
}

.photo-collection-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.12));
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text, #d7d7d7);
  text-decoration: none;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.photo-collection-card::after {
  content: "";
  position: absolute;
  right: 24px;
  bottom: 24px;
  width: 34px;
  height: 34px;
  box-sizing: border-box;
  border: 3px solid rgba(237, 176, 73, 0.18);
  border-radius: 50%;
  opacity: 0.9;
  transform: rotate(-10deg);
  transition: border-color 160ms ease, transform 160ms ease;
}

.photo-collection-card:hover,
.photo-collection-card:focus-visible {
  border-color: var(--accent-line, rgba(237, 176, 73, 0.48));
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 18px 44px var(--shadow-accent-strong), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  backdrop-filter: blur(8px) saturate(120%);
  color: var(--text, #f2f2f2);
  outline: none;
}

.photo-collection-card:hover::after,
.photo-collection-card:focus-visible::after {
  border-color: rgba(237, 176, 73, 0.32);
  transform: rotate(-10deg) scale(1.04);
}

.photo-collection-cover {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface, #171717);
}

.photo-collection-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.photo-collection-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 22px 74px 22px 24px;
}

.photo-collection-meta,
.photography-entry-meta {
  color: var(--muted, #a9a9a9);
  font-size: 12px;
  line-height: 1.2;
  transition: color 160ms ease;
}

.photo-collection-card h2 {
  color: inherit;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.28;
  transition: color 160ms ease;
}

.photo-collection-card p {
  color: var(--muted, #b8b8b8);
  font-size: 14px;
  line-height: 1.65;
  transition: color 160ms ease;
}

.photo-collection-card:hover h2,
.photo-collection-card:focus-visible h2 {
  color: var(--accent, #edb049);
}

.photo-collection-card:hover .photo-collection-meta,
.photo-collection-card:focus-visible .photo-collection-meta,
.photo-collection-card:hover p,
.photo-collection-card:focus-visible p {
  color: var(--muted, #b8b8b8);
}

.photography-instagram-cta {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  margin-top: 10px;
  padding: 18px 4px 0;
  border-top: 1px solid var(--line, rgba(255, 255, 255, 0.12));
  color: var(--text, #d7d7d7);
  text-decoration: none;
}

.photography-instagram-icon {
  color: var(--muted, #a9a9a9);
  font-size: 26px;
  transition: color 160ms ease;
}

.photography-instagram-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.photography-instagram-copy strong {
  color: var(--text, #d7d7d7);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  transition: color 160ms ease;
}

.photography-instagram-copy span {
  color: var(--muted, #a9a9a9);
  font-size: 13px;
  line-height: 1.5;
}

.photography-instagram-arrow {
  color: var(--muted, #a9a9a9);
  font-size: 14px;
  transition: color 160ms ease, transform 160ms ease;
}

.photography-instagram-cta:hover .photography-instagram-icon,
.photography-instagram-cta:focus-visible .photography-instagram-icon,
.photography-instagram-cta:hover .photography-instagram-copy strong,
.photography-instagram-cta:focus-visible .photography-instagram-copy strong,
.photography-instagram-cta:hover .photography-instagram-arrow,
.photography-instagram-cta:focus-visible .photography-instagram-arrow {
  color: var(--accent, #edb049);
}

.photography-instagram-cta:hover .photography-instagram-arrow,
.photography-instagram-cta:focus-visible .photography-instagram-arrow {
  transform: translate(2px, -2px);
}

.photography-instagram-cta:focus-visible {
  border-radius: 4px;
  outline: 2px solid var(--accent, #edb049);
  outline-offset: 4px;
}

.photography-collection-view {
  display: grid;
  gap: 14px;
}

.photography-entry-intro {
  display: grid;
  gap: 7px;
  max-width: 760px;
}

.photography-entry-intro h1 {
  color: var(--text, #f2f2f2);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.25;
}

.photography-entry-context {
  color: var(--muted, #a9a9a9);
  font-size: 14px;
  line-height: 1.6;
}

.photography-collection-back {
  width: fit-content;
  color: var(--accent, #edb049);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.photography-collection-back:hover,
.photography-collection-back:focus-visible {
  color: var(--text, #f2f2f2);
  outline: none;
}

.photo-card {
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.photo-card:hover,
.photo-card:focus-visible {
  box-shadow: 0 10px 28px var(--shadow-accent);
}

body.theme-light .photo-collection-card {
  background: rgba(255, 255, 255, 0.64);
  border-color: var(--line, rgba(0, 0, 0, 0.12));
}

body.theme-light .photo-collection-cover {
  background: var(--surface-raised, #ffffff);
}

body.theme-light .photo-collection-card h2,
body.theme-light .photography-entry-intro h1 {
  color: var(--text, #171717);
}

body.theme-light .photo-collection-meta,
body.theme-light .photo-collection-card p,
body.theme-light .photography-entry-meta,
body.theme-light .photography-entry-context {
  color: var(--muted, #66615a);
}

body.theme-light .photography-collection-back {
  color: var(--accent, #a46312);
}

body.theme-light .photo-collection-card:hover,
body.theme-light .photo-collection-card:focus-visible {
  border-color: var(--line);
  background: #f7f7f8;
  box-shadow: 0 18px 44px var(--shadow-accent-soft);
}

body.theme-light .photo-collection-card:hover h2,
body.theme-light .photo-collection-card:focus-visible h2 {
  color: var(--accent, #a46312) !important;
}

body.theme-light .photo-collection-card:hover .photo-collection-meta,
body.theme-light .photo-collection-card:focus-visible .photo-collection-meta,
body.theme-light .photo-collection-card:hover p,
body.theme-light .photo-collection-card:focus-visible p {
  color: #676c75 !important;
}

@media (max-width: 700px) {
  .photography-collections {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 26px 14px 44px;
  }

  .photo-collection-card {
    min-height: 0;
    border-radius: 10px;
  }

  .photo-collection-card::after {
    right: 18px;
    bottom: 18px;
    width: 30px;
    height: 30px;
  }

  .photo-collection-body {
    padding: 18px 58px 18px 18px;
  }

  .photo-collection-card h2 {
    font-size: 20px;
  }

  .photography-entry-intro h1 {
    font-size: 20px;
  }

  .photography-instagram-cta {
    gap: 11px;
    min-height: 68px;
    margin-top: 6px;
    padding-top: 16px;
  }

  .photography-instagram-icon {
    font-size: 24px;
  }
}
