/* === ROOT VARIABLES === */
:root {
    /* Original design */
    /* --color-primary: #3b82f6;
    --color-primary-dark: #2563eb; */
    /* Slate Teal */
    /* --color-primary: #2A6F6D;
    --color-primary-dark: #214F4D;
    --color-accent: #E6B89C; */
    /* Muted Auberaine */
    /* --color-primary: #6C4A7B;
    --color-primary-dark: #52345A;
    --color-accent: #E3C567;  */
    /* Ocean Steel */
    --color-primary: #1F5F8B;
    --color-primary-dark: #153F59;
    --color-accent: #F59E0B;
    --color-background: #F9FAFB;
    --color-surface: #FFFFFF;
    --color-border: #e5e7eb;
    --color-text-primary: #1f2937;
    --color-text-secondary: #6b7280;
    /* Font Families & Shadows */
    --font-primary: 'Poppins', sans-serif;
    --font-code: 'Source Code Pro', monospace;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --border-radius: 8px;
    --transition-speed: 0.3s;
    /* Brand Colors for Skill Icons */
    --color-python: #3776AB;
    --color-sql: #4479A1;
    --color-ml: #f6911e;
    --color-viz: #E97627;
    --color-react: #61DAFB;
    --color-ux: #a259ff;
}

/* === GENERAL STYLES & ACCESSIBILITY === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}
body {
    font-family: var(--font-primary);
    background-color: var(--color-background);
    color: var(--color-text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}
/* Custom focus state for accessibility */
a:focus-visible, button:focus-visible, input:focus-visible {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.6);
    border-radius: var(--border-radius);
}
.container {
    width: 90%;
    max-width: 1120px;
    margin: 0 auto;
}
section {
    padding: 5rem 0;
}
.section-title {
    font-size: 2.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
}

/* === HEADER & NAVBAR === */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.73);
    backdrop-filter: blur(10px);
    transition: box-shadow var(--transition-speed) ease;
}
.header.scrolled {
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--color-border);
}
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}
/* .nav-logo{
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-primary);
    text-decoration: none;
} */
.nav-logo {
    height: inherit;
}
.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}
.nav-link {
    text-decoration: none;
    color: var(--color-text-secondary);
    font-weight: 500;
    position: relative;
    padding-bottom: 5px;
    transition: color var(--transition-speed) ease;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    transition: width var(--transition-speed) ease;
}
.nav-link:hover, .nav-link.active {
    color: var(--color-primary);
}
.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}
.hamburger {
    display: none;
    cursor: pointer;
}
.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--color-text-primary);
    transition: all var(--transition-speed) ease-in-out;
}

/* === HERO SECTION === */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 70px;
}
.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 3rem;
}
.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1rem;
}
.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
}
.hero-bio {
    margin-bottom: 2rem;
    max-width: 500px;
}
.hero-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
}
.cta-button {
    display: inline-block;
    background-color: var(--color-primary);
    color: var(--color-surface);
    padding: 12px 24px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-speed) ease;
}
.cta-button:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.hero-socials {
    display: flex;
    gap: 1.5rem;
}
.hero-socials a {
    font-size: 1.5rem;
    color: var(--color-text-secondary);
    transition: all var(--transition-speed) ease;
}
.hero-socials a:hover {
    color: var(--color-primary);
    transform: translateY(-2px);
}
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}
.hero-avatar-wrapper {
    position: relative;
    width: 300px;
    height: 300px;
}
.hero-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow-lg);
}
.tech-icon {
    position: absolute;
    width: 60px;
    height: 60px;
    background: var(--color-surface);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.8rem;
    color: var(--color-primary);
    box-shadow: var(--shadow-md);
    animation: orbit 10s linear infinite;
}
.tech-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--color-text-primary);
    color: var(--color-surface);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-speed) ease;
}
.tech-icon:hover::after {
    opacity: 1;
    visibility: visible;
    bottom: 120%;
}
.icon-1 { top: 0; left: 15%; animation-duration: 12s; }
.icon-2 { top: 60%; left: -5%; animation-duration: 8s; }
.icon-3 { top: 20%; right: -10%; animation-duration: 11s; }
.icon-4 { bottom: 0; right: 15%; animation-duration: 9s; }
@keyframes orbit {
    from { transform: rotate(0deg) translateX(40px) rotate(0deg); }
    to { transform: rotate(360deg) translateX(40px) rotate(-360deg); }
}

