:root {
  /* Palette */
  --dark: 24, 20, 27;
  --light:154, 167, 193;
  --xlight:215, 218, 223;
  --accent: 143, 178, 248;
}
  
body {
  margin: 0;
  padding : 2rem;
  min-height: 100vh;
  background: rgb(var(--dark));
  color: rgb(var(--light));

  font-family: "Futura", sans-serif;
  line-height: 1.4;
  display: flex;
  flex-direction: column;       
  align-items: center;         
  justify-content: center; 

}
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Lucida Sans", "Perpetua", serif;
  color: rgb(var(--xlight));
}
a {
  text-decoration: none;
  color: rgb(var(--xlight));
  text-shadow: 0 0 1px rgba(var(--accent), 1);
}

a.active {
  border-bottom: 2px solid rgb(var(--accent));
}
.text-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
/* Header/Navigation */
.header {
  height: auto;
}

#header-scroll {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  background: rgba(var(--dark),0.7);
  transition: all 0.3s ease-out;
}

#header-scroll h1 {
  padding: 200px 0;
  height: 100%;
  font-size: 4em;
  text-align: center;
  line-height: 1.15;
  transition: all 0.3s ease-out;
  font-family: 'Perpetua', 'Lucida Sans', serif;

}

#header-scroll.shrink {
  display: inline-block;
  height: auto;
  
}

#header-scroll.shrink h1 {
  padding: 0 1rem;
  height: auto;
  font-size: 1rem;
  font-weight: bold;
  text-decoration: none;
  display: inline-block;
  font-family: 'Lucida Sans', 'Perpetua', serif;
}
#header-scroll.shrink h1 a{
  position: relative;
  z-index: 1001;
}
/* Navigation*/
nav {
  position: fixed;
  top: 0;
  width: 100%;
  height: 50px;
  display:flex;
  justify-content: flex-end;
  align-items: center;   
}
nav ul {
  margin: 0;                   
  padding: 0 1rem 0;                  
  display: flex;             
  gap: 1em;   
}
nav ul li {
  display: inline-block;
  margin: 0 10px;
}
nav ul li a {
  padding: 0px 0;
  font-size: 1rem;
  font-weight: bold;
  font-family: 'Lucida Sans', 'Perpetua', serif;
  transition: all 0.2s ease;
  line-height: 50px;
  position: relative;
  top: -5px;  
}
nav ul li a:hover {
  color: rgb(var(--accent));
}

li {
  margin-bottom: 0.5rem;  /* Adds space below each list item */
  position: relative;
}

li:last-child {
  margin-bottom: 0;
}

.tooltip-trigger {
  position: relative;
  display: inline-block;
  cursor: pointer;
}
/* 
.tooltip-trigger:hover > .tooltip,
.tooltip-trigger:focus-within > .tooltip {
  visibility: visible;
  opacity: 1;
} */

/* ...existing code... */
.tooltip {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  pointer-events: none;
}

section {
  width: 100%;
  height: 100%;
  padding: 150px 0;
  scroll-margin-top: -60px;
  border-bottom: 1px solid rgb(var(--accent));

}

section a:hover {
  color: rgb(var(--accent));
  text-decoration: underline;
} 
section h2 {
  font-family: 'Lucida Sans', 'Perpetua', serif;
  font-size: 1.75rem;
  margin: 0 0 1rem 0;
  color: rgb(var(--light));
}
section h3 {
  font-family: 'Lucida Sans', 'Perpetua', serif;
  font-size: 1.25rem;
  margin: 0 0 1rem 0;
  color: rgb(var(--light));
}
#contact {
  margin: 0 auto 2rem;      
  text-align: center;
    background:
    linear-gradient(rgb(var(--dark), 0.9), rgb(var(--dark), 0.9)), 
    url("images/MeBKG.GIF") center / cover no-repeat;
  
}


.header_background {
  position: relative;
  width: 100%;
  z-index: 900;
  height: 475px; 
  overflow: hidden; 
}
.header_background img {
  width: 100%;
  height: 100%;
  object-fit: cover; 
  display: block;
}

.header_background {
  border-bottom-left-radius: 50% 20px; 
  border-bottom-right-radius: 50% 20px;
  box-shadow: 0 4px 10px rgba(var(--dark), 0.7);

}

/*Navigation on mobile*/
@media (max-width: 750px) {
  nav ul {
    display: none;
    flex-direction: column;
    background: rgba(var(--dark), 0.95);
    position: absolute;
    top: 50px;
    right: 0;
    width: 200px;
    padding: 1em 0;
    z-index: 1001;
  }
  nav.active ul {
    display: flex;
  }
  .hamburger {
    display: block;
    position: absolute;
    top: 10px;
    right: 20px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    z-index: 1002;
  }
}

.hamburger {
  display: none;
}



/* Gallery container */
.project_gallery {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 1em;               
  margin: 10vmin auto;
  overflow: hidden;
  transform: skew(5deg);
  width: min(950px, 90vw);
  --hint: "Select for More Information";  
}

