.section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.2rem;
    font-weight: 600;
    color: var(--accent-green);
}

.section-label::before {
    content: '';
    width: 32px;
    height: 2px;
    background: currentColor;
}

.faq {
    /* background: linear-gradient(180deg, #ffffff 0%, var(--bg-light) 100%); */
    background: linear-gradient(135deg, #f8f9fa 0%, #e8ecef 100%);
    /* padding: 6rem 0; */
}

.faq-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 3rem;
}

.faq-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
}

.faq-intro {
    color: var(--text-gray);
    font-size: 1.1rem;
}

.faq-grid {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.faq-item {
    border: 1px solid rgba(45, 45, 45, 0.08);
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: 0 15px 40px rgba(45, 45, 45, 0.08);
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.faq-item[open] {
    border-color: var(--accent-green);
    box-shadow: 0 20px 45px rgba(92, 230, 92, 0.2);
}

.faq-item summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary i {
    transition: transform 0.3s ease;
}

.faq-item[open] summary i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 2rem 1.8rem;
    color: var(--text-gray);
    font-size: 1rem;
}

.faq-cta {
    margin: 4rem auto 0;
    max-width: 860px;
    text-align: center;
    padding: 3rem;
    border-radius: 1.5rem;
    background: linear-gradient(135deg, rgba(92, 230, 92, 0.1), rgba(59, 191, 59, 0.15));
    border: 1px solid rgba(59, 191, 59, 0.25);
    box-shadow: 0 25px 60px rgba(45, 45, 45, 0.12);
}

.faq-cta h3 {
    font-size: clamp(2rem, 3vw, 2.6rem);
    margin-top: 0.5rem;
    color: var(--text-dark);
}

.faq-cta p {
    color: var(--text-gray);
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

.faq-cta-eyebrow {
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.2rem;
    font-weight: 600;
    color: var(--accent-green);
}

.faq-cta .cta-button {
    margin: 0 auto;
}

@media (max-width: 768px) {
    .faq {
        /* padding: 2rem 0; */
    }

    .faq-item summary,
    .faq-answer {
        padding: 1.25rem 1.5rem;
    }

    .faq-cta {
        padding: 2.25rem 1.75rem;
    }
}

:root {
    --bg-light: #e8ecef;
    --bg-dark: #2d2d2d;
    --text-dark: #2d2d2d;
    --text-light: #ffffff;
    --accent-green: #5ce65c;
    --underline-delay: 0.35s;
    --text-gray: #5a5a5a;
    /* Improved from #6b7280 for better contrast */
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --error-color: #dc2626;
    --success-color: #16a34a;
    --focus-outline: 3px solid #0066cc;
    --focus-outline-offset: 2px;
}

/* Accessibility utilities */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip to main content link */
.skip-to-main {
    position: absolute;
    top: -100px;
    left: 0;
    background-color: var(--bg-dark);
    color: var(--text-light);
    padding: 1rem 2rem;
    text-decoration: none;
    font-weight: 600;
    z-index: 10000;
    transition: top 0.3s ease;
}

.skip-to-main:focus {
    top: 0;
    outline: var(--focus-outline);
    outline-offset: var(--focus-outline-offset);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Focus visible for all interactive elements */
*:focus {
    outline: var(--focus-outline);
    outline-offset: var(--focus-outline-offset);
}

*:focus:not(:focus-visible) {
    outline: none;
}

*:focus-visible {
    outline: var(--focus-outline);
    outline-offset: var(--focus-outline-offset);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 0;
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .service-card,
    .technology-card {
        opacity: 1 !important;
        transform: none !important;
    }
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #ffffff;
    overflow-x: hidden;
    font-size: 16px;
    /* Base font size for better readability */
}

/* Ensure links are distinguishable */
a {
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

a:hover,
a:focus {
    text-decoration-thickness: 2px;
}

/* Remove underline from navigation and button-style links */
.nav-menu a,
.social-links a,
.btn,
.logo a,
.hamburger {
    text-decoration: none;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: background 0.35s ease, box-shadow 0.35s ease;
}

.header.scrolled {
    background: #ffffff;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.header.scrolled .navbar {
    padding: 0.9rem 2.5rem;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2.5rem;
    width: 100%;
    transition: padding 0.35s ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* CTA Button in Header */
.cta-button {
    background: linear-gradient(135deg, var(--accent-green), #3bbf3b);
    color: white;
    border: none;
    padding: 0.9rem 1.8rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
    box-shadow: 0 4px 15px rgba(92, 230, 92, 0.3);
}

.cta-button::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--accent-green), #3bbf3b, var(--accent-green));
    border-radius: 50px;
    opacity: 0;
    z-index: -1;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {

    0%,
    100% {
        opacity: 0;
        transform: scale(1);
    }

    50% {
        opacity: 0.3;
        transform: scale(1.05);
    }
}

.cta-button i {
    font-size: 1.1rem;
    animation: iconBounce 2s ease-in-out infinite;
}

@keyframes iconBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(92, 230, 92, 0.4);
    background: linear-gradient(135deg, #3bbf3b, var(--accent-green));
}

.cta-button:hover i {
    animation: iconShake 0.5s ease-in-out;
}

@keyframes iconShake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-3px);
    }

    75% {
        transform: translateX(3px);
    }
}

.cta-button:focus {
    outline: var(--focus-outline);
    outline-offset: 4px;
}

.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 35px;
    height: 20px;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s ease;
    background: transparent;
    border: none;
    padding: 0;
}

.hamburger:hover {
    opacity: 0.8;
}

.hamburger:focus {
    outline: var(--focus-outline);
    outline-offset: 5px;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-dark);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform-origin: center;
}

