/* ============================================
   PORTFOLIO STYLES
   ============================================ */

/* Hero */
.p-hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4rem;
    align-items: center;
    padding: 4rem 3rem;
}

.p-hero-content {
    max-width: 600px;
}

.p-hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    color: var(--white);
    line-height: 1.1;
    margin-top: 1rem;
    letter-spacing: -0.02em;
}

.p-hero-title .accent {
    color: var(--peach);
}

.p-hero-role {
    font-family: var(--mono);
    font-size: 1rem;
    color: var(--peach);
    margin-top: 0.75rem;
}

.p-hero-desc {
    font-size: 1.1rem;
    color: var(--gray);
    line-height: 1.7;
    margin-top: 1.5rem;
}

.p-hero-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 2rem;
}

.p-hero-stats {
    display: flex;
    gap: 2.5rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.p-stat-num {
    font-family: var(--tech);
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
    display: block;
}

.p-stat-label {
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.p-hero-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.p-avatar-large {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: var(--elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    font-weight: 700;
    color: var(--peach);
    border: 2px solid var(--border);
}

.p-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--gray);
    padding: 0.5rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 100px;
}

.p-status-dot {
    width: 8px;
    height: 8px;
    background: var(--moss);
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Sections */
.p-section {
    padding: 5rem 3rem;
    position: relative;
    border-top: 1px solid var(--border);
}

.p-section-marker {
    position: absolute;
    top: 3rem;
    right: 3rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.p-section-head {
    margin-bottom: 2.5rem;
}

.p-section-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--white);
    margin-top: 0.5rem;
}

/* About */
.p-about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.p-about-text {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.p-about-text p {
    font-size: 0.95rem;
    color: var(--gray);
    line-height: 1.7;
}

.p-about-text strong {
    color: var(--white);
}

.p-about-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    height: fit-content;
}

.p-detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.p-detail-label {
    font-size: 0.7rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.p-detail-value {
    font-size: 0.85rem;
    color: var(--white);
}

/* Skills */
.p-skills {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.p-skills-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 1.5rem;
}

.p-skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.p-skill-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.p-skill-cat {
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.p-skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

/* Timeline / Experience */
.p-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}

.p-timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 8px;
    bottom: 8px;
    width: 1px;
    background: var(--border);
}

.p-timeline-item {
    display: grid;
    grid-template-columns: 15px 1fr;
    gap: 1.5rem;
    padding-bottom: 2rem;
}

.p-timeline-item:last-child {
    padding-bottom: 0;
}

.p-timeline-marker {
    width: 15px;
    height: 15px;
    background: var(--surface);
    border: 2px solid var(--peach);
    border-radius: 50%;
    position: relative;
    z-index: 1;
    margin-top: 4px;
}

.p-timeline-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
}

.p-timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.p-job-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
}

.p-job-company {
    font-size: 0.85rem;
    color: var(--peach);
}

.p-job-date {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--muted);
}

.p-job-desc {
    font-size: 0.85rem;
    color: var(--gray);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.p-job-highlights {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.p-job-highlights li {
    font-size: 0.85rem;
    color: var(--gray);
    line-height: 1.5;
    padding-left: 1.25rem;
    position: relative;
}

.p-job-highlights li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--peach);
    opacity: 0.5;
}

.p-job-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.p-cv-download {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--gray);
}

/* Projects */
.p-projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.p-project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.p-project-card:hover {
    border-color: var(--elevated);
    transform: translateY(-2px);
}

.p-project-featured {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
}

.p-project-img {
    background: var(--raised);
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.p-project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.p-project-placeholder {
    font-size: 0.8rem;
    color: var(--muted);
}

.p-project-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.p-project-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
}

.p-project-desc {
    font-size: 0.85rem;
    color: var(--gray);
    line-height: 1.5;
    flex: 1;
}

.p-project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.5rem;
}

.p-project-links {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

/* Blog */
.p-blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.p-blog-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: all 0.2s ease;
}

.p-blog-card:hover {
    border-color: var(--elevated);
    transform: translateY(-2px);
}

.p-blog-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.p-blog-date {
    font-size: 0.75rem;
    color: var(--muted);
}

.p-blog-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
    line-height: 1.3;
}

.p-blog-excerpt {
    font-size: 0.85rem;
    color: var(--gray);
    line-height: 1.5;
    flex: 1;
}

.p-blog-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--peach);
    text-decoration: none;
    margin-top: 0.5rem;
}

.p-blog-link:hover {
    text-decoration: underline;
}

/* Contact */
.p-section-contact {
    background: var(--surface);
}

.p-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.p-contact-text {
    font-size: 1rem;
    color: var(--gray);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.p-contact-methods {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.p-contact-method {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--gray);
    text-decoration: none;
    transition: color 0.15s ease;
}

.p-contact-method:hover {
    color: var(--white);
}

.p-contact-method svg {
    width: 18px;
    height: 18px;
    color: var(--peach);
}

.p-contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.p-contact-form .btn-lg {
    margin-top: 0.5rem;
}

/* Footer */
.p-footer {
    padding: 2rem 3rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--muted);
}

.p-footer-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.p-footer-right {
    display: flex;
    gap: 1.5rem;
}

.p-footer-right a {
    color: var(--gray);
    text-decoration: none;
    transition: color 0.15s ease;
}

