/* 
  Project: Gurpreet Singh Portfolio
  Style: Modern, Professional, Data-Centric
*/

:root {
    --primary: #0A192F;
    --secondary: #1F77B4;
    --accent: #2ECC71;
    --bg-light: #F8F9FA;
    --text-dark: #212529;
    --text-muted: #6c757d;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.8);
    --shadow: 0 10px 30px -10px rgba(2, 12, 27, 0.7);
    --transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-dark);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
.nav-logo {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--bg-light);
}

.section-sm {
    padding: 40px 0;
}

/* BUTTONS */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background-color: var(--secondary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary);
    transform: translateY(-3px);
}

.btn-sm {
    padding: 0.5rem 1.2rem;
    font-size: 0.9rem;
}

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

.btn-outline:hover {
    background: var(--secondary);
    color: var(--white);
}

/* NAVIGATION */
.sticky-nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.nav-logo {
    font-size: 1.5rem;
    color: var(--primary);
}

.nav-logo span {
    color: var(--secondary);
}

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

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
}

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

/* HERO */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(rgba(10, 25, 47, 0.8), rgba(10, 25, 47, 0.8)), url('../img/bg-masthead.jpg') center/cover no-repeat;
    background-attachment: fixed;
    color: var(--white);
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 0.5rem;
}

.text-gradient {
    background: linear-gradient(90deg, var(--secondary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 2rem;
    display: block;
    margin-bottom: 1.5rem;
}

.hero .lead {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.8);
}

.tool-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.tool-tag {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    font-size: 1.5rem;
}

.social-links a:hover {
    color: var(--secondary);
    transform: translateY(-3px);
}

.hero-bg .blob {
    position: absolute;
    right: -10%;
    top: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
    opacity: 0.2;
    filter: blur(80px);
}

/* SECTION HEADERS */
.section-header {
    margin-bottom: 4rem;
}

.section-header.center {
    text-align: center;
}

.section-tag {
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: block;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary);
}

/* ABOUT */
.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.intro-p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.check-list {
    list-style: none;
}

.check-list li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1rem;
}

.check-list li::before {
    content: '\f058';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--accent);
}

.meta-card {
    background: var(--bg-light);
    padding: 2.5rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.meta-card i {
    font-size: 3rem;
    color: var(--secondary);
    margin-bottom: 1.5rem;
}

/* SKILLS */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.skill-category h3 {
    margin-bottom: 1.5rem;
    color: var(--primary);
    border-bottom: 2px solid var(--bg-light);
    padding-bottom: 0.5rem;
}

.skill-item {
    margin-bottom: 1rem;
    cursor: pointer;
    padding: 0.5rem 0; /* prevent tight adjacency when expanding */
}
.skill-name {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    padding: 0.5rem;
    border-radius: 4px;
    transition: var(--transition);
}

.skill-item:hover .skill-name {
    background: var(--bg-light);
    color: var(--secondary);
}

.skill-context {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    font-size: 0.9rem;
    color: var(--text-muted);
    padding-left: 0.5rem;
}

.skill-item:hover .skill-context,
.skill-item.active .skill-context {
    max-height: 100px;
    margin-top: 0.5rem;
}

.skill-item i {
    font-size: 0.8rem;
    transition: transform 0.3s;
}

.skill-item.active i {
    transform: rotate(180deg);
}

/* PROJECTS */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

/* REPOSITORIES */
.repos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.repo-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.05);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.repo-card a {
    color: var(--primary);
    font-weight: 600;
    text-align: center;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-github {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.8rem;
    background: var(--secondary);
    color: var(--white);
    border-radius: 4px;
    font-size: 0.85rem;
    white-space: nowrap;
    transition: var(--transition);
    margin-left: 0.5rem; /* space from adjacent elements */
}

.btn-github:hover {
    background: var(--primary);
    transform: translateY(-2px);
}
.repo-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-4px);
}

.repos-grid h3 {
    grid-column: 1 / -1;
    text-align: center;
    margin: 1rem 0 0.5rem;
    color: var(--primary);
}
.project-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    position: relative;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
}

.project-image {
    height: 180px;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform var(--transition);
}

.project-card:hover .project-image {
    transform: scale(1.05);
}

