/* ========================================
   MODERN PORTFOLIO CSS - DEBORAH BALTHAZAR
   ======================================== */

/* CSS Reset & Base Styles */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* CSS Custom Properties (Variables) */
:root {
    /* Colors */
    --primary-gradient: linear-gradient(135deg, #5d2b8c, #3979cb);
    --primary-dark: #2f2980;
    --primary-light: #683aa4;
    --accent-pink: #f631a7;
    --text-dark: #2c2c2c;
    --text-medium: #666666;
    --text-light: #a9a9a9;
    --background-primary: #faf9f7;
    --background-white: #ffffff;
    --surface-light: #ffffff;
    --border-light: #e1e5e9;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
    --font-secondary: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    
    /* Font Sizes - Fluid Typography */
    --fs-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
    --fs-sm: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
    --fs-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
    --fs-lg: clamp(1.125rem, 1rem + 0.625vw, 1.25rem);
    --fs-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
    --fs-2xl: clamp(1.5rem, 1.3rem + 1vw, 2rem);
    --fs-3xl: clamp(2rem, 1.7rem + 1.5vw, 3rem);
    --fs-4xl: clamp(2.5rem, 2rem + 2.5vw, 4rem);
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    --space-3xl: 6rem;
    
    /* Layout */
    --max-width: 1200px;
    --max-width-text: 65ch;
    --border-radius: 0.5rem;
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@400;500;600;700;800;900&display=swap');

/* Base Typography */
html {
    font-size: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: var(--fs-base);
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Selection Styles */
::selection {
    background: var(--accent-pink);
    color: white;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-secondary);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-sm);
    color: var(--text-dark);
}

h1 {
    font-size: var(--fs-4xl);
    font-weight: 900;
    margin-bottom: var(--space-md);
}

h2 {
    font-size: var(--fs-3xl);
    font-weight: 800;
}

h3 {
    font-size: var(--fs-2xl);
    font-weight: 700;
}

h4 {
    font-size: var(--fs-xl);
    font-weight: 600;
}

h5 {
    font-size: var(--fs-lg);
    font-weight: 600;
}

h6 {
    font-size: var(--fs-base);
    font-weight: 600;
}

p {
    margin-bottom: var(--space-sm);
    max-width: var(--max-width-text);
}

/* Link Styles */
a {
    color: var(--primary-light);
    text-decoration: none;
    transition: var(--transition);
}

a:hover,
a:focus {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Container & Layout */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* Header & Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--surface-light);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    transition: var(--transition);
}

.nav {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) 0;
    min-height: 70px;
    width: 100%;
}

.nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.nav__brand {
    font-family: var(--font-secondary);
    font-size: var(--fs-xl);
    font-weight: 900;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.nav__brand:hover {
    text-decoration: none;
    color: var(--primary-light);
}

/* Mobile Menu Button */
.nav__toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-xs);
    z-index: 1001;
    order: 3;
}

.nav__toggle-line {
    width: 25px;
    height: 2px;
    background: var(--text-dark);
    margin: 3px 0;
    transition: var(--transition);
}

.nav__toggle.active .nav__toggle-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav__toggle.active .nav__toggle-line:nth-child(2) {
    opacity: 0;
}

.nav__toggle.active .nav__toggle-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Navigation Menu */
.nav__menu {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    list-style: none;
}

.nav__link {
    font-size: var(--fs-base);
    font-weight: 500;
    color: var(--text-medium);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--border-radius);
    transition: var(--transition);
    position: relative;
}

.nav__link:hover,
.nav__link:focus {
    color: var(--primary-light);
    text-decoration: none;
    background: rgba(104, 58, 164, 0.1);
}

.nav__link.active {
    color: var(--primary-dark);
    background: rgba(104, 58, 164, 0.15);
}

/* Main Content */
main {
    flex: 1;
    padding-top: 70px; /* Account for fixed header */
}

/* Hero Section */
.hero {
    padding: var(--space-md) 0 var(--space-2xl);
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
}

.hero__content {
    display: block;
    width: 100%;
}

.hero__content::after {
    content: "";
    display: table;
    clear: both;
}

.hero__title {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: var(--space-md);
    font-family: var(--font-secondary);
    text-align: center;
}

.hero__description {
    font-size: var(--fs-lg);
    line-height: 1.7;
    color: var(--text-medium);
}

.hero__image-container {
    float: right;
    max-width: 450px;
    width: 45%;
    margin-left: var(--space-xl);
    margin-bottom: var(--space-lg);
}

.hero__image {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    filter: sepia(0.05) saturate(1.1) brightness(1.02);
}

.hero__image-caption {
    font-size: var(--fs-sm);
    color: var(--text-light);
    text-align: center;
    margin-top: var(--space-sm);
    font-style: italic;
}

/* Page Headers */
.page-header {
    padding: var(--space-md) 0 var(--space-sm);
    text-align: center;
}

.page-title {
    background: var(--primary-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    margin-bottom: var(--space-sm);
}

/* Work Sections */
.work-section {
    margin-bottom: var(--space-2xl);
}

.work-section:last-child {
    margin-bottom: var(--space-3xl);
}

.work-section__title {
    font-size: var(--fs-2xl);
    color: var(--primary-dark);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--primary-light);
    display: inline-block;
}

.work-section__title a {
    color: inherit;
}

