/* Font declarations first */
@font-face {
  font-family: 'Hargita';
  src: url('../fonts/Hargita.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  font-synthesis: none;
}

/* General Reset */
body {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  line-height: 1.2;
  color: #000000;
  font-family: Arial, Helvetica, sans-serif;
  overflow-y: scroll;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

/* Global font fallback for other elements */
* {
  font-family: inherit;
}

/* Header Section */
header {
  background-color: #ffffff;
  color: #000000;
  text-align: center;
  padding: 10px;
  font-size: 1.5rem;
}

header h1,
.site-title {
  font-family: 'Hargita', serif;
  font-weight: 400;
  font-size: clamp(4rem, 8vw, 8rem);
  letter-spacing: 0.02em;
  line-height: 1;
  margin: 0.6em 0;
  text-transform: uppercase;
}

/* Make the header text clickable without looking like a link */
header h1 a,
.site-title {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  display: inline-block; /* ensures the click area is clean */
}

/* Main Container */
.container {
  display: flex;
  flex: 1;
}

/* Sidebar Styling */
.sidebar {
  width: 30%;
  background-color: #ffffff;
  padding: 10px;
  overflow-y: auto;
  overflow-x: hidden;
  border-right: 2px solid #ffffff;
  scrollbar-gutter: stable;
}

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

.menu-item {
  margin-bottom: 10px;
}

.menu-btn {
  background: none;
  border: none;
  font-weight: bold;
  font-size: 1.2rem;
  text-align: left;
  width: 100%;
  padding: 5px 10px;
  cursor: pointer;
}

.submenu {
  list-style: none;
  margin-left: 10px;
  padding: 5px 0;
  display: none;
}

.submenu-item {
  padding: 5px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.submenu-item:hover {
  background-color: #b8b8b8f0;
}

.submenu-item a {
  display: block;
  text-decoration: none;
  color: inherit;
}

.nested-list {
  margin-left: 10px;
  list-style-type: none;
  padding-left: 5px;
  margin-top: 3px;
}

.nested-item {
  font-size: 0.8rem;
  color: #545353;
  cursor: pointer;
  padding: 2px 5px;
  transition: background-color 0.2s ease;
}

.nested-item:hover {
  background-color: inherit;
}

/* Shared preview container defaults (positions controlled by mode classes below) */
.content-preview {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  display: none; /* JS will toggle this */
  text-align: center;
}

/* HOME (index) — large and centred */
.content-preview.preview--home {
  left: 50%;
  transform: translateX(-50%);
  right: auto;      
  width: min(900px, 72vw);
  max-width: 100%;
}

/* INNER PAGES — smaller and docked right */
.content-preview.preview--inner {
  right: calc(40% + 20px + 2px);
  left: auto;    
  transform: none;  
  width: 420px;
  max-width: 42vw;
}


/* Make the whole highlighted area feel clickable */
.submenu-item {
  cursor: pointer;
}

/* Remove outline when focus isn’t keyboard-driven */
.submenu-item a:focus { outline: none; }

/* Keep a clear outline for keyboard navigation */
.submenu-item a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}


/* Keep default collapsed state via JS toggling; this is just visual */
.submenu a.is-active,
.submenu li.is-active > a {
  background: var(--active-bg, #ff5c26f0);
}

/* parent group indication when submenu is open, commented out
.menu-item.is-open > .menu-toggle {
  background: var(--open-bg, #afa411f0);
}
*/

/* Image Preview Styling */
.preview-image {
  max-width: 90%;
  max-height: 400px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: opacity 0.3s ease;
}

/* Loading state for images */
.preview-image:not([src]) {
  opacity: 0.5;
}

/* Project Container */
.project-container {
  margin-left: 25px;
  padding: 20px;
  max-width: 800px; 
  line-height: 1.6;
}

/* Constrain right-hand content column across all pages */
.content-area {
    max-width: 900px;
    padding-right: 40px;
}

/* Title and Subtitle */
.project-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-top: 20px;
  margin-bottom: 10px;
  line-height: 1;
}

.project-subtitle {
  font-size: 0.9rem;
  font-weight: 400;
  margin-top: 10px;
  margin-bottom: 30px;
  line-height: 1;
  color: #000000;
}

/* Form - duration, always italic */
.project-form-duration {
  font-size: 0.8rem;
  font-weight: 200;
  font-style: italic; 
  margin-top: 4px;
  margin-bottom: 15px;
  line-height: 1.2;
}

/* Description */
.project-description {
  margin-bottom: 30px;
}

.project-description p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 15px;
  color: #000000;
}

/* Adjustments for nested descriptions */
.project-description p + p {
  text-indent: 0em; 
}

/* Year, Place, and Group Show */
.project-year-place {
  font-size: 0.8rem;
  font-weight: bold;
  margin-top: 4px;
  margin-bottom: 4px;
  line-height: 1.2;
}

.project-form {
  font-size: 0.8rem;
  font-style: italic;
  font-weight: 500;
  margin-top: 4px;
  margin-bottom: 4px;
  text-indent: 0rem;
  line-height: 1.2;
}

.project-group-show-title {
  font-size: 0.8rem;
  font-weight: 500;
  margin-top: 4px;
  margin-bottom: 4px;
  text-indent: 0rem;
  line-height: 1.2;
}

.project-group-show-title a {
  text-decoration: none; 
  color: inherit;
}

.project-group-show-title a:hover {
  text-decoration: underline;
}

/* Curator */
.project-curator {
  font-size: 0.8rem;
  font-weight: 300;
  margin-top: 4px;
  margin-bottom: 4px;
  text-indent: 0rem;
  line-height: 1.2;
}

/* Artists */
.project-artists {
  font-size: 0.8rem;
  font-weight: 300;
  margin-top: 4px;
  margin-bottom: 4px;
  padding-left: 0rem;
  line-height: 1.2;
}

/* Citations */
.citation {
  font-style: italic;
  font-size: 0.8rem;
}

/* Figure styling */
.project-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 20px auto;
}