/* Panels */
:root {
  --title-thickness: 1rem; 
  --slant: 3.5%;
}
.project {
  flex: 1 1 220px;
  min-width: 0;
  overflow: hidden;

  padding-right: var(--title-thickness);

  height: 75vmin;
  position: relative;
  transition: flex-basis .4s ease, flex-grow .4s ease;

  clip-path: polygon(0 0, calc(100% - var(--slant)) 0, 100% 100%, var(--slant) 100%);
  -webkit-clip-path: polygon(0 0, calc(100% - var(--slant)) 0, 100% 100%, var(--slant) 100%);

}
/*Hint*/
.project::after {
  content: var(--hint);
  position: absolute;
  left: 50%;
  bottom: 15%;
  transform: translateX(-50%) skew(-5deg);
  background: rgba(var(--dark),0.8);
  color: rgb(var(--accent));
  padding: .35rem .75rem;
  border-radius: 999px;
  font-size: .9rem;
  letter-spacing: .02em;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 3;
  transition: opacity .2s ease, visibility .2s ease;
}
/* Images */
.project img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
  transition: filter .4s ease, transform .4s ease;
}

.project_title {
  position: absolute;
  right: var(--title-thickness);
  left:auto;
  bottom: 0;
  z-index: 2;

  height: 100%;
  width: var(--title-thickness);
  line-height: 1;
  padding: 0 0.5em;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;

  color: black;
  background: rgba(var(--accent), 0.8);


  writing-mode: vertical-rl;
  text-orientation: mixed;

  transition:
    transform .5s ease,
    top .5s ease,
    bottom .5s ease,
    background .3s ease,
    color .3s ease,
    font-size .3s ease;
  font-size: 1em;
}

.project_keywords {
  display: none;
  position: absolute;
  left: 50%;
  bottom: 30%;
  transform: translateX(-50%) skew(-5deg);
  background: rgba(var(--dark), 0.85);
  color: rgb(var(--accent));
  padding: 1rem 4rem;
  border-radius: 99px;
  font-size: 0.85rem;
  white-space: nowrap;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease;
}

.project_description {
  display: none;
  position: absolute;
  bottom: 0;
  left: -20px;
  width: 102%;
  background: rgba(var(--dark), 0.9);
  color: rgb(var(--light));
  box-sizing: border-box;
  font-size: 0.9rem;
  line-height: 1.4;
  z-index: 10;
  overflow-y: auto; 
  max-height: 84%;
  min-height: 84%;
  transform: skew(-5deg);
  padding: 1.5rem 3rem 2rem 6rem;


}
.project_description::-webkit-scrollbar {
  width: 8px; 
}
.project_description strong {
  font-weight: bold; 
}
.project_description::-webkit-scrollbar-thumb {
  background: rgba(var(--xlight), 0.2); 
  border-radius: 4px; 
}

.project_description::-webkit-scrollbar-thumb:hover {
  background: rgba(var(--xlight), 0.4); 
}

.project_description::-webkit-scrollbar-track {
  background: transparent; 
}


/* Hover: expand, color image */
.project_gallery:not(.has-active) .project:hover {
  flex-grow: 6;
}
.project_gallery:not(.has-active) .project:hover img {
  filter: grayscale(0%) brightness(0.5) blur(5px);
}
.project_gallery:not(.has-active) .project:hover::after {
  opacity: 1;
  visibility: visible;
}
.project_gallery:not(.has-active) .project:hover .project_title {
  top: 0.5em;           
  right: 0;
  width: 100%;
  height: 2.1rem;
  writing-mode: horizontal-tb;
  transform: skew(-5deg);  
  background: rgba(var(--dark), 0.9);
  color:  rgb(var(--light));
  font-size: 1.5em;
}
.project_gallery:not(.has-active) .project:hover .project_keywords {
  display: block;
  opacity: 1;
}


/* Freeze clicked panel */
.project.is-active {
  flex-grow: 6;
}
.project.is-active img {
  filter: grayscale(0%) brightness(0.5) blur(0px);
}
.project.is-active .project_title {
  top: 0.5em;
  right: 0;
  width: 100%;
  height: 2rem;
  writing-mode: horizontal-tb;
  transform: skew(-5deg);
  background: rgba(var(--dark), 0.9);
  color: rgb(var(--light));
  font-size: 1.5em;
  display: flex;
  align-items: center;
  justify-content: center;

}

/* If panel is active, shrink others*/
.project_gallery.has-active .project:not(.is-active) {
  flex-basis: 30px;
  flex-grow: 1;
}

.project_gallery.has-active .project:not(.is-active):hover {
  filter: drop-shadow(0 0 9px rgb(var(--accent)));

}

.project_gallery:hover .project:not(:hover):not(.is-active) {
  flex-basis: 30px;
  flex-grow: 1;
}

/* Show description on click */
.project.is-active .project_description {
  display: block;
}

