/* ========================= */
/* Import Fonts */
/* ========================= */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&family=Roboto:wght@300;400;500&display=swap');

:root{
    --base-color: #0f172a;        /* deep navy */
    --text-color: #f1f5f9;        /* soft white */
    --primary-color: #00f5ff;     /* cyber cyan */
    --secondary-color: #00ff88;   /* neon green */
    --color-1: #1e293b;           /* header background */
    --color-2: #111827;           /* section background */
    --color-3: #1f2937;           /* alt section */
}

/* ========================= */
/* Global Styles */
/* ========================= */
*{
  margin: 0;  
  padding: 0;
  box-sizing: border-box;
}

html{
    font-family: 'Roboto', sans-serif;
    color: var(--text-color);
}

body{
    padding: 1.2em;
    background-color: var(--base-color);
    line-height: 1.6;
}

h1,h2,h3 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
}

h1 { font-size: 2.8rem; line-height:1.2; }
h2 { font-size: 2.2rem; line-height:1.3; }
h3 { font-size: 1.5rem; line-height:1.4; }

p {
    font-size: 1.15rem;
    line-height: 1.6;
}

/* ========================= */
/* Navigation */
/* ========================= */
nav{
   margin: 1em auto 3em auto; 
   width: min(1000px,100%);
}
nav ul{
    display: flex;
    align-items:center ;
    list-style-type: none;
    gap: 2em;
}
nav li:first-child{
   margin-right: auto;
   font-family: 'Poppins', sans-serif; 
   font-weight: bold;
}
nav a{
    text-decoration: none;
    color: var(--text-color);
    position: relative;
    width: max-content;
    transition: 200ms;
}

nav li:not(:first-child) a::after{
    content: '';
    background: linear-gradient(to right, #00f5ff, #00ff88, #0077ff);
    width: 100%;
    height: 4px;
    position: absolute;
    bottom: 0;
    left: 0;
    transform: scaleX(0);
    border-radius: 5px;
    transform-origin: left;
    transition: transform 0.5s linear;
}
nav li:not(:first-child) a:hover::after{
    transform: scaleX(1);
}

/* ========================= */
/* Header / Flex Container */
/* ========================= */
header,section{
    margin: 1.5em auto;
    width: min(75em,100%);
    background-color: var(--color-1);
    padding: min(2em ,15%);
    border-radius: 1em;
}
header{
    margin-top: 2px;
}

.flex-container{
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 3em;
}

/* ========================= */
/* Image Animations */
/* ========================= */
.img-wrapper {
    position: relative;
    display: inline-block;
}
.img-wrapper img {
    position: relative;
    z-index: 1;
    display: block;
    height: 400px;
    width: 300px;
    border-radius: 1em;
    object-fit: cover;
    object-position: bottom;
}

@property --angle{
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

.img-wrapper::before,
.img-wrapper::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 1em;
    background-image: conic-gradient(from var(--angle), transparent 70%, #00f5ff, #00ff88, #0077ff);
    animation: 3s spin linear infinite;
    z-index: 0;
}
.img-wrapper::before{
    filter: blur(25px);
    opacity: 0.8;
    inset: -6px;
}

@keyframes spin{
    from { --angle: 0deg; }
    to { --angle: 360deg; }
}

/* ========================= */
/* Terminal Intro */
.terminal-intro {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    color: var(--primary-color);
    background-color: var(--color-2);
    padding: 1em;
    border-radius: 0.5em;
    min-height: 3rem;
    overflow: hidden;
    width: fit-content;
    margin-bottom: 1em;
}
.cursor {
    display: inline-block;
    background-color: var(--primary-color);
    width: 0.6rem;
    margin-left: 2px;
    animation: blink 1s step-start infinite;
}
@keyframes blink {
    0%, 50%, 100% { opacity: 1; }
    25%, 75% { opacity: 0; }
}

/* ========================= */
/* Text and Buttons */
.text-container{
    flex: 0 1 34em;
}
.text-container p{
    margin: .75em 0 1em 0;
    font-size: 1.25rem;
}
.cta-button{
   display: inline-block; 
   text-decoration: none;
   color:  #000;
   background-color: var(--primary-color);
   padding: .75em 1.25em;
   border-radius: .5em;
   font-weight: 600;
    transition: all 0.3s ease;
}
.cta-button:hover{
    background-color: var(--primary-color);
    color:  #000;
    box-shadow: 0 0 20px var(--primary-color);
    transform: translateY(-3px);
}
.secondary{
    background-color: var(--secondary-color);
}
.secondary:hover{
    background-color:var(--secondary-color);
    color: #000;
    box-shadow: 0 0 20px var(--secondary-color);
    transform: translateY(-3px);
}

/* Add spacing between project buttons on mobile */
.project-buttons{
    display: flex;
    gap: 0.5em;
}
@media(max-width:640px){
    .project-buttons{ flex-direction: column; gap:0.5em;}
}

/* ========================= */
/* Projects Section */
.projects-grid{
    display: flex;
    flex-wrap: wrap;
    gap: 2em;
    justify-content: center;
}
.project-card{
    background-color: var(--color-2);
    padding: 1.5em 1em;
    border-radius: 1em;
    width: 100%;
    max-width: 300px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.project-card:hover{
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}
.project-card img{
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 0.75em;
    margin-bottom: 1em;
}
.project-card h3{
    margin-bottom: 0.75em;
    font-size: 1.25rem;
    color: var(--primary-color);
}

/* ========================= */
/* Slider */
.slider-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: 400px;
    margin: 2em auto;
    overflow: hidden;
    border-radius: 1em;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    background-color: var(--color-3);
}
.slider {
    display: flex;
    transition: transform 0.5s ease-in-out;
}
.slider img {
    width: 100%;
    height: 100%;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 1em;
    object-position: center center;
    transition: transform 0.5s ease;
}
.slider-container button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0,0,0,0.5);
    border: none;
    color: white;
    font-size: 2rem;
    padding: 0.5em 0.8em;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.3s;
}
.slider-container button:hover { background-color: rgba(0,0,0,0.8);}
.slider-container .prev { left: 10px; }
.slider-container .next { right: 10px; }

