/* ========================================
   EDITORIAL CANVAS - Magazine Style Portfolio
   ======================================== */

/* CSS Variables */
:root {
    /* Colors */
    --bg-primary: #FAF9F6;
    --text-primary: #1C1C1C;
    --text-secondary: #6B6B6B;
    --accent: #C75C3E;
    --card-bg: #FFFFFF;
    
    /* Typography */
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Spacing */
    --section-padding: clamp(4rem, 10vw, 8rem);
    --content-max-width: 1400px;
    
    /* Transitions */
    --transition-smooth: 500ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-fast: 300ms ease-out;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

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

a {
    color: inherit;
    text-decoration: none;
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes lineGrow {
    from {
        transform: scaleY(0);
    }
    to {
        transform: scaleY(1);
    }
}

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

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 600ms ease-out, transform 600ms ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    padding: 2rem;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: var(--content-max-width);
    width: 100%;
    margin: 0 auto;
    position: relative;
}

.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.hero-label {
    font-family: var(--font-body);
    font-size: clamp(0.65rem, 1vw, 0.75rem);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.hero-name {
    font-family: var(--font-display);
    font-size: clamp(4rem, 12vw, 10rem);
    font-weight: 300;
    line-height: 0.9;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.name-line {
    display: block;
}

.name-line:first-child {
    font-style: italic;
    color: var(--accent);
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 400;
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-bio {
    max-width: 400px;
    margin-bottom: 2.5rem;
}

.hero-bio p {
    font-family: var(--font-body);
    font-size: clamp(0.9rem, 1.2vw, 1rem);
    font-weight: 300;
    line-height: 1.8;
    color: var(--text-secondary);
}

.hero-social {
    display: flex;
    gap: 1.25rem;
}

.social-link {
    width: 44px;
    height: 44px;
    border: 1px solid var(--text-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.social-link:hover {
    background-color: var(--accent);
    border-color: var(--accent);
    color: var(--card-bg);
    transform: translateY(-2px);
}

.hero-image-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image-wrapper {
    position: relative;
    width: 80%;
    max-width: 450px;
}

.hero-image {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    filter: grayscale(20%);
    transition: filter var(--transition-smooth);
}

.hero-image:hover {
    filter: grayscale(0%);
}

.hero-accent-line {
    position: absolute;
    right: 0;
    top: 10%;
    width: 2px;
    height: 80%;
    background: linear-gradient(to bottom, transparent, var(--accent), transparent);
    opacity: 0.6;
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.scroll-text {
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-secondary);
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--text-secondary), transparent);
    animation: pulse 2s ease-in-out infinite;
}

/* ========================================
   SECTION HEADER
   ======================================== */

.section-header {
    margin-bottom: 4rem;
    position: relative;
}

.section-label {
    display: block;
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 300;
    color: var(--text-primary);
    line-height: 1.1;
}

/* ========================================
   PROJECTS SECTION
   ======================================== */

.projects {
    padding: var(--section-padding) 2rem;
    max-width: var(--content-max-width);
    margin: 0 auto;
}

.projects-container {
    display: flex;
    flex-direction: column;
    gap: 6rem;
}

/* Featured Project */
.project-featured {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 0;
    position: relative;
    align-items: center;
}

.project-featured-image {
    position: relative;
    overflow: hidden;
}

.project-featured-image img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    transition: transform 600ms ease-out;
}

.project-featured:hover .project-featured-image img {
    transform: scale(1.03);
}

.project-featured-content {
    background: var(--card-bg);
    padding: 3rem;
    margin-left: -4rem;
    position: relative;
    z-index: 2;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

.project-featured-number {
    font-family: var(--font-display);
    font-size: 5rem;
    font-weight: 300;
    color: var(--accent);
    opacity: 0.15;
    line-height: 1;
    margin-bottom: -2rem;
}

.project-featured-title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.project-featured-description {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-primary);
    position: relative;
}

.project-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 400ms ease-out;
}

.project-link:hover::after {
    width: 100%;
}

.project-link i {
    font-size: 0.7rem;
    transition: transform 300ms ease;
}

.project-link:hover i {
    transform: translateX(4px);
}

/* Standard Projects */
.project-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.project-item:nth-child(even) {
    direction: rtl;
}

.project-item:nth-child(even) > * {
    direction: ltr;
}

.project-image {
    position: relative;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    transition: transform 600ms ease-out;
}

.project-item:hover .project-image img {
    transform: scale(1.05);
}

.project-content {
    padding: 2rem 0;
}

.project-number {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 300;
    color: var(--accent);
    opacity: 0.2;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.project-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.project-description {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 300;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* ========================================
   SKILLS SECTION
   ======================================== */

.skills {
    padding: var(--section-padding) 2rem;
    max-width: var(--content-max-width);
    margin: 0 auto;
    background: linear-gradient(to bottom, transparent, rgba(199, 92, 62, 0.03), transparent);
}

.skills-container {
    position: relative;
}

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

.skill-item {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 300;
    color: var(--text-primary);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    position: relative;
    cursor: default;
    transition: color var(--transition-fast);
}

.skill-item::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 400ms ease-out;
}

.skill-item:hover {
    color: var(--accent);
}

.skill-item:hover::after {
    width: 100%;
}

/* ========================================
   EXPERIENCE SECTION
   ======================================== */

.experience {
    padding: var(--section-padding) 2rem;
    max-width: var(--content-max-width);
    margin: 0 auto;
}

.experience-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.experience-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.experience-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.experience-meta {
    text-align: right;
}

.experience-period {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.experience-company {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--accent);
}

.experience-content {
    max-width: 600px;
}

.experience-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.experience-description {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.9;
    color: var(--text-secondary);
}

/* ========================================
   EDUCATION SECTION
   ======================================== */

.education {
    padding: var(--section-padding) 2rem;
    max-width: var(--content-max-width);
    margin: 0 auto;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.015), transparent);
}

.education-container {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.education-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: start;
    padding: 2rem;
    background: var(--card-bg);
    border-left: 3px solid var(--accent);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.education-item:hover {
    transform: translateX(8px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
}

.education-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.education-degree {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    font-weight: 400;
    color: var(--text-primary);
}

.education-school {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--accent);
}

.education-description {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 300;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.education-period {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* ========================================
   CONTACT SECTION
   ======================================== */

.contact {
    padding: var(--section-padding) 2rem;
    max-width: var(--content-max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4rem;
    align-items: center;
    position: relative;
}

.contact-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-heading {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 300;
    line-height: 1;
    color: var(--text-primary);
}

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

.contact-email {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    font-weight: 400;
    color: var(--accent);
    position: relative;
    display: inline-block;
    width: fit-content;
}

.contact-email::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 400ms ease-out;
}

.contact-email:hover::after {
    width: 100%;
}

.contact-location {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 300;
    color: var(--text-secondary);
}

.contact-social {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.contact-social .social-link {
    width: 48px;
    height: 48px;
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.contact-social .social-link:hover {
    background-color: var(--accent);
    border-color: var(--accent);
    color: var(--card-bg);
}

.contact-accent {
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-line {
    width: 2px;
    height: 200px;
    background: linear-gradient(to bottom, transparent, var(--accent), transparent);
    opacity: 0.4;
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
    padding: 2rem;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.footer p {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 300;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1024px) {
    .hero-grid {
        gap: 2rem;
    }
    
    .project-featured {
        grid-template-columns: 1fr;
    }
    
    .project-featured-content {
        margin-left: 0;
        margin-top: -3rem;
        margin-right: 2rem;
    }
    
    .project-item {
        gap: 2rem;
    }
    
    .experience-item {
        grid-template-columns: 150px 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: auto;
        padding: 4rem 1.5rem;
    }
    
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content {
        order: 2;
    }
    
    .hero-image-container {
        order: 1;
        margin-bottom: 2rem;
    }
    
    .hero-image-wrapper {
        width: 60%;
        max-width: 280px;
    }
    
    .hero-bio {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-social {
        justify-content: center;
    }
    
    .hero-accent-line {
        display: none;
    }
    
    .scroll-indicator {
        display: none;
    }
    
    .projects,
    .skills,
    .experience,
    .education,
    .contact {
        padding: 4rem 1.5rem;
    }
    
    .project-item {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .project-item:nth-child(even) {
        direction: ltr;
    }
    
    .skills-list {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .experience-item {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .experience-meta {
        text-align: left;
        display: flex;
        gap: 1rem;
        align-items: center;
    }
    
    .education-item {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .education-period {
        order: -1;
    }
    
    .contact {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .contact-email {
        margin: 0 auto;
    }
    
    .contact-social {
        justify-content: center;
    }
    
    .contact-line {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-name {
        font-size: 3.5rem;
    }
    
    .project-featured-content {
        padding: 2rem;
        margin-right: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .contact-heading {
        font-size: 2.5rem;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

@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;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Focus styles */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

/* Selection */
::selection {
    background: var(--accent);
    color: var(--card-bg);
}
