/* ===================================
   RESET
=================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===================================
   BODY / PAGE STRUCTURE
=================================== */

body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: #ffffff;
    color: #333333;
    line-height: 1.6;

    border-left: 8px solid #ffd60a;
    border-right: 8px solid #ffd60a;

    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* ===================================
   HEADER / BRANDING
=================================== */

header {
    background: white;
    border-bottom: 1px solid #ddd;
}

.branding {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;

    padding: 25px 20px;
}

.logo-image {
    width: clamp(70px, 10vw, 120px);
    height: auto;
    object-fit: contain;
}

.logo h1 {
    font-size: 1.8rem;
}

.site-title h1 {
    color: #5a189a;
    font-size: 2.5rem;
    margin-bottom: 5px;
}

.site-title p {
    color: #666;
    font-size: 1rem;
}

/* ===================================
   NAVIGATION
=================================== */

nav {
    background-color: #5a189a;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    flex-wrap: wrap;
}

nav li {
    margin: 0;
}

nav a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 15px 25px;
    font-weight: bold;
    transition: 0.3s;

    border-top: 4px solid #ffd60a;
    border-bottom: 4px solid #ffd60a;
    border-left: 2px solid #ffd60a;
    border-right: 2px solid #ffd60a;
}

nav a.nav-left {
    border-left-color: #ffd60a;
    border-left-width: 4px;
}

nav a.nav-right {
    border-right-color: #ffd60a;
    border-right-width: 4px;
}

nav a:hover,
nav a.active {
    background-color: #ffd60a;
    color: #5a189a;
}

/* ===================================
   HERO / INTRODUCTION
=================================== */

.hero {
    text-align: center;
    padding: 6rem 10%;
    background-color: #f8f5ff;
}

.hero h2 {
    font-size: 2.5rem;
    color: #5a189a;
    margin-bottom: 1rem;
}

.hero p {
    max-width: 700px;
    margin: 0 auto 2rem;
}

/* ===================================
   BUTTONS
=================================== */

.btn {
    display: inline-block;
    background-color: #5a189a;
    color: white;
    padding: 12px 24px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
}

.btn:hover {
    background-color: #7b2cbf;
}

/* ===================================
   PAGE HEADER / CONTENT
=================================== */

.page-header {
    background-color: #f8f5ff;
    text-align: center;
    padding: 3rem;
}

.page-header h2 {
    color: #5a189a;
}

.content {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.content h3 {
    color: #5a189a;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    border-left: 5px solid #ffd60a;
    padding-left: 10px;
}

/* ===================================
   ABOUT ME
=================================== */

.about-me {
    max-width: 850px;
    margin: 2rem auto;
    padding: 2rem;

    background-color: #f8f5ff;

    border-left: 5px solid #ffd60a;
    border-right: 5px solid #ffd60a;
    border-radius: 10px;

    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;

    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

/* ===================================
   RESUME DOWNLOAD
=================================== */

.resume-download {
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.resume-download a {
    color: #5a189a;
    font-weight: bold;
    text-decoration: none;
}

.resume-download a:hover {
    color: #7b2cbf;
    text-decoration: underline;
}

/* ===================================
   PORTFOLIO GRID / PROJECT CARDS
=================================== */

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 2rem;
}

.project-card {
    background: #f8f5ff;
    border-top: 5px solid #ffd60a;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.project-card h3 {
    color: #5a189a;
    margin-bottom: 1rem;
}

.project-card p {
    margin-bottom: 1rem;
}

/* ===================================
   FLIP CARD GRID
=================================== */

.flip-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    justify-items: center;
    margin-top: 2rem;
}

/* ===================================
   FLIP CARD COMPONENT
=================================== */

.flip-card {
    width: 100%;
    max-width: 320px;
    height: 425px;

    perspective: 1000px;
    position: relative;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;

    transition: transform 0.7s ease;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
}

/* Desktop hover flip and mobile tap flip */
/* Desktop hover only */
@media (hover: hover) and (pointer: fine) {
    .flip-card:hover .flip-card-inner {
        transform: rotateY(180deg);
    }
}

/* Mobile tap */
.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;

    box-sizing: border-box;

    border-radius: 10px;
    overflow: hidden;
    background: #f8f5ff;

    border: 2px solid #ffd60a;
    border-top-width: 5px;

    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    padding: 20px;
}

