@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

:root {
    --bg-color: #fafbfb;
    --text-color: #1a1a1a;
    --primary-color: #6b5dd3;
    --card-bg: #ffffff;
    --border-color: #e5e5e5;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Space Grotesk', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.05;
    z-index: 1000;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='4' numOctaves='4' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' /%3E%3C/svg%3E");
}

.main-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(250, 251, 251, 0.9);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
}

nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

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

.navlinks a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 400;
    transition: color 0.3s;
}

.navlinks a:hover,
.navlinks a.active {
    color: var(--primary-color);
}

.togglebtn {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.togglebtn span {
    width: 25px;
    height: 2px;
    background-color: var(--text-color);
}

.theme-switch input {
    display: none;
}

.theme-label {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.theme-label:hover {
    background-color: var(--primary-color);
}

.hero-wrapper {
    padding: 150px 5% 100px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.hero-text {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.profile-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    cursor: pointer;
    transition: transform 0.3s;
}

.profile-img:hover {
    transform: scale(1.05);
}

.hero-content h5 {
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    color: #666;
}

.hero-content h5 .input {
    color: #c55a5a;
    font-weight: 500;
}

.typed-cursor {
    animation: blink 1s infinite;
}

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

.hero-content h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
    max-width: 600px;
}

.btn-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn-with-eye {
    position: relative;
    display: inline-block;
}

.btn {
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    border: 2px solid var(--text-color);
    color: var(--text-color);
    background-color: transparent;
    cursor: pointer;
}

.btn.active {
    background-color: var(--text-color);
    color: white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.eye-preview-btn {
    position: absolute;
    right: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.eye-preview-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.social {
    display: flex;
    gap: 1rem;
}

.social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    transition: all 0.3s;
}

.social a:hover {
    background-color: var(--primary-color);
    color: white;
}

.about-section {
    padding: 150px 5% 100px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.terminal-container {
    max-width: 800px;
    width: 100%;
    background-color: #2d2f3b;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.terminal-header {
    background-color: #3e4151;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.terminal-buttons {
    display: flex;
    gap: 8px;
}

.terminal-button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-button.close { background-color: #ff5f57; }
.terminal-button.minimize { background-color: #ffbd2e; }
.terminal-button.maximize { background-color: #28ca42; }

.terminal-title {
    color: #a0a0a0;
    font-size: 0.9rem;
}

.terminal-body {
    padding: 30px;
    background-color: #1e1f29;
    color: #e0e0e0;
    font-family: 'Courier New', monospace;
    min-height: 300px;
}

.terminal-intro {
    color: #4ec9b0;
    margin-bottom: 20px;
}

.terminal-command {
    color: #dcdcaa;
    margin-bottom: 15px;
}

.terminal-output {
    color: #ce9178;
    line-height: 1.8;
}

.work-section {
    padding: 150px 5% 100px;
    min-height: 100vh;
}

.work-header {
    text-align: center;
    margin-bottom: 60px;
}

.work-header h1 {
    font-size: 3rem;
    font-weight: 700;
}

.timeline-container {
    max-width: 1000px;
    margin: 0 auto;
}

.timeline-wrapper {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
}

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

.work-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    width: 300px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    cursor: pointer;
}

.work-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.work-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
}

.company-logo {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-color);
    padding: 10px;
}

.company-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.company-info h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

.company-info h4 {
    font-size: 0.95rem;
    color: #666;
}

.expand-icon {
    color: var(--primary-color);
}

.timeline-dot {
    width: 12px;
    height: 12px;
    background-color: var(--primary-color);
    border-radius: 50%;
}

.timeline-date {
    font-size: 0.9rem;
    color: #666;
}

.accordion-section {
    padding: 150px 5% 100px;
    min-height: 100vh;
}

.accordion-header {
    text-align: center;
    margin-bottom: 60px;
}

.accordion-header h2 {
    font-size: 3rem;
    font-weight: 700;
}

.accordion-card {
    max-width: 900px;
    margin: 0 auto 20px;
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.accordion-card-header {
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.accordion-card-header:hover {
    background-color: #f9f9f9;
}

.institution-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.institution-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.institution-info h3 {
    font-size: 1.3rem;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.date-range {
    color: #666;
}

.accordion-icon {
    color: var(--primary-color);
    transition: transform 0.3s;
}

.accordion-card.active .accordion-icon {
    transform: rotate(45deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 30px;
}

.accordion-card.active .accordion-content {
    max-height: 1000px;
    padding: 0 30px 30px;
}

.accordion-content .location {
    color: #666;
    font-style: italic;
}

.accordion-content .degree {
    font-weight: 600;
    margin: 10px 0 20px;
}

.accordion-content h4 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.accordion-content ul {
    list-style-position: inside;
    color: #555;
    line-height: 1.8;
}

.certifications {
    padding: 150px 5% 100px;
    min-height: 100vh;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h1 {
    font-size: 3rem;
    font-weight: 700;
}

.certifications-carousel {
    max-width: 1200px;
    margin: 0 auto;
}

.certifications-track {
    display: flex;
    justify-content: center;
    min-height: 500px;
    position: relative;
}

.certification-card {
    position: absolute;
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 40px;
    width: 350px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.5s;
    opacity: 0;
    transform: scale(0.8);
}

.certification-card.active {
    opacity: 1;
    transform: scale(1);
    z-index: 10;
}

.cert-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin: 0 auto 20px;
}

.certification-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.cert-issuer {
    color: #666;
    margin-bottom: 5px;
}

.cert-date {
    color: #999;
    margin-bottom: 20px;
}

.view-credential {
    display: inline-block;
    padding: 10px 25px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
}

.view-credential:hover {
    background-color: #5a4dc4;
}

.carousel-navigation {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.nav-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ddd;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.nav-dot.active {
    background-color: var(--primary-color);
    width: 30px;
    border-radius: 5px;
}

.projects-wrapper {
    padding: 150px 5% 100px;
    min-height: 100vh;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
}

.project-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 50px;
}

.tab-button {
    padding: 12px 30px;
    border-radius: 25px;
    border: 2px solid var(--border-color);
    background-color: transparent;
    color: var(--text-color);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-button.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.project-card.hidden {
    display: none;
}

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

.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-card h3 {
    font-size: 1.2rem;
    padding: 20px 20px 10px;
}

.project-card p {
    padding: 0 20px;
    color: #666;
    line-height: 1.6;
}

.project-card .view-button {
    display: inline-block;
    margin: 20px;
    padding: 10px 25px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
}

.footer-cv-wrapper {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 50;
}

.cv-floating-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s;
}

.cv-floating-button:hover {
    transform: translateY(-3px);
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 200;
    display: none;
}

.popup-overlay.active {
    display: block;
}

.contact-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    z-index: 201;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s;
    max-width: 600px;
    width: 90%;
}

.contact-popup.active {
    opacity: 1;
    pointer-events: all;
    transform: translate(-50%, -50%) scale(1);
}

.close-popup {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px;
    border-radius: 12px;
    background-color: var(--bg-color);
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s;
}

.contact-card:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-5px);
}

.contact-card i {
    font-size: 2rem;
    margin-bottom: 10px;
}

.contact-card span {
    font-weight: 600;
}

.contact-card p {
    font-size: 0.85rem;
    opacity: 0.8;
}

.chat-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 100;
}

.chat-pulse-ring {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-color);
    opacity: 0.3;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.2); opacity: 0.1; }
}

.chat-hint {
    position: absolute;
    bottom: 70px;
    right: 0;
    background-color: white;
    padding: 10px 15px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 8px;
    font-size: 0.9rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.chat-bubble {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s;
}

.chat-bubble:hover {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .navlinks {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--card-bg);
        flex-direction: column;
        padding: 50px 0;
        transition: left 0.3s;
    }

    .navlinks.active {
        left: 0;
    }

    .togglebtn {
        display: flex;
    }

    .hero-text {
        flex-direction: column;
        text-align: center;
    }

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

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

    .timeline-wrapper {
        flex-direction: column;
    }
}

/* === THEME ICON SWITCH === */
.theme-label img {
    width: 22px;
    height: 22px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.moon-icon {
    display: none;
}

body.dark-mode {
    --bg-color: #121212;
    --text-color: #f0f0f0;
    --card-bg: #1e1e1e;
    --border-color: #333;
    --primary-color: #8a7cf3;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* Adjust button and icon contrasts in dark mode */
body.dark-mode .btn {
    border-color: var(--text-color);
    color: var(--text-color);
    background-color: transparent;
}

body.dark-mode .btn.active {
    background-color: var(--primary-color);
    color: white;
}

body.dark-mode .social a {
    border-color: #444;
    color: var(--text-color);
}

body.dark-mode .social a:hover {
    background-color: var(--primary-color);
    color: #fff;
}

body.dark-mode header {
    background-color: rgba(18, 18, 18, 0.9);
}
/* Align Contact button with Download CV */
.btn-group {
    display: flex;
    align-items: center; /* Ensures vertical alignment */
    gap: 1rem;
}

/* Adjust the button-with-eye wrapper to keep height consistent */
.btn-with-eye {
    display: flex;
    align-items: center;
    gap: 8px;
}
.btn-group .btn {
    min-width: 150px;
    text-align: center;
}
