/* 
   ZOETIC RHYTHM - Professional Structural Refactor
   Architecture: Mobile-First / Logic: 1:1 Literal Parity 
*/

.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: #007699;
    color: white;
    padding: 10px;
    z-index: 10000;
}

.skip-link:focus { 
    top: 0; 
    outline: 3px solid #fff;
    box-shadow: 0 4px 15px rgba(0, 113, 187, 0.5);
    border-radius: 0px 0px 15px 0px;
    text-decoration: none;
    font-weight: bold;
}

.zr-hidden-trap {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    pointer-events: none;
}

:root {
    --action-blue: #00A4D6;
    --surface-gray: #000;
    --font-main: 'Inter', sans-serif;
    --font-display: 'Bebas Neue', sans-serif;
    --border-glass: rgba(255, 255, 255, 0.3);
    --text-dim: #c7c8ca;
    --font-h1: clamp(2.5rem, 8vw, 5.5rem);
    --card-width: 300px;
    --card-height: 420px;
    --peek-dist: 40px; 
    --img-rounding: 15px;
}

* {
    box-sizing: border-box;
    transition: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

body {
    background: #000000;
    color: #fff;
    font-family: var(--font-main);
    margin: 0;
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
    width: 100%;
}

html { overflow-x: hidden !important; }

/* --- Base Layout (Mobile Default) --- */
#wrapper { 
    width: 100%;
    padding: 20px 6vw !important; 
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.bg-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
    background: #000;
}

.bg-overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url('img/Top.avif'), none, url('img/Bottom.avif');
    background-repeat: no-repeat;
    background-position: center top, center center, center bottom;
    background-size: 100% 25%, 100% 50%, 100% 25%;
    opacity: 0.5;
    background-attachment: scroll;
    will-change: transform;
    transform: translateZ(0);
}

/* --- Typography --- */
h1, h2, h3, summary,
.zr-h1, .zr-h2 {
    font-family: var(--font-display);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.zr-divider {
    border: 0;
    border-top: 1px solid var(--border-glass);
    margin: 25px 0;
}

.zr-h1 {
    font-size: var(--font-h1);
    line-height: 0.95;
    margin-bottom: 0.2em;
    margin-top: 0;
    padding-top: 0;
    word-break: break-word;
    hyphens: auto;
}

.zr-h2 {
    font-size: 1.1rem;
    letter-spacing: 4px;
    color: var(--text-dim);
    margin-bottom: 40px;
}

.text-cyan { color: var(--action-blue); }

.lead {
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    font-weight: 500;
    margin-bottom: 25px;
}

/* --- Navigation & Header --- */
header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 50px;
    padding: 0;
}

.logo-zr {
    height: clamp(100px, 25vw, 140px);
    width: auto;
    display: block;
    margin-bottom: 10px;
    margin-left: -5px;
    transition: 0.4s;
    will-change: transform, filter; 
    transform: translateZ(0);
}

.logo-zr:hover {
    filter: drop-shadow(0 0 15px var(--action-blue));
    transform: scale(1.02) translateZ(0);
}

.zr-nav {
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 1.5px;
    color: var(--text-dim);
}

.zr-nav a {
    text-decoration: none;
    color: inherit;
    padding: 5px 10px;
}

.zr-nav a:hover, .nav-active {
    color: var(--action-blue) !important;
    text-shadow: 0 0 10px var(--action-blue), 0 0 20px var(--action-blue);
}

/* --- Grid & Cards --- */
.grid-main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 60px;
    align-items: start;
}

.zr-card {
    background: var(--surface-gray);
    border: 1px solid var(--border-glass);
    padding: 40px;
    border-radius: 20px;
    margin-top: 0;
}

.capability-list { list-style: none; padding: 0; }
.capability-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-glass);
    font-size: 0.9rem;
    display: flex;
    gap: 12px;
}
.capability-list li span {
    color: var(--action-blue);
    font-weight: 800;
}

/* --- Tech Stack --- */
.tech-stack-home {
    margin-top: 20px;
    text-align: center;
}

.icon-list {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    align-items: center;
}

.icon-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tech-icon {
    width: 50px;
    height: auto;
    filter: grayscale(1) brightness(2);
    opacity: 0.5;
}

.icon-item:hover .tech-icon {
    filter: grayscale(0) brightness(1) drop-shadow(0 0 10px var(--action-blue));
    opacity: 1;
}

.software-stack-list {
    padding-left: 20px;
}

