:root {
    --bg-color: #0f172a;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-color: #38bdf8;
    --accent-hover: #0ea5e9;
    --card-bg: #1e293b;
    --card-hover: #334155;
    --timeline-line: #334155;
    --font-main: 'Inter', sans-serif;
    --transition-speed: 0.3s;
}

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

.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
}

/* Header & Nav (Sidebar) */
.header {
    width: 80px;
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: transparent;
    display: flex;
    justify-content: center;
    align-items: center; /* Center vertically */
    padding-top: 0;
}

.navbar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    position: relative;
    width: 100%;
}

.nav-line {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: calc(60vh - 40px); /* Height of nav-links minus one item height (approx) to connect centers */
    width: 1px;
    background-color: var(--card-hover);
    z-index: 0;
    bottom: auto;
}

.nav-progress {
    position: absolute;
    top: calc(50% - (60vh - 40px) / 2); /* Start at top of nav-line */
    width: 1px;
    background-color: var(--accent-color);
    z-index: 0;
    height: 0; /* JS will update this */
    transition: height 0.3s ease-out;
}

/* Logo removed */

.nav-links {
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Evenly space items */
    height: 60vh; /* Fixed relative height */
    gap: 0;
    list-style: none;
    padding-bottom: 0;
    z-index: 1;
    margin: 0;
}

.nav-links li {
    padding: 0;
}

.nav-links a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-speed);
    position: relative;
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    
    /* Vertical Box Style */
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    padding: 20px 8px;
    border: 1px solid var(--card-hover);
    border-radius: 8px;
    background-color: var(--bg-color); /* Hide line behind */
    width: 40px; /* Fixed width for uniformity */
    text-align: center;
}

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

.nav-links a.active {
    background-color: var(--accent-color);
    color: var(--bg-color); /* Dark text on bright bg */
    border-color: var(--accent-color);
    font-weight: 700;
}

/* Remove old active indicator */
.nav-links a.active::after {
    display: none;
}

main {
    flex: 1;
    padding-left: 80px; /* Increase gap between sidebar and content */
    max-width: 1100px;
}

/* Sections General */
.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 40px;
    color: var(--text-primary);
    border-left: 4px solid var(--accent-color);
    padding-left: 15px;
}

/* Hero Section */
.hero-section {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 40px;
    gap: 40px;
}

.hero-content {
    max-width: 600px;
    flex: 1;
}

.hero-image-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--accent-color);
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.2);
    transition: transform var(--transition-speed);
}

.hero-image:hover {
    transform: scale(1.02);
    box-shadow: 0 0 40px rgba(56, 189, 248, 0.4);
}

.greeting {
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.name {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.role {
    font-size: 2rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

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

.cta-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.hero-contact-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.hero-contact-links .contact-link {
    padding: 10px 20px;
    font-size: 0.95rem;
}

.btn {
    padding: 12px 28px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-speed);
}

.btn.primary {
    background-color: var(--accent-color);
    color: #0f172a;
}

.btn.primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

.btn.secondary {
    border: 1px solid var(--text-secondary);
    color: var(--text-secondary);
}

.btn.secondary:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
    transform: translateY(-2px);
}

/* Skills Grid */
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.skill-tag {
    background-color: var(--card-bg);
    color: var(--accent-color);
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    border: 1px solid rgba(56, 189, 248, 0.1);
    transition: all var(--transition-speed);
}

.skill-tag:hover {
    background-color: rgba(56, 189, 248, 0.1);
    transform: translateY(-2px);
}

/* Timeline / Experience */
.timeline {
    position: relative;
    max-width: 800px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--timeline-line);
}

.experience-item {
    padding-left: 30px;
    margin-bottom: 50px;
    position: relative;
}

.experience-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 5px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--accent-color);
    border: 2px solid var(--bg-color);
}

.exp-header {
    margin-bottom: 10px;
}

.exp-role {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.exp-company {
    color: var(--accent-color);
    font-weight: 500;
}

.exp-period {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    display: block;
}

.exp-desc {
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.exp-achievements {
    list-style-type: disc;
    padding-left: 20px;
    color: var(--text-secondary);
}

.exp-achievements li {
    margin-bottom: 5px;
}

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

.project-card {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    display: flex;
    flex-direction: column;
}

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

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.project-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
}

.project-role {
    font-size: 0.8rem;
    background-color: rgba(56, 189, 248, 0.1);
    color: var(--accent-color);
    padding: 4px 10px;
    border-radius: 4px;
    white-space: nowrap;
}

.project-desc {
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
}

.tech-pill {
    font-size: 0.8rem;
    color: var(--text-secondary);
    background-color: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 4px;
}

/* Education */
.education-item {
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
}
.edu-school {
    font-weight: 600;
    color: var(--accent-color);
}
.edu-degree {
    color: var(--text-primary);
}
.edu-awards {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Contact Section */
.contact-section {
    text-align: left;
    max-width: 800px;
    margin: 0;
}

.contact-text {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.contact-links {
    display: flex;
    justify-content: flex-start;
    gap: 20px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background-color: var(--card-bg);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all var(--transition-speed);
    border: 1px solid transparent;
}

.contact-link:hover {
    background-color: var(--card-hover);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    color: var(--accent-color);
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 0;
    color: var(--text-secondary);
    margin-top: 40px;
    border-top: 1px solid var(--card-bg);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.fade-in {
    animation: fadeIn 1s ease-out forwards;
}

.slide-up {
    opacity: 0; /* JS will trigger this */
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.slide-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 900px) {
    .app-container {
        flex-direction: column;
        padding: 0 15px;
    }

    .header {
        width: 100%;
        height: auto;
        position: fixed; /* Stick to top on mobile for better UX */
        top: 0;
        left: 0;
        background-color: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(10px);
        padding: 15px 0;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        display: flex; /* Ensure flex is set */
        justify-content: center; /* Center horizontally */
        align-items: center;
    }

    .nav-line, .nav-progress {
        display: none; /* Hide vertical lines on mobile */
    }

    .navbar {
        flex-direction: row;
        justify-content: center;
        width: 100%;
        height: auto;
    }

    .nav-links {
        flex-direction: row;
        writing-mode: horizontal-tb;
        transform: none;
        gap: 10px;
        padding-bottom: 0;
        height: auto; /* Reset height */
    }

    .nav-links a {
        writing-mode: horizontal-tb;
        transform: none;
        padding: 8px 16px;
        width: auto;
        font-size: 0.85rem;
        letter-spacing: 1px;
        background-color: transparent;
        border: none;
    }

    .nav-links a.active {
        background-color: rgba(56, 189, 248, 0.1);
        color: var(--accent-color);
        border-radius: 6px;
    }

    main {
        padding-left: 0;
        padding-top: 80px; /* Space for fixed header */
    }

    .name { font-size: 2.5rem; }
    
    .timeline::before { left: 0; }
    .experience-item { padding-left: 20px; }
    
    .hero-section {
        flex-direction: column-reverse;
        text-align: center;
        justify-content: center;
        padding-top: 60px;
        min-height: auto; /* Allow auto height on mobile */
        margin-bottom: 60px;
    }

    .hero-content {
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .bio {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-image {
        width: 200px; /* Slightly smaller on mobile */
        height: 200px;
        margin-bottom: 20px;
    }
    
    .cta-buttons {
        justify-content: center;
    }

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