/* ===== HERO/HEADER SECTION ===== */
.hero-section {
    background-color: var(--bg-primary);
    min-height: 100vh;
    padding: 2rem 0;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* ===== PORTFOLIO TITLE ===== */
.portfolio-title {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    text-align: center;
}

.portfolio-text {
    font-size: clamp(4rem, 12vw, 12rem);
    font-weight: 900;
    letter-spacing: -0.05em;
    color: var(--text-primary);
    text-transform: uppercase;
    line-height: 0.8;
    margin: 0;
    position: relative;
    display: inline-block;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    overflow: visible;
    margin-left: -1.5rem; /* ADD THIS - negative value shifts LEFT */
    /* margin-left: -1rem = small shift left */
    /* margin-left: -3rem = bigger shift left */
}

.portfolio-number {
    position: absolute;
    top: -2rem;
    right: -4rem;
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 300;
    color: var(--accent-beige);
    opacity: 0.8;
    z-index: 6;
}

/* ===== HERO CONTENT LAYOUT ===== */
.hero-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin-top: 12rem;
    position: relative;
    z-index: 10;
}

/* ===== CHARACTER SECTION ===== */
.character-section {
    margin-left: 8rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    width: 100%;
}

.character-illustration {
    margin-bottom: 0rem;
    position: relative;
    z-index: 10;
}

.character-avatar {
    width: clamp(300px, 35vw, 450px);
    height: clamp(350px, 40vw, 520px);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Using online character image */
.character-img {
    margin-left: 5rem;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: var(--radius-large);
    transition: var(--transition-medium);
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.2));
}

/* Fallback character using online image */
.character-avatar::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: url('https://images.unsplash.com/photo-1494790108755-2616b612b5bc?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=687&q=80');
    background-size: cover;
    background-position: center;
    border-radius: var(--radius-large);
    z-index: -1;
    opacity: 0.8;
}

.character-img:hover {
    transform: scale(1.02);
    filter: drop-shadow(0 15px 40px rgba(0, 0, 0, 0.3));
}

/* ===== NAME AND TITLE ===== */
.name-title {
    text-align: center;
    position: relative;
    z-index: 10;
    margin-top: 0rem;
    width: 100%;
}

.name {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    position: relative;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.name::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 4rem;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-beige), var(--dark-beige));
    border-radius: var(--radius-small);
}

.title {
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    font-weight: 500;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin: 0;
    opacity: 0.9;
}

/* ===== LANYARD SECTION ===== */
.lanyard-section {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 15;
}

.lanyard {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lanyard-string {
    width: 3px;
    height: 150px;
    background: linear-gradient(to bottom, 
        var(--border-medium) 0%, 
        var(--border-medium) 70%, 
        transparent 100%);
    margin-bottom: 1rem;
    position: relative;
    border-radius: 2px;
}

.lanyard-string::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 25px;
    height: 25px;
    background-color: var(--accent-beige);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-light);
    border: 2px solid var(--bg-secondary);
}

.photo-badge {
    width: 140px;
    height: 180px;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-heavy);
    padding: 0.75rem;
    position: relative;
    transform: rotate(-8deg);
    transition: var(--transition-medium);
    border: 1px solid var(--border-light);
}

.photo-badge:hover {
    transform: rotate(-3deg) scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
}

.badge-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-small);
    transition: var(--transition-medium);
}

/* Using online photo for badge */
.badge-photo {
    background-image: url('https://images.unsplash.com/photo-1438761681033-6461ffad8d80?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80');
    background-size: cover;
    background-position: center;
}

/* Badge initials fallback */
.photo-badge::before {
    content: 'AP';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-beige);
    z-index: -1;
    opacity: 0.3;
}

/* ===== DECORATIVE ELEMENTS ===== */
.hero-section::before {
    content: '';
    position: absolute;
    top: 15%;
    left: -150px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(212, 165, 116, 0.15) 0%, transparent 70%);
    border-radius: var(--radius-full);
    z-index: 1;
    animation: float 8s ease-in-out infinite;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 20%;
    right: -200px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(196, 148, 100, 0.1) 0%, transparent 70%);
    border-radius: var(--radius-full);
    z-index: 1;
    animation: float 10s ease-in-out infinite reverse;
}

/* ===== ANIMATIONS ===== */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-30px) rotate(5deg);
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .lanyard-section {
        right: 2%;
    }
    
    .portfolio-number {
        right: -2rem;
        top: -1rem;
    }
    
    .character-section {
        margin-left: 4rem;
    }
}