.project-details {
    font-size: 0.9rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.project-card:hover .project-details {
    max-height: 500px;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    position: relative;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
}

.project-image {
    height: 180px;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform var(--transition);
}

.project-card:hover .project-image {
    transform: scale(1.05);
}

.project-details {
    font-size: 0.9rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.project-card:hover .project-details {
    max-height: 500px;
    /* enough to show content */
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
}

.project-image {
    height: 180px;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.project-body {
    padding: 2rem;
}

.project-cat {
    font-size: 0.7rem;
    color: var(--secondary);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    display: block;
}

.project-card h3 {
    margin-bottom: 1rem;
}

.project-details {
    font-size: 0.9rem;
}

.detail-row {
    margin-bottom: 0.8rem;
}

.detail-row strong {
    color: var(--primary);
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    opacity: 0.7;
}

.project-footer {
    padding: 1.5rem 2rem;
    background: var(--bg-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.proj-tools {
    display: flex;
    gap: 0.5rem;
}

.proj-tools span {
    font-size: 0.7rem;
    background: #e9ecef;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

/* CLOUD SECTION */
.cloud-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.cloud-content h3,
.cloud-tools h3 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    color: var(--primary);
}

.cloud-tools .tool-tags {
    justify-content: flex-start;
}

.cloud-tools .tool-tag {
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--primary);
    font-weight: 600;
}

/* TIMELINE - DUAL SIDED FOCUS */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 60px auto;
    width: 100%;
}

.timeline::after {
    content: '';
    display: table;
    clear: both;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(10, 25, 47, 0.1);
    transform: translateX(-50%);
    z-index: 0;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    width: 50%;
    cursor: pointer;
    z-index: 1;
}

.timeline-item.left {
    float: left;
    padding-right: 45px;
    text-align: right;
    clear: both;
}

.timeline-item.right {
    float: right;
    padding-left: 45px;
    text-align: left;
    clear: both;
}

.timeline-dot {
    position: absolute;
    top: 25px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid var(--white);
    z-index: 2;
    transition: transform 0.3s ease;
}

.timeline-item.left .timeline-dot {
    right: -8px;
}

.timeline-item.right .timeline-dot {
    left: -8px;
}

.timeline-content {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    display: inline-block;
    max-width: 100%;
}

.timeline-item.active .timeline-content {
    border-bottom-color: var(--secondary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.timeline-date {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--secondary);
    display: block;
    margin-bottom: 0.2rem;
}

.timeline-type-tag {
    font-size: 0.65rem;
    text-transform: uppercase;
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    display: inline-block;
}

.timeline-item.left .timeline-type-tag {
    float: left;
}

.timeline-item.right .timeline-type-tag {
    float: right;
}

.timeline-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
    clear: both;
}

.timeline-org {
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-item.work .timeline-dot {
    background: #3498db;
}

.timeline-item.education .timeline-dot {
    background: #e67e22;
}

.timeline-item.project .timeline-dot {
    background: #2ecc71;
}

.timeline-item.volunteering .timeline-dot {
    background: #9b59b6;
}

.timeline-bullets,
.timeline-impact {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.4s ease;
    text-align: left;
}

.timeline-item:hover .timeline-bullets,
.timeline-item:hover .timeline-impact,
.timeline-item.active .timeline-bullets,
.timeline-item.active .timeline-impact {
    max-height: 800px;
    opacity: 1;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.timeline-bullets {
    padding-left: 1.2rem;
    list-style: none;
}

.timeline-bullets li {
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
}

/* SIMULATIONS & CERTS */
.certs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.cert-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--secondary);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    cursor: pointer;
    transition: var(--transition);
    overflow: hidden;
}

.cert-card:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.cert-card.no-expand:hover {
    box-shadow: none;
    cursor: default;
}
.cert-header h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.cert-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.cert-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    margin-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 1rem;
}

.cert-card:hover .cert-details,
.cert-card.active .cert-details {
    max-height: 800px;
}

.cert-bullets {
    margin: 1rem 0;
    padding-left: 1.2rem;
    list-style: none;
}

.cert-bullets li {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.prof-motivation {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--bg-light);
    border-left: 3px solid var(--secondary);
    font-style: italic;
    font-size: 0.9rem;
}

.prof-motivation strong {
    display: block;
    margin-bottom: 0.5rem;
    font-style: normal;
    color: var(--secondary);
}

/* LANGUAGES */
.languages-flex {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.lang-tags {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.lang-tag {
    background: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    border-bottom: 2px solid var(--secondary);
    font-size: 0.9rem;
}

/* CONTACT */
.contact-section {
    background: var(--primary);
    color: var(--white);
}

.contact-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 4rem;
    border-radius: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-content h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
}

.contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.contact-item i {
    font-size: 2rem;
    color: var(--secondary);
}

.contact-footer {
    margin-top: 5rem;
    opacity: 0.5;
    font-size: 0.8rem;
}

/* RESPONSIVE */
@media (max-width: 768px) {

    .nav-links,
    .nav-cta {
        display: none;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .cloud-grid {
        grid-template-columns: 1fr;
    }

    .contact-card {
        padding: 2rem;
    }

    .contact-content h2 {
        font-size: 2rem;
    }

    .contact-links {
        flex-direction: column;
        gap: 2rem;
    }

    .timeline::before {
        left: 20px;
        transform: none;
    }

    .timeline-item {
        width: 100% !important;
        float: none !important;
        padding-left: 50px !important;
        padding-right: 0 !important;
        text-align: left !important;
    }

    .timeline-dot {
        left: 13px !important;
        right: auto !important;
    }

    .timeline-item.left .timeline-type-tag,
    .timeline-item.right .timeline-type-tag {
        float: right;
    }
}