/* IBM Plex Mono Import */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&display=swap');

/* Design Tokens */
:root {
  /* Colors */
  --bg: #FAF8F2;
  --ink: #0B0B0B;
  --muted: #9A9A9A;
  --line: #D9D4C9;
  --chip: #FFFFFF;
  
  /* Typography */
  --font: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-stretch: condensed;
  letter-spacing: -0.02em;
  
  /* Layout */
  --maxw: 1200px;
  --pad: 20px;
  --radius: 12px;
  --gap: 12px;
  --shadow: 0 1px 0 rgba(0,0,0,.08);
  
  /* Grid */
  --cols: 4;
}

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

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  letter-spacing: .01em;
  background-color: var(--bg);
  overflow-x: auto;
  overflow-y: visible;
}

p {
  line-height: 1.4em;
  letter-spacing: -0.02em;
  font-size: 14px;
  margin:0;
}

li {
  font-size: 12px;
  opacity: 0.5;
}

ul {
  font-style: italic;
  font-size: 12px;
}

/* Special styling for li elements in draggable containers */
.draggable-image li {
  opacity: 1;
  font-size: 10px;
  margin-left: 10px;
  word-break: break-all;
}

.draggable-image ul {
  opacity: 1;
  font-size: 10px;
  margin-left: 10px;
  text-transform: uppercase;
}

/* Image Carousel Styles */
.image-carousel {
  position: relative;
  width: 600px;
  height: 500px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 
    0 2px 8px rgba(0,0,0,0.1),
    0 1px 3px rgba(0,0,0,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 4px;
  cursor: grab;
  transition: all 0.1s ease;
  transform-origin: center;
}

.image-carousel:hover {
  transform: scale(1.05) rotate(1deg);
  box-shadow: 
    0 4px 16px rgba(0,0,0,0.15),
    0 2px 8px rgba(0,0,0,0.1);
  z-index: 10;
}

.image-carousel:active {
  cursor: grabbing;
  transform: scale(1.1) rotate(2deg);
  box-shadow: 
    0 8px 24px rgba(0,0,0,0.2),
    0 4px 12px rgba(0,0,0,0.15);
  z-index: 100;
}

.image-carousel.dragging {
  opacity: 0.8;
  transform: scale(1.1) rotate(3deg);
  z-index: 1000;
  pointer-events: none;
  cursor: grabbing;
}

.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: transparent;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 24px;
  font-weight: bold;
  transition: all 0.2s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}

.nav-btn:hover {
  transform: translateY(-50%) scale(1.2);
  color: blue;
}

.prev-btn {
  left: -60px;
}

.next-btn {
  right: -60px;
}

.slide-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 4px;
}

.slide {
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  transition: opacity 0.3s ease;
  display: none;
}

.slide.active {
  display: block;
}

.slide-counter {
  font-size: 10px;
  margin: 8px 0 0 10px;
  color: var(--muted);
}

/* Carousel Modal Styles */
.carousel-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 3000;
  align-items: center;
  justify-content: center;
}

.carousel-modal.open {
  display: flex;
}

.carousel-modal-content {
  position: relative;
  background: white;
  border-radius: 12px;
  padding: 20px;
  max-width: 90vw;
  max-height: 90vh;
  transform: scale(0.8);
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  width: 800px;
  height: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.carousel-modal.open .carousel-modal-content {
  transform: scale(1);
  opacity: 1;
}

.carousel-slide-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-slide {
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  transition: opacity 0.3s ease;
  display: none;
}

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

.carousel-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(0,0,0,0.1);
  padding: 12px 16px;
  cursor: pointer;
  border-radius: 50%;
  font-size: 20px;
  font-weight: bold;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}

.carousel-nav-btn:hover {
  background: rgba(255,255,255,1);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.carousel-prev-btn {
  left: 20px;
}

.carousel-next-btn {
  right: 20px;
}

.carousel-slide-counter {
  font-size: 14px;
  margin: 15px 0 0 0;
  color: var(--muted);
  text-align: center;
}

/* Sketch Modal Styles */
.sketch-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 3000;
  align-items: center;
  justify-content: center;
}

.sketch-modal.open {
  display: flex;
}

.sketch-modal-content {
  position: relative;
  background: white;
  border-radius: 12px;
  padding: 20px;
  max-width: 90vw;
  max-height: 90vh;
  transform: scale(0.8);
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.sketch-modal.open .sketch-modal-content {
  transform: scale(1);
  opacity: 1;
}

.sketch-slide-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 8px;
}

