/* --- Global Styles & Variables --- */
:root {
    --primary-color: #E50914;
    --dark-color: #141414;
    --light-color: #f5f5f5;
    --gray-color: #999;
    --bg-color: #000000;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    background: var(--bg-color);
    color: var(--light-color);
    overflow-x: hidden;
}
body.content-hidden main, body.content-hidden header { display: none; }
body.no-scroll { overflow: hidden; }
a { color: var(--light-color); text-decoration: none; }
h2 { font-size: 1.8rem; margin-bottom: 20px; }

/* --- INTRO ANIMATION STYLES --- */
#intro-container{position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:#000;display:flex;justify-content:center;align-items:center;z-index:9999;opacity:1;transition:opacity .5s ease-out}
.intro-logo{width:150px;height:auto;filter:drop-shadow(0 0 10px rgba(255,255,255,.7));transform:scale(.8);opacity:0;animation:scale-in 3.5s ease-out forwards,glow-img 3.5s ease-in-out forwards}
@keyframes scale-in{0%{transform:scale(.8);opacity:0}20%{transform:scale(1.2);opacity:1}40%{transform:scale(1)}80%{transform:scale(1);opacity:1}100%{transform:scale(1.5);opacity:0}}
@keyframes glow-img{0%{filter:drop-shadow(0 0 5px rgba(255,255,255,0))}50%{filter:drop-shadow(0 0 20px rgba(255,255,255,.8))}100%{filter:drop-shadow(0 0 5px rgba(255,255,255,0))}}

/* --- Navigation Bar --- */
#navbar{position:fixed;top:0;left:0;width:100%;z-index:1000;background:linear-gradient(to bottom,rgba(0,0,0,.7) 10%,transparent);transition:background-color .4s;padding:1rem 3rem}
#navbar.scrolled{background-color:var(--dark-color)}
.navbar-container{display:flex;justify-content:space-between;align-items:center}
.logo img{height:35px;width:auto;display:block}
#navbar nav ul{list-style:none;display:flex;gap:20px}
#navbar nav ul li a{font-weight:500;transition:color .3s}
#navbar nav ul li a:hover{color:var(--gray-color)}
.menu-toggle{display:none;background:none;border:none;color:var(--light-color);font-size:1.5rem;cursor:pointer;z-index:1100}

/* --- Banner Carousel Section --- */
.banner-section{position:relative;height:90vh;display:flex;align-items:center;background-size:cover;background-position:center center;transition:background-image 1s ease-in-out}
.banner-section::after{content:'';position:absolute;bottom:0;left:0;right:0;height:7.5rem;background:linear-gradient(to top,var(--bg-color),transparent)}
.banner-content{margin-left:3rem;max-width:600px;z-index:10}
.banner-title{font-size:3.5rem;font-weight:800}
.banner-subtitle{font-size:1.2rem;margin:1rem 0;max-width:80%}
.carousel-dots{position:absolute;bottom:8rem;left:50%;transform:translateX(-50%);display:flex;gap:10px;z-index:25}
.dot{width:12px;height:12px;border-radius:50%;background:rgba(255,255,255,.5);cursor:pointer;transition:background .3s}
.dot.active{background:var(--light-color)}

/* --- Buttons --- */
.btn{padding:.75rem 2rem;border:none;border-radius:4px;font-size:1rem;font-weight:700;cursor:pointer;transition:opacity .3s;margin-right:1rem;display:inline-block}
.btn-primary{background:var(--light-color);color:var(--dark-color)}
.btn-secondary{background:rgba(109,109,110,.7);color:var(--light-color)}
.btn i{margin-left:8px}

/* --- Projects Section --- */
.projects-section{padding:0 3rem;margin-top:-5rem;position:relative;z-index:20}
.category-row{margin-bottom:3rem}
.category-title{font-size:1.4rem;font-weight:600;margin-bottom:10px}
.projects-container-wrapper { position: relative; }
.projects-container{display:flex;overflow-x:auto;gap:10px;padding-block:10px;scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch; scroll-behavior: smooth;}
.projects-container::-webkit-scrollbar{display:none}
.project-thumbnail-wrapper{position:relative;flex:0 0 auto;width:280px;height:160px;border-radius:4px;overflow:hidden;transition:transform .3s ease,box-shadow .3s ease}
.project-thumbnail{width:100%;height:100%;background-size:cover;background-position:center;cursor:pointer}
.project-thumbnail-wrapper:hover{transform:scale(1.1);z-index:50;box-shadow:0 10px 20px rgba(0,0,0,.75)}
.project-thumbnail-overlay{position:absolute;bottom:0;left:0;right:0;padding:1rem;display:flex;justify-content:center;align-items:center;opacity:0;transition:opacity .3s ease;background:linear-gradient(to top,rgba(0,0,0,.8),transparent)}
.project-thumbnail-wrapper:hover .project-thumbnail-overlay{opacity:1}