.hamburger.active span {
    background-color: var(--text-light);
}

.hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 999;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.nav-menu {
    list-style: none;
    text-align: center;
}

.nav-menu li {
    margin: 1.5rem 0;
    transform: translateY(30px);
    opacity: 0;
    transition: all 0.4s ease;
}

.menu-overlay.active .nav-menu li {
    transform: translateY(0);
    opacity: 1;
}

.menu-overlay.active .nav-menu li:nth-child(1) {
    transition-delay: 0.1s;
}

.menu-overlay.active .nav-menu li:nth-child(2) {
    transition-delay: 0.2s;
}

.menu-overlay.active .nav-menu li:nth-child(3) {
    transition-delay: 0.3s;
}

.menu-overlay.active .nav-menu li:nth-child(4) {
    transition-delay: 0.4s;
}

.menu-overlay.active .nav-menu li:nth-child(5) {
    transition-delay: 0.5s;
}

.menu-overlay.active .nav-menu li:nth-child(6) {
    transition-delay: 0.6s;
}

.nav-menu a {
    font-size: 3rem;
    font-weight: 400;
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.nav-menu a:hover,
.nav-menu a:focus {
    transform: scale(1.1);
    color: rgba(255, 255, 255, 0.7);
}

.nav-menu a:focus {
    outline: 3px solid #ffffff;
    outline-offset: 8px;
}

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    background-color: var(--bg-light);
    overflow: hidden;
    padding-bottom: 4rem;
}

.hero-content {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 1400px;
    padding: 0 2rem;
    gap: 3rem;
}

.hero-left {
    text-align: right;
    flex: 1;
}

.hero-title {
    font-size: 6rem;
    font-weight: normal;
    line-height: 1;
    color: var(--text-dark);
    letter-spacing: -2px;
}

.hero-title span {
    display: block;
}

.social-links {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-top: 2rem;
    gap: 0.5rem;
}

.social-links a {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-gray);
    text-decoration: none;
    letter-spacing: 2px;
    transition: color 0.3s ease;
    position: relative;
}

.social-links a:hover,
.social-links a:focus {
    color: var(--text-dark);
}

.social-links a:focus {
    outline: var(--focus-outline);
    outline-offset: 4px;
}

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

