
/* ------------------------------------------------------------------*/
/* -----setup------------------------------------------------------*/
/* ------------------------------------------------------------------*/

/* Anything defined here is accessible everywher*/
:root{
    --text-color: #f8faff;
    --box-color: #0f1011;
    --link-color: #ee4a4a;
    --background-color: #a8a8af;
    --box-color-work: #ababb2; 
}

/* targets every element*/
*{
    margin: 0; /* Removes default margin from all element */
    padding: 0; /* Removes default padding from all element*/
    box-sizing: border-box; /* Makes layout easier and more predictable*/
}

/* Makes anchor link jumps scroll smoothly */
html{
    scroll-behavior: smooth; /*smooth scroll behavior */
}

/* Background */
body {
    background-image: url('images/background_index.jpg');
    background-size: cover;       /* makes image cover the whole viewport */
    background-position: center;  /* centers the image */
    background-repeat: no-repeat; /* prevents tiling */
    background-attachment: fixed; /* optional: keeps image fixed on scroll */
}

/* Body styling*/
body{
    font-family: "Poppins", sans-serif; /*sets the default font for the page to Poppins */
    color: #ffffff; 
    max-width: 1400px; /*Limits the width of the entire site*/
    margin: 0 auto /*centers the body content horizontally*/
    
}

/* select all <a> anchor elements*/
a{
    color: var(--link-color); /*sets the text color of all links */
    text-decoration: none; /* This removes the default underline from all links*/
}

/* <a> in project section other color*/
.project-section a {
    color: #ffffff;   /* white */
}
/* ------------------------------------------------------------------*/
/* ------navbar------------------------------------------------------------*/
/* ------------------------------------------------------------------*/
/* navbar */
nav{
  display: flex;  /* turns into a flex container, using Flexbox rules */
  justify-content: space-between; /*split left and right */
  align-items: center; /*put it clean in center betweem top and height */
  padding: 0 50px; /*50 px away from border*/
  height: 80px; /*bottem part 80px away */
}
/* container for navbar left */
nav .left a {
    color: var(--text-color); /*define text color */
    font-size: 22px; /* makes the link larger */
    font-weight: 600; /*makes the text semibold */
}


/* navbar right */
nav .right a {
    color: var(--text-color); /* set color */
    margin: 0 10px; /* adds spacing on left and right */
}

/* special style for last llink */
nav .right a:last-child{
    color: var(--background-color); /* set text color */
    background-color: var(--text-color); /*set background color */
    padding: 5px 15px ; /* (y-axis,x-axis) */
    border-radius: 5px; /* rounded corners */
}

nav .right a span {
    margin-left: 5px; /* Adds spacing between text and an icon */
}

/* ------------------------------------------------------------------*/
/* ----------HERO SECTION -------------------------------------------*/
/* ------------------------------------------------------------------*/

/* put picture right to text and make hero text better*/
.hero-section {
    display: flex; /* flex layout, left text, right image*/
    justify-content: space-between; /* spreads horizontally */
    align-items: center; /* vertival center both sides */
    padding: 0 50px; /* */
    margin: 50px 0; /* adds space above and below */
    margin-bottom: 25px; /* gap between hero and next sesion */
    gap: 40px;  /* adds spacing between text and image*/
}

/* hero section text*/
.hero-section .text{
    flex: 5; /* more width relative to the image */
}

/* */
.hero-section .text h2{
    font-size: 45px; /* Large heading text for emphasis. */
}

/* */
.hero-section .text .links{
    margin-top: 25px; /*Adds spacing above the link buttons. */
    margin-bottom: 0px; /* was probably larger, shrink it */
}

/* invidual hero links */
.hero-section .text .links a {
    display: inline-block; /* let logo and name togeter */
    padding: 5px 10px; /* */
    border: 2px solid var(--link-color); /* */
    border-radius: 50px; /* rounded borders*/
    margin-right: 10px; /* */
    margin-bottom: 10px; /*  lets them wrap nicely on small screens*/
    transition: .1s; /*creates a smooth hover animation */
}

/* hover effect on hero links */
.hero-section .text .links a:hover{
    color: var(--text-color); /* */
    border: 2px solid var(--text-color) /* inversion effect*/
}





/* ---------- Detail-page navbar in hero section ---------- */
.hero-section .detail-links {
    margin-top: 10px;           /* spacing below main links */
    display: flex;               /* keep buttons in a row */
    flex-wrap: wrap;             /* wrap on smaller screens */
    gap: 10px;                   /* spacing between buttons */
}