/* ========================= */
/* Skills Grid */
#skills{
    margin: 2em auto;
    width: min(75em, 100%);
    text-align: center;
    padding: 2em 1em;
    border-radius: 1em;
    background-color: var(--color-3);
}
#skills h2{ font-size: 2rem; margin-bottom: 1.5em;}
.skills-grid{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5em;
    justify-items: center;
}
.skill-card{
    background-color: var(--color-2);
    padding: 1.5em 1em;
    border-radius: 1em;
    width: 100%;
    max-width: 300px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}
.skill-card:hover{
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}
.skill-card h3{ margin-bottom: 0.75em; font-size: 1.2rem; color: var(--primary-color);}
.skill-card p{ font-size: 1rem; line-height: 1.4; color: var(--text-color); }

/* ========================= */
/* FAQ */
details{
    margin-top: 1em;
    background-color: var(--base-color);
    border-radius: 1em;
}
details summary{
    padding: 1em;
    font-size: 1.7rem;
    font-family: 'Poppins', sans-serif;
}
details p{ padding: 0.5em 1.5em 1.5em 1.5em; }
/* ========================= */
/* Footer */
footer {
    padding: 2em 1em;
    text-align: center;
    background-color: var(--color-1);
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5em;
}
footer a {
    text-decoration: none;
    color: var(--text-color);
    position: relative;
    width: max-content;
    transition: 0.3s;
    font-size: 1rem;
}
footer a::after {
    content: '';
    background: linear-gradient(to right, #00f5ff, #00ff88, #0077ff);
    width: 100%;
    height: 3px;
    position: absolute;
    bottom: -3px;
    left: 0;
    transform: scaleX(0);
    border-radius: 3px;
    transform-origin: left;
    transition: transform 0.3s linear;
}
footer a:hover::after { transform: scaleX(1); }

/* ========================= */
/* WhatsApp Floating Button */
.whatsapp-chat {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    z-index: 1000;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    cursor: pointer;
    animation: bounce 2s infinite;
}
.whatsapp-chat img{ width:100%; height:100%; object-fit:cover;}
@keyframes bounce { 0%,100%{transform:translateY(0);} 50%{transform:translateY(-8px);} }
.whatsapp-chat:hover{ transform: scale(1.1); box-shadow:0 6px 20px rgba(0,0,0,0.4); transition: all 0.3s ease; }

/* ========================= */
/* Mobile Sidebar / Hamburger */
.hamburger {
    display: none;
    font-size: 2.2rem;
    color: var(--text-color);
    cursor: pointer;
    position: absolute;
    top: 1.2em;
    right: 1em;
    z-index: 101;
}
.sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background-color: var(--color-1);
    padding-top: 3em;
    transition: left 0.3s ease;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 1.5em;
    padding-left:2em;
}
.sidebar a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.2rem;
    padding: 0.5em 0;
    transition: background 0.2s;
}
.sidebar a:hover{ background-color: rgba(0, 255, 255, 0.1); border-radius:0.5em;}
.sidebar.active{ left: 0; }

.sidebar #close-btn{
  position: absolute;
  right: 3px;

     height: 30px;
     width: 30px;
}
#close-btn #fa-x{
 color: rgb(245, 242, 242);
 z-index: 1000;
 height: 30px;
 width: 30px;
}

/* ========================= */
/* Responsive Styles */
@media(max-width:988px){
    nav ul{ gap:1.2em; font-size:0.95rem;}
    .flex-container{ flex-direction:column; text-align:center;}
    .text-container{ flex:1 1 auto;}
    .img-wrapper img{ width:260px; height:340px;}
    .skills-grid{ grid-template-columns: repeat(2, 1fr);}
    section{ padding:2em;}
    .slider-container{ height:300px;}
}

