/* 
    Author: Rich Robichaud
    Course: ITWP 1050 
    Assignment: Homework 4
*/

/* Using universal selector to reset margins and padding - learned this is best practice */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* This makes width calculations include padding and border */
    color: #2d3748; /* Dark slate color for better readability than pure black */
}

/* Body styling with modern font stack */
body {
    font-family: 'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, sans-serif; 
    font-size: 16px; 
    line-height: 1.6;
    background-color: #f7f8fc; /* Light background for better contrast */
    max-width: 900px;
    margin: 0 auto; /* Center the page horizontally */
    padding: 2rem;
    position: relative;
}

/* Adding subtle texture background to body - using pseudo-element to avoid affecting content */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAMAAAAp4XiDAAAAUVBMVEWFhYWDg4N3d3dtbW17e3t1dXWBgYGHh4d5eXlzc3OLi4ubm5uVlZWPj4+NjY19fX2JiYl/f39ra2uRkZGZmZlpaWmXl5dvb29xcXGTk5NnZ2c8TV1mAAAAG3RSTlNAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAvEOwtAAAFVklEQVR4XpWWB67c2BUFb3g557T/hRo9/WUMZHlgr4Bg8Z4qQgQJlHI4A8SzFVrapvmTF9O7dmYRFZ60YiBhJRCgh1FYhiLAmdvX0CzTOpNE77ME0Zty/nWWzchDtiqrmQDeuv3powQ5ta2eN0FY0InkqDD73lT9c9lEzwUNqgFHs9VQce3TVClFCQrSTfOiYkVJQBmpbq2L6iZavPnAPcoU0dSw0SUTqz/GtrGuXfbyyBniKykOWQWGqwwMA7QiYAxi+IlPdqo+hYHnUt5ZPfnsHJyNiDtnpJyayNBkF6cWoYGAMY92U2hXHF/C1M8uP/ZtYdiuj26UdAdQQSXQErwSOMzt/XWRWAz5GuSBIkwG1H3FabJ2OsUOUhGC6tK4EMtJO0ttC6IBD3kM0ve0tJwMdSfjZo+EEISa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MJpiKYkmW3tTg3ZQ9Jq+f8XN+A5eeUKHWvJWJ2sgJ1Sop+wwhqFVijqWaJhwtD8MNlSBeWNNWTa5Z5kPZw5+LbVT99wqTdx29lMUH4OIG/D86ruKEauBjvH5xy6um/Sfj7ei6UUVk4AIl3MyD4MSSTOFgSwsH/QJWaQ5as7ZcmgBZkzjjU1UrQ74ci1gWBCSGHtuV1H2mhSnO3Wp/3fEV5a+4wz//6qy8JxjZsmxxy5+4w9CDNJY09T072iKG0EnOS0arEYgXqYnXcYHwjTtUNAcMelOd4xpkoqiTYICWFq0JSiPfPDQdnt+4/wuqcXY47QILbgAAAABJRU5ErkJggg==');
    opacity: 0.1;
    z-index: -1;
    pointer-events: none;
}

