/* Variables */
:root {
    --yellow: #F7DF1E;
    --black: #222222;
    --dark-gray: #333333;
    --light-gray: #EEEEEE;
    --white: #FFFFFF;
    --yellow-hover: #f5d500;
    --transition: all 0.3s ease;
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    line-height: 1.6;
    background-color: var(--black);
    color: var(--white);
}

a {
    text-decoration: none;
    color: var(--yellow);
    transition: var(--transition);
}

a:hover {
    color: var(--yellow-hover);
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
    opacity: 1;
    transform: translateY(0);
}

h1, h2, h3, h4 {
    font-weight: 700;
    margin-bottom: 20px;
}

h2 {
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
    margin-bottom: 50px;
}

h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -10px;
    height: 4px;
    width: 60px;
    background-color: var(--yellow);
}

/* --- Style for the new Section Location element --- */
.section-location {
    font-size: 1rem;
    color: var(--light-gray);
    margin-bottom: 40px;
    margin-top: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.section-location i {
    margin-right: 8px;
    color: var(--yellow);
    font-size: 1rem;
}
/* --- End of section location styles --- */

.btn {
    display: inline-block;
    background-color: var(--yellow);
    color: var(--black);
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn:hover {
    background-color: var(--yellow-hover);
    transform: translateY(-3px);
}

/* Header */
header {
    background-color: var(--black);
    padding: 15px 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Remove or comment out the H1 style */
/* 
header h1 {
    font-size: 2rem;
    color: var(--yellow);
    margin-bottom: 0;
} 
*/

/* --- Style for the Header Logo --- */
.header-logo {
    height: 40px;
    width: auto;
    display: block;
}
/* --- End Logo Style --- */

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    color: var(--white);
    font-weight: 500;
}

nav ul li a:hover {
    color: var(--yellow);
}

/* Hero */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    background-color: rgba(51, 51, 51, 0.6);
    position: relative;
    overflow: hidden;
}

#hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        45deg,
        var(--black),
        var(--black) 10px,
        var(--dark-gray) 10px,
        var(--dark-gray) 20px
    );
    opacity: 0.1;
}

#hero h2 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

#hero h2 span {
    color: var(--yellow);
}

#hero p {
    font-size: 1.5rem;
    max-width: 600px;
}

/* About */
#about {
    background-color: rgba(51, 51, 51, 0.6);
}

/* Projects */
#projects {
    background-color: var(--dark-gray);
    padding: 80px 0;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: var(--black);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.project-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    border-bottom: 2px solid var(--yellow);
}

.project-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-info h3 {
    margin-top: 0;
    color: var(--white);
}

.project-info p {
    color: var(--light-gray);
    flex-grow: 1;
    margin-bottom: 15px;
}

.project-links {
    margin-top: auto;
}

.project-links .btn {
    display: inline-block;
    padding: 8px 15px;
}

/* Experience */
#experience {
    background-color: rgba(51, 51, 51, 0.6);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background-color: var(--yellow);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 60px;
}

.timeline-content {
    position: relative;
    padding: 20px;
    background-color: var(--black);
    border-radius: 8px;
    width: calc(50% - 30px);
    margin-left: calc(50% + 30px);
    border-left: 4px solid var(--yellow);
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: 0;
    margin-right: calc(50% + 30px);
    border-left: none;
    border-right: 4px solid var(--yellow);
}

.timeline-content h3 {
    margin-bottom: 5px;
}

.timeline-content h4 {
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--light-gray);
}

.timeline-content .date {
    color: var(--yellow);
    font-weight: 500;
    margin-bottom: 10px;
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--yellow);
    margin-right: 15px;
}

.social-links {
    display: flex;
    margin-top: 30px;
}

.social-links a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background-color: var(--dark-gray);
    border-radius: 50%;
    margin-right: 15px;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--yellow);
    transform: translateY(-5px);
}

.social-links a:hover i {
    color: var(--black);
}

.social-links a i {
    font-size: 1.2rem;
    color: var(--yellow);
    transition: var(--transition);
}

.contact-form {
    background-color: var(--dark-gray);
    padding: 30px;
    border-radius: 10px;
    border-left: 4px solid var(--yellow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background-color: var(--black);
    border: 1px solid var(--dark-gray);
    border-radius: 5px;
    color: var(--white);
    font-size: 1rem;
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--yellow);
}

/* Footer */
footer {
    background-color: var(--black);
    color: var(--light-gray);
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-left .footer-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--white);
}

.footer-center p {
    margin: 0;
    font-size: 0.9rem;
    text-align: center;
}

.footer-right.social-links {
    display: flex;
    gap: 20px;
}