@media(max-width:640px){
    nav ul{ flex-direction:column; gap:1em; align-items:center; text-align:center;display: none;}
    nav li:first-child{ margin-right:0;}
    header{ margin-top:0; padding:1.5em;}
    h1{ font-size:1.8rem;}
    h2{ font-size:1.5rem;}
    .text-container p{ font-size:1rem;}
    .img-wrapper img{ width:220px; height:300px;}
    .cta-button{ display:block; width:100%; margin-top:.75em; text-align:center;}
    .projects-grid{ flex-direction:column; align-items:center;}
    .project-card{ max-width:90%;}
    details summary{ font-size:1.2rem;}
    footer a{ display:block; margin:.75em 0;}
    .skills-grid{ grid-template-columns:1fr;}
    .hamburger {
        display: block;
    }
       /* Add spacing between project buttons on mobile */
    .project-card a.cta-button,
    .project-card a.secondary {
        display: block;
        margin-top: 0.5em;
    }
}

/* ========================= */
/* Scroll Reveal Animations  */
/* ========================= */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================= */
/* Contact Form              */
/* ========================= */
.contact-subtitle {
    color: rgba(241, 245, 249, 0.7);
    font-size: 1.1rem;
    margin-bottom: 2em;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25em;
    max-width: 750px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25em;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4em;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary-color);
    letter-spacing: 0.03em;
}

.form-group input,
.form-group textarea {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.6em;
    padding: 0.8em 1em;
    color: var(--text-color);
    font-size: 1rem;
    font-family: 'Roboto', sans-serif;
    transition: border-color 0.3s, box-shadow 0.3s;
    resize: vertical;
    outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(241, 245, 249, 0.35);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.15);
}

.contact-submit {
    align-self: flex-start;
    display: flex;
    align-items: center;
    gap: 0.6em;
    font-size: 1rem;
    cursor: pointer;
    border: none;
}

.contact-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.form-status {
    font-size: 0.95rem;
    min-height: 1.4em;
    margin-top: -0.5em;
    transition: color 0.3s;
}
.form-status.success { color: var(--secondary-color); }
.form-status.error   { color: #ff6b6b; }

@media (max-width: 640px) {
    .form-row { grid-template-columns: 1fr; }
    .contact-submit { width: 100%; justify-content: center; }
}

/* ========================= */
/* Scroll Progress Bar       */
/* ========================= */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color), #0077ff);
    z-index: 9999;
    border-top-right-radius: 2px;
    border-bottom-right-radius: 2px;
    transition: width 0.1s ease-out;
}

/* ========================= */
/* Back to Top Button        */
/* ========================= */
#back-to-top {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 60px;
    height: 60px;
    z-index: 999;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: #000;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}
#back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
#back-to-top:hover {
    background-color: var(--secondary-color);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    transform: translateY(-5px) scale(1.1);
}

/* ========================= */
/* Active Nav Highlight      */
/* ========================= */
nav li:not(:first-child) a.active::after {
    transform: scaleX(1);
}
nav li a.active {
    color: var(--primary-color) !important;
}
.sidebar a.active {
    background-color: rgba(0, 255, 255, 0.1);
    border-radius: 0.5em;
    color: var(--primary-color) !important;
}

/* ========================= */
/* Experience Timeline       */
/* ========================= */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 3em auto;
}

/* Vertical glowing line */
.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    border-radius: 5px;
}

.timeline-item {
    position: relative;
    margin-bottom: 2.5em;
    padding-left: 50px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

/* Timeline Dot */
.timeline-dot {
    position: absolute;
    left: 12px;
    top: 5px;
    width: 20px;
    height: 20px;
    background-color: var(--base-color);
    border: 4px solid var(--primary-color);
    border-radius: 50%;
    z-index: 10;
    transition: all 0.3s ease;
}

/* Hover effects for dot */
.timeline-item:hover .timeline-dot {
    background-color: var(--primary-color);
    box-shadow: 0 0 15px var(--primary-color);
    transform: scale(1.2);
}

/* Timeline Content Box */
.timeline-content {
    background-color: var(--color-2);
    padding: 1.5em;
    border-radius: 1em;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-left: 3px solid transparent; 
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Hover effects for content box */
.timeline-item:hover .timeline-content {
    transform: translateX(10px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    border-left: 3px solid var(--primary-color);
}

.timeline-content h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 0.25em;
}

.timeline-date {
    display: inline-block;
    font-size: 0.9rem;
    color: rgba(241, 245, 249, 0.6);
    margin-bottom: 0.75em;
    font-family: 'Courier New', Courier, monospace;
}

.timeline-content p {
    font-size: 1.05rem;
}

/* Timeline Responsive (Mobile) */
@media(max-width: 640px) {
    .timeline::before {
        left: 10px;
    }
    .timeline-item {
        padding-left: 40px;
    }
    .timeline-dot {
        left: 2px;
        width: 16px;
        height: 16px;
        top: 6px;
    }
    .timeline-content {
        padding: 1.25em;
    }
    .timeline-item:hover .timeline-content {
        transform: translateX(5px);
    }
}