/* OPTION A – nav width auto-adjusts to title size (plus padding) */

body {
    margin: 0;
    padding: 0px 0 0 0px;           /* keep your 2px top/left padding */
    font-family: Helvetica, sans-serif;
    background: #000;               /* CHANGED: black page background */
    color: #eee;                    /* NEW: default light text on dark bg */
}

.floating-nav {
    position: fixed;
    top: 1px;                       
    left: 1px;                      
    background: rgba(240, 240, 240, 0.5);
    padding: 10px 40px 0px 20px;   /* top right bottom left */
    box-sizing: content-box;        /* width = content only, padding added */
    z-index: 1000;
    width: fit-content;             /* shrink-wrap to content */
    display: inline-block;          /* required for shrink-wrap */
    max-width: calc(100vw - 2px);   /* ensure it never overflows viewport */
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    animation: fadeIn 4s ease-out;
    border-radius: 8px;            
    overflow: hidden;               
    color: #111; 
}

.site-title {
    font-family: Arial Black, sans-serif;
    font-size: 42px;
    font-weight: bold;
    margin-bottom: 0px;
    color: #111;
    white-space: nowrap;            /* ensures title defines nav width */
}

.floating-nav ul {
    list-style: none;
    padding: 0;
    max-width: 100%;                /* don’t exceed nav width */
}

.floating-nav ul li a {
    font-family: Helvetica;
    font-weight: bold;
    text-decoration: none;
    display: block;
    padding: 3px 0;
    color: black;
    transition: color 0.3s ease;
    font-size: 14px;                /* ADDED: control link size */
}

.floating-nav ul li a:hover { color: #888; }

/* Dropdown Base */
.dropdown { position: relative; }
.dropdown > a { cursor: pointer; }

/* Animated Dropdown (no CSS variables) */
/* Collapsed */
.dropdown-menu {
  list-style: none;
  margin: 0;
  padding-left: 10px;
  overflow: hidden;
  max-height: 0;                 
  opacity: 0;
  transform: translateY(-5px);
  position: relative;
  transition: max-height 500ms ease, opacity 200ms ease, transform 200ms ease;
  will-change: max-height, opacity, transform;
}

/* Open state (desktop hover + touch .show) */
.dropdown:hover .dropdown-menu,
.dropdown-menu.show {
  opacity: 1;
  transform: translateY(0);
}

/* Hover height cap for desktop (adjust as needed) */
.dropdown:hover .dropdown-menu {
  max-height: 600px;             
}

/* --- BIGGER GRID: max 2 columns, stacks downward --- */
.grid-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)); 
    gap: 10px;
    padding: 0px 0px 0px; 
    grid-auto-flow: row;
}

.grid-container img {
    width: 100%;
    height: auto;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.grid-container img.loaded {
    opacity: 1;
    transform: translateY(0);
}

.grid-container img:hover {
    transform: scale(0.995); 
}

.project-detail {
    padding: 0px 0px 0px 0PX; 
    color: #eee;
}

.project-detail img, 
.project-detail video {
    max-width: 100%;
    display: block;
    margin-bottom: 0px;
    opacity: 0;
    transform: translateY(20px);
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.project-detail img.loaded,
.project-detail video.loaded {
    opacity: 1;
    transform: translateY(0);
}

.project-detail .description {
    font-size: 16px;
    line-height: 1.5;
    margin-top: 20px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive: switch to 1 column when space is tight */
@media (max-width: 1200px) {
    .grid-container {
        grid-template-columns: 1fr;
    }
}