/* --- ENHANCED Scroll Button Styles --- */
.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 30;
    background: rgba(20, 20, 20, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background-color 0.3s, opacity 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0; /* Hidden by default, shown on hover */
}
.projects-container-wrapper:hover .scroll-btn {
    opacity: 1;
}
.scroll-btn.scroll-left { left: -25px; }
.scroll-btn.scroll-right { right: -25px; }
.scroll-btn.hidden { opacity: 0; pointer-events: none; }
/* Initially hide buttons, JS will show them if needed */
.projects-container-wrapper .scroll-btn { display: none; }
/* When controls are needed, JS adds this class */
.projects-container-wrapper.controls-visible .scroll-btn { display: flex; }

/* --- Modal Section --- */
/* .modal{display:none;position:fixed;z-index:1001;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:rgba(0,0,0,.85)}
.modal-content{position:relative;margin:5% auto;width:90%;max-width:850px;background-color:var(--dark-color);border-radius:8px;overflow:hidden;animation:fadeIn .5s}
@keyframes fadeIn{from{opacity:0;transform:scale(.9)}to{opacity:1;transform:scale(1)}}
.close-button{color:#fff;position:absolute;top:15px;right:25px;font-size:35px;font-weight:700;cursor:pointer;z-index:10}
.modal-banner{width:100%;height:450px;background-size:cover;background-position:center;position:relative}
.modal-banner::after{content:'';position:absolute;bottom:0;left:0;right:0;height:100px;background:linear-gradient(to top,var(--dark-color),transparent)}
.modal-body{padding:2rem 3rem}
#modal-title{font-size:2.5rem}
#modal-tech-stack,.tech-stack{margin:1rem 0;display:flex;flex-wrap:wrap;gap:10px}
.tech-item{background:#333;padding:5px 10px;border-radius:4px;font-size:.9rem}
#modal-description{line-height:1.6;margin-bottom:2rem}
.modal-links{display:flex;flex-wrap:wrap;gap:10px;margin-top:1.5rem} */

/* --- Content & Modal Sections --- */
.content-section { padding: 4rem 3rem; }
.text-center { text-align: center; }
#resume p, #contact p { max-width: 600px; margin: auto auto 25px; line-height: 1.6; }
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 15px; }
.skill-item {background: var(--dark-color); padding: 20px; text-align: center; border-radius: 5px; font-weight: 500; border: 1px solid #333; transition: background-color 0.3s, transform 0.3s;}
.skill-item:hover { background: var(--primary-color); transform: translateY(-5px); }
.social-links { display: flex; justify-content: center; gap: 30px; margin-top: 20px; }
.social-icon { font-size: 2.5rem; color: var(--gray-color); transition: color 0.3s, transform 0.3s; }
.social-icon:hover { color: var(--light-color); transform: scale(1.2); }
.modal {display: none; position: fixed; z-index: 1001; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.85);}
.modal-content {
    position: relative; margin: 5% auto; width: 90%; max-width: 850px;
    background-color: var(--dark-color); border-radius: 8px; overflow: hidden; animation: fadeIn 0.5s;
}
@keyframes fadeIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
.close-button {
    color: white; position: absolute; top: 15px; right: 25px;
    font-size: 35px; font-weight: bold; cursor: pointer; z-index: 10;
}
.modal-banner { width: 100%; height: 450px; background-size: cover; background-position: center; position: relative; }
.modal-banner::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 100px;
    background: linear-gradient(to top, var(--dark-color), transparent);
}
.modal-body { padding: 2rem 3rem; }
#modal-title { font-size: 2.5rem; }
.tech-stack { margin: 1rem 0; display: flex; flex-wrap: wrap; gap: 10px; }
.tech-item { background: #333; padding: 5px 10px; border-radius: 4px; font-size: 0.9rem; }
#modal-description { line-height: 1.6; margin-bottom: 2rem; }

.project-title-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  /* background: rgba(0,0,0,0.7); */
  color: #fff;
  font-weight: 600;
  padding: 8px 12px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: background 0.3s;
}

.project-title-overlay:hover {
  background: rgba(0,0,0,0.85); 
}

