/*--------------- basic styling --------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #0f0f0f !important;
    color: #fff !important;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Ensure smooth scrolling works for all anchor links */
html {
    scroll-behavior: smooth !important;
}

/* Optimize smooth scroll performance on mobile */
@media (max-width: 768px) {
html {
    scroll-behavior: smooth;
}

/* Ensure smooth scroll on mobile */
@media (max-width: 768px) {
    html, body {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    }
}
    
    * {
        scroll-behavior: smooth;
    }
}

* {
    scroll-behavior: smooth !important;
}

*:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.4);
    outline-offset: 2px;
}

.container {
    width: 100%;
    min-height: 100vh;
    position: relative;
}

.main-content {
    width: 100%;
    position: relative;
}

/*--------------- scroll progress --------------- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0.8) 100%);
    z-index: 999; /* Below header but above content */
    transition: width 0.1s ease;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    pointer-events: none; /* Don't block clicks */
}

/*--------------- navigation --------------- */
.header {
    width: 100%;
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    height: 80px;
    position: fixed;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 82px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

/* Responsive header padding */
@media (min-width: 1920px) {
    .header {
        padding: 0 120px;
    }
}

@media (min-width: 2560px) {
    .header {
        padding: 0 160px;
    }
}

.header.scrolled {
    background: rgba(15, 15, 15, 0.98);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0;
    font-weight: 400;
    line-height: 80px;
}

.logo-text {
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease-out;
    font-size: 18px;
    letter-spacing: -0.5px;
    font-weight: 600;
    font-family: "Roboto Mono", monospace;
}

.logo-text:hover {
    text-decoration: none;
    opacity: 0.7;
}

.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    width: 40px;
    height: 40px;
    border-radius: 6px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 101;
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.mobile-menu-toggle svg {
    width: 20px;
    height: 20px;
}

.nav {
    display: flex;
    list-style: none;
    gap: 0;
    align-items: center;
    position: relative; /* For indicator bar positioning */
    /* Ensure proper spacing between nav items */
    margin: 0;
    padding: 0;
}

.nav-link {
    padding-left: 20px;
    padding-right: 20px;
    padding-top: 0;
    padding-bottom: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 400;
    line-height: 80px;
    position: relative;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 14px;
    letter-spacing: 0.3px;
    z-index: 1; /* Ensure nav links are clickable */
    pointer-events: auto; /* Ensure clicks work */
    user-select: none; /* Prevent text selection */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    min-height: 80px; /* Full header height for clickable area */
    margin: 0; /* No negative margin to prevent overlap */
    box-sizing: border-box; /* Include padding in width calculation */
    border-radius: 6px; /* Subtle rounded corners for hover */
}

.nav-link svg {
    width: 16px;
    height: 16px;
    opacity: 0.65;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none; /* Make entire link clickable, not just icon */
    flex-shrink: 0;
    transform: translateZ(0); /* Hardware acceleration */
}

.nav-link:hover svg,
.nav-link.active svg {
    opacity: 1;
    transform: translateZ(0) scale(1.05); /* Subtle scale on hover */
}

.nav-link::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    opacity: 0;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), background 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-link:hover::after {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 12px rgba(255, 255, 255, 0.05);
}

/* White indicator bar under active nav link */
.nav-indicator {
    position: absolute;
    bottom: 0;
    height: 2px;
    background: #fff;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    pointer-events: none;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.nav-link.active::after {
    opacity: 1;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 2px 12px rgba(255, 255, 255, 0.08);
}

.nav-link span {
    font-weight: 500;
    color: #fff;
    opacity: 0.6;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none; /* Prevent text selection */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: none; /* Make entire link clickable, not just text */
    transform: translateZ(0); /* Hardware acceleration */
}

.nav-link:hover {
    text-decoration: none;
    color: #fff;
    /* Ensure hover background doesn't overlap */
    isolation: isolate;
}

.nav-link:hover span {
    opacity: 1;
    transform: translateZ(0) translateX(1px); /* Subtle movement on hover */
}

.nav-link.active span {
    opacity: 1;
    font-weight: 600;
}

.nav-link.active {
    color: #fff;
    font-weight: 500;
}

.nav-link:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.4);
    outline-offset: 4px;
    border-radius: 6px;
}

.nav-link:active {
    transform: scale(0.98);
    transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:focus:not(:focus-visible) {
    outline: none;
}

/*--------------- hero section --------------- */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 100px;
    padding-bottom: 100px;
}

.hero-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 82px;
    box-sizing: border-box;
    overflow-x: visible; /* Allow title to extend if needed */
    overflow-y: visible;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    width: 100%;
    min-height: 600px;
    min-width: 0; /* Allow grid items to shrink */
    overflow: visible; /* Allow title to extend if needed */
}