.software-stack-list li::marker {
    color: var(--action-blue);
}

/* --- Gallery & Arrows --- */
.gallery-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0 !important;
    min-height: auto !important;
}

.stack-container {
    position: relative;
    width: var(--card-width);
    height: var(--card-height);
    touch-action: pan-y;
}

.card {
    position: absolute;
    inset: 0;
    background: transparent;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: transform 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease, filter 0.3s ease;
}

.card img {
    max-width: 100%; max-height: 100%; object-fit: contain;
    border-radius: var(--img-rounding);
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}

.card.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.5);
}

.card.active {
    z-index: 10;
    transform: translateX(0) scale(1);
    opacity: 1;
    filter: brightness(100%);
}

.card.peek-right {
    z-index: 5;
    transform: translateX(var(--peek-dist)) scale(0.85);
    opacity: 0.35;
    filter: brightness(30%);
}

.card.peek-left {
    z-index: 5;
    transform: translateX(calc(var(--peek-dist) * -1)) scale(0.85);
    opacity: 0.35;
    filter: brightness(30%);
}

.nav-arrow {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 100;
    padding: 0;
    transition:
    transform 0.3s ease, filter 0.3s ease;
}

.nav-arrow img {
    width: 60px;
    height: auto;
    display: block;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.mobile-glow {
    filter: brightness(1.2) drop-shadow(0 0 10px #00e5ff) !important;
    transform: scale(0.96) !important;
    transition: all 0.1s ease;
    z-index: 100;
}

/* --- Lightbox & Forms --- */
.lightbox {
    position: fixed;
    inset: 0; 
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.lightbox:target {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    width: 95%;
    max-width: clamp(320px, 85vw, 900px);
    position: relative;
    text-align: center;
    z-index: 10000;
    display: inline-block !important;
}

/* Added specific reset for the button version of the close trigger */
.lightbox-close {
    /* Reset Button Defaults (The "Fix") */
    border: none;
    padding: 0;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    
    /* Your Original Styles */
    position: absolute !important;
    top: 0px !important;
    right: 0px !important;
    width: 40px;
    height: 40px;
    color: #000;
    font-size: 34px; /* Slightly reduced to sit better in the circle */
    font-weight: 300;
    text-decoration: none;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--action-blue);
    border-radius: 50%;
    line-height: 1; /* Changed from 0 to 1 for better vertical centering */
    transition: all 0.4s ease;
}

.lightbox-close:hover {
    background: #fff !important;
    color: #000;
    box-shadow: 0 0 25px var(--action-blue), 0 0 50px rgba(94, 202, 231, 0.4);
}

/* ADA Requirement: Visual focus indicator for keyboard users */
.lightbox-close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 4px;
}

.close-btn::after, 
.lightbox-close::after {
    content: "\00d7";
    display: block;
    margin-top: -2px; 
}

.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.lightbox-overlay.visible {
    display: flex;
}

#lightbox-img {
    max-height: 85%;
    max-width: 90%;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(0,0,0,1);
    border: 1px solid var(--border-glass);
}

.contact-container {
    width: 100% !important;
    margin: 20px auto;
    padding: 30px !important;
    position: relative;
}

.contact-container h3 {
    font-size: 0.9rem;
    margin-bottom: 10px;
    margin-top: 0px;
    letter-spacing: 2px;
}

.contact-container h3.text-cyan {
    font-size: clamp(1.5rem, 4vw, 2.5rem) !important;
    margin-bottom: 15px !important;
}

.zr-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.form-group {
    position: relative;
    width: 100%; }
.zr-form input, .zr-form textarea {
    width: 100% !important;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: 4px;
    color: #fff;
    outline: none;
    transition: 0.2s ease-in-out;
}

.zr-form textarea { min-height: 80px; resize: none; }
.zr-form input:focus, 
.zr-form textarea:focus {
    outline: none; /* Removes the default browser blue ring */
    border-color: #5ECAE7; /* A much lighter cyan */
    box-shadow: 0 0 10px rgba(94, 202, 231, 0.5); /* Soft outer glow */
    background-color: rgba(255, 255, 255, 0.05); /* Optional: slight background lift */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group label {
    position: absolute;
    left: 12px;
    top: 12px;
    color: var(--text-dim);
    pointer-events: none;
    transition: 0.2s ease all;
    font-size: 0.7rem;
    letter-spacing: 1px;
}

.zr-form input:focus ~ label,
.zr-form input:not(:placeholder-shown) ~ label,
.zr-form textarea:focus ~ label,
.zr-form textarea:not(:placeholder-shown) ~ label {
    top: -10px;
    left: 8px;
    font-size: 0.6rem;
    color: #5ECAE7;
    background: var(--surface-gray);
    padding: 0 4px;
}

.form-submit {
    width: 50% !important;
    padding: 12px !important;
    font-size: 0.75rem !important;
    border: none;
    margin-left: 50%;
    cursor: pointer;
    background: var(--action-blue);
    color: #000;
    font-weight: 800;
}

/* --- Footer & Soundcloud --- */
footer {
    margin-top: auto;
    padding-top: 60px;
}

.footer-cta {
    margin-top: 20px !important;
}

.footer-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
    padding-top: 30px;
    padding: 20px;
}

