/* My Portfolio Website CSS 
   Xinyi Yao - Exercise 5 */

/* Setting up my color variables */
:root {
    --sky: #9fd5e8;
    --lavender: #c5b8e8;
    --coral: #f08070;
    --ink: #1a1a1a;
    --cream: #ffffff;
    --yellow: #ede87a;
    --white: #ffffff;
    --tape-stripe: #c8d86a;
}

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

html {
    font-size: 16px;
}

body {
    font-family: 'Courier New', Courier, monospace;
    background-color: var(--cream);
    color: var(--ink);
    overflow-x: hidden;
}

/* Headings */
h1 {
    font-size: 3.2rem;
    font-weight: 900;
    letter-spacing: 6px;
}

h2 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 2px;
}

h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

/* Hiding content visually but keeping it for screen readers */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

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

/* Navigation Bar */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 32px;
    background: var(--white);
    border-bottom: 1px solid #e0dcd5;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: -2px;
    color: var(--ink);
}

.logo:hover {
    color: var(--coral);
}

/* Nav Links */
.nav-links {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    list-style: none;
    gap: 28px;
}

.nav-links a {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--ink);
    position: relative;
    padding-bottom: 4px;
}

/* Underline animation for nav links */
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--coral);
    transition: width 0.3s;
}

.nav-links a:hover {
    color: var(--coral);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Active nav link */
.nav-links a.active {
    color: var(--coral);
}

.nav-links a.active::after {
    width: 100%;
}

/* Work With Me Button */
.btn-work-with-me {
    background: var(--ink);
    color: var(--white);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1.2px;
}

.btn-work-with-me:hover {
    background: var(--coral);
    transform: scale(1.05);
}

/* Hero Section on Homepage */
.hero {
    position: relative;
    width: 100%;
    min-height: 380px;
    background: var(--cream);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid #e0dcd5;
}

/* Grid lines in background */
.hero-grid-lines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.grid-line {
    position: absolute;
    background: #ddd8d0;
}

.grid-line--left {
    left: 22%;
    top: 0;
    bottom: 0;
    width: 1px;
}

.grid-line--right {
    left: 80%;
    top: 0;
    bottom: 0;
    width: 1px;
}

.grid-line--h {
    top: 72%;
    left: 0;
    right: 0;
    height: 1px;
}

/* Chinese name tag */
.hero-name-tag {
    position: absolute;
    top: 60px;
    left: 10%;
    background: var(--ink);
    color: var(--white);
    padding: 8px 18px;
    font-size: 1.1rem;
    font-weight: 700;
    z-index: 3;
    letter-spacing: 2px;
    transform: rotate(-2deg);
    box-shadow: 2px 3px 6px rgba(0,0,0,.2);
}

/* Main hero card with polka dots */
.hero-card {
    position: relative;
    z-index: 2;
    width: 520px;
    max-width: 85vw;
    min-height: 220px;
    background: var(--lavender);
    background-image: radial-gradient(circle, rgba(255,255,255,.55) 1.2px, transparent 1.2px);
    background-size: 18px 18px;
    padding: 40px 36px 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transform: rotate(1deg);
    box-shadow: 3px 4px 12px rgba(0,0,0,.12);
}

.hero-sub {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--ink);
    margin-top: 8px;
}

.hero-isa {
    font-size: 1rem;
    color: var(--ink);
    opacity: .75;
    margin-top: 2px;
}

.hero-title {
    color: var(--ink);
    margin-top: 6px;
    text-shadow: 2px 2px 0 rgba(0,0,0,.08);
}

/* Pink ribbon */
.hero-ribbon {
    position: absolute;
    bottom: 42px;
    left: 6%;
    background: var(--coral);
    color: var(--white);
    padding: 16px 22px;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.5;
    letter-spacing: 1px;
    transform: rotate(-3deg);
    z-index: 4;
    box-shadow: 2px 3px 8px rgba(0,0,0,.18);
}

/* Puzzle piece decoration */
.hero-puzzle {
    position: absolute;
    top: 42px;
    right: 12%;
    width: 72px;
    height: 72px;
    background: var(--sky);
    border-radius: 12px;
    z-index: 3;
    transform: rotate(12deg);
    box-shadow: 2px 3px 6px rgba(0,0,0,.15);
}

.hero-puzzle::before {
    content: '';
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 22px;
    background: var(--sky);
    border-radius: 50%;
}

.hero-puzzle::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: var(--cream);
    border-radius: 50%;
}

