html {
    overflow-x: hidden;
    width: 100%;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}
/* Tech modal styles (appended) */
/* Tech modal styles removed (overlay removed) */

html {
    overflow-x: hidden;
    width: 100%;
}

:root {
    --bg: #000000;
    --card: #0a0a0a;
    --card-hover: #111111;
    --text: #ffffff;
    --text-secondary: #888888;
    --accent: #ffffff;
    --border: #1a1a1a;
    --glow: rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    padding: 2rem;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100vw;
    position: relative;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    box-sizing: border-box;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
    grid-auto-rows: 200px;
    grid-auto-flow: dense;
    width: 100%;
    box-sizing: border-box;
}
/* Card Base */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
    max-width: 100%;
    box-sizing: border-box;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), var(--glow) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.card:hover::before {
    opacity: 1;
}

.card:hover {
    background: var(--card-hover);
    border-color: #222222;
    transform: translateY(-2px);
}

/* Floating year animation for upcoming work card */
.work-upcoming .year-animate {
    display: inline-block;
    transform-origin: center bottom;
    transition: transform 420ms cubic-bezier(0.2, 0.9, 0.2, 1), opacity 320ms ease, color 300ms ease;
}
.work-upcoming:hover .year-animate {
    transform: translateY(-8px) rotate(-2deg) scale(1.02);
    opacity: 1;
    color: rgba(255,255,255,0.9);
}
.work-upcoming { /* ensure subtle lift on hover like other cards */
    transition: transform 420ms cubic-bezier(0.2, 0.9, 0.2, 1), background 320ms ease;
}

/* Disable hover effects for Three.js service cards */
.threejs-service:hover {
    background: var(--card);
    border-color: var(--border);
    transform: none;
}

.threejs-service:hover::before {
    opacity: 0;
}

/* Hero Card */
.hero {
    grid-column: span 4;
    grid-row: span 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.status-indicator {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 8px;
    height: 8px;
    background: #00ff00;
    border-radius: 50%;
    box-shadow: 0 0 20px #00ff00;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.hero h1 {
    font-size: 5rem;
    font-weight: 300;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 2rem;
    max-width: 500px;
}

/* Buttons */
.btn-primary, .btn-cta {
    background: var(--accent);
    color: var(--bg);
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    /* Ensure anchors styled as buttons don't show default link styles */
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.btn-primary::before, .btn-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent, rgba(0, 0, 0, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.btn-primary:hover::before, .btn-cta:hover::before {
    transform: translateX(100%);
}

.btn-primary:hover, .btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.2);
}

.btn-primary:focus, .btn-cta:focus {
    outline: none;
    box-shadow: 0 0 0 6px rgba(255,255,255,0.04);
}

/* Profile CTA overlay */
.profile-cta { position: relative; overflow: hidden; }
.profile-cta img { display: block; width: 100%; height: 100%; object-fit: cover; }
.resume-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.resume-overlay::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.0), rgba(0,0,0,0.28)); opacity: 0; transition: opacity 220ms ease; }
.profile-cta:hover .resume-overlay::before { opacity: 1; }
.resume-btn { pointer-events: auto; display:inline-flex; gap:0.5rem; align-items:center; background: rgba(255,255,255,0.04); color: var(--text); border: 1px solid rgba(255,255,255,0.06); padding: 0.5rem 0.75rem; border-radius: 999px; font-weight:600; font-size:0.9rem; text-decoration:none; opacity:0; transform: translateY(6px); transition: transform 220ms cubic-bezier(0.2,0.9,0.2,1), opacity 220ms ease, box-shadow 220ms ease;}
.profile-cta:hover .resume-btn { opacity:1; transform:none; box-shadow: 0 6px 18px rgba(0,0,0,0.6); }
.resume-btn svg { width: 14px; height: 14px; stroke: currentColor; }

/* Blur effect for profile image on hover to emphasize CTA */
.profile-cta img {
    transition: filter 260ms cubic-bezier(0.2,0.9,0.2,1), transform 260ms cubic-bezier(0.2,0.9,0.2,1);
}
.profile-cta:hover img {
    filter: blur(8px) saturate(0.9) contrast(0.9);
    transform: scale(1.035);
}
.profile-cta:hover .resume-overlay::before {
    /* make overlay darker when image is blurred */
    background: linear-gradient(180deg, rgba(0,0,0,0.18), rgba(0,0,0,0.6));
}

