:root {
    --background-color: #111111;
    --text-color: #FFFFFF;
    --accent-color: #A8FF00;
    --font-primary: 'Inter', sans-serif;
    --font-secondary: 'Roboto Mono', monospace;
}

/* Page Transition Styles */
#page-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--background-color);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transform: translate3d(0,0,0);
}
#page-transition-overlay.animate {
    opacity: 1;
    pointer-events: all;
    animation: glitch-jitter 0.58s steps(2, end);
}
#page-transition-overlay.animate::before {
    visibility: visible;
    background: var(--accent-color);
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    animation: glitch-clip-one 0.58s steps(3, end);
}
#page-transition-overlay.animate::after {
    visibility: hidden;
    opacity: 0;
    animation: none;
    content: ''; 
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--text-color);
    z-index: 10001;
}
@keyframes glitch-jitter {
    0% { transform: translate(0, 0); }
    25% { transform: translate(2px, -2px); }
    50% { transform: translate(-2px, 2px); }
    75% { transform: translate(2px, 2px); }
    100% { transform: translate(-2px, -2px); }
}
@keyframes glitch-clip-one {
    0% { clip-path: polygon(0 2%, 100% 2%, 100% 5%, 0 5%); }
    20% { clip-path: polygon(0 75%, 100% 75%, 100% 75%, 0 75%); }
    40% { clip-path: polygon(0 50%, 100% 50%, 100% 52%, 0 52%); }
    60% { clip-path: polygon(0 25%, 100% 25%, 100% 25%, 0 25%); }
    80% { clip-path: polygon(0 1%, 100% 1%, 100% 2%, 0 2%); }
    100% { clip-path: polygon(0 90%, 100% 90%, 100% 95%, 0 95%); }
}
@keyframes glitch-clip-two {
    0% { clip-path: polygon(0 15%, 100% 15%, 100% 16%, 0 16%); }
    20% { clip-path: polygon(0 80%, 100% 80%, 100% 80%, 0 80%); }
    40% { clip-path: polygon(0 40%, 100% 40%, 100% 42%, 0 42%); }
    60% { clip-path: polygon(0 65%, 100% 65%, 100% 65%, 0 65%); }
    80% { clip-path: polygon(0 21%, 100% 21%, 100% 22%, 0 22%); }
    100% { clip-path: polygon(0 70%, 100% 70%, 100% 75%, 0 75%); }
}

/* 3D Background Animation */
#bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}
#bg-animation canvas {
    display: block;
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html {
    scroll-behavior: smooth;
}
body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: var(--font-primary);
    line-height: 1.6;
}

/* Header */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background-color: rgba(17, 17, 17, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
}
.logo {
    text-decoration: none;
    display: flex;
    align-items: center;
}
.logo-img {
    height: 32px;
    width: auto;
    display: block;
}
nav a {
    color: var(--text-color);
    text-decoration: none;
    font-family: var(--font-secondary);
    margin-left: 1.5rem;
    transition: color 0.3s ease;
}
nav a:hover {
    color: var(--accent-color);
}

/* Main Content Area */
main {
    padding: 2rem;
    margin-top: 80px;
    position: relative;
    z-index: 1;
}
h1, h2, h3, h4 {
    font-family: var(--font-secondary);
    font-weight: 700;
}
.page-section {
    padding-top: 6rem;
    padding-bottom: 6rem;
    max-width: 900px;
    margin: 0 auto;
}
.page-section h1,
.page-section h2 {
    text-align: center;
    margin-bottom: 4rem;
    color: var(--accent-color);
    font-size: 2rem;
}

/* Hero Section */
.hero {
    height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative; /* Added to contain the animation */
    overflow: hidden;   /* Ensures animation doesn't bleed out */
}

/* Base noise layer */
.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* A subtle, repeating noise pattern created with gradients */
    background-image: 
        radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 0),
        radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 0);
    background-size: 4px 4px;
    background-position: 0 0, 2px 2px;
    animation: noise 2s steps(1) infinite;
    z-index: 0; /* Sits behind the text but on top of the background color */
}

/* Ensure hero text is on top of the animation */
.hero h1,
.hero .subtitle,
.hero .hero-cta {
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(20px);
}

.hero h1 {
    font-size: 4.5vw;
    color: var(--text-color);
    margin: 0;
}
.hero .subtitle {
    font-size: 1.2rem;
    color: var(--text-color);
    max-width: 600px;
    margin-top: 1rem;
    margin-bottom: 2rem;
}
.hero-cta {
    display: inline-block;
    padding: 1rem 2rem;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    text-decoration: none;
    font-family: var(--font-secondary);
    font-size: 1.1rem;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.hero-cta:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--background-color);
}