/* === ABOUT SECTION === */
.about-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: center;
}
.about-card, .stats-card {
    background: var(--color-surface);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
    min-height: -webkit-fill-available;
}
.stats-card {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
}
.stat-number {
    font-size: 2.5rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center; 
    color: var(--color-primary);
}
.stat-number span{
    font-size: 1.75rem;
    font-weight: 450;
    color: var(--color-text-secondary);
}
.stat-label {
    color: var(--color-text-secondary);
}
.sec-txt {
    color: var(--color-text-secondary);
}

/* === SKILLS SECTION === */
.skills {
    background-color: var(--color-surface);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}
.skill-card {
    text-align: center;
    padding: 2rem 1.5rem;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    transition: all var(--transition-speed) ease;
    position: relative;
    overflow: hidden;
    background-color: var(--color-surface);
}
.interactive-skill {
    cursor: pointer;
}
.skill-content-front, .skill-content-back {
    transition: opacity var(--transition-speed) ease, transform var(--transition-speed) ease;
}
.skill-content-front i {
    font-size: 2.5rem;
    color: var(--color-text-secondary);
    margin-bottom: 1rem;
    transition: color var(--transition-speed) ease;
}
.skill-content-front h3 {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--color-text-primary);
}
.skill-content-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--color-surface);
    opacity: 0;
    z-index: 2;
    transform: translateY(10px);
}
.skill-content-back i, .skill-content-back svg {
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
    color: var(--color-surface);
    opacity: 0.8;
}
.skill-content-back p {
    font-size: 0.9rem;
    line-height: 1.5;
}
.skill-card::after { /* Gradient Overlay */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-text-primary);
    opacity: 0;
    transition: opacity var(--transition-speed) ease;
}
/* Skill Card Hover & Active States */
.interactive-skill:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}
.interactive-skill.is-active {
    transform: translateY(-2px) scale(0.98);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}
.interactive-skill:hover::after,
.skill-card.is-active::after {
    opacity: 1;
}
.interactive-skill:hover .skill-content-front,
.skill-card.is-active .skill-content-front {
    opacity: 0;
    transform: translateY(-10px);
}
.interactive-skill:hover .skill-content-back,
.skill-card.is-active .skill-content-back {
    opacity: 1;
    transform: translateY(0);
}
/* Skill Icon Color on Hover */
.skill-card:hover .fa-python { color: var(--color-python); }
.skill-card:hover .fa-database { color: var(--color-sql); }
.skill-card:hover .fa-brain { color: var(--color-ml); }
.skill-card:hover .fa-chart-bar { color: var(--color-viz); }
.skill-card:hover .fa-react { color: var(--color-react); }
.skill-card:hover .fa-pen-ruler { color: var(--color-ux); }

/* === EXPERIENCE TIMELINE === */
.timeline {
    position: relative;
    /* max-width: 1000px; */
    margin: 0 auto;
}
.timeline::after {
    content: '';
    position: absolute;
    width: 3px;
    background-color: var(--color-border);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1.5px;
}
.timeline-item {
    padding: 1rem 3rem;
    position: relative;
    width: 50%;
}
.timeline-item:nth-child(odd) {
    left: 0;
}
.timeline-item:nth-child(even) {
    left: 50%;
}
.timeline-dot {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: var(--color-background);
    border: 3px solid var(--color-primary);
    border-radius: 50%;
    top: 24px;
    z-index: 1;
}
.timeline-item:nth-child(odd) .timeline-dot {
    right: -8px;
}
.timeline-item:nth-child(even) .timeline-dot {
    left: -8px;
}
.timeline-content {
    padding: 1.5rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
}
.timeline-date {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}
.timeline-content ul {
    list-style-position: inside;
    color: var(--color-text-secondary);
}