.hero-text {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: flex-start;
    justify-content: center;
    min-width: 0; /* Allow flex item to shrink */
    width: auto; /* Don't force 100% width */
    max-width: none;
    overflow: visible;
}

.hero-title {
    font-weight: 700;
    letter-spacing: -2px;
    line-height: 1.1;
    font-size: 56px;
    margin: 0;
    color: #fff;
    white-space: nowrap !important;
    width: auto !important;
    min-width: auto !important;
    max-width: none !important;
    overflow: visible;
    flex-shrink: 0;
    word-break: keep-all;
    overflow-wrap: normal;
    display: inline-block; /* Prevent flex/grid constraints */
}

.hero-name {
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 28px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    letter-spacing: -0.5px;
    line-height: 1.3;
}

.hero-description {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.8;
    font-weight: 300;
    letter-spacing: 0.2px;
    max-width: 600px;
}

.highlight {
    color: #fff;
    font-weight: 400;
    opacity: 0.9;
}

.hero-social {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
}

.social-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.social-link:hover {
    background: #fff;
    color: #0f0f0f;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.2);
}

.social-link svg {
    width: 20px;
    height: 20px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 8px;
}

/*--------------- hero stats --------------- */
.hero-stats {
    margin-top: 32px;
    width: 100%;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
}

.stats-title {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 16px;
    text-align: left;
}

/* Stats grid already defined above */

.stat-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    min-width: 0;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.stat-badge:hover {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.stat-badge svg {
    width: 24px;
    height: 24px;
    color: rgba(255, 255, 255, 0.9);
    flex-shrink: 0;
}

.stat-content {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.stat-value {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}

.stat-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
}

/*--------------- hero image & avatar --------------- */
.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.avatar-container {
    position: relative;
    width: 320px;
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    overflow: visible;
}

.avatar {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    border: 8px solid rgba(255, 255, 255, 0.1);
    object-fit: cover;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    will-change: transform;
}

.avatar-container:hover .avatar {
    transform: scale(1.05);
    box-shadow: 0 30px 80px rgba(255, 255, 255, 0.1);
}

/* Floating icon base styles - outer wrapper handles positioning */
.floating-icon {
    position: absolute;
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    z-index: 5; /* Icons positioned outside avatar bounds, but visible if animation causes slight overlap */
    pointer-events: auto;
    opacity: 1 !important;
    visibility: visible !important;
    /* Animation is handled by .floating-icon.icon-X classes below */
}

.floating-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    /* Scale on hover but preserve animation transform */
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.2);
    /* Don't override transform - let animation handle it */
}

.floating-icon svg {
    width: 24px;
    height: 24px;
}

/* Icon positioning - base positions */
/* Avatar is 280px diameter (140px radius + 8px border = 148px), icons are 64px (32px radius) */
/* Position icons at least 180px from center to avoid overlap (148 + 32 = 180px) */
/* Avatar container is 320px, so center is at 160px */
.icon-1 {
    top: -15px;
    left: 50%;
    margin-left: -185px; /* 185px from center = just outside 148px avatar + 32px icon = 180px minimum */
}

.icon-2 {
    top: 5px;
    right: -55px; /* Further out from avatar edge */
}

.icon-3 {
    bottom: 5px;
    left: -55px; /* Further out from avatar edge */
}

.icon-4 {
    bottom: -15px;
    right: 50%;
    margin-right: -185px; /* 185px from center = just outside 148px avatar + 32px icon = 180px minimum */
}

.icon-5 {
    top: 50%;
    left: -70px; /* 70px from left edge = 160 + 70 = 230px from center, well outside 148px avatar radius */
    transform: translateY(-50%);
}

/* Animation on .floating-icon itself - different durations + negative delays */
/* This makes the entire bubble move, not just the icon inside */
.floating-icon {
    will-change: transform;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    animation-iteration-count: infinite;
    animation-fill-mode: both;
    animation-play-state: running !important;
    /* Ensure transform is not overridden */
    transform-origin: center center;
}

/* Specific selectors to ensure animations are applied */
.floating-icon.icon-1 {
    animation: floatIcon1 6s cubic-bezier(0.4, 0, 0.2, 1) infinite !important;
    animation-delay: -0.7s !important; /* Negative delay = phase offset */
}

.floating-icon.icon-2 {
    animation: floatIcon2 6.5s cubic-bezier(0.4, 0, 0.2, 1) infinite !important;
    animation-delay: -1.9s !important; /* Negative delay = phase offset */
}

.floating-icon.icon-3 {
    animation: floatIcon3 5.8s cubic-bezier(0.4, 0, 0.2, 1) infinite !important;
    animation-delay: -2.4s !important; /* Negative delay = phase offset */
}

