body {
    margin: 0;
    padding: 0;
    line-height: 1.6;
    background-color: #f4f4f4;
    color: #000000;
}
.container {
    width: 80%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Branding styles */
.branding {
    display: flex;
    align-items: center;
    font-size: 25px;
}

.branding img {
    width: 210px;
    height: auto;
    margin: 0 10px;
    transition: transform 0.3s ease-in-out;
}

.branding img:hover {
    transform: scale(1.1);
}
/* Navigation styles */
nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    text-decoration: none;
    font-size: 20px;
    color: #000;
    text-shadow: 2px 4px 3px rgba(0, 0, 0, 0.3);
}

header h1 span {
    font-weight: normal;
}
header {
    position: relative;
    color: rgb(211, 104, 104);
    padding: 40px 0;
    text-align: center;
    background: url('_images/Clouds.png') repeat-x;
    background-size: auto;
    font-size: 2em;
    animation: moveBackground 60s linear infinite;
    box-shadow: 0 10px 8px rgba(0, 0, 0, 0.4);
}
header:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

/* Animation to move the background */
@keyframes moveBackground {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 100% 0;
    }
}

header h1 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

header h1 .jl-ink,
header h1 .jordan-lee {
    font-size: 2.5em;
}
header nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0;
}

header nav ul li a {
    padding: 10px;
}

header nav ul li a {
    color: #832626;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

header nav ul li a:hover {
    color: #d19b9b;
}
#about {
    padding: 0;
    margin: 0;
    position: relative;
}

#about .container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: auto;
    padding: 0;
}

.text-content {
    flex: 1;
    padding-right: 20px;
    max-width: 500px;
    text-align: left;
    margin: 0;
}

.image-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: visible;
    margin: 0;
}
.image-button {
    all: unset;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    background: none;
    border: none;
    padding: 0;
    outline: none;
}

.image-button:focus,
.image-button:hover {
    outline: none;
    background: none;
}

#clickable-image {
    display: block;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#clickable-image:hover {
    transform: scale(2.05);
    opacity: 0.9;
}
/* Image itself */
.image-content img {
    width: 50%;
    max-width: 1334px;
    height: auto;
    border-radius: 15px;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
    margin-bottom: 20px;
}

/* Decorative Frame */
.image-content::before,
.image-content::after {
    content: "";
    position: absolute;
    z-index: 0;
    width: 110%;
    height: 110%;
    border-radius: 15px;
    border-style: solid;
    transition: all 0.4s ease-in-out;
}

.image-content::before {
    top: -5%;
    left: -5%;
    border-width: 10px;
    border-color: #be4f4f #d05252 #561919 #832626;
    box-shadow: 0 0 10px rgba(190, 79, 79, 0.6), 5px 0 10px rgba(131, 38, 38, 0.6), 0 5px 10px rgba(86, 25, 25, 0.6), -5px 0 10px rgba(210, 82, 82, 0.6);
    animation: pulse-border 2s infinite;
}
.image-content::after {
    top: 5%;
    left: 5%;
    border-width: 8px;
    border-color: #d05252 #be4f4f #561919 #832626;
    transform: rotate(3deg);
    box-shadow: 0 0 8px rgba(210, 82, 82, 0.6), 5px 0 8px rgba(190, 79, 79, 0.6), 0 5px 8px rgba(131, 38, 38, 0.6), -5px 0 8px rgba(86, 25, 25, 0.6);
    animation: rotate-border 2.5s infinite ease-in-out;
}

/* Hover Effect: Animation of Borders */
.image-content:hover::before,
.image-content:hover::after {
    width: 120%;
    height: 120%;
    transform: rotate(360deg);
}

.image-content:hover img {
    transform: scale(1.1);
}

/* Allow the borders to overflow into other sections */
#about .container {
    position: relative;
    z-index: 1;
}

.image-content::before,
.image-content::after {
    z-index: -1;
}

/* Keyframe Animations */
@keyframes pulse-border {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes rotate-border {
    0% {
        transform: rotate(3deg);
    }
    50% {
        transform: rotate(-3deg);
    }
    100% {
        transform: rotate(3deg);
    }
}
#clickable-image {
    cursor: pointer;
    transition: transform 0.2s ease;
}

#clickable-image:hover {
    transform: scale(1.1);
}