.sketch-slide {
  display: none;
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
}

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

.sketch-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  color: var(--ink);
  transition: all 0.2s ease;
  z-index: 10;
}

.sketch-prev-btn {
  left: 10px;
}

.sketch-next-btn {
  right: 10px;
}

.sketch-nav-btn:hover {
  background: white;
  transform: translateY(-50%) scale(1.1);
}

.sketch-slide-counter {
  font-size: 14px;
  margin: 15px 0 0 0;
  color: var(--muted);
  text-align: center;
}

.sketch-modal.open {
  display: flex;
}

.sketch-modal-content {
  position: relative;
  background: white;
  border-radius: 12px;
  padding: 20px;
  max-width: 90vw;
  max-height: 90vh;
  transform: scale(0.8);
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  width: 800px;
  height: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.sketch-modal.open .sketch-modal-content {
  transform: scale(1);
  opacity: 1;
}

.sketch-slide-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sketch-slide {
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  transition: opacity 0.3s ease;
  display: none;
}

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

.sketch-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(0,0,0,0.1);
  padding: 12px 16px;
  cursor: pointer;
  border-radius: 50%;
  font-size: 20px;
  font-weight: bold;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}

.sketch-nav-btn:hover {
  background: rgba(255,255,255,1);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.sketch-prev-btn {
  left: 20px;
}

.sketch-next-btn {
  right: 20px;
}

/* Grid Paper Background */
.grid-paper {
  background-color: var(--bg);
  background-image: radial-gradient(circle, var(--line) 1px, transparent 1px);
  background-size: 18px 18px;
  background-position: 0 0;
  min-height: 100vh;
}

/* Container */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--pad);
  display: flex;
  gap: 2rem;
  min-height: 100vh;
}

/* Special layout for images page */
.container.images-layout {
  max-width: none;
  margin: 0;
  padding: 0;
  display: block;
}

.container.images-layout .main-content {
  margin-left: 160px;
  padding: 20px;
}

/* Typography */
h1 {
  font-family: "Times New Roman", Times, serif;
  font-stretch: expanded;
  transform: scaleY(1.3);
  letter-spacing: -0.02em;
  font-family: times new roman;
  font-size: 50px;
  line-height: 1.2;
  font-weight: 400;
}

h2 {
  font-size: 20px;
  line-height: 1.3;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: -0.05em;
}

h3 {
  text-transform: uppercase;
  text-decoration: underline;
  font-size: 1em;
  font-weight: 500;
  letter-spacing: -0.05em;
  margin: 0;
  padding: 0;
  display: inline;
  line-height: 1;
}

.micro {
  font-size: 12px;
}

/* Links */
a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
color: blue;
transform: skew(-15deg);
}

/* Buttons & Inputs */
button, input, select {
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid #CFC9BC;
  border-radius: 8px;
  padding: 8px 12px;
}

button:hover {
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s ease;
}

button:active {
  transform: translateY(1px);
}

/* Pills */
.pill {
  border: 1px dashed #CFC9BC;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  display: inline-block;
  margin: 2px;
}

/* Utilities */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles */
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* Loading state */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Sidebar Navigation */
.sidebar-nav {
  position: fixed;
  left: 20px;
  top: 20px;
  width: 120px;
  z-index: 1000;
  padding: 0.5rem 0;
}

.sidebar-nav a {
  display: block;
  font-weight: 400;
  font-size: 1em;
  line-height: 1.2;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: -0.05em;
  margin-bottom: 0.25rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.sidebar-nav a:hover {
  border-bottom: 1px solid rgba(11, 11, 11, 0.2);
  transform: translateX(4px);
}

/* Main Content */
.main-content {
  flex: 1;
  min-width: 0;
}

/* Header */
header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

/* Draggable Gallery - Post-it Note Style */
.draggable-gallery {
  margin: 2rem 0;
  padding: 1rem 0;
  overflow: visible;
  position: relative;
  width: 100%;
}

.draggable-container {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-start;
  min-height: 200px;
  padding: 1rem;
  background: transparent;
  position: relative;
  width: 100%;
  overflow: visible;
}

.draggable-image {
  width: 15%;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  cursor: grab;
  transition: all 0.1s ease;
  box-shadow: 
    0 2px 8px rgba(0,0,0,0.1),
    0 1px 3px rgba(0,0,0,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  background: #fff;
  padding: 4px;
  position: relative;
  transform-origin: center;
}

#imageCarousel,
#imageCarouselCyanotype, #imageCarouselThesisExchange2, #draggableContainerMindMap {
  width: 100%;
}

.draggable-container.mind-map {
  width: 100%;
  display: flex;
  align-items: flex-start;
}

#imageCarouselDesignHarder {
  width: 65%;
}

