/*
Theme Name: IvanPortfolio
Theme URI: http://example.com/ivan-portfolio
Author: Antigravity
Author URI: http://example.com
Description: A cinematic, high-end portfolio theme for Audiovisual Professionals.
Version: 2.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ivanportfolio
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500&family=Oswald:wght@500;700&display=swap');

:root {
    --bg-color: #030303; /* Deep cinematic black */
    --surface-color: #111111;
    --surface-hover: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
    --accent-color: #d11c1c; /* Netflix/Vimeo style red accent */
    --font-heading: 'Oswald', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    margin-top: 0;
    font-weight: 700;
    line-height: 1.1;
    text-transform: uppercase;
}

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

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Header */
.site-header {
    padding: 2rem 0;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
}

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

.site-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin: 0;
}

.site-title a {
    color: #fff;
}

/* Hero Section */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 4rem;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 70% 50%, rgba(209, 28, 28, 0.1), transparent 50%);
    z-index: -1;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-header-top {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.hero-avatar {
    width: 120px;
    height: auto;
    object-fit: cover;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.hero-content h1 {
    font-size: 4rem;
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fff, #aaa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content h2 {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    align-self: flex-start;
}

.hero-about {
    background: rgba(17, 17, 17, 0.7);
    padding: 2.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 20px 40px rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
}

.hero-about h3 {
    color: var(--accent-color);
    font-size: 1.5rem;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
}

.about-text {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.about-text p {
    margin-bottom: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    background-color: var(--accent-color);
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.125rem;
    letter-spacing: 2px;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

/* Portfolio Filter Menu */
.portfolio-filter-section {
    padding: 3rem 0 1rem;
    background-color: var(--surface-color);
    border-top: 1px solid rgba(255,255,255,0.05);
}

.portfolio-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

/* Sticky filter bar inside the playlist column */
.playlist-filter-sticky {
    justify-content: flex-start;
    position: sticky;
    top: 0;
    background: var(--bg-color);
    padding: 1.25rem 0;
    z-index: 10;
    margin-bottom: 1.5rem;
}

.filter-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--text-secondary);
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-size: 1rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
}

.filter-btn:hover {
    border-color: #fff;
    color: #fff;
}

.filter-btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
    box-shadow: 0 5px 15px rgba(209, 28, 28, 0.4);
}

/* Masterclass Layout */
.masterclass-section {
    padding: 5rem 0 10rem;
}

.masterclass-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    align-items: start;
}

.sticky-player-container {
    position: sticky;
    top: 6rem;
}

/* Video player frame */
.video-player-frame {
    background: #050505;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
    aspect-ratio: 16 / 9;
    position: relative;
    width: 100%;
}

.player-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: var(--text-secondary);
}

.player-placeholder-icon {
    font-size: 3rem;
    opacity: 0.3;
}

/* Player info below the frame */
.player-info-block {
    margin-top: 2rem;
}

