/* CSS */
:root {
  --lavender-159: #985F9F;
  --astral-lime: #AEDC03;
  --astral-lime-bright: #cdfc1e;
  --perigee: #4c32bd;
  --blue-58: #5893B9;
  --gray-c4: #C4C4C4;
  --prussian-blue: #003153;
  --marketing-gray-10: #f9f9fa;
  --marketing-gray-20: #ededf0;
  --marketing-gray-30: #cdcdd4;
  --marketing-gray-40: #b1b1bc;
  --marketing-gray-50: #9595a2;
  --marketing-gray-60: #7a7a8b;
  --marketing-gray-70: #5e5e72;
  --marketing-gray-80: #42425a;
  --marketing-gray-90: #1f2033;
  --ink-05: #393473;
  --ink-10: #342f6d;
  --ink-20: #312a64;
  --ink-30: #2e255d;
  --ink-40: #2b2156;
  --ink-50: #291d4f;
  --ink-60: #271948;
  --ink-70: #241541;
  --ink-80: #20123a;
  --ink-90: #1d1133;
  font-family: Metropolis, Inter, "Courier New", serif;
  font-feature-settings: "liga" 1, "calt" 1; /* fix for Chrome */
  font-size: 19.5px;
}

@supports (font-variation-settings: normal) {
  :root {
    font-family: Metropolis, InterVariable, serif;
  }
}
html,
body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: inherit;
}

.app {
  min-width: 100vw;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: inherit;
}

/* Core Themes */
.app.light {
  --color-primary: var(--perigee);
  --text-color: #333;
  --text-color-em: #242426;
  --background-color: #fff;
  --vertical-divider-color: var(--marketing-gray-60);
  background: #fff;
  background-attachment: fixed;
  background-position: center 0;
  color: var(--text-color);
}

.app.dark {
  --color-primary: var(--astral-lime);
  --text-color: var(--marketing-gray-30);
  --text-color-em: var(--marketing-gray-20);
  --text-color-subtle: var(--marketing-gray-50);
  --background-color: #000;
  --vertical-divider-color: var(--marketing-gray-50);
  background: #000;
  color: var(--text-color);
}

.app.dark.page-home {
  background: linear-gradient(to bottom, #010101 75%, var(--perigee) 100%);
  background-attachment: fixed;
  background-position: center 0;
}

/*
.app.dark::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: url('/static/img/noise.jpg') repeat;
  opacity: 0.15;
  mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
}
*/
.home-link:hover {
  text-decoration: none;
  border: none;
}

blockquote {
  border-left: 4px solid var(--lavender-159);
  margin-left: 0;
  margin-right: 0;
  padding-left: 1rem;
  color: var(--text-color-subtle);
  font-style: italic;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.041em;
}
table th, table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--marketing-gray-40);
}
table th {
  font-weight: 700;
  color: var(--text-color-em);
  background-color: rgba(0, 0, 0, 0.02);
  border-bottom: 2px solid var(--marketing-gray-50);
}
table thead td {
  color: var(--astral-lime);
  font-weight: 700;
}
.app.dark table th {
  background-color: rgba(255, 255, 255, 0.02);
}
table tbody tr {
  transition: background-color 0.2s ease;
}
table tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.02);
}
.app.dark table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.03);
}
table a {
  color: var(--blue-58);
  text-decoration: none;
}
table a:hover {
  text-decoration: underline;
  text-decoration-color: var(--lavender-159);
  text-underline-offset: 0.2em;
}

@media (max-width: 768px) {
  table {
    font-size: 14px;
  }
  table th, table td {
    padding: 0.5rem 0.75rem;
  }
}
p, li {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.041em;
  line-height: 1.5em;
}
p a, li a {
  color: var(--blue-58);
  text-decoration: none;
}
p a:hover, li a:hover {
  text-decoration: underline;
  text-decoration-color: var(--lavender-159);
  text-underline-offset: 0.2em;
}
p strong, p b, li strong, li b {
  font-weight: 700;
  color: var(--text-color-em);
}
p em, li em {
  font-style: normal;
  font-weight: 600;
  color: var(--astral-lime);
}

ul {
  padding: 0 1rem;
}

li {
  list-style: square;
  margin-bottom: 0.5em;
}

.container {
  width: 90vw;
  max-width: 1400px;
  min-width: 300px;
  min-height: 100vh;
  display: grid;
  grid-template-rows: 80px auto 60px;
  flex-direction: column;
  /*border: 1px solid cyan;*/
  box-sizing: border-box;
}

header {
  height: 120px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  /*border: 1px solid plum;*/
  box-sizing: border-box;
}

