/* Custom Styles */
body {
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

/* Live Coding Background */
#live-coding-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.15;
}

/* Custom Cursor - More responsive */
.cursor {
    width: 20px;
    height: 20px;
    border: 2px solid #b91c1ca8;
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: width 0.1s, height 0.1s, background-color 0.1s;
    z-index: 9999;
}

.cursor-grow {
    width: 40px;
    height: 40px;
    background-color: rgba(248, 56, 56, 0.2);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1e293b2c;
}

::-webkit-scrollbar-thumb {
    background: #b91c1c;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #cf2020;
}

/* Section Animation */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1.5s, transform 1.5s;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* 3D Photo Effect */
#photo-container {
    perspective: 1000px;
}

#my-photo {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 1.5rem;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3), 0 0 30px rgba(0, 0, 0, 0.2), 0 0 45px rgba(0, 0, 0, 0.1);
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #0a0a0a;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 1rem;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.loader {
    border: 4px solid #1e293b;
    border-left-color: #38bdf8;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Photography Gallery */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.photo-item {
    overflow: hidden;
    border-radius: 0.75rem;
    background-color: #1e293b;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease-out, filter 0.4s;
}

.photo-item:hover img {
    transform: scale(1.1);
    filter: brightness(1.1);
}

@media screen and (max-width: 480px) {
    .photo-gallery {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
    }
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    -webkit-backdrop-filter: blur(25px);
    backdrop-filter: blur(25px);
}

.modal-content {
    background: #fff;
    padding: 30px 25px;
    border-radius: 8px;
    text-align: center;
    max-width: 400px;
    font-family: 'Segoe UI', sans-serif;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.3);
    background-color: rgba(255, 255, 255, 0.5);
    -webkit-backdrop-filter: blur(25px);
    backdrop-filter: blur(25px);
}

.modal-content p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: #222;
}

#ok-btn {
    width: 220px;
    height: 50px;
    border: none;
    outline: none;
    color: #fff;
    background: #111;
    cursor: pointer;
    position: relative;
    z-index: 0;
    border-radius: 10px;
}

#ok-btn:before {
    content: '';
    background: linear-gradient(45deg, #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000);
    position: absolute;
    top: -2px;
    left:-2px;
    background-size: 400%;
    z-index: -1;
    filter: blur(5px);
    width: calc(100% + 4px);
    height: calc(100% + 4px);
    animation: glowing 20s linear infinite;
    opacity: 0;
    transition: opacity .3s ease-in-out;
    border-radius: 10px;
}

#ok-btn:active {
    color: #000
}

#ok-btn:active:after {
    background: transparent;
}

#ok-btn:hover:before {
    opacity: 1;
}

#ok-btn:after {
    z-index: -1;
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: #111;
    left: 0;
    top: 0;
    border-radius: 10px;
}

@media(prefers-color-scheme: dark) {
    .modal-content {
        background-color: rgba(0, 0, 0, 0.3);
        box-shadow: 0 0 25px rgba(255, 255, 255, 0.3);
        color: #e2e8f0;
    }
    .modal-content p {
        color: #e2e8f0;
    }
    #ok-btn{
        color: #111;
    }
    #ok-btn:after{
        background: rgb(231, 231, 231);
    }
}

/* .glow is a reusable class for glowing RESUME */
#glow {
    border: none;
    outline: none;
    color: #fff;
    background: #111;
    cursor: pointer;
    position: relative;
    z-index: 0;
    border-radius: 10px;
}

#glow::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(45deg, #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000);
  background-size: 400%;
  filter: blur(5px);
  border-radius: 10px;
  animation: glowing 20s linear infinite;
  z-index: -1;
}

#glow:active:after {
    background: transparent;
}

#glow::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #111;
  border-radius: 10px;
  z-index: -1;
}

@keyframes glowing {
    0% { background-position: 0 0; }
    50% { background-position: 400% 0; }
    100% { background-position: 0 0; }
}

@media(prefers-color-scheme: dark) {
    body {
        background-color: #0a0a0a;
        color: #e2e8f0;
    }
    ::-webkit-scrollbar-track
    {
        background: #1e293b;
    }
    ::-webkit-scrollbar-thumb 
    {
        background: #38bdf8;
    }
    ::-webkit-scrollbar-thumb:hover 
    {
        background: #0ea5e9;
    }
    .cursor{
        border: 2px solid #38bdf8;
    }
    .cursor-grow{
        background-color: rgba(56, 189, 248, 0.2);
    }
    #my-photo {
        box-shadow: 0 0 15px rgba(56, 189, 248, 0.3), 0 0 30px rgba(56, 189, 248, 0.2), 0 0 45px rgba(56, 189, 248, 0.1);
    }
}

@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.animate-scroll {
  display: flex;
  width: max-content;
  animation: scroll 30s linear infinite;
}
