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

:root {
    --primary-color: #dc2626;
    --secondary-color: #1e293b;
    --text-color: #334155;
    --text-light: #64748b;
    --bg-color: #ffffff;
    --bg-light: #f8fafc;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* New gradient and accent variables */
    --gradient-primary: linear-gradient(135deg, #dc2626 0%, #f97316 100%);
    --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e3a5a 50%, #1e293b 100%);
    --gradient-card: linear-gradient(135deg, #dc2626 0%, #ea580c 100%);
    --accent-warm: #f97316;
    --accent-glow: rgba(220, 38, 38, 0.15);
    --glow-primary: 0 0 20px rgba(220, 38, 38, 0.3);
    --glow-hover: 0 0 30px rgba(220, 38, 38, 0.4);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    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;
}

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

.logo:hover {
    transform: scale(1.1);
}

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

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

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

.nav-links a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-hero);
    color: white;
    padding-top: 80px;
    padding-bottom: 80px;
    position: relative;
    overflow: hidden;
}

.hero > .container {
    width: 100%;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.05"><path d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/></g></g></svg>');
    opacity: 0.1;
}

/* Floating geometric shapes */
.hero-shapes {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: var(--gradient-primary);
    top: 10%;
    right: -100px;
    animation: float 6s ease-in-out infinite;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    bottom: 20%;
    left: -50px;
    animation: float 8s ease-in-out infinite reverse;
}

.shape-3 {
    width: 150px;
    height: 150px;
    background: var(--accent-warm);
    top: 50%;
    right: 20%;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: morph 10s ease-in-out infinite;
}

.shape-4 {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #22d3ee 0%, #3b82f6 100%);
    bottom: 30%;
    right: 10%;
    animation: float 7s ease-in-out infinite;
}

/* Gradient orbs */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.3;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--primary-color);
    top: -100px;
    right: -100px;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: #3b82f6;
    bottom: -50px;
    left: -50px;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(10deg); }
}

@keyframes morph {
    0%, 100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    50% { border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%; }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    width: 100%;
}

.hero-card-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
    flex-wrap: nowrap;
}

.hero-text {
    flex: 1;
    min-width: 0;
}

.hero-photo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    animation: fadeInUp 0.8s ease 0.6s backwards;
}

.profile-img {
    width: 350px;
    height: 420px;
    border-radius: 1.5rem;
    object-fit: cover;
    object-position: center 20%;
    border: 4px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 40px rgba(220, 38, 38, 0.3), 0 0 80px rgba(249, 115, 22, 0.15);
    transition: all 0.3s ease;
}

.profile-img:hover {
    transform: scale(1.03);
    box-shadow: 0 0 60px rgba(220, 38, 38, 0.4), 0 0 100px rgba(249, 115, 22, 0.2);
}

/* Glassmorphism card for hero content */
.hero-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 1.5rem;
    padding: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Status badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #4ade80;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease backwards;
}

.status-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background-color: #4ade80;
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    animation: fadeInUp 0.8s ease;
    letter-spacing: -0.02em;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 2rem;
    font-weight: 400;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease 0.2s backwards;
    letter-spacing: -0.01em;
    min-height: 4rem; /* Reserve space for typing effect */
}

.hero-description {
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

.hero-meta-line {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.6s backwards;
}

.hero-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    opacity: 0.8;
}

.hero-rails-contributor {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    opacity: 0.9;
}

.hero-rails-contributor svg {
    color: var(--accent-warm);
    flex-shrink: 0;
}

.hero-rails-contributor a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    position: relative;
    transition: all 0.3s ease;
}

.hero-rails-contributor a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.hero-rails-contributor a:hover {
    color: var(--accent-warm);
}

.hero-rails-contributor a:hover::after {
    width: 100%;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.8s backwards;
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: 0.75rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow), var(--glow-primary);
}

.btn-primary:hover {
    transform: translate3d(0, -3px, 0);
    box-shadow: var(--shadow-lg), var(--glow-hover);
}

.btn-primary:active {
    transform: translate3d(0, -1px, 0);
}

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

