/*
==========================================================================
    1.  GLOBAL STYLES, VARIABLES & DESIGN SYSTEM
==========================================================================
*/
:root {
    /* Color Palette */
    --bg-dark: #120c18;
    --primary-purple: #9d4edd;
    --light-purple: #c77dff;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.15);
    --text-light: #f4f4f4;
    --text-muted: #a0a0a0;

    /* Typography */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Lato', sans-serif;
    --fs-base: 1rem;
    --lh-base: 1.7;

    /* Spacing System */
    --space-xs: 0.5rem;   /* 8px */
    --space-s: 1rem;      /* 16px */
    --space-m: 1.5rem;    /* 24px */
    --space-l: 2.5rem;    /* 40px */
    --space-xl: 3rem;     /* 64px */
    --space-xxl: 4rem;    /* 48px */
}

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

html {
    scroll-behavior: smooth;
    font-size: var(--fs-base);
}

body {
    font-family: var(--font-body);
    line-height: var(--lh-base);
    background-color: var(--bg-dark);
    color: var(--text-light);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(157, 78, 221, 0.15), transparent 35%),
        radial-gradient(circle at 85% 30%, rgba(157, 78, 221, 0.1), transparent 40%);
    background-attachment: fixed;
}

.container {
    max-width: 1100px;
    margin-inline: auto;
    padding-inline: var(--space-m);
}

/*
==========================================================================
    2.  LAYOUT & RHYTHM (Universal Rules)
==========================================================================
*/
section {
    padding-block: var(--space-xxl);
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 600;
    text-align: center;
    color: var(--text-light);
    margin-bottom: var(--space-xl);
}

/*
==========================================================================
    3.  HEADER & NAVIGATION
==========================================================================
*/
header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    background: rgba(18, 12, 24, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-purple);
    text-decoration: none;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: var(--space-l);
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.3s ease;
    position: relative;
    padding-bottom: var(--space-xs);
}

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

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

.nav-links a:hover::after { width: 100%; }

/*
==========================================================================
    4.  SECTION: HERO
==========================================================================
*/
#hero {
    min-height: 95vh;
    display: grid;
    place-content: center;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xl);
}

.hero-image-container {
    width: 320px;
    height: 320px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 5px solid var(--primary-purple);
    box-shadow: 0 0 35px rgba(157, 78, 221, 0.5);
}

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

.hero-text {
    text-align: left;
    max-width: 550px;
}

.hero-text h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-s);
}

.hero-text p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: var(--space-l);
}

.social-links {
    display: flex;
    gap: var(--space-m);
}

.social-links a {
    color: var(--text-muted);
    font-size: 1.5rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

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

/*
==========================================================================
    5.  REUSABLE COMPONENTS: CARDS
==========================================================================
*/
.card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: var(--space-l); /* Consistent card padding */
}

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

#about .card, #education .card {
    max-width: 800px;
    margin-inline: auto;
}

#education .institution {
    font-size: 1.1rem;
    color: var(--primary-purple);
    font-weight: bold;
}

#education .date {
    color: var(--text-muted);
    margin-top: var(--space-xs);
    margin-bottom: var(--space-s);
}

/*
==========================================================================
    6.  SECTION: SKILLS
==========================================================================
*/
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-m);
}

.skill-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: var(--space-m);
    text-align: center;
    transition: background-color 0.3s, transform 0.3s;
}

.skill-card:hover {
    background-color: rgba(157, 78, 221, 0.2);
    transform: translateY(-5px);
}

.skill-card h3 {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: 1.1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-s);
}

.skill-card i {
    font-size: 2rem;
    color: var(--primary-purple);
}

/*
==========================================================================
    7.  SECTION: EXPERIENCE (TIMELINE)
==========================================================================
*/
.timeline {
    position: relative;
    margin-inline: auto;
}

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

.timeline-item {
    padding: var(--space-s) var(--space-xl);
    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(--bg-dark);
    border: 3px solid var(--primary-purple);
    top: calc(var(--space-s) + var(--space-l)); 
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(odd) .timeline-dot { right: calc(var(--space-xl) - 8px); }
.timeline-item:nth-child(even) .timeline-dot { left: calc(var(--space-xl) - 8px); }

.timeline-content h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--light-purple);
}

.timeline-content .company {
    color: var(--primary-purple);
    font-weight: 400;
}

.timeline-content .date {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: var(--space-s);
}

.timeline-content ul {
    list-style: none;
    padding-left: 0;
}

.timeline-content ul li {
    margin-bottom: var(--space-xs);
    position: relative;
    padding-left: var(--space-m);
}

.timeline-content ul li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--primary-purple);
    font-weight: bold;
    font-size: 1.2rem;
    line-height: 1;
}

/*
==========================================================================
    8.  SECTION: CONTACT & FOOTER
==========================================================================
*/
.contact-content {
    max-width: 800px;
    margin-inline: auto;
    text-align: center;
}

.contact-content p {
    font-size: 1.1rem;
    max-width: 600px;
    margin-inline: auto;
    margin-bottom: var(--space-l);
}

.cta-button {
    display: inline-block;
    background: var(--primary-purple);
    color: var(--text-light);
    padding: var(--space-s) var(--space-l);
    border-radius: 50px;
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 600;
    transition: background-color 0.3s, transform 0.3s;
}

.cta-button:hover {
    background-color: var(--light-purple);
    transform: scale(1.05);
}

footer {
    padding-block: var(--space-xl) var(--space-l);
    text-align: center;
    border-top: 1px solid var(--glass-border);
}

footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/*
==========================================================================
    9.  ANIMATIONS
==========================================================================
*/
.fade-in, .fade-in-delay-1, .fade-in-delay-2, .fade-in-delay-3 {
    opacity: 0;
}

.fade-in { animation: fadeIn 1s ease-in-out forwards; }
.fade-in-delay-1 { animation: fadeIn 1s 0.3s ease-in-out forwards; }
.fade-in-delay-2 { animation: fadeIn 1s 0.6s ease-in-out forwards; }
.fade-in-delay-3 { animation: fadeIn 1s 0.9s ease-in-out forwards; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.reveal {
    position: relative;
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.active {
    transform: translateY(0);
    opacity: 1;
}

/*
==========================================================================
    10. RESPONSIVE DESIGN
==========================================================================
*/
@media (max-width: 900px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
    }
    .hero-text { text-align: center; }
    .hero-image-container {
        width: 250px;
        height: 250px;
    }
    .hero-text h1 { font-size: 3rem; }
}

@media (max-width: 768px) {
    :root {
        --fs-base: 0.95rem;
        --space-xl: 2rem;
        --space-xxl: 3rem;
    }

    .section-title { font-size: 2rem; }
    .nav-links { display: none; } 
    
    .hero-image-container {
        width: 200px;
        height: 200px;
    }
    .hero-text h1 { font-size: 2.5rem; }
    .hero-text p { font-size: 1.1rem; }

    .timeline::after { left: 20px; }
    .timeline-item { 
        width: 100%; 
        padding-inline: var(--space-m); 
        padding-left: var(--space-xl);
    }
    .timeline-item:nth-child(even) { left: 0; }
    .timeline-dot { left: 12px; }
    .timeline-item:nth-child(odd) .timeline-dot,
    .timeline-item:nth-child(even) .timeline-dot {
        right: auto;
        left: 12px;
        top: calc(var(--space-s) + var(--space-l));
    }

    .social-links {
        display: flex;
        justify-content: center;
        gap: 20px; 
    }
}