@media (max-width: 1024px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
        margin-top: 0; /* Remove top margin to allow overlap */
        align-items: center;
        justify-content: center;
        position: relative;
        z-index: 8; /* Higher than portfolio title but lower than character */
    }
    
    .character-section {
        margin-left: 0;
        width: 100%;
        max-width: none;
        margin-top: -2rem; /* Less overlap - lower position */
    }
    
    .character-illustration {
        z-index: 9; /* Make character appear above portfolio text */
    }
    
    .lanyard-section {
        display: none;
    }
    
    .portfolio-title {
        top: 15%; /* Adjust position for overlap */
        width: 100%;
        z-index: 5; /* Behind character */
    }
    
    .portfolio-number {
        right: -1rem;
        top: -0.5rem;
    }
    
    .name-title {
        z-index: 10; /* Name appears above everything */
        margin-top: -2rem; /* Bring name closer to character */
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 0; /* Remove padding for true center */
        min-height: 100vh;
        justify-content: center; /* Perfect center */
    }
    
    .hero-content {
        margin-top: 0;
        flex: none; /* Remove flex: 1 */
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 0 1rem;
        position: relative;
    }
    
    .portfolio-title {
        position: relative; /* Keep relative positioning */
        top: auto;
        margin-bottom: 1rem; /* Space between portfolio and character */
    }
    
    .portfolio-text {
        font-size: clamp(3.5rem, 15vw, 8rem);
    }
    
    .portfolio-number {
        font-size: clamp(2.5rem, 8vw, 4rem);
        right: -0.5rem;
        top: -0.3rem;
    }
    
    .character-section {
        margin-top: 0; /* Natural flow */
        z-index: 8;
    }
    
    .character-illustration {
        margin-bottom: 0rem;
        margin-left: 0;
        z-index: 9;
    }
    
    .character-avatar {
        width: clamp(300px, 75vw, 400px);
        height: clamp(350px, 85vw, 450px);
        margin: 0 auto;
    }
    
    .name {
        font-size: clamp(2.2rem, 9vw, 3.5rem);
        margin-bottom: 0.5rem;
    }
    
    .title {
        font-size: clamp(1.1rem, 4vw, 1.6rem);
        line-height: 1.3;
    }
    
    .name::after {
        width: 3rem;
        height: 2px;
        bottom: -0.3rem;
    }
    
    .name-title {
        margin-top: 0; /* Natural spacing */
        z-index: 10;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 0; /* Remove padding for true center */
        min-height: 100vh;
        justify-content: center;
    }
    
    .hero-content {
        padding: 0 0.5rem;
        margin-top: 0;
    }
    
    .portfolio-title {
        position: relative; /* Keep relative positioning */
        margin-bottom: 1rem;
    }
    
    .portfolio-text {
        font-size: clamp(3rem, 18vw, 6rem);
    }
    
    .portfolio-number {
        font-size: clamp(2rem, 10vw, 3rem);
        right: 0;
        top: 0;
    }
    
    .character-section {
        margin-top: 0; /* Natural flow */
    }
    
    .character-avatar {
        width: clamp(280px, 85vw, 350px);
        height: clamp(320px, 95vw, 400px);
    }
    
    .name {
        font-size: clamp(2rem, 11vw, 2.8rem);
    }
    
    .title {
        font-size: clamp(1rem, 5vw, 1.4rem);
        line-height: 1.3;
    }
    
    .character-illustration {
        margin-bottom: 0rem;
    }
    
    .name-title {
        margin-top: 0; /* Natural spacing */
    }
}

/* ===== LOADING ANIMATIONS ===== */
.hero-section.loading .portfolio-text {
    animation: slideInFromTop 1.2s ease-out forwards;
}

.hero-section.loading .character-illustration {
    animation: fadeInUp 1.5s ease-out 0.3s forwards;
    opacity: 0;
}

.hero-section.loading .name-title {
    animation: fadeInUp 1.2s ease-out 0.6s forwards;
    opacity: 0;
}

.hero-section.loading .lanyard-section {
    animation: fadeInRight 1.2s ease-out 0.9s forwards;
    opacity: 0;
}

.hero-section.loading .portfolio-number {
    animation: fadeIn 1s ease-out 1.2s forwards;
    opacity: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 0.8;
        transform: scale(1);
    }
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
    .hero-section {
        background-color: #2c2c2c;
    }
    
    .portfolio-text {
        color: #f8f6f3;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    }
    
    .name {
        color: #f8f6f3;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    }
    
    .photo-badge {
        background-color: #3c3c3c;
        border-color: #555;
    }
    
    .lanyard-string::before {
        border-color: #3c3c3c;
    }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
.character-img,
.badge-photo {
    will-change: transform;
    backface-visibility: hidden;
}

.hero-section {
    contain: layout style paint;
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
    .portfolio-text {
        color: #000;
        text-shadow: none;
    }
    
    .name {
        color: #000;
        text-shadow: none;
    }
    
    .portfolio-number {
        color: #000;
        opacity: 1;
    }
}