* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

h1,
ul,
li {
    display: inline;
}

.one {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: black;
    color: rgb(180, 200, 200);
    height: 80px;
    padding: 30px 25px 0;
}

.on {
    padding-left: 1100px;
    margin-top: 30px;
}

.search {
    padding: 50px 0 0 200px;
    width: 200px;
}

input {
    width: 900px;
    height: 25px;
    padding-left: 20px;
    color: black;
    border: 1px solid rgb(23, 23, 23);
}

li:hover,
h1:hover,
input:hover,
.box:hover,
.low1:hover,
.low2:hover,
.four:hover {
    cursor: pointer;
    transition: all 8s cubic-bezier(0.075, 0.82, 0.165, 1) 1s;
}

li:hover {
    color: rgb(74, 178, 219);
}

h1:hover {
    color: rgb(192, 233, 47);
    transform: translateX(100px);
}

input:hover {
    color: rgb(196, 13, 129);
    background-color: rgb(192, 233, 47);
    transform: translateX(100px);
}

.box,
.low2 {
    width: 300px;
    text-align: justify;
    border: 2px solid;
    padding-top: 200px;
    padding-bottom: 10px;
    display: inline-flex;
}

.box {
    border-color: rgb(129, 19, 19);
    padding: 10px 50px 10px 10px;
    margin-top: 50px;
    background-color: rgb(230, 241, 29);
    animation: box-animation 5s ease 1s 1;
}

.box:hover {
    color: rgb(196, 13, 129);
    background-color: rgb(132, 24, 53);
    transform: translateX(-100px);
}

.low2 {
    border-color: rgb(24, 24, 24);
    padding: 20px;
    margin: 150px 0 0 50px;
    background-color: rgb(207, 241, 11);
    animation: low2-animation 5s ease 1s 2;
}

.low2:hover {
    color: rgb(88, 17, 82);
    background-color: rgb(91, 219, 159);
    transition-delay: 4s;
    transform: translateX(-100px);
}

.three {
    text-align: center;
    padding-top: 100px;
    color: #acf50d;
}

.four {
    text-align: justify;
    padding: 20px;
    background-color: rgb(215, 21, 82);
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
    font-style: italic;
}

.four:hover {
    background-color: black;
    transform: translateX(100px);
    transition-delay: 4s;
}

img {
    max-width: 100%;
    height: auto;
}

.portfolio-container {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    /* aligns boxes side by side */
    justify-content: center;
    /* optional: center the row */
    gap: 2rem;
    padding: 2rem;
    font-style: poppins, sans-serif;
}


/* Individual Portfolio Box Styling */

.portfolio-box {
    background: #222;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    width: 320px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    font-style: poppins, sans-serif;
}

.portfolio-box:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 255, 255, 0.2);
}

.portfolio-box img {
    width: 100%;
    height: auto;
    display: block;
}


/* Overlay Layer */

.portfolio-layer {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    text-align: center;
    min-height: 220px;
}

.portfolio-layer h4 {
    height: 2.5rem;
    /* reserves fixed height for all headings */
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-layer p {
    font-size: 0.95rem;
    line-height: 1.4;
}

.portfolio-layer a {
    display: inline-block;
    margin-top: 1rem;
    color: #0ffdfd;
    font-size: 1.2rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.portfolio-layer a:hover {
    color: #f53b3b;
}

.portfolio-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: auto;
    gap: 2rem;
    padding: 2rem;
}

.portfolio-box {
    width: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-box:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 255, 255, 0.2);
}


/* Responsive fallback: stack to 2 cols under 900px, 1 col under 600px */

@media (max-width: 900px) {
    .portfolio-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .portfolio-container {
        grid-template-columns: 1fr;
    }
}

.heading {
    text-align: center;
    margin-bottom: 2rem;
    color: #222;
    text-decoration: solid;
}

.home-button-container {
    margin-top: 2rem;
    text-align: center;
}


/* Back to Home Button */

.home-button {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
    background-color: #272724;
    border: 2px solid #16e1f4;
    border-radius: 8px;
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(19, 1, 1, 0.7);
    transition: background-image 0.4s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.home-button:hover {
    background-image: linear-gradient(45deg, #f91125, #b2e813);
    color: #f0faff;
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(7, 240, 244, 0.8);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.4);
}