/* Modern CSS with variables */
:root {
    --primary-color: #DC2626; /* Vibrant red */
    --primary-dark: #991B1B;
    --primary-light: #FEE2E2;
    --accent-color: #EA580C; /* Warm orange accent */
    --accent-light: #FED7AA;
    --success-color: #10B981;
    --text-dark: #1F2937;
    --text-medium: #4B5563;
    --text-light: #6B7280;
    --bg-color: #FFFFFF;
    --bg-light: #FEF2F2;
    --bg-gradient: linear-gradient(135deg, #DC2626 0%, #F97316 100%);
    --hero-gradient: linear-gradient(135deg, #DC2626 0%, #F87171 50%, #FB923C 100%);
    --card-gradient: linear-gradient(135deg, #F87171 0%, #FB923C 100%);
    --border-color: #E5E7EB;
    --card-shadow: 0 10px 30px rgba(220, 38, 38, 0.1);
    --hover-shadow: 0 20px 40px rgba(220, 38, 38, 0.15);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-medium);
    background: linear-gradient(to bottom right, #ffffff 0%, #f3f4f6 100%);
    min-height: 100vh;
    font-size: 16px;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    background: 
        radial-gradient(circle at 20% 50%, rgba(220, 38, 38, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(249, 115, 22, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(239, 68, 68, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

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

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 3rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-dark);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

/* Add emoji support for fun elements */
.emoji {
    font-size: 1.2em;
    margin: 0 0.2em;
    display: inline-block;
    animation: bounce 2s ease-in-out infinite;
}

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

h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1.2rem;
    font-size: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* Navigation */
@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

header {
    padding: 0 1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
    margin-bottom: 3rem;
    position: sticky;
    top: 0;
    z-index: 100;
    animation: slideDown 0.5s ease-out;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}


.main-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 1rem 0;
}

/* Show logo on all pages except homepage initially */
.logo {
    white-space: nowrap;
    flex-shrink: 0;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--hero-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: var(--transition);
    padding: 0.5rem 0;
    display: inline-block;
    white-space: nowrap;
}

.logo a:hover {
    transform: scale(1.05);
}

/* Logo on homepage when scrolled - desktop only */
@media (min-width: 1021px) {
    .homepage .logo {
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        width: 0;
        overflow: hidden;
        padding: 0;
    }
    
    .homepage.scrolled .logo {
        opacity: 1;
        visibility: visible;
        animation: fadeIn 0.3s ease;
        width: auto;
        padding: 0.5rem 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.nav-links a {
    color: var(--text-medium);
    font-weight: 500;
    position: relative;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-links a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: calc(100% + 0.6rem);
    height: calc(100% + 0.4rem);
    transform: translate(-50%, -50%) scale(0);
    background: var(--primary-light);
    border-radius: 20px;
    transition: transform 0.3s ease;
    z-index: -1;
}

.nav-links a:hover::before,
.nav-links a.active::before {
    transform: translate(-50%, -50%) scale(1);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-dark);
    transform: translateY(-2px);
}

.social-nav {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.social-nav a {
    color: var(--text-medium);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-light);
}

.social-nav a:hover {
    color: var(--primary-color);
    transform: translateY(-3px) rotate(5deg);
    background: var(--primary-light);
    box-shadow: 0 5px 15px rgba(220, 38, 38, 0.3);
}

/* Hero section */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

#hero {
    padding: 2rem 0 4rem;
    animation: fadeInUp 0.8s ease-out;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
}

.hero-text {
    flex: 1;
}

.hero-text h1 {
    margin-bottom: 0.5rem;
    font-size: 3rem;
    background: var(--hero-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-text h2 {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 1.3rem;
    margin-bottom: 1.2rem;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-description {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    max-width: 40rem;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.hero-image {
    flex-shrink: 0;
}

#hero-profile-image,
#bio-profile-image {
    width: 280px;
    height: 280px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 20px 40px rgba(220, 38, 38, 0.15);
    transition: var(--transition);
    animation: float 3s ease-in-out infinite, fadeInUp 0.8s ease-out 0.4s both;
    border: 3px solid var(--primary-light);
}

#hero-profile-image:hover,
#bio-profile-image:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 25px 50px rgba(220, 38, 38, 0.25);
    border-color: var(--primary-color);
}

.hero-cta {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.cta-button {
    display: inline-block;
    padding: 0.9rem 2rem;
    font-weight: 500;
    border-radius: 25px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out 0.8s both;
}

.cta-button:first-child {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.cta-button:first-child::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;
}

.cta-button:first-child:hover::before {
    left: 100%;
}

.cta-button:first-child:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.4);
}

.cta-button.secondary {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.1);
}

.cta-button.secondary:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.2);
    border-color: var(--primary-dark);
}

/* Expertise section */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

#expertise {
    padding: 5rem 3rem;
    background: linear-gradient(135deg, var(--bg-light) 0%, rgba(220, 38, 38, 0.05) 100%);
    margin: 3rem 0;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
}

#expertise::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.08) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.expertise-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(220, 38, 38, 0.08);
    transition: var(--transition);
    border: 1px solid rgba(220, 38, 38, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.expertise-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--hero-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

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

.expertise-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(220, 38, 38, 0.15);
    border-color: var(--primary-color);
}

.expertise-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--hero-gradient);
    color: white;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
    transition: var(--transition);
}

.expertise-card:hover .expertise-icon {
    transform: rotate(10deg) scale(1.1);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.3);
}

