:root {
    --primary-color: #00a0e3;
    --secondary-color: #333333;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
}

.navbar {
    padding: 15px 0;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-brand img {
    height: 50px;
}

.navbar .nav-link {
    color: var(--secondary-color);
    font-weight: 600;
    margin: 0 10px;
    transition: color 0.3s;
}

.navbar .nav-link:hover {
    color: var(--primary-color);
}

.hero {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 120px 0;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/api/placeholder/1200/800') center/cover no-repeat;
    opacity: 0.05;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
}

/* Portfolio Hero - Dark background for subpages */
.portfolio-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.portfolio-hero h1 {
    color: white;
}

.portfolio-hero p {
    color: rgba(255, 255, 255, 0.9);
}

.portfolio-hero .breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 0.5rem;
}

.portfolio-hero .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}

.portfolio-hero .breadcrumb-item a:hover {
    color: white;
}

.portfolio-hero .breadcrumb-item.active {
    color: white;
}

.portfolio-hero .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.5);
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 30px;
    max-width: 600px;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s;
}

.btn-primary:hover {
    background-color: #0086c0;
    border-color: #0086c0;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 160, 227, 0.3);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 160, 227, 0.3);
}

section {
    padding: 100px 0;
}

section h2 {
    font-weight: 700;
    margin-bottom: 50px;
    position: relative;
    display: inline-block;
}

section h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

