/* 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;
    transition: box-shadow 0.3s ease;
}

.navbar:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.logo {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: -2px;
    color: var(--ink);
    transition: color 0.3s ease, transform 0.3s ease;
}

.logo:hover {
    color: var(--coral);
    transform: rotate(-5deg) scale(1.1);
}

/* 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;
    transition: color 0.3s ease, letter-spacing 0.3s ease;
}

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

.nav-links a:hover {
    color: var(--coral);
    letter-spacing: 2px;
}

.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 - ANIMATION 2 */
.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;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-work-with-me::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--coral);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

.btn-work-with-me:hover::before {
    width: 300px;
    height: 300px;
}

.btn-work-with-me:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(240, 128, 112, 0.4);
}

.btn-work-with-me span {
    position: relative;
    z-index: 1;
}

/* 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 - ANIMATION 3: Pulse effect */
.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);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: rotate(-2deg) scale(1);
    }
    50% {
        transform: rotate(-2deg) scale(1.05);
    }
}

/* 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);
    background: linear-gradient(90deg, var(--sky) 0%, var(--coral) 50%, var(--sky) 100%);
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 3s linear infinite;
}

/* ANIMATION 6: Text shimmer effect */
@keyframes shimmer {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: 200% center;
    }
}

/* 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 - ANIMATION 4: Floating animation */
.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);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: rotate(12deg) translateY(0);
    }
    50% {
        transform: rotate(12deg) translateY(-15px);
    }
}

.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 - ANIMATION 5: Image zoom and filter */
.project-img-wrap {
    display: block;
    overflow: hidden;
    border-radius: 4px;
    position: relative;
}

.project-img-wrap::after {
    content: 'View Project';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--coral);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 2;
}

.project-img-wrap:hover::after {
    opacity: 1;
}

.project-img {
    width: 100%;
    background: var(--sky);
    transition: transform 0.5s ease, filter 0.5s ease;
}

.project-img-wrap:hover .project-img {
    transform: scale(1.1);
    filter: brightness(0.7);
}

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

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

.project-title {
    color: var(--ink);
    margin-top: 2px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.project-card:hover .project-title {
    color: var(--coral);
    transform: translateX(10px);
}

.project-card:hover .project-meta {
    transform: translateX(10px);
}

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

.project-card:hover .project-desc {
    transform: translateX(10px);
}

/* 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;
}

/* 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);
    perspective: 1000px;
}

.sketchbook-page {
    aspect-ratio: 1 / 1.3;
    padding: 24px;
    transition: transform 0.6s ease;
    transform-style: preserve-3d;
}

/* Page flip animation effect */
.sketchbook.flipping .sketchbook-right {
    animation: pageFlip 0.6s ease-in-out;
}

@keyframes pageFlip {
    0% {
        transform: rotateY(0deg);
    }
    50% {
        transform: rotateY(-90deg);
    }
    100% {
        transform: rotateY(0deg);
    }
}

.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 controls with arrows */
.sketchbook-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.sketchbook-arrow {
    background: var(--coral);
    color: var(--white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sketchbook-arrow:hover {
    background: var(--ink);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.sketchbook-arrow:active {
    transform: scale(0.95);
}

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

/* 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;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

/* ANIMATION 9: Scale with shadow */
.playground-item:hover .playground-img {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 30px rgba(159, 213, 232, 0.5);
}

/* Decorative elements for playground - ANIMATION 7: Bounce */
.gallery-circle {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--yellow);
    z-index: 1;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.gallery-circle--1 {
    top: -20px;
    left: -20px;
    animation-delay: 0s;
}

.gallery-circle--2 {
    bottom: 30%;
    left: 15%;
    animation-delay: 0.5s;
}

.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;
    animation: rotate 4s linear infinite;
}

/* ANIMATION 8: Rotation */
@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.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;
}

/* Contact Page Styles */
.contact-page {
    max-width: 1000px;
}

.contact-content {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 48px;
    align-items: start;
}

.contact-info h2 {
    font-size: 1.8rem;
    margin-bottom: 16px;
    color: var(--ink);
}

.contact-info p {
    font-size: 0.9rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 24px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contact-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #888;
    text-transform: uppercase;
}

.contact-item a {
    color: var(--coral);
    font-weight: 600;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--sky);
}

/* Contact Form */
.contact-form {
    background: var(--white);
    padding: 32px;
    border-radius: 8px;
    border: 2px solid var(--sky);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--ink);
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    border: 2px solid #e0dcd5;
    border-radius: 4px;
    background: var(--white);
    color: var(--ink);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--coral);
    box-shadow: 0 0 0 3px rgba(240, 128, 112, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #aaa;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 14px 32px;
    background: var(--coral);
    color: var(--white);
    border: none;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--ink);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

.submit-btn:hover::before {
    width: 300px;
    height: 300px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(240, 128, 112, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn span {
    position: relative;
    z-index: 1;
}

.form-note {
    margin-top: 16px;
    font-size: 0.75rem;
    color: #888;
    line-height: 1.6;
    font-style: italic;
}

.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;
    transition: opacity 0.3s ease, color 0.3s ease, transform 0.3s ease;
    position: relative;
}

/* ANIMATION 10: Slide and glow effect */
.footer-link::before {
    content: '→';
    position: absolute;
    left: -20px;
    opacity: 0;
    transition: left 0.3s ease, opacity 0.3s ease;
}

.footer-link:hover::before {
    left: -15px;
    opacity: 1;
}

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

.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;
    }
    
    /* Contact page single column */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    /* 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;
    }
}