/* ============================================
   Reset & Base Styles
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1300px;
    padding: 0 10px; /* smaller gutters for tighter layout */
    margin: 0 auto;
}


/* Layout: sidebar + main */
.layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 80px;
    align-items: start;
    padding-top: 40px;
}

.sidebar {
    position: sticky;
    top: 84px;
    align-self: start;
    max-height: calc(100vh - 72px);
    overflow: auto;
    padding-right: 8px;
}

.avatar-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.avatar-container img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(0,0,0,0.08);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .avatar-container img {
        width: 140px;
        height: 140px;
    }
}

.avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e6eefc 0%, #d6e6ff 100%);
    margin: 0 auto 1rem auto;
    border: 2px solid rgba(0,0,0,0.05);
}

.profile h1 {
    font-size: 1.15rem;
    text-align: left;
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
}

.profile .tagline {
    text-align: left;
    color: #0047AB;
    font-weight: 700;
    margin: 0.2rem 0;
    font-size: 0.95rem;
}

.small-intro {
    text-align: left;
    color: #555;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.sidebar-ctas {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.sidebar-section {
    background: transparent;
    padding: 0.75rem 0;
}

.sidebar-section h3 {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.sidebar-border {
    border-bottom: 1px solid #0047AB;
}

/* sidebar services */
.sidebar-services-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.2rem 0;
    font-size: 0.9rem;
}

.sidebar-services-list div {
    padding: 0.05rem 0;
    color: #444;
    line-height: 1.3;
}

.sidebar-services-list div:not(.service-item) {
    font-weight: 600;
    margin-top: 0.4rem;
    margin-bottom: 0.15rem;
    color: #1a1a1a;
}

.sidebar-services-list div:first-child {
    margin-top: 0;
}

.service-item {
    color: #555 !important;
    font-weight: 400 !important;
    padding-left: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.service-item i {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    font-size: 14px !important;
    color: #0047AB;
}

.service-item .service-icon {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    color: #0047AB;
}

.section-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    fill: #0047AB;
}

.skills-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.3rem 0.15rem;
}

.skills-list div {
    padding: 0.08rem 0;
    color: #444;
    font-size: 0.9rem;
    line-height: 1.3;
}

.skills-list div:not(.tech-item) {
    grid-column: 1 / -1;
    font-weight: 600;
    margin-top: 0.5rem;
    margin-bottom: 0.25rem;
    color: #1a1a1a;
}

.skills-list div:first-child {
    margin-top: 0;
}

.tech-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding-left: 0.3rem;
    font-weight: 400 !important;
    color: #555 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.tech-icon {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    fill: #0047AB;
}

.tech-item i[class*="devicon-"] {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    font-size: 14px !important;
    color: #0047AB;
}

.languages-list div {
    padding: 0.5rem 0;
    color: #666;
    font-size: 1rem;
    line-height: 1.5;
}

/* combined education & languages section */
.background-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    /* remove width constraint and centering so grid aligns left */
    max-width: none;
    margin: 0;
}

.background-column h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1.5rem;
}

.background-column h3 i {
    padding: 0.1rem;
}

.education-list {
    display: grid;
    gap: 1.5rem;
}

.education-item {
    font-size: 1rem;
    color: #333;
}