/* Hero frame — corner brackets and tag labels (HUD-style) */
.hero-frame {
    position: absolute;
    inset: 1.5rem;
    pointer-events: none;
    z-index: 0;
}
.hero-corner {
    position: absolute;
    width: 22px;
    height: 22px;
    border: 1.5px solid var(--accent-color);
    opacity: 0;
    animation: hero-tag-fade 0.7s ease 0.15s forwards;
}
.hero-corner-tl { top: 0; left: 0; border-right: none; border-bottom: none; }
.hero-corner-tr { top: 0; right: 0; border-left: none; border-bottom: none; }
.hero-corner-bl { bottom: 0; left: 0; border-right: none; border-top: none; }
.hero-corner-br { bottom: 0; right: 0; border-left: none; border-top: none; }

.hero-tag {
    position: absolute;
    font-family: var(--font-secondary);
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    color: rgba(255, 255, 255, 0.55);
    z-index: 2;
    pointer-events: none;
    white-space: nowrap;
    opacity: 0;
    animation: hero-tag-fade 0.8s ease 0.35s forwards;
}
@keyframes hero-tag-fade {
    to { opacity: 1; }
}
.hero-tag-tl { top: 2.4rem; left: 2.8rem; }
.hero-tag-tr { top: 2.4rem; right: 2.8rem; }
.hero-tag-bl { bottom: 2.4rem; left: 2.8rem; }
.hero-tag-br { bottom: 2.4rem; right: 2.8rem; }
.hero-tag-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin: 0 0.4em;
    background: var(--accent-color);
    border-radius: 50%;
    vertical-align: middle;
    box-shadow: 0 0 8px var(--accent-color);
    animation: hero-tag-blink 1.6s ease-in-out infinite;
}
@keyframes hero-tag-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.25; }
}

/* "<Designer />" label above the headline */
.hero-label {
    position: relative;
    z-index: 1;
    font-family: var(--font-secondary);
    font-size: 0.85rem;
    color: var(--accent-color);
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(8px);
    animation: hero-label-in 0.7s ease 0.6s forwards;
}
@keyframes hero-label-in {
    to { opacity: 1; transform: translateY(0); }
}

/* Headline glitch flicker — kicks in briefly between phrase swaps */
.hero h1.glitching {
    animation: hero-glitch 0.32s steps(2, end);
}
@keyframes hero-glitch {
    0%   { transform: translate(0, 0); text-shadow: 2px 0 var(--accent-color), -2px 0 #ff00aa; }
    25%  { transform: translate(-2px, 1px); text-shadow: -3px 0 var(--accent-color), 3px 0 #ff00aa; }
    50%  { transform: translate(2px, -1px); text-shadow: 3px 0 var(--accent-color), -3px 0 #ff00aa; }
    75%  { transform: translate(-1px, 2px); text-shadow: -2px 0 var(--accent-color), 2px 0 #ff00aa; }
    100% { transform: translate(0, 0); text-shadow: none; }
}

/* Subtle dotted overlay across the hero — sells the HUD vibe */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 22px 22px;
    pointer-events: none;
    z-index: 0;
    mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 35%, rgba(0,0,0,0) 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 35%, rgba(0,0,0,0) 80%);
}

/* Animated marker line under hero h1 */
.hero-underline {
    display: block;
    position: relative;
    z-index: 1;
    height: 2px;
    width: 0;
    background: var(--accent-color);
    margin: 0.6rem auto 0;
    box-shadow: 0 0 12px rgba(168, 255, 0, 0.45);
    animation: hero-underline-grow 1.4s cubic-bezier(0.16, 1, 0.3, 1) 1.6s forwards,
               hero-underline-breathe 3.2s ease-in-out 3s infinite;
}
@keyframes hero-underline-grow {
    to { width: 220px; }
}
@keyframes hero-underline-breathe {
    0%, 100% { opacity: 0.7; transform: scaleX(1); }
    50% { opacity: 1; transform: scaleX(1.12); }
}

/* CTA ambient pulse + arrow nudge */
.hero-cta {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.hero-cta::before {
    content: '';
    position: absolute;
    inset: -2px;
    border: 1px solid var(--accent-color);
    opacity: 0;
    animation: hero-cta-ring 2.6s ease-out infinite;
    pointer-events: none;
    z-index: -1;
}
@keyframes hero-cta-ring {
    0% { transform: scale(1); opacity: 0.55; }
    100% { transform: scale(1.25); opacity: 0; }
}
.hero-cta:hover::before {
    animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
    .hero-corner,
    .hero-tag,
    .hero-tag-dot,
    .hero-label,
    .hero-underline,
    .hero-cta::before,
    .hero h1.glitching {
        animation: none !important;
    }
    .hero-corner,
    .hero-tag,
    .hero-label { opacity: 1 !important; }
    .hero-label { transform: none !important; }
    .hero-underline { width: 220px; }
}

/* Work Section on Homepage */
.work-section {
    padding: 6rem 0;
}
.project-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
}
.project-card {
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    background-color: rgba(17, 17, 17, 0.85);
}
.project-card.clickable {
    cursor: pointer;
}
.project-card.clickable:hover {
    border-color: var(--accent-color);
    transform: translateY(-5px);
}
.project-image {
    aspect-ratio: 21 / 9;
    overflow: hidden;
    position: relative; 
    background-color: #000;
}
.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: grayscale(100%); 
    transition: filter 0.4s ease;
}
.project-card:hover .project-image img {
    filter: grayscale(0%);
}
.project-info {
    padding: 2rem;
}
.project-info h3 {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}
.btn-case-study {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    text-decoration: none;
    font-family: var(--font-secondary);
    transition: background-color 0.3s ease, color 0.3s ease;
}
.btn-case-study:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--background-color);
}
.view-all-work-container {
    text-align: center;
    margin-top: 4rem;
}

