/* ============================================
   PORTFOLIO STYLES - Abdul Rahman Shaikh
   Single consolidated stylesheet
   ============================================ */

/* ============================================
   1. CSS VARIABLES
   ============================================ */
   :root {
    /* Colors */
    --color-bg: #050505;
    --color-text: #f0f0f0;
    --color-text-muted: #a09a8c;
    --color-accent: #c4a57b;
    --color-accent-light: #d4b88b;
    
    /* Spacing */
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-24: 6rem;
    --space-32: 8rem;
    
    /* Typography */
    --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Border Radius */
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    
    /* Transitions */
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --duration-normal: 300ms;
    --duration-slow: 500ms;
    --duration-slower: 800ms;
}

/* ============================================
   2. RESET & BASE
   ============================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: 'Geist', sans-serif;
    overflow-x: hidden;
}

img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
button { cursor: pointer; background: none; border: none; font: inherit; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }

::selection { background-color: var(--color-accent); color: var(--color-bg); }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

.font-display { font-family: 'Space Grotesk', sans-serif; }

/* ============================================
   3. AMBIENT BACKGROUND
   ============================================ */
.ambient-background {
    position: fixed;
    inset: 0;
    z-index: -9;
    overflow: hidden;
    pointer-events: none;
}

.ambient-background__gradient {
    position: absolute;
    top: -10%;
    left: 50%;
    transform: translateX(-50%);
    height: 900px;
    width: 1200px;
    border-radius: 50%;
    filter: blur(48px);
    opacity: 0.1;
    background: radial-gradient(1200px 600px at 50% 30%, rgb(17, 24, 39) 10%, rgb(100, 90, 80) 40%, transparent 70%);
}

/* ============================================
   4. NAVIGATION
   ============================================ */
.nav-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 24px;
}

.nav {
    max-width: 900px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-full);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    opacity: 0;
    animation: navSlideDown 0.8s var(--ease-smooth) forwards;
}

@keyframes navSlideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.nav__logo {
    margin-right: auto;
    color: #f0f0f0;
    font-family: 'Geist', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.3s ease;
}
.nav__logo:hover { color: var(--color-accent); }

.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__cta-wrapper { margin-left: auto; position: relative; }

.nav__link {
    color: rgba(160, 154, 140, 0.8);
    font-family: 'Geist', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    transition: all 0.3s ease;
    position: relative;
}
.nav__link:hover { color: #f0f0f0; background: rgba(196, 165, 123, 0.1); }

.nav__link--active {
    background: rgba(196, 165, 123, 0.15);
    color: #f0f0f0;
}
.nav__link--active::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--color-accent);
    border-radius: 50%;
    opacity: 0.8;
}

.nav__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    padding: 12px 20px;
    background: radial-gradient(ellipse at bottom, rgba(55, 50, 45, 1) 0%, rgba(20, 18, 15, 1) 100%);
    color: var(--color-accent);
    font-family: 'Geist', sans-serif;
    font-size: 0.875rem;
    font-weight: 400;
    border-radius: var(--radius-full);
    box-shadow: inset 0 0 0 1px rgba(196, 165, 123, 0.2);
    transition: all 1s cubic-bezier(0.15, 0.83, 0.66, 1);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}
.nav__cta::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 1px;
    width: 70%;
    background: linear-gradient(90deg, rgba(196, 165, 123, 0) 0%, rgba(196, 165, 123, 1) 50%, rgba(196, 165, 123, 0) 100%);
    opacity: 0.3;
    transition: opacity 1s cubic-bezier(0.15, 0.83, 0.66, 1);
}
.nav__cta:hover { transform: translateY(-3px) scale(1.1); color: #d4b88b; }
.nav__cta:hover::after { opacity: 0.8; }
.nav__cta-text { position: relative; z-index: 1; }

.nav__cta-glow {
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    height: 24px;
    width: 176px;
    background: radial-gradient(60% 100% at 50% 50%, rgba(196, 165, 123, 0.4), rgba(196, 165, 123, 0.2) 35%, transparent 70%);
    filter: blur(10px) saturate(120%);
    opacity: 0;
    transition: opacity 0.3s ease-out;
    pointer-events: none;
}
.nav__cta-wrapper:hover .nav__cta-glow { opacity: 1; }

/* Mobile Toggle */
.nav__toggle {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    color: #f0f0f0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    transition: all 0.3s ease;
    flex-shrink: 0;
}
.nav__toggle:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(196, 165, 123, 0.3); }
.nav__toggle-icon { width: 18px; height: 18px; transition: transform 0.3s ease; }
.nav__toggle-icon--close { display: none; }
.nav__toggle.is-active .nav__toggle-icon--menu { display: none; }
.nav__toggle.is-active .nav__toggle-icon--close { display: block; animation: rotateIn 0.3s ease; }

