:root {
    --gray-900: #111111;
    --gray-800: #1f1f1f;
    --gray-700: #2e2e2e;
    --gray-500: #6b7280;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;

    --p5-red: #e60012;
}

body {
    font-family: "Arsenal", sans-serif;
    background-color: var(--gray-900);
    background-image: radial-gradient(var(--gray-700) 2px, transparent 2px);
    background-size: 30px 30px;
    margin: 0;
    padding: 0;
    text-align: center;
    color: white;
    min-height: 100vh;
}

.main {
    background-color: transparent;
}

h1 {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 450%;
    color: var(--p5-red);
    font-style: italic;
    text-shadow: 4px 4px 0 black;
    margin-bottom: 0.2vw;
    margin-top: 0.2vw;
    letter-spacing: 1px;
}

h2 {
    font-size: 180%;
    margin: 0.25em;
    margin-top: 0;
    color: white;
}

/* Navigation */
.main-nav {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 20px;
    z-index: 100;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 8px 16px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 90%;
    letter-spacing: 1px;
}

.nav-link:hover {
    color: var(--p5-red);
    border-color: var(--p5-red);
    text-shadow: 2px 2px 4px rgba(230, 0, 18, 0.7);
}

.nav-link.active {
    color: var(--p5-red);
    border-color: var(--p5-red);
    background-color: rgba(230, 0, 18, 0.1);
}

.icons {
    margin-top: 1rem;
}
.icons i {
    font-size: 2.5rem;
}
a i {
    color: white;
}

.contact-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5em;
    transform: skew(-10deg);
}

.contact-info i {
    margin-right: 0.5em;
}

.contact-info p {
    margin: 0;
}

.contact-info>* {
    transform: skew(10deg);
}

#box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: black;
    text-align: center;
    color: white;
    font-weight: 600;
    text-shadow: none;
    padding: 16px 24px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 8px 8px 0px 2px var(--p5-red);
    border: 2px solid var(--p5-red);
    line-height: 1.5;
    width: 75%;
    font-size: 2.5vh;
    position: relative;
    overflow: hidden;
}

.videobox {
    transform: skew(5deg) !important;
    box-shadow: -8px 8px 0px 2px var(--p5-red) !important;
}

.videobox>* {
    transform: skew(-5deg);
}

.videobox h2 {
    transform: skew(-10deg);
}

.video-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    justify-content: center;
    margin-bottom: 1rem;
}

.tag {
    background-color: transparent;
    color: white;
    padding: 4px 10px;
    font-size: 70%;
    font-weight: bold;
    text-transform: uppercase;
    transform: skew(-15deg);
    display: inline-block;
    border: 1px solid var(--p5-red);
    transition: background-color 0.3s ease, color 0.3s ease;
}
.tag.button-container {
    transform: skew(0deg);
}

a.tag.button-container {
    width: 75%;
    margin-top: .75em;
    margin-left: auto;
    margin-right: auto;
    display: block;
    text-align: center;
    border: 2px solid var(--p5-red);
}

a.tag.button-container>span {
    font-size: 150%;
    gap: 10px !important;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: skew(0deg);
}

a.tag.button-container>span>i {
    color: whitesmoke;
}

.tag:hover {
    background-color: var(--p5-red);
    color: white;
}
/* We only skew the text back 15deg when we're inside the showcase box */
.tag span {
    transform: skew(15deg);
    display: block;
}

video, img, iframe {
    /* border: 3px solid var(--p5-red); */
    width: 100%;
    height: 480px;
    max-height: 480px;
    object-fit: contain;
    display: inline-block;
    background-color: black;
    box-sizing: border-box;
}

#boxrow {
    display: flex;
    flex-direction: row;
    align-items: center;
}

a {
    color: whitesmoke;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    font-weight: bold;
}

a:hover {
    color: var(--p5-red);
    text-shadow: 2px 2px 4px rgba(230, 0, 18, 0.7);
}

i {
    color: var(--p5-red);
    text-shadow: 1px 1px 0 black;
}

.media {
    width: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.highlight {
    color: var(--p5-red);
    font-weight: bold;
    letter-spacing: 0.5px;
}

.media p a {
    color: var(--p5-red);
}

.media p a:hover {
    color: white;
}

footer {
    margin-top: 5%;
    text-align: center;
    padding: 1em;
    background-color: black;
    color: white;
    border-top: 3px solid var(--p5-red);
    font-style: italic;
}

/* Carousel Styling */
.carousel-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0 50px;
}

.carousel {
    width: 100%;
    position: relative;
    overflow: visible;
}

.project {
    display: none;
    width: 100%;
}