.p-footer-right a:hover {
    color: var(--white);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .p-hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .p-hero-content {
        max-width: 100%;
    }

    .p-hero-actions {
        justify-content: center;
    }

    .p-hero-stats {
        justify-content: center;
    }

    .p-hero-visual {
        order: -1;
    }

    .p-about-grid {
        grid-template-columns: 1fr;
    }

    .p-skills-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .p-projects-grid {
        grid-template-columns: 1fr;
    }

    .p-project-featured {
        grid-column: span 1;
        grid-template-columns: 1fr;
    }

    .p-blog-grid {
        grid-template-columns: 1fr;
    }

    .p-contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .p-section-marker {
        display: none;
    }
}

@media (max-width: 768px) {
    .p-hero {
        padding: 2rem 1.5rem;
    }

    .p-section {
        padding: 3rem 1.5rem;
    }

    .p-avatar-large {
        width: 150px;
        height: 150px;
        font-size: 3rem;
    }

    .p-hero-stats {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .p-timeline::before {
        display: none;
    }

    .p-timeline-item {
        grid-template-columns: 1fr;
    }

    .p-timeline-marker {
        display: none;
    }

    .p-footer {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 2rem 1.5rem;
    }
}

/* ============================================
   INTERACTIVE ENHANCEMENTS
   ============================================ */

/* Form Validation */
.input-group {
    position: relative;
}

.input-error {
    display: block;
    font-size: 0.75rem;
    color: var(--clay);
    margin-top: 0.35rem;
    min-height: 1rem;
}

.input-invalid {
    border-color: var(--clay) !important;
}

.input-invalid:focus {
    box-shadow: 0 0 0 2px rgba(193, 124, 96, 0.2);
}

.form-success {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(165, 181, 160, 0.1);
    border: 1px solid var(--moss);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--moss);
    margin-top: 1rem;
}

.form-success svg {
    flex-shrink: 0;
}

/* Button Loading State */
.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-loading::after {
    content: '';
    width: 14px;
    height: 14px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 0.75rem 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--white);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1001;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

.toast.success {
    border-color: var(--moss);
}

.toast.error {
    border-color: var(--clay);
}

/* Scroll Animations */
.fade-in-element {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays */
.p-project-card.fade-in-element:nth-child(1) { transition-delay: 0s; }
.p-project-card.fade-in-element:nth-child(2) { transition-delay: 0.1s; }
.p-project-card.fade-in-element:nth-child(3) { transition-delay: 0.15s; }
.p-project-card.fade-in-element:nth-child(4) { transition-delay: 0.2s; }

.p-blog-card.fade-in-element:nth-child(1) { transition-delay: 0s; }
.p-blog-card.fade-in-element:nth-child(2) { transition-delay: 0.1s; }
.p-blog-card.fade-in-element:nth-child(3) { transition-delay: 0.15s; }

.p-timeline-item.fade-in-element:nth-child(1) { transition-delay: 0s; }
.p-timeline-item.fade-in-element:nth-child(2) { transition-delay: 0.1s; }
.p-timeline-item.fade-in-element:nth-child(3) { transition-delay: 0.2s; }

/* Dropdown Open State */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.15s ease;
    z-index: 100;
}

.dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Calendar Selected State */
.calendar-day.selected {
    background: var(--peach);
    color: var(--void);
}

/* Print Styles */
@media print {
    .rail,
    .p-hero-actions,
    .p-contact-form,
    .p-footer-right,
    .toast {
        display: none !important;
    }

    .main {
        margin-left: 0 !important;
    }

    .p-section,
    .p-hero {
        padding: 2rem 0;
        break-inside: avoid;
    }

    .fade-in-element {
        opacity: 1;
        transform: none;
    }
}

/* ============================================================================
   FILMOGRAPHY CARDS
   ============================================================================ */
.p-filmography {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.p-film-card {
    display: flex;
    gap: 2rem;
    padding: 2rem;
    background: var(--card-bg, rgba(255,255,255,0.02));
    border: 1px solid var(--border, rgba(255,255,255,0.06));
    border-radius: 16px;
    transition: all 0.3s ease;
}

.p-film-card:hover {
    border-color: var(--accent-peach, #e8a87c);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.p-film-poster {
    flex-shrink: 0;
    width: 100px;
    height: 140px;
    background: linear-gradient(135deg, rgba(232,168,124,0.1), rgba(200,160,200,0.08));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.04);
}

.p-film-year {
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-peach, #e8a87c);
    opacity: 0.6;
}

.p-film-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.p-film-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary, #f0ebe5);
    margin: 0;
}

.p-film-studio {
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 0.75rem;
    color: var(--accent-peach, #e8a87c);
    letter-spacing: 0.05em;
}

.p-film-role {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary, #a89888);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
}

.p-film-desc {
    font-size: 0.9rem;
    color: var(--text-secondary, #a89888);
    line-height: 1.7;
    margin: 0.25rem 0 0;
}

.p-film-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

@media (max-width: 640px) {
    .p-film-card {
        flex-direction: column;
        gap: 1rem;
        padding: 1.25rem;
    }

    .p-film-poster {
        width: 100%;
        height: 60px;
    }

    .p-film-year {
        font-size: 1.1rem;
    }
}

/* ============================================
   VIDEO EMBEDS
   ============================================ */
.p-project-img:has(.p-project-video) {
    min-height: 0;
    display: block;
}

.p-project-video {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
}

.p-project-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
