/* 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;
    background: var(--gradient-hero);
    color: white;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.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: 800px;
}

/* 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);
}

/* 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;
}

/* 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,
.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 {
    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,
.section-title.animate-in {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

/* Preserve centered position for skills/education titles when animated */
.skills .section-title.animate-in,
.education .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; }

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

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

    .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 {
        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,
    .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) {
        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) {
    .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;
}