/* ===================================
   MODERN DESIGN ENHANCEMENTS
   Premium, Minimal, Unique Styles
   =================================== */

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

/* Modern glassmorphism effects */
.glassmorphism {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Enhanced gradient text */
.gradient-text {
    background: linear-gradient(135deg, #4fc3f7 0%, #00bcd4 50%, #0097a7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Modern card hover effects */
.modern-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.modern-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(79, 195, 247, 0.1), transparent);
    transition: left 0.5s;
}

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

.modern-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(79, 195, 247, 0.15);
    border-color: rgba(79, 195, 247, 0.3);
}

/* Animated underline effect */
.animated-underline {
    position: relative;
    display: inline-block;
}

.animated-underline::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: linear-gradient(90deg, #4fc3f7, #00bcd4);
    transition: width 0.3s ease;
}

.animated-underline:hover::after {
    width: 100%;
}

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

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* Pulse animation for icons */
@keyframes pulse-ring {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

.pulse-icon::before {
    content: '';
    position: absolute;
    inset: -8px;
    border: 2px solid #4fc3f7;
    border-radius: 50%;
    animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Enhanced tag styles */
.tag {
    background: rgba(79, 195, 247, 0.1);
    color: #4fc3f7;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(79, 195, 247, 0.2);
    transition: all 0.3s ease;
    display: inline-block;
    letter-spacing: 0.02em;
}

.tag:hover {
    background: rgba(79, 195, 247, 0.2);
    border-color: rgba(79, 195, 247, 0.4);
    transform: scale(1.05);
}

/* Modern skill icons grid */
.skills-icons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.skill-item::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(79, 195, 247, 0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.skill-item:hover::before {
    opacity: 1;
}

.skill-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(79, 195, 247, 0.3);
    transform: translateY(-4px) scale(1.02);
}

.skill-item img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.skill-item:hover img {
    transform: scale(1.1) rotate(5deg);
}

.skill-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    text-align: center;
    letter-spacing: 0.02em;
}

/* Project cards with modern design */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.project-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.project-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(79, 195, 247, 0.2), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s;
}

.project-card:hover::after {
    opacity: 1;
}

.project-card:hover {
    transform: translateY(-6px);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 16px 48px rgba(79, 195, 247, 0.12);
}

.project-image {
    position: relative;
    overflow: hidden;
    height: 200px;
    background: linear-gradient(135deg, rgba(79, 195, 247, 0.05), rgba(0, 188, 212, 0.05));
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-image img {
    transform: scale(1.08);
}

.project-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(27, 31, 34, 0.8) 100%);
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    color: #ffffff;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    transition: color 0.3s;
}

.project-card:hover .project-content h3 {
    color: #4fc3f7;
}

.project-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

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

/* Modern filter buttons */
.project-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.6rem 1.2rem;
    border-radius: 24px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.03em;
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #4fc3f7, #00bcd4);
    opacity: 0;
    transition: opacity 0.3s;
}

.filter-btn span {
    position: relative;
    z-index: 1;
}

.filter-btn:hover {
    border-color: rgba(79, 195, 247, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 195, 247, 0.2);
}

.filter-btn.active {
    background: linear-gradient(135deg, #4fc3f7, #00bcd4);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 8px 24px rgba(79, 195, 247, 0.3);
}

/* Connect grid with modern cards */
.connect-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.connect-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.connect-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 195, 247, 0.1), transparent);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.connect-card:hover::before {
    width: 300px;
    height: 300px;
}

.connect-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(79, 195, 247, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(79, 195, 247, 0.15);
}

.connect-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(79, 195, 247, 0.08);
    border-radius: 14px;
    position: relative;
    z-index: 1;
    transition: all 0.3s;
}

.connect-card:hover .connect-icon {
    background: rgba(79, 195, 247, 0.15);
    transform: scale(1.1) rotate(5deg);
}

.connect-icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.connect-info {
    text-align: center;
    position: relative;
    z-index: 1;
}