.expertise-icon svg {
    width: 28px;
    height: 28px;
}

.expertise-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-weight: 600;
}

.expertise-card p {
    color: var(--text-medium);
    line-height: 1.7;
    font-size: 1rem;
}

@media (max-width: 992px) {
    .expertise-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    #expertise {
        padding: 4rem 2.5rem;
    }
}

@media (max-width: 768px) {
    #expertise {
        padding: 3.5rem 2rem;
    }
}

@media (max-width: 576px) {
    .expertise-grid {
        grid-template-columns: 1fr;
    }
    
    #expertise {
        padding: 3rem 1.5rem;
    }
}

/* Featured Work section */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

#featured-work {
    padding: 4rem 0;
    position: relative;
}

.featured-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 2.5rem;
}

.featured-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(249, 250, 251, 0.95) 100%);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(220, 38, 38, 0.1);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
}

.featured-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--hero-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

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

.featured-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(220, 38, 38, 0.2);
    border-color: var(--primary-color);
}

.featured-card-header {
    background: var(--hero-gradient);
    padding: 1rem;
    display: flex;
    justify-content: flex-start;
    position: relative;
    overflow: hidden;
    border-radius: 20px 20px 0 0; /* Match parent's top border radius */
}

.featured-card-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    to {
        left: 100%;
    }
}

.article-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 1;
    letter-spacing: 0.05em;
}

.featured-card-content {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.featured-card-content p {
    flex: 1;
    margin-bottom: 1.5rem;
}

.article-card {
    border-top: none;
}

.button-link {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 0.7rem 1.5rem;
    border-radius: 25px;
    font-weight: 500;
    transition: var(--transition);
    align-self: flex-start;
    margin-top: auto;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
    position: relative;
    overflow: hidden;
}

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

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

.button-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.35);
    color: white;
}

.button-link .arrow {
    margin-left: 6px;
    transition: var(--transition);
}

.button-link:hover .arrow {
    transform: translateX(5px);
}

.featured-highlight h3 {
    margin-bottom: 1rem;
}

.text-link {
    position: relative;
    font-weight: 500;
    background: linear-gradient(to right, var(--primary-color), var(--primary-color));
    background-size: 0% 2px;
    background-position: left bottom;
    background-repeat: no-repeat;
    transition: background-size 0.3s ease;
    padding-bottom: 2px;
}

.text-link:hover {
    background-size: 100% 2px;
    color: var(--primary-color);
}

.text-link.original {
    display: inline-flex;
    align-items: center;
    margin-top: 1rem;
    font-weight: 500;
}

.feature-link {
    color: var(--primary-color);
    font-weight: 500;
    position: relative;
    text-decoration: none;
    transition: var(--transition);
}

.feature-link::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease;
}

.feature-link:hover {
    color: var(--primary-dark);
}

.feature-link:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.arrow {
    margin-left: 5px;
    transition: var(--transition);
}

.text-link:hover .arrow {
    transform: translateX(5px);
}

/* Timeline styles for experience page */
.section-intro {
    font-size: 1.1rem;
    max-width: 800px;
    margin-bottom: 2.5rem;
}

#experience-header, #projects-header, #skills-header {
    margin-bottom: 3rem;
}

.timeline-container {
    position: relative;
    padding-left: 30px;
    margin-bottom: 3rem;
}

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

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

.timeline-dot {
    position: absolute;
    left: -30px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--bg-color);
    border: 2px solid var(--primary-color);
    z-index: 1;
}