.profile-wrapper {
    position: relative;
    width: 400px;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-image-container {
    position: relative;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border: 5px solid white;
    animation: heroImageReveal 1.1s cubic-bezier(0.19, 1, 0.22, 1) forwards;
    transform: translateY(-160px);
    opacity: 0;
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: var(--accent-green);
}

@keyframes heroImageReveal {
    0% {
        transform: translateY(-160px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.hero-right {
    text-align: left;
    flex: 1;
}

.hero-subtitle {
    font-size: 4rem;
    font-weight: normal;
    line-height: 1;
    color: var(--text-dark);
    letter-spacing: -2px;
}

.hero-subtitle span {
    display: block;
}

.hero-description {
    margin-top: 1.5rem;
    margin-left: 4px;
    padding-left: 0;
    font-size: 0.9rem;
    color: var(--text-gray);
    line-height: 1.6;
    text-align: left;
}

.animate-from-left {
    opacity: 0;
    transform: translateX(-80px);
    animation: slideFromLeft 1s ease forwards;
}

.animate-from-right {
    opacity: 0;
    transform: translateX(80px);
    animation: slideFromRight 1s ease forwards;
}

.delay-1 {
    animation-delay: 0.3s;
}

.delay-2 {
    animation-delay: 0.6s;
}

@keyframes slideFromLeft {
    from {
        opacity: 0;
        transform: translateX(-80px);
    }

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

@keyframes slideFromRight {
    from {
        opacity: 0;
        transform: translateX(80px);
    }

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

.scroll-arrow {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-gray);
    animation: bounce 2s infinite;
    transition: color 0.3s ease;
    padding: 0.5rem;
    text-decoration: none;
}

.scroll-arrow:hover,
.scroll-arrow:focus {
    color: var(--text-dark);
}

.scroll-arrow:focus {
    outline: var(--focus-outline);
    outline-offset: 4px;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-15px);
    }

    60% {
        transform: translateX(-50%) translateY(-7px);
    }
}

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

section {
    padding: 2rem 0;
}

section:not(.hero) h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--text-dark);
    font-weight: 700;
}

/* Animated underline for headings (h1, h2, h3) — grows to 50% of the heading width */
h1,
h2,
h3 {
    position: relative;
    display: inline-block;
    padding-bottom: 0.6rem;
    font-weight: normal;
}

/* h1 underline - right aligned, animates right to left */
h1::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    transform: none;
    height: 4px;
    width: 0%;
    background: linear-gradient(270deg, var(--accent-green), #3bbf3b);
    border-radius: 3px;
    opacity: 0.95;
    animation: underlineGrowRight 700ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: var(--underline-delay);
}

/* h2 and h3 underline - left aligned, animates left to right */
h2::after,
h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    transform: none;
    height: 4px;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-green), #3bbf3b);
    border-radius: 3px;
    opacity: 0.95;
    animation: underlineGrow 700ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: var(--underline-delay);
}

@keyframes underlineGrow {
    to {
        width: 50%;
    }
}

@keyframes underlineGrowRight {
    to {
        width: 50%;
    }
}

.about {
    background-color: #ffffff;
    position: relative;
    border-top: 1px solid #d1d5db;
    will-change: transform;
}

/* About section — two column layout */
.about .container {
    max-width: 1200px;
    margin: 0 auto;
    /* padding: 2.5rem 2rem; */
}

.about-content {
    display: block;
}

.about-text {
    width: 100%;
    max-width: 100%;
}

.about-text h2 {
    margin-bottom: 1.5rem;
}

.about-text p {
    font-size: 1.05rem;
    text-align: left;
    margin: 0.5rem 0 0 0;
    color: var(--text-gray);
    line-height: 1.8;
}

.about-text h3 {
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

/* Achievement Cards */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.achievement-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
}

.achievement-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-green), #3bbf3b);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.achievement-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-green);
    box-shadow: 0 12px 24px rgba(92, 230, 92, 0.15);
}

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

.achievement-card:hover .achievement-icon {
    transform: scale(1.1) rotate(5deg);
    background: var(--accent-green);
    color: white;
}

.achievement-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--accent-green);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.achievement-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.achievement-content p {
    font-size: 0.9rem;
    color: var(--text-gray);
    margin: 0;
    line-height: 1.5;
}

/* Animate achievement cards on scroll */
.achievement-card.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Services Section */
.services {
    background: linear-gradient(135deg, #f8f9fa 0%, #e8ecef 100%);
    /* padding: 2rem 0; */
    position: relative;
    overflow-x: hidden;
    overflow-y: visible;
    will-change: transform;
}

.services .container {
    overflow: visible;
}

.services h2 {
    text-align: center;
    margin-bottom: 1rem;
}

.services-intro {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-gray);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    /* max-width: 1000px; */
    margin: 0 auto;
    overflow: visible;
}

.service-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.6s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    border: 2px solid transparent;
    opacity: 0;
}

.service-card[data-slide="left"] {
    transform: translateX(-60px);
}

.service-card[data-slide="right"] {
    transform: translateX(60px);
}

.service-card.visible {
    opacity: 1;
    transform: translateX(0);
}