main {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 2rem 0rem;
  /*border: 1px solid red;*/
  color: var(--text-color);
  text-align: left;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.one-column {
  display: grid;
  grid-template-columns: 1fr;
  margin: auto;
  margin-top: 0;
  max-width: 900px;
  padding-top: 2rem;
}

.two-column {
  display: grid;
  grid-template-columns: 45% 55%;
  gap: 2rem;
}

footer {
  height: 60px;
  width: 100%;
  max-width: 100%;
  text-align: center;
  font-size: 0.65rem;
  color: var(--text-color);
  margin: 0;
  /*border: 1px solid yellow;*/
  position: static;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

header nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: inherit;
  border-bottom: none;
  padding: 1rem 0rem 1rem 0rem;
}

header nav .nav-left {
  display: flex;
  align-items: center;
  width: 50%;
}

header nav .nav-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  width: 50%;
  font-size: 0.8rem;
}

.hamburger-menu.mobile-nav {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1002;
  color: var(--astral-lime);
}

.app.light .hamburger-menu.mobile-nav {
  color: var(--text-color-em);
}

.hamburger-icon {
  display: block;
  width: 2rem;
  height: 0.1875rem;
  background: currentColor;
  position: relative;
  border-radius: 2px;
}

.hamburger-icon::before,
.hamburger-icon::after {
  content: "";
  display: block;
  width: 2rem;
  height: 0.1875rem;
  background: currentColor;
  position: absolute;
  left: 0;
  border-radius: 2px;
  transition: 0.2s;
}

.hamburger-icon::before {
  top: -0.59375rem;
}

.hamburger-icon::after {
  top: 0.59375rem;
}

.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1003;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 80vw;
  max-width: 320px;
  height: 100vh;
  background: var(--background-color);
  color: var(--drawer-fg, #fff);
  box-shadow: -2px 0 16px rgba(0, 0, 0, 0.18);
  z-index: 1005;
  display: flex;
  flex-direction: column;
  padding: 2rem 1.5rem 1.5rem 1.5rem;
  animation: drawer-slide-in 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.app.light .drawer {
  background: var(--marketing-gray-20);
  color: var(--text-color);
  border-left: 1px solid var(--marketing-gray-30);
}

.app.dark .drawer {
  background: var(--marketing-gray-90);
  color: var(--text-color);
  border-left: 1px solid var(--marketing-gray-80);
}

@keyframes drawer-slide-in {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}
.close-drawer {
  align-self: flex-end;
  background: none;
  border: none;
  font-size: 2rem;
  color: inherit;
  cursor: pointer;
  margin-bottom: 1.5rem;
}

.drawer .nav-link {
  margin: 0.5rem 0;
  font-size: 0.8rem;
  text-align: left;
  margin: 0;
}

.drawer .nav-link.color-mode-btn {
  align-items: center;
  justify-content: flex-start;
  text-align: left;
}
.drawer .nav-link.color-mode-btn span {
  display: flex;
  justify-content: center;
  color: var(--text-color-em);
  margin-left: 0.5rem;
  font-weight: 500;
  color: var(--text-color-em);
}

.drawer hr {
  margin: 1rem 0;
}

@media (max-width: 996px) {
  .nav-right.desktop-nav {
    display: none;
  }
  .hamburger-menu.mobile-nav {
    display: block;
  }
}
h1, h2, h3, h4, h5, h6 {
  padding-left: 0;
  padding-right: 0;
  font-family: Metropolis, Inter, serif;
  color: var(--blue-58);
  font-weight: 800;
}

h1 {
  color: var(--color-primary);
}

.app.light h1 {
  color: var(--color-primary);
}

h2 {
  color: var(--lavender-159);
}

.app.light h2 {
  color: #000;
  font-weight: 800;
}

nav .nav-left img {
  margin-right: 0.5rem;
}

.app h1.navbar-brand {
  position: relative;
  font-size: 2.7rem;
  font-weight: 600;
  color: var(--text-color-em);
  margin: 0;
  padding: 0 0.95rem 0.65rem 0;
  border-radius: 16px 0 16px 0;
  /* The original border-bottom is left for fallback/legacy */
  /*border-bottom: 3px solid var(--astral-lime);
  border-left: 3px solid transparent;
  border-left: 1px solid transparent;*/
}

h1.navbar-brand::after {
  /* Custom bottom border, shifted right and up */
  content: "";
  position: absolute;
  left: 0.9rem; /* shift right */
  bottom: 0.5rem; /* shift up */
  width: 85%;
  height: 0;
  border-bottom: 0.06em solid var(--astral-lime);
  border-left: 3px solid transparent;
  border-left: 1px solid transparent;
  border-radius: 0 0 16px 0;
  pointer-events: none;
}

nav a, .drawer .nav-link {
  color: var(--text-color-em);
  text-decoration: none;
  padding: 0.5rem 0.5rem;
  transition: all 0.15s ease;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

nav a:hover, .drawer .nav-link:hover {
  text-decoration: none;
  border-bottom: 2px solid var(--lavender-159);
}

.app.dark .color-mode-btn {
  color: #fff;
}

.color-mode-btn {
  --color-mode-btn-color: var(--text-color);
  background-color: transparent;
  border: none;
  color: var(--color-mode-btn-color);
  fill: var(--color-mode-btn-color);
  cursor: pointer;
  display: flex;
  justify-content: center;
}

.color-mode-btn:hover {
  fill: var(--lavender-159);
}

.app.dark .color-mode-btn:hover {
  fill: var(--astral-lime);
}

.profile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}
.profile img {
  max-width: 70%;
  max-height: 70%;
  height: auto;
  object-fit: contain;
  border-radius: 2px;
  margin: 0 2rem 0 0;
  margin-top: 0;
}
.profile p {
  padding-left: 0;
}

.feature {
  list-style: none;
}
.feature .date {
  display: inline-block;
  color: var(--text-color-subtle);
  font-weight: 500;
  font-size: 0.7rem;
  width: 14em;
  text-align: right;
  margin-right: 2em;
}
.feature a {
  font-weight: 700;
  font-size: 0.8rem;
}

.cds-btn {
  padding: 0.5rem 1rem;
}

.controls {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  width: 300px;
  min-height: 300px;
  max-height: 600px;
  border: 1px solid #592acb;
  border-radius: 4px;
  background-color: #fff;
  box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.2);
  overflow-y: auto;
  padding: 1rem;
}