.btn-secondary:hover {
    background-color: var(--bg-light);
    transform: translate3d(0, -3px, 0);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.btn-secondary:active {
    transform: translate3d(0, -1px, 0);
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    animation: fadeInUp 1s ease 1.2s backwards;
}

.scroll-indicator span {
    animation: bounce 2s ease-in-out infinite;
}

.scroll-indicator svg {
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

/* Skills Section */
.skills {
    padding: 6rem 0;
    background-color: var(--bg-light);
    position: relative;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--secondary-color);
    position: relative;
    letter-spacing: -0.02em;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* Title container for sections with grey background */
.skills .section-title,
.education .section-title {
    background-color: white;
    display: inline-block;
    padding: 1rem 3rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    position: relative;
    left: 50%;
    transform: translate3d(-50%, 0, 0);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.skill-category {
    background-color: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Gradient top border for skill cards */
.skill-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.skill-category:hover::before {
    transform: scaleX(1);
}

.skill-category:hover {
    transform: translate3d(0, -8px, 0);
    box-shadow: var(--shadow-lg), 0 0 0 1px var(--accent-glow);
}

/* Skill category header with icon */
.skill-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.skill-icon {
    width: 40px;
    height: 40px;
    border-radius: 0.75rem;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.skill-icon svg {
    width: 20px;
    height: 20px;
}

.skill-category h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0;
    color: var(--secondary-color);
}

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

.tag {
    background-color: var(--bg-light);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: inline-block;
}

.tag:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

/* Open Source Contributions Section */
.open-source {
    padding: 6rem 0;
    background-color: white;
    position: relative;
}

.contribution-card {
    max-width: 900px;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--bg-light) 0%, white 100%);
    padding: 2.5rem;
    border-radius: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.contribution-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.contribution-card:hover {
    transform: translate3d(0, -8px, 0);
    box-shadow: var(--shadow-lg), var(--glow-primary);
    border-color: var(--primary-color);
}

.contribution-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.contribution-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--gradient-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: var(--glow-primary);
}

.contribution-badge svg {
    width: 18px;
    height: 18px;
}

.contribution-date {
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.875rem;
}

.contribution-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.contribution-description {
    color: var(--text-color);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1.0625rem;
}

.contribution-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
}

.contribution-stat {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.stat-label {
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 0.875rem;
    min-width: 100px;
}

.stat-value {
    color: var(--text-color);
    font-size: 0.9375rem;
}

.stat-value a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.stat-value a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.stat-value a:hover {
    color: var(--accent-warm);
}

.stat-value a:hover::after {
    width: 100%;
}

.contribution-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.contribution-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: var(--bg-light);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.contribution-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(220, 38, 38, 0.1), transparent);
    transition: left 0.5s ease;
}

.contribution-link:hover::before {
    left: 100%;
}

.contribution-link:hover {
    background-color: white;
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translate3d(0, -3px, 0);
    box-shadow: var(--shadow);
}

.contribution-link svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.contribution-link:hover svg {
    transform: translateX(3px);
}

/* Projects Section */
.projects {
    padding: 6rem 0;
    background-color: var(--bg-light);
    position: relative;
}

.projects .section-title {
    background-color: white;
    display: inline-block;
    padding: 1rem 3rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    position: relative;
    left: 50%;
    transform: translate3d(-50%, 0, 0);
}