/* Tape decorations */
.tape {
    position: absolute;
    z-index: 5;
    pointer-events: none;
}

.tape::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
}

.tape::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
}

.tape--hero-right {
    top: 55%;
    right: 16%;
    width: 40px;
    height: 48px;
    background: var(--yellow);
}

.tape--hero-right::before {
    top: 0;
    bottom: 0;
    left: 0;
    width: 14px;
    background: var(--tape-stripe);
}

.tape--hero-right::after {
    top: 0;
    bottom: 0;
    right: 0;
    width: 14px;
    background: var(--tape-stripe);
    left: auto;
}

.tape--hero-bottom {
    bottom: 28px;
    right: 28%;
    width: 48px;
    height: 28px;
    background: var(--yellow);
    transform: rotate(-5deg);
}

.tape--hero-bottom::before {
    top: 0;
    height: 9px;
    background: var(--tape-stripe);
}

.tape--hero-bottom::after {
    bottom: 0;
    height: 9px;
    background: var(--tape-stripe);
}

/* Projects Grid */
.projects {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    padding: 48px 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.project-card {
    display: flex;
    flex-direction: column;
}

/* Different heights for each project card */
.project-card--1 .project-img {
    height: 340px;
}

.project-card--2 .project-img {
    height: 240px;
}

.project-card--3 .project-img {
    height: 280px;
}

.project-card--4 .project-img {
    height: 320px;
}

.project-img-wrap {
    display: block;
    overflow: hidden;
    border-radius: 4px;
}

.project-img {
    width: 100%;
    background: var(--sky);
}

/* Hover effect for project images */
.project-img-wrap:hover .project-img {
    transform: scale(1.04);
    filter: brightness(0.92) saturate(1.15);
}

.project-info {
    padding: 12px 0 0;
}

.project-meta {
    font-size: 0.7rem;
    letter-spacing: 1.5px;
    color: #888;
    font-weight: 600;
}

.project-title {
    color: var(--ink);
    margin-top: 2px;
}

.project-card:hover .project-title {
    color: var(--coral);
}

.project-desc {
    font-size: 0.78rem;
    color: #777;
    margin-top: 2px;
    letter-spacing: 0.5px;
}

/* Page Grid for subpages */
.page-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    padding: 48px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.page-header {
    grid-column: 1 / -1;
    text-align: left;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 12px;
}

.page-subtitle {
    font-size: 0.95rem;
    color: #555;
    letter-spacing: 0.5px;
}

/* Making projects section break out of container */
.page-grid .projects {
    grid-column: 1 / -1;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    padding: 48px calc(50vw - 50%);
}

/* Playground page sketchbook */
.sketchbook-section {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.sketchbook {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    width: 100%;
    max-width: 600px;
    border: 8px solid var(--sky);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sketchbook-page {
    aspect-ratio: 1 / 1.3;
    padding: 24px;
}

.sketchbook-left {
    background: #faf8f0;
    border-right: 4px solid #ccc;
    display: flex;
    align-items: flex-start;
}

.sketchbook-title {
    font-family: 'Brush Script MT', cursive, 'Courier New';
    font-size: 1.2rem;
    font-style: italic;
}

.sketchbook-right {
    background: #faf8f0;
}

.sketchbook-instruction {
    font-size: 0.75rem;
    color: #666;
    letter-spacing: 1px;
}

/* Playground gallery */
.playground-gallery {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    position: relative;
    padding: 24px 0;
}

.playground-item {
    position: relative;
}

.playground-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--sky);
    border-radius: 4px;
}

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

/* Decorative elements for playground */
.gallery-circle {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--yellow);
    z-index: 1;
}

.gallery-circle--1 {
    top: -20px;
    left: -20px;
}

.gallery-circle--2 {
    bottom: 30%;
    left: 15%;
}

.gallery-star {
    position: absolute;
    bottom: 10%;
    right: 8%;
    width: 0;
    height: 0;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-bottom: 40px solid var(--ink);
    z-index: 1;
}

.gallery-star::before {
    content: '';
    position: absolute;
    top: 12px;
    left: -25px;
    width: 0;
    height: 0;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-top: 40px solid var(--ink);
}

.tape--playground-1 {
    top: 20%;
    right: 15%;
    width: 48px;
    height: 28px;
    background: var(--yellow);
    transform: rotate(15deg);
}

.tape--playground-1::before {
    top: 0;
    height: 9px;
    background: var(--tape-stripe);
}