.floating-icon.icon-4 {
    animation: floatIcon4 7s cubic-bezier(0.4, 0, 0.2, 1) infinite !important;
    animation-delay: -0.3s !important; /* Negative delay = phase offset */
}

.floating-icon.icon-5 {
    animation: floatIcon5 6.2s cubic-bezier(0.4, 0, 0.2, 1) infinite !important;
    animation-delay: -1.2s !important; /* Negative delay = phase offset */
}

/* Keyframes - smooth, relaxing animations */
@keyframes floatIcon1 {
    0% { transform: translateX(-50%) translate(0, 0); }
    25% { transform: translateX(-50%) translate(10px, -18px); }
    50% { transform: translateX(-50%) translate(0, -28px); }
    75% { transform: translateX(-50%) translate(-10px, -18px); }
    100% { transform: translateX(-50%) translate(0, 0); }
}

@keyframes floatIcon2 {
    0% { transform: translate(0, 0); }
    25% { transform: translate(12px, -15px); }
    50% { transform: translate(10px, -25px); }
    75% { transform: translate(-8px, -15px); }
    100% { transform: translate(0, 0); }
}

@keyframes floatIcon3 {
    0% { transform: translate(0, 0); }
    25% { transform: translate(-12px, -15px); }
    50% { transform: translate(-10px, -25px); }
    75% { transform: translate(8px, -15px); }
    100% { transform: translate(0, 0); }
}

@keyframes floatIcon4 {
    0% { transform: translateX(50%) translate(0, 0); }
    25% { transform: translateX(50%) translate(10px, -18px); }
    50% { transform: translateX(50%) translate(8px, -28px); }
    75% { transform: translateX(50%) translate(-10px, -18px); }
    100% { transform: translateX(50%) translate(0, 0); }
}

@keyframes floatIcon5 {
    0% { transform: translateY(-50%) translate(0, 0); }
    25% { transform: translateY(-50%) translate(-10px, -15px); }
    50% { transform: translateY(-50%) translate(-8px, -22px); }
    75% { transform: translateY(-50%) translate(10px, -15px); }
    100% { transform: translateY(-50%) translate(0, 0); }
}

/* Prefers reduced motion - disable animations */
@media (prefers-reduced-motion: reduce) {
    .floating-icon {
        animation: none !important;
    }
}

/*--------------- buttons --------------- */
/* Base button styles - shared by all buttons */
.btn-primary,
.btn-secondary,
.contact-link {
    padding: 12px 24px;
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    letter-spacing: 0.3px;
    position: relative;
    vertical-align: middle;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    min-height: 40px;
    box-sizing: border-box;
    overflow: hidden;
    outline: none;
    text-transform: none;
}

.btn-primary {
    background: #fff;
    color: #0f0f0f;
    border-color: #fff;
}

.btn-primary:hover {
    background: rgba(255, 255, 255, 0.9) !important;
    color: #0f0f0f !important;
    text-decoration: none;
    border-color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 4px;
}

.btn-primary:focus:not(:focus-visible) {
    outline: none;
}

.btn-secondary {
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    text-decoration: none;
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.1);
}

.btn-secondary:active {
    transform: translateY(0);
}

.btn-secondary:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.3);
    outline-offset: 4px;
}

.btn-secondary:focus:not(:focus-visible) {
    outline: none;
}

/*--------------- sections --------------- */
.section {
    padding: 160px 82px;
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    opacity: 1; /* Changed from 0 to 1 for instant visibility */
    will-change: opacity; /* Optimize for performance */
}

/* Better scaling for large monitors */
@media (min-width: 1920px) {
    .section {
        max-width: 1600px;
        padding: 180px 120px;
    }
    
    .page-container {
        max-width: 1600px;
    }
    
    .hero-content {
        max-width: 1100px;
    }
    
    .section-title {
        font-size: 64px;
    }
    
    .hero-title {
        font-size: 72px;
    }
}

@media (min-width: 2560px) {
    .section {
        max-width: 2000px;
        padding: 200px 160px;
    }
    
    .page-container {
        max-width: 2000px;
    }
    
    .hero-content {
        max-width: 1400px;
    }
    
    .section-title {
        font-size: 72px;
    }
    
    .hero-title {
        font-size: 84px;
    }
    
    .hero-subtitle {
        font-size: 24px;
    }
    
    .hero-description {
        font-size: 18px;
    }
}

/* Removed section::before and section::after to eliminate unwanted lines */

.page-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    margin-bottom: 120px;
    text-align: center;
    position: relative;
}

/* Removed section-header::after to eliminate unwanted line above "about me" */

.section-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
    margin-top: 0;
    line-height: 1.2;
    letter-spacing: -2px;
    color: #fff;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    position: relative;
    vertical-align: baseline;
}