@keyframes rotateIn {
    from { transform: rotate(-90deg); opacity: 0; }
    to { transform: rotate(0); opacity: 1; }
}

.nav__mobile-resume {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    color: var(--color-accent);
    background: rgba(196, 165, 123, 0.1);
    border: 1px solid rgba(196, 165, 123, 0.2);
    border-radius: var(--radius-full);
    transition: all 0.3s ease;
    flex-shrink: 0;
}
.nav__mobile-resume:hover { background: rgba(196, 165, 123, 0.2); border-color: rgba(196, 165, 123, 0.4); }

/* Mobile Menu Dropdown */
.mobile-menu {
    position: absolute;
    top: 100%;
    left: 16px;
    right: 16px;
    z-index: 99;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s var(--ease-smooth);
    pointer-events: none;
}
.mobile-menu.is-open {
    visibility: visible;
    opacity: 1;
    transform: translateY(8px);
    pointer-events: auto;
}

.mobile-menu__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}
.mobile-menu.is-open .mobile-menu__backdrop { opacity: 1; }

.mobile-menu__dropdown {
    background: rgba(20, 20, 22, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 8px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

.mobile-menu__link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Geist', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 12px;
    transition: all 0.2s ease;
    position: relative;
}
.mobile-menu__link:hover { color: #f0f0f0; background: rgba(255, 255, 255, 0.05); }
.mobile-menu__link:active { background: rgba(255, 255, 255, 0.08); transform: scale(0.98); }

.mobile-menu__divider { height: 1px; background: rgba(255, 255, 255, 0.08); margin: 8px 16px; }

.mobile-menu__link--cta {
    color: var(--color-accent);
    background: rgba(196, 165, 123, 0.08);
    margin-top: 4px;
}
.mobile-menu__link--cta:hover { color: #d4b88b; background: rgba(196, 165, 123, 0.15); }
.mobile-menu__link--cta svg { opacity: 0.8; }

.mobile-menu__link--active {
    color: #f0f0f0;
    background: rgba(196, 165, 123, 0.15);
}
.mobile-menu__link--active::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    background: var(--color-accent);
    border-radius: 50%;
}

/* ============================================
   5. HERO SECTION
   ============================================ */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
    align-items: center;
    padding: var(--space-32) var(--space-16) var(--space-10) var(--space-16);
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

.hero__content {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
    opacity: 0;
    animation: fadeSlideUp var(--duration-slower) var(--ease-smooth) 0.3s forwards;
}

.hero__name {
    font-family: 'Geist', var(--font-body);
    font-size: clamp(3.5rem, 8vw, 6rem);
    font-weight: 400;
    line-height: 0.95;
    color: var(--color-text);
    letter-spacing: -0.03em;
}

.hero__description {
    font-family: var(--font-body);
    font-size: 1.125rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.65);
    max-width: 520px;
    line-height: 1.7;
    opacity: 0;
    animation: fadeSlideUp var(--duration-slower) var(--ease-smooth) 0.5s forwards;
}

.hero__actions {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeSlideUp var(--duration-slower) var(--ease-smooth) 0.7s forwards;
}

.btn { display: inline-flex; align-items: center; gap: 0.75rem; }
.btn--primary {
    background: var(--color-accent);
    color: #0a0a0a;
    padding: var(--space-4) var(--space-6);
    border-radius: var(--radius-full);
    font-weight: 500;
    transition: all 0.3s ease;
}
.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(196, 165, 123, 0.25);
    background: var(--color-accent-light);
}
.btn--secondary {
    background: rgba(45, 40, 35, 0.6);
    color: var(--color-text);
    padding: var(--space-4) var(--space-6);
    border-radius: var(--radius-full);
    border: 1px solid rgba(196, 165, 123, 0.2);
    transition: all 0.3s ease;
}
.btn--secondary:hover {
    background: rgba(55, 50, 45, 0.7);
    border-color: rgba(196, 165, 123, 0.4);
}
.btn__icon-left { width: 18px; height: 18px; flex-shrink: 0; }