.projects .section-title.animate-in {
    transform: translate3d(-50%, 0, 0);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.project-card {
    background-color: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-card:hover {
    transform: translate3d(0, -8px, 0);
    box-shadow: var(--shadow-lg), 0 0 0 1px var(--accent-glow);
}

.project-card-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.project-icon {
    width: 40px;
    height: 40px;
    border-radius: 0.75rem;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.project-icon svg {
    width: 20px;
    height: 20px;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.project-description {
    color: var(--text-color);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex: 1;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
}

.project-link:hover {
    color: var(--accent-warm);
    gap: 0.75rem;
}

.project-link svg {
    transition: transform 0.3s ease;
}

.project-link:hover svg {
    transform: translateX(3px);
}

/* Experience Section */
.experience {
    padding: 6rem 0;
    background-color: white;
    position: relative;
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--accent-warm) 50%, var(--border-color) 100%);
    border-radius: 3px;
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    padding-bottom: 3rem;
}

.timeline-marker {
    position: absolute;
    left: 8px;
    top: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: 4px solid white;
    box-shadow: 0 0 0 3px var(--primary-color), var(--glow-primary);
    transition: all 0.3s ease;
}

/* Pulsing animation for current job marker */
.timeline-item:first-child .timeline-marker {
    animation: pulse-marker 2s ease-in-out infinite;
}

.timeline-item:first-child .timeline-marker::after {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    animation: pulse-ring 2s ease-in-out infinite;
}

@keyframes pulse-marker {
    0%, 100% { box-shadow: 0 0 0 3px var(--primary-color), var(--glow-primary); }
    50% { box-shadow: 0 0 0 5px var(--primary-color), var(--glow-hover); }
}

@keyframes pulse-ring {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 0; }
}

.timeline-content {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.timeline-content:hover {
    transform: translate3d(10px, 0, 0);
    box-shadow: var(--shadow-lg);
    border-left-color: var(--primary-color);
}

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

.job-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.25rem;
}

.job-company {
    color: var(--text-light);
    font-weight: 500;
}

.job-date {
    color: var(--primary-color);
    font-weight: 600;
    white-space: nowrap;
}

.job-highlights {
    list-style: none;
    padding-left: 0;
}

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

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

.job-highlights strong {
    color: var(--secondary-color);
}

/* Education Section */
.education {
    padding: 6rem 0;
    background-color: var(--bg-light);
    position: relative;
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.education-card {
    background-color: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    border-image: var(--gradient-primary) 1;
    position: relative;
    overflow: hidden;
}

/* Numbered badge for education cards */
.education-card::before {
    content: attr(data-number);
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    opacity: 0.8;
}

.education-card:hover {
    transform: translate3d(0, -8px, 0);
    box-shadow: var(--shadow-lg), var(--glow-primary);
}

.education-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    padding-right: 2.5rem;
}

.education-institution {
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.education-date {
    display: inline-block;
    background: var(--accent-glow);
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
}

.education-description {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.education-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.education-link:hover {
    color: var(--accent-warm);
    gap: 0.5rem;
}

/* Off The Rails Blog Section */
.off-the-rails {
    padding: 6rem 0;
    background: linear-gradient(180deg, var(--bg-light) 0%, white 100%);
    position: relative;
    overflow: hidden;
}

.off-the-rails::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(90deg, var(--accent-glow) 1px, transparent 1px),
        linear-gradient(180deg, var(--accent-glow) 1px, transparent 1px);
    background-size: 80px 80px;
    opacity: 0.4;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
    pointer-events: none;
}

.off-the-rails .container {
    position: relative;
    z-index: 1;
}

.off-the-rails-header {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 4rem;
}

.off-the-rails-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.off-the-rails-title {
    font-size: 4rem;
    font-weight: 700;
    color: var(--secondary-color);
    letter-spacing: -0.04em;
    margin-bottom: 1.25rem;
    line-height: 1;
    display: inline-block;
}

.off-the-rails-word {
    display: inline-block;
}

.off-the-rails-accent {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.off-the-rails-subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
    line-height: 1.7;
    max-width: 620px;
    margin: 0 auto;
}

.blog-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
    align-items: stretch;
}

.blog-card {
    position: relative;
    display: block;
    background: white;
    border-radius: 1.5rem;
    padding: 0;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.4s ease;
}

.blog-card:not(.blog-card-empty)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    z-index: 2;
}

