/* Modern Reset & Base Styles */
:root {
    --bg-color: #0F172A;
    /* Slate 900 */
    --surface-color: #1E293B;
    /* Slate 800 */
    --surface-hover: #334155;
    /* Slate 700 */
    --text-primary: #F1F5F9;
    /* Slate 100 */
    --text-secondary: #94A3B8;
    /* Slate 400 */
    --accent-color: #38BDF8;
    /* Sky 400 */
    --accent-glow: rgba(56, 189, 248, 0.3);
    --gold: #FCD34D;
    /* Amber 300 */

    --font-main: 'Outfit', sans-serif;
    --font-heading: 'Outfit', sans-serif;

    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    --container-width: 1200px;
    --header-height: 80px;

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
}

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

html {
    scroll-behavior: smooth;
}

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

main {
    transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
    opacity: 1;
    transform: translateY(0);
}

main.fade-out {
    opacity: 0;
    transform: translateY(10px);
    /* Subtle shift down for exit */
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

h1 {
    font-size: 3.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Utilities */
.highlight {
    color: var(--accent-color);
    position: relative;
    display: inline-block;
}

.section {
    padding: 6rem 0;
}

.section-title {
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
}

/* Header & Nav */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
}

.navbar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -1px;
    color: var(--text-primary);
}

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

.nav-link {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.95rem;
    cursor: pointer;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-color);
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 1.5rem;
}

.lang-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.lang-btn:hover {
    color: var(--text-primary);
}

.lang-btn.active {
    color: var(--accent-color);
}

.divider {
    color: rgba(255, 255, 255, 0.1);
}

.btn-primary {
    background: var(--accent-color);
    color: var(--bg-color);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    display: inline-block;
    transition: var(--transition-medium);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-outline {
    border: 1px solid var(--text-secondary);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    display: inline-block;
}

.btn-outline:hover {
    border-color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

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

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: var(--header-height);
    overflow: hidden;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.hero-text {
    flex: 1;
    max-width: 600px;
    z-index: 2;
}

.greeting {
    display: block;
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.hero-description {
    font-size: 1.1rem;
    max-width: 90%;
    margin-bottom: 2.5rem;
}

.hero-btns {
    display: flex;
    gap: 1rem;
}

.hero-visual {
    flex: 1;
    height: 500px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-img-container {
    width: 350px;
    height: 350px;
    position: relative;
    z-index: 1;
    border-radius: 50%;
    /* Perfect circle */
    padding: 10px;
    /* Space for the border gap */
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.15);
    /* Subtle ambient glow */
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--surface-color);
    /* Creates a gap effect with container padding */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    /* Deep shadow */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-img:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 40px rgba(56, 189, 248, 0.2);
}

/* Abstract Gradient Sphere as a backing glow now */
.gradient-sphere {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle at 30% 30%, var(--accent-color), transparent 60%),
        radial-gradient(circle at 70% 70%, #8B5CF6, transparent 60%);
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.2;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    animation: pulse 6s ease-in-out infinite alternate;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.2;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.4;
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.7;
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--text-secondary);
    border-radius: 15px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--text-secondary);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 1.5s infinite;
}

@keyframes scroll {
    0% {
        transform: translate(-50%, 0);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, 15px);
        opacity: 0;
    }
}

/* About Grid */
.about-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.about-card {
    background: var(--surface-color);
    padding: 2.5rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-medium);
}

.about-card:hover {
    transform: translateY(-5px);
    border-color: rgba(56, 189, 248, 0.2);
}

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

/* Timeline */
.timeline {
    position: relative;
    border-left: 2px solid var(--surface-hover);
    padding-left: 1.5rem;
    margin-top: 1rem;
}

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

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.95rem;
    top: 0.4rem;
    width: 12px;
    height: 12px;
    background: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.2);
}

.year {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.timeline-item h4 {
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}

/* Tags */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tech-tag {
    background: var(--surface-hover);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.tech-tag:hover {
    background: var(--accent-color);
    color: var(--bg-color);
}

/* Experience Cards */
.experience-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.experience-card {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--accent-color);
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.exp-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.company {
    color: var(--text-primary);
    font-weight: 500;
}

.date {
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: 600;
}

.exp-desc {
    margin: 0;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    background: var(--surface-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition-medium);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

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

.project-image {
    height: 200px;
    background: var(--surface-hover);
    position: relative;
    overflow: hidden;
}

.img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--surface-hover), #2a384b);
}

.project-content {
    padding: 2rem;
}

.project-content h3 {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
}

.project-tags {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.project-tags span {
    font-size: 0.8rem;
    color: var(--accent-color);
    background: rgba(56, 189, 248, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
}

.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.btn-link:hover {
    color: var(--accent-color);
    gap: 0.75rem;
}

/* Contact Section */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    background: var(--surface-color);
    padding: 4rem;
    border-radius: var(--radius-lg);
}

.contact-text h2 {
    margin-bottom: 1.5rem;
}

.contact-info {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.contact-item i {
    color: var(--accent-color);
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
}

.contact-item:hover {
    color: var(--text-primary);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--bg-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
}

/* Footer */
footer {
    padding: 3rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.social-links a {
    color: var(--text-secondary);
    font-size: 1.25rem;
}

.social-links a:hover {
    color: var(--text-primary);
}

/* Responsive */
@media (max-width: 968px) {
    h1 {
        font-size: 2.5rem;
    }

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

    .hero-text {
        margin-top: 2rem;
    }

    .hero-btns {
        justify-content: center;
    }

    .hero-visual {
        height: 350px;
    }

    .profile-img-container {
        width: 280px;
        height: 280px;
        margin: 0 auto;
    }

    .gradient-sphere {
        width: 300px;
        height: 300px;
    }

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

    .contact-container {
        grid-template-columns: 1fr;
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        z-index: 1002;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 70%;
        background: var(--surface-color);
        flex-direction: column;
        justify-content: center;
        transition: 0.3s ease;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .nav-links.active {
        right: 0;
    }

    .lang-switch {
        margin-top: 1rem;
        border-left: none;
        padding-left: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: 1rem;
    }
}