.hero-section .detail-links a {
    display: inline-block;       /* like main links */
    padding: 5px 10px;
    border: 2px solid #888888;  /* slightly lighter than main links */
    border-radius: 50px;
    text-decoration: none;
    transition: .1s;
}

.hero-section .detail-links a:hover {
    color: var(--text-color);    /* same hover effect */
    border-color: var(--text-color);
}


/* right side image container*/
.hero-section .headshot{
    flex: 2; /* */
    display: flex; /* get fixed with right bar*/
    justify-content: right; /* aligns the image flush to the right side*/
}

/* Titles above navbars */
.hero-section .links-title {
    font-size: 18px;
    font-weight: bold;
    margin-top: 20px;      /* space above title so it doesn't touch the paragraph */
    margin-bottom: 8px;    /* space between title and links */
    color: var(--text-color);
}




.hero-section .headshot img {
  width: 350px;        /* sets a nice fixed width */
  border-radius: 10%;  /* optional: makes it round like a profile */
  object-fit: cover;   /* prevents stretching */ 
}


/* TESTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT */

/* ------------------ NEW MORE INFO BAR ------------------ */
/* ------------------ FIXED MORE INFO BAR ------------------ */
.dropdown-menu {
    display: inline-block;      /* shrink to fit content */
    background-color: var(--box-color); /* solid background */
    border-radius: 8px;
    padding: 5px 10px;
    margin-top: 10px;
}

/* Main menu buttons */
.dropdown-menu .menu {
    list-style: none;
    display: flex;            
    gap: 10px;                
    justify-content: flex-start;
    margin: 0;
    padding: 0;
}

.menu > li {
    position: relative;       
}

.menu-btn {
    background-color: var(--link-color);  
    color: var(--text-color);
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: 0.2s;
}

.menu-btn:hover {
    background-color: var(--text-color);
    color: var(--link-color);
}

/* Submenu dropdown */
.submenu {
    display: none;             
    position: absolute;
    top: 100%;                 
    left: 0;
    background-color: var(--box-color); 
    border-radius: 8px;
    padding: 10px 0;
    min-width: 250px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    z-index: 10;
    flex-direction: column;
}

/* Show submenu on hover */
.menu > li:hover > .submenu {
    display: flex;
    animation: fadeIn .2s ease-out;
}

/* Submenu links */
.submenu a {
    color: var(--text-color);
    padding: 8px 20px;
    text-decoration: none;
    display: block;
    transition: 0.2s;
}

.submenu a:hover {
    background-color: var(--link-color);
    color: var(--text-color);
}

/* Sub-submenu (nested dropdown) */
.subsubmenu {
    display: none;
    position: absolute;
    left: 100%;               
    top: 0;
    background-color: var(--box-color);
    border-radius: 8px;
    padding: 10px 0;
    min-width: 250px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    z-index: 20;
    flex-direction: column;
}

.submenu li:hover > .subsubmenu {
    display: flex;
}

/* Sub-submenu links */
.subsubmenu a {
    color: var(--text-color);
    padding: 8px 20px;
    text-decoration: none;
    display: block;
    transition: 0.2s;
}

.subsubmenu a:hover {
    background-color: var(--link-color);
    color: var(--text-color);
}

/* Animation for dropdowns */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ----------------- Responsive fix ----------------- */
@media (max-width: 740px) {
    .dropdown-menu {
        margin-left: 20px; 
        width: auto;             /* shrink to parent/content */
        padding: 5px;            
    }

    .dropdown-menu .menu {
        flex-direction: column;
        gap: 5px;
        padding: 0;
    }

    .submenu, .subsubmenu {
        position: relative;      
        left: 0;
        top: 0;
        width: 100%;            
        box-shadow: none;        /* simpler on mobile */
    }

    .subsubmenu {
        padding-left: 15px;     
    }

    .menu-btn {
        width: 100%;             /* expand button full width of toolbar */
        text-align: left;
    }

    .submenu a,
    .subsubmenu a {
        width: 100%;             
        padding: 8px 15px;
    }
}








/* TESTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT */




/* Submenu visible class */
/* javascript add class name to open*/
.submenu.open {
    display: flex; /* shows submenu when class is added */
    animation: fadeIn .2s ease-out; /* effect*/
}

/* define animition effect of subsubmenu*/
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Basic submenu style */
.submenu {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    background-color: #fff;
    list-style: none;
    padding: 0;
    margin: 0;
    border: 1px solid #ccc;
}