.section {
    padding: 20px 0;
    background-image: url('_images/Bamboo.png');
    margin: 20px 0;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.section .container {
    padding: 20px;
}
h2 {
    font-size: 1.5em;
    margin-bottom: 20px;
    color: #832626;
    border-bottom: 2px solid #e4e4e4;
    padding-bottom: 5px;
}
p {
    margin-bottom: 20px;
    font-size: 0.7em;
}

.portfolio-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 40px;
    justify-content: center;
}
.portfolio-item h3 {
    font-size: 1.5em;
    color: #832626;
    margin-bottom: 10px;
}
.portfolio-item video {
    display: block;
    max-width: 70%;
    height: auto;
    margin-top: 16px;
    border-radius: 8px;
}

/* Image itself */
.image-content img {
    width: 50%;
    max-width: 1334px;
    height: auto;
    border-radius: 15px;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
    margin-bottom: 20px;
}

/* Decorative Frame */
.image-content::before,
.image-content::after {
    content: "";
    position: absolute;
    z-index: 0;
    width: 105%;
    height: 105%;
    border-radius: 15px;
    border-style: solid;
    transition: all 0.4s ease-in-out;
}

.image-content::before {
    top: -2.5%;
    left: -2.5%;
    border-width: 10px;
    border-color: #be4f4f #d05252 #561919 #832626;
    box-shadow: 0 0 10px rgba(190, 79, 79, 0.6), 5px 0 10px rgba(131, 38, 38, 0.6), 0 5px 10px rgba(86, 25, 25, 0.6), -5px 0 10px rgba(210, 82, 82, 0.6);
    animation: pulse-border 2s infinite, color-change 5s infinite;
}
.image-content::after {
    top: 2.5%;
    left: 2.5%;
    border-width: 8px;
    border-color: #d05252 #be4f4f #561919 #832626;
    transform: rotate(3deg);
    box-shadow: 0 0 8px rgba(210, 82, 82, 0.6), 5px 0 8px rgba(190, 79, 79, 0.6), 0 5px 8px rgba(131, 38, 38, 0.6), -5px 0 8px rgba(86, 25, 25, 0.6);
    animation: rotate-border 2.5s infinite ease-in-out, color-change 5s infinite;
}

/* Hover Effect: Animation of Borders */
.image-content:hover::before,
.image-content:hover::after {
    width: 110%;
    height: 110%;
    transform: rotate(360deg);
}

.image-content:hover img {
    transform: scale(1.1);
}

/* Allow the borders to overflow into other sections */
#about .container {
    position: relative;
    z-index: 1;
}

.image-content::before,
.image-content::after {
    z-index: -1;
}

/* Keyframe Animations */
@keyframes pulse-border {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes rotate-border {
    0% {
        transform: rotate(3deg);
    }
    25% {
        transform: rotate(-3deg);
    }
    50% {
        transform: rotate(3deg);
    }
    75% {
        transform: rotate(-3deg);
    }
    100% {
        transform: rotate(3deg);
    }
}

@keyframes color-change {
    0% {
        border-color: #be4f4f #d05252 #561919 #832626;
    }
    25% {
        border-color: #4fbe4f #52d052 #195619 #268326;
    }
    50% {
        border-color: #4f4fbe #5252d0 #191956 #262683;
    }
    75% {
        border-color: #be4fbe #d052d0 #561956 #832683;
    }
    100% {
        border-color: #be4f4f #d05252 #561919 #832626;
    }
}


footer {
    background: url('_images/Clouds.png');
    background-size: cover;
    color: white;
    text-align: center;
    padding: 10px 0;
    width: 100%;
    bottom: 0;
}
footer p {
    margin: 0;
}

footer p a {
    color: white;
    text-decoration: none;
    font-size: 1.5em;
    transition: color 0.3s;
}

footer p a:hover {
    color: #f4f4f4;
}

.mainHeading {
    font-family: "Quando", serif;
    font-weight: lighter;
    font-size: 1.3em;
}

.portfolio-item .image-container {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.portfolio-item img {
    width: 100%;
    max-width: 80%;
    height: auto;
    border-radius: 8px;
}
.illustration-grid {
    display: grid;
    grid-template-areas:
      "ill1 ill2 ill4"
      "ill3 ill3 ill4";
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    max-width: 900px;
    margin: 0 auto;
  }

  .illustration-item {
    position: relative;
    overflow: hidden;
  }

  .illustration-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

  .illustration-item:hover img {
    transform: scale(1.05);
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.3);
    cursor: pointer;
  }

  /* Assigning grid areas */
  .illustration-item:nth-child(1) {
    grid-area: ill1;
  }

  .illustration-item:nth-child(2) {
    grid-area: ill2;
  }

  .illustration-item:nth-child(3) {
    grid-area: ill3;
  }

  .illustration-item:nth-child(4) {
    grid-area: ill4;
  }

  /* Adjusting specific image sizes */
  .illustration-item:nth-child(1),
  .illustration-item:nth-child(2) {
    height: auto;
  }

  .illustration-item:nth-child(3) {
    grid-column: span 2;
    grid-row: span 2;
  }

  .illustration-item:nth-child(4) {
    align-self: center;
  }
  .video-container {
    margin: 20px auto;
    max-width: 1100px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.5s ease-in-out;
    display: flex;
    flex-wrap: wrap;

    justify-content: center; /* Align videos horizontally */
}

/* Wild hover animation for the video */
video {
    width: 100%;
    max-width: 600px;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.5);
    border-radius: 10px;
}

