/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #ffffff;
    background: linear-gradient(135deg, #0a0a1a 0%, #1a1a2e 50%, #16213e 100%);
    overflow-x: hidden;
    min-height: 100vh;
}

/* ===== CSS VARIABLES ===== */
:root {
    /* Colors - Dark Theme */
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #ffffff;
    --text-primary: #ffffff;
    --text-secondary: #a8a8a8;
    --text-muted: #6b7280;
    --background: #0f0f23;
    --background-secondary: #1a1a2e;
    --background-accent: #16213e;
    --border-light: #2a2a3e;
    --border-medium: #3a3a4e;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-accent: linear-gradient(135deg, #ffffff 0%, #8b5cf6 100%);
    --gradient-text: linear-gradient(135deg, #ffffff 0%, #a8a8a8 100%);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.2);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.5);
    
    /* Spacing */
    --section-padding: 5rem 0;
    --container-padding: 0 2rem;
    --border-radius: 0.75rem;
    --border-radius-lg: 1rem;
    
    /* Typography */
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;
    --font-size-6xl: 3.75rem;
    --font-size-7xl: 4.5rem;
}

/* ===== UTILITY CLASSES ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--container-padding);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    font-size: var(--font-size-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
    background: var(--background-secondary);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #000000; /* solid at top */
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    transition: background 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease;
}

.navbar.scrolled {
    background: rgba(0, 0, 0, 0.55); /* glass on scroll */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-color: rgba(255,255,255,0.06);
}

/* Hero Logo Animation */
.hero-logo {
    position: absolute;
    top: 66%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1; /* sit behind hero content */
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    text-align: center;
}

.hero-logo.scrolled {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.98);
    pointer-events: none;
}

/* Hero Logo Animation */
.hero-logo {
    position: absolute;
    top: 66%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1; /* sit behind hero content */
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    text-align: center;
}

.hero-logo.scrolled {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.98);
    pointer-events: none;
}