/* Mobile Specific Styles */
@media (max-width: 996px) and (pointer: coarse) {
  :root {
    font-size: 32px;
  }
  .feature {
    list-style: none;
    margin-bottom: 1rem;
  }
  .feature .date {
    display: block;
    color: var(--text-color-subtle);
    font-weight: 500;
    font-size: 0.7rem;
    width: 14em;
    text-align: left;
    margin-right: 0;
    line-height: 0.9rem;
  }
  .feature a {
    font-weight: 700;
    font-size: 0.9rem;
  }
  .drawer .nav-link {
    font-size: 1.2rem;
  }
  p, li {
    font-size: 1rem;
    line-height: 1.7em;
  }
  h1 {
    font-size: 2rem;
    padding-top: 1rem;
  }
  h2 {
    font-size: 1.5rem;
    padding-top: 0.75rem;
  }
  h3 {
    font-size: 1.25rem;
    padding-top: 0.625rem;
  }
  .app h1.navbar-brand {
    font-size: 3rem;
    padding: 0 0.4em 0.2em 0;
  }
  main {
    grid-template-columns: 1fr;
    padding: 1rem 0.5rem;
  }
  .two-column {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .container {
    width: 98vw;
    max-width: 98vw;
    min-width: 0;
    padding: 0;
  }
  header nav {
    padding: 1rem 1rem 1rem 0.5rem;
  }
  .app.light {
    background: linear-gradient(50deg, transparent 90%, var(--astral-lime) 100%), #fff;
  }
  .profile {
    display: none;
    flex-direction: column;
    justify-content: left;
    align-items: left;
    min-height: 100%;
    text-align: left;
    align-content: left;
  }
  .profile img {
    max-width: 70%;
    max-height: 200px;
    height: auto;
    object-fit: contain;
    border-radius: 2px;
    margin: 0rem;
    margin-top: 0;
  }
  .profile p {
    padding-left: 2.5rem;
  }
  .photo-grid {
    column-count: 2;
    column-gap: 0.5rem;
  }
  .photo-item {
    margin-bottom: 0.5rem;
  }
}
/* Photography Page Styles */
.photography-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  width: 100%;
}
.photography-page h1 {
  margin-bottom: 2rem;
}
.photography-page .loading-message,
.photography-page .error-message {
  text-align: center;
  padding: 2rem;
}
.photography-page .error-message {
  color: #e74c3c;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: 1rem;
  grid-auto-flow: row dense;
}

.photo-item {
  display: block;
  width: 100%;
  grid-row: span 1;
}
.photo-item a {
  display: block;
  text-decoration: none;
  line-height: 0;
  height: 100%;
}
.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 4px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}
.photo-item img:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.photo-item-tall {
  grid-row: span 2;
}

/* Responsive grid columns */
@media (max-width: 1200px) {
  .photography-page {
    max-width: 90vw;
    padding: 0;
    padding-top: 2rem;
  }
  .photo-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 180px;
  }
}
@media (max-width: 768px) {
  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 160px;
    gap: 0.75rem;
  }
  .photography-page {
    padding: 1rem;
    max-width: 90vw;
  }
}
@media (max-width: 650px) {
  .photo-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 250px;
    gap: 0.5rem;
  }
  .photo-item-tall {
    grid-row: span 1;
  }
  .photography-page {
    padding: 0.5rem;
  }
}