/* Photo Card */
.hero__photo-card {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    animation: fadeSlideUp var(--duration-slower) var(--ease-smooth) 0.5s forwards;
}

.photo-card { position: relative; width: 100%; max-width: 340px; }

.photo-card__glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(100, 130, 180, 0.15) 0%, rgba(80, 100, 150, 0.08) 40%, transparent 70%);
    filter: blur(40px);
    z-index: -1;
    animation: glowPulse 6s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

.photo-card__image-wrapper {
    position: relative;
    width: 300px;
    height: 380px;
    margin: 0 auto;
    overflow: visible;
}

.photo-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    border-radius: var(--radius-xl);
    transition: all var(--duration-slow) var(--ease-smooth);
}

.photo-card__blend-top,
.photo-card__blend-left,
.photo-card__blend-right {
    position: absolute;
    pointer-events: none;
    z-index: 2;
}
.photo-card__blend-top {
    top: 0; left: 0; right: 0; height: 50px;
    background: linear-gradient(to bottom, rgba(5, 5, 8, 0.6) 0%, rgba(5, 5, 8, 0.2) 50%, transparent 100%);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.photo-card__blend-left {
    top: 0; bottom: 0; left: 0; width: 35px;
    background: linear-gradient(to right, rgba(5, 5, 8, 0.4) 0%, rgba(5, 5, 8, 0.15) 50%, transparent 100%);
    border-radius: var(--radius-xl) 0 0 var(--radius-xl);
}
.photo-card__blend-right {
    top: 0; bottom: 0; right: 0; width: 35px;
    background: linear-gradient(to left, rgba(5, 5, 8, 0.4) 0%, rgba(5, 5, 8, 0.15) 50%, transparent 100%);
    border-radius: 0 var(--radius-xl) var(--radius-xl) 0;
}

@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   6. SOCIAL SIDEBAR
   ============================================ */
.social {
    position: fixed;
    right: var(--space-10);
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    z-index: 100;
    opacity: 0;
    animation: socialFadeIn var(--duration-slower) var(--ease-smooth) 1s forwards;
}

@keyframes socialFadeIn { to { opacity: 1; } }

.social__link-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    flex-direction: row-reverse;
}

