Visual Effects
Your portfolio has a color system, semantic tokens, and a working dark mode. In this assignment you will add visual depth and polish by applying shadows, gradients, and filters to a new page of components. The HTML is provided. Your job is the CSS: defining shadow and effect tokens, styling each component with intentional visual treatments, and making sure everything works in both light and dark mode.
If you completed a choose topic from this unit (blend modes, clip-path, shape-outside, advanced gradients, or filter performance), you are expected to incorporate at least one technique from it into your work.
Preparation
Create a new directory in your portfolio at unit-3/visual-effects/. Inside it, create an index.html file that links to your root-level css/main.css. Copy the HTML below into the body of that file. When you are finished, your portfolio should include these paths:
The required live shared sheet is css/main.css. If you are keeping a bundler, follow After This Assignment: Stop or Keep.
[portfolio]
├── css/
│ ├── components/
│ │ └── effects.css # New
│ ├── tokens/
│ │ └── variables.css # Update
│ └── main.css # May Update
├── unit-3/
│ └── visual-effects/
│ └── index.html # New
├── index.html # Update: Add Links
└── README.md # Update: Pages Links
Create css/components/effects.css for all the visual effect styles you write in this assignment. Import it into your main.css within the components layer if it is not already there. Add your shadow and effect tokens to tokens/variables.css so they are available site-wide.
Starter HTML
Copy the following HTML into the <body> of your unit-3/visual-effects/index.html file. The placeholder images can be replaced with your own if you prefer.
<nav class="site-nav">
<a href="../../index.html">← Home</a>
<ul>
<li><a href="#">Gallery</a></li>
<li><a href="#" aria-current="page">Effects</a></li>
<li><a href="#">About</a></li>
</ul>
</nav>
<!-- HERO: Use a gradient overlay and text-shadow for depth -->
<header class="hero">
<img
class="hero-image"
src="https://picsum.photos/seed/hero-effects/1200/500"
alt="Landscape placeholder for hero section"
>
<div class="hero-content">
<h1>Visual Effects Showcase</h1>
<p>Shadows, gradients, and filters working together.</p>
</div>
</header>
<main>
<!-- CARDS: Elevation shadows, hover transitions -->
<section class="card-section">
<h2>Elevation Cards</h2>
<div class="cards">
<article class="card">
<img
class="card-image"
src="https://picsum.photos/seed/card-1/400/250"
alt="Placeholder image"
>
<!-- Replace placeholder images with your own if you prefer -->
<div class="card-body">
<h3>Layered Shadows</h3>
<p>
Multiple shadow layers create realistic depth
that changes on hover.
</p>
</div>
</article>
<article class="card">
<img
class="card-image"
src="https://picsum.photos/seed/card-2/400/250"
alt="Placeholder image"
>
<div class="card-body">
<h3>Gradient Surfaces</h3>
<p>
A subtle gradient on the card background adds
dimension without distracting from content.
</p>
</div>
</article>
<article class="card">
<img
class="card-image"
src="https://picsum.photos/seed/card-3/400/250"
alt="Placeholder image"
>
<div class="card-body">
<h3>Filtered Images</h3>
<p>
A grayscale or sepia filter on the image that
lifts on hover draws attention to active cards.
</p>
</div>
</article>
</div>
</section>
<!-- GLASS PANEL: backdrop-filter for frosted glass -->
<section class="glass-section">
<div class="glass-background">
<img
src="https://picsum.photos/seed/glass-bg/1200/400"
alt="Background image behind glass panel"
class="glass-bg-image"
>
</div>
<div class="glass-panel">
<h2>Frosted Glass</h2>
<p>
This panel uses backdrop-filter to blur and saturate the
image behind it. The text stays sharp while the background
softens into a frosted surface.
</p>
</div>
</section>
<!-- ICON ROW: drop-shadow on transparent images -->
<section class="icon-section">
<h2>Drop Shadow on Transparent Images</h2>
<p>
These icons use drop-shadow() instead of box-shadow so the shadow
follows the actual shape of each image rather than its bounding box.
</p>
<div class="icon-row">
<!-- Replace these with your own transparent PNGs or SVGs -->
<img class="icon-item" src="https://cdn.jsdelivr.net/npm/@tabler/icons@2.47.0/icons/heart.svg" alt="Heart icon">
<img class="icon-item" src="https://cdn.jsdelivr.net/npm/@tabler/icons@2.47.0/icons/star.svg" alt="Star icon">
<img class="icon-item" src="https://cdn.jsdelivr.net/npm/@tabler/icons@2.47.0/icons/bookmark.svg" alt="Bookmark icon">
<img class="icon-item" src="https://cdn.jsdelivr.net/npm/@tabler/icons@2.47.0/icons/message-circle.svg" alt="Message icon">
</div>
</section>
<!-- CHOOSE TOPIC: Add your own section here if applicable -->
<!--
If you completed a choose topic (blend modes, clip-path,
shape-outside, advanced gradients, or filter performance),
add a section below that demonstrates at least one technique
from it. Add the HTML you need and style it in your effects.css.
-->
</main>
<footer class="site-footer">
<p>© 2026 My portfolio</p>
</footer>
Assignment Instructions
1. Define Your Shadow Tokens
Open css/tokens/variables.css and add at least two elevation levels as custom properties. These should be layered shadow stacks (two to three shadow layers each) using the pattern from the Shadows and Gradients reading. Name them by purpose, such as --shadow-sm and --shadow-md, or --shadow-card and --shadow-raised. Use your color tokens or semi-transparent neutral values for the shadow color.
2. Style the Hero Section
The hero section needs at least two visual effects working together. Use a gradient overlay on top of the background image (a radial vignette, a directional fade, or a semi-transparent color wash) and add a text-shadow to the heading so it remains legible over the image. Consider how both effects should adapt in dark mode.
3. Style the Elevation Cards
Apply your shadow tokens to the cards. Add a hover state that transitions to a higher elevation level so the card feels like it lifts when the user interacts with it. At least one card should include a filter treatment on its image (grayscale, sepia, brightness, or similar) that changes on hover. Use your existing color tokens for the card background and text so they flip correctly in dark mode.
4. Build the Frosted Glass Panel
Style the glass section so the background image sits behind the panel and the panel uses backdrop-filter with blur() and saturate() to create a frosted glass effect. Give the panel a semi-transparent background using light-dark() so it adapts to both themes. Add a prefers-reduced-motion fallback that replaces the blur with a solid background for users who have requested reduced motion.
5. Style the Icon Row
Apply drop-shadow() to the icons so the shadow follows their actual shape. Experiment with stacking multiple drop-shadow() calls for a thicker outline effect. Make sure the shadow color works in both light and dark mode. Consider using currentColor so the shadow automatically follows the inherited text color.
6. Apply a Choose Topic Technique
If you completed a choose topic this unit, add a new section to the page that demonstrates at least one technique from it. Add whatever HTML you need and write the CSS in your effects.css file. If you did not complete a choose topic, skip this step.
7. Test and Verify
Switch between light and dark mode using your theme toggle and verify that every visual effect looks intentional in both themes. Check your page on a mobile device or a narrow browser window to make sure nothing breaks at smaller sizes. Commit everything, push to GitHub, and verify that the live page works.
Add a link to this assignment on your portfolio homepage and in your README.md under the Pages section, following the same pattern from previous assignments.
Submission
Complete the report below. When you are finished, download the PDF and submit it to Canvas.
My live visual effects page is at and the source code is at .
Pick two visual effects you applied on this page and explain the design decision behind each one. What were you trying to communicate to the user? Did you try a different approach first and reject it? If so, why?
What was the hardest part of making your visual effects work in both light and dark mode? Describe a specific problem you ran into and how you solved it.
Is there an effect you considered adding but decided against? What was it and why did you leave it out? What did removing it teach you about when visual effects help versus when they become clutter?