/* Reset and base styles */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  margin: 15px;
  padding: 0;
  background-color: #ffffff;
  font-family: 'Manrope', system-ui, sans-serif;
  line-height: 1.5;
  color: #000000;
}

html {
  font-size: clamp(14px, 1.1vw, 16px);
  scroll-behavior: smooth;
}

/* Navigation Bar */
.nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background-color: transparent;
}

.nav-bar ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.nav-bar ul li a {
  text-decoration: none;
  color: #2b2b2b;
  font-weight: 300;
  font-size: 1rem;
  position: relative;
  transition: color 0.3s ease, transform 0.3s ease;
}

.nav-bar ul li a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 2px;
  background-color: currentColor;
  transition: width 0.3s ease;
}

.nav-bar ul li a:hover {
  color: #2b2b2b;
  transform: scale(1.05);
}

.nav-bar ul li a:hover::after {
  width: 100%;
}

.logo {
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  color: #2b2b2b;
}

.nav-toggle {
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: #2b2b2b;
  cursor: pointer;
  padding: 0.5rem;
  min-width: 44px;
  min-height: 44px;
  z-index: 1001;
}

/* Case Study Container */
.case-study-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Hero Section */
.case-study-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
  margin-bottom: 5rem;
}

.project-header {
  text-align: center;
  max-width: 694px;
}

.project-title h1 {
  font-family: 'Manrope', sans-serif;
  font-weight: 400;
  font-size: clamp(1.25rem, 2.5vw, 1.25rem);
  color: #8d8383;
  margin-bottom: 0.5rem;
  text-align: left;
}

.project-subtitle h2 {
  font-family: 'Manrope', sans-serif;
  font-weight: 500;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: #000000;
  line-height: 1.2;
  margin-bottom: 1rem;
  text-align: left;
}

.project-tags {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  border-top: 0.2px solid #2b2b2b;
  padding-top: 0.5rem;
}

.project-crumbs {
  display: flex;
  gap: 1rem;
}

.crumb {
  font-family: 'Manrope', sans-serif;
  font-weight: 200;
  font-size: 0.875rem;
  color: #8d8383;
  text-align: left;
}

.timeline span {
  font-family: 'Manrope', sans-serif;
  font-weight: 200;
  font-size: 0.875rem;
  color: #8d8383;
  text-align: left;
}

/* Hero Video */
.hero-video {
  width: 100%;
  max-width: 1440px;
}

.video-container {
  background-color: #cdcdcd;
  overflow: hidden;
  box-shadow: 0px 6px 19.5px 2px rgba(43, 43, 43, 0.25);
  height: 716px;
  display: flex;
  align-items: start;
  justify-content: center;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
}

.video-container video,
.video-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Content Section */
.content-section {
  margin-top: 5rem;
}

.content-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.5rem;
  align-items: start;
}

/* Directory Navigation */
.content-directory {
  position: sticky;
  top: 2rem;
}

.directory-header {
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
}

.directory-header h3 {
  font-family: 'Manrope', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  color: #000000;
}

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

.directory-list li {
  margin-bottom: 0.3125rem;
}

.directory-list a {
  display: block;
  padding: 0.3125rem 0.46875rem;
  font-family: 'Manrope', sans-serif;
  font-weight: 400;
  font-size: 0.8125rem;
  color: #8d8383;
  text-decoration: none;
  transition: all 0.3s ease;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  text-decoration-color: #8d8383;
}

.directory-list a:hover,
.directory-list a.active {
  color: #000000;
  background-color: rgba(43, 43, 43, 0.05);
  text-decoration: none;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  text-decoration-color: #000000;
}

/* Content Area */
.content-area {
  padding: 0;
}

.content-block {
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
}

.content-block:last-child {
  margin-bottom: 0;
}

.section-header h2 {
  font-family: 'Manrope', sans-serif;
  font-weight: 500;
  font-size: 1.25rem;
  color: #000000;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  text-decoration-color: #2b2b2b;
}

.section-question h3 {
  font-family: 'general-sans', sans-serif;
  font-weight: 500;
  font-size: 0.9375rem;
  color: #000000;
  padding-top: 10px;
}

.section-content {
  max-width: 761px;
}

.section-content p {
  font-family: 'general-sans', sans-serif;
  font-weight: 200;
  font-size: 0.9375rem;
  color: #000000;
  line-height: 1.5;
  padding-bottom: 10px;
  padding-top: 10px;
}

.section-content p:last-child {
  margin-bottom: 0;
}

.section-text {
  margin-bottom: 0.5rem;
}

/* Problem Display */
.problem-display {
  margin-bottom: 0.5rem;
}

.old-website-container {
  background-color: #404040;
  padding: 4rem 15rem;
  box-shadow: 0px 6px 19.5px 2px rgba(43, 43, 43, 0.25);
  overflow: hidden;
  display: flex;
  align-items: start;
  justify-content: center;
  margin-bottom: 1rem;
}