.tape--playground-1::after {
    bottom: 0;
    height: 9px;
    background: var(--tape-stripe);
}

.tape--playground-2 {
    bottom: 25%;
    left: 20%;
    width: 48px;
    height: 28px;
    background: var(--coral);
    transform: rotate(-10deg);
}

.tape--playground-2::before {
    top: 0;
    height: 9px;
    background: rgba(255, 255, 255, 0.3);
}

.tape--playground-2::after {
    bottom: 0;
    height: 9px;
    background: rgba(255, 255, 255, 0.3);
}

/* About page styles */
.about-page {
    position: relative;
}

/* Background grid lines for about page */
.about-grid-lines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
}

.about-grid-lines .grid-line {
    position: absolute;
    background: #e8e8e8;
}

.grid-line--v1 {
    left: 20%;
    top: 0;
    bottom: 0;
    width: 1px;
}

.grid-line--v2 {
    right: 40%;
    top: 0;
    bottom: 0;
    width: 1px;
}

.about-hero {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 45% 55%;
    gap: 0;
    position: relative;
    align-items: start;
    z-index: 1;
    margin-bottom: 24px;
}

.tape--about-top {
    top: -20px;
    left: 8%;
    width: 80px;
    height: 40px;
    background: var(--yellow);
    transform: rotate(5deg);
}

.tape--about-top::before {
    top: 0;
    height: 13px;
    background: var(--tape-stripe);
}

.tape--about-top::after {
    bottom: 0;
    height: 13px;
    background: var(--tape-stripe);
}

.about-hero-img {
    background: var(--sky);
    width: 100%;
    height: 320px;
    position: relative;
}

.about-hero-content {
    padding: 0 48px 0 32px;
    position: relative;
}

.about-hero-content h1 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    font-weight: 400;
}

.about-hero-content p {
    font-size: 0.88rem;
    line-height: 1.8;
    margin-bottom: 16px;
}

/* Puzzle piece on about page */
.about-puzzle-piece {
    position: absolute;
    top: -15px;
    right: 8%;
    width: 100px;
    height: 100px;
    background: var(--coral);
    border-radius: 16px;
    transform: rotate(-10deg);
    z-index: 10;
}

.about-puzzle-piece::before {
    content: '';
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 28px;
    background: var(--coral);
    border-radius: 50%;
}

.about-puzzle-piece::after {
    content: '';
    position: absolute;
    right: -14px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    background: var(--white);
    border-radius: 50%;
}

.about-content {
    grid-column: 1 / -1;
    padding: 0 48px;
    position: relative;
    z-index: 1;
    margin-bottom: 48px;
}

.about-content p {
    font-size: 0.88rem;
    line-height: 1.8;
    margin-bottom: 20px;
}