/* Image styling */
.project-image {
  max-width: 100%;
  max-height: 500px;
  width: auto;
  height: auto;
  display: block;
  margin: 20px auto;
  object-fit: contain;
}

/* Caption styling */
.project-caption {
  font-size: 0.65rem;
  color: #3c3b3b;
  text-align: left;
  margin-top: 10px;
  align-self: flex-start;
  width: 100%;
}

/* Gallery container for multiple images */
.gallery-container {
  display: flex;
  overflow-x: auto;
  gap: 20px;
  padding: 10px 0;
  width: 100%;
  scroll-behavior: smooth;
}

/* Individual figure in the gallery */
.gallery-container .project-figure {
  flex: 0 0 auto;
  margin: 0;
}

/* Individual image styling in the gallery */
.gallery-image {
  max-width: 100%;
  max-height: 500px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.gallery-video {
  max-width: 100%;
  max-height: 500px;
  width: auto;
  height: auto;
  object-fit: cover;
  aspect-ratio: 16/9;
}

/* Scrollbar appearance */
.gallery-container::-webkit-scrollbar {
  height: 8px;
}

.gallery-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.gallery-container::-webkit-scrollbar-thumb {
  background: #494948;
  border-radius: 4px;
}

.gallery-container::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Footer styling */
footer {
  padding: 10px 20px;
  text-align: left;
  font-size: 0.7rem; 
  color: #666; 
  margin-top: 20px; 
}

/* Publication-specific styles */

/* Publication entry container */
.publication-entry {
  margin-bottom: 60px;
  padding-bottom: 40px;
}

/* Citation for academic papers in APA style */
.publication-citation {
  font-size: 0.85rem;
  line-height: 1.4;
  margin: 15px 0 25px 0;
}

/* Abstract heading */
.abstract-heading {
  font-size: 0.9rem;
  font-weight: bold;
  margin-bottom: 8px;
  margin-top: 20px;
}

/* Keywords section */
.keywords-heading {
  font-size: 0.9rem;
  font-weight: bold;
  margin-bottom: 8px;
  margin-top: 20px;
}

.keywords {
  font-size: 0.85rem;
  font-style: italic;
  margin-top: 0;
  margin-bottom: 20px;
}

/* Item link styling (general use across all page types) */
.item-link {
  margin-top: 25px;
  margin-bottom: 30px;
}

.item-link a {
  display: inline-block;
  padding: 8px 15px;
  background-color: #f0f0f0;
  color: #000;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.85rem;
  transition: background-color 0.3s ease;
}

.item-link a:hover {
  background-color: #e0e0e0;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
  .preview-image {
    max-height: 300px;
  }
  
  .content-preview {
    padding: 10px;
  }
}

/* Publication cover plate layout */
.publication-cover-plate {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: clamp(20px, 5vw, 50px);
    background: #f7f7f7;   /* very soft neutral backdrop */
    border-radius: 0;       /* now square */ 
    margin-bottom: 30px;
}

/* Shadow applied to the publication cover image */
.publication-cover-plate .project-image {
    max-width: 100%;
    height: auto;
    border-radius: 0;       /* cover is now square-edged */
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.14),   /* deeper, softer outer shadow */
        0 4px 12px rgba(0, 0, 0, 0.12),    /* mid-layer shadow */
        0 2px 4px rgba(0, 0, 0, 0.10);     /* crisp grounding shadow */
}

/* Pedagogy-specific styling */

/* Course title */
.course-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-top: 20px;
  margin-bottom: 25px;
  line-height: 1;
}

/* Institution info*/
.course-institution {
  font-size: 0.9rem;
  font-weight: 500;
  margin-top: 10px;
  margin-bottom: 5px; /* Reduced from project-subtitle's 30px */
  line-height: 1.5;
  color: #000000;
}