.footer-player {
    width: 100%;
    display: flex;
    justify-content: center;
}

.footer-player iframe {
    width: 100% !important;
    max-width: 280px;
    box-shadow: 0 0 20px rgba(0, 164, 214, 0.4);
    border-radius: 12px;
    transition: 0.4s;
}

.footer-player iframe:hover {
    box-shadow: 0 0 40px rgba(0, 164, 214, 0.9);
}

.cta-btn {
    display: inline-block; 
    padding: 18px 40px;
    background: var(--action-blue);
    color: #000;
    text-decoration: none;
    font-weight: 800;
    border-radius: 20px;
    transition: 0.4s;
}

.cta-btn:hover {
    background: #fff;
    color: #000;
    box-shadow: 0 0 25px var(--action-blue), 0 0 50px rgba(0, 164, 214, 0.4);
    transform: translateY(-3px);
}

.footer-break {
    display: block;
    margin-top: 5px;
}

/* --- DESKTOP SCALING (Min-Width Overrides) --- */

@media (min-width: 768px) {
#wrapper { 
    max-width: 1440px; 
    margin: 0 auto; 
    padding: clamp(20px, 5vw, 60px) !important; 
}
header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 80px;
}

.logo-zr {
    height: clamp(80px, 15vw, 180px);
    margin-left: 0;
    margin-bottom: 20px;
}

.zr-nav {
    font-size: 0.85rem;
    letter-spacing: 2px;
}

.footer-cta.zr-card {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    padding: 30px !important;
}
    
:root {
    --card-width: 550px;
    --card-height: 700px;
    --peek-dist: 80px;
}

.gallery-wrapper {
    min-height: 800px;
    padding: 60px 0;
}
}

@media (min-width: 1024px) {
.nav-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-arrow:hover img {
    opacity: 1;
    filter: drop-shadow(0 0 10px var(--action-blue));
}

.nav-arrow.prev:hover {
    transform: translateX(-8px);
}

.nav-arrow.next:hover {
    transform: translateX(8px);
}

.gallery-wrapper {
    gap: 50px;
}
}

@media (min-width: 1440px) {
:root {
    --card-width: 750px;
    --card-height: 950px;
    --peek-dist: 120px;
}

.gallery-wrapper {
    min-height: 1100px;
    padding: 100px 0;
}
}

/* --- EXTREME MOBILE (Specific Max-Width Tweaks) --- */

@media screen and (max-width: 480px) {
.lightbox-content {
    width: 90% !important;
}

.contact-container {
    padding: 20px !important;
}

.lightbox-close {
    top: 20px !important;
    right: 0px !important;
    width: 35px !important;
    height: 35px !important;
    font-size: 25px !important;
}
}

@media screen and (max-width: 330px) {
#wrapper {
    padding: 15px 4vw !important;
}

.logo-zr {
    height: 85px !important;
}

.zr-nav { 
    font-size: 0.75rem;
    letter-spacing: 1px;
}

.zr-h1 {
    font-size: 2.2rem !important;
    line-height: 1;
}

.zr-card {
    padding: 20px !important;
    border-radius: 12px;
}

.lightbox-close {
    top: 0px !important;
}
}

@media screen and (max-width: 325px) {
.grid-main {
    display: flex !important;
    flex-direction: column !important;
    gap: 30px !important;
}

.zr-card {
    padding: 18px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

.icon-list {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px 10px;
    margin-top: 30px;
}

.icon-item {
    flex-direction: column !important;
    justify-content: center !important;
    text-align: center;
    gap: 8px;
}

.tech-icon {
    width: 40px;
}
}

#zr-particle-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    transition: none !important;
    background: transparent !important;
    pointer-events: none;
    will-change: transform;
}