.section-title,
.project-title,
.tech-category-title {
    font-family: "Roboto Mono", monospace;
}

.section-title span {
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
}

.section-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 18px;
    font-weight: 400;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    letter-spacing: 0.2px;
    margin-top: 8px;
    line-height: 1.6;
}

/*--------------- content cards --------------- */
.content-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 48px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    will-change: transform, opacity;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px); /* Reduced from 30px for faster appearance */
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.about-highlight,
.cloud-devops-section {
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid rgba(255, 255, 255, 0.2);
    padding: 24px 32px;
    border-radius: 8px;
    margin: 16px 0;
}

.highlight-text {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.highlight-title {
    margin: 0 0 16px 0;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
    font-size: 16px;
    font-family: "Roboto Mono", monospace;
}

.highlight-list {
    margin: 0;
    padding-left: 20px;
    list-style-type: disc;
    color: rgba(255, 255, 255, 0.8);
}

.highlight-list li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.highlight-list li:last-child {
    margin-bottom: 0;
}

.about-text {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.9;
    font-weight: 400;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 100%;
    margin: 0 0 16px 0;
    letter-spacing: 0.1px;
}

.about-text:last-child {
    margin-bottom: 0;
}

.quote {
    border-left: 3px solid rgba(255, 255, 255, 0.2);
    padding-left: 32px;
    margin: 32px 0;
    max-width: 800px;
    position: relative;
    background: rgba(255, 255, 255, 0.02);
    padding: 24px 32px;
    border-radius: 8px;
}

.quote::before {
    display: none;
}

.quote-text {
    font-size: 19px;
    font-style: italic;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 300;
    line-height: 1.7;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    letter-spacing: 0.2px;
}

.about-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 80px;
    margin-top: 80px;
}

/* Better about details scaling */
@media (min-width: 1920px) {
    .about-details {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
        gap: 100px;
    }
}

@media (min-width: 2560px) {
    .about-details {
        grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
        gap: 120px;
    }
}

.detail-item h3 {
    font-size: 13px;
    font-weight: 400;
    margin-bottom: 32px;
    color: #fff;
    text-transform: lowercase;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    letter-spacing: 2px;
    opacity: 0.9;
}

.detail-item ul {
    list-style: none;
}

.detail-item ul li {
    padding: 16px 0;
    padding-left: 28px;
    color: rgba(255, 255, 255, 0.6);
    position: relative;
    line-height: 1.9;
    font-weight: 300;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: color 0.3s ease;
    letter-spacing: 0.2px;
}

.detail-item ul li:last-child {
    border-bottom: none;
}

.detail-item ul li:hover {
    color: rgba(255, 255, 255, 0.8);
}

.detail-item ul li::before {
    content: '> ';
    position: absolute;
    left: 0;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 400;
}

/*--------------- projects grid --------------- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 64px;
    margin-top: 80px;
}

/* Better grid scaling for different screen sizes */
@media (min-width: 1920px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
        gap: 80px;
    }
}

@media (min-width: 2560px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
        gap: 96px;
    }
}

@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }
}

.project-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 32px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    will-change: transform, border-color, background-color;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.4));
    border-radius: 16px 0 0 16px;
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-8px);
    box-shadow: 0 12px 48px rgba(255, 255, 255, 0.1);
}

.project-card:hover::before {
    height: 100%;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.project-header .project-title {
    flex: 1 1 auto;
    min-width: 0;
}

.project-header .project-badges {
    flex: 0 0 auto;
    flex-shrink: 0;
}

.project-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0; /* Remove whitespace between inline elements */
}

.project-badges .project-badge {
    font-size: 11px !important; /* Restore font size */
    margin: 0;
    display: inline-flex;
    font-weight: 300 !important;
    line-height: 1.2 !important;
}

.project-header .project-badge {
    margin: 0;
}

.project-title {
    font-size: 24px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0;
    font-family: "Roboto Mono", monospace;
    letter-spacing: -0.3px;
}

.project-title-small {
    font-size: 20px;
}

.project-badge {
    padding: 6px 14px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.6);
    border-radius: 0;
    font-size: 11px !important;
    font-weight: 300 !important;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 28px;
    box-sizing: border-box;
    line-height: 1.2 !important;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

.project-icon {
    height: 16px;
    width: auto;
    flex-shrink: 0;
    opacity: 0.8;
    filter: invert(1) brightness(0.9);
    object-fit: contain;
}

.project-description {
    color: rgba(255, 255, 255, 0.6);
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 24px;
    flex: 1;
    font-weight: 300;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    letter-spacing: 0.1px;
}

.project-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.feature-tag {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: lowercase;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 300;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tech-feature-tag {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.15);
    padding: 6px 10px;
}