/* Laptop-specific hero logo adjustments */
@media (max-width: 1440px) and (min-width: 1025px) {
    .hero-logo {
        top: 68%;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .hero-logo {
        top: 70%;
    }
}

.hero-greeting-main {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin: 0 0 1rem 0;
    font-family: 'Space Grotesk', sans-serif;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* not used now; keeping for reference */
.hero-logo-text { display: none; }

.hero-logo-role {
    font-size: clamp(2.8rem, 12vw, 10rem);
    font-weight: 900;
    margin: 0;
    font-family: 'Orbitron', 'Space Grotesk', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 0.85;
    text-align: center;
    background: linear-gradient(135deg, #d7d7d7 0%, #a9a9a9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 22px rgba(255, 255, 255, 0.10);
    opacity: 0.08;
}

/* Smooth text swap for hero background title */
.hero-logo-role.swap {
    opacity: 0;
    transition: opacity 0.35s ease;
}

/* remove old scrolled variations - no longer needed */

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(15, 15, 35, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.navbar.scrolled .nav-container {
    opacity: 1;
}

.nav-logo a {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    font-family: 'Space Grotesk', sans-serif;
}

.navbar.scrolled .nav-logo a {
    opacity: 1;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Hide mobile nav-actions by default (desktop) */
.mobile-nav-actions {
    display: none;
}

/* Show desktop nav-actions by default */
.desktop-nav-actions {
    display: flex;
}

.nav-resume {
    display: flex;
    align-items: center;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: var(--font-size-xs);
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: var(--font-size-sm);
    transition: all 0.3s ease;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.5rem 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    transform: translateY(-1px);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(135deg, #07070b 0%, #121023 50%, #1a1330 100%);
    padding-top: 4rem;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(800px 600px at 20% 80%, rgba(130, 100, 230, 0.08) 0%, transparent 60%),
        radial-gradient(700px 500px at 85% 15%, rgba(160, 120, 255, 0.06) 0%, transparent 60%);
    pointer-events: none;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    position: relative;
    z-index: 1;
    padding-top: 3.5rem;
    gap: 1.5rem;
}

/* Internal hero scroller (invisible overlay) */
.hero-scroller {
    position: absolute;
    left: 0;
    right: 0;
    top: 34vh; /* below name + links */
    height: 44vh;
    overflow-y: auto;
    overscroll-behavior: contain; /* prevent page scroll until finished */
    -ms-overflow-style: none; /* IE/Edge */
    scrollbar-width: none; /* Firefox */
    background: transparent;
    border: none;
    outline: none;
    box-shadow: none;
    will-change: transform;
    transform: translateZ(0); /* avoid hairline seams */
    z-index: 2; /* above bg text, below main content clicks generally */
}
.hero-scroller::-webkit-scrollbar { display: none; }
.hero-scroller-content { height: 2400px; background: transparent; }

/* Particles canvas in hero */
#hero-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0; /* behind hero content but above background */
}



.hero-content {
    max-width: 800px;
    animation: slideInLeft 0.8s ease-out;
    margin-bottom: 2rem;
    margin-top: 0.5rem;
    position: relative;
    z-index: 1;
}

.hero-greeting {
    margin-bottom: 0.8rem;
}

.greeting-text {
    font-size: var(--font-size-base);
    color: var(--accent-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    opacity: 0.95;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.hero-name {
    font-size: clamp(1.8rem, 4.2vw, 2.8rem);
    font-weight: 800;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    line-height: 1.2;
    margin: 0.25rem 0 1.5rem 0;
    font-family: 'Space Grotesk', sans-serif;
    transition: opacity 0.5s ease, transform 0.5s ease;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .hero-logo { top: 72%; }
    .hero-logo-role { font-size: clamp(2rem, 15vw, 5.5rem); opacity: 0.08; line-height: 0.8; }
}

.hero-name.scrolled {
    opacity: 0;
    transform: translateY(-10px);
}

.hero-title {
    margin-bottom: 1.5rem;
}

.title-name {
    display: block;
    font-size: var(--font-size-7xl);
    font-weight: 900;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    font-family: 'Space Grotesk', sans-serif;
}

.title-role {
    display: block;
    font-size: var(--font-size-4xl);
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #b0b0b0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
    font-family: 'Space Grotesk', sans-serif;
}

.hero-description {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: none;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 4rem;
}

/* ===== HERO SOCIAL ICONS ===== */
.hero-social {
    display: flex;
    gap: 1.2rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.social-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.social-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    transition: all 0.4s ease;
    transform: translate(-50%, -50%);
    z-index: -1;
}

.social-icon:hover::before {
    width: 120%;
    height: 120%;
}

.social-icon:hover {
    color: var(--background);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 30px rgba(99, 102, 241, 0.4);
    border-color: transparent;
}

/* ===== HERO VISUAL ===== */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    animation: slideInRight 0.8s ease-out;
}

.profile-card {
    position: relative;
    width: 380px;
    height: 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin-top: 1rem;
}

.profile-image {
    position: relative;
    width: 380px;
    height: 440px;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    margin-bottom: 1rem;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    will-change: transform;
    transition: none;
}

.image-container {
    width: 100%;
    height: 100%;
    position: relative;
    display: block;
    background: transparent !important; /* ensure no card fill */
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
}

.profile-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
    opacity: 0.25;
}

/* Hide placeholder whenever the image is present */
.image-container .avatar-img + .profile-placeholder { display: none; }

.status-indicator { display: none; }

/* Spin toggle */
/* Spin removed per request; keep tilt only */

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-color);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-text {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    font-weight: 500;
}

.floating-elements {
    display: none; /* disable hero floaters; using skills floaters instead */
}

.floating-element {
    position: absolute;
    width: 60px;
    height: 60px;
    background: var(--background);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    animation: float 3s ease-in-out infinite;
    transition: transform 0.8s ease, left 0.8s ease, top 0.8s ease, opacity 0.5s ease;
}

.floating-element:nth-child(1) {
    top: 10%;
    right: -10%;
    animation-delay: 0s;
}

.floating-element:nth-child(2) {
    top: 40%;
    left: -10%;
    animation-delay: 1s;
}

.floating-element:nth-child(3) {
    bottom: 30%;
    right: -5%;
    animation-delay: 2s;
}

.floating-element:nth-child(4) {
    bottom: 10%;
    left: -5%;
    animation-delay: 1.5s;
}

.floating-element i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* ===== SCROLL INDICATOR ===== */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.scroll-line {
    width: 2px;
    height: 30px;
    background: var(--text-muted);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    animation: scrollLine 2s ease-in-out infinite;
}

.scroll-text {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ===== SECTION HEADERS ===== */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: var(--font-size-4xl);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.section-subtitle {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== ABOUT SECTION ===== */
.about {
    padding: var(--section-padding);
    background: var(--background);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-intro h3 {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.about-intro p {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.about-details {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.detail-group h4 {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.detail-group ul {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.detail-group li {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    position: relative;
    padding-left: 1rem;
}

.detail-group li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 600;
}

.detail-group p {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    line-height: 1.6;
}

.about-visual {
    display: flex;
    justify-content: center;
    position: relative;
}

.about-image {
    position: relative;
    width: 350px;
    height: 400px;
}

.image-frame {
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-xl);
}

.profile-photo {
    font-size: 4rem;
    color: white;
    opacity: 0.8;
}

.experience-badge {
    position: absolute;
    bottom: -1rem;
    right: -1rem;
    background: var(--background);
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    text-align: center;
    min-width: 80px;
}

.badge-number {
    display: block;
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--primary-color);
}

.badge-text {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.2;
}

/* ===== EXPERIENCE SECTION ===== */
.experience {
    padding: var(--section-padding);
    background: var(--background-secondary);
}

.skills-section h3 {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
    text-align: center;
}

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

/* Floating icons overlay in Skills */
#experience .skills-section { position: relative; }
.skills-floaters {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}
.skills-floater {
    position: absolute;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.14);
    box-shadow: 0 12px 30px rgba(99,102,241,0.25), inset 0 0 20px rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    transition: left .6s cubic-bezier(.2,.8,.2,1), top .6s cubic-bezier(.2,.8,.2,1), transform .6s ease, opacity .4s ease;
}
.skills-floater i { font-size: 1.25rem; }

/* Collision/shine effect on target */
.skill-item { position: relative; overflow: hidden; }
.skill-item.collide { animation: collide-bounce .35s ease; }
.skill-item .shine {
    position: absolute;
    top: 0; left: -70%;
    width: 40%; height: 100%;
    transform: skewX(-20deg);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
    opacity: 0; pointer-events: none;
}
.skill-item.shine-run .shine { animation: shine-sweep .6s ease forwards; }

@keyframes collide-bounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); }
}
@keyframes shine-sweep {
    0% { left: -70%; opacity: 0; }
    20% { opacity: 1; }
    100% { left: 130%; opacity: 0; }
}

.skill-category {
    background: var(--background);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}

.skill-category h4 {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.skill-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--background-secondary);
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
}

.skill-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.skill-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.skill-item span {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
}

/* highlight when an icon arrives */
.skill-item.filled {
    box-shadow: 0 0 0 2px rgba(99,102,241,0.35), 0 6px 20px rgba(99,102,241,0.25);
    transform: translateY(-2px);
}

/* ===== PROJECTS SECTION ===== */
.projects {
    padding: var(--section-padding);
    background: var(--background);
}

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

.project-card {
    background: var(--background);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--border-medium);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.project-number {
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: var(--text-muted);
    background: var(--background-secondary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.project-link {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--background-secondary);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
}

.project-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.project-image {
    height: 200px;
    background: var(--background-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.image-placeholder {
    font-size: 3rem;
    color: var(--text-muted);
    opacity: 0.5;
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.project-content p {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

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

.project-tech span {
    padding: 0.25rem 0.75rem;
    background: var(--background-secondary);
    color: var(--text-secondary);
    font-size: var(--font-size-xs);
    font-weight: 500;
    border-radius: 1rem;
    border: 1px solid var(--border-light);
}

.projects-footer {
    text-align: center;
}

/* ===== WORK (STACKED) ===== */
.work {
    padding: var(--section-padding);
    background: var(--background);
    position: relative; /* for nav buttons positioning */
    --ease-snap: cubic-bezier(.2,.8,.2,1);
}

.work-stack {
    position: relative;
    height: 200vh; /* adjusted by JS for stacked scroll */
}

.work-card {
    position: sticky; /* stacked scroll */
    top: 7rem;
    margin: 0 auto 2rem auto;
    max-width: 1000px;
    background: var(--background);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem 1.5rem 1.25rem;
    box-shadow: var(--shadow-md);
    transform: none;
    opacity: 1;
    transition: box-shadow 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                border-color 350ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
                background-color 300ms ease;
    will-change: box-shadow, border-color;
}

.work-card + .work-card { margin-top: 2rem; }
.work-card .work-meta { display:flex; justify-content: space-between; align-items:center; margin-bottom: .5rem; color: var(--text-muted); font-weight:600; }
.work-card .work-index { font-size: var(--font-size-xl); color: var(--primary-color); }
.work-card .work-role { color: var(--text-primary); margin: .25rem 0 .5rem 0; }
.work-card .work-desc { color: var(--text-secondary); margin: 0 0 .5rem 0; }
.work-card .work-points { margin: 0; padding-left: 1.25rem; color: var(--text-secondary); }
.work-card.revealed { transform: none; opacity: 1; }
.work-card:hover { box-shadow: var(--shadow-lg); border-color: var(--border-medium); }

/* Header/body layout */
.work-header { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 1rem; }
.work-header .work-index { color: var(--primary-color); font-weight: 800; }
.work-header .work-period { color: var(--text-muted); }
.work-role { font-weight: 700; font-size: var(--font-size-lg); }

/* Collapsible body driven by --open (0..1) with moderate buffer transitions */
.work-body {
    overflow: hidden;
    max-height: calc(var(--open, 0) * 1200px);
    opacity: var(--open, 0);
    transition: max-height 350ms cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                opacity 280ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translateY(calc((1 - var(--open, 0)) * 8px));
    will-change: max-height, opacity, transform;
}

/* No entry offsets for stacked */
.work-body.enter-from-right,
.work-body.enter-from-left { transform: none; opacity: 1; }

/* Disable card slide/exits */
.work-card.slide-from-right,
.work-card.slide-from-left,
.work-card.exit-left,
.work-card.exit-right { transform: none; opacity: 1; }

/* Detailed content layout inside work card */
.work-sections { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.25rem; margin-top: 1rem; }
.work-subtitle { font-weight: 800; color: var(--text-primary); margin: .5rem 0 .75rem; display:flex; align-items:center; gap:.5rem; }
.work-tags { display:flex; flex-wrap:wrap; gap:.5rem; margin:.5rem 0 1rem; }
.work-tags .tag { background: rgba(99,102,241,.12); color: var(--primary-color); border:1px solid rgba(99,102,241,.25); padding:.25rem .6rem; border-radius: .75rem; font-size: var(--font-size-xs); font-weight:600; }
.work-list { margin:0; padding-left: 1.2rem; display:grid; gap:.5rem; }
.work-list li { color: var(--text-secondary); }
.work-pill { background: rgba(255,255,255,.04); border:1px solid var(--border-light); border-radius: .75rem; padding:.75rem .9rem; }
.work-metrics { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:.75rem; margin-top: .75rem; }
.metric { background: rgba(255,255,255,.04); border:1px solid var(--border-light); border-radius:.75rem; padding:.75rem; display:flex; flex-direction:column; }
.metric-value { font-weight:800; color: var(--text-primary); }
.metric-label { font-size: var(--font-size-xs); color: var(--text-muted); }

@media (max-width: 900px){
  .work-sections { grid-template-columns: 1fr; }
}

/* Keep headers visible for non-active */
.work-card:not(.active) .work-role { opacity: 0.9; }

/* Enhanced active card styling */
.work-card.active {
    box-shadow: var(--shadow-lg);
    border-color: rgba(99, 102, 241, 0.2);
}

.work-card.active .work-role {
    color: var(--text-primary);
    opacity: 1;
    font-weight: 700;
}

/* Brighter text for active card content */
.work-card.active .work-desc {
    color: #e5e5e5;
    opacity: 1;
}

.work-card.active .work-list li {
    color: #d1d5db;
}

.work-card.active .work-subtitle {
    color: var(--text-primary);
    opacity: 1;
}

.work-card.active .metric-value {
    color: var(--text-primary);
    font-weight: 800;
}

.work-card.active .metric-label {
    color: #a1a1aa;
}

/* Remove nav buttons entirely */
.work-nav, .work-nav-btn { display: none !important; }

/* Layer order and staggered tops for smooth stack */
.work-card { z-index: 1; }
.work-card:nth-child(2) { z-index: 2; }
.work-card:nth-child(3) { z-index: 3; }
.work-card:nth-child(4) { z-index: 4; }
.work-card:nth-child(5) { z-index: 5; }
.work-card:nth-child(1){ top: 6rem; }
.work-card:nth-child(2){ top: 12rem; }
.work-card:nth-child(3){ top: 18rem; }
.work-nav-btn.prev { left: 12px; }
.work-nav-btn.next { right: 12px; }
@media (max-width: 900px){ .work-nav-btn { display:none; } }
/* Remove nav buttons entirely */
.work-nav, .work-nav-btn { display: none !important; }

/* ===== EDUCATION ===== */
.education {
    padding: var(--section-padding);
    background: var(--background); /* unify section background to remove band */
}

.edu-timeline { display: grid; gap: 1rem; max-width: 900px; margin: 0 auto; }
.edu-item { background: var(--background); border: 1px solid var(--border-light); border-radius: var(--border-radius-lg); padding: 1.25rem; box-shadow: var(--shadow-md); }
.edu-item h3 { margin: 0 0 .25rem 0; color: var(--text-primary); }
.edu-item .edu-meta { color: var(--text-muted); margin: 0; }

/* Hover affordance for education tiles */
.edu-item { transition: transform 300ms cubic-bezier(.2,.8,.2,1), box-shadow 300ms ease, border-color 300ms ease, background-color 300ms ease; }
.edu-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-medium);
    background: rgba(255,255,255,0.02);
}

/* ===== CONTACT SECTION ===== */
.contact {
    padding: var(--section-padding);
    background: var(--background-secondary);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h3 {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.contact-info p {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.contact-details {
    margin-bottom: 2rem;
}

.contact-detail {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--background);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-light);
}

.contact-detail i {
    width: 20px;
    color: var(--primary-color);
    text-align: center;
}

.contact-detail span {
    color: var(--text-secondary);
    font-weight: 500;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.contact-form {
    background: var(--background);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}

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

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

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* ===== DEVELOPER TERMINAL ===== */
.dev-mode-btn {
    margin-left: 0; /* Remove margin since we're using gap in nav-actions */
}

.btn-dev-mode {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    height: 36px; /* Match the height of btn-sm */
}

.btn-dev-mode:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
    color: var(--text-primary);
}

.btn-dev-mode i {
    font-size: 0.875rem;
}

/* Terminal Backdrop Overlay */
.terminal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.terminal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.dev-terminal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 1200px;
    max-width: 95vw;
    height: 750px;
    max-height: 90vh;
    background: #1a1a2e;
    border-radius: 12px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dev-terminal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.terminal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: #16213e;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.terminal-controls {
    display: flex;
    gap: 0.5rem;
}

.terminal-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.terminal-btn.close {
    background: #ff5f57;
}

.terminal-btn.close:hover {
    background: #ff3b30;
}

.terminal-title {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    font-weight: 500;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
}

.terminal-body {
    height: calc(100% - 60px);
    display: flex;
    flex-direction: column;
    background: #0f0f23;
}

.terminal-content {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.4;
}

.terminal-line {
    margin-bottom: 0.5rem;
    display: flex;
    flex-wrap: wrap;
}

.terminal-prompt {
    color: #22c55e;
    margin-right: 0.5rem;
    user-select: none;
}

.terminal-text {
    color: #a8a8a8;
    white-space: pre-wrap;
}

.terminal-command {
    color: #ffffff;
}

.terminal-error {
    color: #ef4444;
}

.terminal-success {
    color: #22c55e;
}

.terminal-info {
    color: #3b82f6;
}

.terminal-input-line {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

.terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #ffffff;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 14px;
    outline: none;
    margin-left: 0.5rem;
}

.terminal-input::placeholder {
    color: #6b7280;
}

/* Terminal scrollbar */
.terminal-content::-webkit-scrollbar {
    width: 6px;
}

.terminal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.terminal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.terminal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ===== RESUME VIEWER MODAL ===== */
.resume-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 11000; /* Higher than terminal (10000) */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.resume-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.resume-viewer {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 1000px;
    max-width: 95vw;
    height: 800px;
    max-height: 90vh;
    background: #1a1a2e;
    border-radius: 12px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
    z-index: 11001; /* Higher than backdrop */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.resume-viewer.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.resume-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: #16213e;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.resume-controls {
    display: flex;
    gap: 0.5rem;
}

.resume-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.resume-btn.close {
    background: #ff5f57;
}

.resume-btn.close:hover {
    background: #ff3b30;
}

.resume-title {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    font-weight: 500;
    font-family: 'Space Grotesk', sans-serif;
    margin: 0;
}

.resume-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-resume-download {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--border-radius);
    color: white;
    font-size: var(--font-size-xs);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-resume-download:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-resume-download i {
    font-size: 0.75rem;
}

.resume-body {
    height: calc(100% - 60px);
    background: #0f0f23;
}

.resume-content {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.resume-content iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
}

/* Resume viewer responsive design */
@media (max-width: 1024px) {
    .resume-viewer {
        width: 95vw;
        height: 85vh;
    }
}

@media (max-width: 768px) {
    .resume-viewer {
        width: 95vw;
        height: 90vh;
        border-radius: 8px;
    }
    
    .resume-header {
        padding: 0.5rem 0.75rem;
    }
    
    .resume-title {
        font-size: var(--font-size-xs);
    }
    
    .btn-resume-download {
        padding: 0.4rem 0.8rem;
        font-size: var(--font-size-xs);
    }
}

/* ===== FOOTER ===== */
.footer {
    background: #000000;
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.footer p {
    font-size: var(--font-size-sm);
    opacity: 0.8;
}

/* ===== ANIMATIONS ===== */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

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

@keyframes scrollLine {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(100%);
    }
}

@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== RESPONSIVE DESIGN ===== */

/* Large Desktop (1441px and up) - Default styles apply */

/* Medium Desktop / Large Laptop (1200px - 1440px) */
@media (max-width: 1440px) {
    .container {
        max-width: 1100px;
        padding: 0 2rem;
    }
    
    .hero-logo-role {
        font-size: clamp(2.5rem, 10vw, 8rem);
    }
    
    .profile-card {
        width: 380px;
        height: 480px;
    }
    
    .profile-image {
        width: 380px;
        height: 440px;
    }
    
    .work-card {
        max-width: 900px;
    }
}

/* Standard Laptop (1025px - 1199px) */
@media (max-width: 1199px) {
    :root {
        --font-size-6xl: 3.25rem;
        --font-size-5xl: 2.75rem;
        --font-size-4xl: 2rem;
        --section-padding: 4rem 0;
    }
    
    .container {
        max-width: 950px;
        padding: 0 1.5rem;
    }
    
    .hero-container {
        padding-top: 3rem;
        gap: 1.2rem;
    }
    
    .hero-name {
        font-size: clamp(1.6rem, 4.2vw, 2.2rem);
        letter-spacing: 0.12em;
        margin-bottom: 1rem;
    }
    
    .hero-logo-role {
        font-size: clamp(2.2rem, 9vw, 7rem);
    }
    
    .hero-description {
        font-size: var(--font-size-base);
        max-width: 500px;
    }
    
    .profile-card {
        width: 320px;
        height: 400px;
    }
    
    .profile-image {
        width: 320px;
        height: 360px;
    }
    
    .hero-social {
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .social-icon {
        width: 44px;
        height: 44px;
    }
    
    .about-content {
        gap: 3rem;
    }
    
    .about-intro h3 {
        font-size: var(--font-size-xl);
    }
    
    .about-intro p {
        font-size: var(--font-size-base);
    }
    
    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    .skill-category {
        padding: 1.75rem;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 1.5rem;
    }
    
    .work-card {
        max-width: 850px;
        padding: 1.25rem;
        top: 6rem;
    }
    
    .work-sections {
        gap: 1rem;
    }
    
    .contact-content {
        gap: 3rem;
    }
    
    .dev-terminal {
        width: 1000px;
        height: 650px;
    }
    
    /* Adjust hero social icons for laptops */
    .hero-social {
        margin-bottom: 2.5rem;
    }
    
    .social-icon {
        width: 48px;
        height: 48px;
        font-size: 1.15rem;
    }
}

/* Small Laptop / Large Tablet (769px - 1024px) */
@media (max-width: 1024px) {
    :root {
        --font-size-5xl: 2.5rem;
        --font-size-4xl: 1.875rem;
        --font-size-3xl: 1.5rem;
        --section-padding: 3.5rem 0;
    }
    
    .container {
        max-width: 100%;
        padding: 0 1.5rem;
    }
    
    .nav-container {
        padding: 1rem 1.5rem;
    }
    
    .hero-container {
        padding-top: 4rem;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .hero-name {
        font-size: clamp(1.5rem, 4vw, 2.25rem);
        letter-spacing: 0.12em;
    }
    
    .hero-description {
        font-size: var(--font-size-sm);
        max-width: 500px;
        margin-bottom: 1.5rem;
    }
    
    .hero-logo-role {
        font-size: clamp(2.5rem, 10vw, 8rem);
    }
    
    .profile-card {
        width: 320px;
        height: 400px;
    }
    
    .profile-image {
        width: 320px;
        height: 360px;
    }
    
    .hero-actions {
        gap: 0.75rem;
        margin-bottom: 3rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
    }
    
    .about-visual {
        order: -1;
    }
    
    .about-image {
        width: 300px;
        height: 350px;
    }
    
    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .work-card {
        max-width: 100%;
        top: 5rem;
        margin-left: 1rem;
        margin-right: 1rem;
    }
    
    .work-sections {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .dev-terminal {
        width: 900px;
        height: 600px;
    }
    
    .terminal-content {
        font-size: 13px;
    }
    
    /* Better spacing for laptop viewport */
    .section-header {
        margin-bottom: 3rem;
    }
    
    .section-title {
        font-size: var(--font-size-3xl);
    }
}

/* Tablet (769px - 900px) */
@media (max-width: 900px) {
    .hero-social {
        gap: 0.75rem;
        margin-bottom: 2.5rem;
    }
    
    .social-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .hero-actions {
        gap: 0.75rem;
    }
    
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: var(--font-size-sm);
    }
    
    .skill-list {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
    
    .project-card {
        border-radius: var(--border-radius);
    }
    
    .dev-terminal {
        width: 95vw;
        height: 80vh;
    }
}

/* Mobile (768px and below) */
@media (max-width: 768px) {
    :root {
        --font-size-5xl: 2.5rem;
        --font-size-4xl: 2rem;
        --font-size-3xl: 1.5rem;
        --section-padding: 3rem 0;
        --container-padding: 0 1rem;
    }

    .hero-container {
        padding-top: 2.5rem;
        gap: 1rem;
    }
    
    .hero-name {
        font-size: clamp(1.4rem, 6vw, 1.8rem);
        letter-spacing: 0.1em;
        margin-bottom: 0.8rem;
    }
    
    .profile-card {
        width: 280px;
        height: 340px;
    }
    
    .profile-image {
        width: 280px;
        height: 300px;
    }
    
    .hero-social {
        gap: 0.8rem;
        margin-bottom: 1.2rem;
    }
    
    .social-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--background);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 2rem;
        transition: left 0.3s ease;
        border-top: 1px solid var(--border-light);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    /* Hide desktop nav-actions on mobile */
    .desktop-nav-actions {
        display: none;
    }

    /* Show mobile nav-actions inside the menu */
    .mobile-nav-actions {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 1rem;
        margin-top: 2rem;
        padding: 1.5rem 2rem;
        border-top: 1px solid var(--border-light);
        width: 100%;
        background: rgba(255, 255, 255, 0.02);
        border-radius: var(--border-radius);
    }

    .mobile-nav-actions .btn-sm,
    .mobile-nav-actions .btn-dev-mode {
        font-size: var(--font-size-sm);
        padding: 0.7rem 1.4rem;
        border-radius: var(--border-radius);
        min-width: 100px;
        justify-content: center;
    }

    .mobile-nav-actions .btn-dev-mode {
        background: var(--background-secondary);
        border: 1px solid var(--border-medium);
        color: var(--text-primary);
    }

    .mobile-nav-actions .btn-dev-mode:hover {
        background: var(--primary-color);
        border-color: var(--primary-color);
    }

    /* Hide mobile nav-actions by default */
    .nav-menu .mobile-nav-actions {
        display: none;
    }

    /* Show mobile nav-actions when menu is active */
    .nav-menu.active .mobile-nav-actions {
        display: flex;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
        padding: 0 1rem;
    }

    .hero-content {
        max-width: 100%;
    }

    .profile-card {
        width: 320px;
        height: 400px;
    }

    .profile-image {
        width: 300px;
        height: 320px;
    }

    .hero-stats {
        justify-content: center;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .detail-group ul {
        grid-template-columns: 1fr;
    }

    .floating-elements {
        display: none;
    }
}

/* Small Mobile (480px and below) */
@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        justify-content: center;
        width: 100%;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-card {
        width: 280px;
        height: 360px;
    }
    
    .profile-image {
        width: 280px;
        height: 320px;
    }
    
    .dev-terminal {
        width: 95vw;
        height: 85vh;
        border-radius: 8px;
    }
    
    .terminal-content {
        font-size: 12px;
        padding: 0.75rem;
    }
}