/* Slider Styles */
.slider-container {
    width: 100%;
    height: 100%;
    position: relative;
}
.slider-container .slide {
    display: none;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}
.slider-container .slide.active {
    display: block;
}
.slider-container .prev, .slider-container .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 20px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0,0,0,0.3);
}
.slider-container .next {
    right: 0;
    border-radius: 3px 0 0 3px;
}
.slider-container .prev:hover, .slider-container .next:hover {
    background-color: rgba(0,0,0,0.8);
}

/* About Section on Homepage & About Page */
.about-section {
    padding: 6rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.about-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr; /* Refined balance for photo and text */
    gap: 3rem;
    align-items: center;
    background-color: rgba(17, 17, 17, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem;
}
.about-photo {
    justify-self: center; 
}
.about-photo img {
    width: 100%;
    max-width: 350px; /* Adjusted size for better proportion */
    height: auto;
    filter: grayscale(100%);
    border: 1px solid var(--accent-color);
    display: block;
    transition: filter 0.4s ease;
}
.about-photo:hover img {
    filter: grayscale(0%);
}
.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}
.about-text p {
    font-size: 1.1rem;
    max-width: 800px;
}

/* Detailed About Page Styles */
.about-detailed .about-content {
    margin-bottom: 4rem; 
}
.about-section-block {
    margin-bottom: 4rem;
}
.about-section-block h3 {
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    font-size: 2.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 0.5rem;
}
.work-entry, .education-entry {
    margin-bottom: 2.5rem;
}
.work-entry h4, .education-entry h4 {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}
.work-subheading {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1rem;
}
.work-entry p {
    margin-bottom: 1rem;
}
.work-entry ul {
    list-style: none;
    padding-left: 1.5rem;
}
.work-entry ul li::before {
    content: '■';
    position: absolute;
    left: -1.5rem;
    color: var(--accent-color);
    font-size: 0.8rem;
}
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.skill-category h4 {
    font-size: 1.2rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    text-align: left;
}
.skills-grid .skill-category {
    text-align: left;
}