/* Puzzle grid at bottom of about page */
.puzzle-grid {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, 350px);
    grid-template-rows: repeat(2, 350px);
    gap: 0;
    justify-content: center;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.puzzle-piece {
    width: 350px;
    height: 350px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.puzzle--sky {
    background: var(--sky);
}

.puzzle--coral {
    background: var(--coral);
}

/* Puzzle piece 1 */
.puzzle--1::before {
    content: '';
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 70px;
    background: var(--sky);
    border-radius: 50%;
    z-index: 2;
}

.puzzle--1::after {
    content: '';
    position: absolute;
    left: -35px;
    top: 50%;
    transform: translateY(-50%);
    width: 70px;
    height: 70px;
    background: var(--white);
    border-radius: 50%;
}

/* Puzzle piece 2 */
.puzzle--2::before {
    content: '';
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 70px;
    background: var(--white);
    border-radius: 50%;
}

.puzzle--2 .puzzle-left {
    position: absolute;
    left: -35px;
    top: 50%;
    transform: translateY(-50%);
    width: 70px;
    height: 70px;
    background: var(--coral);
    border-radius: 50%;
    z-index: 2;
}

.puzzle--2 .puzzle-right {
    position: absolute;
    right: -35px;
    top: 50%;
    transform: translateY(-50%);
    width: 70px;
    height: 70px;
    background: var(--coral);
    border-radius: 50%;
    z-index: 2;
}

.puzzle--2 .puzzle-bottom {
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 70px;
    background: var(--sky);
    border-radius: 50%;
    z-index: 2;
}

/* Puzzle piece 3 */
.puzzle--3::before {
    content: '';
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 70px;
    background: var(--sky);
    border-radius: 50%;
    z-index: 2;
}

.puzzle--3::after {
    content: '';
    position: absolute;
    right: -35px;
    top: 50%;
    transform: translateY(-50%);
    width: 70px;
    height: 70px;
    background: var(--white);
    border-radius: 50%;
}

/* Puzzle piece 4 */
.puzzle--4::before {
    content: '';
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 70px;
    background: var(--sky);
    border-radius: 50%;
    z-index: 2;
}

.puzzle--4 .puzzle-left {
    position: absolute;
    left: -35px;
    top: 50%;
    transform: translateY(-50%);
    width: 70px;
    height: 70px;
    background: var(--white);
    border-radius: 50%;
}

.puzzle--4 .puzzle-right {
    position: absolute;
    right: -35px;
    top: 50%;
    transform: translateY(-50%);
    width: 70px;
    height: 70px;
    background: var(--coral);
    border-radius: 50%;
    z-index: 2;
}

.puzzle--4 .puzzle-bottom {
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 70px;
    background: var(--white);
    border-radius: 50%;
}

/* Puzzle piece 5 */
.puzzle--5::before {
    content: '';
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 70px;
    background: var(--white);
    border-radius: 50%;
}

.puzzle--5 .puzzle-left {
    position: absolute;
    left: -35px;
    top: 50%;
    transform: translateY(-50%);
    width: 70px;
    height: 70px;
    background: var(--coral);
    border-radius: 50%;
    z-index: 2;
}

.puzzle--5 .puzzle-right {
    position: absolute;
    right: -35px;
    top: 50%;
    transform: translateY(-50%);
    width: 70px;
    height: 70px;
    background: var(--coral);
    border-radius: 50%;
    z-index: 2;
}

.puzzle--5 .puzzle-bottom {
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 70px;
    background: var(--sky);
    border-radius: 50%;
    z-index: 2;
}

/* Puzzle piece 6 */
.puzzle--6::before {
    content: '';
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 70px;
    background: var(--sky);
    border-radius: 50%;
    z-index: 2;
}

.puzzle--6 .puzzle-left {
    position: absolute;
    left: -35px;
    top: 50%;
    transform: translateY(-50%);
    width: 70px;
    height: 70px;
    background: var(--white);
    border-radius: 50%;
}

.puzzle--6 .puzzle-right {
    position: absolute;
    right: -35px;
    top: 50%;
    transform: translateY(-50%);
    width: 70px;
    height: 70px;
    background: var(--coral);
    border-radius: 50%;
    z-index: 2;
}

.puzzle--6 .puzzle-bottom {
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 70px;
    background: var(--white);
    border-radius: 50%;
}

/* Footer */
.footer {
    position: relative;
    background: var(--ink);
    color: var(--white);
    margin-top: 20px;
    padding: 60px 40px 40px;
    overflow: hidden;
}

.footer-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 32px;
}