.draggable-image:hover {
  transform: scale(1.05) rotate(1deg);
  box-shadow: 
    0 4px 16px rgba(0,0,0,0.15),
    0 2px 8px rgba(0,0,0,0.1);
  z-index: 10;
}

.draggable-image:active {
  cursor: grabbing;
  transform: scale(1.1) rotate(2deg);
  box-shadow: 
    0 8px 24px rgba(0,0,0,0.2),
    0 4px 12px rgba(0,0,0,0.15);
  z-index: 100;
}

.draggable-image.dragging {
  opacity: 0.8;
  transform: scale(1.1) rotate(3deg);
  z-index: 1000;
  pointer-events: none;
  cursor: grabbing;
}

/* Text post-it styling */
.draggable-image.text-postit {
  width: 240px;
  height: auto;
  min-height: 200px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  background: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: 
    0 2px 8px rgba(0,0,0,0.1),
    0 1px 3px rgba(0,0,0,0.08);
  border-radius: 8px;
  cursor: grab;
  transition: all 0.1s ease;
  transform-origin: center;
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink);
}

.draggable-image.text-postit:hover {
  transform: scale(1.05) rotate(1deg);
  box-shadow: 
    0 4px 16px rgba(0,0,0,0.15),
    0 2px 8px rgba(0,0,0,0.1);
  z-index: 10;
}

.draggable-image.text-postit:active {
  cursor: grabbing;
  transform: scale(1.1) rotate(2deg);
  box-shadow: 
    0 8px 24px rgba(0,0,0,0.2),
    0 4px 12px rgba(0,0,0,0.15);
  z-index: 100;
}

.draggable-image.text-postit.dragging {
  opacity: 0.8;
  transform: scale(1.1) rotate(3deg);
  z-index: 1000;
  pointer-events: none;
  cursor: grabbing;
}

/* Link styling within text post-its */
.draggable-image.text-postit a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  z-index: 10;
}

.draggable-image.text-postit a:hover {
  color: blue;
  text-decoration-color: blue;
  background: rgba(0, 0, 255, 0.1);
  padding: 1px 2px;
  border-radius: 2px;
}

/* Link styling within ul elements in text post-its */
.draggable-image.text-postit ul a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  z-index: 10;
}

.draggable-image.text-postit ul a:hover {
  color: blue;
  text-decoration-color: blue;
  background: rgba(0, 0, 255, 0.1);
  padding: 1px 2px;
  border-radius: 2px;
}

/* Post-it note effect with subtle rotation */
.draggable-image:nth-child(1) { transform: rotate(-1deg); }
.draggable-image:nth-child(2) { transform: rotate(1.5deg); }
.draggable-image:nth-child(3) { transform: rotate(-0.5deg); }
.draggable-image:nth-child(4) { transform: rotate(2deg); }
.draggable-image:nth-child(5) { transform: rotate(-1.2deg); }
.draggable-image:nth-child(6) { transform: rotate(0.8deg); }

/* Drop zone styling */
.draggable-container.drag-over {
  background: rgba(0,0,0,0.02);
  border: 2px dashed rgba(0,0,0,0.1);
  border-radius: 12px;
}

/* Image Modal */
.image-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal-content {
  position: relative;
  background: white;
  border-radius: 12px;
  padding: 20px;
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  transform: scale(0.8);
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-modal.open {
  display: flex;
}

.image-modal.open .modal-content {
  transform: scale(1);
  opacity: 1;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  border-radius: 50%;
  transition: all 0.2s ease;
  z-index: 10;
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.1);
  transform: scale(1.1);
}

.modal-image {
  max-width: 100%;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}

#iatLabModal {
  display: none;
}

#iatLabModal.open {
  display: flex;
  width: 50%;
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
  align-items: center;
}

#iatLabProceed:hover {
  font-style: italic;
}