.flip-card-front {
    transform: rotateY(0deg);

    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 10px;
    padding-top: 45px;

    overflow: hidden;
}

.flip-card-back {
    transform: rotateY(180deg);

    display: flex;
    flex-direction: column;
    justify-content: center;
}

.flip-card-image {
    max-width: 100%;
    max-height: 100%;

    width: auto;
    height: auto;

    object-fit: contain;

    border-radius: 10px;
    margin-bottom: 10px;

    flex: 1;
    min-height: 0;
}

.flip-card-front h3,
.flip-card-back h3 {
    color: #5a189a;
    text-align: center;
    margin-bottom: 10px;
}

.flip-card-front p {
    text-align: center;
}

.flip-card-back p {
    margin-bottom: 12px;
}

/* ===================================
   CARD STATUS BANNER
=================================== */

.card-status {
    position: absolute;
    top: 0;
    left: 0;

    width: 100%;
    padding: 8px 0;

    text-align: center;

    font-size: 0.8rem;
    font-weight: bold;
    letter-spacing: 1px;

    color: white;

    z-index: 2;
}

.card-status.complete {
    background-color: #28a745;
}

.card-status.progress {
    background-color: #ffc107;
    color: #333;
}

.card-status.planned {
    background-color: #0d6efd;
}

.card-status.retired {
    background-color: #dc3545;
}

/* ===================================
   PHOTOGRAPHY CARD SLIDESHOW
=================================== */

.card-slideshow {
    position: relative;

    width: 100%;
    max-width: 260px;

    aspect-ratio: 1 / 1;

    overflow: hidden;

    border-radius: 10px;

    margin-bottom: 15px;

    flex-shrink: 0;
}

.card-slideshow img,
.card-slideshow .flip-card-photo {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center center;

    opacity: 0;

    animation: slideshow 15s infinite;
}

.card-slideshow img:nth-child(1) {
    animation-delay: 0s;
}

.card-slideshow img:nth-child(2) {
    animation-delay: 3s;
}

.card-slideshow img:nth-child(3) {
    animation-delay: 6s;
}

.card-slideshow img:nth-child(4) {
    animation-delay: 9s;
}

.card-slideshow img:nth-child(5) {
    animation-delay: 12s;
}

@keyframes slideshow {
    0%, 15% {
        opacity: 1;
    }

    20%, 100% {
        opacity: 0;
    }
}

/* ===================================
   FOOTER
=================================== */

footer {
    background-color: #5a189a;
    color: white;
    text-align: center;
    padding: 1rem;
    margin-top: auto;

    border-top: 4px solid #ffd60a;
}

/* ===================================
   RESPONSIVE LAYOUT
=================================== */

@media (max-width: 768px) {

    body {
        border-left-width: 4px;
        border-right-width: 4px;
    }

    header {
        flex-direction: column;
        gap: 1rem;
    }

    .branding {
        flex-direction: column;
        text-align: center;
    }

    .site-title h1 {
        font-size: 2rem;
    }

    nav ul {
        flex-direction: column;
        text-align: center;
        gap: 0;
    }

    nav a {
        border-left-width: 4px;
        border-right-width: 4px;
    }

    .hero {
        padding: 4rem 8%;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .content {
        padding: 0 1rem;
    }

    .flip-card {
        max-width: 100%;
        height: 390px;
    }

    .flip-card-grid {
        grid-template-columns: 1fr;
    }

    .flip-card-image {
        max-height: 160px;
    }

    .card-slideshow {
        max-width: 220px;
    }
}
