/* =========================================
   1. CSS Reset & Base Variables
========================================= */
:root {
    /* No Black. Elegant Artist Palette */
    --text-primary: #1D3557;   /* Deep Indigo Fallback */
    --text-paragraph: #4A6FA5; /* Slate Blue Fallback */
    --bg-color: #ffffff;       
    --border-color: #f0f0f0;   
    --white: #ffffff;
    --transition-speed: 0.3s;
    
    /* Editorial Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-paragraph); 
    line-height: 1.4; /* Reduced from 1.5 */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =========================================
   2. Canvas Loader Animation
========================================= */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--white);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.6s cubic-bezier(0.77, 0, 0.175, 1);
}

#loader.hidden {
    transform: translateY(-100%);
}

.loader-content {
    width: 200px;
    height: 4px;
    background-color: #eaeaea;
    border-radius: 2px;
    overflow: hidden;
}

.paint-stroke {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #E63946, #F4A261, #285AEB);
    animation: paintLine 0.7s cubic-bezier(0.215, 0.610, 0.355, 1.000) forwards;
}

@keyframes paintLine {
    to { width: 100%; }
}

/* =========================================
   3. Header & Navigation
========================================= */
.sticky-header {
    position: sticky;
    top: 0;
    background-color: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 1rem 2rem; /* Reduced from 1.25rem to save vertical space */
    backdrop-filter: blur(10px);
}

.nav-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.brand-name-link {
    text-decoration: none;
}

.brand-name {
    font-family: var(--font-heading);
    color: var(--text-primary); 
    font-size: 1.5rem; /* Reduced slightly to fit single page */
    font-weight: 800;
    letter-spacing: 0.5px;
    transition: opacity var(--transition-speed) ease;
    /* Added for gradient effect */
    background: linear-gradient(45deg, #E63946, #F4A261, #285AEB);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    animation: flowGradient 5s ease infinite;
}

.brand-name:hover {
    opacity: 0.7;
}

.nav-link {
    font-family: var(--font-body);
    color: var(--text-paragraph); 
    text-decoration: none;
    font-weight: 400;
    font-size: 1rem; /* Increased for readability */
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: color var(--transition-speed) ease;
}

.nav-link:hover, 
.nav-link.current-page {
    color: var(--text-primary);
    font-weight: 700;
}

/* =========================================
   4. Main Content Area & Gradients
========================================= */
.container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Removed justify-content: center; */
    padding: 2rem 2rem 0 2rem; /* Changed padding-bottom to 0 */
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
    /* Removed padding-bottom: 3rem; */
}

.about-me-container {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 2rem; /* Tighter gap */
    width: 100%;
    margin-bottom: 0.5rem;
}

.profile-image-col {
    flex: 0 0 160px; /* Shrunk image from 200px */
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 0; /* Align top of image exactly with heading */
}

.profile-image-wrapper {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 3px solid var(--white);
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    margin-bottom: 1rem;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #eaeaea; /* Fallback */
}

.profile-image-wrapper::before {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border-radius: 50%;
    background: linear-gradient(45deg, #E63946, #F4A261, #285AEB);
    z-index: 0;
    opacity: 0.5;
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    z-index: 1;
}

.about-content-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    text-align: left;
    margin-top: 0; /* Align top of text with top of image */
}

.full-width-content {
    width: 100%;
    text-align: left;
    margin-bottom: 0; /* Changed margin-bottom to 0 */
}

#main-heading {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3.5rem); /* Increased size for readability */
    line-height: 1.2;
    font-weight: 800;
    margin-bottom: 0.5rem; /* Tightened */
    /* Add padding to prevent highlight truncation */
    padding-top: 0.1em;
    margin-top: -0.3rem; /* Adjust heading to pull text up */
    color: var(--text-primary); /* Set a default color */
}

#main-heading span {
    /* Removed gradient effect */
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    background-clip: unset;
    color: inherit; /* Inherit color from parent */
    animation: none;
}