/* Fun Facts Section Styles */
.fun-facts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}
.fact-card {
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1.5rem;
    transition: all 0.3s ease;
}
.fact-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-5px);
}
.fact-card h4 {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.multi-column {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}
.multi-column h3 {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 0.5rem;
    text-align: left;
}
.multi-column .column {
    text-align: left;
}

/* Skills Ticker */
.skills-ticker {
    margin-top: 5rem;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    overflow: hidden;
    padding: 1rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.skills-track {
    display: flex;
    width: fit-content;
    animation: scroll 40s linear infinite;
}
.skills-track span {
    font-family: var(--font-secondary);
    font-size: 1.2rem;
    color: var(--text-color);
    margin: 0 2rem;
    white-space: nowrap;
}
@keyframes scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* Keyframes for the hero background animation */
@keyframes noise {
    0% { background-position: 0 0, 2px 2px; }
    25% { background-position: 4px 4px, 6px 6px; }
    50% { background-position: 2px 6px, 4px 2px; }
    75% { background-position: 6px 2px, 2px 6px; }
    100% { background-position: 4px 4px, 6px 6px; }
}


/* Contact Section Styles */
.contact-section {
    padding: 6rem 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(17, 17, 17, 0.85);
}
.contact-subheading,
#contact-cta p {
    margin-bottom: 2rem;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
}
.contact-button {
    display: inline-block;
    padding: 1rem 2rem;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    text-decoration: none;
    font-family: var(--font-secondary);
    font-size: 1rem;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.contact-button:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--background-color);
}
.primary-contact-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.form-separator {
    border: 0;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.1);
    margin: 4rem auto;
    width: 100%;
    max-width: 200px;
}
#contact-form {
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
}
.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-family: var(--font-secondary);
    color: rgba(255, 255, 255, 0.7);
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--background-color);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-color);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 5px var(--accent-color);
}
.btn-submit {
    width: 100%;
    padding: 1rem;
    background-color: var(--accent-color);
    color: var(--background-color);
    border: none;
    font-family: var(--font-secondary);
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.3s ease;
}
.btn-submit:hover {
    opacity: 0.85;
}

/* Footer Styles */
footer {
    text-align: center;
    padding: 4rem 2rem 2rem 2rem;
    color: rgba(255, 255, 255, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
}
.footer-links {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}
.footer-links a {
    color: var(--text-color);
    text-decoration: none;
    font-family: var(--font-secondary);
    transition: color 0.3s ease;
}
.footer-links a:hover {
    color: var(--accent-color);
}

/* Work Category List Styles (for more-work.html) */
.category-list {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}
.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    text-decoration: none;
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}
.category-item:hover {
    background-color: var(--accent-color);
    color: var(--background-color);
}
.category-title {
    font-size: 2rem;
    font-weight: 700;
}
.category-year {
    font-family: var(--font-secondary);
    font-size: 1.2rem;
}

/* NEW Work Grid Styles */
.work-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}
.work-card {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}
.work-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.4s ease, filter 0.4s ease;
    filter: grayscale(100%);
}
.work-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    transition: background-color 0.4s ease;
}
.work-card-content {
    position: relative;
    z-index: 2;
    padding: 1rem;
}
.work-card h3 {
    font-size: 1.8rem;
    transition: color 0.3s ease;
}
.work-card p {
    font-size: 1rem;
    opacity: 0.8;
}
.work-card:hover .work-card-bg {
    transform: scale(1.05);
    filter: grayscale(0%);
}
.work-card:hover .work-card-overlay {
    background-color: rgba(0, 0, 0, 0.4);
}
.work-card:hover h3 {
    color: var(--accent-color);
}


/* Editorial Detail Page Styles */
.project-detail-showcase {
    margin-bottom: 5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 3rem;
}
.project-detail-showcase:last-child {
    border-bottom: none;
    margin-bottom: 0;
}
.project-detail-showcase h3 {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}
.project-description {
    font-size: 1.1rem;
    max-width: 80ch;
    margin-bottom: 3rem;
}
.image-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    align-items: start;
}
.gallery-grid-item {
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}
.gallery-grid-item.span-2 {
    grid-column: span 2;
}
.gallery-grid-item.centered-single {
    grid-column: span 2;
    display: flex;
    justify-content: center;
}
.gallery-grid-item.centered-single img {
    width: 50%;
    height: auto;
}
.gallery-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block; 
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: modal-bg-fade-in 0.3s;
}
.modal-content {
    background-color: var(--background-color);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    position: relative;
    animation: modal-content-fade-in 0.4s ease-out;
    display: flex;
    flex-direction: column;
}
@keyframes modal-bg-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-content-fade-in { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
.modal-close {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 25px;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 2010;
}
.modal-close:hover { color: var(--accent-color); }
.modal-content h3 { font-size: 1.5rem; color: var(--accent-color); margin-bottom: 0.5rem; }
.modal-content p { margin-bottom: 1.5rem; font-size: 1rem; color: rgba(255,255,255,0.8); }
.modal-slider-container {
    flex-grow: 1;
    position: relative;
    background-color: #000;
}
.modal-slider-container .slide {
    display: none;
    width: 100%;
    height: 100%;
}
.modal-slider-container .slide.active {
    display: block;
}
.modal-slider-container .slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: none;
}
.modal-slider-container .prev, .modal-slider-container .next {
    top: 50%;
    transform: translateY(-50%);
}
.image-title {
    padding: 1rem;
    text-align: center;
    font-size: 1.2rem;
    color: var(--accent-color);
    background-color: rgba(0,0,0,0.3);
}

