:root {
    /* Light Mode Colors */
    --bg-color-light: #FDFCFC;
    --text-color-light: #0c0e10;

    /* Dark Mode Colors */
    --bg-color-dark: #0C0E10;
    --text-color-dark: #FDFCFC;

    /* Default to Light Mode */
    --bg-color: var(--bg-color-light);
    --text-color: var(--text-color-light);

    /* Typography */
    --font-primary: 'IBM Plex Sans', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
    --font-condensed: 'IBM Plex Sans Condensed', sans-serif;

    /* Spacing */
    --spacing-sm: 0.75rem;     /* 12px */
    --spacing-md: 1.5rem;      /* 24px */
    --spacing-lg: 3rem;        /* 48px */
    --spacing-xxl: 6rem;       /* 96px */

    /* Font Sizes */
    --font-size-small: 0.688rem;   /* 11px */
    --font-size-medium: 2rem;     /* 32px */
    --font-size-large: 2.5rem;     /* 40px */

    /* Quote Colors */
    --quote-color-1: #F9FB00;
    --quote-color-2: #02FEFF;
    --quote-color-3: #01FF00;
    --quote-color-4: #FD00FB;
    --quote-color-5: #FB0102;
    --quote-color-6: #0301FC;
}
::selection {
    background-color: rgba(254, 71, 51, 1);
    color: black;
    display: inline;
}

/* Quote Color Classes */
.quote-color-1 { color: var(--quote-color-1); }
.quote-color-2 { color: var(--quote-color-2); }
.quote-color-3 { color: var(--quote-color-3); }
.quote-color-4 { color: var(--quote-color-4); }
.quote-color-5 { color: var(--quote-color-5); }
.quote-color-6 { color: var(--quote-color-6); }

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Container */
.container {
    width: 100%;
    padding: 0 2rem;
}

/* Typography */
a {
    text-decoration: underline;
    cursor: pointer;
    text-underline-offset: .25rem;
    color: var(--text-color);
    position: relative;
}
a:hover {
    background: rgba(255, 255, 255, 1);
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    padding: 2px 4px;
    margin: -2px -4px;
    color: rgba(0, 0, 0, 1);
    text-decoration: none;
}

ul {
    list-style-type: disc;
    padding-left: 1.25rem;
}

/* Hero Section */
.hero {
    position: relative;
    max-width: 100%;
    min-height: 31rem;
    margin-left: auto;
    margin-right: auto;
    
    /* Add flexbox for vertical centering in mobile view */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-slider {
    position: relative;
    width: 100%;
}

.hero-slide {
    display: none;
    position: relative;
    text-align: left;
    text-wrap: balance;
    font-family: var(--font-condensed);
    font-weight: 300;
    font-style: normal;
}

.hero-slide h2 {
    position: relative;
    font-size: var(--font-size-large);
    line-height: 1.05;
    margin-bottom: var(--spacing-lg);
    max-width: 480px;
    margin-left: 0;
    margin-right: 16px;
    font-weight: 400;
    text-wrap: balance;
    touch-action: manipulation;
    
    /* Disable text selection by default */
    -webkit-user-select: text;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    cursor: default;
}

/* Add this class programmatically when needed */
.selectable-text {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
    cursor: text;
}

.hero-slide.active {
    display: block;
}

.hero-slide.cycle-italic {
    font-style: italic;
}

.hero-slide-triggers {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 100%;
    display: flex;
    flex-direction: row;
}

.hero-slide-triggers .hero-slide-prev,
.hero-slide-triggers .hero-slide-next {
    width: 100%;
    height: 100%;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.hero-slide-triggers .hero-slide-prev {
    cursor: w-resize; /* Change cursor to indicate upward navigation */
}

.hero-slide-triggers .hero-slide-next {
    cursor: e-resize; /* Change cursor to indicate downward navigation */
}

/*
.hero-slide-triggers .hero-slide-prev:active,
.hero-slide-triggers .hero-slide-next:active {
    background-color: rgba(255, 255, 255, 0.05);
    outline: none;
}
*/

.hero-pagination {
    font-family: var(--font-mono);
    font-size: var(--font-size-small);
    text-transform: uppercase;
    letter-spacing: 0.125rem;
    font-weight: 600;
    font-style: normal;
    transform-origin: left top;
    margin-bottom: .75rem;
}
.triangle {
    position: absolute;
    right: 0px;
    bottom: var(--spacing-lg);
    width: 0;
    height: 0;
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
    border-top: 9px solid var(--text-color); /* Points down */
    border-bottom: none;
    display: none;
    }

/* Credits */
.credits {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.125rem;
    font-family: var(--font-mono);
    font-weight: 600;
    font-style: normal;
}

.credit-item {
    font-size: var(--font-size-small);
    text-transform: uppercase;
    letter-spacing: 0.125rem;
    text-align: left;
}

/* Design Examples */
.design-examples .grid {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 0.25rem;
    width: 100vw;
    margin-left: calc(-50vw + 50%);

}

.grid-item {
    margin: 0;
    padding: 0;
}

.grid-item img {
    width: 100%;
    aspect-ratio: 2 / 1;
    cursor: pointer;
    margin: 0;
    padding: 0;
    display: block; /* Prevent inline spacing issues */
}

/* Content Section */
.content .bio {
    max-width: 100%;
    margin: var(--spacing-xxl) auto;
    font-weight: 350;
    overflow: hidden;
}

.content .bio > * + * {
    margin-top: var(--spacing-md);
}

.content .bio ul {
    margin-top: var(--spacing-md);
}

.content .bio ul li + li {
    margin-top: var(--spacing-md);
}

.content .bio ul li {
    line-height: 1.5;
}

.intro-italic {
    font-style: italic;
    font-size: 1.25rem;
    line-height: 1.4;
    margin-bottom: var(--spacing-lg);
    text-wrap: pretty;
}

/* Fullscreen Overlay - adjusted for mobile */
.fullscreen-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 0;
}

.fullscreen-overlay.active {
    display: flex;
}

/* When overlay is active, lock body scroll */
body:has(.fullscreen-overlay.active) {
    overflow: hidden;
}

.fullscreen-overlay img {
    max-width: 100%; /* Allow images to use full width on mobile */
    max-height: 100%;
    width: auto;
    height: auto;
}

/* Image Overlay and Enlarged Image Styles */
.image-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 1);
  display: none;
  z-index: 1000;
  cursor: pointer;
}