.old-website-image {
  width: 100%;
  max-width: 628px;
  height: auto;
}

/* Wireframe Display */
.wireframe-display {
  margin: 0.5rem 0;
}

.wireframe-container {
  background-color: #404040;
  padding: 4rem 15rem;
  box-shadow: 0px 6px 19.5px 2px rgba(43, 43, 43, 0.25);
  overflow: hidden;
  margin-bottom: 1rem;
}

.wireframe-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 1rem;
  align-items: start;
  justify-items: center;
}

.wireframe-homepage {
  grid-column: 2;
  grid-row: 1 / 3;
  max-width: 100%;
  height: auto;
}

.wireframe-style-guide {
  grid-column: 1;
  grid-row: 1;
  max-width: 100%;
  height: auto;
}

.logo-stack {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  gap: 1rem;
  background-color: #cdcdcd;
  padding: 1rem;
  align-items: center;
  justify-content: center;
}

.logo-stack img {
  width: 120px;
  height: auto;
}

/* Research Display */
.research-display {
  margin: 0.5rem 0;
}

.research-container {
  background-color: #404040;
  padding: 4rem 6rem;
  box-shadow: 0px 6px 19.5px 2px rgba(43, 43, 43, 0.25);
  overflow: hidden;
  display: flex;
  align-items: start;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.research-chart {
  width: 100%;
  max-width: 1238px;
  height: auto;
}

/* Image Captions */
.image-caption {
  margin-top: 0.5rem;
}

.image-caption p {
  font-family: 'Manrope', sans-serif;
  font-weight: 200;
  font-size: 0.875rem;
  color: #887f7a;
}

/* Footer */
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 1rem;
  border-top: 0.5px solid #2b2b2b;
  margin-top: 3rem;
}

footer span {
  font-size: 0.875rem;
  font-weight: 400;
  color: #2b2b2b;
}

.social-links {
  display: flex;
  gap: 0.75rem;
  list-style: none;
}

.social-links a {
  text-decoration: none;
  color: #2b2b2b;
  font-weight: 400;
  transition: color 0.3s ease, transform 0.3s ease;
  position: relative;
}

.social-links a:hover {
  color: #2b2b2b;
  transform: scale(1.05);
}

.social-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 2px;
  background-color: currentColor;
  transition: width 0.3s ease;
}

.social-links a:hover::after {
  width: 100%;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .content-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .content-directory {
    position: static;
    order: -1;
  }
  
  .directory-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .directory-list li {
    margin-bottom: 0;
  }
  
  .content-block {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
  }
  
  .section-text {
    margin-bottom: 2rem;
  }
  
  .section-header h2 {
    margin-bottom: 1.5rem;
  }
  
  .section-question h3 {
    margin-bottom: 1.5rem;
  }
  
  .section-content p {
    margin-bottom: 1.5rem;
  }
  
  .problem-display,
  .wireframe-display,
  .research-display {
    margin: 1.5rem 0;
  }
  
  .image-caption {
    margin-top: 1.5rem;
  }
  
  .old-website-container,
  .wireframe-container,
  .research-container {
    padding: 2rem;
  }
}

@media (max-width: 768px) {
  body {
    margin: 10px;
  }
  
  .nav-toggle {
    display: block !important;
    position: relative;
    z-index: 1002;
  }
  
  .nav-bar {
    position: relative;
    padding-top: 1rem;
    padding-bottom: 1rem;
    padding-left: 0;
    padding-right: 0;
  }

  .nav-bar ul {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 1rem;
    background-color: #ffffff;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 1rem 2rem;
    z-index: 1000;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
  }

  .nav-bar.expanded ul {
    max-height: 500px;
    opacity: 1;
    pointer-events: auto;
  }

  .nav-bar ul li a {
    color: #2b2b2b;
    font-size: 0.9rem;
    font-family: 'Manrope', sans-serif;
    font-weight: 400;
  }
  
  .case-study-container {
    padding: 1rem 0.5rem;
  }
  
  .content-block {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
  }
  
  .section-text {
    margin-bottom: 1.5rem;
  }
  
  .section-header h2 {
    margin-bottom: 1rem;
  }
  
  .section-question h3 {
    margin-bottom: 1rem;
  }
  
  .section-content p {
    margin-bottom: 1rem;
  }
  
  .problem-display,
  .wireframe-display,
  .research-display {
    margin: 1rem 0;
  }
  
  .image-caption {
    margin-top: 1rem;
  }
  
  .old-website-container,
  .wireframe-container,
  .research-container {
    padding: 1rem;
  }
  
  .project-tags {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .video-container {
    height: 400px;
  }
  
  .wireframe-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  
  .wireframe-homepage,
  .wireframe-style-guide {
    grid-column: 1;
    grid-row: auto;
  }
  
  .logo-stack {
    grid-column: 1;
    grid-row: auto;
    flex-direction: row;
    gap: 0.5rem;
  }
  
  .logo-stack img {
    width: 80px;
  }
  
  footer {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
}