/* Duration */
.course-duration {
  font-size: 0.8rem;
  font-weight: 200;
  font-style: none; 
  margin-top: 2px; /* Very close to institution */
  margin-bottom: 20px; /* More space before next element */
  line-height: 1.2;
}
/* Role */
  .course-role {
  font-size: 0.8rem;
  font-weight: 300;
  margin-top: 5px;
  margin-bottom: 20px;
  line-height: 1.2;
  color: #545353;
}

/* Text Preview Styling */
.preview-text {
  text-align: center;
  padding: 40px 20px;
  margin-top: 100px;
  max-width: 400px;
  line-height: 1.4;
}

/* Override margin for subsequent entries */
.preview-text.preview-text-subsequent {
  margin-top: 0px !important;
  padding-top: 20px;
  border-top: 1px solid #ccc;
}

.preview-course-title {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 15px;
  color: #000000;
}

.preview-institution {
  font-size: 0.9rem;
  font-weight: 400;
  margin-bottom: 10px;
  color: #000000;
}

.preview-year {
  font-size: 0.85rem;
  font-weight: 300;
  margin-bottom: 8px;
  color: #545353;
}

.preview-role {
  font-size: 0.85rem;
  font-weight: 300;
  font-style: italic;
  color: #545353;
}

/* Move text previews further right - HOME PAGE ONLY */
.content-preview.preview--home .preview-text {
  margin-left: 150px; /* adjust this value to move more/less to the right */
}

/* Keep inner pages text preview in default position */
.content-preview.preview--inner .preview-text {
  margin-left: 0;
}

.contact-academic a {
  color: #000;
  text-decoration: none;
  font-weight: 500;
  transition: text-decoration 0.2s ease;
}

.contact-academic a:hover {
  text-decoration: underline;
}

/* Home landing about block inside the right-hand column */
.home-about {
    padding: 40px 40px 0 20px;
    max-width: 660px; 
    line-height: 1.6;
}

/* image floated left so text wraps around it */
.landing-about-image {
    float: left;
    margin: 0 25px 9px 0; /* bottom margin */ 
    
}

.landing-about-image img {
    width: 260px;
    height: auto;
    display: block;
    border-radius: 0;
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

/* Text flows around the floated image */
.landing-about-text {
    font-size: 1rem;
    line-height: 1.6;
    text-align: left;
}

.landing-about-text .project-description {
    margin-top: 0;
}

.landing-about-text .project-description p {
    margin-top: 0;
    margin-bottom: 0.6em;
    text-align: left;
}

.contact-academic {
    margin-top: 1.6em;
    font-size: 0.95rem;
    line-height: 1.5;
    clear: left;
    text-align: left;
}

.contact-academic p {
    text-align: left;
}

/* All mobile styles in one media query */
@media (max-width: 768px) {
  /* Stack and adjust general layout */
  .container {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    max-width: 100%;
    border-right: none;
    padding: 10px 15px;
  }
  .home-about, .content-area, .project-container {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    padding: 15px;
    box-sizing: border-box;
  }
  
  /* Header adjustments */
  header h1 {
    font-size: clamp(3rem, 10vw, 4.5rem);
    margin: 0.4em 0;
  }
  
  /* Hide previews on mobile */
  .content-preview {
    display: none !important;
  }
  
  /* Publication cover plates */
  .publication-cover-plate {
    padding: 20px 15px;
    box-sizing: border-box;
  }
  
  /* Gallery: horizontal scroll with mixed image sizes */
  .gallery-container {
    gap: 15px;
    padding: 10px 5px;
    align-items: center;
  }
  
  .gallery-container .project-figure {
    flex: 0 0 85vw;
  }
  
  .gallery-container .gallery-image {
    max-width: 100%;
    max-height: 60vh;
    width: auto;
    height: auto;
    object-fit: contain;
  }
  
  .gallery-container .gallery-video {
    max-width: 100%;
    max-height: 60vh;
    width: 100%;
    height: auto;
    object-fit: contain;
  }
  
  /* Landing page about section */
  .landing-about-image {
    float: none;
    margin: 0 auto 20px;
    display: block;
    text-align: center;
  }
  
  .landing-about-image img {
    width: 100%;
    max-width: 260px;
  }
  
  .landing-about-text {
    clear: both;
  }
}
/* Vimeo embed styling for gallery */
.vimeo-embed-wrapper {
    width: 100%;
    max-width: 100%;
    position: relative;
    overflow: hidden; /* Clip any overflow */
    border-radius: 0; /* Optional: matches your other styling */
}

.vimeo-embed-wrapper > div {
    overflow: hidden; /* Also clip the inner div */
}

.gallery-container .project-figure {
    max-width: 800px;
    width: 100%;
    overflow: hidden; /* ← Add this to clip at the figure level too */
}

@media (max-width: 768px) {
    .gallery-container .project-figure {
        flex: 0 0 85vw;
        max-width: 85vw;
    }
}