.blog-card-glow {
    position: absolute;
    top: -50%;
    right: -30%;
    width: 70%;
    height: 200%;
    background: radial-gradient(ellipse at center, var(--accent-glow) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.blog-card:hover {
    transform: translate3d(0, -8px, 0);
    box-shadow: var(--shadow-lg), var(--glow-primary);
    border-color: var(--primary-color);
}

.blog-card:hover .blog-card-glow {
    opacity: 1;
}

.blog-card-content {
    position: relative;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    z-index: 1;
}

.blog-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.blog-tag {
    display: inline-block;
    background: var(--bg-light);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.blog-card:hover .blog-tag {
    background: var(--accent-glow);
    border-color: rgba(220, 38, 38, 0.2);
}

.blog-card-title {
    font-size: 1.625rem;
    font-weight: 700;
    color: var(--secondary-color);
    line-height: 1.3;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
    transition: color 0.3s ease;
}

.blog-card:hover .blog-card-title {
    color: var(--primary-color);
}

.blog-card-excerpt {
    font-size: 1rem;
    color: var(--text-color);
    line-height: 1.7;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.blog-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px dashed var(--border-color);
}

.blog-card-byline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.blog-card-author {
    color: var(--secondary-color);
    font-weight: 600;
}

.blog-card-dot {
    color: var(--text-light);
    opacity: 0.5;
}

.blog-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.9375rem;
    transition: gap 0.3s ease;
}

.blog-card:hover .blog-card-cta {
    gap: 0.875rem;
}

.blog-card-cta svg {
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-cta svg {
    transform: translateX(2px);
}

.blog-card-empty {
    background: linear-gradient(135deg, white 0%, var(--bg-light) 100%);
    border-style: dashed;
    border-color: var(--border-color);
    box-shadow: none;
}

.blog-card-empty:hover {
    transform: none;
    box-shadow: var(--shadow);
    border-color: var(--accent-warm);
}

.blog-card-empty .blog-card-content {
    align-items: center;
    text-align: center;
    justify-content: center;
}

.blog-empty-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--accent-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.blog-card-empty .blog-card-title {
    font-size: 1.25rem;
}

.blog-card-empty .blog-card-excerpt {
    font-size: 0.9375rem;
    margin-bottom: 0;
    flex-grow: 0;
}

/* Contact Section */
.contact {
    padding: 6rem 0;
    background-color: white;
    position: relative;
}

.contact-description {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
    font-size: 1.125rem;
    color: var(--text-light);
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background-color: var(--bg-light);
    border-radius: 1rem;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

/* Shimmer effect on hover */
.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.contact-card:hover::before {
    left: 100%;
}

.contact-card:hover {
    background-color: white;
    border-color: var(--primary-color);
    transform: translate3d(0, -5px, 0);
    box-shadow: var(--shadow-lg), var(--glow-primary);
}

/* Gradient icon background */
.contact-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.75rem;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.contact-icon svg {
    color: white;
    width: 22px;
    height: 22px;
}

.contact-card:hover .contact-icon {
    transform: scale(1.1) rotate(5deg);
}

.contact-card span {
    font-weight: 500;
    white-space: nowrap;
}

/* Footer */
.footer {
    background: var(--gradient-hero);
    color: white;
    text-align: center;
    padding: 3rem 0;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.03"><path d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/></g></g></svg>');
    opacity: 0.5;
}

.footer .container {
    position: relative;
    z-index: 1;
}

/* Social links row in footer */
.footer-socials {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.footer-social-link {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-social-link:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: var(--glow-primary);
}

.footer-social-link svg {
    width: 20px;
    height: 20px;
}

.footer p {
    opacity: 0.7;
    font-size: 0.875rem;
}

.footer-divider {
    width: 60px;
    height: 2px;
    background: var(--gradient-primary);
    margin: 0 auto 1rem;
    border-radius: 1px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 30px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* Scroll-triggered animations */
.timeline-item,
.education-card,
.skill-category,
.contact-card,
.contribution-card,
.project-card,
.blog-card,
.off-the-rails-header,
.section-title {
    opacity: 0;
    transform: translate3d(0, 30px, 0);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Initial state for centered section titles */
.skills .section-title,
.education .section-title,
.projects .section-title {
    opacity: 0;
    transform: translate3d(-50%, 30px, 0);
}

.timeline-item.animate-in,
.education-card.animate-in,
.skill-category.animate-in,
.contact-card.animate-in,
.contribution-card.animate-in,
.project-card.animate-in,
.blog-card.animate-in,
.off-the-rails-header.animate-in,
.section-title.animate-in {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

/* Preserve centered position for skills/education/projects titles when animated */
.skills .section-title.animate-in,
.education .section-title.animate-in,
.projects .section-title.animate-in {
    transform: translate3d(-50%, 0, 0);
}

/* Staggered animation delays for smoother appearance */
.skill-category:nth-child(1) { transition-delay: 0s; }
.skill-category:nth-child(2) { transition-delay: 0.1s; }
.skill-category:nth-child(3) { transition-delay: 0.2s; }
.skill-category:nth-child(4) { transition-delay: 0.3s; }

.education-card:nth-child(1) { transition-delay: 0s; }
.education-card:nth-child(2) { transition-delay: 0.1s; }
.education-card:nth-child(3) { transition-delay: 0.2s; }
.education-card:nth-child(4) { transition-delay: 0.3s; }

.contact-card:nth-child(1) { transition-delay: 0s; }
.contact-card:nth-child(2) { transition-delay: 0.1s; }
.contact-card:nth-child(3) { transition-delay: 0.2s; }
.contact-card:nth-child(4) { transition-delay: 0.3s; }

.project-card:nth-child(1) { transition-delay: 0s; }
.project-card:nth-child(2) { transition-delay: 0.1s; }
.project-card:nth-child(3) { transition-delay: 0.2s; }

.blog-card:nth-child(1) { transition-delay: 0s; }
.blog-card:nth-child(2) { transition-delay: 0.15s; }

/* Responsive Design */
@media (max-width: 1024px) {
    .profile-img {
        width: 260px;
        height: 320px;
    }
}

@media (max-width: 768px) {
    .hero-card {
        padding: 1.5rem;
    }

    .hero-card-inner {
        flex-direction: column-reverse;
        text-align: center;
        gap: 1.5rem;
    }

    .hero-photo {
        margin-bottom: 0;
    }

    .profile-img {
        width: 240px;
        height: 300px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.5rem;
        min-height: 2rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .blog-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .off-the-rails-title {
        font-size: 2.5rem;
    }

    .off-the-rails-subtitle {
        font-size: 1rem;
    }

    .off-the-rails-header {
        margin-bottom: 2.5rem;
    }

    .blog-card-content {
        padding: 1.75rem;
    }

    .blog-card-title {
        font-size: 1.25rem;
    }

    .blog-card-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-links {
        gap: 1rem;
        font-size: 0.875rem;
    }

    .navbar .container {
        padding: 1rem;
    }

    .container {
        padding: 0 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .skills .section-title,
    .education .section-title,
    .projects .section-title {
        padding: 1rem 2rem;
        font-size: 1.75rem;
    }

    .job-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .timeline::before {
        left: 10px;
    }

    .timeline-item {
        padding-left: 40px;
    }

    .timeline-marker {
        left: 0px;
        width: 22px;
        height: 22px;
    }

    .hero-buttons {
        flex-direction: column;
    }

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

    /* Single column layout for mobile */
    .skills-grid,
    .education-grid,
    .contact-cards {
        grid-template-columns: 1fr;
    }

    /* Open Source section mobile adjustments */
    .contribution-card {
        padding: 1.5rem;
    }

    .contribution-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .contribution-title {
        font-size: 1.25rem;
    }

    .contribution-details {
        padding: 1rem;
    }

    .stat-label {
        min-width: 80px;
        font-size: 0.8125rem;
    }

    .stat-value {
        font-size: 0.875rem;
    }

    .contribution-links {
        flex-direction: column;
    }

    .contribution-link {
        width: 100%;
        justify-content: center;
    }

    /* Faster animations on mobile for better UX */
    .timeline-item,
    .education-card,
    .skill-category,
    .contact-card,
    .contribution-card,
    .project-card,
    .blog-card,
    .off-the-rails-header,
    .section-title {
        transition-duration: 0.4s;
    }

    /* Reduce stagger delays on mobile */
    .skill-category:nth-child(1),
    .skill-category:nth-child(2),
    .skill-category:nth-child(3),
    .skill-category:nth-child(4),
    .education-card:nth-child(1),
    .education-card:nth-child(2),
    .education-card:nth-child(3),
    .education-card:nth-child(4),
    .contact-card:nth-child(1),
    .contact-card:nth-child(2),
    .contact-card:nth-child(3),
    .contact-card:nth-child(4),
    .project-card:nth-child(1),
    .project-card:nth-child(2),
    .project-card:nth-child(3) {
        transition-delay: 0s;
    }

    /* Hero adjustments for mobile */
    .hero-card {
        padding: 2rem 1.5rem;
    }

    .hero-meta-line {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .hero-shapes .shape {
        opacity: 0.05;
    }

    .scroll-indicator {
        display: none;
    }

    /* Reduce floating shape animations on mobile for performance */
    .shape-1, .shape-2, .shape-3, .shape-4 {
        animation: none;
    }

    /* Disable pulse animation on mobile for performance */
    .timeline-item:first-child .timeline-marker {
        animation: none;
    }

    .timeline-item:first-child .timeline-marker::after {
        display: none;
    }
}

@media (max-width: 480px) {
    .profile-img {
        width: 200px;
        height: 250px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
        min-height: 2rem; /* Reserve space for typing effect on mobile */
    }

    .nav-links {
        gap: 0.75rem;
        font-size: 0.75rem;
    }

    .logo {
        font-size: 1.25rem;
    }

    .status-badge {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }

    .skill-icon {
        width: 36px;
        height: 36px;
    }

    .contact-icon {
        width: 42px;
        height: 42px;
    }
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Selection */
::selection {
    background-color: var(--primary-color);
    color: white;
}

/* Blog Post Page Styles */
body.blog-post {
    background-color: var(--bg-light);
}

.post-hero {
    padding: 8rem 0 4rem;
    background: var(--gradient-hero);
    color: white;
    position: relative;
    overflow: hidden;
}

.post-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.04"><path d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/></g></g></svg>');
    pointer-events: none;
}

.post-hero::after {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    filter: blur(60px);
    pointer-events: none;
}

.post-hero .container {
    position: relative;
    z-index: 1;
    max-width: 820px;
}

.post-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.post-back-link svg {
    transition: transform 0.3s ease;
}

.post-back-link:hover {
    color: white;
}

.post-back-link:hover svg {
    transform: translateX(-4px);
}

.post-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(220, 38, 38, 0.2);
    color: #fca5a5;
    padding: 0.4rem 0.875rem;
    border-radius: 1.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px solid rgba(220, 38, 38, 0.3);
    margin-bottom: 1.5rem;
}

.post-title {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 30px rgba(0, 0, 0, 0.3);
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9375rem;
}

.post-meta-author {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.post-author-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.post-meta-divider {
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
}

.post-meta-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.post-meta-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.85);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.post-body {
    background: white;
    padding: 4rem 0 6rem;
    position: relative;
}

.post-body .container {
    max-width: 760px;
}

.post-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-color);
}

.post-content > p:first-child {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--secondary-color);
    line-height: 1.7;
    margin-bottom: 1.75rem;
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-top: 3.5rem;
    margin-bottom: 1.25rem;
    letter-spacing: -0.015em;
    line-height: 1.3;
    position: relative;
    padding-left: 1.25rem;
}

.post-content h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.post-content h3 {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.post-content a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px solid rgba(220, 38, 38, 0.3);
    transition: all 0.3s ease;
}

.post-content a:hover {
    color: var(--accent-warm);
    border-bottom-color: var(--accent-warm);
}

.post-content strong {
    color: var(--secondary-color);
    font-weight: 700;
}

.post-content em {
    color: var(--text-color);
    font-style: italic;
}

.post-content ul,
.post-content ol {
    margin: 0 0 1.5rem 0;
    padding-left: 1.5rem;
}

.post-content ul li,
.post-content ol li {
    margin-bottom: 0.75rem;
    padding-left: 0.5rem;
}

.post-content ul li::marker {
    color: var(--primary-color);
}

.post-content ol li::marker {
    color: var(--primary-color);
    font-weight: 700;
}

.post-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background: var(--bg-light);
    border-radius: 0 0.5rem 0.5rem 0;
    font-style: italic;
    color: var(--text-light);
}

.post-content hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
    margin: 3rem 0;
}

.post-content :not(pre) > code {
    background: var(--bg-light);
    color: var(--primary-color);
    padding: 0.15rem 0.45rem;
    border-radius: 0.375rem;
    font-size: 0.875em;
    font-family: 'JetBrains Mono', 'Fira Code', Consolas, Monaco, monospace;
    border: 1px solid var(--border-color);
    font-weight: 500;
}

.post-content pre[class*="language-"] {
    background: #0f172a !important;
    border-radius: 0.875rem;
    padding: 1.5rem !important;
    margin: 1.5rem 0 2rem !important;
    box-shadow: 0 12px 30px -10px rgba(15, 23, 42, 0.4),
                0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    overflow-x: auto;
    font-size: 0.875rem;
    line-height: 1.65;
    position: relative;
}

.post-content pre[class*="language-"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 0.875rem 0.875rem 0 0;
}

.post-content pre code {
    font-family: 'JetBrains Mono', 'Fira Code', Consolas, Monaco, monospace;
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
    color: #e2e8f0 !important;
    font-weight: 400 !important;
    font-size: inherit !important;
}

.post-content pre::-webkit-scrollbar {
    height: 8px;
}

.post-content pre::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.post-content pre::-webkit-scrollbar-thumb {
    background: rgba(220, 38, 38, 0.4);
    border-radius: 4px;
}

.post-content pre::-webkit-scrollbar-thumb:hover {
    background: rgba(220, 38, 38, 0.6);
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 12px 30px -10px rgba(15, 23, 42, 0.15);
    display: block;
    margin: 1.5rem auto;
}

.post-content figure {
    margin: 2rem 0;
    text-align: center;
}

.post-content figure img {
    margin: 0 auto 0.75rem;
}

.post-content figcaption {
    font-size: 0.875rem;
    color: var(--text-light);
    font-style: italic;
    text-align: center;
}

.post-signature {
    margin-top: 4rem;
    padding: 2rem;
    background: linear-gradient(135deg, var(--bg-light) 0%, white 100%);
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    font-style: italic;
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.7;
}

.post-signature strong {
    color: var(--secondary-color);
    font-style: normal;
}

.post-back-bottom {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.post-back-bottom a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    background: white;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 0.75rem;
    font-weight: 600;
    border: 2px solid var(--primary-color);
    transition: all 0.3s ease;
}

.post-back-bottom a:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translate3d(0, -3px, 0);
    box-shadow: var(--shadow-lg), var(--glow-primary);
}

.post-back-bottom svg {
    transition: transform 0.3s ease;
}

.post-back-bottom a:hover svg {
    transform: translateX(-4px);
}

@media (max-width: 768px) {
    .post-hero {
        padding: 6rem 0 3rem;
    }

    .post-body {
        padding: 2.5rem 0 4rem;
    }

    .post-content {
        font-size: 1rem;
    }

    .post-content h2 {
        font-size: 1.5rem;
        margin-top: 2.5rem;
        padding-left: 1rem;
    }

    .post-content h3 {
        font-size: 1.25rem;
    }

    .post-content > p:first-child {
        font-size: 1.125rem;
    }

    .post-content pre[class*="language-"] {
        padding: 1.125rem !important;
        font-size: 0.8125rem;
        border-radius: 0.625rem;
        margin-left: -1rem;
        margin-right: -1rem;
    }

    .post-meta {
        font-size: 0.875rem;
        gap: 0.75rem;
    }

    .post-signature {
        padding: 1.5rem;
        font-size: 0.9375rem;
    }
}