:root {
    --bg-color: #050508;
    --text-primary: #ffffff;
    --text-secondary: #a0a4ab;
    --accent-primary: #2563eb; /* Sapphire Blue */
    --accent-secondary: #0ea5e9; /* Tech Azure */
    --accent-gradient: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    --glass-bg: rgba(255, 255, 255, 0.02);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    --font-main: 'Outfit', sans-serif;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    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;
    position: relative;
}

/* Background animated blobs */
.blob-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at center, #0a0a0f 0%, #000000 100%);
}

.shape {
    position: absolute;
    filter: blur(80px);
    opacity: 0.3;
    border-radius: 50%;
    animation: float 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.shape-1 {
    width: 40vw;
    height: 40vw;
    background: var(--accent-primary);
    top: -10%;
    left: -10%;
}

.shape-2 {
    width: 50vw;
    height: 50vw;
    background: var(--accent-secondary);
    bottom: -20%;
    right: -10%;
    animation-delay: -5s;
}

.shape-3 {
    width: 30vw;
    height: 30vw;
    background: #0284c7; /* Deep Blue */
    top: 40%;
    left: 40%;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0, 0) scale(1); }
}

/* Glassmorphism utility */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2.5rem, 4vw + 1rem, 4.5rem);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    margin-bottom: 1rem;
}

p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin-bottom: 2rem;
}

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

.highlight {
    color: var(--accent-secondary);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-radius: 100px;
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(16px);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    padding: 0.8rem 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.03em;
}

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

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    opacity: 0.8;
}

.nav-links a:hover {
    opacity: 1;
    color: var(--accent-secondary);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 100px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: var(--font-main);
    font-size: 1rem;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.6);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    border-color: var(--text-primary);
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.05);
}

.btn-small {
    padding: 0.5rem 1.4rem;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.btn-small:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-large {
    padding: 1.2rem 3rem;
    font-size: 1.1rem;
}

.cta-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

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

section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 6rem;
    padding-bottom: 4rem;
}

/* Hero Section */
.hero {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}

.hero-content {
    flex: 1.2;
}

.hero-image {
    flex: 0.8;
    border-radius: 20px;
    padding: 1.5rem;
    position: relative;
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: var(--transition);
    background: rgba(15, 15, 20, 0.6);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.05);
}

.hero-image:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.code-editor {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    overflow-x: auto;
}

.editor-header {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

pre { margin: 0; line-height: 1.5; }
.keyword { color: #c678dd; }     /* purple */
.variable { color: #e5c07b; }    /* yellow */
.property { color: #61afef; }    /* blue */
.string { color: #98c379; }      /* green */
.number { color: #d19a66; }      /* orange */
.comment { color: #5c6370; font-style: italic; }

/* Section Title Utility */
.section-title {
    margin-bottom: 4rem;
    position: relative;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.underline {
    width: 60px;
    height: 4px;
    background: var(--accent-gradient);
    border-radius: 4px;
    margin-top: 10px;
}

/* Skills/About Section */
.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.skill-tag {
    padding: 0.8rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    font-weight: 500;
    transition: var(--transition);
}

.skill-tag:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* Timeline/Experience Section */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, transparent, var(--accent-secondary), var(--accent-primary), transparent);
    transform: translateX(-50%);
    opacity: 0.5;
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    width: 50%;
}

.timeline-item:nth-child(even) {
    margin-left: auto;
    padding-left: 2.5rem;
}

.timeline-item:nth-child(odd) {
    padding-right: 2.5rem;
    text-align: right;
}

.timeline-dot {
    position: absolute;
    top: 1.5rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 15px var(--accent-secondary);
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -8px;
}

.timeline-item:nth-child(odd) .timeline-dot {
    right: -8px;
}

.timeline-content {
    padding: 1.5rem;
    border-radius: 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    text-align: left;
}

.timeline-content:hover {
    transform: translateY(-5px);
    border-color: rgba(37, 99, 235, 0.4);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.timeline-year {
    display: inline-block;
    padding: 0.3rem 1rem;
    border-radius: 100px;
    background: rgba(37, 99, 235, 0.15);
    color: var(--accent-secondary);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.timeline-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.timeline-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0;
}

.timeline-list {
    margin-top: 1rem;
    padding-left: 1.2rem;
    list-style: none;
}

.timeline-list li {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    position: relative;
}

.timeline-list li::before {
    content: '▹';
    position: absolute;
    left: -1.2rem;
    color: var(--accent-secondary);
}

.timeline-list li span {
    color: rgba(255,255,255,0.4);
    font-size: 0.8rem;
    display: block;
}

/* Projects Section */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.project-card {
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    background: rgba(20, 20, 23, 0.5);
    border: 1px solid var(--glass-border);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.4);
    border-color: rgba(255,255,255,0.15);
}

.project-image {
    height: 180px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.project-info {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-info h3 {
    margin-bottom: 0.8rem;
    font-size: 1.4rem;
}

.project-info p {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex: 1;
}

/* Contact Section */
.contact-box {
    text-align: center;
    padding: 5rem 2rem;
    border-radius: 30px;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.contact-box::after {
    content: '';
    position: absolute;
    bottom: -50px; right: -50px; width: 200px; height: 200px;
    background: var(--accent-secondary);
    filter: blur(80px);
    opacity: 0.15;
    z-index: -1;
}

.contact-box h2 {
    font-size: clamp(2rem, 3.5vw, 3rem);
    margin-bottom: 1.5rem;
}

.contact-box p {
    margin: 0 auto 2.5rem;
    font-size: 1.2rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem 0;
    margin-top: 4rem;
    border-top: 1px solid var(--glass-border);
    color: var(--text-secondary);
}

.footer-contact {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.footer-contact a, .footer-contact span {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-contact a:hover {
    color: var(--accent-secondary);
}

.heart {
    color: var(--accent-primary);
    animation: pulse 1.5s infinite;
    display: inline-block;
}

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

/* Animations & Transitions */
.fade-in {
    opacity: 0;
    animation: fadeIn 1s forwards cubic-bezier(0.25, 1, 0.5, 1);
}

.fade-in-delayed {
    opacity: 0;
    animation: fadeIn 1s forwards cubic-bezier(0.25, 1, 0.5, 1) 0.3s;
}

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

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

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

/* Responsive Design */
@media (max-width: 900px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 10rem;
    }
    
    .cta-group {
        justify-content: center;
    }
    
    .hero-image {
        width: 100%;
        max-width: 500px;
    }
    
    .navbar {
        width: 95%;
        padding: 1rem 1.5rem;
    }
    
    .nav-links {
        display: none;
    }

    .timeline::before {
        left: 0;
    }

    .timeline-item {
        width: 100%;
        margin-bottom: 2rem;
    }

    .timeline-item:nth-child(even), 
    .timeline-item:nth-child(odd) {
        margin-left: 0;
        padding-left: 2rem;
        padding-right: 0;
        text-align: left;
    }

    .timeline-item:nth-child(even) .timeline-dot,
    .timeline-item:nth-child(odd) .timeline-dot {
        left: -8px;
        right: auto;
    }
}