.connect-info h4 {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.connect-info p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

/* Enhanced section headers */
.section-header h2 {
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4fc3f7, #00bcd4, #0097a7);
    border-radius: 2px;
}

/* Responsive improvements */
@media screen and (max-width: 980px) {
    .skills-icons {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 0.8rem;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.2rem;
    }
    
    .connect-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media screen and (max-width: 736px) {
    .skills-icons {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
        gap: 0.6rem;
    }
    
    .skill-item {
        padding: 0.8rem;
    }
    
    .skill-item img {
        width: 40px;
        height: 40px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .connect-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .project-filters {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .tag,
    .filter-btn,
    .connect-card,
    .project-card,
    .skill-item {
        border-width: 2px;
    }
}

/* ===================================
   CUSTOM SCROLLBAR
   =================================== */

/* Webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #4fc3f7, #00bcd4);
    border-radius: 5px;
    transition: background 0.3s;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #00bcd4, #0097a7);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #4fc3f7 rgba(0, 0, 0, 0.2);
}

/* ===================================
   LOADING STATES
   =================================== */

.loading-shimmer {
    position: relative;
    overflow: hidden;
}

.loading-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0,
        rgba(255, 255, 255, 0.05) 20%,
        rgba(255, 255, 255, 0.1) 60%,
        rgba(255, 255, 255, 0)
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* ===================================
   TOOLTIP STYLES
   =================================== */

[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 0.5rem 0.75rem;
    background: rgba(27, 31, 34, 0.95);
    color: #ffffff;
    font-size: 0.8rem;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    border: 1px solid rgba(79, 195, 247, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

[data-tooltip]:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}

/* ===================================
   ENHANCED BUTTON STYLES
   =================================== */

.button.primary {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.button.primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.button.primary:hover::before {
    width: 300px;
    height: 300px;
}

.button.primary:active {
    transform: scale(0.98);
}

/* ===================================
   BADGE STYLES
   =================================== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.7rem;
    background: rgba(79, 195, 247, 0.15);
    border: 1px solid rgba(79, 195, 247, 0.3);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #4fc3f7;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #4fc3f7;
    border-radius: 50%;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* ===================================
   PROGRESS INDICATOR
   =================================== */

.progress-ring {
    width: 60px;
    height: 60px;
    position: relative;
}

.progress-ring svg {
    transform: rotate(-90deg);
}

.progress-ring circle {
    fill: none;
    stroke: #4fc3f7;
    stroke-width: 4;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

/* ===================================
   SELECTION STYLES
   =================================== */

::selection {
    background: rgba(79, 195, 247, 0.3);
    color: #ffffff;
}

::-moz-selection {
    background: rgba(79, 195, 247, 0.3);
    color: #ffffff;
}

/* ===================================
   PRINT STYLES
   =================================== */

@media print {
    .scroll-progress,
    .skip-link,
    nav,
    .filter-btn,
    .connect-card,
    footer {
        display: none !important;
    }
    
    body {
        background: #ffffff;
        color: #000000;
    }
    
    .project-card,
    .skill-item,
    .modern-card {
        page-break-inside: avoid;
        border: 1px solid #cccccc;
    }
}

/* ===================================
   SCROLL ANIMATIONS
   =================================== */

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animation for grids */
.projects-grid .project-card:nth-child(1) { transition-delay: 0s; }
.projects-grid .project-card:nth-child(2) { transition-delay: 0.1s; }
.projects-grid .project-card:nth-child(3) { transition-delay: 0.2s; }
.projects-grid .project-card:nth-child(4) { transition-delay: 0.3s; }
.projects-grid .project-card:nth-child(5) { transition-delay: 0.4s; }
.projects-grid .project-card:nth-child(6) { transition-delay: 0.5s; }

/* Scale animation variant */
.scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.scale-in.is-visible {
    opacity: 1;
    transform: scale(1);
}

/* Slide from left */
.slide-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.slide-left.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* Slide from right */
.slide-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.slide-right.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .fade-in-up,
    .scale-in,
    .slide-left,
    .slide-right {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* ===================================
   SCROLL PROGRESS BAR
   =================================== */

#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #4fc3f7, #00bcd4);
    z-index: 9999;
    transition: width 0.1s ease;
    box-shadow: 0 0 10px rgba(79, 195, 247, 0.5);
}

/* ===================================
   BACK TO TOP BUTTON
   =================================== */

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #4fc3f7, #00bcd4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(79, 195, 247, 0.3);
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(79, 195, 247, 0.5);
}

.back-to-top:active {
    transform: scale(0.95);
}

@media screen and (max-width: 736px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* ===================================
   PROFILE IMAGE ENHANCEMENTS
   =================================== */

.profile-image-container {
    perspective: 1000px;
}

.profile-image-container img {
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    transform-style: preserve-3d;
}

.profile-image-container:hover img {
    transform: rotateY(5deg) rotateX(5deg) scale(1.05);
}

/* ===================================
   IMPROVED TAG HOVER EFFECTS
   =================================== */

.tag {
    position: relative;
    overflow: hidden;
}

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

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

/* ===================================
   ENHANCED FILTER BUTTONS
   =================================== */

.filter-btn {
    position: relative;
    overflow: hidden;
}

.filter-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #4fc3f7, #00bcd4);
    transform: translateX(-50%);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-btn:hover::after,
.filter-btn.active::after {
    width: 80%;
}

/* ===================================
   SKILL ICON ENHANCEMENTS
   =================================== */

.skill-item {
    perspective: 500px;
}

.skill-item img {
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

.skill-item:hover img {
    transform: rotateY(180deg) scale(1.1);
}

/* ===================================
   CONNECT CARD RIPPLE EFFECT
   =================================== */

.connect-card {
    position: relative;
    overflow: hidden;
}

.connect-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 195, 247, 0.3), transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    pointer-events: none;
}

.connect-card:hover::before {
    width: 300px;
    height: 300px;
}

/* ===================================
   PROJECT IMAGE ZOOM
   =================================== */

.project-image {
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.project-image img {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.3s;
    filter: brightness(0.95) contrast(1.1);
}

.project-card:hover .project-image img {
    transform: scale(1.1) rotate(1deg);
    filter: brightness(1.05) contrast(1.05);
}

/* ===================================
   ENHANCED SECTION DIVIDERS
   =================================== */

.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(79, 195, 247, 0.5), transparent);
    margin: 3rem 0;
    position: relative;
}

.section-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #4fc3f7;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(79, 195, 247, 0.8);
}

/* ===================================
   LOADING SPINNER
   =================================== */

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(79, 195, 247, 0.2);
    border-top-color: #4fc3f7;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===================================
   ENHANCED FOCUS STATES
   =================================== */

a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid #4fc3f7;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Skip to main content for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #4fc3f7;
    color: #1b1f22;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 0 0 4px 0;
    z-index: 10000;
}

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

/* ===================================
   SUBTLE PARALLAX EFFECT
   =================================== */

[data-parallax] {
    transform: translateZ(0);
    will-change: transform;
}

/* ===================================
   CODE BLOCK STYLING
   =================================== */

code {
    background: rgba(79, 195, 247, 0.1);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #4fc3f7;
}

pre {
    background: rgba(27, 31, 34, 0.8);
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid #4fc3f7;
    overflow-x: auto;
}

pre code {
    background: none;
    padding: 0;
    color: rgba(255, 255, 255, 0.9);
}

/* ===================================
   MINIMAL & COMPACT OVERRIDES
   =================================== */

/* Reduce all section headers for minimal aesthetic */
.section-header h2.major {
    font-size: 1.7rem !important;
    margin-bottom: 1rem !important;
}

/* Compact intro paragraphs */
article > p:not(.project-description) {
    font-size: 0.92rem !important;
    line-height: 1.5 !important;
    margin-bottom: 1.5rem !important;
}

/* Tighter card spacing - Keep reasonable padding */
.modern-card {
    padding: 1rem !important;
}

/* Reduce glassmorphism blur for cleaner look */
.glassmorphism {
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    background: rgba(255, 255, 255, 0.03) !important;
}

/* Compact project cards */
.project-content {
    padding: 1.2rem !important;
}

.project-content h3 {
    font-size: 1.1rem !important;
    margin-bottom: 0.4rem !important;
}

.project-description {
    font-size: 0.85rem !important;
    line-height: 1.4 !important;
    margin-bottom: 0.8rem !important;
}

/* Reduce project image height for compact design */
.project-image {
    height: 180px !important;
}

/* Compact tags */
.tag {
    padding: 0.35rem 0.7rem !important;
    font-size: 0.72rem !important;
    border-radius: 5px !important;
}

/* Smaller skill items */
.skill-item {
    padding: 0.8rem !important;
    gap: 0.4rem !important;
}

.skill-item img {
    width: 42px !important;
    height: 42px !important;
}

.skill-label {
    font-size: 0.75rem !important;
}

/* Compact skill category headers */
.skills-category h3 {
    font-size: 1rem !important;
    margin-bottom: 0.8rem !important;
    padding-left: 0.6rem !important;
}

/* Reduce skill grid gaps */
.skills-icons {
    gap: 0.8rem !important;
    margin-top: 0.8rem !important;
}

/* Compact filter buttons */
.filter-btn {
    padding: 0.5rem 1rem !important;
    font-size: 0.82rem !important;
}

.project-filters {
    gap: 0.6rem !important;
    margin-bottom: 1.8rem !important;
}

/* Tighter achievement cards */
.achievements-grid .modern-card {
    padding: 0.45rem !important;
}

/* Compact certification cards */
article#achievements h4 {
    font-size: 0.85rem !important;
    margin-bottom: 0.5rem !important;
}

/* Reduce connect card size */
.connect-card {
    padding: 1rem !important;
}

.connect-icon {
    width: 50px !important;
    height: 50px !important;
}

.connect-icon img {
    width: 28px !important;
    height: 28px !important;
}

.connect-info h4 {
    font-size: 0.9rem !important;
    margin-bottom: 0.2rem !important;
}

.connect-info p {
    font-size: 0.78rem !important;
}

/* Reduce grid gaps globally */
.projects-grid {
    gap: 1.3rem !important;
    margin-top: 1.8rem !important;
}

/* Minimal scroll progress bar */
#scroll-progress {
    height: 2px !important;
}

/* Compact back-to-top button */
.back-to-top {
    width: 45px !important;
    height: 45px !important;
    font-size: 1.3rem !important;
    bottom: 25px !important;
    right: 25px !important;
}

/* Reduce box shadows for cleaner look */
.modern-card:hover {
    box-shadow: 0 8px 28px rgba(79, 195, 247, 0.12) !important;
}

/* Minimal border styles */
.modern-card, .glassmorphism {
    border-width: 1px !important;
}

/* Compact responsive adjustments */
@media screen and (max-width: 980px) {
    .section-header h2.major {
        font-size: 1.6rem !important;
    }
    
    article > p {
        font-size: 0.9rem !important;
    }
    
    .project-image {
        height: 160px !important;
    }
}

@media screen and (max-width: 736px) {
    .section-header h2.major {
        font-size: 1.5rem !important;
    }
    
    .project-content {
        padding: 1rem !important;
    }
    
    .skill-item {
        padding: 0.7rem !important;
    }
    
    .modern-card {
        padding: 0.8rem !important;
    }
    
    .back-to-top {
        width: 42px !important;
        height: 42px !important;
        bottom: 20px !important;
        right: 20px !important;
    }
}

/* Ultra-minimal white space */
body {
    letter-spacing: -0.01em;
}

/* Tighter line heights */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.3 !important;
}