.video-item {
    flex: 0 1 calc(25% - 20px); /* Each video takes up 25% of the container width */
    text-align: center;
}


/* Apply wild hover animation */
video:hover {
    transform: scale(1.1);
    filter: brightness(1.2) contrast(1.2);
    box-shadow: 10px 10px 30px rgba(0, 0, 0, 0.7);
}

/* Optional: Add hover effect on video container */
.video-container:hover {
    transform: scale(1.05);
}

/* Title styling */
.video-title {
    font-size: 22px;
    margin-bottom: 10px;
    color: #333;
    text-align: center;
    font-weight: bold;
}
.image-container {
    position: relative;
    display: inline-block;
    transition: transform 0.3s ease;
}

/* Image inside container */
.image-container img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.5);
    transition: transform 1s ease-in-out, box-shadow 1s ease-in-out;
}

/* Heartbeat shadow animation */
@keyframes heartbeatShadow {
    0% {
        transform: scale(1);
        box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.5);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0px 0px 25px rgba(0, 0, 0, 0.7);
    }
    100% {
        transform: scale(1);
        box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.5);
    }
}

/* Apply heartbeat shadow animation to image on hover */
.image-container:hover img {
    animation: heartbeatShadow 1s ease-in-out infinite;
}

/* Optional: Apply red flash background when hovering */
.image-container:hover {
    animation: redFlash 1s ease-in-out infinite;
}

/* Flashing background */
@keyframes redFlash {
    0% {
        background-color: rgba(255, 0, 0, 0);
    }
    50% {
        background-color: rgba(0, 238, 255, 0.4);
    }
    100% {
        background-color: rgba(255, 0, 0, 0);
    }
}
/* File: `styles.css` - keep orbiting images visible when behind */
.orbiting-images {
    perspective: 1000px;
    perspective-origin: 50% 50%;
    transform-style: preserve-3d;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    width: 100%;
    height: 500px;
}

.image-item {
    position: absolute;
    width: 500px;
    height: auto;
    transform-style: preserve-3d;
    transform-origin: 50% 50%;
    animation: orbit 6s linear infinite;
    z-index: auto;
    backface-visibility: visible;
    -webkit-backface-visibility: visible;
    will-change: transform, opacity;
    transition: box-shadow 0.2s;
}

.image-item img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.3);
    backface-visibility: visible;
    -webkit-backface-visibility: visible;
    transform-style: preserve-3d;
    display: block;
}

/* Use translateZ plus opacity/scale to indicate depth instead of hiding */
@keyframes orbit {
    0% {
        transform: rotateY(0deg) translateZ(320px) scale(1);
        opacity: 1;
    }
    25% {
        transform: rotateY(90deg) translateZ(260px) scale(0.96);
        opacity: 0.88;
    }
    50% {
        transform: rotateY(180deg) translateZ(200px) scale(0.90);
        opacity: 0.72;
    }
    75% {
        transform: rotateY(270deg) translateZ(260px) scale(0.96);
        opacity: 0.88;
    }
    100% {
        transform: rotateY(360deg) translateZ(320px) scale(1);
        opacity: 1;
    }
}

