body {
    background-color: #1a1a2e;
    font-family: 'Inter', sans-serif;
}

.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #1a1a2e;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out;
}

.microprocessor {
    position: relative;
    width: 150px;
    height: 150px;
    background-color: #2b3a4e;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5), 0 0 30px rgba(0, 191, 255, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 50px;
    z-index: 10;
}

.cpu-core {
    position: absolute;
    width: 80%;
    height: 80%;
    background-color: #1a1a2e;
    border-radius: 4px;
    border: 1px solid #00ffff50;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
    z-index: 15;
}

.microprocessor::before {
    content: 'CPU';
    color: #00ffff;
    font-size: 20px;
    font-weight: bold;
    text-shadow: 0 0 5px #00ffff;
    opacity: 0.8;
    z-index: 20;
}

@keyframes pin-signal {

    0%,
    100% {
        background-color: #94a3b8;
        box-shadow: 0 0 3px rgba(255, 255, 255, 0.2);
    }

    50% {
        background-color: #00ffff;
        box-shadow: 0 0 10px #00ffff, 0 0 15px #00ffaa;
    }
}

.pin-side {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 5px 0;
    pointer-events: none;
}

.left-side {
    left: 0;
    transform: translate(-100%, -50%);
}

.right-side {
    right: 0;
    transform: translate(100%, -50%);
}

.top-side,
.bottom-side {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding: 0 5px;
    pointer-events: none;
}

.top-side {
    top: 0;
    transform: translate(-50%, -100%);
}

.bottom-side {
    bottom: 0;
    transform: translate(-50%, 100%);
}

.pin {
    border-radius: 1px;
    animation: pin-signal 3s infinite ease-in-out;
    transform-origin: center;
}

.pin.horizontal {
    width: 15px;
    height: 2px;
}

.pin.vertical {
    width: 2px;
    height: 15px;
}

.pin:nth-child(3n) {
    animation-delay: 0.5s;
}

.pin:nth-child(3n + 1) {
    animation-delay: 1.2s;
}

.pin:nth-child(3n + 2) {
    animation-delay: 2.1s;
}

.loading-bar-container {
    width: 300px;
    height: 12px;
    background-color: #2b3a4e;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
    margin-top: 30px;
}

.loading-bar {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #ff00ff, #00ffff);
    transition: width 0.3s ease-out;
    border-radius: 6px;
}

body {
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    background-color: var(--light);
    color: var(--dark);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.vanta-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
}

.floating {
    animation: floating 6s ease-in-out infinite;
}

@keyframes floating {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }

    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

.floating-2 {
    animation: floating-2 8s ease-in-out infinite;
}

@keyframes floating-2 {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-30px) rotate(-5deg);
    }

    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

.progress-sphere {
    width: 120px;
    height: 120px;
    position: relative;
    perspective: 1000px;
}

.carousel-container {
    display: flex;
}

.carousel-container img {
    width: 100%;
    object-fit: contain;
}

.sphere-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: rotate 15s infinite linear;
}

.sphere-face {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

@keyframes rotate {
    0% {
        transform: rotateY(0deg);
    }

    100% {
        transform: rotateY(360deg);
    }
}

.timeline-badge {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateZ(30px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.timeline-badge:hover {
    transform: translateZ(50px) scale(1.1);
}

.project-card {
    transform-style: preserve-3d;
    transform: perspective(1000px);
    transition: all 0.5s ease;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.project-card:hover {
    transform: perspective(1000px) rotateY(10deg) translateY(-10px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
}

.trophy {
    transform-style: preserve-3d;
    transform: perspective(1000px) rotateX(15deg);
    transition: all 0.3s ease;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.trophy:hover {
    transform: perspective(1000px) rotateX(0deg) translateY(-10px);
}

.contact-input {
    transition: all 0.3s ease;
    transform-style: preserve-3d;
    transform: perspective(1000px) rotateX(0deg);
}

.contact-input:focus {
    transform: perspective(1000px) rotateX(5deg);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

.nav-link {
    position: relative;
    display: inline-block;
    font-family: 'Cinzel', 'Times New Roman', serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.9rem;
    color: #1a1424;
    padding-bottom: 0.35rem;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -6px;
    left: 0;
    background: linear-gradient(90deg, #b68c4a 0%, #f3d9a4 100%);
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link:focus {
    color: #c9a457;
}

.nav-link:hover::after,
.nav-link:focus::after {
    width: 100%;
}

.nav-link-mobile {
    display: block;
    font-size: 1rem;
    letter-spacing: 0.25em;
    color: #1a1424;
    padding: 0.9rem 0;
    border-bottom: 1px solid rgba(182, 140, 74, 0.2);
}

.nav-brand-name {
    font-family: 'Cinzel', 'Times New Roman', serif;
    font-size: 1rem;
    letter-spacing: 0.3em;
    font-weight: 600;
    color: #1a1424;
    text-transform: uppercase;
}

.social-icon {
    transition: all 0.3s ease;
    transform: perspective(1000px) rotateY(0deg) translateZ(0px);
}

.social-icon:hover {
    transform: perspective(1000px) rotateY(20deg) translateZ(10px);
}

.experience-card:hover {
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.8), 0 0 30px rgba(99, 102, 241, 0.4), 0 30px 60px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.5);
}

.project-card .project-img-box {
    height: 14rem;
    min-height: 14rem;
    max-height: 14rem;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9f9f9;
}

.project-card .project-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    margin: 0;
    padding: 0;
}

.project-card .project-content-area p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 2.6em;
    min-height: 2.6em;
    line-height: 1.3em;
    white-space: normal;
}

.project-card .project-content-area {
    min-height: 8rem;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Uniform style for contact social icons */
.contact-social {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e6ebff;
  border-radius: 50%;
  padding: 0;
  font-size: 1.8rem;
  transition: box-shadow 0.2s, background 0.2s;
  box-sizing: border-box;
}

.contact-social img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
}

.contact-social:hover {
  box-shadow: 0 0 0 3px #5271ff;
  background: #d2e0ff;
}