.timeline-content {
    background-color: var(--bg-light);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.timeline-content:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.08);
}

.timeline-content h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.timeline-date {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    background-color: var(--primary-light);
    color: var(--primary-dark);
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.timeline-details ul {
    margin-top: 1rem;
    padding-left: 1.5rem;
}

.timeline-details li {
    position: relative;
    margin-bottom: 0.6rem;
    padding-left: 1rem;
}

.timeline-details li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.65rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--primary-color);
}

/* Bio page header */
.bio-header {
    text-align: center;
    margin-bottom: 2rem;
}

/* Position the bio photo to the upper right on larger screens */
.bio-header #bio-profile-image {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

@media (max-width: 576px) {
    .bio-header #bio-profile-image {
        float: none;
        display: block;
        margin: 0 auto 1rem;
    }
}

/* Education section */
.education-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.education-card {
    background-color: var(--bg-light);
    border-radius: 8px;
    padding: 1.5rem;
    transition: var(--transition);
}

.education-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow);
}

.education-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.education-list {
    list-style: disc;
    margin-left: 1.5rem;
}

.education-list li {
    margin-bottom: 0.5rem;
}

.education-program {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.education-year {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Projects page styles */
#projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--card-shadow);
    height: 100%;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.project-content {
    padding: 1.5rem;
    background-color: var(--bg-color);
}

.project-category {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    background-color: var(--primary-light);
    color: var(--primary-color);
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.project-features {
    margin: 1.2rem 0;
    padding-left: 1.5rem;
}

.project-features li {
    position: relative;
    margin-bottom: 0.5rem;
    padding-left: 1rem;
}

.project-features li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.65rem;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: var(--primary-color);
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.project-tags span {
    padding: 0.3rem 0.8rem;
    background-color: var(--bg-light);
    border-radius: 30px;
    font-size: 0.8rem;
    color: var(--text-medium);
}

/* Skills page styles */
.skills-category {
    margin-bottom: 3rem;
}

.skills-category h2 {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-light);
}

.skill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.skill-item {
    margin-bottom: 1rem;
}

.skill-name {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.skill-bar {
    height: 8px;
    background-color: var(--bg-light);
    border-radius: 4px;
    overflow: hidden;
}

.skill-level {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 4px;
}

.tech-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
}

.tech-tag {
    padding: 0.6rem 1.2rem;
    background-color: var(--bg-light);
    border-radius: 30px;
    font-size: 0.9rem;
    color: var(--text-medium);
    transition: var(--transition);
}

.tech-tag:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Footer styles */
footer {
    text-align: center;
    padding: 3rem 0;
    margin-top: 4rem;
    color: var(--text-light);
    background: linear-gradient(135deg, var(--bg-light) 0%, rgba(220, 38, 38, 0.03) 100%);
    border-top: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--hero-gradient);
}

footer a {
    color: var(--primary-color);
    font-weight: 500;
    transition: var(--transition);
}

footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Responsive design */
@media (max-width: 992px) {
    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
    }
    
    .hero-description {
        margin: 0 auto 2rem;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .expertise-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* Tablet styles - smaller nav items */
@media (max-width: 1020px) and (min-width: 791px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .logo a {
        font-size: 1.3rem;
    }
    
    .nav-links {
        gap: 0.5rem;
    }
    
    .nav-links a {
        font-size: 0.85rem;
        padding: 0.3rem 0.6rem;
    }
    
    .social-nav {
        gap: 0.5rem;
    }
    
    .social-nav a {
        width: 30px;
        height: 30px;
    }
    
    .social-nav svg {
        width: 16px;
        height: 16px;
    }
    
    /* Always show logo on tablet */
    .logo {
        display: block;
        opacity: 1;
        visibility: visible;
        width: auto;
    }
    
    /* Override homepage hiding on tablet */
    .homepage .logo {
        opacity: 1;
        visibility: visible;
    }
}

/* Mobile styles - use hamburger menu */
@media (max-width: 790px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.6rem;
    }
    
    .container {
        padding: 0 1.5rem;
    }
    
    header {
        padding: 0.5rem 0;
    }
    
    .main-nav {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 1rem;
        position: relative;
    }
    
    /* Always show logo on tablet/mobile */
    .logo {
        display: block;
        opacity: 1;
        visibility: visible;
        width: auto;
        margin-right: auto;
        order: -1;
    }
    
    /* Override homepage hiding on tablet/mobile */
    .homepage .logo {
        opacity: 1;
        visibility: visible;
    }
    
    .logo a {
        font-size: 1.3rem;
    }
    
    .nav-wrapper {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, border 0.3s ease, box-shadow 0.3s ease;
        flex-direction: column;
        padding-bottom: 0;
        border-bottom-width: 0;
        box-shadow: none;
    }
    
    .nav-wrapper.open {
        max-height: 400px;
        padding-bottom: 1rem;
        border-bottom-width: 1px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    
    .nav-links {
        width: 100%;
        flex-direction: column;
        gap: 0;
        padding: 1rem;
    }
    
    .nav-links li {
        width: 100%;
    }
    
    .nav-links a {
        display: block;
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
        width: 100%;
        text-align: left;
        border-radius: 8px;
    }
    
    .nav-links a::before {
        display: none;
    }
    
    .nav-links a:hover {
        background: var(--primary-light);
        transform: none;
    }
    
    .social-nav {
        padding: 0 1rem 1rem;
        justify-content: center;
        gap: 1rem;
    }
    
    .social-nav a {
        width: 36px;
        height: 36px;
    }
    
    .highlight-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Hamburger menu styles */
.mobile-menu-toggle {
    display: block;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-dark);
}

.mobile-menu-toggle svg {
    width: 24px;
    height: 24px;
}

/* Hide hamburger on desktop and tablet */
@media (min-width: 791px) {
    .mobile-menu-toggle {
        display: none;
    }
}

/* Nav wrapper - default mobile state */
.nav-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

/* Nav wrapper for tablet and desktop */
@media (min-width: 791px) {
    .nav-wrapper {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 2rem;
        flex-shrink: 1;
    }
}

/* Small mobile adjustments */
@media (max-width: 576px) {
    .container {
        padding: 0 1rem;
    }
    
    .logo a {
        font-size: 1.1rem;
    }
    
    .mobile-menu-toggle {
        display: block;
        order: 1;
        z-index: 1001;
        position: relative;
    }
    
    .nav-wrapper {
        position: absolute;
        top: 100%;
        left: -1rem;
        right: -1rem;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, border 0.3s ease, box-shadow 0.3s ease;
        flex-direction: column;
        padding-bottom: 0;
        border-bottom-width: 0;
        box-shadow: none;
    }
    
    .nav-wrapper.open {
        max-height: 400px;
        padding-bottom: 1rem;
        border-bottom-width: 1px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    
    .nav-links {
        width: 100%;
        flex-direction: column;
        gap: 0;
        padding: 1rem;
    }
    
    .nav-links li {
        width: 100%;
    }
    
    .nav-links a {
        display: block;
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
        width: 100%;
        text-align: left;
        border-radius: 8px;
    }
    
    .nav-links a:hover {
        background: var(--primary-light);
    }
    
    .social-nav {
        padding: 0 1rem 1rem;
        justify-content: center;
        gap: 1rem;
    }
    
    .social-nav a {
        width: 36px;
        height: 36px;
    }
    
    /* Hide logo name on mobile when scrolled, show just the first letter */
    .homepage.scrolled .logo {
        margin-right: auto;
        margin-bottom: 0;
        order: 0;
    }
    
    .highlight-metrics {
        grid-template-columns: 1fr;
    }
    
    .hero-content {
        gap: 2rem;
    }
    
    #hero-profile-image,
    #bio-profile-image {
        width: 180px;
        height: 180px;
    }
}

/* Contact Form Styles */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    margin-top: 2rem;
}

.contact-info h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.contact-reasons {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.contact-reasons li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.contact-reasons li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

.contact-alternatives {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.contact-alternatives h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: var(--bg-light);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-dark);
    transition: var(--transition);
    white-space: nowrap;
    min-width: fit-content;
}

.social-link svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.social-link:hover {
    background-color: var(--primary-light);
    color: var(--primary-dark);
    transform: translateY(-2px);
}

.contact-form {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background-color: var(--bg-color);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-button {
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.submit-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.submit-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.form-status {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 6px;
    text-align: center;
    display: none;
}

.form-status.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.form-status.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.privacy-note {
    margin-top: 3rem;
    padding: 1.5rem;
    background-color: var(--bg-light);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.privacy-note p {
    margin: 0;
    color: var(--text-gray);
}

/* Responsive Contact Form */
@media (max-width: 768px) {
    .contact-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .social-links {
        flex-direction: column;
    }
}