p {
    line-height: 1.5 !important;
}

/* Compact list items */
ul li, ol li {
    line-height: 1.4 !important;
}

/* Clean focus states (less bold) */
*:focus-visible {
    outline-width: 1px !important;
    outline-offset: 1px !important;
}

/* Minimal button padding */
.button {
    padding: 0.6rem 1.2rem !important;
    font-size: 0.85rem !important;
}

/* Reduce animation distances for subtlety */
.modern-card:hover {
    transform: translateY(-3px) !important;
}

.skill-item:hover {
    transform: translateY(-3px) scale(1.01) !important;
}

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

/* Cleaner gradients (less vibrant) */
.gradient-text {
    background: linear-gradient(135deg, #4fc3f7 0%, #00bcd4 50%, #0097a7 100%);
    opacity: 0.95;
}

/* Minimal transition durations */
.modern-card, .skill-item, .tag, .filter-btn {
    transition-duration: 0.25s !important;
}

/* ===================================
   ULTRA-CLEAN SPACING
   =================================== */

/* Remove excessive margins - but keep reasonable spacing */
article {
    padding: 2.5rem 0 !important;
}

/* Compact section spacing - increased for better readability */
.section-header {
    margin-bottom: 1.5rem !important;
}

/* Tighter about section - increased spacing */
.profile-header {
    gap: 1.5rem !important;
    margin-bottom: 1.8rem !important;
}

.profile-image-container {
    width: 140px !important;
    height: 140px !important;
    border-width: 2px !important;
}

/* Minimal experience bullets */
article#experience ul li {
    padding: 0.3rem 0 !important;
    padding-left: 1.3rem !important;
    font-size: 0.88rem !important;
}