.work-section__title a:hover {
    color: var(--primary-light);
    text-decoration: none;
}

.work-list {
    list-style: none;
    display: grid;
    gap: var(--space-sm);
}

.work-item {
    position: relative;
    padding-left: var(--space-lg);
}

.work-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 8px;
    height: 8px;
    background: var(--primary-gradient);
    border-radius: 50%;
}

.work-item a {
    font-size: var(--fs-base);
    line-height: 1.5;
    display: block;
    padding: var(--space-xs) 0;
    transition: var(--transition);
}

.work-item a:hover {
    color: var(--primary-dark);
    transform: translateX(4px);
}

/* Contact Section */
.contact-section {
    text-align: center;
    padding: var(--space-sm) 0 var(--space-2xl);
}

.contact-image-container {
    max-width: 300px;
    margin: 0 auto var(--space-md);
}

.contact-image {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.contact-description {
    font-size: var(--fs-lg);
    color: var(--text-medium);
    max-width: 600px;
    margin: 0 auto var(--space-lg);
}

.contact-email {
    font-size: var(--fs-xl);
    font-weight: 600;
    color: var(--primary-light);
    display: inline-block;
    padding: var(--space-sm) var(--space-lg);
    border: 2px solid var(--primary-light);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.contact-email:hover {
    background: var(--primary-light);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

/* Footer */
.footer {
    background: var(--background-white);
    border-top: 1px solid var(--border-light);
    padding: var(--space-lg) 0;
    margin-top: auto;
}

.footer__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    text-align: center;
}

.social-links {
    display: flex;
    gap: var(--space-md);
    align-items: center;
    order: -1; /* Move social links above copyright */
}

.footer__copyright {
    font-size: var(--fs-sm);
    color: var(--text-light);
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--background-primary);
    border-radius: 50%;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
}

.social-link:hover svg {
    filter: brightness(0) invert(1);
}

.social-icon {
    width: 20px;
    height: 20px;
    transition: var(--transition);
}

/* Utility Classes */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }

/* Responsive Design */
@media (max-width: 768px) {
    :root {
        --space-xs: 0.375rem;
        --space-sm: 0.75rem;
        --space-md: 1rem;
        --space-lg: 1.25rem;
        --space-xl: 2rem;
        --space-2xl: 2.5rem;
        --space-3xl: 3rem;
    }
    
    .container {
        padding: 0 var(--space-sm);
    }
    
    /* Mobile Navigation */
    .nav {
        padding: var(--space-sm) 0;
    }
    
    .nav .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .nav__toggle {
        display: flex;
        margin-left: auto;
    }
    
    .nav__menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--surface-light);
        flex-direction: column;
        padding: var(--space-md);
        border-bottom: 1px solid var(--border-light);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        display: none;
        margin-left: 0;
        gap: var(--space-sm);
    }
    
    .nav__menu.active {
        display: flex;
    }
    
    .nav__link {
        display: block;
        width: 100%;
        text-align: center;
        padding: var(--space-md) var(--space-sm);
        font-size: var(--fs-lg);
        border-radius: var(--border-radius);
        transition: var(--transition);
        margin: 0 auto;
    }
    
    .nav__link:hover,
    .nav__link:focus {
        background: rgba(104, 58, 164, 0.1);
        color: var(--primary-light);
    }
    
    /* Mobile Hero Layout - Title, Image, then Description */
    .hero__content {
        display: flex;
        flex-direction: column;
        gap: var(--space-lg);
        text-align: center;
    }
    
    /* Mobile Hero Layout */
    .hero {
        padding: var(--space-2xl) 0 var(--space-3xl);
        min-height: calc(100vh - 60px);
    }
    
    .hero__content {
        display: flex;
        flex-direction: column;
        text-align: center;
    }
    
    .hero__title {
        order: 1;
        margin-bottom: var(--space-md);
    }
    
    .hero__image-container {
        order: 2;
        max-width: 280px;
        margin: 0 auto;
        float: none;
        width: auto;
    }
    
    .hero__description {
        order: 3;
        margin-top: var(--space-md);
        text-align: left;
    }
    
    /* Mobile Typography */
    .hero__description {
        font-size: var(--fs-base);
        text-align: left;
    }
    
    .contact-description {
        font-size: var(--fs-base);
    }
    
    /* Mobile Contact Section */
    .contact-section {
        padding: var(--space-xl) 0 var(--space-2xl);
    }
    
    .contact-image-container {
        margin: 0 auto var(--space-sm);
    }
    
    /* Mobile Footer */
    .footer__content {
        gap: var(--space-sm);
    }
    
    .social-links {
        gap: var(--space-sm);
    }
}

@media (max-width: 480px) {
    .hero {
        padding: var(--space-2xl) 0 var(--space-xl);
    }
    
    .hero__image-container {
        max-width: 240px;
    }
    
    .work-item {
        padding-left: var(--space-md);
    }
    
    .contact-email {
        font-size: var(--fs-lg);
        padding: var(--space-sm);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --text-light: #555555;
        --border-light: #999999;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Focus styles for accessibility */
:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .nav,
    .footer {
        display: none;
    }
    
    main {
        padding-top: 0;
    }
    
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
    }
    
    a {
        text-decoration: underline;
    }
    
    a[href^="http"]:after {
        content: " (" attr(href) ")";
    }
}