/* Profile Card */
.profile {
    grid-column: span 2;
    grid-row: span 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2.5rem 2rem;
    gap: 1.5rem;
}

.profile-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.profile-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.1);
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile:hover .profile-avatar-large {
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.profile-avatar-large::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    padding: 2px;
    background: linear-gradient(135deg, #ffffff, #888888);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -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.4s ease;
}

.profile:hover .profile-avatar-large::after {
    opacity: 1;
}

.profile-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 0;
}



.profile-socials-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    width: 100%;
    margin-top: auto;
    margin-bottom: 1rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    color: var(--text-secondary);
    text-decoration: none;
}

.social-btn svg {
    width: 32px;
    height: 32px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-btn:hover {
    transform: translateY(-4px);
}

.social-btn:hover svg {
    transform: scale(1.2);
    color: #ffffff;
}

.profile-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: var(--text);
    color: var(--bg);
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    cursor: pointer;
}

.profile-cta-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}

.profile-cta-btn:hover svg {
    transform: translateY(2px);
}

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


.featured {
    grid-column: span 3;
    grid-row: span 2;
}

/* Work Cards */
.work {
    grid-column: span 2;
    grid-row: span 2;
    padding: 0;
    cursor: pointer;
    position: relative;
}

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

.work:hover img {
    transform: scale(1.05);
}

.work-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.7) 50%, transparent 100%);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.work:hover .work-overlay {
    transform: translateY(0);
    opacity: 1;
}

/* suppress overlay for specific large card variant */
.no-hover-overlay .work-overlay {
    transform: none !important;
    opacity: 0 !important;
    pointer-events: none;
}