/* keep animation offsets for multiple items */
.orbiting-images .image-item:nth-child(1) {
    animation-delay: 0s;
}
.orbiting-images .image-item:nth-child(2) {
    animation-delay: -3s;
}

/* optional: slightly stronger shadow when visually "in front" */
.image-item[style*="translateZ(320px)"], /* fallback hint */
.image-item { /* when nearer in keyframes, shadow already present by default */
    /* no z-index manipulation here so browser stacks by 3D depth */
}

#contact {
    margin: 50px auto;
    max-width: 600px;
    padding: 20px;
    background-color: #f4f4f4;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#contact h2 {
    font-family: 'Roboto', sans-serif;
    text-align: center;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    font-weight: bold;
    display: block;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.form-group textarea {
    resize: vertical;
}

button {
    display: block;
    width: 100%;
    padding: 10px;
    font-size: 16px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background-color: #555;
}

#responseMessage {
    margin-top: 20px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
}

.three-d-grid {
    display: flex;
    gap: 32px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.three-d-item {
    width: 350px;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.three-d-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    transition: transform 0.3s, box-shadow 0.3s;
    background: #fff;
}

.three-d-item img:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 24px rgba(0,0,0,0.28);
}

.orbiting-images {
    margin-top: 24px;
}

.orbiting-images {
    margin-top: 24px;
}

/* Styling for the illustration grid */
.illustration-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
    justify-items: center; /* Center-align the images */
}
/* Styling for individual illustration items */
.illustration-item img {
    width: 100%;
    height: auto; /* Maintain aspect ratio */
    border-radius: 10px; /* Rounded corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Subtle shadow for depth */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Responsive styles */
@media (max-width: 768px) {
    .portfolio-item img {
        width: 80%;
        max-width: 100%;
    }

    .portfolio-item video {
        width: 80%;
    }
}
@media (max-width: 768px) {
    .branding h1 {
        font-size: 1.5em;
    }

    nav ul {
        flex-direction: column;
    }

    .illustration-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
}
@media (max-width: 600px) {
    body {
        font-size: 14px;
        line-height: 1.4;
    }

    .container {
        width: 90%;
        padding: 10px;
    }

    .branding {
        font-size: 20px;
        flex-direction: column;
        text-align: center;
    }

    .branding img {
        width: 150px;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        padding: 0;
    }

    nav ul li {
        margin: 10px 0;
    }

    header h1 {
        font-size: 1.5em;
    }

    .portfolio-item {
        flex-direction: column;
        gap: 20px;
    }

    .illustration-grid {
        grid-template-areas:
            "ill1"
            "ill2"
            "ill3"
            "ill4";
        grid-template-columns: 1fr;
    }

    .illustration-item:nth-child(3) {
        grid-column: auto;
        grid-row: auto;
    }
}

/* Medium devices (tablets, 768px and down) */
@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    .container {
        width: 85%;
    }

    .branding {
        font-size: 22px;
    }

    .branding img {
        width: 180px;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav ul li {
        margin: 10px 0;
    }

    header h1 {
        font-size: 1.8em;
    }

    .illustration-grid {
        grid-template-areas:
            "ill1 ill2"
            "ill3 ill4";
        grid-template-columns: 1fr 1fr;
    }

    .illustration-item:nth-child(3) {
        grid-column: span 1;
        grid-row: span 1;
    }
}

/* Large devices (desktops, 1024px and down) */
@media (max-width: 1024px) {
    body {
        font-size: 18px;
    }

    .branding {
        font-size: 24px;
    }

    nav ul li a {
        font-size: 18px;
    }

    .portfolio-item video {
        max-width: 80%;
    }

    .illustration-grid {
        grid-template-areas:
            "ill1 ill2 ill4"
            "ill3 ill3 ill4";
        grid-template-columns: 1fr 1fr 1fr;
    }

    .illustration-item:nth-child(3) {
        grid-column: span 2;
        grid-row: span 2;
    }
}
@media (max-width: 768px) {

    header {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 10px;
    }


    header img {
        max-width: 150px;
        height: auto;
    }


    header h1, header h2 {
        text-align: center;
        margin: 5px 0;
        font-size: 1.2em;
    }

    .illustrations {
        display: flex;
        flex-direction: column;
        gap: 15px;
        padding: 10px;
    }

    .illustrations img {
        max-width: 100%;
        height: auto;
    }
}