/* Show submenu on hover */
.menu li:hover > .submenu {
    display: block;
}

/* Sub-submenu style */
.subsubmenu {
    display: none;
    position: absolute;
    left: 100%; /* Appear to the right of parent */
    top: 0;
    border-radius: 10px;
    background-color: #a39e9e;
    list-style: none;
    padding: 10px;          /* adjust padding inside the box */
    margin: 0;
    border: 1px solid #9e9090;
    width: 250px;           /* set the width of the box */
    min-width: 200px;       /* optional: minimum width */
    max-width: 300px;       /* optional: maximum width */
    box-sizing: border-box; /* ensures padding doesn't increase width */
}


/* Show sub-submenu on hover */
.submenu li:hover > .subsubmenu {
    display: block;
}

/* Optional styling */
.submenu li, .subsubmenu li {
    padding: 5px 10px;
}

.submenu li a, .subsubmenu li a {
    text-decoration: none;
    color: #333;
    display: block;
}


/* ------------------------------------------------------------------*/
/* ----------Skills SECTION -----------------------------------------*/
/* ------------------------------------------------------------------*/

/* */
.skills-section {
    padding: 0 50px;
    margin-bottom: 100px;
}

.skills-section h2 {
    font-size: 35px;
    text-align: center;
    margin-bottom: 20px;
}

.skills-section .text {
    text-align: center;
    margin-bottom: 40px;
}

/* === NEW: Category layout === */
.skills-section .skills-categories {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.skills-section .category h3 {
    font-size: 25px;
    margin-bottom: 15px;
    text-align: center;
    color: var(--text-color);
    font-weight: normal; /* remove bold */
}

/* Reuse your original cell styles */
.skills-section .cells {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.skills-section .cells .cell {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;

    width: 200px;
    padding: 10px 20px;
    margin: 10px;

    border: 1px solid #4a76ee;
    border-radius: 5px;
}

.skills-section .cells .cell img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    border-radius: 2px;
}

.skills-section .cells .cell span {
    font-size: 18px;
}

/* ------------------------------------------------------------------*/
/* ----------WORK SECTION -------------------------------------------*/
/* ------------------------------------------------------------------*/

.work-section {
    padding: 0 50px; /* horizontal spacing edges */
    margin-bottom: 100px; /* space before next session */
}

/* */
.work-section h2 {
    font-size: 35px; /* text size */
    margin-bottom: 30px; /* space below heading*/
    text-align: center; /* centers the heading text */
}
/* */
.work-section .work-group {
    display: flex; /*creates a flexible layout */
    flex-direction: column; /* stacks items vertically */
    gap: 30px; /* space between educatin items */
}
/* */
.work-section .work-item {
    background-color: #b0b0b0; /* background color box*/
    padding: 20px; /* spacing inside the card  */
    border-radius: 5px; /* rounded corners */
    border-left: 5px solid var(--link-color); /* colored accent bar*/
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); /* soft, subtle shadow  */
}
/* */
.work-section .work-item h3 {
    margin-bottom: 10px; /*  space between title and next text*/
    font-size: 25px; /* size text*/
    color: var(--box-color); /* color text */
}
/* */
.work-section .work-item p {
    margin-bottom: 5px; /*space between lines */
    font-size: 16px; /* text size*/
    color: var(--box-color); /* text volor*/
}




/* ------------------------------------------------------------------*/
/* ----------EDUCTAION SECTION -------------------------------------------*/
/* ------------------------------------------------------------------*/

.education-section {
    padding: 0 50px; /* horizontal spacing edges */
    margin-bottom: 100px; /* space before next session */
}

/* */
.education-section h2 {
    font-size: 35px; /* text size */
    margin-bottom: 30px; /* space below heading*/
    text-align: center; /* centers the heading text */
}
/* */
.education-section .education-group {
    display: flex; /*creates a flexible layout */
    flex-direction: column; /* stacks items vertically */
    gap: 30px; /* space between educatin items */
}
/* */
.education-section .education-item {
    background-color: #4baeeb; /* background color box*/
    padding: 20px; /* spacing inside the card  */
    border-radius: 5px; /* rounded corners */
    border-left: 5px solid var(--link-color); /* colored accent bar*/
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); /* soft, subtle shadow  */
}
/* */
.education-section .education-item h3 {
    margin-bottom: 10px; /*  space between title and next text*/
    font-size: 25px; /* size text*/
    color: var(--box-color); /* color text */
}
/* */
.education-section .education-item p {
    margin-bottom: 5px; /*space between lines */
    font-size: 16px; /* text size*/
    color: var(--box-color); /* text volor*/
}