/* Carousel Styles for Social Media Page */
.carousel-container {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-color: #000;
    scroll-snap-type: x mandatory;
}
.carousel-item {
    flex: 0 0 80%;
    max-width: 450px;
    scroll-snap-align: center;
}
.carousel-item img {
    width: 100%;
    height: auto;
    display: block;
}

/* Custom Scrollbar Styles */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--accent-color) var(--background-color);
}
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--background-color);
}
::-webkit-scrollbar-thumb {
  background-color: var(--accent-color);
  border-radius: 20px;
  border: 2px solid var(--background-color);
}
::-webkit-scrollbar-thumb:hover {
  background-color: #cfff4f;
}

/* Video Page Styles */
.video-container {
    width: 100%;
    background-color: #000;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.video-player-wrapper {
    width: 100%;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-color: #000;
}
.custom-video-player {
    width: 100%;
    display: block;
}
.custom-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(17, 17, 17, 0.8);
    backdrop-filter: blur(5px);
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}
.video-player-wrapper:hover .custom-controls {
    opacity: 1;
}
.control-btn {
    background-color: transparent;
    border: none;
    cursor: pointer;
    width: 24px;
    height: 24px;
}
.play-btn {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23A8FF00"><path d="M8 5v14l11-7z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
}
.play-btn.paused {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23A8FF00"><path d=\"M6 19h4V5H6v14zm8-14v14h4V5h-4z\"/></svg>');
}
.progress-bar {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
}
.progress-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    background: var(--accent-color);
    border-radius: 50%;
}
.progress-bar::-moz-range-thumb {
    width: 15px;
    height: 15px;
    background: var(--accent-color);
    border-radius: 50%;
    border: none;
}
.time-display {
    font-family: var(--font-secondary);
    font-size: 0.9rem;
    color: var(--text-color);
    min-width: 90px;
}
.single-image-container {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-color: #000;
}
.single-image-container img {
    width: 100%;
    height: auto;
    display: block;
}
.video-embed-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 900px;
    margin: 2rem auto 3rem auto;
    background-color: #000;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.video-embed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* NEW 404 Page and Game Styles */
.error-page {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}
.error-page .error-code {
    font-size: 10rem;
    color: var(--accent-color);
    line-height: 1;
    font-family: var(--font-secondary);
    position: relative;
    animation: glitch-skew 1s infinite linear alternate-reverse;
}
.error-page .error-code::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 2px;
    width: 100%;
    height: 100%;
    background: var(--background-color);
    overflow: hidden;
    text-shadow: -2px 0 #ff00c1;
    animation: glitch-clip-one 1.5s infinite linear alternate-reverse;
}
.error-page .error-code::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: -2px;
    width: 100%;
    height: 100%;
    background: var(--background-color);
    overflow: hidden;
    text-shadow: -2px 0 #00fff9;
    animation: glitch-clip-two 2s infinite linear alternate-reverse;
}
.error-page h1,
.error-page h2 {
    font-size: 2.5rem;
    color: var(--text-color);
    margin-top: 0;
    margin-bottom: 1rem;
}
.error-page .error-message {
    font-size: 1.2rem;
    max-width: 500px;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.7);
}
#game-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 2rem auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
#glitch-game {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    background-color: #000;
    display: block;
}
#game-ui {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(0,0,0,0.3);
    font-family: var(--font-secondary);
}
.game-instructions {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.6);
}


