/* Custom styles for Jiang Bin's Portfolio */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    /* Modern Color Palette - Slate & Indigo */
    --primary-bg: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --accent-color: #4f46e5;
    /* Indigo 600 */
    --accent-hover: #4338ca;
    /* Indigo 700 */
    --border-color: #e2e8f0;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    /* Radius */
    --radius-lg: 1rem;
    --radius-md: 0.5rem;
    --radius-full: 9999px;
}

body {
    font-family: "Outfit", -apple-system, sans-serif;
    color: var(--text-main);
    background-color: var(--primary-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Container Override */
@media (min-width: 1400px) {
    .container-fluid {
        max-width: 1280px;
        /* Slightly narrower for better readability */
        margin: 0 auto;
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-main);
    font-weight: 700;
    letter-spacing: -0.025em;
}

h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #1e293b 0%, #4f46e5 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 1.875rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    display: block;
    width: 40%;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
    margin-top: 0.5rem;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--accent-hover);
}

/* Hero Section */
.hero-section {
    margin-top: 4rem;
    margin-bottom: 5rem;
    animation: fadeIn 0.8s ease-out;
}

.profile-image {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 2rem;
    /* Squircle-ish */
    border: 4px solid #fff;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.profile-image:hover {
    transform: scale(1.05) rotate(2deg);
}

.hero-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.btn {
    border-radius: var(--radius-full);
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.btn-outline-primary {
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.btn-outline-primary:hover {
    background-color: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.btn-outline-dark,
.btn-outline-secondary {
    border-color: var(--border-color);
    color: var(--text-main);
}

.btn-outline-dark:hover,
.btn-outline-secondary:hover {
    background-color: var(--text-main);
    color: white;
    transform: translateY(-2px);
}

/* Cards */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0;
    height: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.card-body {
    padding: 2rem;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(79, 70, 229, 0.3);
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

/* Skills List as Badges */
.skills-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skills-list li {
    background-color: #f1f5f9;
    color: var(--text-main);
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.skills-list li:hover {
    background-color: #e0e7ff;
    color: var(--accent-color);
}

.skills-list li strong {
    font-weight: 600;
}

/* Project Lists (Default inside cards but not skills) */
.card ul:not(.skills-list) {
    padding-left: 1.2rem;
    margin-bottom: 0;
    margin-top: 0.5rem;
}

.card ul:not(.skills-list) li {
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Project Meta Tag */
.project-meta {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.8rem;
    color: var(--accent-color);
    background-color: #e0e7ff;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    display: inline-block;
    margin-bottom: 1rem;
    font-weight: 500;
}

/* Timeline */
.timeline {
    margin-top: 2rem;
    position: relative;
}

.timeline-item {
    border-left: 2px solid var(--border-color);
    padding-left: 2.5rem;
    padding-bottom: 3.5rem;
    position: relative;
}

.timeline-item:last-child {
    border-left-color: transparent;
}

.timeline-item::before {
    content: "";
    width: 14px;
    height: 14px;
    background: #fff;
    border: 3px solid var(--accent-color);
    border-radius: 50%;
    position: absolute;
    left: -8px;
    top: 6px;
    transition: all 0.3s ease;
}

.timeline-item:hover::before {
    background: var(--accent-color);
    transform: scale(1.3);
    box-shadow: 0 0 0 6px rgba(79, 70, 229, 0.15);
}

.timeline-title {
    font-size: 1.25rem;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.timeline-meta {
    font-family: "JetBrains Mono", monospace;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: block;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.card,
.timeline-item {
    animation: fadeIn 0.6s ease-out backwards;
}

/* Stagger delays */
.g-col-12:nth-child(1) .card {
    animation-delay: 0.1s;
}

.g-col-12:nth-child(2) .card {
    animation-delay: 0.2s;
}

.g-col-12:nth-child(3) .card {
    animation-delay: 0.3s;
}

.g-col-12:nth-child(4) .card {
    animation-delay: 0.4s;
}

/* Utilities */
.my-5 {
    margin-top: 5rem;
    margin-bottom: 5rem;
}

/* Mobile */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
        margin-top: 2rem;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2::after {
        margin: 0.5rem auto 0;
    }
}