:root {
    --primary-font: 'Poppins', sans-serif;
    --text-color: #EAEAEA;
    --accent-color: #00BFFF;
    --glass-background: rgba(18, 18, 22, 0.6); 
    --border-color: rgba(255, 255, 255, 0.1);
    
    /* These will be controlled by JavaScript */
    --grad-color-1: hsl(220, 30%, 5%);
    --grad-color-2: hsl(220, 25%, 15%);
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: var(--primary-font);
    color: var(--text-color);
    background-color: #0a0a0a;
    overflow: hidden;
}

body{
  background: transparent;
}

/* --- UTILITY CLASSES --- */
.hidden {
    display: none !important;
}


/* --- NAVBAR STYLES --- */
nav {
    display: flex;
    justify-content: center;
    padding: 2rem;
    gap: 2rem;
}

.nav-link {
    position: relative;
    color: var(--text-color);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 0.5rem 0.2rem;
    overflow: hidden;
}

.nav-link span {
    display: inline-block;
    transition: transform 0.4s cubic-bezier(0.7, 0, 0.3, 1), opacity 0.4s;
}

.nav-link::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 0.5rem 0.2rem;
    box-sizing: border-box;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.7, 0, 0.3, 1);
    background: linear-gradient(to right, #FFFFFF 20%, #B4B4B4 40%, #B4B4B4 60%, #FFFFFF 80%);
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textShine 1.5s linear infinite;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-color);
    transform: scaleX(1);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.nav-link:hover span {
    transform: translateY(-100%);
    opacity: 0;
}

.nav-link:hover::before {
    transform: translateY(0%);
}

/* --- GENERAL PAGE & MAIN CONTENT --- */
main {
    height: calc(100vh - 100px);
    overflow-y: auto;
    scroll-behavior: smooth;
}

.page {
    display: none;
    padding: 2rem 5%;
    min-height: 100%;
    box-sizing: border-box;
    animation: fadeIn 0.8s ease-in-out;
}
.page.active {
    display: block;
}

.animated-gradient-bg, .brainContainer {
    transition: filter 0.8s ease-in-out;
}

body.blur-background .animated-gradient-bg,
body.blur-background .brainContainer {
    filter: blur(8px) brightness(0.4) saturate(0.3);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes textShine { to { background-position: 200% center; } }


/* --- HOME SECTION --- */
#home .hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 100%;
    position: relative;
    z-index: 1;
}
.main-name {
    font-family: 'Poppins', sans-serif;
    font-weight: 900;
    font-size: 5rem;
    text-transform: uppercase;
    margin: 0;
    background: linear-gradient(to right, #EAEAEA 20%, #B4B4B4 40%, #B4B4B4 60%, #EAEAEA 80%);
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textShine 5s linear infinite;
}
.job-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: #A0A0A0;
    margin-top: 0.5rem;
}

/* --- ABOUT SECTION --- */
#about .about-container {
    max-width: 1100px;
    margin: 4rem auto;
    display: grid;
    grid-template-columns: 1fr 2.5fr;
    gap: 3rem;
    align-items: start;
}

#about .about-container h2 {
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: right;
    color: var(--accent-color);
    position: relative;
    padding-right: 3rem;
    font-weight: 700;
}

#about .about-container h2::after {
    content: '';
    position: absolute;
    top: 5px;
    right: 0;
    width: 2px;
    height: calc(100% - 10px);
    background-color: var(--border-color);
}

#about .about-text p {
    font-family: var(--primary-font);
    font-weight: 300;
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2em;
    color: #c0c0c0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

#about .about-text p:last-child {
    margin-bottom: 0;
}

.typing-cursor::after {
    content: '▋';
    margin-left: 5px;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    from, to { color: transparent; }
    50% { color: var(--accent-color); }
}

/* --- PROJECTS SECTION --- */
#projects .projects-container {
    max-width: 1200px;
    margin: 4rem auto;
}

.project-card {
    display: grid;
    grid-template-columns: 6fr 4fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 6rem;
    opacity: 0;
    transform: translateY(30px);
    animation: project-fade-in 0.8s ease-out forwards;
}

.project-card:nth-child(even) {
    grid-template-columns: 4fr 6fr;
}

.project-card:nth-child(even) .project-carousel {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
}

.project-card:nth-child(even) .project-info {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
}

@keyframes project-fade-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.carousel-images {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.7, 0, 0.3, 1);
}

.carousel-images img {
    width: 100%;
    flex-shrink: 0;
    display: block;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-carousel:hover .carousel-nav {
    opacity: 1;
}

.carousel-button {
    background-color: rgba(18, 18, 22, 0.7);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    transition: background-color 0.3s ease;
}
.carousel-button:hover {
    background-color: rgba(0, 191, 255, 0.8);
}
.carousel-button.prev {
    border-radius: 0 5px 5px 0;
}
.carousel-button.next {
    border-radius: 5px 0 0 5px;
}

.project-info h3 {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.project-description {
    font-weight: 300;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #c0c0c0;
    margin-bottom: 2rem;
}

.project-tech-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.project-tech-list li {
    background-color: rgba(0, 191, 255, 0.1);
    border: 1px solid rgba(0, 191, 255, 0.2);
    color: var(--accent-color);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
}

.project-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s ease;
}

.project-link:hover {
    color: var(--accent-color);
}


/* --- CONTACT SECTION --- */
#contact .contact-container {
    max-width: 1200px;
    margin: 4rem auto;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    align-items: center;
    gap: 5rem;
    padding: 0 2rem;
}