/* --- Scroll Reveal System --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-heading {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-heading.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-image {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-image.visible {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* Stagger delays */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* Footer reveal */
footer .footer-links,
footer p {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
footer.visible .footer-links {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0s;
}
footer.visible p {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.15s;
}

/* Hover enhancements */
.contact-button:hover,
.btn-case-study:hover {
    box-shadow: 0 0 15px rgba(168, 255, 0, 0.3), 0 0 30px rgba(168, 255, 0, 0.1);
}

.work-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.4s ease;
    z-index: 3;
}
.work-card:hover::after {
    width: 100%;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal, .reveal-heading, .reveal-image {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    footer .footer-links, footer p {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    main {
        padding: 1rem;
    }
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .about-photo {
        margin: 0 auto 2rem auto;
        order: -1; /* Puts photo on top on mobile */
    }
    .hero h1 {
        font-size: 10vw;
    }
    .about-detailed {
        text-align: center;
    }
    .work-entry ul {
        padding-left: 0;
        text-align: left;
    }
    .work-entry ul li::before {
        display: none;
    }
    .category-title {
        font-size: 1.5rem;
    }
    .work-grid {
        grid-template-columns: 1fr;
    }
    .error-page .error-code {
        font-size: 8rem;
    }
    .error-page h1,
    .error-page h2 {
        font-size: 2rem;
    }
}

/* Footer location meta line */
.footer-meta {
    font-size: 0.85rem;
    opacity: 0.5;
    margin-top: 0.25rem;
    font-family: var(--font-secondary);
}

/* Related work block on project pages */
.related-work {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.related-work h3 {
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-family: var(--font-secondary);
}
.related-grid {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}
.related-link {
    color: var(--text-color);
    text-decoration: none;
    font-family: var(--font-secondary);
    transition: color 0.2s ease;
}
.related-link:hover {
    color: var(--accent-color);
}

@media (max-width: 900px) {
    .image-gallery-grid {
        grid-template-columns: 1fr;
    }
    .gallery-grid-item.span-2 {
        grid-column: span 1;
    }
    .gallery-grid-item.centered-single img {
        width: 100%;
        max-width: 100%;
    }
    .hero-tag {
        font-size: 0.6rem;
        letter-spacing: 0.12em;
    }
    .hero-tag-tl, .hero-tag-tr { top: 1.4rem; }
    .hero-tag-bl, .hero-tag-br { bottom: 1.4rem; }
    .hero-tag-tl, .hero-tag-bl { left: 1.6rem; }
    .hero-tag-tr, .hero-tag-br { right: 1.6rem; }
}

@media (max-width: 600px) {
    .hero-tag-tr, .hero-tag-br { display: none; }
    .hero-frame { inset: 0.8rem; }
}

@media (max-width: 480px) {
    .main-header {
        flex-direction: column;
        padding: 1rem;
    }
    .main-header nav {
        margin-top: 1rem;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    .main-header nav a {
        margin: 0.5rem 0.8rem;
    }
    .hero h1 {
        font-size: 12vw;
    }
    .contact-button {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
    .primary-contact-buttons {
        flex-direction: column;
        gap: 0.8rem;
    }
    .category-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.5rem 1rem;
    }
    .category-title {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }
    .category-year {
        font-size: 1rem;
    }
}
/* Carousel Styles for Social Media Page */
.carousel-container {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-color: #000;
    /* For a smoother scroll snap effect */
    scroll-snap-type: x mandatory;
}
.carousel-item {
    flex: 0 0 80%; /* Each item takes up 80% of the container width */
    max-width: 450px; /* Max width for each item */
    scroll-snap-align: center;
}
.carousel-item img {
    width: 100%;
    height: auto;
    display: block;
}
/* Custom Scrollbar Styles */
/* Works on Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--accent-color) var(--background-color); /* Thumb: Accent, Track: Background */
}

/* Works on Chrome, Edge, and Safari */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--background-color); /* Track is background color */
}

::-webkit-scrollbar-thumb {
  background-color: var(--accent-color); /* Thumb is accent color */
  border-radius: 20px;
  border: 2px solid var(--background-color); /* Border is background color */
}

::-webkit-scrollbar-thumb:hover {
  background-color: #cfff4f; /* A slightly brighter accent for hover */
}
/* Styles for the YouTube video embed container (UPDATED for correct centering and sizing) */
.video-embed-container {
    position: relative;
    width: 100%; /* Take full width of its parent (which is max 900px) */
    padding-bottom: 56.25%; /* 16:9 aspect ratio (height / width = 9 / 16 = 0.5625) */
    height: 0;
    overflow: hidden;
    max-width: 900px; /* Ensures it doesn't exceed the page content width */
    margin: 2rem auto 3rem auto; /* Center it horizontally and add vertical spacing */
    background-color: #000; /* Ensure black background behind video */
    border: 1px solid rgba(255, 255, 255, 0.2); /* Add border to match design */
}

.video-embed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none; /* Ensure no extra border on the iframe itself */
}


/* Resume Download Button */
.resume-download-wrap {
    margin-bottom: 2.5rem;
}