/* Toggle Button Styles */
#toggleUpdates {
  margin: 0;
  font-size: 1.2em;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

#toggleUpdates:hover {
color: blue;
scale: 1.1;
transition: scale 0.2s ease;
}

#toggleUpdates.expanded {
  color: blue;
  scale: 1.1;
  transition: scale 0.2s ease;
}

/* Desktop styles for sketch container */
@media (min-width: 768px) {
  #draggableContainer {
    margin-top: -3em;
    margin-bottom: -3em;
  }
  #draggableContainer4 {
    margin-top: -5em;
  }
}

/* Updates List Styles */
.updates-list {
  display: none;
  margin-top: -2em;
  padding: 1rem;
  border-radius: 8px;
}

.updates-list li {
  font-size: 1em;
}

.updates-title {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.updates-ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
    gap: 1rem;
  }
  
  .sidebar-nav {
    position: fixed;
    width: 100vw;
    max-width: 100vw;
    display: flex;
    z-index: 1000;
    margin-left: 0;
  }
  
  .sidebar-nav a {
    display: inline-block;
    margin-bottom: 0;
    font-size: 1em;
    flex: 1;
    text-align: left;
  }
  
  .sidebar-nav a:hover {
    transform: none;
    background: none;
    border-bottom: 1px solid rgba(11, 11, 11, 0.5);
  }
  
  .main-content {
    margin-left: 0;
    margin-top: 60px;
  }
  
  .container.images-layout .main-content {
    margin-left: 0;
    margin-top: 60px;
  }

  #imageCarousel,
  #imageCarouselCyanotype, #imageCarouselDesignHarder, #imageCarouselThesisExchange2 {
    width: 250px;
    height: auto;
    max-width: none;
    max-height: none;
  }

  .draggable-image {
    width: 100%;
    height: auto;
  }
  
  .draggable-container {
    gap: 0.75rem;
    padding: 0.75rem;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 0.5fr));
  }
  
  /* Special mobile layout for the sketch images section */
  #draggableContainer {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    padding: 0.5rem;
    margin-top: 0 !important;
    position: relative;
    z-index: 1;
  }
  
  #draggableContainer .draggable-image {
    width: 100%;
    height: auto;
  }
  
  /* Ensure text content is full width on mobile for this section */
  section div[style*="flex: 1"] {
    flex: 1 1 100% !important;
    width: 100% !important;
  }
  
  /* Adjust proportions for this specific section to match other sections */
  section div[style*="display: flex"] {
    gap: 1rem !important;
  }
  
  /* Make text take 70% width like other sections */
  section div[style*="flex: 1"] {
    flex: 0 0 70% !important;
    width: 70% !important;
  }
  
  /* Make post-it take 30% width like other sections */
  section .draggable-container[style*="flex: 0 0 300px"] {
    flex: 0 0 30% !important;
    width: 30% !important;
  }
  
  .modal-content {
    max-width: 95vw;
    height: auto;
  }
  
  #iatLabModal.open {
    width: 100%;
  
  }
  
  /* Updates list mobile styles */
  .updates-list {
    margin-top: -1rem;
    padding: 0.75rem;
  }
  
  .updates-list li {
    font-size: 0.9em;
    padding: 0.25rem 0;
  }
  
  #toggleUpdates {
    font-size: 1.1em;
    padding: 2px 6px;
  }
  
  /* Mobile carousel navigation - move buttons to bottom */
  .carousel-nav-btn {
    top: auto;
    bottom: 20px;
    transform: none;
  }
  
  .carousel-prev-btn {
    left: 20px;
  }
  
  .carousel-next-btn {
    right: 20px;
  }
  
  /* Update hover effects for mobile carousel buttons */
  .carousel-nav-btn:hover {
    transform: scale(1.1);
  }
  
  /* Mobile sketch modal navigation - move buttons to bottom */
  .sketch-nav-btn {
    top: auto;
    bottom: 20px;
    transform: none;
  }
  
  .sketch-prev-btn {
    left: 20px;
  }
  
  .sketch-next-btn {
    right: 20px;
  }
  
  /* Update hover effects for mobile sketch buttons */
  .sketch-nav-btn:hover {
    transform: scale(1.1);
  }
  
  /* Mobile header line break */
  header h1 {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
  }
  
  header h1 span {
    margin-top: 0.5rem;
    font-size: 16px;
  }
}