.player-category-tag {
    font-family: var(--font-heading);
    font-size: 0.875rem;
    letter-spacing: 3px;
    color: var(--accent-color);
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.player-title {
    font-size: 2rem;
    margin: 0 0 1rem;
    line-height: 1.1;
}

.player-description {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    margin: 0;
}

/* Playlist */
.playlist-items {
    display: flex;
    flex-direction: column;
}

.playlist-empty {
    color: var(--text-secondary);
}

.playlist-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.7rem 1rem;
    cursor: pointer;
    transition: background 0.2s ease, border-left-color 0.2s ease;
    border-left: 2px solid transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.playlist-item:hover {
    background: rgba(255, 255, 255, 0.03);
    border-left-color: rgba(209, 28, 28, 0.4);
}

.playlist-item.active-playing {
    background: rgba(209, 28, 28, 0.07);
    border-left-color: var(--accent-color);
}

/* Episode number */
.playlist-index {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.2);
    min-width: 1.75rem;
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.playlist-item:hover .playlist-index,
.playlist-item.active-playing .playlist-index {
    color: var(--accent-color);
}

/* Title */
.playlist-title {
    flex: 1;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.playlist-item.active-playing .playlist-title {
    color: #fff;
}

/* Category tag */
.playlist-cat {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    letter-spacing: 1px;
    text-transform: uppercase;
    flex-shrink: 0;
    opacity: 0.6;
}

.playlist-item.active-playing .playlist-cat {
    color: var(--accent-color);
    opacity: 1;
}

/* Now-playing animated bars */
.now-playing-bars {
    display: none;
    align-items: flex-end;
    gap: 2px;
    height: 14px;
    flex-shrink: 0;
}

.now-playing-bars span {
    display: block;
    width: 2px;
    border-radius: 2px;
    background: var(--accent-color);
    animation: audio-wave 0.75s ease-in-out infinite alternate;
}

.now-playing-bars span:nth-child(1) { height: 6px;  animation-delay: 0s; }
.now-playing-bars span:nth-child(2) { height: 14px; animation-delay: 0.2s; }
.now-playing-bars span:nth-child(3) { height: 5px;  animation-delay: 0.1s; }

@keyframes audio-wave {
    0%   { transform: scaleY(0.35); }
    100% { transform: scaleY(1); }
}

.playlist-item.active-playing .now-playing-bars {
    display: flex;
}

/* Photography Section */
.photography-section {
    padding: 6rem 0 8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.photography-intro {
    max-width: 640px;
    margin-bottom: 4rem;
}

.photography-intro-label {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    letter-spacing: 4px;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.photography-intro-title {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff, #aaa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.photography-intro-text {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.85;
    margin: 0;
}

/* Masonry grid */
.photo-grid {
    columns: 3;
    column-gap: 1rem;
}

.photo-item {
    break-inside: avoid;
    margin-bottom: 1rem;
    overflow: hidden;
    border-radius: 4px;
}

.photo-link {
    display: block;
    position: relative;
    overflow: hidden;
}

.photo-link img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    filter: brightness(0.9);
}

.photo-link:hover img {
    transform: scale(1.04);
    filter: brightness(1);
}

.photo-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.photo-link:hover .photo-overlay {
    opacity: 1;
}

.gallery-placeholder {
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
    padding: 4rem 0;
    letter-spacing: 2px;
    opacity: 0.4;
}

@media (max-width: 1024px) {
    .photo-grid {
        columns: 2;
    }
}

@media (max-width: 600px) {
    .photo-grid {
        columns: 1;
    }

    .photography-intro-title {
        font-size: 2.25rem;
    }
}

/* Footer */
.site-footer {
    background: #000;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 4rem 0 2rem;
}

.footer-top {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 3rem;
    align-items: center;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-name {
    font-size: 1.75rem;
    letter-spacing: 2px;
    margin: 0 0 0.4rem;
    color: #fff;
}

.footer-role {
    font-size: 0.85rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
    margin: 0;
}

.footer-contacts {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: color 0.2s ease;
    text-decoration: none;
}

a.footer-contact-item:hover {
    color: #fff;
}

.footer-contact-icon {
    color: var(--accent-color);
    font-size: 0.9rem;
    width: 1.1rem;
    text-align: center;
    flex-shrink: 0;
}

.footer-location {
    cursor: default;
}

/* CV download button */
.btn-cv {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 1rem;
    letter-spacing: 2px;
    border-radius: 2px;
    background: transparent;
    transition: background 0.25s ease, border-color 0.25s ease;
    white-space: nowrap;
}

.btn-cv:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
}

.btn-cv-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.footer-bottom {
    padding-top: 1.5rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-bottom-separator {
    opacity: 0.4;
}

@media (max-width: 900px) {
    .footer-top {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-contacts {
        align-items: center;
    }

    .footer-cta {
        display: flex;
        justify-content: center;
    }

    .footer-bottom {
        justify-content: center;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .masterclass-layout {
        grid-template-columns: 1fr;
    }

    .sticky-player-container {
        position: relative;
        top: 0;
        margin-bottom: 2rem;
    }

    .player-title {
        font-size: 1.5rem;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-header-top {
        flex-direction: column;
    }

    .hero-content h1 {
        font-size: 3.5rem;
    }
}

@media (max-width: 480px) {
    .playlist-filter-sticky {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.5rem 1.25rem;
        font-size: 0.875rem;
    }

    .playlist-cat {
        display: none;
    }
}