/* Compact two-column grids in About section */
article#about [style*="grid"] {
    gap: 1rem !important;
}

/* Reduce space between categories */
.skills-category {
    margin-bottom: 1.8rem !important;
}

/* Keep last category with some spacing */
.skills-category:last-child {
    margin-bottom: 1rem !important;
}

/* Minimal achievement section spacing */
article#achievements > div {
    margin-bottom: 1.8rem !important;
}

article#achievements h3 {
    font-size: 1rem !important;
    margin-bottom: 0.7rem !important;
    padding-bottom: 0.5rem !important;
}

/* Compact certification grids - Keep minimal gap */
article#achievements [style*="grid"] {
    gap: 0.5rem !important;
}

/* Clean connect grid */
.connect-grid {
    gap: 1.2rem !important;
    margin-top: 1.8rem !important;
}

/* Minimal form elements */
.field {
    margin-bottom: 1rem !important;
}

input[type="text"],
input[type="email"],
textarea {
    padding: 0.7rem !important;
    font-size: 0.88rem !important;
}

label {
    font-size: 0.85rem !important;
    margin-bottom: 0.4rem !important;
}

/* Remove redundant spacing - FIX: Keep horizontal margins */
.major {
    margin-bottom: 0.8rem !important;
}

/* Tighter list styles */
ul.icons {
    margin-top: 0.8rem !important;
}