.service-card:hover {
    box-shadow: 0 12px 24px rgba(92, 230, 92, 0.15);
    border-color: var(--accent-green);
}

.service-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--accent-green), #3bbf3b);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: all 0.4s ease;
}

.service-icon i {
    font-size: 2rem;
    color: white;
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 8px 16px rgba(92, 230, 92, 0.3);
}

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

.service-card h3::after {
    display: none;
}

.service-card p {
    font-size: 1rem;
    color: var(--text-gray);
    line-height: 1.7;
    margin: 0;
}

/* Technologies Section */
.technologies {
    /* padding: 5rem 0 3rem; */
    background: #ffffff;
}

.technologies .container {
    max-width: 1200px;
    margin: 0 auto;
}

.tech-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.tech-intro {
    font-size: 1rem;
    color: var(--text-gray);
    max-width: 720px;
    margin: 0.5rem auto 0;
}

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

.technology-card {
    position: relative;
    border-radius: 18px;
    border: 1px solid rgba(45, 45, 45, 0.08);
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 60%);
    padding: 1.75rem 1rem;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 0 15px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease, opacity 0.35s ease;
    opacity: 0;
    transform: translateY(30px);
}

.technology-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.technology-card:hover,
.technology-card:focus-within {
    transform: translateY(-6px);
    box-shadow: 0 20px 35px rgba(15, 23, 42, 0.15);
    border-color: var(--accent-green);
}

