h1,
h2,
h3,
h4,
h5,
h6 {
    text-align: left;
    align-self: self-start;
    margin-bottom: 0.25em;
}

span,
p,
ul,
a
{
    text-align: start;
    align-self: self-start;
    margin-bottom: 1em;
}

p {
    margin-bottom: 0.5em;
}

p + h4,
p + h5,
p + h6 {
    margin-top: 2em;
}

h4 + h6 {
    margin-bottom: 0.5em;
}

h4:has(+h6)
{
    margin-bottom: 0.2em;
}

h1:has(a),
h2:has(a),
h3:has(a),
h4:has(a),
h5:has(a),
h6:has(a)
{
    margin-bottom: 2em;
}

img{
    border-radius: 1.5em;
}

.project-page-content > p:has(:not(.hr)) {
    align-self: self-start;
    text-align: start;
}

.project-page-header > div {
    align-self: center;
    text-align: center;
}

.project-page-header > div > p, h1 {
    align-self: center;
    text-align: center;
}

body{
    justify-content: center;
    align-items: center;
    text-align: center;
    display: inline;
    margin: 0px;
    padding: 0px;
    background-image: 
        linear-gradient(to right, var(--background-lighter) 1px, transparent 1px),
        linear-gradient(to bottom, var(--background-lighter) 1px, transparent 1px);
    background-size: 24px 24px;
    background-position: center;
    background-attachment: fixed;
}

img{
    align-self: center;
}

div:has(img)
{
    width: 90%;
    height:fit-content;
}


section
{
    align-items: center;
    align-self: center;
}

@media screen and (min-width: 800px) {
    .project-page-content
    {
        width: 720px;
        align-self: center;
        align-items: center;
        justify-content: center;
    }

    .project-page-header > div
    {
        width: 720px;
        align-self: center;
        align-items: center;
        justify-content: center;
    }
}

@media screen and (min-width: 920px) {
    .project-page-content
    {
        width: 880px;
        align-self: center;
        align-items: center;
        justify-content: center;
    }

    .project-page-header > div
    {
        width: 880px;
        align-self: center;
        align-items: center;
        justify-content: center;
    }
}


ul {
    width: 100%;
}

.project-page-header
{
    padding: 0.5rem 10% 2rem 10%;
    margin-bottom: 0px;
    background: linear-gradient(to bottom, 
        color-mix(in srgb, var(--background) 98%, var(--primary)),
        var(--background)
    );
    position: relative;
}

.project-page-header > div {
    position: relative;
    z-index: 1;
    margin-top: 0;
    padding-top: 0;
}