.education-item strong {
    display: block;
    color: #1a1a1a;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.edu-detail {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

.contact-short {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.contact-short .contact-item {
    font-size: 0.95rem;
    color: #333;
}

/* make any inline svg in contact items match the social icons
   (Heroicons/Feather style, MIT licensed) */
.contact-short .contact-item svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    stroke: currentColor;
    flex: 0 0 18px;
}

/* Tabler icons styling */
.contact-short .contact-item .ti {
    font-size: 20px;
    color: #0047AB;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: #1a1a1a;
    text-decoration: none;
}

.contact-link .icon {
    width: 18px;
    height: 18px;
    display: inline-block;
    flex: 0 0 18px;
    fill: currentColor;
    color: #0047AB;
}

.contact-link span {
    font-size: 0.95rem;
    color: #333;
}

.contact-link:hover .icon { color: #0052a3; }
.contact-link:hover span { text-decoration: underline; }

/* availability styling */
.availability-item {
    display: flex;
    align-items: center;
    gap: 0.2rem; /* tighten spacing further */
}

/* ensure icon inherits correct color and size */
.availability-icon,
.availability-item .fa-location-dot,
.availability-item .fas,
.availability-item .fa {
    font-size: 14px !important;
    color: #0047AB !important; /* match GitHub icon color */
    line-height: 1 !important;
}

/* fallback scaling if font-size isn't enough */
.availability-icon {
    transform: scale(0.8);
}
.availability-text {
    font-size: 0.8rem;
    color: #555;
    line-height: 1.2;
    font-weight: 500;
    margin: 0; /* remove default margins if any */
}
.main {
    min-width: 0;
}

.main-section {
    padding-bottom: 2rem;
    /* border-bottom: 1px solid #0047AB; */
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3 {
    line-height: 1.2;
    margin-bottom: 1em;
    margin-top: 1em;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    color: #1a1a1a;
}

h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 1.5em;
    text-align: left;
    margin-top: 0.2em;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
}

p {
    margin-bottom: 1em;
}

a {
    color: #0047AB;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #0052a3;
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
    background-color: #f5f5f5;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
}

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

.nav-links a {
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #0047AB;
}

@media (max-width: 768px) {
    .nav-links {
        flex-direction: column;
        gap: 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.8rem;
    }
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background-color: #0047AB;
    color: #fff;
}

.btn-primary:hover {
    background-color: #0052a3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.btn-secondary {
    background-color: #f0f0f0;
    color: #1a1a1a;
    border: 2px solid #0047AB;
}

.btn-secondary:hover {
    background-color: #0047AB;
    color: #fff;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    padding: 80px 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 600px;
    display: flex;
    align-items: center;
}

.hero-content {
    text-align: left;
}

.tagline {
    font-size: 1.3rem;
    color: #0047AB;
    font-weight: 600;
    margin: 1rem 0;
}


/* ============================================
   About Section
   ============================================ */
.about {
    padding: 20px 20px;
    background-color: #f5f5f5;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
    font-size: 1.05rem;
    line-height: 1.8;
    color: #555;
}

.about-content p {
    margin-bottom: 1.5em;
}

/* ============================================
   Skills Section
   ============================================ */


.skill-category {
    background-color: #f5f5f5;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.skill-category h3 {
    margin-bottom: 1.5rem;
    color: #0047AB;
}

.skill-category ul {
    list-style: none;
}

.skill-category li {
    padding: 0.5rem 0;
    color: #555;
    position: relative;
    padding-left: 10px;
}

.skill-category li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: #0047AB;
    font-weight: bold;
}

/* ============================================
   Portfolio Section
   ============================================ */
.portfolio {
    padding: 20px 10px;
    background-color: #f5f5f5;
}

/* ============================================
   Experience Section
   ============================================ */
.experience {
    padding: 20px 10px;
    /* background-color: #f9f9f9; */
}

.timeline {
    /* allow timeline to span full width, aligning with section headers */
    max-width: none;
    margin: 0;
}

.timeline-item {
    padding: 1rem;
    margin-bottom: 2rem;
    background-color: #f5f5f5;
    border-left: 4px solid #0047AB;
    border-radius: 4px;
    position: relative;
}

/* show arrow on project headers as before */
.timeline-item h3 {
    cursor: pointer;
    position: relative;
    padding-right: 1.2rem;
}

.timeline-item h3::after {
    content: '\25BC'; /* down arrow */
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85rem;
    transition: transform 0.2s ease;
    color: #0047AB;
}

.timeline-item.open h3::after {
    transform: translateY(-50%) rotate(-180deg);
}

.timeline-date {
    display: inline-block;
    background-color: #0047AB;
    color: #fff;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-item h3 {
    color: #1a1a1a;
    margin: 0.5rem 0 0.25rem 0;
}

.company {
    color: #0047AB;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.timeline-item ul {
    list-style: none;
    margin-top: 1rem;
}

.timeline-item li {
    color: #666;
    padding: 0.5rem 0;
    padding-left: 10px;
    position: relative;
}

.timeline-item li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #0047AB;
    font-weight: bold;
}

/* services section list matches timeline style */
.services-list {
    list-style: none;
    margin-top: 1rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.services-list li {
    color: #666;
    padding: 0.5rem 0;
    padding-left: 10px;
    position: relative;
    font-size: 1rem;
}

.services-list li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #0047AB;
    font-weight: bold;
}

.services-list li strong {
    color: #1a1a1a;
}

/* project details collapse */
.project-details {
    display: none;
}

.timeline-item.open .project-details {
    display: block;
}

.timeline-item h3 {
    cursor: pointer;
    position: relative;
    padding-right: 1.2rem;
}

.timeline-item h3::after {
    content: '\25BC'; /* down arrow */
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85rem;
    transition: transform 0.2s ease;
    color: #0047AB;
}

.timeline-item.open h3::after {
    transform: translateY(-50%) rotate(-180deg);
}


/* skills section */
.skills-flat {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    max-width: none;
    margin: 0; 
}

.skills-flat li {
    color: #666;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skills-flat i {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    font-size: 18px !important;
    color: #0047AB;
}

/* ============================================
   Contact Section
   ============================================ */
.contact {
    padding: 20px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.contact h2 {
    color: #fff;
}

.contact > .container > p {
    text-align: left;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}




/* ============================================
   Footer
   ============================================ */
.footer {
    margin-top: 1em;
    background-color: #f5f5f5;
    color: #1a1a1a;
    padding: 1rem 20px;
    text-align: left;
    border-top: 1px solid #e0e0e0;
}

.footer p {
    margin: 0;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 1rem;
    }

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

    
    
    
    /* Collapse sidebar into single column on mobile */
    .layout {
        grid-template-columns: 1fr;
        gap: 24px;
        padding-top: 24px;
    }

    .sidebar {
        order: 0;
        position: relative;
        top: auto;        /* cancel sticky offset */
        max-height: none;
        overflow: visible;
        width: 100%;      /* ensure full width in single column layout */
    }

    .main {
        order: 1;
    }
}

/* ============================================
   Utility Classes
   ============================================ */
.text-center {
    text-align: left;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.pt-1 { padding-top: 0.5rem; }
.pt-2 { padding-top: 1rem; }
.pt-3 { padding-top: 1.5rem; }
.pt-4 { padding-top: 2rem; }

.pb-1 { padding-bottom: 0.5rem; }
.pb-2 { padding-bottom: 1rem; }
.pb-3 { padding-bottom: 1.5rem; }
.pb-4 { padding-bottom: 2rem; }