.image-close-button {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 1rem;
  background: rgba(0, 0, 0, 0.2);
  z-index: 1003; /* Increased z-index to stay above everything */
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Keep button in fixed position regardless of zoom */
  touch-action: manipulation;
  /* Make sure it isn't impacted by transforms */
  transform: none;
  -webkit-transform: none;
  backdrop-filter: blur(16px);
}

/* Add wrapper style for pinch-zoom functionality */
.image-wrapper {
  position: fixed;
  z-index: 1001;
  /* Default transform settings will be set in JS */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

/* Container for the image to enable proper sizing */
.image-container {
  position: relative;
  will-change: transform;
}

.thumbnail-image {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  display: block;
  width: 100%;
  height: 100%;
  object-position: center;
}

.enlarged-image {
  position: fixed;
  z-index: 1002;
  margin: 0;
  padding: 0;
  transform-origin: center center;
  will-change: transform;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform-style: preserve-3d;
  touch-action: auto; /* Allow all touch events to pass through to wrapper */
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

/* Animation styles */
.animating-image {
    transform-origin: top left;
    object-position: center;
    pointer-events: none;
    will-change: transform;
}

.enlarged-image {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-style: preserve-3d;
    will-change: transform;
}

/* 404 Error Page Styles */
.error-container {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: left;
  text-align: left;
  text-wrap: balance;
  max-width: 37.5rem;
  margin: 0 auto;
}

.error-code {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.125rem;
  margin-bottom: var(--spacing-sm);
}

.error-title {
  font-family: var(--font-condensed);
  font-size: var(--font-size-large);
  line-height: 1.1;
  margin-bottom: var(--spacing-md);
  max-width: 30rem;
  text-wrap: balance;
  font-weight: 400;
}

.error-message {
  font-size: 1.25rem;
  font-style: italic;
  line-height: 1.4;
  margin-bottom: var(--spacing-lg);
  max-width: 28rem;
}

.error-actions {
  margin-top: var(--spacing-md);
  display: flex;
  flex-wrap: wrap;
  justify-content: left;
  gap: var(--spacing-md);
}

.error-actions a {
  display: inline-block;
}


/* Dark Mode Media Query */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: var(--bg-color-dark);
        --text-color: var(--text-color-dark);
    }
}

/* Responsive Breakpoints */
@media (min-width: 37.5rem) {
    .container {
        max-width: 56.25rem;
        margin: 0 auto;
        padding: 0 2rem;
    }

    .hero {
        padding: var(--spacing-xxl) 0;
        max-width: 37.5rem;
        margin-left: auto;
        margin-right: auto;
        min-height: auto;
        
        /* Remove vertical centering for larger screens */
        display: block;
        justify-content: normal;
    }

    .hero-slide h2 {
        font-size: var(--font-size-large);
        max-width: 30rem;
    }

    .hero-pagination {
        top: var(--spacing-xxl);
        position: absolute;
        right: 0px;
        margin-top: 4px;
        transform-origin: left top;

    }

    .triangle {
        right: 0px;
        bottom: var(--spacing-xxl);
        border-top: 3px solid transparent;
        border-bottom: 3px solid transparent;
        border-left: 9px solid var(--text-color); /* Points right */
        border-right: none;
        display: none;
    }

    .hero-slide-triggers {
        flex-direction: row; /* Restore horizontal layout on larger screens */
    }

    .hero-slide-triggers .hero-slide-prev,
    .hero-slide-triggers .hero-slide-next {
        width: 50%; /* Restore width-based division */
        height: 100%; /* Full height */
    }

    .hero-slide-triggers .hero-slide-prev {
        cursor: w-resize; /* Restore horizontal cursor */
    }

    .hero-slide-triggers .hero-slide-next {
        cursor: e-resize; /* Restore horizontal cursor */
    }

    .content .bio {
        max-width: 37.5rem;
        margin: var(--spacing-xxl) auto;
        padding: 0;
    }

    .design-examples .grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .fullscreen-overlay img {
        max-width: 95%; /* Use 95% on larger screens */
        max-height: 95%;
    }

    .error-container {
        justify-content: center;
        align-items: center;
        text-align: center;
      }
}

@media (min-width: 56.25rem) {
    .design-examples .grid {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(2, 1fr);
    }
}
