/* Base & Reset */
:root {
    --bg-color: #050b14;
    --surface-color: rgba(16, 33, 65, 0.4);
    --surface-light: rgba(25, 48, 88, 0.6);
    --primary: #64FFDA; /* Cyan/Teal */
    --secondary: #B392F0; /* Soft Purple */
    --text-main: #CCD6F6;
    --text-muted: #8892B0;
    --border-color: rgba(100, 255, 218, 0.1);
    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background Effects */
.blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.15;
    animation: float 20s infinite alternate;
}

.blob-1 {
    width: 600px;
    height: 600px;
    background: var(--primary);
    top: -10%;
    left: -10%;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: var(--secondary);
    bottom: -10%;
    right: -10%;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(100px, 100px) scale(1.2); }
}

/* Reusable Components */
.glass {
    background: var(--surface-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, background 0.3s ease;
}

.glass:hover {
    background: var(--surface-light);
    transform: translateY(-5px);
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

/* Buttons */
.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: var(--gradient);
    color: var(--bg-color);
    border: none;
}

.btn-primary:hover {
    box-shadow: 0 0 20px rgba(100, 255, 218, 0.4);
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    background: rgba(100, 255, 218, 0.1);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(5, 11, 20, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.highlight {
    color: var(--primary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a:not(.btn-primary) {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
    position: relative;
}

.nav-links a:not(.btn-primary)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-links a:not(.btn-primary):hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary);
}

/* Sections */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--gradient);
    border-radius: 2px;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    padding-top: 5rem; /* Account for navbar */
}

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

.title {
    font-family: var(--font-heading);
    font-size: 4.5rem;
    font-weight: 700;
    color: #E6F1FF;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.headline {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    line-height: 1.4;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.description {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 550px;
}

.cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.location-badge {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.badge-highlight {
    font-weight: 600;
    font-family: var(--font-heading);
    color: var(--primary);
    border-color: var(--primary);
    margin-bottom: 1.5rem;
}

.badge-ghost {
    background: transparent;
    border: none;
    padding: 0;
    font-size: 0.95rem;
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hex-grid {
    position: relative;
    width: 300px;
    height: 300px;
}

.hex {
    position: absolute;
    width: 100px;
    height: 115px;
    background: rgba(16, 33, 65, 0.6);
    backdrop-filter: blur(5px);
    border: 1px solid var(--primary);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    color: var(--secondary);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    transition: all 0.5s ease;
    box-shadow: 0 0 20px rgba(100, 255, 218, 0.1);
}

.hex:hover {
    background: rgba(100, 255, 218, 0.1);
    transform: scale(1.1);
    z-index: 10;
    color: var(--primary);
}

.hex:nth-child(1) { top: 0; left: 100px; }
.hex:nth-child(2) { top: 85px; left: 50px; background: rgba(179, 146, 240, 0.1); border-color: var(--secondary); color: var(--primary);}
.hex:nth-child(3) { top: 85px; left: 150px; }

/* About Section */
.about-card {
    padding: 3rem;
    font-size: 1.15rem;
}
.about-card p { margin-bottom: 1.5rem; }
.about-card p:last-child { margin-bottom: 0; }

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.skill-card {
    padding: 2rem;
    text-align: left;
}

.skill-card-large {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
}

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
}

.skill-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.skill-card h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #E6F1FF;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.tags-left {
    justify-content: flex-start;
}

.tag {
    background: rgba(100, 255, 218, 0.05);
    color: var(--text-main);
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(100, 255, 218, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.top-skills-flex {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2.5rem;
    text-align: left;
    gap: 1.5rem;
}

/* Education & Certifications */
.edu-cert-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    width: 100%;
    margin-bottom: 2rem;
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    padding: 2rem;
    margin-bottom: 2rem;
}

.timeline-dot {
    position: absolute;
    left: 0;
    transform: translateX(calc(-50% + 1px));
    top: 2.5rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bg-color);
    border: 3px solid var(--primary);
}

.timeline-date {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    color: var(--secondary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.timeline-item h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: #E6F1FF;
    margin-bottom: 0.5rem;
}

.skills-tri-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    width: 100%;
    margin-bottom: 2.5rem;
}

.cert-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cert-card {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.6rem 2rem;
}

.cert-card.cert-highlight {
    border-color: rgba(100, 255, 218, 0.25);
    background: linear-gradient(135deg, rgba(16, 33, 65, 0.65) 0%, rgba(25, 48, 88, 0.45) 100%);
    box-shadow: 0 8px 32px rgba(100, 255, 218, 0.08);
}

.cert-card.cert-highlight:hover {
    border-color: rgba(100, 255, 218, 0.5);
    box-shadow: 0 12px 40px rgba(100, 255, 218, 0.16);
}

.cert-thumb-preview {
    position: relative;
    width: 95px;
    min-width: 95px;
    height: 130px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(100, 255, 218, 0.3);
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.cert-thumb-preview:hover {
    transform: translateY(-2px) scale(1.03);
    border-color: var(--primary);
    box-shadow: 0 6px 20px rgba(100, 255, 218, 0.3);
}

.cert-thumb-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.cert-thumb-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 11, 20, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--primary);
    font-size: 1.1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}