#main-paragraph, .secondary-paragraph {
    font-family: var(--font-body);
    font-size: clamp(1.05rem, 2vw + 0.25rem, 1.2rem); /* Significantly increased readability on iPads and larger screens */
    font-weight: 400;
    line-height: 1.6; /* Increased line-height for readability */
    color: var(--text-paragraph); /* Default text color */
    /* New paint brush effect */
    -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 100%);
    mask-image: linear-gradient(to right, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 100%);
    -webkit-mask-size: 0% 100%;
    mask-size: 0% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    transition: -webkit-mask-size 1.5s ease-out;
    transition: mask-size 1.5s ease-out;
}

#main-paragraph.painted, .secondary-paragraph.painted {
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
}

/* Reduces space created by line breaks <br><br> */
.paint-container br {
    display: block;
    content: "";
    margin-top: -0.7rem;
}

/* =========================================
   5. Advanced "Brush Wipe" Text Animation
========================================= */
/* Removed all .paint-container span related styles */

/* Apply the Dark Ink Gradient to all paragraph spans so it doesn't break during transition */
/* FIX: Text needs color before the gradient kicks in, otherwise it's invisible on load */
/* Removed specific span styling for paragraphs */

/* We apply the gradient fill ONLY when it's painted so it doesn't stay transparent */
/* Removed specific span styling for painted paragraphs */

/* Style for collaboration links so they stand out but blend with the aesthetic */
.collab-link {
    text-decoration: none;
    position: relative;
    font-weight: 700;
    transition: opacity var(--transition-speed) ease;
    /* Force links to take the text-fill color instead of being transparent */
    -webkit-text-fill-color: var(--text-primary);
    color: var(--text-primary);
}

.collab-link::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: 0px;
    left: 0;
    background-color: var(--text-primary);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

.collab-link:hover {
    opacity: 0.8;
}

.collab-link:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

@keyframes flowGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes inkFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* =========================================
   6. Main Social Links
========================================= */
.social-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 1rem;
    padding-top: 1rem;
    padding-bottom: 0; /* Changed padding-bottom to 0 */
}

.social-artistic-link {
    font-family: var(--font-body);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.5rem; /* Shrunk padding */
    border: 1px solid var(--border-color);
    border-radius: 50px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem; /* Increased font size */
    background-color: var(--white);
    transition: all var(--transition-speed) ease;
    /* FIX: Added z-index to ensure it doesn't get blocked by the paint stroke mask overlapping */
    position: relative;
    z-index: 10;
    /* To prevent potential clipping issues */
    overflow: visible;
}

.social-artistic-link:hover,
.social-artistic-link:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    border-color: #d1d1d1;
    outline: none;
}

.social-icon-svg {
    width: 22px; /* Increased from 20px */
    height: 22px;
    display: block;
    flex-shrink: 0;
}

/* Balance SVG sizes so they all appear visually equal */
.icon-wa {
    transform: scale(0.9); /* Scale down WA as it takes up the full 24x24 viewBox */
}

.icon-yt {
    transform: scale(1.15); /* Scale up YT as its path is shorter vertically */
}


/* =========================================
   7. Footer
========================================= */
footer {
    background-color: var(--white);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 2rem; /* Reduced to bring it higher on page */
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.copyright-text {
    font-family: var(--font-body);
    color: var(--text-paragraph);
    font-size: 0.95rem; /* Increased from 0.85rem */
    font-weight: 400;
}

.social-icons {
    display: flex;
    gap: 1.25rem;
    align-items: center;
}

.social-icon-link {
    display: inline-flex;
    transition: transform var(--transition-speed) cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.social-icon-link:hover,
.social-icon-link:focus-visible {
    transform: scale(1.15);
    outline: none;
}

/* Footer icons specifically to match the smaller sizing */
footer .social-icon-svg {
    width: 22px;
    height: 22px;
}

/* =========================================
   8. Responsive Media Queries
========================================= */

@media (min-width: 768px) and (max-width: 1024px) {
    /* Styles specifically for iPads and tablets */
    #main-paragraph, .secondary-paragraph {
        font-size: 1.3rem; /* Further increased for iPad specifically */
        line-height: 1.7;
    }

    #main-heading {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    .about-me-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }

    .about-content-col {
        text-align: center;
    }

    .full-width-content {
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .social-links {
        flex-direction: column;
        width: 100%;
    }
    
    .social-artistic-link {
        width: 100%;
        justify-content: center;
    }
}