/* Media wrapper to add black padding around GIFs and avoid corner cropping */
.work-media {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    padding: 10px;
    box-sizing: border-box;
}
.work-media-inner {
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.work-media-inner img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Fix: make Nex tool image behave like other full-bleed work cards
   - Force the Nex image to fill the card and use cover so it crops consistently
   - Remove extra padding/background applied by .work-media for this specific card
*/
.work-nex-tool .work-media {
    padding: 0; /* remove the 10px black padding around GIFs for this card */
    background: transparent; /* avoid black background showing behind the image */
}
.work-nex-tool .work-media-inner img {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover; /* match other cards that use object-fit: cover */
    display: block;
}

/* Also apply same behavior for the home-page Nex card (.work-nex) */
.work-nex .work-media {
    padding: 0;
    background: transparent;
}
.work-nex .work-media-inner img {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    display: block;
}

.work-tag {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.work-overlay h3 {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.work-overlay p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* GitHub Contributions */
.github-contributions {
    grid-column: span 2;
    grid-row: span 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.contributions-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
    align-self: flex-start;
}

.github-snake {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* GitHub Stats Card */
.github-stats {
    grid-column: span 2;
    grid-row: span 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.github-stats-img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
}

/* Stat Cards */
.stat-card {
    grid-column: span 2;
    grid-row: span 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    opacity: 0.9;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.stat-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Quote Card */
.quote-card {
    grid-column: span 3;
    grid-row: span 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    background: #050505;
}

.quote-mark {
    font-size: 6rem;
    line-height: 1;
    opacity: 0.2;
    position: absolute;
    top: 1rem;
    left: 1.5rem;
}

.quote-text {
    font-size: 1.5rem;
    font-weight: 300;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.quote-author {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Skills Card */
.mini-stats-card {
    grid-column: span 1;
    grid-row: span 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 2rem 1rem;
}

.mini-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
}

.mini-stat-number {
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: -0.02em;
    line-height: 1;
}

.mini-stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mini-stat-divider {
    width: 60%;
    height: 1px;
    background: var(--border);
}

/* Services */

/* Service Cards */
.service {
    grid-column: span 2;
    grid-row: span 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.service-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1.5rem;
    color: var(--accent);
    opacity: 0.9;
}

.service-icon svg {
    width: 100%;
    height: 100%;
}

.service h4 {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.service p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Three.js Service Card */
.threejs-service {
    position: relative;
    overflow: hidden;
    padding: 0;
}

#development-canvas,
#uiux-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#upcoming-canvas,
#kingrajasthan-canvas,
#work-threejs-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.service-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    padding: 2rem;
    background: linear-gradient(to top, rgba(10, 10, 10, 0.95) 0%, rgba(10, 10, 10, 0.5) 50%, transparent 100%);
}

.threejs-service .service-content h4 {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.threejs-service .service-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Tools Card */
.tools {
    grid-column: span 2;
    grid-row: span 3;
    padding: 1.5rem 0rem 1.5rem 0rem !important;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    overflow: visible;
}

.tools-title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0 1rem;
    flex-shrink: 0;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.3rem;
    width: 100%;
    flex-shrink: 0;
}

.tool-item {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem;
    position: relative;
    cursor: pointer;
}

.tool-item svg,
.tool-item img {
    width: 40px;
    height: 40px;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.tool-item:hover svg,
.tool-item:hover img {
    opacity: 1;
}

.tools-view-all {
    width: calc(100% - 2rem);
    margin: 0.5rem 1rem 0 1rem;
    padding: 0.875rem 1.5rem;
    background: var(--accent);
    color: var(--bg);
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.tools-view-all::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent, rgba(0, 0, 0, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.tools-view-all:hover::before {
    transform: translateX(100%);
}

.tools-view-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.2);
}

/* Status Card */
.status-card {
    grid-column: span 2;
    grid-row: span 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 20px;
    width: fit-content;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: #22c55e;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    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;
    }
}

.status-title {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.status-desc {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

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

.tag {
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Location Card */
.location-card {
    grid-column: span 2;
    grid-row: span 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.location-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    color: var(--text-secondary);
}

.location-icon svg {
    width: 100%;
    height: 100%;
}

.location-card h4 {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.india-gradient {
    background: linear-gradient(135deg, #FF9933 0%, #FFFFFF 50%, #138808 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

.location-time {
    font-size: 1.75rem;
    font-weight: 300;
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-variant-numeric: tabular-nums;
}

.location-subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Certifications Card */
.certifications-card {
    grid-column: span 2;
    grid-row: span 2;
}

.cert-title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.cert-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cert-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.cert-icon {
    font-size: 2rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    flex-shrink: 0;
}

.cert-info h5 {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.cert-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.cert-link {
    color: var(--accent-blue) !important;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.cert-link:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Blog Card */
.blog-card {
    grid-column: span 2;
    grid-row: span 2;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card:hover {
    border-color: #333333;
}

.blog-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.blog-header svg {
    width: 24px;
    height: 24px;
    color: var(--text-secondary);
}

.blog-header h4 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* GitHub Latest Commit Card */
.github-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.6rem;
}
.github-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text);
    font-weight: 600;
}
.github-header .icon-github { width: 20px; height: 20px; opacity: 0.95; }
.github-header .icon-github svg, .github-header .icon-github path { fill: currentColor; }
.github-content h5, .github-content p { margin: 0; }
.github-content h5 { font-size: 1rem; color: var(--text); }
.github-content p { color: var(--text-secondary); font-size: 0.9rem; }
.github-meta { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.github-meta .btn-link { color: var(--accent); text-decoration: none; font-weight: 600; font-size: 0.95rem; }

.blog-title {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.blog-date {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.blog-stats {
    display: flex;
    gap: 1.5rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Coffee Card */
.coffee-card {
    grid-column: 3 / span 2;
    grid-row: span 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 152, 0, 0.05) 100%);
    border-color: rgba(255, 193, 7, 0.2);
}

.coffee-emoji {
    font-size: 3rem;
    margin-bottom: 0.75rem;
}

.coffee-card h4 {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.coffee-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

.coffee-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 8px;
    color: #ffc107;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0 auto;
}

.coffee-btn svg {
    width: 16px;
    height: 16px;
}

.coffee-btn:hover {
    background: rgba(255, 193, 7, 0.2);
    transform: translateY(-2px);
}

/* Work image overlay */
.work-image-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.85);
    z-index: 1200;
}
.work-image-overlay-inner {
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.work-image-overlay img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
}
.work-image-close {
    position: absolute;
    top: -32px;
    right: -32px;
    background: transparent;
    color: var(--text);
    border: none;
    font-size: 2rem;
    cursor: pointer;
}

.work-image-overlay .work-image-close {
    position: fixed;
    top: 24px;
    right: 24px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    z-index: 1310;
    transition: background 180ms ease, transform 180ms ease, opacity 180ms ease;
}

.work-image-overlay .work-image-close:hover {
    background: rgba(255,255,255,0.08);
    transform: translateY(-2px);
}

/* Animated image element used for move/scale animation */
.work-image-anim {
    position: fixed;
    z-index: 1300;
    will-change: transform, width, height, left, top;
    transition: transform 450ms cubic-bezier(0.2, 0.8, 0.2, 1), width 450ms cubic-bezier(0.2, 0.8, 0.2, 1), height 450ms cubic-bezier(0.2, 0.8, 0.2, 1), left 450ms cubic-bezier(0.2, 0.8, 0.2, 1), top 450ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.work-image-anim { object-fit: contain; }

.work-image-anim.centered {
    transform: none;
}

.work-image-anim.expanded {
    transition: transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1), width 600ms cubic-bezier(0.2, 0.8, 0.2, 1), height 600ms cubic-bezier(0.2, 0.8, 0.2, 1), left 600ms cubic-bezier(0.2, 0.8, 0.2, 1), top 600ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.work-image-overlay.dimmed {
    background: rgba(0,0,0,0.95);
    transition: background 300ms ease;
}

/* Works CTA Card */
.works-cta {
    grid-column: 5 / span 2;
    grid-row: span 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.works-cta-inner {
    width: 100%;
    text-align: center;
    padding: 2rem 1.5rem;
}

.works-cta-title {
    display: inline-block;
    font-size: 4.5rem;
    font-weight: 700;
    line-height: 0.95;
    text-align: left;
    letter-spacing: -0.02em;
    margin: 0;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.works-cta-title span { display: block; }
.works-cta-title .works-muted {
    color: var(--text-secondary);
    font-weight: 700;
    display: inline-block;
    will-change: letter-spacing, transform;
    transition: letter-spacing 900ms cubic-bezier(0.25, 0.1, 0.25, 1), transform 900ms cubic-bezier(0.25, 0.1, 0.25, 1);
    max-width: 100%;
}

.works-cta:hover .works-cta-title .works-muted,
.works-cta:focus .works-cta-title .works-muted,
.works-cta.is-active .works-cta-title .works-muted {
    letter-spacing: 0.14em;
    transform: scale(1.01);
}

/* Spotify + GitHub Card (left column short card) */
.spotify-card, .github-card {
    grid-column: 1 / span 2;
    grid-row: span 1;
}

.spotify-card {
    background: linear-gradient(135deg, rgba(30, 215, 96, 0.1) 0%, rgba(30, 215, 96, 0.05) 100%);
    border-color: rgba(30, 215, 96, 0.2);
}

/* .github-card uses base .card background/border so it matches other cards */

.spotify-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: #1ed760;
    font-size: 0.875rem;
    font-weight: 500;
}

.spotify-header svg {
    width: 20px;
    height: 20px;
}

.spotify-track {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.spotify-artist {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.spotify-progress {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.spotify-progress-bar {
    width: 60%;
    height: 100%;
    background: #1ed760;
    border-radius: 2px;
    animation: spotify-play 3s ease-in-out infinite;
}

@keyframes spotify-play {
    0%, 100% {
        width: 60%;
    }
    50% {
        width: 80%;
    }
}

/* Contact Card */
.contact-card {
    grid-column: 1 / span 3;
    grid-row: span 1;
}

.contact-title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.contact-method {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-method svg {
    width: 24px;
    height: 24px;
}

.contact-method span {
    font-size: 0.875rem;
    font-weight: 500;
}

.contact-method:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #333333;
    transform: translateY(-2px);
}

/* Small Accent Box */
.accent-box {
    grid-column: 4 / span 1;
    grid-row: span 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0;
    overflow: hidden;
    position: relative;
}

/* Suppress the white hover glow and any hover transform for the small
   client three.js accent card (uses class .accent-box). The larger
   canvas-based cards use .threejs-service and remain unaffected. */
.accent-box,
.accent-box:hover {
    transform: none !important;
}

.accent-box::before,
.accent-box:hover::before {
    opacity: 0 !important;
    pointer-events: none !important; 
}

/* Remove the subtle gradient/border that was adding a light gray overlay
   on the small client three.js card so the canvas visuals show cleanly. */
.accent-box,
.accent-box:hover {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

/* Strong reset for any residual visual effects inside the accent box.
   This ensures no background, gradient, filter, shadow or blend mode
   from parent/global rules affects the small three.js canvas card. */
.accent-box,
.accent-box * {
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    border-color: transparent !important;
    box-shadow: none !important;
    filter: none !important;
    mix-blend-mode: normal !important;
}

.accent-box canvas,
.accent-box > canvas {
    background: transparent !important;
    display: block !important;
}

#threejs-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.accent-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
}

.accent-icon {
    font-size: 2rem;
    animation: float 3s ease-in-out infinite;
}

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

.accent-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
    max-width: 100px;
}

/* ====================================================================
   RESPONSIVE DESIGN - IMPROVED MOBILE-FIRST APPROACH
   ==================================================================== */

/* Extra Small Mobile: 0px - 374px */
@media (max-width: 374px) {
    body {
        padding: 1rem;
    }
    
    .container {
        grid-template-columns: 1fr;
        gap: 0.625rem;
        grid-auto-rows: 140px;
    }
    
    .card {
        padding: 1rem;
        border-radius: 10px;
    }
    
    /* Hero */
    .hero {
        grid-column: span 1;
        grid-row: span 4;
        padding: 1.25rem;
    }
    
    .hero h1 {
        font-size: 1.625rem;
        line-height: 1.2;
        margin-bottom: 0.875rem;
    }
    
    .hero-subtitle {
        font-size: 0.875rem;
        margin-bottom: 1.25rem;
        line-height: 1.5;
    }
    
    .btn-primary, .btn-cta {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
        width: 100%;
    }
    
    .status-indicator {
        top: 1rem;
        right: 1rem;
        width: 6px;
        height: 6px;
    }
    
    /* Profile */
    .profile {
        grid-column: span 1;
        grid-row: span 3;
        padding: 1.25rem 0.875rem;
        gap: 1.25rem;
    }
    
    .profile-avatar-large {
        width: 70px;
        height: 70px;
    }
    
    .profile-name {
        font-size: 1.125rem;
    }
    
    .profile-socials-grid {
        gap: 1.25rem;
        margin-top: 0.5rem;
    }
    
    .social-btn svg {
        width: 26px;
        height: 26px;
    }
    
    .profile-cta-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.85rem;
    }
    
    /* Work Cards */
    .work {
        grid-column: span 1;
        grid-row: span 2;
    }
    
    .work-overlay {
        transform: translateY(0);
        opacity: 1;
        padding: 1rem;
    }
    
    .work-overlay h3 {
        font-size: 1.1rem;
    }
    
    .work-overlay p {
        font-size: 0.8rem;
    }
    
    /* Featured Work */
    .featured {
        grid-column: span 1;
        grid-row: span 2;
    }
    
    /* Services */
    .service {
        grid-column: span 1;
        grid-row: span 2;
    }
    
    .service-icon {
        width: 36px;
        height: 36px;
        margin-bottom: 1rem;
    }
    
    .service h4 {
        font-size: 1rem;
    }
    
    .service p {
        font-size: 0.85rem;
    }
    
    /* Tools */
    .tools {
        grid-column: span 1;
        grid-row: span 3;
        padding: 1rem 0 1rem 0 !important;
    }
    
    .tools-title {
        font-size: 0.875rem;
        padding: 0 0.875rem;
    }
    
    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.375rem;
    }
    
    .tool-item svg,
    .tool-item img {
        width: 28px;
        height: 28px;
    }
    
    .tool-item:nth-child(n+10) {
        display: none;
    }
    
    .tools-view-all {
        font-size: 0.8rem;
        padding: 0.625rem 1rem;
        margin: 0.375rem 0.875rem 0 0.875rem;
        width: calc(100% - 1.75rem);
    }
    
    /* Quote Card */
    .quote-card {
        grid-column: span 1;
        grid-row: span 3;
        padding: 1.25rem;
    }
    
    .quote-mark {
        font-size: 4rem;
        top: 0.75rem;
        left: 1rem;
    }
    
    .quote-text {
        font-size: 1.05rem;
        line-height: 1.5;
        margin-bottom: 1.25rem;
    }
    
    .quote-author {
        font-size: 0.8rem;
    }
    
    /* Stats */
    .stat-card, .mini-stats-card {
        grid-column: span 1;
        grid-row: span 1;
    }
    
    .mini-stats-card {
        grid-row: span 2;
        gap: 1.25rem;
        padding: 1.5rem 1rem;
    }
    
    .mini-stat-number {
        font-size: 1.875rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-icon {
        font-size: 1.5rem;
    }
    
    /* GitHub Cards */
    .github-contributions, .github-stats, .github-card {
        grid-column: span 1;
        grid-row: span 1;
    }
    
    /* Status Card */
    .status-card {
        grid-column: span 1;
        grid-row: span 2;
    }
    
    .status-badge {
        font-size: 0.8rem;
        padding: 0.375rem 0.875rem;
    }
    
    .status-title {
        font-size: 1.25rem;
    }
    
    .status-desc {
        font-size: 0.875rem;
    }
    
    .tag {
        font-size: 0.8rem;
        padding: 0.3rem 0.65rem;
    }
    
    /* Location Card */
    .location-card {
        grid-column: span 1;
        grid-row: span 2;
    }
    
    .location-icon {
        width: 36px;
        height: 36px;
    }
    
    .location-card h4 {
        font-size: 1.125rem;
    }
    
    .location-time {
        font-size: 1.5rem;
    }
    
    /* Certifications */
    .certifications-card {
        grid-column: span 1;
        grid-row: span 3;
    }
    
    .cert-title {
        font-size: 0.875rem;
        margin-bottom: 1.25rem;
    }
    
    .cert-list {
        gap: 0.875rem;
    }
    
    .cert-icon {
        width: 36px;
        height: 36px;
    }
    
    .cert-info h5 {
        font-size: 1rem;
    }
    
    .cert-info p {
        font-size: 0.85rem;
    }
    
    /* Coffee Card */
    .coffee-card {
        grid-column: span 1;
        grid-row: span 2;
    }
    
    .coffee-emoji {
        font-size: 2.5rem;
    }
    
    .coffee-card h4 {
        font-size: 1.125rem;
    }
    
    /* Works CTA */
    .works-cta {
        grid-column: span 1;
        grid-row: span 2;
        order: 9999;
    }
    
    .works-cta-title {
        font-size: 3rem;
        line-height: 0.95;
    }
    
    .works-cta-inner {
        padding: 1.5rem 1rem;
    }
    
    /* Contact Card */
    .contact-card {
        grid-column: span 1;
        grid-row: span 2;
    }
    
    .contact-methods {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .contact-method {
        padding: 0.875rem;
    }
    
    .contact-method svg {
        width: 20px;
        height: 20px;
    }
    
    /* Accent Box */
    .accent-box {
        grid-column: span 1;
        grid-row: span 1;
    }
    
    /* Blog Card */
    .blog-card {
        grid-column: span 1;
        grid-row: span 2;
    }
    
    .blog-title {
        font-size: 1.125rem;
    }
}

/* Small Mobile: 375px - 480px */
@media (min-width: 375px) and (max-width: 480px) {
    body {
        padding: 1rem;
    }
    
    .container {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        grid-auto-rows: 160px;
    }
    
    .card {
        padding: 1.25rem;
        border-radius: 12px;
    }
    
    /* Work overlay always visible on touch devices */
    .work-overlay {
        transform: translateY(0);
        opacity: 1;
    }
    
    /* Hero */
    .hero {
        grid-column: span 1;
        grid-row: span 4;
        padding: 1.5rem;
    }
    
    .hero h1 {
        font-size: 2rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    
    .btn-primary, .btn-cta {
        padding: 0.875rem 1.75rem;
        font-size: 0.9rem;
    }
    
    /* Profile */
    .profile {
        grid-column: span 1;
        grid-row: span 3;
        padding: 1.5rem 1rem;
    }
    
    .profile-avatar-large {
        width: 80px;
        height: 80px;
    }
    
    .profile-name {
        font-size: 1.25rem;
    }
    
    .profile-socials-grid {
        gap: 1.5rem;
    }
    
    .social-btn svg {
        width: 28px;
        height: 28px;
    }
    
    /* Card Ordering for Mobile */
    .hero { order: 1; }
    .profile { order: 2; }
    .service { order: 3; }
    .work-luveian { order: 4; }
    .work-king-rajasthan { order: 5; }
    .work-shyam-kemicals { order: 6; }
    .work-nex { order: 7; }
    .tools { order: 8; }
    .github-contributions { order: 9; }
    .github-stats { order: 10; }
    .quote-card { order: 11; }
    .mini-stats-card { order: 12; }
    .status-card { order: 13; }
    .location-card { order: 14; }
    .certifications-card { order: 15; }
    .github-card { order: 16; }
    .coffee-card { order: 17; }
    .contact-card { order: 18; }
    .accent-box { order: 19; }
    .works-cta { order: 20; }
    
    /* All cards span 1 column on mobile */
    .featured, .work, .quote-card, .tools, 
    .status-card, .location-card, .certifications-card,
    .coffee-card, .works-cta, .github-card, 
    .contact-card, .accent-box, .service,
    .github-contributions, .github-stats, .mini-stats-card,
    .blog-card {
        grid-column: span 1;
    }
    
    /* Adjust specific card heights */
    .work, .service, .featured {
        grid-row: span 2;
    }
    
    .location-card {
        grid-row: span 2;
    }
    
    .quote-card {
        grid-row: span 3;
        padding: 1.5rem;
    }
    
    .quote-text {
        font-size: 1.25rem;
    }
    
    .quote-mark {
        font-size: 5rem;
    }
    
    .works-cta {
        grid-row: span 2;
    }
    
    .works-cta-title {
        font-size: 3.5rem;
        line-height: 0.95;
    }
    
    .tools {
        grid-row: span 3;
    }
    
    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }
    
    .tool-item:nth-child(n+10) {
        display: none;
    }
    
    .tool-item svg,
    .tool-item img {
        width: 32px;
        height: 32px;
    }
    
    .tools-view-all {
        font-size: 0.85rem;
        padding: 0.75rem 1rem;
    }
    
    .certifications-card {
        grid-row: span 3;
    }
    
    .cert-list {
        gap: 1rem;
    }
    
    .cert-icon {
        width: 40px;
        height: 40px;
    }
    
    .mini-stats-card {
        grid-row: span 2;
        gap: 1.5rem;
    }
    
    .mini-stat-number {
        font-size: 2rem;
    }
    
    .contact-card {
        grid-row: span 2;
    }
    
    .contact-methods {
        grid-template-columns: 1fr;
    }
}

/* Mobile: 481px - 640px */
@media (min-width: 481px) and (max-width: 640px) {
    body {
        padding: 1rem;
    }
    
    .container {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.875rem;
        grid-auto-rows: 180px;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    /* Work overlay always visible on touch devices */
    .work-overlay {
        transform: translateY(0);
        opacity: 1;
    }
    
    .hero {
        grid-column: span 2;
        grid-row: span 3;
    }
    
    .hero h1 {
        font-size: 2.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .profile {
        grid-column: span 2;
        grid-row: span 2;
        flex-direction: row;
        text-align: left;
        justify-content: space-between;
    }
    
    .profile-top {
        flex-direction: row;
        align-items: center;
    }
    
    .profile-avatar-large {
        width: 90px;
        height: 90px;
    }
    
    .profile-socials-grid {
        flex-direction: column;
        gap: 1rem;
        margin-top: 0;
    }
    
    .profile-cta-btn {
        width: auto;
        align-self: flex-end;
    }
    
    /* 2-column cards */
    .featured, .work, .quote-card, .tools,
    .certifications-card, .coffee-card, .contact-card {
        grid-column: span 2;
    }
    
    .featured {
        grid-row: span 2;
    }
    
    .work {
        grid-row: span 2;
    }
    
    .quote-card {
        grid-row: span 2;
    }
    
    .tools {
        grid-row: span 3;
    }
    
    .works-cta {
        grid-column: span 2;
        grid-row: span 2;
    }
    
    .works-cta-title {
        font-size: 4rem;
        line-height: 0.95;
    }
    
    .certifications-card {
        grid-row: span 2;
    }
    
    .coffee-card {
        grid-row: span 2;
    }
    
    /* 1-column cards */
    .service, .stat-card, .github-contributions,
    .github-stats, .mini-stats-card, .status-card,
    .location-card, .github-card, .accent-box,
    .blog-card {
        grid-column: span 1;
    }
    
    .service {
        grid-row: span 2;
    }
    
    .mini-stats-card {
        grid-row: span 2;
    }
    
    .status-card {
        grid-row: span 2;
    }
    
    .location-card {
        grid-row: span 2;
    }
    
    .github-card {
        grid-row: span 1;
    }
    
    .blog-card {
        grid-row: span 2;
    }
    
    .contact-card {
        grid-row: span 2;
    }
    
    .tools-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .tool-item:nth-child(n+13) {
        display: none;
    }
    
    .tool-item svg,
    .tool-item img {
        width: 36px;
        height: 36px;
    }
}

/* Tablet: 641px - 768px */
@media (min-width: 641px) and (max-width: 768px) {
    body {
        padding: 1rem;
    }
    
    .container {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
        grid-auto-rows: 190px;
    }
    
    .card {
        padding: 1.75rem;
    }
    
    /* Work overlay always visible on touch devices */
    .work-overlay {
        transform: translateY(0);
        opacity: 1;
    }
    
    .hero {
        grid-column: span 3;
        grid-row: span 3;
    }
    
    .hero h1 {
        font-size: 3.25rem;
    }
    
    .profile {
        grid-column: span 1;
        grid-row: span 3;
    }
    
    .featured {
        grid-column: span 2;
        grid-row: span 2;
    }
    
    .work {
        grid-column: span 2;
        grid-row: span 2;
    }
    
    .quote-card {
        grid-column: span 2;
        grid-row: span 2;
    }
    
    .tools {
        grid-column: span 2;
        grid-row: span 3;
    }
    
    .tools-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .tool-item:nth-child(n+17) {
        display: none;
    }
    
    .works-cta {
        grid-column: span 2;
        grid-row: span 2;
    }
    
    .works-cta-title {
        font-size: 3.5rem;
    }
    
    .service {
        grid-column: span 2;
        grid-row: span 2;
    }
    
    .certifications-card {
        grid-column: span 2;
        grid-row: span 2;
    }
    
    .coffee-card {
        grid-column: span 2;
        grid-row: span 2;
    }
    
    .contact-card {
        grid-column: span 2;
        grid-row: span 1;
    }
    
    .status-card {
        grid-column: span 2;
        grid-row: span 2;
    }
    
    .location-card {
        grid-column: span 2;
        grid-row: span 1;
    }
    
    .mini-stats-card {
        grid-column: span 1;
        grid-row: span 2;
    }
    
    .github-contributions, .github-stats, .github-card, .accent-box {
        grid-column: span 2;
        grid-row: span 1;
    }
}

/* Tablet: 769px - 1024px */
@media (min-width: 769px) and (max-width: 1024px) {
    body {
        padding: 1rem;
    }
    
    .container {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
        grid-auto-rows: 200px;
    }
    
    .card {
        padding: 1.75rem;
    }
    
    .hero {
        grid-column: span 3;
        grid-row: span 3;
    }
    
    .hero h1 {
        font-size: 3.5rem;
    }
    
    .profile {
        grid-column: span 1;
        grid-row: span 3;
    }
    
    .featured {
        grid-column: span 2;
        grid-row: span 2;
    }
    
    .work {
        grid-column: span 2;
        grid-row: span 2;
    }
    
    .quote-card {
        grid-column: span 2;
        grid-row: span 2;
    }
    
    .tools {
        grid-column: span 2;
        grid-row: span 3;
    }
    
    .tools-grid {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .works-cta {
        grid-column: span 2;
        grid-row: span 2;
    }
    
    .works-cta-title {
        font-size: 3.75rem;
    }
    
    .service {
        grid-column: span 2;
        grid-row: span 2;
    }
    
    .certifications-card {
        grid-column: span 2;
        grid-row: span 2;
    }
    
    .coffee-card {
        grid-column: span 2;
        grid-row: span 2;
    }
    
    .contact-card {
        grid-column: span 2;
        grid-row: span 1;
    }
}

/* Small Desktop: 1025px - 1280px */
/*  */


/* @media (min-width: 1441px) {
    .container {
        max-width: 1600px;
        grid-template-columns: repeat(6, 1fr);
        grid-auto-rows: 200px;
    }
    
    .hero h1 {
        font-size: 5rem;
    }
    
    .works-cta-title {
        font-size: 4.5rem;
    }
} */

/* Ultra-wide Screens: 1920px+ */
@media (min-width: 1920px) {
    .container {
        max-width: 1800px;
        grid-auto-rows: 220px;
        gap: 1.25rem;
    }
    
    .card {
        padding: 2.25rem;
    }
    
    .hero h1 {
        font-size: 5.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
}

/* Landscape Mode Adjustments for Mobile/Tablet */
@media (max-height: 600px) and (orientation: landscape) {
    body {
        padding: 1rem;
    }
    
    .container {
        grid-auto-rows: 140px;
        gap: 0.75rem;
    }
    
    .card {
        padding: 1.25rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .quote-text {
        font-size: 1.125rem;
    }
    
    .works-cta-title {
        font-size: 3rem;
    }
}

/* High DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .card {
        border-width: 0.5px;
    }
    
    .profile-avatar-large {
        border-width: 1px;
    }
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .work-overlay {
        transform: none !important;
        opacity: 1 !important;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
        padding: 0;
    }
    
    .container {
        display: block;
    }
    
    .card {
        page-break-inside: avoid;
        border: 1px solid #ddd;
        margin-bottom: 1rem;
    }
    
    .status-indicator,
    .btn-primary,
    .btn-cta,
    .profile-cta-btn,
    .tools-view-all,
    .coffee-btn,
    .social-btn {
        display: none;
    }
}