.feature-icon {
    width: 14px;
    height: 14px;
    max-width: 14px;
    max-height: 14px;
    filter: invert(1) brightness(0.9);
    opacity: 0.7;
    display: block;
    flex-shrink: 0;
}
    transition: all 0.3s ease;
}

.feature-tag:hover {
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.7);
}

.project-impact {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    margin-bottom: 24px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border-left: 2px solid rgba(255, 255, 255, 0.2);
    font-weight: 300;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.7;
    letter-spacing: 0.2px;
}

.project-impact strong {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
}

.project-architecture {
    margin: 16px 0;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-left: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.architecture-text {
    margin: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    font-family: "Roboto Mono", monospace;
    line-height: 1.6;
}

.project-links {
    margin-top: 20px;
    display: flex;
    gap: 12px;
}

.project-link {
    color: #fff;
    text-decoration: none;
    font-weight: 300;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: auto;
    text-transform: lowercase;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 1px;
    position: relative;
    padding: 16px 36px;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    background: transparent;
    width: fit-content;
    vertical-align: middle;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    min-height: 52px;
    box-sizing: border-box;
    overflow: hidden;
    outline: none;
}

.project-private-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    font-weight: 300;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    text-transform: lowercase;
    letter-spacing: 1px;
    margin-top: auto;
    padding: 16px 36px;
    text-align: center;
    display: inline-block;
}

.project-link::after {
    content: ' →';
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
}

.project-link:hover {
    text-decoration: none;
    gap: 12px;
    border-color: rgba(255, 255, 255, 0.6) !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2), 0 4px 20px rgba(255, 255, 255, 0.1);
}

.project-link:hover::after {
    transform: translateX(4px);
}

.project-link:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.3);
    outline-offset: 4px;
}

.project-link:active {
    transform: translateY(0);
}

@keyframes jiggle {
    0%, 100% {
        transform: translateY(-2px) rotate(0deg);
    }
    25% {
        transform: translateY(-2px) rotate(-1deg);
    }
    75% {
        transform: translateY(-2px) rotate(1deg);
    }
}

/*--------------- tech stack --------------- */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 64px;
    margin-top: 80px;
}

/* Better tech grid scaling */
@media (min-width: 1920px) {
    .tech-grid {
        grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
        gap: 80px;
    }
}

@media (min-width: 2560px) {
    .tech-grid {
        grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
        gap: 96px;
    }
}

.tech-category {
    background: transparent;
    border: none;
    padding: 0;
    /* Removed animation for faster loading */
}

.tech-category-title {
    font-size: 13px;
    font-weight: 400;
    margin-bottom: 32px;
    color: #fff;
    text-transform: lowercase;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    letter-spacing: 2px;
    opacity: 0.9;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tech-tag {
    padding: 12px 18px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease-out;
    font-weight: 400;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    letter-spacing: 0.2px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tech-tag .tech-icon {
    height: 28px;
    width: auto;
    flex-shrink: 0;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    /* Convert brand logos to off-white for dark theme */
    filter: invert(1) brightness(0.9);
    object-fit: contain;
}

.tech-tag:hover {
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.02);
    transform: translateY(-2px);
}

.tech-tag:hover .tech-icon {
    opacity: 1;
}

/*--------------- contact --------------- */
.contact-card {
    background: transparent;
    border: none;
    padding: 0;
    /* Removed animation for faster loading */
    text-align: center;
}

.contact-text {
    font-size: 19px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 80px;
    line-height: 1.8;
    font-weight: 300;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    letter-spacing: 0.3px;
}

.contact-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 48px;
    margin-top: 60px;
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
}

/* Better contact links scaling */
@media (min-width: 1920px) {
    .contact-links {
        gap: 40px 64px;
        max-width: 1040px;
    }
}

@media (min-width: 2560px) {
    .contact-links {
        gap: 48px 80px;
        max-width: 1200px;
    }
}

.contact-link-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-link-group p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 300;
    text-transform: lowercase;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    letter-spacing: 2px;
}

.contact-link {
    gap: 8px;
    padding: 16px 36px;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    letter-spacing: 1px;
    text-transform: lowercase;
    font-size: 14px;
    font-weight: 300;
    min-height: 52px;
    box-sizing: border-box;
    overflow: hidden;
    outline: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Email card specific styles */
.email-card {
    justify-content: center;
    padding-right: 12px;
    position: relative;
}

.email-text {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
    text-align: center;
    margin: 0 auto;
}

.copy-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    text-transform: lowercase;
    letter-spacing: 0.5px;
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.email-card:hover .copy-btn {
    opacity: 1;
    pointer-events: auto;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}

.copy-btn:active {
    transform: scale(0.95);
}

.copy-btn:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
    opacity: 1;
    pointer-events: auto;
}