.btn-resume-download {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    background-color: var(--accent-color);
    color: #111111;
    font-family: var(--font-secondary);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 2px solid var(--accent-color);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-resume-download:hover {
    background-color: transparent;
    color: var(--accent-color);
}

/* Resume button on contact page */
.resume-contact-btn {
    margin-top: 1.5rem;
    text-align: center;
}

/* ===== CUSTOM CURSOR ===== */
@media (hover: hover) and (pointer: fine) {
    html, body, * {
        cursor: none;
    }

    input, textarea {
        cursor: text;
    }

    .custom-cursor {
        position: fixed;
        top: 0;
        left: 0;
        width: 88px;
        height: 88px;
        pointer-events: none;
        z-index: 10000;
        opacity: 0;
        transition: opacity 0.2s ease;
        will-change: transform;
        mix-blend-mode: difference;
    }

    .custom-cursor.visible {
        opacity: 1;
    }

    .custom-cursor-inner {
        position: absolute;
        inset: 0;
        pointer-events: none;
    }

    /* Default — small white circle, ~22px, centered in the 88px hotspot box. */
    .custom-cursor-dot {
        position: absolute;
        top: 50%;
        left: 50%;
        width: 22px;
        height: 22px;
        margin: -11px 0 0 -11px;
        background-color: #FFFFFF;
        border-radius: 50%;
        opacity: 1;
        transition: opacity 0.18s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
        will-change: opacity, transform;
    }

    /* Click target — triangle whose apex sits at the cursor (50%, 0%). */
    .custom-cursor-tri {
        position: absolute;
        inset: 0;
        background-color: #FFFFFF;
        clip-path: polygon(50% 0%, 85% 70%, 15% 70%);
        opacity: 0;
        transform: scale(0.7);
        transform-origin: 50% 0%;
        transition: opacity 0.18s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
        will-change: opacity, transform;
    }

    .custom-cursor.cursor-hover .custom-cursor-dot {
        opacity: 0;
        transform: scale(0.4);
    }

    .custom-cursor.cursor-hover .custom-cursor-tri {
        opacity: 1;
        transform: scale(1);
    }
}

/* ==================================================
   Large Screen Optimizations (1440p, 1920p, 2K, 4K)
   Scales typography via root font-size (rem cascade)
   and widens content containers — especially work
   pages that show galleries, video, or carousels.
   ================================================== */

/* Standard large desktops (≥1440px wide) */
@media (min-width: 1440px) {
    html {
        font-size: 17px;
    }
    .page-section {
        max-width: 1100px;
    }
    .page-section:has(.image-gallery-grid),
    .page-section:has(.carousel-container),
    .page-section:has(.video-embed-container),
    .page-section:has(.single-image-container),
    .page-section:has(.video-container) {
        max-width: 70vw;
    }
    .modal-content {
        max-width: 1400px;
    }
    .video-embed-container {
        max-width: 1100px;
    }
    .work-grid {
        max-width: 1000px;
    }
}

/* QHD / 1080p+ (≥1920px wide) */
@media (min-width: 1920px) {
    html {
        font-size: 18px;
    }
    .page-section {
        max-width: 1300px;
    }
    .page-section:has(.image-gallery-grid),
    .page-section:has(.carousel-container),
    .page-section:has(.video-embed-container),
    .page-section:has(.single-image-container),
    .page-section:has(.video-container) {
        max-width: 75vw;
    }
    .about-photo img {
        max-width: 450px;
    }
    .modal-content {
        max-width: 1600px;
    }
    .video-embed-container {
        max-width: 1300px;
    }
    .page-section h1,
    .page-section h2 {
        font-size: 2.4rem;
    }
    .hero h1 {
        font-size: 5vw;
    }
    .hero .subtitle {
        font-size: 1.4rem;
    }
    .work-grid {
        max-width: 1200px;
    }
    .carousel-item {
        max-width: 600px;
    }
}

/* 2K / 1440p screens (≥2560px wide) */
@media (min-width: 2560px) {
    html {
        font-size: 20px;
    }
    .page-section {
        max-width: 1500px;
    }
    .page-section:has(.image-gallery-grid),
    .page-section:has(.carousel-container),
    .page-section:has(.video-embed-container),
    .page-section:has(.single-image-container),
    .page-section:has(.video-container) {
        max-width: 78vw;
    }
    .about-photo img {
        max-width: 520px;
    }
    .modal-content {
        max-width: 80vw;
    }
    .video-embed-container {
        max-width: 1500px;
    }
    .page-section h1,
    .page-section h2 {
        font-size: 2.8rem;
    }
    .work-grid {
        max-width: 1500px;
        gap: 3rem;
    }
    .carousel-item {
        max-width: 720px;
    }
}

/* 4K / UHD (≥3440px wide) */
@media (min-width: 3440px) {
    html {
        font-size: 22px;
    }
    .page-section:has(.image-gallery-grid),
    .page-section:has(.carousel-container),
    .page-section:has(.video-embed-container),
    .page-section:has(.single-image-container),
    .page-section:has(.video-container) {
        max-width: 80vw;
    }
    .modal-content {
        max-width: 82vw;
    }
}

/* --- Ctrl-hover Image Preview --- */
.image-preview-popup {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4vh 4vw;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, visibility 0.15s ease;
}
.image-preview-popup.is-visible {
    opacity: 1;
    visibility: visible;
}
.image-preview-popup img {
    max-width: 92vw;
    max-height: 92vh;
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    background: #111;
    border-radius: 4px;
}

/* === Case Study Pages === */
.case-study { max-width: 1100px; }

.case-hero { margin-bottom: 2rem; text-align: left; }
.case-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  color: var(--text-color);
  text-align: left;
  margin-bottom: 0.75rem;
}
.case-meta { display: flex; gap: 1rem; flex-wrap: wrap; }
.case-meta-tag {
  font-family: var(--font-secondary);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-color);
  border: 1px solid rgba(168, 255, 0, 0.3);
  padding: 0.3rem 0.7rem;
}