.service-card {
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    margin-bottom: 30px;
    height: 100%;
    transition: all 0.3s;
    background-color: white;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.service-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    background-color: rgba(0, 160, 227, 0.1);
    border-radius: 50%;
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 2rem;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.portfolio {
    background-color: #f8f9fa;
}

.portfolio-item {
    margin-bottom: 30px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    position: relative;
    transition: all 0.3s;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.portfolio-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 160, 227, 0.9);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
    padding: 20px;
    text-align: center;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay h4 {
    font-weight: 600;
    margin-bottom: 10px;
}

.about {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    margin-top: 30px;
}

.tech-item {
    display: flex;
    align-items: center;
    margin-right: 20px;
    margin-bottom: 15px;
    background-color: white;
    padding: 8px 15px;
    border-radius: 50px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.tech-item i {
    margin-right: 8px;
    color: var(--primary-color);
}

.tech-item span {
    font-weight: 500;
}

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

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 10px 50px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: white;
    border: 4px solid var(--primary-color);
    border-radius: 50%;
    top: 15px;
    z-index: 1;
}

.left {
    left: 0;
}

.right {
    left: 50%;
}

.left::after {
    right: -10px;
}

.right::after {
    left: -10px;
}

.timeline-content {
    padding: 20px 30px;
    background-color: white;
    position: relative;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.contact {
    background-color: white;
}

.contact-info {
    display: flex;
    margin-bottom: 20px;
}

.contact-icon {
    margin-right: 15px;
    color: var(--primary-color);
    font-size: 1.5rem;
    width: 40px;
    text-align: center;
}

.form-control {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
}

.form-control:focus {
    box-shadow: none;
    border-color: var(--primary-color);
}

footer {
    background-color: var(--secondary-color);
    color: white;
    padding: 50px 0 20px;
}

footer .footer-links h5 {
    color: white;
    font-weight: 600;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

footer .footer-links ul {
    list-style: none;
    padding: 0;
}

footer .footer-links ul li {
    margin-bottom: 10px;
}

footer .footer-links ul li a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.3s;
}

footer .footer-links ul li a:hover {
    color: var(--primary-color);
}

.social-icons {
    display: flex;
    margin-top: 20px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.1);
    color: white;
    margin-right: 10px;
    transition: all 0.3s;
    font-size: 1.2rem;
}

.social-icons a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.copyright {
    padding-top: 30px;
    margin-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
    color: #aaa;
    text-align: center;
}

/* ============================================
   RESPONSIVE MEDIA QUERIES
   ============================================ */

/* Large tablets and below (991px and down) - Navigation breakpoint */
@media (max-width: 991px) {
    .navbar .nav-link {
        margin: 5px 0;
        padding: 10px 15px;
    }

    .navbar-collapse {
        background-color: white;
        padding: 15px;
        margin-top: 10px;
        border-radius: 8px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }

    .navbar-toggler {
        padding: 8px 12px;
        border: 2px solid var(--primary-color);
    }

    .navbar-toggler:focus {
        box-shadow: 0 0 0 0.25rem rgba(0, 160, 227, 0.25);
    }
}

/* Tablet and below (768px and down) */
@media (max-width: 768px) {
    /* Typography Adjustments */
    .hero h1 {
        font-size: 2rem;
        line-height: 1.2;
        margin-bottom: 15px;
    }

    .hero p {
        font-size: 1rem;
        margin-bottom: 20px;
        max-width: 100%;
    }

    section h2 {
        font-size: 1.75rem;
        margin-bottom: 30px;
    }

    .service-card h3 {
        font-size: 1.25rem;
    }

    /* Spacing Adjustments */
    .hero {
        padding: 60px 0;
    }

    section {
        padding: 60px 0;
    }

    .service-card {
        padding: 20px;
        margin-bottom: 20px;
    }

    /* Layout Adjustments */
    .navbar-brand img {
        height: 45px;
    }

    .portfolio-img {
        height: 200px;
    }

    /* Timeline Mobile Layout - Stack vertically */
    .timeline {
        max-width: 100%;
        padding: 0 15px;
    }

    .timeline::after {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 50px;
        padding-right: 15px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .timeline-item.left,
    .timeline-item.right {
        left: 0;
    }

    .timeline-item::after {
        left: 10px;
    }

    .left::after,
    .right::after {
        left: 10px;
    }

    .timeline-content {
        padding: 15px 20px;
    }

    /* Footer Adjustments */
    footer {
        text-align: center;
    }

    .footer-links {
        margin-bottom: 30px;
    }

    .social-icons {
        justify-content: center;
    }

    /* Tech Stack */
    .tech-stack {
        justify-content: center;
    }
}

/* Mobile devices (576px and down) */
@media (max-width: 576px) {
    /* Further Typography Reduction */
    .hero h1 {
        font-size: 1.75rem;
    }

    section h2 {
        font-size: 1.5rem;
    }

    /* Tighter Spacing */
    .hero {
        padding: 40px 0;
    }

    section {
        padding: 40px 0;
    }

    .service-card {
        padding: 15px;
    }

    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.75rem;
    }

    /* Image Sizing */
    .portfolio-img {
        height: 180px;
    }

    .hero .col-lg-6 img {
        max-height: 250px;
        width: auto;
        margin: 20px auto;
        display: block;
    }

    /* Contact Info */
    .contact-info {
        flex-direction: column;
        text-align: center;
    }

    .contact-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
}

/* Very small mobile devices (480px and down) */
@media (max-width: 480px) {
    .navbar-brand img {
        height: 40px;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .hero {
        padding: 30px 0;
    }

    section {
        padding: 30px 0;
    }

    .btn-primary,
    .btn-outline-primary {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Landscape mobile orientation */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 40px 0;
    }

    section {
        padding: 50px 0;
    }
}

/* Touch Target Size Improvements */
.social-icons a {
    width: 44px;
    height: 44px;
}

/* Hover Effects - Only on Devices with Hover Capability */
@media (hover: hover) {
    .service-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    }

    .portfolio-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    }

    .btn-primary:hover {
        background-color: #0086c0;
        border-color: #0086c0;
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(0, 160, 227, 0.3);
    }

    .btn-outline-primary:hover {
        background-color: var(--primary-color);
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(0, 160, 227, 0.3);
    }

    .navbar .nav-link:hover {
        color: var(--primary-color);
    }

    .social-icons a:hover {
        background-color: var(--primary-color);
        transform: translateY(-3px);
    }

    footer .footer-links ul li a:hover {
        color: var(--primary-color);
    }
}

/* Active states for touch devices */
@media (hover: none) {
    .service-card:active,
    .portfolio-item:active {
        transform: scale(0.98);
    }

    .btn-primary:active,
    .btn-outline-primary:active {
        transform: scale(0.97);
    }
}

/* Accessibility Enhancements */
.service-card:focus-within,
.portfolio-item:focus-within {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

a:focus,
button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip Link for Keyboard Navigation */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 1000;
    border-radius: 0 0 4px 0;
}

.skip-link:focus {
    top: 0;
}