/* ------------------------------------------------------------------*/
/* ----------PROJECTS SECTION -------------------------------------------*/
/* ------------------------------------------------------------------*/

.project-section{
    padding: 0 50px; /* horizontal spacing from page edges*/
    margin-bottom: 100px; /*space below section*/
}

/* */
.project-section h2 {
    font-size: 35px;/* define size*/
    margin-bottom: 30px; /* space below heading */
    text-align: center;
}

/* */
.project-section .text{
    text-align: center; /* centers text in section*/
    margin-bottom: 20px; /*spacing between text and project items  */
}

.project-section .project-item {
    display: flex;                 /* side by side layout */
    justify-content: space-between;
    align-items: center;
    background-color: var(--box-color);
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    gap: 20px;
}

.project-section .project-text {
    flex: 2;                        /* text takes more space */
    color: var(--text-color);
}

.project-section .project-text h3 {
    font-size: 25px;
    margin-bottom: 10px;
}

.project-section .project-text p {
    margin-bottom: 5px;
    font-size: 16px;
}

.project-section .project-text .tools {
    font-style: italic;
    color: var(--link-color);
}

.project-section .project-image {
    flex: 1;                        /* image smaller than text */
    display: flex;
    justify-content: flex-end;      /* align image to the right */
}

.project-section .project-image img {
    width: 100px;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
}


.project-section .projects-container {
    display: flex;
    flex-wrap: wrap;          /* allow multiple rows */
    gap: 20px;                /* space between items */
}

