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

:root {
    --primary-color: #0891b2; 
    --secondary-color: #0e7490;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --border-color: #e5e7eb;
    --shadow: 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);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--bg-primary);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Prevent overflow on tablets */
@media (max-width: 1024px) {
    .navbar .container {
        padding: 1rem 1.5rem;
        gap: 1rem;
    }
    
    .nav-menu {
        gap: 1rem;
        flex-shrink: 1;
    }
    
    .theme-toggle {
        flex-shrink: 0;
        margin-right: 0;
    }
}

/* Ensure proper spacing on mobile */
@media (max-width: 768px) {
    .navbar .container {
        gap: 0.75rem;
    }
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

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

.nav-menu a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.theme-toggle {
    background: none;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    border-color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    padding: 8rem 0 6rem;
    margin-top: 60px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.highlight {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Buttons */
.btn {
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

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

/* Section Styles */
section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

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

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.about-text p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.education, .certifications {
    margin-top: 2rem;
}

.education h3, .certifications h3, .skills h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.education-item, .cert-item {
    padding: 1.5rem;
    background: var(--bg-primary);
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}

.education-item h4, .cert-item h4 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.date {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Skills */
.skill-category {
    margin-bottom: 1.5rem;
}

.skill-category h4 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.skill-tag {
    padding: 0.5rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.skill-tag:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Projects Section - Bento Grid Style */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: 250px;
    gap: 1.5rem;
}

.project-card {
    background: var(--bg-primary);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
    border: 2px solid transparent;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.project-card:hover::before {
    opacity: 0.05;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.project-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.project-card h3 {
    font-size: 1.5rem;
    margin: 0;
    color: var(--text-primary);
    line-height: 1.3;
    flex: 1;
}

.github-link {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.github-link:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
    border-color: var(--primary-color);
}

.project-tech {
    color: var(--primary-color);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.project-date {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.project-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: auto;
}

.view-details {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.875rem;
    margin-top: 1rem;
    transition: gap 0.3s ease;
}

.project-card:hover .view-details {
    gap: 0.75rem;
}

.view-details svg {
    transition: transform 0.3s ease;
}

.project-card:hover .view-details svg {
    transform: translateX(4px);
}

/* Bento grid layout variations */
.project-card:nth-child(1) {
    grid-column: span 4;
    grid-row: span 2;
}

.project-card:nth-child(2) {
    grid-column: span 2;
    grid-row: span 2;
}

.project-card:nth-child(3) {
    grid-column: span 3;
    grid-row: span 2;
}

.project-card:nth-child(4) {
    grid-column: span 3;
    grid-row: span 2;
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.project-tech {
    color: var(--primary-color);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.project-date {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.project-card ul {
    list-style: none;
    margin-top: auto;
    flex: 1;
    overflow-y: auto;
}

.project-card li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.project-card li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* Scrollbar styling for project cards */
.project-card ul::-webkit-scrollbar {
    width: 6px;
}

.project-card ul::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 3px;
}

.project-card ul::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.project-card ul::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Experience Section */
.experience {
    background: var(--bg-secondary);
}

.timeline {
    position: relative;
    padding: 2rem 0;
}

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

.timeline-item {
    position: relative;
    padding-left: 3rem;
    margin-bottom: 2rem;
}

.timeline-marker {
    position: absolute;
    left: -6px;
    top: 0;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid var(--bg-secondary);
}

.timeline-content {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
}

.timeline-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.company {
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

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

.timeline-content li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.timeline-content li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* Contact Section */
.contact-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.contact-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.8;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.contact-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem;
    border-radius: 1rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 120px;
}

.contact-link:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    background: var(--primary-color);
    color: white;
}

.contact-link svg {
    transition: all 0.3s ease;
}

.contact-link:hover svg {
    stroke: white;
    fill: none;
}

.contact-link:nth-child(4):hover svg {
    fill: white;
}

.contact-link span {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.025em;
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-secondary);
}
