/* ==========================================================================
   Aditya Kumar Jha — Portfolio Styles
   ========================================================================== */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ---------- CSS Custom Properties ---------- */
:root {
    --dark-bg: #212121;
    --darker-bg: #181818;
    --light-text: #f5f5f5;
    --yellow-primary: #FFC107;
    --yellow-secondary: #FFEB3B;
    --yellow-light: #FFF9C4;
    --gray-accent: #424242;
    --font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--dark-bg);
    color: var(--light-text);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--yellow-primary);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--yellow-secondary);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    background-color: var(--yellow-primary);
    color: var(--darker-bg);
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    margin-right: 15px;
    font-size: 14px;
}

.btn:hover {
    background-color: var(--yellow-secondary);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.3);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--yellow-primary);
    color: var(--yellow-primary);
}

.btn-secondary:hover {
    background-color: var(--yellow-primary);
    color: var(--darker-bg);
}

/* ---------- Section Titles ---------- */
.section-title {
    font-size: 36px;
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
    color: var(--light-text);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background-color: var(--yellow-primary);
}

/* ==========================================================================
   Navigation
   ========================================================================== */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--darker-bg);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--yellow-primary);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: var(--light-text);
    font-weight: 500;
    position: relative;
}

.nav-links a:hover {
    color: var(--yellow-primary);
}

.nav-links a.active {
    color: var(--yellow-primary);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--yellow-primary);
}

.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 24px;
    color: var(--light-text);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    background-color: var(--darker-bg);
    position: relative;
    overflow: hidden;
    margin-top: 70px;
}

.hero-content {
    max-width: 650px;
    z-index: 1;
}

.hero-img {
    position: absolute;
    right: 10%;
    top: 50%;
    transform: translateY(-50%);
    width: 350px;
    height: 350px;
    border-radius: 50%;
    border: 5px solid var(--yellow-primary);
    box-shadow: 0 0 30px rgba(255, 193, 7, 0.3);
    overflow: hidden;
    z-index: 1;
}

.hero-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero h1 {
    font-size: 60px;
    margin-bottom: 15px;
    line-height: 1.2;
}

/* Dynamic typed text */
#dynamic-text {
    color: var(--yellow-primary);
    font-weight: bold;
}

#dynamic-text::after {
    content: "|";
    display: inline-block;
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%   { opacity: 1; }
    50%  { opacity: 0; }
    100% { opacity: 1; }
}

.hero p.tagline {
    font-size: 22px;
    margin-bottom: 30px;
    color: var(--yellow-primary);
}

.hero p.intro {
    font-size: 18px;
    margin-bottom: 40px;
    max-width: 600px;
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about {
    background-color: var(--dark-bg);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}



.fun-facts {
    background-color: var(--darker-bg);
    padding: 20px;
    border-radius: 10px;
    margin-top: 30px;
}

.fun-facts h4 {
    color: var(--yellow-primary);
    margin-bottom: 15px;
}

/* ==========================================================================
   Portfolio Section
   ========================================================================== */
.portfolio {
    background-color: var(--darker-bg);
}

.portfolio-container {
    position: relative;
    width: 100%;
    padding: 0 50px;
}

.projects-scroll-container {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    padding: 20px 0;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    gap: 20px;
    position: relative;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.projects-scroll-container::-webkit-scrollbar {
    display: none;
}

.projects-scroll-container::after {
    content: "";
    flex: 0 0 20px;
}

.project-card {
    flex: 0 0 auto;
    width: 350px;
    white-space: normal;
    background-color: var(--dark-bg);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.project-img {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    height: 250px;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--yellow-primary);
}

.project-description {
    flex-grow: 1;
    margin-bottom: 15px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-height: 1.5;
}

.tech-tags {
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tech-tag {
    background-color: var(--darker-bg);
    color: var(--yellow-light);
    font-size: 0.75rem;
    padding: 6px 12px;
    border-radius: 20px;
    display: inline-block;
}

.project-links {
    display: flex;
    justify-content: space-between;
    margin-top: auto;
}

.project-links a {
    color: var(--yellow-primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.project-links a i {
    margin-right: 5px;
}

.project-links a:hover {
    color: var(--yellow-secondary);
}

/* Scroll navigation buttons */
.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--yellow-primary);
    color: #333;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.scroll-btn:hover {
    background-color: var(--yellow-secondary);
    transform: translateY(-50%) scale(1.1);
}

.scroll-btn.disabled {
    background-color: #E0E0E0;
    color: #999;
    cursor: not-allowed;
    transform: translateY(-50%);
}

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

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

/* ==========================================================================
   Resume / Timeline Section
   ========================================================================== */
.resume {
    background-color: var(--dark-bg);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--yellow-primary);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--darker-bg);
    border: 4px solid var(--yellow-primary);
    border-radius: 50%;
    top: 15px;
    z-index: 1;
}

.left {
    left: 0;
}

.right {
    left: 50%;
}

.left::after {
    right: -12px;
}

.right::after {
    left: -12px;
}

.timeline-content {
    padding: 20px;
    background-color: var(--darker-bg);
    border-radius: 10px;
}

.timeline-date {
    color: var(--yellow-primary);
    font-weight: 600;
}


/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact {
    background-color: var(--dark-bg);
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-method {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background-color: var(--darker-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: var(--yellow-primary);
    font-size: 20px;
}

.social-links {
    display: flex;
    margin-top: 30px;
}

.social-link {
    width: 45px;
    height: 45px;
    background-color: var(--darker-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: var(--light-text);
    font-size: 18px;
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: var(--yellow-primary);
    color: var(--darker-bg);
    transform: translateY(-5px);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    background-color: var(--dark-bg);
    border: none;
    border-radius: 5px;
    color: var(--light-text);
    font-size: 16px;
    margin-bottom: 15px;
    font-family: var(--font-family);
}

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

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
    background-color: var(--darker-bg);
    padding: 30px 0;
    text-align: center;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* ---------- Tablets & smaller desktops ---------- */
@media (max-width: 992px) {
    .about-content,
    .contact-container {
        grid-template-columns: 1fr;
    }

    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item::after {
        left: 20px;
    }

    .right {
        left: 0;
    }

    .hero-img {
        width: 300px;
        height: 300px;
    }
}

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 70%;
        height: calc(100vh - 70px);
        background-color: var(--darker-bg);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 40px;
        transition: right 0.3s ease;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        margin: 15px 0;
    }

    .hero {
        text-align: center;
    }

    .hero-content {
        margin: 0 auto;
    }

    .hero-img {
        position: relative;
        margin: 40px auto 0;
        right: auto;
        top: auto;
        transform: none;
        width: 250px;
        height: 250px;
    }



    .portfolio-container {
        padding: 0 20px;
    }

    .projects-scroll-container {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        justify-content: flex-start;
    }

    .project-card {
        width: 90%;
        flex: 0 0 90%;
        margin-right: 10px;
        scroll-snap-align: start;
    }

    .project-content {
        height: auto;
    }

    .scroll-btn {
        width: 30px;
        height: 30px;
    }

    .scroll-btn-left {
        left: 5px;
    }

    .scroll-btn-right {
        right: 5px;
    }
}