.project-section .project-item {
    flex: 1 1 calc(50% - 20px);  /* 50% width minus gap for 2 columns */
    display: flex;                 /* keep text-image side by side */
    justify-content: space-between;
    align-items: center;
    background-color: var(--box-color);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* ------------------------------------------------------------------*/
/* ----------PROJECTS OVERVIEUW SECTION -------------------------------------------*/
/* ------------------------------------------------------------------*/


/* --------project list--------------------------------------------------------*/
/* SECTION 4: project list */

/* --------------------------- */
/*  ALL PROJECTS LIST CONTAINER */
/* --------------------------- */
/* --------------------------- */
/* ALL PROJECTS LIST (MATCHES PROJECT-SECTION STYLE) */
/* --------------------------- */

.project-list-container {
    padding: 0 50px;
    margin-bottom: 100px;
}

/* Title (same as project-section h2) */
.project-list-container h2 {
    font-size: 35px;
    margin-bottom: 30px;
    text-align: center;
}


/* Category box (same box style as .project-item) */
.project-list-container .project-category {
    background-color: var(--box-color);
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Category title (similar size to project-item h3) */
.project-list-container .project-category h3 {
    font-size: 25px;
    margin-bottom: 15px;
    color: var(--text-color);
}

/* Remove bullets */
.project-list-container ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Each project link styled like project text */
.project-list-container li a {
    display: block;
    padding: 10px 15px;
    margin-bottom: 10px;
    background-color: rgba(255,255,255,0.05);
    border-radius: 8px;
    border: 2px solid var(--link-color);
    color: var(--text-color);
    transition: 0.2s;
    font-size: 16px;
}

/* Hover style matches your button/link style */
.project-list-container li a:hover {
    background-color: var(--link-color);
    color: var(--text-color);
    border-color: var(--text-color);
}

/* Grid for project links inside each category */
.project-list-container ul.project-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

/* Responsive like your project-section */
@media (max-width: 740px) {
    .project-list-container {
        padding: 0 20px;
    }
}

@media (max-width: 740px) {
    .project-list-container ul.project-links {
        grid-template-columns: 1fr;
    }
}



/* ------------------------------------------------------------------*/
/* ----------CONTACT SECTION ----------------------------------------*/
/* ------------------------------------------------------------------*/

.contact-section {
  padding: 0 50px; /* horizontal padding*/
  margin-bottom: 100px; /*space below section */
}
/* */
.contact-section h2 {
  font-size: 35px; /* text size */
}
/* */
.contact-section .group {
  display: flex; /* horizontal layout */
  gap: 50px; /* space between text and form*/
}
/* */
.contact-section .group .text {
  flex: 3; /* takes half the width */
  margin-top: 20px; /*  spacing from top  */
}

/* */
.contact-section .group form {
  flex: 3; /* same widht as text */
  display: flex; /* flex container */
  flex-direction: column; /*stack input fields vertically */
}

/* */
.contact-section .group form input,
.contact-section .group form textarea {
  font-family: 'Poppins', sans-serif;  /* consistent font */
  border: 2px solid var(--link-color); /* blue border for input */
  background-color: transparent;       /* transparent background */
  padding: 10px;                       /* inner spacing */
  margin-bottom: 15px;                 /* space between fields */
  outline: none;                        /* removes default outline */
  resize: none;                         /* disables textarea resizing */
}


/* Form inputs & textarea */
.contact-section .group form button {
  font-size: 16px;                      /* readable button text */
  font-family: 'Poppins', sans-serif;  /* matches inputs */
  color: #fff;                          /* white text */
  background-color: var(--link-color);  /* themed button color */
  border: none;                         /* no border */
  height: 50px;                         /* consistent button height */
  cursor: pointer;                      /* pointer on hover */
  transition: .1s;                      /* smooth hover effect */
}

/*Button hover effect */
.contact-section .group form button:hover {
  filter: brightness(.9);
}

/* ------------------------------------------------------------------*/
/* -------------------------RESPONSIVE DESIGN------------------------*/
/* ------------------------------------------------------------------*/
/* */
@media (max-width: 850px){
    /* section 1  hero*/
    .hero-section .text h2 { 
        font-size: 35px; /* reduce size hero*/
    }

    /* */
    nav .center {
        display: none; /*Hides the center navigation links on smaller screens. */
    }
}

/* ------his CSS applies only to screens 740px wide or smaller------------------------------------------*/
/* */
@media (max-width: 740px){
    /* section 1 hero*/
    .hero-section  {
        flex-direction: column-reverse; /* Changes the hero layout from horizontal to vertical. */
    }
    /* */
    .hero-section .headshot img {
        width: 300px; /* Reduces the image width from 350px → 300px.*/
    }

    /* SECTION 4: education */
    .education-section {
        padding: 0 20px; /* Reduces horizontal padding from 50px → 20px */
    }

    /* section projects*/
    .project-section .project-item {
        flex-direction: column;     /* stack text and image vertically */
        align-items: flex-start;
    }
    
    .project-section .project-image {
        justify-content: flex-start;
        margin-top: 15px;
    }

    .project-section .project-image img {
        width: 30%;
    }

    /* SECTION 4: Contact */
    .contact-section .group {
        flex-direction: column; /*Changes the layout of the contact group from horizontal → vertical */
    }
}


/* -------------media query for screens 600px and below-----------------------------------------------*/
/* make nav bar responive */
@media (max-width: 600px){
    /* nav bar */
    nav {
        padding: 0 20px; /*reduce padding */
    }

    nav .right a {
        font-size: 20px; /* reduce padding*/
    }

    nav .right a:last-child {
        color: var(--textcolor); /* text color for last link */
        background-color: transparent; /* remove button background */
        padding: 0; /* remove extra spacing */
    }
    /* if it is to display is to small it disapears the text */
    nav .right a span {
        display: none; /*  hide extra text/icons if needed */

    }

    /* sectio 1 her */
    .hero-section {
        padding: 0 20px; /* reduce*/
    }

    /* */
    .hero-section .text h2 {
        font-size: 30px; /* reduce */
    }

    /* section 2: skills*/
    .skills-section{
        padding: 0 20px; /*reduce */
    }

    .skills-section .cells .cell span{
        font-size: 16px; /* reduce */
    }

    /* SECTION 3: Testimony */
    .project-section {
        padding: 0 20px; /* reduce */
    }   

    /* SECTION 4: Contact */
    .contact-section {
        padding: 0 20px; /* reduce */
    }    
}

/* ------------------------------------------------------------------*/
/* ----------OTHER PAGE -------------------------------------------*/
/* ------------------------------------------------------------------*/

/* ------------------------------------------------------------------*/
/* ----------RESEARCH PAGE -------------------------------------------*/
/* ------------------------------------------------------------------*/

/* Research section */
.research-section {
    padding: 0 50px;
    margin-bottom: 100px;
    display: flex;
    flex-direction: column;
    gap: 40px; /* space between items */
}

/* Each research project box */
.research-item {
    background-color: var(--box-color);
    color: var(--text-color);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.research-item h3 {
    font-size: 25px;
    margin-bottom: 10px;
}

.research-item .summary {
    font-size: 16px;
    margin-bottom: 15px;
}

.research-item iframe {
    border: 2px solid var(--link-color);
    border-radius: 5px;
}

/* ---------------- Content List (Table of Contents) ----------------- */
/* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */

/* ------------------ CONTENT LIST TOOLBAR ALIGNED WITH HERO TEXT ------------------ */
/* Remove extra space between hero-section and content-list */
.content-list {
    
    display: inline-block;                 
    background-color: var(--box-color);    
    border-radius: 8px;
    /* align-items: center;  */
    padding: 5px 10px;
    margin-top: 10px;        /* smaller gap from hero-section */
    margin-bottom: 20px;     /* spacing below toolbar if needed */
    margin-left: 50px;       /* align with hero-section text */
}

/* Remove extra spacing above h3 */
.content-list h3 {
    margin: 10px 0 10px 0;   /* smaller vertical spacing */
}



/* Align left with hero text */
.content-list {
    margin-left: 50px;  /* match hero-section padding */
}

/* Horizontal menu */
.content-list ul {
    list-style: none;
    display: flex;
    gap: 10px;                             /* spacing between buttons */
    margin: 0;
    padding: 0;
}

/* Parent menu items */
.content-list ul li {
    position: relative;                     /* needed for submenus */
}

/* Menu links (main buttons) */
.content-list ul li a {
    display: block;
    padding: 8px 16px;
    background-color: var(--link-color);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 5px;
    transition: 0.2s;
}

.content-list ul li a:hover {
    background-color: var(--text-color);
    color: var(--link-color);
}



/* ---------------- Submenu and sub-submenu same as More Info Bar ---------------- */
.content-list ul li .submenu,
.content-list ul li .submenu .subsubmenu {
    display: none;
    position: absolute;
    background-color: var(--box-color);
    border-radius: 8px;
    padding: 10px 0;
    min-width: 250px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    flex-direction: column;
    z-index: 10;
}

/* Show submenu on hover */
.content-list ul li:hover > .submenu {
    display: flex;
    animation: fadeIn .2s ease-out;
}

/* Submenu links */
.content-list ul li .submenu a,
.content-list ul li .submenu .subsubmenu a {
    color: var(--text-color);
    padding: 8px 20px;
    text-decoration: none;
    display: block;
    transition: 0.2s;
}

.content-list ul li .submenu a:hover,
.content-list ul li .submenu .subsubmenu a:hover {
    background-color: var(--link-color);
    color: var(--text-color);
}

/* Sub-submenu show */
.content-list ul li .submenu li:hover > .subsubmenu {
    display: flex;
}

/* Animation for dropdowns */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ----------------- Responsive fix ----------------- */
@media (max-width: 740px) {
    .content-list {
                      /* match responsive hero padding */
        /* margin-left: 20px;    */
        width: auto;                        
        padding: 5px;
    }

    .content-list ul {
        flex-direction: column;
        gap: 5px;
        padding: 0;
    }

    .content-list ul li .submenu,
    .content-list ul li .submenu .subsubmenu {
        position: relative;
        left: 0;
        top: 0;
        width: 100%;
        box-shadow: none;
    }

    .content-list ul li .submenu .subsubmenu {
        padding-left: 15px;
    }

    .content-list ul li a {
        width: 100%;
        text-align: left;
    }

    .content-list ul li .submenu a,
    .content-list ul li .submenu .subsubmenu a {
        width: 100%;
        padding: 8px 15px;
    }
}



/* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */

/*arduino*/
/* Research PDFs & Videos */
.research-item .research-embed,
.research-item .research-video {
    width: 100%;           /* full width of container */
    max-height: 600px;     /* optional: limit height */
    border: 2px solid var(--link-color);
    border-radius: 5px;
    display: block;        /* ensures it behaves like a block */
    margin-top: 15px;      /* spacing from text */
    object-fit: cover;     /* ensures video fits nicely */
}

/* Video inside research-item */
.research-item .research-video {
    width: 100%;          /* full width of container */
    height: auto;         /* maintain aspect ratio */
    max-height: 400px;    /* optional: limits size */
    border: 2px solid var(--link-color);
    border-radius: 5px;
    margin-top: 15px;
    display: block;
    object-fit: contain;  /* show full video */
}

/* Optional: shrink default controls slightly on smaller videos */
.research-item .research-video::-webkit-media-controls-panel {
    height: 35px; /* default is usually taller */
}