.cert-thumb-overlay span {
    font-size: 0.7rem;
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 600;
}

.cert-thumb-preview:hover .cert-thumb-overlay {
    opacity: 1;
}

.cert-icon {
    font-size: 2rem;
    color: var(--secondary);
    min-width: 2rem;
    margin-top: 0.2rem;
}

.cert-info {
    flex: 1;
}

.cert-info h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: #E6F1FF;
    margin-bottom: 0.3rem;
}

.cert-action {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 0.8rem;
    flex-wrap: wrap;
}

.view-cert-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    font-family: var(--font-heading);
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 20px;
    transition: all 0.3s ease;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    background: transparent;
}

.view-cert-btn:hover {
    background: rgba(100, 255, 218, 0.12);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(100, 255, 218, 0.25);
}

/* Certificate Lightbox Modal */
.cert-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 1.5rem;
}

.cert-modal.active {
    opacity: 1;
    visibility: visible;
}

.cert-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 11, 20, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.cert-modal-content {
    position: relative;
    max-width: 850px;
    max-height: 90vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: rgba(16, 33, 65, 0.95);
    border: 1px solid var(--border-color);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
    z-index: 10;
    transform: scale(0.94);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 16px;
}

.cert-modal.active .cert-modal-content {
    transform: scale(1);
}

.cert-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 1.8rem;
    border-bottom: 1px solid rgba(100, 255, 218, 0.12);
}

.cert-modal-header h3 {
    font-family: var(--font-heading);
    color: #e6f1ff;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.cert-modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 0.5rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

.cert-modal-close:hover {
    color: var(--primary);
    transform: scale(1.15);
}

.cert-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(5, 11, 20, 0.6);
    min-height: 250px;
}

.cert-modal-body img {
    max-width: 100%;
    max-height: 65vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.cert-modal-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.8rem;
    border-top: 1px solid rgba(100, 255, 218, 0.12);
    flex-wrap: wrap;
}

/* Footer */
footer {
    background: rgba(5, 11, 20, 0.95);
    padding: 3rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
}

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

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    font-size: 1.2rem;
    color: var(--text-main);
    transition: all 0.3s ease;
}

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

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.appear {
    opacity: 1;
    transform: translateY(0);
}

.fade-delay-1 { transition-delay: 0.2s; }
.fade-delay-2 { transition-delay: 0.4s; }

/* Responsive Media Queries */

@media (max-width: 1024px) {
    .edu-cert-wrapper {
        gap: 2rem;
    }
    .title { font-size: 4rem; }
}

@media (max-width: 968px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 8rem;
    }
    
    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .cta-group {
        justify-content: center;
    }
    
    .location-badge {
        justify-content: center;
    }

    .tags-left {
        justify-content: center;
    }
    
    .edu-cert-wrapper {
        grid-template-columns: 1fr;
    }
    
    .top-skills-flex {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(5, 11, 20, 0.98);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 3rem;
        gap: 2rem;
        transition: left 0.3s ease;
        overflow-y: auto;
    }
    
    .nav-links.active {
        left: 0;
    }

    .section {
        padding: 4rem 0;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .title {
        font-size: 3rem;
    }
    
    .headline {
        font-size: 1.5rem;
    }

    .about-card, .skill-card-large {
        padding: 1.8rem;
    }
    
    .contact-card {
        padding: 2rem 1.5rem;
    }
    
    .timeline-item {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    main {
        padding: 0 1rem;
    }

    .title {
        font-size: 2.2rem;
    }

    .headline {
        font-size: 1.3rem;
    }
    
    .cta-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
    }
    
    .hex-grid {
        transform: scale(0.65);
        margin-top: -2rem;
    }

    .timeline {
        padding-left: 1.5rem;
    }
    
    .timeline-dot {
        left: 0;
        width: 16px;
        height: 16px;
    }
    
    .cert-card {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        align-items: center;
    }
    
    .cert-icon {
        margin-bottom: 0.5rem;
    }

    .cert-thumb-preview {
        width: 120px;
        min-width: 120px;
        height: 160px;
        margin: 0 auto 0.5rem;
    }

    .cert-action {
        justify-content: center;
    }

    .cert-modal {
        padding: 0.8rem;
    }

    .cert-modal-header {
        padding: 1rem 1.2rem;
    }

    .cert-modal-footer {
        padding: 0.8rem 1.2rem;
        justify-content: center;
    }

    .cert-modal-footer .btn-primary,
    .cert-modal-footer .btn-secondary {
        width: 100%;
    }
}