/* === PROJECTS SECTION === */
.projects {
    background-color: var(--color-surface);
    border-top: 1px solid var(--color-border);
}
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}
.project-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all var(--transition-speed) ease;
    position: relative;
}
.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}
.project-image-wrapper {
    overflow: hidden;
    position: relative;
}
.project-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform var(--transition-speed) ease;
}
.project-card:hover img {
    transform: scale(1.05);
}
.project-image-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(29, 39, 55, 0.7), transparent);
    opacity: 0;
    transition: opacity var(--transition-speed) ease;
}
.project-card:hover .project-image-wrapper::after {
    opacity: 1;
}
.project-content {
    padding: 1.5rem;
}
.project-tags {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}
.project-tags span {
    background-color: #e0e7ff;
    color: var(--color-primary-dark);
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: var(--font-code);
}
.project-link {
    text-decoration: none;
    color: var(--color-primary);
    font-weight: 500;
}
.project-link i {
    transition: transform var(--transition-speed) ease;
}
.project-link:hover i {
    transform: translateX(4px);
}

/* === CONTACT SECTION === */
.contact-container {
    text-align: center;
    max-width: 600px;
}
.contact-location {
    color: var(--color-text-secondary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}
.contact-container > p {
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}
.contact-resume a {
    display: inline-block;
    margin-top: 1.5rem;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}
.contact-resume a:hover {
    color: var(--color-primary);
}


/* === FOOTER === */
.footer {
    background-color: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding: 2rem 0;
}
.footer-container {
    text-align: center;
}
.social-links {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}
.social-links a {
    color: var(--color-text-secondary);
    font-size: 1.5rem;
    transition: color var(--transition-speed) ease;
}
.social-links a:hover {
    color: var(--color-primary);
}
.footer p {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

/* === UTILITIES === */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 45px;
    height: 45px;
    background-color: var(--color-primary);
    color: var(--color-surface);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-speed) ease;
    z-index: 1000;
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* === ANIMATIONS === */
.animate-text {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.8s ease forwards;
}
.hero-title { animation-delay: 0.2s; }
.hero-subtitle { animation-delay: 0.4s; }
.hero-bio { animation-delay: 0.6s; }
.hero-actions { animation-delay: 0.8s; }
@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* === RESPONSIVE STYLES === */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-text {
        order: 2;
    }
    .hero-visual {
        order: 1;
        margin-bottom: 2rem;
    }
    .hero-bio {
        margin: 1.5rem auto 2rem;
    }
    .hero-actions {
        align-items: center;
    }
    .about-container {
        grid-template-columns: 1fr;
    }
    .stats-card {
        flex-direction: row;
        justify-content: space-around;
        padding: 2.5rem 0.75rem;
    }
    .stats-card > div {
        flex: 1;
    }
}
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--color-surface);
        width: 100%;
        text-align: center;
        transition: left var(--transition-speed) ease;
        box-shadow: var(--shadow-md);
        padding: 1rem 0;
    }
    .nav-menu.active {
        left: 0;
    }
    .hamburger {
        display: block;
    }
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    .hero-title {
        font-size: 2.8rem;
    }
    .section-title {
        font-size: 2rem;
    }
    .timeline::after {
        left: 30px;
    }
    .timeline-item {
        width: 100%;
        padding-left: 60px;
        padding-right: 15px;
    }
    .timeline-item:nth-child(even) {
        left: 0;
    }
    .timeline-dot {
        left: 22px !important;
    }
}