ul.icons li {
    padding: 0 0.4rem !important;
}

/* Minimal contact icons */
ul.icons a {
    font-size: 1rem !important;
}

/* Reduce wrapper padding on mobile */
@media screen and (max-width: 736px) {
    article {
        padding: 2rem 0 !important;
    }
    
    .profile-header {
        gap: 1rem !important;
        flex-direction: column !important;
        margin-bottom: 1.5rem !important;
    }
    
    .profile-image-container {
        width: 120px !important;
        height: 120px !important;
    }
    
    .section-header {
        margin-bottom: 1.2rem !important;
    }
}

/* Minimal empty space between sections */
#main > article + article {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 2.5rem !important;
}

/* Ultra-compact mode for very focused content */
.ultra-compact .modern-card {
    padding: 0.7rem !important;
}

.ultra-compact h3 {
    font-size: 1rem !important;
}

.ultra-compact p {
    font-size: 0.85rem !important;
}

/* Clean, minimal shadows */
.modern-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.glassmorphism {
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12) !important;
}

/* Subtle, clean hover effects */
.modern-card:hover {
    box-shadow: 0 6px 20px rgba(79, 195, 247, 0.1) !important;
}

/* Minimal border-radius for cleaner look */
.modern-card {
    border-radius: 10px !important;
}

.glassmorphism {
    border-radius: 10px !important;
}

.tag {
    border-radius: 4px !important;
}

/* Clean typography - remove excessive boldness */
strong {
    font-weight: 600 !important;
}