/* Simplified gallery on mobile*/
@media (max-width: 600px) {
  .project_gallery {
    flex-direction: column;
    transform: none;
    margin: 2rem 0;
    gap: 2rem;
    width: 100%;
  }

  .project {
    flex: none;
    height: auto;
    min-height: 200px;
    padding: 0;
    clip-path: none;
    transform: none;
  }

  .project_title {
    position: relative;
    width: 100%;
    height: auto;
    writing-mode: horizontal-tb;
    padding: 1rem;
    background: rgba(var(--dark), 0.9);
    color: rgb(var(--light));
  }

  .project_description {
    position: relative;
    left: 0;
    transform: none;
    padding: 1rem;
    max-height: none;
  }

  .project img {
    height: 200px;
  }

  /* Simplify hover/active states */
  .project_gallery:not(.has-active) .project:hover,
  .project.is-active {
    flex-grow: 1;
  }

  .project_gallery:not(.has-active) .project:hover .project_title,
  .project.is-active .project_title {
    transform: none;
  }

  /* Hide the hint on mobile */
  .project::after {
    display: none;
  }
}

/*contact form*/
form {
  max-width: 600px;
  margin: 3rem auto;
  padding: 2rem;
  background: rgba(var(--dark),0.3);
  border: 1px solid rgba(var(--accent),0.2);
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(var(--dark),0.4);
  }
form label {
  display: block;
  margin-bottom: 0.5rem;
  color: rgb(var(--light));
}
form input, form textarea {
  width: 100%;
  padding: 0.75rem;
  background: rgba(var(--xlight),0.06);
  border: 1px solid rgba(var(--accent),0.25);
  border-radius: 8px;
  color: rgb(var(--light));
  font-family: 'Lucida Sans', 'Perpetua', serif;
  box-sizing: border-box;
}

form textarea {
    margin-bottom: 1.5rem;
    min-height: 150px;
    resize: vertical;
}

form input:focus, form textarea:focus {
    outline: none;
    border-color: rgb(var(--accent));
    box-shadow: 0 0 0 3px rgba(var(--accent),0.25);
}

form button {
    background: rgba(var(--accent),0.6);
    color: rgb(var(--dark));
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-family: 'Lucida Sans', 'Perpetua', serif;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}
form button:hover {
    background: rgb(var(--accent));
}
#confirmation {
  max-width: 600px;
  margin: 3rem auto;
  padding: 2rem;
  background: rgba(var(--dark),0.3);
  border: 1px solid rgba(var(--accent),0.4);
  border-radius: 12px;
  text-align: center;
  color: rgb(var(--light));
  font-family: 'Lucida Sans', 'Perpetua', serif;
  line-height: 1.5;
}
        
@supports selector(body:has(> form)) {
  body:has(> form) #header-scroll {
    position: static;
    height: auto;
    background: transparent;
    z-index: auto;
  }
  body:has(> form) #header-scroll h1 {
    padding: 0 1rem;
    height: auto;
    font-size: 1rem;
    font-weight: bold;
  }
}
/* Log*/

.log { max-width: 900px; 
  margin: 2rem auto; 
  padding: 0 1rem; }

.log h1 { margin-bottom: 0.5rem; }

.log h3 { margin-top: 0.5rem;}

.entry { border-left: 3px solid rgba(var(--dark), 0.3); 
  padding: 0.5rem 1rem; 
  margin: 1rem 0; }

.entry time { display: block; 
  font-size: 0.9rem; 
  color: rgba(var(--light), 0.8); }

.tags { font-size: 0.85rem; 
  opacity: 0.8; }

.tags .pill {
  display: inline-block;
  margin-right: 0.25rem;
  padding: 0.1rem 0.4rem;
  border-radius: 9px;
  background: rgba(var(--light), 0.12);
  font-size: 0.85rem;
}
.tags .pill.misc{
  border: 2px solid rgba(var(--light), 0.25);

}
.tags .pill.dmaic{
  border: 2px solid rgba(13, 255, 0, 0.25);
}
.tags .pill.agile{
  border: 2px solid rgba(170, 0, 255, 0.25);
}

.shots img { 
  max-width: 100%;
  height: auto; 
  border: 1px solid rgba(var(--light),0.2);
 }

/* Chat Interface */
#chat-container { max-width: 700px; margin: 1rem auto; border: 1px solid #ddd; border-radius: 6px; padding: 1rem; }
#chat-log { list-style: none; margin: 0 0 1rem 0; padding: 0; max-height: 320px; overflow-y: auto; }
#chat-log li { padding: .5rem .75rem; margin: .25rem 0; border-radius: 6px; ; color:rgb(var(--dark));}
#chat-log li.user { background: rgb(var(--light)); align-self: flex-end; }
#chat-log li.assistant { background: #f6f6f6; }
#chat-form { display: flex; gap: .5rem; align-items: center; }
#chat-input { flex: 1; padding: .5rem .75rem; }
#chat-send { padding: .5rem .75rem; white-space: nowrap; }


/* AOI Element */
#about { position: relative; }

#aoi-element {
  position: absolute;
  left: 50%;
  transform: translateX(calc(-50% + clamp(0px, 330px, 340px)));
  top: 62%;
  width: 225px;
  max-width: 90%;
  background: rgb(var(--dark));
  color: rgb(var(--light));
  border: 1px solid rgba(var(--light),0.15);
  padding: 10px;
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.45);
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
  font-size: 0.95rem;
}

#aoi-element.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(calc(-50% + clamp(0px, 330px, 340px)));
}