.tech-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.9rem;
    background: linear-gradient(135deg, var(--accent-green), #3bbf3b);
    color: white;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.technology-card span {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.technology-card[data-tech="docker"] .tech-icon {
    background: linear-gradient(135deg, #0db7ed, #1d4ed8);
}

.technology-card[data-tech="php"] .tech-icon {
    background: linear-gradient(135deg, #777bb3, #4338ca);
}

.technology-card[data-tech="wordpress"] .tech-icon {
    background: linear-gradient(135deg, #21759b, #0f172a);
}

.technology-card[data-tech="css"] .tech-icon {
    background: linear-gradient(135deg, #264de4, #38bdf8);
}

.technology-card[data-tech="html"] .tech-icon {
    background: linear-gradient(135deg, #f97316, #c2410c);
}

.technology-card[data-tech="javascript"] .tech-icon {
    background: linear-gradient(135deg, #facc15, #f97316);
    color: #0f172a;
}

.technology-card[data-tech="linux"] .tech-icon {
    background: linear-gradient(135deg, #000000, #475569);
}

.technology-card[data-tech="bash"] .tech-icon {
    background: linear-gradient(135deg, #0f172a, #22d3ee);
}

.technology-card[data-tech="terraform"] .tech-icon {
    background: linear-gradient(135deg, #5c4ee5, #a855f7);
}

.technology-card[data-tech="ansible"] .tech-icon {
    background: #ffffff;
    border: 2px solid #000;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.technology-card[data-tech="ansible"] .tech-icon img {
    width: 56px;
    height: 56px;
    display: block;
}

.technology-card[data-tech="github"] .tech-icon {
    background: linear-gradient(135deg, #000000, #111827);
}

.technology-card[data-tech="flutter"] .tech-icon {
    background: #ffffff;
    border: 2px solid #e2e8f0;
}

.technology-card[data-tech="flutter"] .tech-icon img {
    width: 56px;
    height: 56px;
    display: block;
}

.technology-card[data-tech="java"] .tech-icon {
    background: linear-gradient(135deg, #ea2d2e, #9f1239);
}

.technology-card[data-tech="ai"] .tech-icon {
    background: linear-gradient(135deg, #06b6d4, #7c3aed);
}

@media (max-width: 768px) {
    .technologies-grid {
        gap: 1rem;
    }
}

/* Animate achievement cards on scroll */
.achievement-card.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.about-cta {
    flex-shrink: 0;
    width: 320px;
    padding-left: 4rem;
    border-left: 2px solid #d1d5db;
    display: flex;
    flex-direction: column;
}

.cta-box {
    background: transparent;
    padding: 0;
    border-radius: 0;
    text-align: left;
    box-shadow: none;
    border: none;
}

.cta-box h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-weight: 600;
}

.cta-box p {
    font-size: 0.95rem;
    color: var(--text-gray);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.cta-box .btn {
    width: auto;
    text-align: center;
}

/* Section headers: inline-block so underline sizes to text; left-align on non-hero sections */
section:not(.hero) h2 {
    display: inline-block;
    text-align: left;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .about-content {
        flex-direction: column;
        gap: 2rem;
    }

    .achievements-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .achievement-card {
        padding: 1.25rem;
    }

    .achievement-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .achievement-content h4 {
        font-size: 1rem;
    }

    .achievement-content p {
        font-size: 0.85rem;
    }

    .about-cta {
        width: 100%;
        padding-left: 0;
        padding-top: 2rem;
        border-left: none;
        border-top: 2px solid #d1d5db;
    }

    .about-text p {
        text-align: left;
    }

    /* Services responsive */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1.25rem;
    }

    .service-card {
        padding: 2rem;
    }

    .service-icon {
        width: 60px;
        height: 60px;
    }

    .service-icon i {
        font-size: 1.75rem;
    }

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

    .service-card p {
        font-size: 0.95rem;
    }
}

.projects {
    background-color: var(--bg-light);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.project-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 600;
}

.project-info p {
    margin-bottom: 1rem;
    color: var(--text-gray);
}

.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:focus {
    outline: var(--focus-outline);
    outline-offset: 4px;
}

.btn-primary {
    background-color: var(--text-dark);
    color: var(--text-light);
    border: 2px solid var(--text-dark);
}

.btn-primary:hover,
.btn-primary:focus {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    background-color: #3d3d3d;
    border-color: #3d3d3d;
}

/* Make submit button more prominent in contact form */
.contact-overlay .btn-primary {
    background-color: var(--text-light);
    color: var(--text-dark);
    border: 2px solid var(--text-light);
    font-weight: 700;
    padding: 1rem 2.5rem;
    font-size: 1.05rem;
}

.contact-overlay .btn-primary:hover,
.contact-overlay .btn-primary:focus {
    background-color: var(--accent-green);
    border-color: var(--accent-green);
    color: var(--text-dark);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-dark);
    border: 2px solid var(--text-dark);
}

.btn-secondary:hover,
.btn-secondary:focus {
    background-color: var(--text-dark);
    color: var(--text-light);
}

.contact {
    background-color: #ffffff;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

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

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

.required {
    color: var(--error-color);
    font-weight: bold;
}

.form-hint {
    display: block;
    font-size: 0.875rem;
    color: var(--text-gray);
    margin-top: 0.25rem;
}

.contact-overlay .form-hint {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.error-message {
    display: block;
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    min-height: 1.25rem;
}

.error-message:empty {
    display: none;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

/* Honeypot field - hidden from real users */
.honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Contact Form Overlay */
.contact-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1100;
    overflow-y: auto;
}

.contact-overlay.active {
    opacity: 1;
    visibility: visible;
}

.close-contact {
    position: absolute;
    top: 2.5rem;
    right: 2.5rem;
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.3s ease;
    z-index: 1101;
}

.close-contact:hover,
.close-contact:focus {
    transform: rotate(90deg);
    opacity: 0.7;
}

.close-contact:focus {
    outline: 3px solid #ffffff;
    outline-offset: 4px;
}

.contact-form-container {
    max-width: 600px;
    width: 90%;
    transform: translateY(30px);
    opacity: 0;
    transition: all 0.4s ease;
    transition-delay: 0.1s;
    margin: auto;
    padding: 4rem 0;
}

.contact-overlay.active .contact-form-container {
    transform: translateY(0);
    opacity: 1;
}

.contact-form-container h2 {
    color: var(--text-light);
    text-align: left !important;
    margin-bottom: 2rem;
    display: inline-block !important;
}

.contact-overlay .form-group label {
    color: var(--text-light);
}

.contact-overlay p {
    color: var(--text-light);
}

.form-message {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 8px;
    display: none;
}

.form-message.success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
    display: block;
}

.form-message.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    display: block;
}

.thank-you-message {
    text-align: center;
    color: var(--text-light);
    max-width: 500px;
    margin: 0 auto;
}

.success-icon {
    margin-bottom: 2rem;
    animation: scaleIn 0.5s ease;
}

.success-icon svg {
    stroke: var(--accent-green);
    filter: drop-shadow(0 0 20px rgba(92, 230, 92, 0.5));
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.thank-you-message h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.thank-you-message p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.8);
}

#submitBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}


.footer {
    background-color: #ffffff;
    color: var(--text-dark);
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid #d1d5db;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer .social-links {
    flex-direction: row;
    align-items: center;
    margin-top: 0;
}

.footer .social-links a {
    color: var(--text-gray);
    opacity: 0.8;
    padding: 0.5rem;
    /* Increase touch target */
    display: inline-block;
}

.footer .social-links a:hover,
.footer .social-links a:focus {
    opacity: 1;
    color: var(--text-dark);
}

/* Reduce h1 font size for mid-size screens */
@media (max-width: 1215px) {

    .hero-title,
    .hero-subtitle {
        font-size: 5rem;
    }
}

/* Responsive CTA button */
@media (max-width: 768px) {
    .navbar {
        padding: 1.5rem 1.5rem;
    }

    .cta-button {
        padding: 0.75rem 1.2rem;
        font-size: 0.8rem;
    }

    .cta-button span {
        display: none;
    }

    .cta-button i {
        font-size: 1.3rem;
        margin: 0;
    }
}

/* Switch to mobile layout below 1100px */
@media (max-width: 1100px) {
    .hero-content {
        flex-direction: column;
        gap: 1.5rem;
        padding: 3rem 1.5rem 3rem;
        justify-content: flex-start;
    }

    .hero {
        min-height: 100vh;
        padding-top: 2rem;
    }

    .hero-left {
        text-align: center;
        order: 2;
    }

    .hero-center {
        order: 1;
        margin-top: 2rem;
    }

    .hero-right {
        text-align: center;
        order: 3;
    }

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

    .hero-description {
        text-align: center;
        margin-left: 0;
        padding-left: 0;
    }

    .social-links {
        align-items: center;
        flex-direction: row;
        justify-content: center;
        gap: 1.5rem;
        margin-top: 1rem;
    }

    .profile-wrapper {
        width: 280px;
        height: 280px;
    }

    .profile-image-container {
        width: 200px;
        height: 200px;
    }

    .nav-menu a {
        font-size: 2rem;
    }

    .hero-description br {
        display: none;
    }

    section h2 {
        font-size: 2rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {

    .hero-content {
        gap: 1.5rem;
        padding: 4rem 1rem 3rem;
    }

    .hero-title,
    .hero-subtitle {
        font-size: 2rem;
        letter-spacing: -1px;
    }

    .profile-wrapper {
        width: 220px;
        height: 220px;
    }

    .profile-image-container {
        width: 160px;
        height: 160px;
    }

    .social-links {
        flex-direction: row;
        gap: 1rem;
        margin-top: 0.75rem;
    }

    .social-links a {
        font-size: 0.7rem;
    }

    .hero-description {
        font-size: 0.85rem;
        margin-top: 1rem;
    }

    .nav-menu a {
        font-size: 1.5rem;
    }
}

/* Ensure touch targets are at least 44x44px on mobile (WCAG 2.2 Level AAA: 2.5.8) */
@media (max-width: 768px) {

    /* Smaller hamburger icon on mobile to prevent cross cutoff */
    .hamburger {
        width: 28px;
        height: 18px;
        min-width: 44px;
        min-height: 44px;
        padding: 13px 8px;
    }

    .hamburger span {
        height: 2px;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .btn,
    .social-links a,
    .nav-menu a,
    .close-contact,
    .scroll-arrow {
        min-width: 44px;
        min-height: 44px;
    }

    .hero-description {
        position: relative;
        display: block;
        margin: 1.75rem auto 0;
        padding: 1.5rem 1.75rem 1.75rem;
        font-size: 1.05rem;
        font-weight: 600;
        color: var(--text-dark);
        background: rgba(255, 255, 255, 0.9);
        border-radius: 1.5rem;
        border: 1px solid rgba(45, 45, 45, 0.05);
        box-shadow: 0 20px 50px rgba(45, 45, 45, 0.18);
        max-width: 22rem;
        line-height: 1.75;
        letter-spacing: 0.01em;
        text-align: center;
        backdrop-filter: blur(8px);
    }

    .hero-description::before {
        content: '';
        display: block;
        width: 64px;
        height: 3px;
        border-radius: 999px;
        background: linear-gradient(90deg, var(--accent-green), #3bbf3b);
        margin: 0 auto 0.85rem;
        box-shadow: 0 6px 18px rgba(92, 230, 92, 0.35);
    }

    .hero-title::after,
    .hero-subtitle::after {
        display: none;
    }
}