/* Neo-Brutalist Design System */

:root {
    --bg-color: #f0f0f0;
    --text-color: #000000;
    --accent-color: #ccff00;
    /* Acid Green */
    --secondary-color: #ff00ff;
    /* Magenta */
    --border-width: 3px;
    --shadow-offset: 6px;
    --font-main: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-mono: 'Courier New', Courier, monospace;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-mono);
    text-transform: uppercase;
    font-weight: 900;
    margin: 0 0 1rem 0;
    letter-spacing: -1px;
}

h1 {
    font-size: 4rem;
    line-height: 0.9;
    text-shadow: 4px 4px 0px var(--accent-color);
}

h2 {
    font-size: 2.5rem;
    border-bottom: var(--border-width) solid black;
    padding-bottom: 10px;
    margin-bottom: 30px;
    display: inline-block;
    background: var(--accent-color);
    padding: 5px 15px;
    transform: rotate(-1deg);
}

a {
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 2px solid var(--text-color);
    transition: all 0.2s ease;
}

a:hover {
    background-color: var(--text-color);
    color: var(--bg-color);
}

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

section {
    padding: 80px 0;
    border-bottom: var(--border-width) solid black;
}

/* Header / Hero */
header {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: var(--border-width) solid black;
    position: relative;
    background: white;
    overflow: hidden;
    /* Ensure cubes don't cause scrollbars */
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    /* Prevent overlap */
    background: white;
    border: var(--border-width) solid black;
    padding: 40px;
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0px black;
    min-height: 600px;
    align-items: center;
    /* perspective: 1000px;  Moved to hero-img */
}

.hero-img {
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
    height: 100%;
}

.profile-cube-wrapper {
    width: 250px;
    height: 250px;
    position: relative;
    position: relative;
    transform-style: preserve-3d;
    /* transition removed for JS loop */
}

.profile-cube {
    width: 100%;
    height: 100%;
    position: absolute;
    transform-style: preserve-3d;
}

.p-face {
    position: absolute;
    width: 250px;
    height: 250px;
    border: var(--border-width) solid black;
    background-size: cover;
    background-position: center;
    background-color: white;
}

.p-face.front {
    transform: rotateY(0deg) translateZ(125px);
    background-image: url('../img/yo_2.png');
}

.p-face.back {
    transform: rotateY(180deg) translateZ(125px);
    background-image: url('../img/yo_back.png');
}

.p-face.right {
    transform: rotateY(90deg) translateZ(125px);
    background-image: url('../img/yo_right.png');
}

.p-face.left {
    transform: rotateY(-90deg) translateZ(125px);
    background-image: url('../img/yo_left.png');
}

.p-face.top {
    transform: rotateX(90deg) translateZ(125px);
    background-image: url('../img/yo_top.png');
}

.p-face.bottom {
    transform: rotateX(-90deg) translateZ(125px);
    background-image: url('../img/yo_bottom.png');
}

@keyframes spinProfile {
    from {
        transform: rotateY(0deg) rotateX(10deg);
    }

    to {
        transform: rotateY(360deg) rotateX(10deg);
    }
}

/* Navigation */
nav {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: white;
    border: var(--border-width) solid black;
    padding: 10px;
    box-shadow: 4px 4px 0px black;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
}

nav a {
    font-family: var(--font-mono);
    font-weight: bold;
    font-size: 1.2rem;
    border: none;
}

nav a:hover {
    background: var(--accent-color);
    color: black;
    box-shadow: 2px 2px 0px black;
}

/* Buttons */
.btn {
    display: inline-block;
    background: white;
    color: black;
    border: var(--border-width) solid black;
    padding: 10px 20px;
    font-family: var(--font-mono);
    font-weight: bold;
    text-transform: uppercase;
    box-shadow: 4px 4px 0px black;
    cursor: pointer;
    transition: all 0.1s;
    margin-right: 10px;
    margin-bottom: 10px;
}

.btn:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px black;
    background: var(--accent-color);
    color: black;
    border-bottom: var(--border-width) solid black;
    /* Reset link style */
}

.btn:active {
    transform: translate(4px, 4px);
    box-shadow: 0px 0px 0px black;
}

/* Publications Grid */
.pub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
}

.pub-card {
    background: white;
    border: var(--border-width) solid black;
    padding: 20px;
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0px black;
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
}

.pub-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: 10px 10px 0px var(--secondary-color);
}

.pub-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border: var(--border-width) solid black;
    margin-bottom: 20px;
}

.pub-card:hover .pub-img {}

.pub-title {
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 10px;
    line-height: 1.2;
}

.pub-authors {
    font-size: 0.9rem;
    margin-bottom: 10px;
    font-family: var(--font-mono);
}

.pub-venue {
    background: black;
    color: white;
    display: inline-block;
    padding: 2px 8px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    margin-bottom: 15px;
}

/* Timeline / CV */
.timeline {
    border-left: var(--border-width) solid black;
    margin-left: 20px;
    padding-left: 40px;
}

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

.timeline-item::before {
    content: '';
    position: absolute;
    left: -53px;
    /* Adjust based on border width and padding */
    top: 0;
    width: 20px;
    height: 20px;
    background: white;
    border: var(--border-width) solid black;
    box-shadow: 2px 2px 0px black;
}

.timeline-content {
    background: white;
    border: var(--border-width) solid black;
    padding: 20px;
    box-shadow: 6px 6px 0px black;
}

.timeline-year {
    font-family: var(--font-mono);
    font-weight: bold;
    background: var(--accent-color);
    padding: 2px 10px;
    border: 2px solid black;
    display: inline-block;
    margin-bottom: 10px;
}

.timeline-logo {
    float: right;
    width: 50px;
    height: 50px;
    object-fit: contain;
}

/* Footer */
footer {
    background: black;
    color: white;
    padding: 40px 0;
    text-align: center;
    font-family: var(--font-mono);
}

/* Responsive */
@media (max-width: 900px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    h1 {
        font-size: 3rem;
    }

    .pub-grid {
        grid-template-columns: 1fr;
    }

    /* Tablet/Small Laptop Size */
    .profile-cube-wrapper {
        width: 200px;
        height: 200px;
    }

    .p-face {
        width: 200px;
        height: 200px;
    }

    .p-face.front {
        transform: rotateY(0deg) translateZ(100px);
    }

    .p-face.back {
        transform: rotateY(180deg) translateZ(100px);
    }

    .p-face.right {
        transform: rotateY(90deg) translateZ(100px);
    }

    .p-face.left {
        transform: rotateY(-90deg) translateZ(100px);
    }

    .p-face.top {
        transform: rotateX(90deg) translateZ(100px);
    }

    .p-face.bottom {
        transform: rotateX(-90deg) translateZ(100px);
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2.5rem;
    }

    /* Mobile Size */
    .profile-cube-wrapper {
        width: 150px;
        height: 150px;
    }

    .p-face {
        width: 150px;
        height: 150px;
    }

    .p-face.front {
        transform: rotateY(0deg) translateZ(75px);
    }

    .p-face.back {
        transform: rotateY(180deg) translateZ(75px);
    }

    .p-face.right {
        transform: rotateY(90deg) translateZ(75px);
    }

    .p-face.left {
        transform: rotateY(-90deg) translateZ(75px);
    }

    .p-face.top {
        transform: rotateX(90deg) translateZ(75px);
    }

    .p-face.bottom {
        transform: rotateX(-90deg) translateZ(75px);
    }
}