.footer-right.social-links a {
    color: var(--light-gray);
    font-size: 1.4rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.footer-right.social-links a:hover {
    color: var(--yellow);
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 992px) {
    .timeline::before {
        left: 30px;
    }
    
    .timeline-content {
        width: calc(100% - 80px);
        margin-left: 80px;
    }
    
    .timeline-item:nth-child(even) .timeline-content {
        margin-left: 80px;
        margin-right: 0;
        border-left: 4px solid var(--yellow);
        border-right: none;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
    }
    
    nav ul {
        margin-top: 20px;
    }
    
    nav ul li {
        margin-left: 15px;
        margin-right: 15px;
    }
    
    #hero h2 {
        font-size: 2.5rem;
    }
    
    section {
        padding: 60px 0;
    }
    
    .project-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .footer-left, .footer-center, .footer-right {
        width: 100%;
    }
    
    .footer-right.social-links {
        justify-content: center;
        margin-top: 10px;
    }
}

/* Styles for the new cube flow */
#cube-animation {
    background-color: var(--black);
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

/* Container for the actual flowing elements */
.cube-flow-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.flowing-cube {
    position: absolute;
    width: 50px;
    height: 50px;
    opacity: 0.7;
    animation-name: flowAcross;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    will-change: transform, top, opacity;
    left: -100px;
}

/* --- New inner rotator element --- */
.cube-rotator {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation-name: rotateCubeSimple;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}
/* --- End of rotator element --- */

/* --- Style for the cube faces (adjust selector) --- */
.cube-rotator .face {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: rgba(34, 34, 34, 0.4);
    border: 1px solid var(--yellow);
    opacity: 0.8;
}

/* Position each face in 3D space (adjust selector) */
.cube-rotator .face.front  { transform: rotateY(  0deg) translateZ(25px); }
.cube-rotator .face.back   { transform: rotateY(180deg) translateZ(25px); }
.cube-rotator .face.left   { transform: rotateY(-90deg) translateZ(25px); }
.cube-rotator .face.right  { transform: rotateY( 90deg) translateZ(25px); }
.cube-rotator .face.top    { transform: rotateX( 90deg) translateZ(25px); }
.cube-rotator .face.bottom { transform: rotateX(-90deg) translateZ(25px); }
/* --- End of face styles --- */

/* Keyframes for horizontal movement (Changed to use 'left') */
@keyframes flowAcross {
    0% {
        left: -100px;
    }
    100% {
        left: 100%;
    }
}

/* Rotation keyframes (ensure ONLY rotation) */
@keyframes rotateCubeSimple {
     0% {
        transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    }
    100% {
        transform: rotateX(360deg) rotateY(720deg) rotateZ(360deg);
    }
}
/* --- End of rotation keyframes --- */

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: 
        linear-gradient(to right, var(--yellow) 1px, transparent 1px) 0 0,
        linear-gradient(to bottom, var(--yellow) 1px, transparent 1px) 0 0;
    background-size: 50px 50px;
    z-index: 0;
    opacity: 0.2;
    background-color: transparent;
    transform-origin: center center;
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
    animation: rotateGrid 120s linear infinite;
    pointer-events: none;
}

@keyframes rotateGrid {
    0% {
        transform: translateZ(0) rotate(0deg);
    }
    100% {
        transform: translateZ(0) rotate(360deg);
    }
}

/* Create a separate animation for the pulse effect */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.2;
    background-color: transparent;
    pointer-events: none;
    animation: pulseEffect 10s ease-in-out infinite alternate;
}

@keyframes pulseEffect {
    0% {
        background-color: rgba(247, 223, 30, 0.01);
    }
    100% {
        background-color: rgba(247, 223, 30, 0.03);
    }
}

/* Make section backgrounds more transparent */
#hero, #about, #experience, #cube-animation, #projects, #contact {
    position: relative;
    z-index: 1;
    background-color: rgba(34, 34, 34, 0.5);
}

/* Remove after pseudo-elements and use direct background colors */
#hero::after, #about::after, #experience::after, #cube-animation::after, #projects::after, #contact::after {
    display: none;
}

#hero {
    background-color: rgba(51, 51, 51, 0.6);
}

#about {
    background-color: rgba(51, 51, 51, 0.6);
}

#experience {
    background-color: rgba(51, 51, 51, 0.6);
}

/* Yellow animated accent corners */
body::after {
    display: none;
}

@keyframes pulseCorners {
    0% {
        opacity: 0;
        background-size: 0;
    }
    100% {
        opacity: 0;
        background-size: 0;
    }
}

/* Add a body background color */
body {
    background-color: var(--black);
} 

/* PBR Showcase Section */
#pbr-showcase {
    background: rgba(34, 34, 34, 0.7);
    padding: 80px 0 60px 0;
    text-align: center;
}

.pbr-container {
    max-width: 800px;
    margin: 0 auto;
}

#pbr-showcase h2 {
    color: var(--yellow);
    font-size: 2.2rem;
    margin-bottom: 30px;
}

.pbr-gif-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.pbr-gif {
    width: 100%;
    max-width: 600px;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
    border: 2px solid var(--yellow);
    background: #222;
}

.pbr-caption {
    color: var(--light-gray);
    font-size: 1.1rem;
    margin-top: 10px;
}

/* Responsive adjustments */
@media (max-width: 700px) {
    .pbr-gif {
        max-width: 100%;
        height: auto;
    }
    .pbr-container {
        padding: 0 10px;
    }
}