.project-page-header h1 {
    font-size: 2.5em;
    margin-bottom: 0.5em;
    background: linear-gradient(120deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.project-page-header h2 {
    opacity: 0.9;
    font-size: 1.5em;
    margin-bottom: 1em;
}

.project-page-header h3 {
    opacity: 0.95;
    font-size: 1.4em;
    margin-bottom: 0.5em;
    margin-top: 0.25em;
    font-style: italic;
    font-weight: 500;
    color: var(--primary);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.project-header-subtitle-accolade {
    opacity: 0.9;
    font-size: 1.1em;
    margin: 0.5em auto;
    padding: 0;
    font-style: italic;
    font-weight: 500;
    color: var(--primary);
    text-align: center;
    align-self: center;
}

.project-associated-link
{
    align-self: center;
    text-align: center;
    font-size: 1em;
}

@media screen and (min-width: 920px) {
    .project-associated-link
    {
        font-size: 2em;
    }
}

/* Enhanced content sections */
section {
    align-items: center;
    align-self: center;
    padding: 1rem;
    position: relative;
    background: color-mix(in srgb, var(--background) 98%, transparent);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    margin: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Content styling */
.project-page-content {
    padding: 2rem;
    background: var(--surface);
    border-radius: 16px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Enhanced image styling */
img {
    /*border-radius: 1.5em; */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Timeline styling */
.timeline-element {
    padding: 1.5rem;
    margin: 1rem 0;
    border-left: 3px solid var(--primary);
    background: var(--surface);
    border-radius: 0 16px 16px 0;
}

/* Enhanced typography */
h4 {
    color: var(--primary);
    font-size: 1.4em;
    margin-top: 2em;
    position: relative;
}

h4::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 2em;
    height: 2px;
    background: var(--primary);
    border-radius: 1px;
}

/* Link styling */
.project-associated-link a {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.75em 1.5em;
    background: color-mix(in srgb, var(--primary) 15%, transparent);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.project-associated-link a:hover {
    background: color-mix(in srgb, var(--primary) 25%, transparent);
    transform: translateY(-1px);
}

.project-associated-link i {
    font-size: 1.2em;
}

.project-associated-link {
    margin-bottom: 0em;
}

.project-header-associated-party {
    align-self: center;
}

/* Horizontal rule styling */
.hr {
    border-bottom: 2px solid color-mix(in srgb, var(--primary) 30%, transparent);
    width: 100%;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
}

.hr::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    to {
        left: 100%;
    }
}

/* Responsive adjustments */
@media screen and (min-width: 800px) {
    .project-page-content,
    .project-page-header > div {
        width: 720px;
        padding: 2rem;
    }
    
    .project-page-header h1 {
        font-size: 3em;
    }
}

@media screen and (min-width: 920px) {
    .project-page-content,
    .project-page-header > div {
        width: 880px;
        padding: 2.5rem;
    }
    
    .project-page-header h1 {
        font-size: 3.5em;
    }
    
    .project-associated-link {
        font-size: 1.5em;
    }
}

/* List styling */
ul {
    width: 100%;
    padding-left: 1.5em;
    margin: 1em 0;
}

ul li {
    margin: 0.5em 0;
    position: relative;
}

ul li::before {
    content: '•';
    color: var(--primary);
    position: absolute;
    left: -1em;
}

/* Code block styling if needed */
pre, code {
    background: var(--surface);
    border-radius: 8px;
    padding: 1em;
    margin: 1em 0;
    overflow-x: auto;
}

/* Blockquote styling */
blockquote {
    border-left: 4px solid var(--primary);
    margin: 1.5em 0;
    padding: 1em 1.5em;
    background: var(--surface);
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

/* Timeline date alignment for project cards (used on project pages too) */
.project-card-timeline-dates {
    display: flex;
    flex-direction: column;
    gap: 0.15em;
}

.project-card-date-entry {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.3em;
    width: 100%;
    align-items: center;
}

.project-card-date-entry h5 {
    margin: 0;
    white-space: nowrap;
}

.project-card-date-start {
    text-align: right;
}

.project-card-date-dash {
    text-align: center;
}

.project-card-date-end {
    text-align: left;
}

/* Remove previous .project-page-image-wrapper and .project-page-image styles */
.project-page-image-wrapper, .project-page-image {
  /* intentionally left blank to override */
}

/* Integrate nav buttons into header image */
.nav-section {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  padding: 1rem;
  margin: 0;
  box-shadow: none;
  border-radius: 0;
  height: auto !important;
  min-height: 0 !important;
  overflow: visible;
  backdrop-filter: none;
}

.nav-section .button-container {
  width: 100%;
  max-width: 400px;
  gap: 0.5rem;
  margin: 0 auto;
}

.nav-section .navbar-button {
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  backdrop-filter: blur(10px);
  border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
  transition: all 0.3s ease;
  border-radius: 12px;
  padding: 0.75em 1.5em;
}

.nav-section .navbar-button:hover {
  background: color-mix(in srgb, var(--surface) 95%, transparent);
  border-color: color-mix(in srgb, var(--primary) 40%, transparent);
  transform: translateY(-2px);
}

.nav-section .navbar-button:first-child {
  border-right: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
}

/* Full-bleed project header image, matching project card */
.project-card-image-wrapper {
  width: 100vw;
  margin: 0 auto;
  padding: 0;
  border-radius: 0;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.project-card-image-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(20px);
  transform: scale(1.2);
  z-index: 0;
}

.project-card-image {
  width: 100%;
  max-width: 1200px;
  height: 32vw;
  min-height: 180px;
  max-height: 400px;
  object-fit: cover;
  margin: 0;
  padding: 0;
  border-radius: 0;
  display: block;
  position: relative;
  z-index: 1;
}

@media (max-width: 600px) {
  .project-card-image-wrapper {
    width: 100vw;
    max-width: 100vw;
    margin: 0;
    border-radius: 0;
  }
  .project-card-image {
    width: 100vw;
    max-width: 100vw;
    border-radius: 0;
    height: 48vw;
    min-height: 120px;
    max-height: 240px;
  }
}

/* Highlight badge for project page */
.project-page-highlight-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: var(--background);
    padding: 0.5em 1em;
    border-radius: 0.5em;
    font-size: 0.9rem;
    font-weight: bold;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--secondary) 40%, transparent);
    margin-bottom: 1em;
}

.project-page-highlight-badge i {
    color: var(--background);
}