:root {
    --bg-color: #0f172a;
    --bg-secondary: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-color: #38bdf8;
    --accent-glow: rgba(56, 189, 248, 0.5);
    --gradient-1: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Space Grotesk', sans-serif;

    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

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

/* Custom Cursor */
.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-dot {
    width: 5px;
    height: 5px;
    background-color: var(--text-primary);
}

.cursor-outline {
    width: 30px;
    height: 30px;
    border: 1px solid var(--text-primary);
    /* Changed to use text-primary for visibility */
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}




/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 100px 0;
}

/* Ensure anchors don't hide under fixed navbar */
section {
    scroll-margin-top: 100px;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: var(--text-primary);
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60%;
    height: 4px;
    background: var(--gradient-1);
    border-radius: 2px;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 0;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: var(--transition);
}

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

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

.logo span {
    color: var(--accent-color);
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--accent-color);
    transition: var(--transition);
}

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

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    margin: 5px 0;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow), transparent 70%);
    opacity: 0.2;
    z-index: -1;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
}

.greeting {
    font-size: 1.2rem;
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 1rem;
    display: block;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.highlight {
    background: var(--gradient-1);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.typing-text {
    font-size: 2rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    height: 3rem;
    /* fix height jump */
}

.bio {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 540px;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
}

.btn {
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    border: none;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--accent-glow);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--accent-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(56, 189, 248, 0.1);
    transform: translateY(-3px);
}

/* Hero Visual Animation */
.blob {
    width: 400px;
    height: 400px;
    background: var(--gradient-1);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: blob-bounce 10s infinite ease-in-out;
    filter: blur(40px);
    opacity: 0.6;
    margin: 0 auto;
}

@keyframes blob-bounce {
    0% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
        transform: rotate(0deg);
    }

    34% {
        border-radius: 70% 30% 30% 70% / 60% 40% 60% 40%;
    }

    67% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }

    100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
        transform: rotate(360deg);
    }
}

/* Education Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

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

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--accent-color);
    border: 4px solid var(--bg-color);
    top: 25px;
    border-radius: 50%;
    z-index: 10;
}

.timeline-item:nth-child(even)::after {
    left: -10px;
}

.timeline-content {
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.timeline-content:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

.date {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent-color);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.timeline-content h3 {
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

.timeline-content h4 {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 1rem;
}

.degree-badge {
    margin-top: 1rem;
    display: inline-block;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

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

.skill-card {
    background: var(--bg-secondary);
    padding: 2.5rem;
    border-radius: 16px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-1);
    transform: scaleX(0);
    transition: var(--transition);
}

.skill-card:hover {
    transform: translateY(-10px);
}

.skill-card:hover::before {
    transform: scaleX(1);
}

.skill-card i {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.skill-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.skill-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Contact Section */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    background: var(--bg-secondary);
    padding: 4rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--accent-color);
    background: rgba(56, 189, 248, 0.1);
    padding: 1rem;
    border-radius: 50%;
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
}

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

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.contact-form button {
    width: 100%;
}

/* Hero Socials */
.hero-socials {
    margin-top: 2rem;
    display: flex;
    gap: 1.5rem;
}

.hero-socials a {
    color: var(--text-secondary);
    font-size: 1.5rem;
    transition: var(--transition);
}

.hero-socials a:hover {
    color: var(--accent-color);
    transform: translateY(-3px);
}

/* Contact Socials */
.social-links-contact {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.social-btn:hover {
    background: rgba(56, 189, 248, 0.1);
    border-color: var(--accent-color);
    transform: translateY(-3px);
}

.social-btn i {
    font-size: 1.2rem;
}

/* Footer */
footer {
    padding: 2rem 0;
    text-align: center;
    color: var(--text-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Responsive */
@media (max-width: 768px) {
    .hamburger {
        display: block;
        z-index: 1001;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: var(--bg-secondary);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
        transition: 0.4s ease-in-out;
    }

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

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .hero-text {
        order: 2;
    }

    .hero-visual {
        order: 1;
    }

    .blob {
        width: 300px;
        height: 300px;
    }

    .bio {
        margin: 0 auto 2.5rem;
    }

    .cta-buttons {
        justify-content: center;
    }

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

    /* Timeline Responsive */
    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item:nth-child(even) {
        left: 0;
    }

    .timeline-item::after {
        left: 21px;
    }

    .timeline-item:nth-child(even)::after {
        left: 21px;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        padding: 2rem;
        gap: 3rem;
        /* Reduced gap from implicit 4rem */
    }

    .social-links-contact {
        justify-content: center;
    }

    .skill-card:hover {
        transform: translateY(-5px);
    }

    /* Reduce anchor offset on smaller screens */
    section {
        scroll-margin-top: 80px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .blob {
        width: 250px;
        height: 250px;
    }

    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .contact-wrapper {
        padding: 1.5rem;
        /* Further reduced padding */
        gap: 2rem;
        /* Further reduced gap */
    }

    /* Tighten anchor offset further for very small screens */
    section {
        scroll-margin-top: 70px;
    }
}

/* Optimize for touch devices */
@media (hover: none) and (pointer: coarse) {

    .cursor-dot,
    .cursor-outline {
        display: none;
    }

    * {
        cursor: auto !important;
    }
}