:root {
    /* Color Palette - Psychology: Trust, Professionalism, Calm */
    --primary-color: #0f172a;
    /* Slate 900 - Deep, professional dark */
    --secondary-color: #334155;
    /* Slate 700 - Softer dark for secondary elements */
    --accent-color: #0ea5e9;
    /* Sky 500 - Vibrant but calm trust color */
    --accent-hover: #0284c7;
    /* Sky 600 */
    --bg-color: #f8fafc;
    /* Slate 50 - Very light grey/white background, easier on eyes than pure white */
    --card-bg: #ffffff;
    --text-main: #1e293b;
    /* Slate 800 */
    --text-muted: #64748b;
    /* Slate 500 */
    --border-color: #e2e8f0;
    /* Slate 200 */

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    --font-family: 'Outfit', sans-serif;
}

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

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

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

/* Header */
.main-header {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    box-shadow: var(--shadow-sm);
}

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

.main-header nav ul {
    display: flex;
    gap: 2rem;
}

.main-header nav a {
    font-weight: 500;
    color: var(--secondary-color);
}

.main-header nav a:hover {
    color: var(--accent-color);
}

/* Sections General */
section {
    padding: 5rem 5%;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-align: center;
}

/* Login Overlay */
#login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-box {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    max-width: 400px;
    width: 90%;
}

.login-box h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.login-box input {
    width: 100%;
    padding: 0.8rem;
    margin: 1rem 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
}

.error-msg {
    color: #ef4444;
    font-size: 0.9rem;
    margin-top: 1rem;
    min-height: 1.5em;
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    position: relative;
    overflow: hidden;
    padding-top: 80px;
    /* Offset for header */
}

.profile-image-container {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 1.5rem auto;
    /* Centered with auto margins */
    background-color: var(--accent-color);
    border: 4px solid white;
    box-shadow: var(--shadow-md);
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    /* Shift focus to face */
}

.profile-placeholder {
    font-size: 3rem;
    color: white;
    font-weight: 700;
}

/* Contact Modal specific */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input,
.contact-form textarea {
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: var(--font-family);
}

.contact-form textarea {
    min-height: 120px;
    resize: vertical;
}


.hero-section h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.hero-section h2 {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

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

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    /* Centered buttons */
}

.btn {
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn:active {
    transform: scale(0.98);
}

.primary-btn {
    background-color: var(--accent-color);
    color: white;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4);
}

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

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

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

/* About Section */
.about-section {
    background-color: var(--card-bg);
}

.summary-text {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 2rem auto;
    text-align: center;
    color: var(--secondary-color);
}

.skills-preview {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.skill-tag {
    background-color: #f1f5f9;
    color: var(--secondary-color);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.certificates-list {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.certificates-list li {
    background-color: #f8fafc;
    border-left: 4px solid var(--accent-color);
    padding: 10px 15px;
    border-radius: 4px;
    box-shadow: var(--shadow-sm);
    font-size: 0.95rem;
    color: var(--secondary-color);
}


/* Timeline Section */
.timeline-section {
    background-color: var(--bg-color);
}

.timeline-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

/* The Line */
.timeline-container::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--border-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    border-radius: 2px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
    cursor: pointer;
    perspective: 1000px;
    margin-bottom: 2rem;
}

/* Circle */
.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--card-bg);
    border: 4px solid var(--accent-color);
    top: 25px;
    border-radius: 50%;
    z-index: 1;
    transition: all 0.3s ease;
}

.timeline-item.left {
    left: 0;
    text-align: right;
}

.timeline-item.right {
    left: 50%;
    text-align: left;
}

.timeline-item.right::after {
    left: -10px;
}

.timeline-content {
    padding: 20px 30px;
    background-color: var(--card-bg);
    position: relative;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s ease;
    border: 1px solid transparent;
}

.timeline-item:hover .timeline-content {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(14, 165, 233, 0.2);
}

.timeline-item:hover::after {
    background-color: var(--accent-color);
    transform: scale(1.2);
}

.timeline-date {
    font-weight: 600;
    color: var(--accent-color);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.timeline-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.2rem;
}

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

/* Project Badge within Timeline */
.project-badge {
    display: inline-block;
    background-color: #e0f2fe;
    color: #0369a1;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-top: 10px;
    font-weight: 600;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    background-color: var(--card-bg);
    margin: auto;
    padding: 0;
    width: 90%;
    max-width: 600px;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 20px;
    top: 15px;
    cursor: pointer;
    z-index: 10;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
}

.modal-header {
    padding: 2rem 2rem 1rem 2rem;
    border-bottom: 1px solid var(--border-color);
    background-color: #f8fafc;
    border-radius: 16px 16px 0 0;
}

.modal-header h3 {
    margin: 0;
    text-align: left;
    color: var(--primary-color);
}

.modal-header h4 {
    margin-top: 0.5rem;
    font-weight: 500;
    color: var(--accent-color);
}

.modal-body {
    padding: 2rem;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-section {
    margin-bottom: 1.5rem;
}

.modal-section h5 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 0.5rem;
}

.modal-section ul {
    list-style: disc;
    margin-left: 1.2rem;
}

.modal-section li {
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 3rem 5% 1rem 5%;
    text-align: center;
}

.contact-info {
    margin-bottom: 2rem;
}

.contact-info p {
    margin: 0.5rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.contact-info a {
    color: var(--accent-color);
}

.copyright {
    color: #64748b;
    font-size: 0.8rem;
}

/* Mobile Responsiveness */
@media screen and (max-width: 600px) {
    .timeline-container::after {
        left: 31px;
    }

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

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

    .timeline-item.left,
    .timeline-item.right {
        left: 0;
        text-align: left;
    }

    .main-header nav ul {
        display: none;
        /* simple hide for now, hamburger later if requested */
    }
}

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

.project-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-medium);
    border: 1px solid var(--border-color);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-color);
}

.project-card h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.project-card .project-context {
    font-size: 0.9rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-weight: 500;
}

.project-card p {
    color: var(--text-color);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-card .project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}


/* Admin Styles */
.admin-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tab-btn {
    padding: 10px 20px;
    background: transparent;
    border: 2px solid transparent;
    border-bottom: 2px solid var(--border-color);
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 600;
}

.tab-btn.active {
    border-bottom: 2px solid var(--accent-color);
    color: var(--accent-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.admin-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    max-width: 800px;
    margin: 0 auto;
}

.admin-list-item {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.admin-list-item input {
    flex-grow: 1;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.btn-delete {
    background: #fee2e2;
    color: #ef4444;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-delete:hover {
    background: #fecaca;
}

.admin-timeline-item {
    padding: 1rem;
    background: var(--bg-color);
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid var(--accent-color);
}

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

.admin-sub-item {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    padding-left: 20px;
    border-left: 2px solid #ddd;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
}

.btn-edit {
    background: #e0f2fe;
    color: #0284c7;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    margin-right: 5px;
}