/* Subtle gradient effects - FIX: Remove opacity to keep text visible */
.gradient-text {
    background: linear-gradient(135deg, #4fc3f7 0%, #00bcd4 50%, #0097a7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Minimal logo effects */
.logo {
    font-size: 1rem !important;
}

/* Clean navigation */
nav ul li a {
    padding: 0.4rem 0.8rem !important;
    font-size: 0.88rem !important;
}

/* Remove excessive blur */
.glassmorphism {
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
}

/* Cleaner borders */
.modern-card, .glassmorphism, .skill-item, .project-card {
    border-color: rgba(255, 255, 255, 0.06) !important;
}

/* Minimal glow effects */
.modern-card:hover {
    border-color: rgba(79, 195, 247, 0.2) !important;
}

/* ===================================
   FIX: ADD MARGIN TO ARTICLE CONTENT
   =================================== */

/* Add proper spacing inside articles between header and content */
#main article > *:first-child {
    margin-top: 2rem !important;
}

/* Ensure section-header has proper top spacing */
#main article .section-header:first-child {
    margin-top: 0 !important;
    padding-top: 2rem !important;
}

/* Add bottom margin to article content */
#main article > *:last-child {
    margin-bottom: 2rem !important;
}

/* Specific spacing for article sections */
#main article {
    padding: 2.5rem 2rem !important;
}

@media screen and (max-width: 980px) {
    #main article {
        padding: 2rem 1.5rem !important;
    }
}

@media screen and (max-width: 736px) {
    #main article {
        padding: 1.5rem 1rem !important;
    }
    
    #main article .section-header:first-child {
        padding-top: 1.5rem !important;
    }
}

/* ===================================
   MODERN UX/UI: REPOSITIONED HEADER & CLOSE BUTTON
   Following Material Design & iOS principles
   =================================== */

/* Modern header with close button (non-sticky) */
#main article .section-header:first-child {
    position: relative !important;
    z-index: 10 !important;
    background: transparent !important;
    padding: 0.4rem 2rem 1rem 2rem !important;
    margin: 0 -2rem 2rem -2rem !important;
    border-bottom: 1px solid rgba(79, 195, 247, 0.1) !important;
}

/* Position close button in header - top right with better spacing */
#main article .close {
    position: fixed !important;
    top: 1rem !important;
    right: 1rem !important;
    width: 3rem !important;
    height: 3rem !important;
    z-index: 101 !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#main article .close:hover {
    background: rgba(79, 195, 247, 0.15) !important;
    border-color: rgba(79, 195, 247, 0.3) !important;
    transform: rotate(90deg) scale(1.1) !important;
}

#main article .close:active {
    transform: rotate(90deg) scale(0.95) !important;
}

#main article .close:before {
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 1.5rem !important;
    height: 1.5rem !important;
    background-size: 16px 16px !important;
    background-color: transparent !important;
    border-radius: 0 !important;
}

#main article .close:hover:before {
    background-color: transparent !important;
}

/* Better title positioning in sticky header */
#main article .section-header:first-child h2.major {
    margin: 0 3rem 0 0 !important;
    font-size: 1.6rem !important;
    line-height: 1.2 !important;
}

/* Responsive adjustments */
@media screen and (max-width: 980px) {
    #main article .section-header:first-child {
        padding: 1.2rem 1.5rem 0.8rem 1.5rem !important;
        margin: 0 -1.5rem 1.5rem -1.5rem !important;
    }
    
    #main article .close {
        width: 2.8rem !important;
        height: 2.8rem !important;
    }
}

@media screen and (max-width: 736px) {
    #main article .section-header:first-child {
        padding: 1rem 1rem 0.8rem 1rem !important;
        margin: 0 -1rem 1.2rem -1rem !important;
    }
    
    #main article .section-header:first-child h2.major {
        font-size: 1.4rem !important;
        margin: 0 2.5rem 0 0 !important;
    }
    
    #main article .close {
        top: 0.8rem !important;
        right: 0.8rem !important;
        width: 2.5rem !important;
        height: 2.5rem !important;
    }
    
    #main article .close:before {
        width: 1.2rem !important;
        height: 1.2rem !important;
        background-size: 14px 14px !important;
    }
}

/* Alternative: Top-aligned layout (commented out - use if preferred) */
/*
#main article .section-header:first-child {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding-right: 4rem !important;
}

#main article .close {
    position: absolute !important;
    top: 1.5rem !important;
    right: 1.5rem !important;
}
*/



/* Smooth scroll behavior for sticky header */
html {
    scroll-padding-top: 5rem !important;
}

/* Prevent content jump when sticky activates */
#main article .section-header:first-child + * {
    margin-top: 0 !important;
}