.footer-msg {
    font-size: 0.78rem;
    line-height: 1.7;
    opacity: .75;
    letter-spacing: 0.5px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.footer-link {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.8px;
    color: var(--white);
    opacity: .85;
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-link:hover {
    opacity: 1;
    color: var(--sky);
}

.icon-linkedin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: 1.5px solid currentColor;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 900;
}

.icon-instagram {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: 1.5px solid currentColor;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 900;
}

.footer-made {
    font-size: 0.72rem;
    text-align: right;
    line-height: 1.7;
    opacity: .6;
    letter-spacing: 0.5px;
}

.tape--footer-left {
    top: -10px;
    left: 20px;
    width: 54px;
    height: 30px;
    background: var(--yellow);
    transform: rotate(3deg);
}

.tape--footer-left::before {
    top: 0;
    height: 10px;
    background: var(--tape-stripe);
}

.tape--footer-left::after {
    bottom: 0;
    height: 10px;
    background: var(--tape-stripe);
}

.tape--footer-right {
    top: -10px;
    right: 30px;
    width: 54px;
    height: 30px;
    background: var(--yellow);
    transform: rotate(-3deg);
}

.tape--footer-right::before {
    top: 0;
    height: 10px;
    background: var(--tape-stripe);
}

.tape--footer-right::after {
    bottom: 0;
    height: 10px;
    background: var(--tape-stripe);
}

/* MEDIA QUERY FOR TABLETS - 768px and under */
@media (max-width: 768px) {
    
    /* Making hero smaller on tablets */
    .hero {
        min-height: 300px;
    }
    
    .hero-name-tag {
        top: 40px;
        font-size: 1rem;
    }
    
    .hero-ribbon {
        font-size: 0.65rem;
        padding: 12px 18px;
    }
    
    /* About page hero switches to single column */
    .about-hero {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .about-hero-content {
        padding: 0 24px;
    }

    .about-content {
        padding: 0 24px;
    }
    
    /* Puzzle pieces get smaller and rearrange */
    .puzzle-grid {
        grid-template-columns: repeat(2, 220px);
        grid-template-rows: repeat(3, 220px);
    }

    .puzzle-piece {
        width: 220px;
        height: 220px;
    }
    
    /* Adjusting puzzle tabs for smaller size */
    .puzzle--1::before {
        top: -22px;
        width: 44px;
        height: 44px;
    }
    
    .puzzle--1::after {
        left: -22px;
        width: 44px;
        height: 44px;
    }
    
    .puzzle--2::before {
        top: -22px;
        width: 44px;
        height: 44px;
    }
    
    .puzzle--2 .puzzle-left {
        left: -22px;
        width: 44px;
        height: 44px;
    }
    
    .puzzle--2 .puzzle-right {
        right: -22px;
        width: 44px;
        height: 44px;
    }
    
    .puzzle--2 .puzzle-bottom {
        bottom: -22px;
        width: 44px;
        height: 44px;
    }
    
    .puzzle--3::before {
        top: -22px;
        width: 44px;
        height: 44px;
    }
    
    .puzzle--3::after {
        right: -22px;
        width: 44px;
        height: 44px;
    }
    
    .puzzle--4::before {
        top: -22px;
        width: 44px;
        height: 44px;
    }
    
    .puzzle--4 .puzzle-left {
        left: -22px;
        width: 44px;
        height: 44px;
    }
    
    .puzzle--4 .puzzle-right {
        right: -22px;
        width: 44px;
        height: 44px;
    }
    
    .puzzle--4 .puzzle-bottom {
        bottom: -22px;
        width: 44px;
        height: 44px;
    }
    
    .puzzle--5::before {
        top: -22px;
        width: 44px;
        height: 44px;
    }
    
    .puzzle--5 .puzzle-left {
        left: -22px;
        width: 44px;
        height: 44px;
    }
    
    .puzzle--5 .puzzle-right {
        right: -22px;
        width: 44px;
        height: 44px;
    }
    
    .puzzle--5 .puzzle-bottom {
        bottom: -22px;
        width: 44px;
        height: 44px;
    }
    
    .puzzle--6::before {
        top: -22px;
        width: 44px;
        height: 44px;
    }
    
    .puzzle--6 .puzzle-left {
        left: -22px;
        width: 44px;
        height: 44px;
    }
    
    .puzzle--6 .puzzle-right {
        right: -22px;
        width: 44px;
        height: 44px;
    }
    
    .puzzle--6 .puzzle-bottom {
        bottom: -22px;
        width: 44px;
        height: 44px;
    }

    /* Playground gallery to 2 columns */
    .playground-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* MEDIA QUERY FOR MOBILE PHONES - 520px and under */
@media (max-width: 520px) {
    
    /* Rearranging navbar for mobile */
    .navbar {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }

    .nav-links {
        position: static;
        transform: none;
        width: 100%;
        justify-content: center;
        gap: 20px;
    }
    
    .nav-links a {
        font-size: 0.75rem;
    }
    
    /* Hero adjustments */
    .hero {
        min-height: 280px;
    }

    .hero-card {
        width: 90vw;
        padding: 30px 20px;
    }

    h1 {
        font-size: 2.2rem;
        letter-spacing: 3px;
    }
    
    .hero-ribbon {
        left: 2%;
        font-size: 0.6rem;
        padding: 10px 16px;
    }
    
    /* Projects switch to single column */
    .projects {
        grid-template-columns: 1fr;
        padding: 32px 16px;
    }

    .project-card--1 .project-img {
        height: 260px;
    }

    .project-card--2 .project-img {
        height: 260px;
    }

    .project-card--3 .project-img {
        height: 260px;
    }

    .project-card--4 .project-img {
        height: 260px;
    }
    
    /* Page grid padding */
    .page-grid {
        padding: 32px 16px;
    }

    .page-header h1 {
        font-size: 2rem;
    }
    
    /* Footer */
    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .footer-made {
        text-align: left;
    }
    
    /* Playground gallery single column */
    .playground-gallery {
        grid-template-columns: 1fr;
    }
}