/* Header styling with gradient background - using linear-gradient as required */
header {
    text-align: center;
    margin-bottom: 2.5rem;
    /* Used a linear gradient for the background as required in the assignment */
    background: linear-gradient(135deg, #591e1e 0%, #8a3838 100%);
    padding: 2.5rem 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

/* Adding a decorative element to the header with pseudo-element */
header::before {
    content: "";
    position: absolute;
    top: -50px;
    right: -50px;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

/* Using the web font as required in the assignment */
@font-face {
    font-family: 'IM Fell English SC';
    src: url('https://fonts.googleapis.com/css2?family=IM+Fell+English+SC&display=swap');
}

/* H1 styling with all the required properties from the assignment:
   - Web font
   - Text shadow
   - Letter spacing
   - Small caps
   - Nowrap */
h1 {
    font-family: 'IM Fell English SC', Georgia, serif; /* Web font with fallback stack */
    color: #ffffff;
    font-size: 3.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); /* Adding text shadow as required */
    letter-spacing: 3px; /* Adding letter spacing as required */
    font-variant: small-caps; /* Using small caps as required */
    white-space: nowrap; /* Setting to nowrap as required */
    margin-bottom: 1rem;
    position: relative;
}

/* Styling for other heading elements to match the theme */
h2, h3 {
    color: #ffffff;
    font-weight: 400;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

h3 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
}

/* Image container with radial gradient background (second gradient required by assignment) */
.image-container {
    display: flex;
    justify-content: center;
    gap: 25px;
    padding: 30px;
    margin: 30px 0;
    /* Using radial gradient as a second background gradient (assignment requirement) */
    background: radial-gradient(circle at top left, #6e2424, #3d1616);
    border-radius: 16px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

/* Adding decorative element to image container */
.image-container::after {
    content: "";
    position: absolute;
    bottom: -20px;
    left: -20px;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    z-index: 1;
}

/* Image formatting with hover effects - border is required by assignment */
img {
    display: block;
    max-width: 45%;
    height: auto;
    border: 1px solid rgba(0, 0, 0, 0.2); /* Border is required by assignment */
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

/* Hover effects for images - learned this from tutorials on modern web design */
img:hover {
    transform: translateY(-8px) scale(1.02);
    filter: brightness(1.05);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

/* Quote container styling with left border for accent */
.quote-container {
    margin: 30px 0;
    padding: 2.5rem 2rem 2rem 3rem;
    border-radius: 12px;
    background: linear-gradient(to right, #ffffff, #f8f8f8);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.06);
    border-left: 4px solid #742a2a;
    position: relative;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Added more space between quotes for better readability */
.quote-container + .quote-container {
    margin-top: 40px;
}

/* Hover effect for quotes */
.quote-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

/* Added decorative quote mark to each quote container */
.quote-container::before {
    content: '❝';
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 2.5rem;
    color: rgba(116, 42, 42, 0.15);
    font-family: Georgia, serif;
}

/* Paragraph styling - line height is required by assignment */
.quote-container p {
    font-family: 'Georgia', serif;
    font-size: 1.05rem;
    color: #333;
    line-height: 1.8; /* Setting the line height as required by assignment */
    text-align: left;
    text-indent: 0;
    position: relative;
    margin-bottom: 0;
}

/* Styling for the source citation */
.source {
    text-align: center;
    font-weight: 500;
    margin: 30px auto;
    color: #555;
    font-size: 0.95rem;
    max-width: 90%;
}

/* Footer styling - top and bottom margins are required by assignment */
footer {
    margin: 50px auto; /* Top and bottom margins required by assignment */
    text-align: center;
    font-size: 0.9rem;
    background-color: #f0f0f0;
    padding: 1.5rem;
    border-top: 2px solid #742a2a;
    border-radius: 12px;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.05);
    max-width: 90%;
}

/* Centering copyright text in footer */
footer p {
    text-align: center;
    margin-bottom: 1rem;
    text-indent: 0;
}

/* Styling for footer links */
footer a {
    text-decoration: none;
    color: #742a2a;
    font-weight: 500;
    margin: 0 10px;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    position: relative;
    display: inline-block;
}

/* Hover effect for footer links */
footer a:hover {
    text-decoration: none;
    background-color: rgba(116, 42, 42, 0.1);
    color: #742a2a;
}

/* Styling for external link indicator - required by assignment */
.external-link::after {
    content: "↗"; /* Used an arrow instead of text for a modern look */
    display: inline-block;
    margin-left: 4px;
    font-size: 0.8em;
    transition: transform 0.2s ease;
}

/* Animation for external link arrow */
.external-link:hover::after {
    transform: translateY(-2px) translateX(2px);
}

/* ========= NEW HOMEWORK 4 REQUIREMENTS BELOW ========= */

/* Requirement 1: Rotation function on first image */
.rotate-image {
    /* Adding a rotation transform when hovering over the image */
    transition: transform 0.5s ease-in-out;
}

.rotate-image:hover {
    /* Using the rotate function to rotate the image by 5 degrees */
    transform: rotate(5deg);
}

/* Requirement 2: Scale function on second image */
.scale-image {
    /* Adding a scale transform when hovering over the image */
    transition: transform 0.5s ease-in-out;
}

.scale-image:hover {
    /* Using the scale function to increase the size by 10% */
    transform: scale(1.1);
}

/* Requirement 3: Skew function on second quote container */
.skew-container {
    /* Adding a skew transform when hovering over the container */
    transition: transform 0.5s ease-in-out;
}

.skew-container:hover {
    /* Using the skewX function to skew the container by 2 degrees */
    transform: skewX(2deg);
}

/* Requirement 4: Transform shorthand property for multiple transforms */
.multi-transform {
    /* Using transform shorthand to apply multiple transforms */
    transition: transform 0.5s ease-in-out, box-shadow 0.5s ease-in-out;
}

.multi-transform:hover {
    /* Applying rotation, scale, and translation in a single transform property */
    transform: rotate(1deg) scale(1.02) translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

/* Requirement 5: Transition properties for background color */
/* Creating a transition class that changes background color */
.quote-container {
    /* Using individual transition properties as required */
    transition-property: background, transform, box-shadow;
    transition-duration: 0.5s;
    transition-delay: 0.1s;
    background: linear-gradient(to right, #ffffff, #f8f8f8);
}

.quote-container:hover {
    /* Changed background gradient on hover */
    background: linear-gradient(to right, #fff8f8, #f8f0f0);
}

/* Media queries for responsive design - ensures it works on all devices */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    .image-container {
        flex-direction: column;
        align-items: center;
    }
    
    img {
        max-width: 85%;
        margin-bottom: 20px;
    }
    
    .quote-container {
        padding: 2rem 1.5rem 1.5rem 2rem;
    }
}