#contact .contact-left h2 {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #EAEAEA 20%, #B4B4B4 40%, #B4B4B4 60%, #EAEAEA 80%);
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textShine 5s linear infinite;
}

#contact .contact-left p {
    font-size: 1.2rem;
    font-weight: 300;
    color: #a0a0a0;
    line-height: 1.7;
    max-width: 450px;
}

#contact-cards-view {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: fadeIn 0.5s ease-in-out;
}

.contact-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    border-radius: 16px;
    text-decoration: none;
    color: var(--text-color);
    background: rgba(20, 20, 25, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-10px) scale(1.02);
    background: rgba(30, 30, 35, 0.7);
    border-color: rgba(0, 191, 255, 0.5);
}

.contact-card .contact-icon svg {
    width: 28px;
    height: 28px;
    color: var(--accent-color);
}

.contact-card .contact-details h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.contact-card .contact-details p {
    margin: 0;
    font-family: 'Source Code Pro', monospace;
    font-size: 1rem;
    color: #a0a0a0;
}

.contact-card .contact-arrow span {
    font-size: 2rem;
    color: var(--border-color);
    transition: transform 0.3s ease, color 0.3s ease;
}

.contact-card:hover .contact-arrow span {
    transform: translateX(5px);
    color: var(--accent-color);
}

/* --- ✨ NEW CONTACT FORM STYLES ✨ --- */
#contact-form-view {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: fadeIn 0.5s ease-in-out;
}

#contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-form-input,
.contact-form-textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(10, 10, 15, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    font-family: 'Source Code Pro', monospace;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form-input::placeholder,
.contact-form-textarea::placeholder {
    color: #6c757d;
}

.contact-form-input:focus,
.contact-form-textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(0, 191, 255, 0.2);
}

.contact-form-textarea {
    resize: vertical;
    min-height: 150px;
}

.form-submit-btn,
.form-back-btn {
    padding: 1rem 2rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-family: var(--primary-font);
    font-weight: 700;
    font-size: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.form-submit-btn {
    background-color: var(--accent-color);
    color: #0a0a0a;
}

.form-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 191, 255, 0.3);
}

.form-back-btn {
    background: none;
    color: #a0a0a0;
    padding: 0.5rem 0;
    text-align: left;
}

.form-back-btn:hover {
    color: var(--text-color);
}

#form-status {
    text-align: center;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 700;
    display: none;
    margin-top: 1rem;
}

#form-status.success {
    display: block;
    background-color: rgba(40, 167, 69, 0.2);
    border: 1px solid rgba(40, 167, 69, 0.5);
    color: #28a745;
}

#form-status.error {
    display: block;
    background-color: rgba(220, 53, 69, 0.2);
    border: 1px solid rgba(220, 53, 69, 0.5);
    color: #dc3545;
}


/* --- BACKGROUND & BRAIN ANIMATION --- */
.animated-gradient-bg {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: -2;
    background: radial-gradient(circle at center, var(--grad-color-2), var(--grad-color-1));
    background-size: 200% 200%;
    animation: gradientShift 20s ease infinite;
    transition: background 2s ease-in-out;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.brainContainer {
    width: 50vw;
    height: 50vw;
    max-height: 400px;
    max-width: 400px;
    position: absolute;
    left: 50%;
    top: 58%; 
    transform: translate(-50%, -50%);
    overflow: hidden;
    z-index: -1;
}

.brainContainer svg {
    height: 100%;
    width: 100%;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%,-50%);
}

.brainContainer path {
    fill:transparent;
}

/* === RESTORED ANIMATION STYLES START HERE === */
.brainPath {
  stroke-width: 1;
  transition: stroke 2s ease-in-out;
}

.brainCircle, .brainEllipse, .brainRect {
  transition: stroke 2s ease-in-out, fill 2s ease-in-out;
}

.animatePaths {
  animation: goPath 3000ms alternate infinite;
}

.animateCircles {
  animation: goCircle 3000ms alternate infinite;
}

.animateRects {
  animation: goRect 3000ms alternate infinite;
}

@keyframes goPath {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes goRect {
  to {
    opacity: 0;
  }
}

@keyframes goCircle {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
/* === RESTORED ANIMATION STYLES END HERE === */


/* --- RESPONSIVE DESIGN --- */
@media (max-width: 900px) {
    #contact .contact-container {
        grid-template-columns: 1fr;
        gap: 3rem;
        margin-top: 2rem;
        text-align: center;
    }
    #contact .contact-left p {
        margin-left: auto;
        margin-right: auto;
    }
    .form-back-btn {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .main-name {
      font-size: 3rem;
    }
    .job-title {
      font-size: 1rem;
    }
    .page {
      padding: 1rem;
    }
    #about .about-container {
      grid-template-columns: 1fr;
      gap: 2rem;
      margin-top: 2rem;
    }
    #about .about-container h2 {
      text-align: left;
      padding-right: 0;
    }
    #about .about-container h2::after {
      display: none;
    }
}