.project.active {
    display: block;
    animation: fadeIn 0.5s ease-in;
    width: 100%;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.carousel-arrow {
    background-color: black;
    color: white;
    border: 2px solid var(--p5-red);
    font-size: 32px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    position: absolute;
    top: 50%;
    transform: translateY(-50%) skew(-10deg);
    transition: all 0.3s ease;
}

.carousel-prev {
    left: -10px;
}

.carousel-next {
    right: -10px;
}

.carousel-arrow:hover {
    background-color: var(--p5-red);
    color: white;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    margin-top: 15px;
    gap: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    background-color: var(--gray-700);
    border: 1px solid var(--p5-red);
    display: inline-block;
    border-radius: 0;
    transform: rotate(45deg);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dot.active {
    background-color: var(--p5-red);
}

/* Description box for project pages */
.description {
    border: 2px solid var(--p5-red);
    background-color: var(--gray-800);
    background-image: radial-gradient(var(--gray-700) 1px, transparent 1px);
    background-size: 10px 10px;
    color: white;
    padding: 1.5em;
    margin: 1em auto;
    transform: skew(-5deg);
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.3);
    text-shadow: 1px 1px 0 black;
    width: 95%;
    max-width: 1200px;
    box-sizing: border-box;
    text-align: left;
}

.description > * {
    transform: skew(5deg);
}

.description h2 {
    color: var(--p5-red);
    margin-bottom: 15px;
    font-size: 1.4em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.description h3 {
    color: var(--p5-red);
    margin: 10px 0;
    font-size: 1.2em;
}

.description p {
    line-height: 1.6;
    margin-bottom: 15px;
}

.description ul {
    line-height: 1.6;
    margin-bottom: 15px;
}

.description li {
    margin-bottom: 8px;
}

.description.smalldesc {
    width: 75%;
    min-width: 300px;
    max-width: 800px;
    padding: 1em 2em;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    text-align: left;
}

.description img {
    width: auto;
    max-width: 180px;
    height: auto;
    max-height: 180px;
    border: 2px solid var(--p5-red);
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 3px 3px 0px 0px var(--p5-red);
    transform: skew(5deg);
}

.description-text {
    flex: 1;
    font-size: 125%;
}

@media (max-width: 1024px) {
    .description.smalldesc {
        width: 70%;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 300%;
    }
    
    #box {
        width: 90%;
        padding: 12px 16px;
    }
    
    .carousel-container {
        padding: 0 40px;
    }
    
    .carousel-arrow {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
    
    .description.smalldesc {
        width: 85%;
        padding: 1em;
        min-width: 0; /* Remove minimum width constraint on mobile */
    }
    
    .description {
        flex-direction: column;
        text-align: center;
        padding: 1em;
        gap: 15px;
    }
    
    .description img {
        max-width: 150px;
        max-height: 150px;
    }
    
    .description-text {
        font-size: 110%;
    }
}

/* Small mobile screens */
@media (max-width: 480px) {
    .description.smalldesc {
        width: 95%;
        padding: 0.8em;
    }
    
    .description img {
        max-width: 120px;
        max-height: 120px;
    }
    
    .description-text {
        font-size: 100%;
    }
    
    h1 {
        font-size: 250%;
    }
    
    h2 {
        font-size: 150%;
    }
    
    #box {
        width: 95%;
        padding: 10px;
    }
}

/* Skills and Links Bar */
.skills-links-bar {
    display: flex;
    flex-direction: row;
    justify-content: space-between; /* Keep space-between */
    align-items: center;
    width: 100%;
    margin: 10px 0;
    padding: 5px 0; /* Keep vertical padding */
    border-top: 1px solid rgba(230, 0, 18, 0.3);
    border-bottom: 1px solid rgba(230, 0, 18, 0.3);
}

.skills-section {
    display: flex;
    gap: 10px;
    padding-left: 10px;
    width: 150px; /* Define a fixed width - adjust as needed */
    justify-content: flex-start; /* Align content to the start */
    flex-shrink: 0;
}

.skills-section i {
    font-size: 1.6rem;
    color: white;
    transition: color 0.3s ease;
}

.skills-section i:hover {
    color: var(--p5-red);
}

.links-section {
    display: flex;
    gap: 10px;
    padding-right: 10px;
    justify-content: flex-end; /* Align content to the end */
    width: 150px; /* MUST match the width of .skills-section */
    flex-shrink: 0;
    text-align: right; /* Helps align content within the fixed width */
}

.link-button {
    background-color: black;
    color: white;
    padding: 5px 12px;
    font-size: 80%;
    font-weight: bold;
    text-transform: uppercase;
    transform: skew(-15deg);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 2px solid var(--p5-red);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.link-button:hover {
    background-color: var(--p5-red);
    color: white;
    text-shadow: none;
}

.link-button i {
    transform: skew(15deg);
}
.link-button img {
    transform: skew(15deg);
}

.link-button span {
    transform: skew(15deg);
}

/* Ensure video-tags container itself is centered */
.video-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center; /* Center tags inside the container */
    margin: 10px auto 1rem; /* Center the container horizontally */
    width: fit-content; /* Make container only as wide as its content */
    max-width: 90%; /* Optional: prevent overflow */
    padding: 0 10px; /* Add some padding if needed */
}


/* Responsive adjustments for the bar */
@media (max-width: 1024px) {
    .skills-links-bar {
        flex-direction: column;
        gap: 10px;
        padding: 10px 0;
    }

    .skills-section, .links-section {
        width: 100%; /* Full width on tablet/mobile */
        justify-content: center; /* Center content */
        padding: 0;
        min-width: 0; /* Reset min-width */
        text-align: center; /* Center text */
    }

    .video-tags {
        width: 90%; /* Adjust width */
        margin: 10px auto 1rem;
    }
}