.project-thumbnail:hover + .project-title-overlay,
.project-title:hover,
.project-thumbnail-wrapper:hover .project-title {
  background: rgba(0,0,0,0.85); /* or your preferred highlight color */
  color: #fff;
  font-weight: 700;
  transition: background 0.3s ease, color 0.3s ease;
}

/* Scroll buttons - aligned vertically center */
.projects-wrapper {
  position: relative;
}

.scroll-left,
.scroll-right {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.6);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 10;
}

.scroll-left {
  left: -20px;
}

.scroll-right {
  right: -20px;
}


/* Contact Section */
#contact {
  background-color: var(--dark-color);
  padding: 4rem 3rem;
  color: var(--light-color);
  max-width: 800px;
  margin: 0 auto 60px;
  border-radius: 8px;
  box-shadow: 0 0 12px rgba(255, 0, 0, 0.4);
}

#contact h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
  font-weight: 700;
}

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

#contact label {
  font-weight: 600;
  margin-bottom: 0.3rem;
}

#contact input,
#contact textarea {
  padding: 12px 15px;
  border-radius: 4px;
  border: 1px solid #555;
  background-color: var(--bg-color);
  color: var(--light-color);
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
}

#contact input::placeholder,
#contact textarea::placeholder {
  color: #888;
}

#contact button {
  align-self: start;
  padding: 10px 30px;
  border: none;
  border-radius: 4px;
  background-color: var(--primary-color);
  color: white;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#contact button:hover,
#contact button:focus {
  background-color: #b20710; /* Slightly darker red */
}


.contact-section {
  max-width: 500px;
  margin: 0 auto;
  padding: 20px;
}

#contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#contact-form input,
#contact-form textarea {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
}

#contact-form button {
  padding: 12px;
  border: none;
  border-radius: 6px;
  background-color: #e53935; /* your theme color */
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

#contact-form button:hover:not([disabled]) {
  background-color: #c62828; 
}

#contact-form button[disabled] {
  background-color: #ccc;
  color: #666;
  cursor: not-allowed;
}

/* Status message styling */
.form-status {
  margin-top: 12px;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 500;
  min-height: 20px; /* keeps space reserved */
}

/* Different states */
.form-status.success {
  color: green;
}

.form-status.error {
  color: red;
}

.form-status.loading {
  color: #555;
  font-style: italic;
}

/* --- Footer Section --- */
.footer {
  background-color: var(--dark-color);
  color: var(--gray-color);
  text-align: center;
  padding: 1rem 0;
  font-size: 0.9rem;
  border-top: 1px solid #333;
}

.footer p {
  margin: 0;
  font-weight: 400;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    /* Hide scroll buttons on tablets and mobile devices */
    .scroll-btn {
        display: none !important;
    }
}
@media (max-width: 768px) {
    #navbar{padding:1rem 1.5rem}
    .menu-toggle{display:block}
    #navbar nav{position:fixed;top:0;right:0;width:70%;height:100vh;background:var(--dark-color);transform:translateX(100%);transition:transform .3s ease-in-out;padding-top:5rem}
    #navbar nav.active{transform:translateX(0)}
    #navbar nav ul{flex-direction:column;align-items:center;width:100%}
    #navbar nav ul li{margin:1.5rem 0}
    #navbar nav ul li a{font-size:1.2rem}
    .banner-section{height:70vh}
    .banner-content{margin-left:1.5rem}
    .banner-title{font-size:2.5rem}
    .banner-subtitle{font-size:1rem}
    .carousel-dots{bottom:6rem}
    .projects-section,.content-section{padding:2rem 1.5rem}
    .modal-content{width:95%;margin:10% auto}
    .modal-banner{height:250px}
    .modal-body{padding:1.5rem}
    #modal-title{font-size:1.8rem}
    .project-thumbnail-overlay{opacity:1;background:linear-gradient(to top,rgba(0,0,0,.9) 20%,transparent)}
    .project-thumbnail-wrapper:hover{transform:none;box-shadow:none}
    .project-thumbnail-overlay .btn-primary{padding:.5rem 1rem;font-size:.8rem}
    .modal-links{display:flex;justify-content:flex-start;flex-wrap:wrap;gap:10px}
    .scroll-left,.scroll-right{display: none !important;}
    .footer {padding: 0.75rem 1rem;font-size: 0.85rem;}
    #contact {padding: 2rem 1.5rem;margin-bottom: 40px;}
    #contact h2 {font-size: 2rem;}
    #contact button {width: 100%;text-align: center;}
}