/* Email copied popup */
#email-copied-popup {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(76, 175, 80, 0.95);
    color: #fff;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    box-shadow: 0 8px 32px rgba(76, 175, 80, 0.3);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#email-copied-popup.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

@media (max-width: 768px) {
    #email-copied-popup {
        bottom: 20px;
        padding: 14px 24px;
        font-size: 13px;
    }
}

/* Mobile: always show copy button */
@media (max-width: 768px) {
    .copy-btn {
        opacity: 1;
        pointer-events: auto;
    }
}

.contact-link:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    text-decoration: none;
    border-color: rgba(255, 255, 255, 0.6) !important;
    transform: translateY(-2px);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2), 0 4px 20px rgba(255, 255, 255, 0.1);
    gap: 8px; /* Keep gap consistent on hover */
}

.contact-link:active {
    transform: translateY(0);
}

.contact-link:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.3);
    outline-offset: 4px;
}

.contact-link svg {
    width: 20px;
    height: 20px;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    margin: 0; /* Remove any default margins */
}

.contact-link:hover svg {
    color: #fff;
    /* Remove transform: scale to prevent logo movement */
}

.contact-link span {
    transition: color 0.3s ease-out;
    margin: 0; /* Remove any default margins */
}

.contact-link:hover span {
    /* Remove letter-spacing change to prevent text expansion */
    color: #fff;
}

/*--------------- footer --------------- */
.footer {
    padding: 100px 82px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.5);
    background: #0f0f0f;
    font-size: 13px;
    font-weight: 300;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    text-transform: lowercase;
    text-align: center;
    letter-spacing: 1px;
}

.footer-content p {
    margin: 0;
}

.footer-content span {
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    opacity: 0.5;
}

/*--------------- responsive --------------- */
/* Tablet and medium screens */
@media (max-width: 1024px) {
    .header {
        padding: 0 48px;
    }
    
    .nav {
        display: flex;
    }
    
    .mobile-menu-toggle {
        display: none;
    }
    
    .section {
        padding: 140px 48px;
    }
    
    .footer {
        padding: 100px 48px;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 48px;
    }
}