.case-hero-image {
  margin: 2rem 0 4rem;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
}
.case-hero-image img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(40%); transition: filter 0.4s ease;
}
.case-hero-image:hover img { filter: grayscale(0%); }

.case-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}
.case-intro-block h2 {
  font-size: 1.3rem;
  color: var(--accent-color);
  margin-bottom: 1rem;
  text-align: left;
}
.case-intro-block p { font-size: 1rem; line-height: 1.7; }

.case-strategy {
  margin-bottom: 4rem;
  padding: 2rem;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(168, 255, 0, 0.02);
}
.case-strategy-block { margin-bottom: 1.5rem; }
.case-strategy-block:last-child { margin-bottom: 0; }
.case-strategy-block h3 {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-color);
  opacity: 0.7;
  margin-bottom: 0.5rem;
}

.case-executions { margin-bottom: 4rem; }
.case-executions h2 {
  font-size: 1.3rem;
  color: var(--accent-color);
  text-align: left;
  margin-bottom: 1.5rem;
}
.gallery-caption {
  display: block;
  font-family: var(--font-secondary);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  padding: 0.5rem 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.case-next {
  margin-top: 4rem;
  padding: 3rem 2rem;
  border: 1px solid rgba(255,255,255,0.1);
  text-align: center;
}
.case-next-label {
  display: block;
  font-family: var(--font-secondary);
  color: var(--accent-color);
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
  .case-intro { grid-template-columns: 1fr; gap: 2rem; }
}

/* === New /work.html Filterable Grid === */
.work-filters {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 3rem;
}
.work-filter-btn {
  font-family: var(--font-secondary);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.7);
  padding: 0.6rem 1.2rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.work-filter-btn:hover { border-color: var(--accent-color); color: var(--accent-color); }
.work-filter-btn.active {
  border-color: var(--accent-color);
  color: var(--background-color);
  background: var(--accent-color);
}

.work-projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
@media (max-width: 600px) { .work-projects-grid { grid-template-columns: 1fr; } }

.work-project-card {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.15);
  text-decoration: none;
  color: var(--text-color);
  display: block;
  transition: transform 0.4s ease, border-color 0.4s ease;
}
.work-project-card:hover { transform: translateY(-4px); border-color: var(--accent-color); }
.work-project-card.is-hidden { display: none; }
.work-project-card img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(100%); transition: filter 0.4s ease;
}
.work-project-card:hover img { filter: grayscale(0%); }
.work-project-card-iframe {
  position: absolute;
  top: 0; left: 0;
  width: 200%; height: 200%;
  transform: scale(0.5);
  transform-origin: top left;
  border: 0;
  pointer-events: none;
  filter: grayscale(100%);
  transition: filter 0.4s ease;
}
.work-project-card:hover .work-project-card-iframe { filter: grayscale(0%); }
.work-project-card-iframe-shield {
  position: absolute;
  inset: 0;
  z-index: 2;
}
.work-project-card-content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1rem;
  background: linear-gradient(to top, rgba(0,0,0,0.95), rgba(0,0,0,0));
}
.work-project-card-cat {
  display: block;
  font-family: var(--font-secondary);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-color);
  margin-bottom: 0.25rem;
}
.work-project-card-title {
  font-family: var(--font-secondary);
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
}
