@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600&family=Oswald:wght@300;400;500;700&display=swap');

:root {
    --bg-dark: #121212;
    --bg-card: #1e1e1e;
    --text-main: #e0e0e0;
    --text-muted: #a0a0a0;
    --accent-gold: #d4af37;
    /* Cinematic Gold */
    --accent-red: #c0392b;
    /* Bold accent */
    --font-heading: 'Oswald', sans-serif;
    --font-body: 'Montserrat', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.6;
}

a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-gold);
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 80px 0;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 2px;
}

h1.hero-title {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #fff, #999);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--accent-gold);
    letter-spacing: 4px;
    margin-bottom: 40px;
    display: inline-block;
    border-bottom: 1px solid var(--accent-gold);
    padding-bottom: 10px;
}

/* Header/Nav */
nav {
    padding: 30px 0;
    border-bottom: 1px solid #333;
}

nav .nav-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 3px;
    border: 2px solid var(--text-main);
    padding: 5px 15px;
}

.nav-links a {
    margin-left: 30px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* CV Layout (Dark Version) */
.cv-container {
    background: #1a1a1a;
    max-width: 210mm;
    margin: 50px auto 10px auto;
    padding: 60px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 50px;
}

.cv-header {
    grid-column: 1 / -1;
    border-bottom: 1px solid #333;
    padding-bottom: 40px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.cv-name {
    font-size: 3.5rem;
    color: var(--text-main);
    margin-bottom: 10px;
}

.cv-role {
    font-size: 1.2rem;
    color: var(--accent-gold);
}

.cv-section-title {
    font-size: 1.1rem;
    color: var(--accent-gold);
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
    margin-bottom: 25px;
    margin-top: 10px;
}

.cv-item {
    margin-bottom: 30px;
}

.cv-item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 5px;
}

.cv-item-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: #fff;
}

.cv-item-date {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.cv-item-company {
    font-style: italic;
    color: #ccc;
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.cv-item-desc {
    font-size: 0.9rem;
    color: #999;
}

/* Sidebar Skills */
.skill-tag {
    display: inline-block;
    background: #252525;
    padding: 5px 10px;
    margin-right: 5px;
    margin-bottom: 8px;
    font-size: 0.8rem;
    border-radius: 3px;
    border: 1px solid #333;
}

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.project-card {
    background: var(--bg-card);
    overflow: hidden;
    position: relative;
    transition: transform 0.4s ease;
    cursor: pointer;
    border: 1px solid #333;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-gold);
}

.card-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    background-color: #000;
    opacity: 0.8;
    transition: opacity 0.4s ease;
}

.project-card:hover .card-image {
    opacity: 1;
}

.card-image.logo-fit {
    object-fit: contain;
    background-color: #fff;
    /* White background for logos */
    padding: 40px;
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: #fff;
    margin-bottom: 5px;
}

.card-role {
    font-size: 0.9rem;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.year-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent-gold);
    color: #000;
    padding: 2px 8px;
    font-weight: 700;
    font-size: 0.8rem;
    border-radius: 2px;
}


/* Print Media */
@media print {
    body {
        background: #fff;
        color: #000;
    }

    .cv-container {
        margin: 0;
        padding: 0;
        box-shadow: none;
        background: #fff;
        width: 100%;
    }

    .cv-name {
        color: #000;
    }

    .cv-role {
        color: #000;
        font-weight: bold;
    }

    .cv-section-title {
        color: #000;
        border-color: #000;
    }

    .cv-item-title {
        color: #000;
    }

    .cv-item-company {
        color: #333;
    }

    .cv-item-desc {
        color: #333;
    }

    .skill-tag {
        border: 1px solid #ccc;
        background: #fff;
        color: #000;
    }

    nav,
    .portfolio-section {
        display: none;
    }
}

/* About Section */
.about-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 0;
    border-bottom: 1px solid #333;
    padding-bottom: 40px;
}

@media (min-width: 768px) {
    .about-section {
        grid-template-columns: 2fr 1fr;
    }
}

.about-text {
    font-size: 1rem;
    color: #ccc;
    line-height: 1.8;
}

.about-text p {
    margin-bottom: 20px;
}

.about-highlight {
    color: var(--accent-gold);
    font-weight: 500;
}

/* Video Modal */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.video-modal.active {
    visibility: visible;
    opacity: 1;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 1000px;
    aspect-ratio: 16 / 9;
    background: #000;
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.2);
    z-index: 1001;
}

.modal-content iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.close-modal {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--accent-gold);
}

/* Play Button Overlay */
.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(212, 175, 55, 0.8);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.play-overlay::after {
    content: '';
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 16px solid #000;
    margin-left: 4px;
}

.project-card:hover .play-overlay {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}


/* Text Modal Styles */
.modal-content.text-mode {
    aspect-ratio: auto;
    height: auto;
    max-height: 80vh;
    background: #1e1e1e;
    overflow-y: auto;
    padding: 20px;
    border: 1px solid var(--accent-gold);
}

.modal-content.video-mode {
    /* Auto height to accommodate title */
    aspect-ratio: auto;
    height: auto;
    max-width: 1000px;
    background: #000;
    padding: 0;
    border: 1px solid #333;
}

.modal-text-content {
    display: none;
    padding: 20px;
    color: #e0e0e0;
}

.modal-text-content h2 {
    color: var(--accent-gold);
    margin-bottom: 20px;
    font-size: 1.4rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.modal-text-content p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.modal-content.text-mode .modal-text-content {
    display: block;
}

.modal-content.text-mode iframe {
    display: none;
}

/* Video Wrapper Styles */
.modal-video-title {
    color: var(--accent-gold);
    font-family: var(--font-heading);
    font-size: 1.3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 15px 20px;
    background: #111;
    margin: 0;
    border-bottom: 1px solid #333;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    height: 0;
    background: #000;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Profile Image Section */
.profile-container {
    position: relative;
    width: 100%;
    max-width: 300px;
    /* Reduced size */
    margin: 0 auto;
    height: auto;
    overflow: hidden;
    border: 3px solid var(--accent-gold);
    /* Yellow border */
}

.profile-photo {
    width: 100%;
    height: auto;
    display: block;
}