/* Mobile and small tablets */
@media (max-width: 1024px) {
    .hero-container {
        padding: 0 48px;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .stats-grid {
        max-width: 560px;
    }

    .hero-image {
        order: -1;
    }
    
    .avatar-container {
        width: 240px;
        height: 240px;
    }
    
    .avatar {
        width: 200px;
        height: 200px;
        font-size: 60px;
    }
    
    .floating-icon {
        width: 48px;
        height: 48px;
    }
    
    .floating-icon svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 0 24px;
        height: 60px;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 100;
    }

    .logo {
        line-height: 60px;
    }
    
    .logo-text {
        font-size: 16px;
    }

    .mobile-menu-toggle {
        display: flex;
        z-index: 101;
        position: relative;
    }

    .nav {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: rgba(15, 15, 15, 0.98);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        flex-direction: column;
        align-items: stretch;
        padding: 20px 0;
        gap: 0;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 99;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }

    .nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-link {
        display: flex;
        padding: 16px 24px;
        line-height: 1.5;
        min-height: auto;
        width: 100%;
        justify-content: flex-start;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    .nav-link::after {
        display: none;
    }

    .hero-container {
        padding: 0 24px;
        overflow-x: hidden;
    }

    .hero-section {
        padding-top: 100px;
        padding-bottom: 80px;
        min-height: auto;
        overflow-x: hidden;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
        overflow-x: hidden;
    }
    
    .avatar-container {
        width: 240px;
        height: 240px;
        overflow: visible;
        margin: 0 auto;
    }

    .hero-image {
        overflow: visible;
        padding: 20px 0;
    }
    
    .floating-icon {
        width: 48px;
        height: 48px;
    }
    
    .icon-2 {
        right: -10px;
    }
    
    .icon-3 {
        left: -10px;
    }
    
    .icon-5 {
        left: -15px;
    }
    
    .hero-text {
        text-align: center;
        align-items: center;
    }

    .hero-title {
        font-size: 40px;
        line-height: 1.2;
        letter-spacing: -1.5px;
        text-align: center;
        white-space: normal; /* Allow wrapping on mobile if needed */
    }

    .hero-subtitle {
        font-size: 22px;
        text-align: center;
    }

    .hero-description {
        font-size: 16px;
        text-align: center;
        max-width: 100%;
    }
    
    .hero-social {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .hero-cta {
        justify-content: center;
        width: 100%;
    }
    
    .stats-title {
        text-align: center;
    }
    
    .stats-grid {
        max-width: 460px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .avatar-container {
        width: 200px;
        height: 200px;
        margin: 0 auto;
        overflow: visible;
        position: relative;
    }
    
    .floating-icon {
        opacity: 1 !important;
        visibility: visible !important;
        display: flex !important;
        z-index: 5;
        width: 40px;
        height: 40px;
    }
    
    .floating-icon svg {
        width: 16px;
        height: 16px;
    }
    
    .avatar {
        width: 160px;
        height: 160px;
        font-size: 50px;
        border-width: 6px;
        object-fit: cover;
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }

    .hero-image {
        overflow: visible;
        padding: 20px 0;
        width: 100%;
    }
    
    /* Mobile positioning adjustments - prevent overflow */
    /* Mobile: Avatar is 160px diameter (80px radius + 6px border = 86px), icons are 48px (24px radius) */
    /* Position icons at least 110px from center to avoid overlap (86 + 24 = 110px) */
    /* Avatar container is 200px, so center is at 100px */
    /* Mobile: Avatar container: 200px, Avatar: 160px diameter (80px radius + 6px border = 86px effective radius) */
    /* Icons: 48px (24px radius). Need 86 + 24 = 110px minimum from center */
    /* Container center is at 100px from left edge */
    .icon-1 {
        top: 10px; /* Changed from -10px to 10px to prevent going off top of screen */
        left: 50%;
        margin-left: -115px !important; /* 115px from center = just outside 86px avatar + 24px icon = 110px minimum */
    }
    
    .icon-2 {
        top: 10px;
        right: -35px; /* Further out from avatar edge */
    }
    
    .icon-3 {
        bottom: 10px;
        left: -35px; /* Further out from avatar edge */
    }
    
    .icon-4 {
        bottom: -10px;
        right: 50%;
        margin-right: -115px !important; /* 115px from center = just outside 86px avatar + 24px icon = 110px minimum */
    }
    
    .icon-5 {
        top: 50%;
        left: -40px; /* 40px from left edge = 100 + 40 = 140px from center, well outside */
        transform: translateY(-50%);
    }
    
    /* Mobile keyframes - smoother, slower, prevent overflow, keep icons outside avatar */
    .floating-icon.icon-1 {
        animation: floatIcon1Mobile 6s cubic-bezier(0.4, 0, 0.2, 1) infinite !important;
        animation-delay: -0.7s !important;
        animation-play-state: running !important;
    }
    
    .floating-icon.icon-2 {
        animation: floatIcon2Mobile 6.5s cubic-bezier(0.4, 0, 0.2, 1) infinite !important;
        animation-delay: -1.9s !important;
        animation-play-state: running !important;
    }
    
    .floating-icon.icon-3 {
        animation: floatIcon3Mobile 5.8s cubic-bezier(0.4, 0, 0.2, 1) infinite !important;
        animation-delay: -2.4s !important;
        animation-play-state: running !important;
    }
    
    .floating-icon.icon-4 {
        animation: floatIcon4Mobile 7s cubic-bezier(0.4, 0, 0.2, 1) infinite !important;
        animation-delay: -0.3s !important;
        animation-play-state: running !important;
    }
    
    .floating-icon.icon-5 {
        animation: floatIcon5Mobile 6.2s cubic-bezier(0.4, 0, 0.2, 1) infinite !important;
        animation-delay: -1.2s !important;
        animation-play-state: running !important;
    }
    
    @keyframes floatIcon1Mobile {
        0% { transform: translate(0, 0); }
        25% { transform: translate(10px, 5px); } /* Changed from -15px to 5px to prevent going off top */
        50% { transform: translate(0, 8px); } /* Changed from -22px to 8px to keep icon visible */
        75% { transform: translate(-10px, 5px); } /* Changed from -15px to 5px */
        100% { transform: translate(0, 0); }
    }
    
    @keyframes floatIcon2Mobile {
        0% { transform: translate(0, 0); }
        25% { transform: translate(12px, -12px); }
        50% { transform: translate(10px, -20px); }
        75% { transform: translate(-8px, -12px); }
        100% { transform: translate(0, 0); }
    }
    
    @keyframes floatIcon3Mobile {
        0% { transform: translate(0, 0); }
        25% { transform: translate(-12px, -12px); }
        50% { transform: translate(-10px, -20px); }
        75% { transform: translate(8px, -12px); }
        100% { transform: translate(0, 0); }
    }
    
    @keyframes floatIcon4Mobile {
        0% { transform: translate(0, 0); }
        25% { transform: translate(10px, -15px); }
        50% { transform: translate(8px, -22px); }
        75% { transform: translate(-10px, -15px); }
        100% { transform: translate(0, 0); }
    }
    
    @keyframes floatIcon5Mobile {
        0% { transform: translate(0, 0); }
        25% { transform: translate(-10px, -12px); }
        50% { transform: translate(-8px, -18px); }
        75% { transform: translate(10px, -12px); }
        100% { transform: translate(0, 0); }
    }

    .section {
        padding: 100px 24px;
    }

    .section-title {
        font-size: 42px;
        letter-spacing: -1.5px;
    }

    .section-header {
        margin-bottom: 60px;
    }

    .section-subtitle {
        font-size: 13px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .project-card {
        padding: 28px;
    }
    
    .project-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .project-header .project-badges {
        flex-shrink: 1;
    }

    .project-title {
        font-size: 24px;
    }

    .project-description {
        font-size: 14px;
    }

    .tech-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .about-details {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .about-text {
        font-size: 16px;
    }
    
    .quote-text {
        font-size: 17px;
    }
    
    .quote {
        padding-left: 24px;
    }

    .contact-links {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .contact-link {
        width: 100%;
        justify-content: center;
        padding: 16px 24px;
    }
    
    .contact-text {
        font-size: 17px;
        margin-bottom: 60px;
    }

    .hero-cta {
        flex-direction: column;
        gap: 16px;
        width: 100%;
        max-width: 400px;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        text-align: center;
        min-height: 52px;
    }

    .footer {
        padding: 60px 24px;
        font-size: 12px;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .header {
        padding: 0 16px;
        height: 60px;
    }

    .hero-section {
        padding: 0 16px;
        padding-top: 100px;
        padding-bottom: 80px;
    }

    .hero-content {
        padding: 0 8px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        max-width: 300px;
    }

    .hero-title {
        font-size: 28px;
        letter-spacing: -1.5px;
        white-space: normal; /* Allow wrapping on very small screens */
    }

    .line {
        width: 7.5em;
    }

    @keyframes typewriter {
        from {
            width: 0;
        }
        to {
            width: 7.5em;
        }
    }

    .hero-subtitle {
        font-size: 15px;
        margin-top: 24px;
    }

    .hero-description {
        font-size: 14px;
        margin-top: 20px;
    }

    .section {
        padding: 80px 16px;
    }

    .section-title {
        font-size: 30px;
        letter-spacing: -1px;
    }

    .section-header {
        margin-bottom: 48px;
    }

    .project-card {
        padding: 20px;
    }

    .project-title {
        font-size: 20px;
    }

    .project-description {
        font-size: 13px;
    }

    .project-features {
        gap: 8px;
    }

    .feature-tag {
        font-size: 10px;
        padding: 5px 8px;
        gap: 4px;
    }

    .feature-icon {
        width: 12px;
        height: 12px;
        max-width: 12px;
        max-height: 12px;
    }

    .project-badge {
        font-size: 10px !important;
        padding: 4px 10px;
        height: 24px;
    }

    .project-links {
        margin-top: 16px;
    }

    .project-link {
        padding: 12px 24px;
        font-size: 12px;
        min-height: 44px;
    }

    .about-text {
        font-size: 15px;
    }

    .quote {
        padding-left: 16px;
        margin: 32px auto;
    }

    .quote-text {
        font-size: 16px;
    }

    .contact-text {
        font-size: 16px;
    }

    .footer {
        padding: 50px 16px;
    }
}

::selection {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Hide scrollbar but keep functionality */
::-webkit-scrollbar {
    width: 0px;
    display: none;
}

::-webkit-scrollbar-track {
    display: none;
}

::-webkit-scrollbar-thumb {
    display: none;
}

/* Firefox */
* {
    scrollbar-width: none;
}

/* IE and Edge */
* {
    -ms-overflow-style: none;
}

/* Remove background animation */
.background-animation {
    display: none;
}

/* "More projects on GitHub" link below the curated grid */
.projects-more {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

.projects-more-link {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    padding: 14px 28px;
    opacity: 0.85;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.projects-more-link:hover {
    opacity: 1;
}

/* Collapse nav to hamburger for tablet & below — the horizontal nav and
   logo collide below ~1024px (logo wraps, "Tech Stack" breaks apart). */
@media (max-width: 1024px) {
    .header {
        padding: 0 24px;
        height: 60px;
    }

    .logo {
        line-height: 60px;
    }

    .logo-text {
        font-size: 16px;
    }

    .mobile-menu-toggle {
        display: flex;
        z-index: 101;
        position: relative;
    }

    .nav {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: rgba(15, 15, 15, 0.98);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        flex-direction: column;
        align-items: stretch;
        padding: 20px 0;
        gap: 0;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 99;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }

    .nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-link {
        display: flex;
        padding: 16px 24px;
        line-height: 1.5;
        min-height: auto;
        width: 100%;
        justify-content: flex-start;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    .nav-link::after {
        display: none;
    }
}

/* Very small phones: decorative floating icons sit too far out and clip
   against the viewport edges below ~360px — hide them (purely cosmetic). */
@media (max-width: 360px) {
    .floating-icon {
        display: none !important;
    }
}