.social__link {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    background: linear-gradient(145deg, #1a1a1a, #0d0d0d);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--color-accent);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.social__link::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(196, 165, 123, 0.4), transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}
.social__link-wrapper:hover .social__link {
    border-color: rgba(196, 165, 123, 0.6);
    box-shadow: 0 6px 25px rgba(196, 165, 123, 0.15), 0 0 20px rgba(196, 165, 123, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.social__link-wrapper:hover .social__link::before { opacity: 1; }

.social__icon {
    width: 20px;
    height: 20px;
    fill: #ffffff;
    stroke: #ffffff;
    transition: all 0.4s ease;
}
.social__icon--stroke { fill: none !important; }
.social__link-wrapper:hover .social__icon {
    fill: var(--color-accent);
    stroke: var(--color-accent);
    filter: drop-shadow(0 0 8px rgba(196, 165, 123, 0.4));
}

.social__text-container {
    position: absolute;
    right: 24px;
    height: 36px;
    background: linear-gradient(270deg, transparent 0%, rgba(26, 26, 26, 0.95) 15%);
    border: 1px solid rgba(196, 165, 123, 0.2);
    border-right: none;
    border-radius: 18px 0 0 18px;
    display: flex;
    align-items: center;
    overflow: hidden;
    width: 0;
    opacity: 0;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}
.social__text-container span {
    padding-right: 32px;
    padding-left: 18px;
    white-space: nowrap;
    color: var(--color-accent);
    font-family: 'Geist', var(--font-body);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: 0;
    transform: translateX(15px);
    transition: all 0.4s ease 0.15s;
}
.social__link-wrapper:hover .social__text-container { width: 110px; opacity: 1; }
.social__link-wrapper:hover .social__text-container span { opacity: 1; transform: translateX(0); }

/* ============================================
   7. LAYOUT UTILITIES
   ============================================ */
.horizontal-section { height: 400vh; position: relative; }
.sticky-wrapper { position: relative; display: flex; align-items: flex-start; }
.sticky-content { position: sticky; top: 20vh; }

.reveal-item { opacity: 0; transition: all 1.2s cubic-bezier(0.23, 1, 0.32, 1); }
.reveal-item.fade-scale { transform: scale(0.95); filter: blur(10px); }
.reveal-item.fade-scale.active { opacity: 1; transform: scale(1); filter: blur(0); }

/* Toast */
#toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: white;
    color: black;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transform: translateY(100px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10000;
}
#toast.show { transform: translateY(0); }

/* ============================================
   8. HOVER EFFECTS
   ============================================ */

/* Paper card title */
.paper-card:hover h3 { color: var(--color-accent) !important; }

/* Paper/Code buttons */
.paper-card a.rounded-full.bg-white\/5 {
    background: linear-gradient(145deg, #1a1a1a, #0d0d0d) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.paper-card a.rounded-full.bg-white\/5:hover {
    border-color: rgba(196, 165, 123, 0.6) !important;
    color: var(--color-accent) !important;
    box-shadow: 0 6px 25px rgba(196, 165, 123, 0.15), 0 0 20px rgba(196, 165, 123, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}
.paper-card a.rounded-full.bg-white\/5:hover i { color: var(--color-accent); filter: drop-shadow(0 0 8px rgba(196, 165, 123, 0.4)); }

/* Contact section buttons */
section#contact a.w-10.h-10.rounded-full {
    background: linear-gradient(145deg, #1a1a1a, #0d0d0d) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
section#contact a.w-10.h-10.rounded-full:hover {
    border-color: rgba(196, 165, 123, 0.6) !important;
    color: var(--color-accent) !important;
    box-shadow: 0 6px 25px rgba(196, 165, 123, 0.15), 0 0 20px rgba(196, 165, 123, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}
section#contact a.w-10.h-10.rounded-full:hover i { color: var(--color-accent); filter: drop-shadow(0 0 8px rgba(196, 165, 123, 0.4)); }

/* Projects section buttons */
section#projects a.bg-white {
    background: linear-gradient(145deg, #1a1a1a, #0d0d0d) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
section#projects a.bg-white:hover {
    border-color: rgba(196, 165, 123, 0.6) !important;
    color: var(--color-accent) !important;
    box-shadow: 0 6px 25px rgba(196, 165, 123, 0.15), 0 0 20px rgba(196, 165, 123, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}
section#projects a.bg-white:hover i { color: var(--color-accent); filter: drop-shadow(0 0 8px rgba(196, 165, 123, 0.4)); }

.group:hover .group-hover\:text-white { color: var(--color-accent) !important; }
section#projects .group\/link:hover { color: var(--color-accent) !important; }

/* ============================================
   9. RESPONSIVE - TABLET
   ============================================ */
@media (max-width: 1200px) {
    .hero { gap: var(--space-12); padding: var(--space-32) var(--space-12) var(--space-10) var(--space-12); }
    .hero__name { font-size: clamp(2.5rem, 6vw, 4.5rem); }
    .photo-card { max-width: 300px; }
    .photo-card__image-wrapper { width: 260px; height: 330px; }
    .photo-card__glow { width: 260px; height: 260px; }
}

@media (max-width: 1024px) {
    .nav-wrapper { padding: 16px; }
    .nav__logo { font-size: 0.875rem; padding: 0 16px 0 8px; }
    .nav__link { padding: 8px 12px; font-size: 0.8rem; }
    .nav__link--active::after { display: none; }
    .nav__cta { padding: 10px 16px; min-width: 100px; font-size: 0.8rem; }
    
    .hero { grid-template-columns: 1fr; gap: var(--space-12); padding: var(--space-24) var(--space-8) var(--space-10) var(--space-8); text-align: center; }
    .hero__content { align-items: center; order: 2; }
    .hero__photo-card { order: 1; }
    .hero__description { text-align: center; }
    .hero__actions { justify-content: center; }
    .photo-card { max-width: 280px; }
    .photo-card__image-wrapper { width: 240px; height: 300px; }
    
    .social { right: var(--space-6); }
    .social__link { width: 44px; height: 44px; }
    .social__icon { width: 18px; height: 18px; }
    
    .ambient-background__gradient { width: 900px; height: 700px; }
}

/* ============================================
   10. RESPONSIVE - MOBILE
   ============================================ */
@media (max-width: 768px) {
    .nav-wrapper { padding: 12px 16px; }
    .nav { padding: 8px 12px; width: 100%; max-width: none; justify-content: space-between; gap: 8px; }
    .nav__toggle { display: flex; order: 1; }
    .nav__logo { order: 2; margin: 0 auto; padding: 0; font-size: 0.85rem; text-align: center; }
    .nav__mobile-resume { display: flex; order: 3; }
    .nav__links, .nav__spacer, .nav__cta-wrapper { display: none; }
    .mobile-menu { left: 12px; right: 12px; }
    
    .hero { padding: 140px var(--space-6) var(--space-10) var(--space-6); gap: var(--space-10); }
    .hero__name { font-size: 2.5rem; }
    .hero__description { font-size: 1rem; }
    .hero__actions { flex-direction: column; width: 100%; }
    .hero__actions .btn { width: 100%; justify-content: center; }
    .photo-card { max-width: 240px; }
    .photo-card__image-wrapper { width: 220px; height: 280px; }
    .photo-card__glow { width: 220px; height: 220px; }
    
    .social {
        position: fixed;
        bottom: var(--space-6);
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        top: auto;
        flex-direction: row;
    }
    .social__link-wrapper { flex-direction: column-reverse; }
    .social__link { width: 44px; height: 44px; }
    .social__text-container {
        right: auto; bottom: 24px; top: auto; left: 50%; transform: translateX(-50%);
        height: auto; width: auto !important; max-width: 0; padding: 0;
        border: 1px solid rgba(196, 165, 123, 0.2); border-bottom: none;
        border-radius: 12px 12px 0 0;
        background: linear-gradient(0deg, transparent 0%, rgba(26, 26, 26, 0.95) 15%);
        flex-direction: column;
    }
    .social__text-container span { padding: 8px 14px 24px; transform: translateY(15px); font-size: 10px; letter-spacing: 1px; }
    .social__link-wrapper:hover .social__text-container { max-width: 100px; width: auto !important; }
    .social__link-wrapper:hover .social__text-container span { transform: translateY(0); }
    
    .horizontal-section { height: auto !important; min-height: auto !important; }
    .horizontal-section > .sticky { position: relative !important; top: auto !important; }
    #github-horizontal-track { flex-direction: column !important; transform: none !important; gap: 2rem !important; padding: 1rem !important; }
    #github-horizontal-track > div { width: 100% !important; flex-shrink: 1 !important; }
    #github-horizontal-track .w-\[80vw\], #github-horizontal-track .w-\[85vw\] { width: 100% !important; }
    
    .sticky-content { position: relative !important; top: 0 !important; }
    .sticky-wrapper { flex-direction: column; }
    [class*="md\:sticky"] { position: relative !important; }
    
    .ambient-background__gradient { width: 600px; height: 500px; }
}

@media (max-width: 480px) {
    .nav-wrapper { padding: 10px 12px; }
    .nav { padding: 6px 10px; }
    .nav__logo { font-size: 0.8rem; }
    .nav__toggle, .nav__mobile-resume { width: 36px; height: 36px; }
    .nav__toggle-icon { width: 16px; height: 16px; }
    .mobile-menu__link { padding: 12px 14px; font-size: 0.9rem; }
    
    .hero__name { font-size: 2rem; }
    .photo-card__image-wrapper { width: 200px; height: 260px; }
    .photo-card__blend-top { height: 35px; }
    .photo-card__blend-left, .photo-card__blend-right { width: 25px; }
}

/* ============================================
   11. REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .nav { animation: none; opacity: 1; }
    .nav__toggle-icon--close { animation: none; }
    .mobile-menu { transition: opacity 0.1s ease; }
    .hero__content, .hero__description, .hero__actions, .hero__photo-card { animation: none; opacity: 1; }
    .photo-card__glow { animation: none; }
    .social { animation: none; opacity: 1; }
    .reveal-item { transition: none; }
    .ambient-background__gradient { opacity: 0.2; }
}

/* ============================================
   PROJECTS HORIZONTAL SCROLL
   ============================================ */
   .projects-scroll-container {
    overflow-x: auto;
    overflow-y: hidden;
    cursor: grab;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 24px 0;
}

.projects-scroll-container::-webkit-scrollbar {
    display: none;
}

.projects-scroll-container.is-dragging {
    cursor: grabbing;
    user-select: none;
}

.projects-scroll-container.is-dragging * {
    pointer-events: none;
}

.projects-track {
    display: flex;
    gap: 20px;
    width: max-content;
    padding: 0 24px;
}

.project-card {
    flex-shrink: 0;
    width: 340px;
    min-height: 420px;
}

@media (min-width: 1280px) {
    .project-card {
        width: 360px;
    }
    
    .projects-track {
        padding: 0 32px;
    }
}

@media (max-width: 1024px) {
    .project-card {
        width: 320px;
        min-height: 400px;
    }
}

@media (max-width: 640px) {
    .project-card {
        width: 280px;
        min-height: 380px;
    }
    
    .projects-track {
        gap: 16px;
        padding: 0 16px;
    }
}

/* Progress Dots */
.project-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.project-dot:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

.project-dot.active {
    background: var(--color-accent, #c4a57b);
    transform: scale(1.2);
}
/* ============================================
   HERO BUTTONS CSS
   Add this to your portfolio.css
   ============================================ */

/* ---- VIEW WORK BUTTON (Orange Beam) ---- */
@keyframes beam-spin { 
    to { transform: rotate(360deg); } 
}

@keyframes dots-move { 
    0% { background-position: 0 0; } 
    100% { background-position: 24px 24px; } 
}

.beam-spinner {
    animation: beam-spin 3s linear infinite;
}

.dots-pattern {
    background-image: radial-gradient(rgba(255,255,255,0.6) 1px, transparent 1px);
    background-size: 12px 12px;
    animation: dots-move 8s linear infinite;
}


/* ---- GET IN TOUCH BUTTON (Glowing Letters) ---- */
.btn-wrapper {
    position: relative;
    display: inline-block;
}

.btn {
    --border-radius: 24px;
    --padding: 4px;
    --transition: 0.4s;
    --button-color: #101010;
    --highlight-color-hue: 210deg;

    user-select: none;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    background-color: var(--button-color);
    box-shadow:
        inset 0px 1px 1px rgba(255, 255, 255, 0.2),
        inset 0px 2px 2px rgba(255, 255, 255, 0.15),
        inset 0px 4px 4px rgba(255, 255, 255, 0.1),
        inset 0px 8px 8px rgba(255, 255, 255, 0.05),
        inset 0px 16px 16px rgba(255, 255, 255, 0.05),
        0px -1px 1px rgba(0, 0, 0, 0.02),
        0px -2px 2px rgba(0, 0, 0, 0.03),
        0px -4px 4px rgba(0, 0, 0, 0.05),
        0px -8px 8px rgba(0, 0, 0, 0.06),
        0px -16px 16px rgba(0, 0, 0, 0.08);
    border: solid 1px #ffffff22;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition:
        box-shadow var(--transition),
        border var(--transition),
        background-color var(--transition);
}

.btn::before {
    content: "";
    position: absolute;
    top: calc(0px - var(--padding));
    left: calc(0px - var(--padding));
    width: calc(100% + var(--padding) * 2);
    height: calc(100% + var(--padding) * 2);
    border-radius: calc(var(--border-radius) + var(--padding));
    pointer-events: none;
    background-image: linear-gradient(0deg, #0004, #000a);
    z-index: -1;
    transition:
        box-shadow var(--transition),
        filter var(--transition);
    box-shadow:
        0 -8px 8px -6px #0000 inset,
        0 -16px 16px -8px #00000000 inset,
        1px 1px 1px #fff2,
        2px 2px 2px #fff1,
        -1px -1px 1px #0002,
        -2px -2px 2px #0001;
}

.btn::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background-image: linear-gradient(0deg,
        #fff,
        hsl(var(--highlight-color-hue), 100%, 70%),
        hsla(var(--highlight-color-hue), 100%, 70%, 50%),
        8%,
        transparent);
    background-position: 0 0;
    opacity: 0;
    transition: opacity var(--transition), filter var(--transition);
}

.btn-letter {
    position: relative;
    display: inline-block;
    color: #ffffff55;
    animation: letter-anim 2s ease-in-out infinite;
    transition: color var(--transition), text-shadow var(--transition), opacity var(--transition);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

@keyframes letter-anim {
    50% {
        text-shadow: 0 0 3px #ffffff88;
        color: #fff;
    }
}

.btn-svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-right: 0.75rem;
    fill: none;
    stroke: #e8e8e8;
    stroke-width: 1.5;
    animation: flicker 2s linear infinite;
    animation-delay: 0.5s;
    filter: drop-shadow(0 0 2px #ffffff99);
    transition: fill var(--transition), stroke var(--transition), filter var(--transition), opacity var(--transition);
}

@keyframes flicker {
    50% {
        opacity: 0.3;
    }
}

.txt-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.txt-1 {
    display: flex;
}

/* Staggered animation delays for each letter */
.btn-letter:nth-child(1) { animation-delay: 0s; }
.btn-letter:nth-child(2) { animation-delay: 0.08s; }
.btn-letter:nth-child(3) { animation-delay: 0.16s; }
.btn-letter:nth-child(4) { animation-delay: 0.24s; }
.btn-letter:nth-child(5) { animation-delay: 0.32s; }
.btn-letter:nth-child(6) { animation-delay: 0.40s; }
.btn-letter:nth-child(7) { animation-delay: 0.48s; }
.btn-letter:nth-child(8) { animation-delay: 0.56s; }
.btn-letter:nth-child(9) { animation-delay: 0.64s; }
.btn-letter:nth-child(10) { animation-delay: 0.72s; }
.btn-letter:nth-child(11) { animation-delay: 0.80s; }
.btn-letter:nth-child(12) { animation-delay: 0.88s; }

/* Hover state */
.btn:hover {
    border: solid 1px hsla(var(--highlight-color-hue), 100%, 80%, 0.4);
}

.btn:hover::before {
    box-shadow:
        0 -8px 8px -6px #fffa inset,
        0 -16px 16px -8px hsla(var(--highlight-color-hue), 100%, 70%, 0.3) inset,
        1px 1px 1px #fff2,
        2px 2px 2px #fff1,
        -1px -1px 1px #0002,
        -2px -2px 2px #0001;
}

.btn:hover::after {
    opacity: 1;
    -webkit-mask-image: linear-gradient(0deg, #fff, transparent);
    mask-image: linear-gradient(0deg, #fff, transparent);
}

.btn:hover .btn-svg {
    stroke: #fff;
    filter: drop-shadow(0 0 3px hsl(var(--highlight-color-hue), 100%, 70%)) drop-shadow(0 -4px 6px #0009);
    animation: none;
}

.btn:hover .btn-letter {
    color: #fff;
    text-shadow: 0 0 8px hsla(var(--highlight-color-hue), 100%, 70%, 0.6);
}

/* Active state */
.btn:active {
    border: solid 1px hsla(var(--highlight-color-hue), 100%, 80%, 0.7);
    background-color: hsla(var(--highlight-color-hue), 50%, 20%, 0.5);
}

.btn:active::before {
    box-shadow:
        0 -8px 12px -6px #fffa inset,
        0 -16px 16px -8px hsla(var(--highlight-color-hue), 100%, 70%, 0.8) inset,
        1px 1px 1px #fff4,
        2px 2px 2px #fff2,
        -1px -1px 1px #0002,
        -2px -2px 2px #0001;
}

.btn:active::after {
    opacity: 1;
    -webkit-mask-image: linear-gradient(0deg, #fff, transparent);
    mask-image: linear-gradient(0deg, #fff, transparent);
    filter: brightness(200%);
}

.btn:active .btn-letter {
    text-shadow: 0 0 1px hsla(var(--highlight-color-hue), 100%, 90%, 0.9);
    animation: none;
}
/* ---- GET IN TOUCH BUTTON (Orange Beam) ---- */
@keyframes beam-spin { 
    to { transform: rotate(360deg); } 
}

@keyframes dots-move { 
    0% { background-position: 0 0; } 
    100% { background-position: 24px 24px; } 
}

.beam-spinner {
    animation: beam-spin 3s linear infinite;
}

.dots-pattern {
    background-image: radial-gradient(rgba(255,255,255,0.6) 1px, transparent 1px);
    background-size: 12px 12px;
    animation: dots-move 8s linear infinite;
}