/* ==========================================================================
   Ankit Singh Portfolio — Premium Interactive Styles
   ========================================================================== */

/* ── Custom Properties ── */
:root {
    --accent-primary: #8B5CF6;
    --accent-secondary: #06B6D4;
    --accent-gradient: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --font-display: 'Space Grotesk', 'Inter', sans-serif;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    --transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --navbar-height: 80px;
    --container-max: 1200px;
    --section-padding: clamp(80px, 12vw, 140px);
}

[data-theme="dark"] {
    --bg: #050505;
    --bg-elevated: #0a0a0a;
    
    /* Ambient blobs for dark mode to enhance the glassmorphism effect */
    --bg-image: radial-gradient(at 0% 0%, rgba(139, 92, 246, 0.15) 0px, transparent 50%),
                radial-gradient(at 100% 100%, rgba(6, 182, 212, 0.12) 0px, transparent 50%),
                radial-gradient(at 50% 100%, rgba(139, 92, 246, 0.05) 0px, transparent 100%);

    --card: rgba(255, 255, 255, 0.08);
    --card-border: rgba(255, 255, 255, 0.1);
    --text: #FFFFFF;
    --text-secondary: #B0B0B0;
    --glass-bg: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.12);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --input-bg: rgba(255, 255, 255, 0.05);
    --overlay: rgba(0, 0, 0, 0.7);
}

[data-theme="light"] {
    /* Using a subtle cool-grey background so white glass stands out */
    --bg: #F0F4F8; 
    --bg-elevated: #FFFFFF;
    
    /* Ambient blobs in the background to give glassmorphism something to blur */
    --bg-image: radial-gradient(at 0% 0%, rgba(139, 92, 246, 0.08) 0px, transparent 50%),
                radial-gradient(at 100% 100%, rgba(6, 182, 212, 0.08) 0px, transparent 50%),
                radial-gradient(at 50% 50%, rgba(139, 92, 246, 0.03) 0px, transparent 100%);

    /* True glass requires high transparency white over the grey background */
    --card: rgba(255, 255, 255, 0.65);
    /* A solid white border mimics the specular highlight on the edge of glass */
    --card-border: rgba(255, 255, 255, 1);
    
    --text: #0F172A;
    --text-secondary: #475569;
    
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 1);
    
    /* Slightly crisper, cooler shadows for light mode */
    --shadow: 0 10px 40px rgba(15, 23, 42, 0.06), 0 2px 5px rgba(15, 23, 42, 0.03);
    
    --input-bg: rgba(255, 255, 255, 0.7);
    --overlay: rgba(255, 255, 255, 0.85);
}

/* Theme transition */
html.theme-transition,
html.theme-transition *,
html.theme-transition *::before,
html.theme-transition *::after {
    transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease !important;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg);
    background-image: var(--bg-image, none);
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition), color var(--transition);
}

body.nav-open { overflow: hidden; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }

::selection {
    background: var(--accent-primary);
    color: #fff;
}

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 clamp(20px, 5vw, 40px);
}

.section {
    padding: var(--section-padding) 0;
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

/* ── Typography ── */
.section-label {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent-primary);
    margin-bottom: 12px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.section-title--large {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.0625rem;
    margin-top: 12px;
}

.section-header { margin-bottom: clamp(40px, 6vw, 64px); }
.section-header--center { text-align: center; }

/* ── Glass Card ── */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn--sm { padding: 10px 20px; font-size: 0.8125rem; }
.btn--full { width: 100%; }

.btn--primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.35);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.5);
}

.btn--outline {
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
}

.btn--outline:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.btn--ghost {
    color: var(--text-secondary);
}

.btn--ghost:hover {
    color: var(--accent-primary);
}

.btn--ripple .ripple {
    position: absolute;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    animation: rippleAnim 0.6s ease-out;
    pointer-events: none;
}

@keyframes rippleAnim {
    to { transform: translate(-50%, -50%) scale(20); opacity: 0; }
}

.btn.is-loading .btn__text { opacity: 0; }
.btn.is-loading .btn__loader {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Theme Toggle ── */
.theme-toggle { padding: 4px; }

.theme-toggle__track {
    display: block;
    width: 56px;
    height: 30px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    position: relative;
    transition: all var(--transition);
}

.theme-toggle--sm .theme-toggle__track { width: 48px; height: 26px; }

.theme-toggle__thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4);
}

.theme-toggle--sm .theme-toggle__thumb { width: 18px; height: 18px; }

[data-theme="light"] .theme-toggle__thumb { transform: translateX(26px); }
[data-theme="light"] .theme-toggle--sm .theme-toggle__thumb { transform: translateX(22px); }

.theme-toggle__icon {
    font-size: 10px;
    color: #fff;
    position: absolute;
    transition: opacity 0.3s, transform 0.3s;
}

.theme-toggle__icon--light { opacity: 0; transform: rotate(-90deg) scale(0); }
[data-theme="light"] .theme-toggle__icon--dark { opacity: 0; transform: rotate(90deg) scale(0); }
[data-theme="light"] .theme-toggle__icon--light { opacity: 1; transform: rotate(0) scale(1); }

.theme-toggle:hover .theme-toggle__track {
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
}

/* ── Navbar ── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--navbar-height);
}

.navbar--scrolled {
    /* Height no longer changes to prevent WebKit flashing bug */
}



.navbar--hidden { transform: translateY(-120%); }

.navbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 100%;
    width: 100%;
    max-width: calc(var(--container-max) + 80px);
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 40px);
    
    position: relative;
    transform: translateZ(0); 
    border-radius: var(--radius-full);
    margin-top: 0;
    /* Animate layout but snap background instantly to bypass Safari/Chrome blur bugs */
    transition: margin 0.4s ease, padding 0.4s ease, box-shadow 0.4s ease;
}

.navbar--scrolled .navbar__inner {
    background-color: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border); 
    margin-top: 8px;
    padding: 0 24px;
    box-shadow: var(--shadow);
}

.navbar__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.125rem;
    z-index: 1001;
    flex-shrink: 0;
    min-width: 0;
}

.navbar__logo-image {
    width: 36px;
    height: 36px;
    border-radius: 50%; /* This makes the image a perfect circle */
    object-fit: cover;  /* This prevents the image from looking squished or stretched */
    flex-shrink: 0;
    
    /* Optional: Adds a subtle border around your image matching your theme */
    border: 2px solid var(--glass-border); 
}

.navbar__logo-mark {
    width: 36px;
    height: 36px;
    background: var(--accent-gradient);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #fff;
    font-weight: 800;
}

.navbar__logo-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.navbar__menu {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    justify-content: center;
    min-width: 0;
}

.nav-link {
    padding: 8px 12px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    transition: all var(--transition);
    position: relative;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
}

.nav-link.active {
    background: var(--glass-bg);
    color: var(--accent-primary);
}

.navbar__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1001;
    flex-shrink: 0;
}

.navbar__resume span { display: inline; }

.navbar__drawer-footer {
    display: none;
}

.navbar__desktop-only { display: inline-flex; }

.navbar__toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    z-index: 1001;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}

.navbar__toggle:hover {
    background: var(--glass-bg);
}

.navbar__toggle-bar {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--overlay);
    backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* ── Hero ── */
.hero {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: visible; /* Changed from hidden to allow glowing blobs to bleed downwards */
    width: 100%;
    max-width: 100vw;
    padding-top: var(--navbar-height);
    padding-bottom: 60px;
}

.hero__bg {
    position: absolute;
    inset: 0;
    overflow: visible; /* Changed from hidden so blobs don't get sliced horizontally */
    width: 100%;
    pointer-events: none;
}

.hero__blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: blobFloat 12s ease-in-out infinite;
}

.hero__blob--1 {
    width: 500px;
    height: 500px;
    background: var(--accent-primary);
    top: -10%;
    right: -5%;
    animation-delay: 0s;
}

.hero__blob--2 {
    width: 400px;
    height: 400px;
    background: var(--accent-secondary);
    bottom: -10%;
    left: -5%;
    animation-delay: -4s;
}

.hero__blob--3 {
    width: 300px;
    height: 300px;
    background: #6366F1;
    top: 40%;
    left: 30%;
    animation-delay: -8s;
}

@keyframes blobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

.hero__particles {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hero__glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    transition: background 0.3s ease;
}

.hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    max-width: 900px;
    padding-inline: clamp(16px, 4vw, 32px);
}

.hero__name {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 8vw, 7rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
    overflow-wrap: anywhere;
}

.hero__name-inner {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    max-width: 100%;
}

.hero__greeting {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: 8px;
    letter-spacing: 0.05em;
}

.hero__tagline {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-weight: 400;
    padding-inline: clamp(0px, 2vw, 24px);
}

.hero__typed {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 8px;
    font-size: clamp(0.9375rem, 2vw, 1.25rem);
    margin-bottom: 20px;
    min-height: 2em;
    padding-inline: 8px;
}

.hero__typed-text {
    color: var(--accent-secondary);
    font-weight: 600;
    font-family: var(--font-display);
    text-align: center;
    max-width: 100%;
}

.hero__typed-label { color: var(--text-secondary); }

.hero__typed-text .typed-cursor {
    color: var(--accent-primary);
    animation: blink 0.7s infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.hero__role {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 40px;
}

.hero__role-title {
    font-weight: 600;
    font-size: 1.0625rem;
}

.hero__role-company {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

.hero__scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    z-index: 2;
    animation: scrollBounce 2s ease-in-out infinite;
}

.hero__scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--accent-primary), transparent);
}

@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ── About ── */
.about__grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: clamp(40px, 6vw, 80px);
    align-items: center;
    margin-bottom: clamp(40px, 6vw, 64px);
}

/* .about__image-frame {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 4/5;
    max-width: 400px;
} */

.about__image-frame {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 4/5;
    max-width: 400px;

    /* 1. Stack the bottom fade AND the side fades */
    -webkit-mask-image: 
        linear-gradient(to bottom, black 70%, transparent 100%),
        linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%);
    
    /* 2. Tell webkit (Chrome/Safari) to overlap them */
    -webkit-mask-composite: source-in;
    
    /* 3. Standard syntax for other browsers */
    mask-image: 
        linear-gradient(to bottom, black 70%, transparent 100%),
        linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%);
    mask-composite: intersect;
}

.about__image-photo {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures the image fills the 4/5 ratio without stretching */
    display: block;
}

.about__image-placeholder {
    width: 100%;
    height: 100%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
}

.about__image-initials {
    font-family: var(--font-display);
    font-size: 5rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.9);
}

.about__image-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
    pointer-events: none;
}

.about__text {
    color: var(--text-secondary);
    font-size: 1.0625rem;
    margin-bottom: 20px;
    line-height: 1.8;
}

.about__stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.stat-card {
    padding: 32px 24px;
    text-align: center;
    transition: transform var(--transition);
}

.stat-card:hover { transform: translateY(-4px); }

.stat-card__number {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.stat-card__label {
    display: block;
    margin-top: 8px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ── Timeline ── */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline__line {
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-primary), var(--accent-secondary));
    opacity: 0.3;
}

.timeline__item {
    position: relative;
    margin-bottom: 20px;
    padding: 0;
    overflow: hidden;
    transition: all var(--transition);
}

.timeline__item.is-current {
    border-color: var(--accent-primary);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.15);
}

.timeline__header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    width: 100%;
    padding: 24px;
    text-align: left;
}

.timeline__marker { flex-shrink: 0; padding-top: 4px; }

.timeline__dot {
    display: block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-gradient);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.5);
}

.is-current .timeline__dot {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 12px rgba(139, 92, 246, 0.5); }
    50% { box-shadow: 0 0 24px rgba(139, 92, 246, 0.8); }
}

.timeline__meta { flex: 1; }

.timeline__badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: var(--accent-gradient);
    color: #fff;
    border-radius: var(--radius-full);
    margin-bottom: 8px;
}

.timeline__role {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.timeline__company {
    color: var(--accent-primary);
    font-weight: 500;
    font-size: 0.9375rem;
}

.timeline__period {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    margin-top: 4px;
}

.timeline__chevron {
    margin-top: 8px;
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.timeline__item[data-expanded="true"] .timeline__chevron {
    transform: rotate(180deg);
}

.timeline__body {
    padding: 0 24px 24px 58px;
}

.timeline__desc {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.7;
    margin-bottom: 16px;
}

.timeline__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.timeline__tags li {
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 500;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
}

/* ── Skills ── */
.skills__universe {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    align-items: start;
}

.skills__detail {
    padding: 32px;
    position: sticky;
    top: 100px;
    text-align: center;
}

.skills__detail-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: var(--accent-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
}

.skills__detail-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.skills__detail-desc {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.7;
}

.skills__category { margin-bottom: 32px; }

.skills__category-title {
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.skills__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.skill-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.skill-chip::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.skill-chip i,
.skill-chip span { position: relative; z-index: 1; }

.skill-chip i { color: var(--accent-primary); transition: color 0.3s; }

.skill-chip:hover,
.skill-chip.is-active {
    transform: scale(1.05);
    border-color: var(--accent-primary);
    box-shadow: 0 0 24px rgba(139, 92, 246, 0.3);
}

.skill-chip:hover::before,
.skill-chip.is-active::before { opacity: 1; }

.skill-chip:hover i,
.skill-chip:hover span,
.skill-chip.is-active i,
.skill-chip.is-active span { color: #fff; }

/* ── Projects ── */
.projects__showcase {
    display: flex;
    flex-direction: column;
    gap: clamp(60px, 10vw, 120px);
    padding: 0 clamp(16px, 4vw, 40px);
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

.project-card {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    align-items: center;
    max-width: var(--container-max);
    margin: 0 auto;
    width: 100%;
}

.project-card--reverse { direction: rtl; }
.project-card--reverse > * { direction: ltr; }

.project-card__visual {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 0.4s ease;
    transform-style: preserve-3d;
}

.project-card__image {
    aspect-ratio: 16/10;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 0.6s ease;
}

.project-card:hover .project-card__image { transform: scale(1.05); }

.project-card__mockup {
    width: 85%;
    height: 75%;
    margin: auto;
    margin-top: 12%;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.project-card__mockup-bar {
    display: flex;
    gap: 6px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
}

.project-card__mockup-bar span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
}

.project-card__mockup-content { padding: 20px; }

.project-card__mockup-line {
    height: 8px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    margin-bottom: 12px;
    width: 70%;
}

.project-card__mockup-line--long { width: 90%; }
.project-card__mockup-line--short { width: 40%; }

.project-card__mockup-blocks {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.project-card__mockup-blocks span {
    flex: 1;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
}

.project-card__shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 40%, transparent 60%, rgba(255,255,255,0.05) 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.project-card:hover .project-card__shine { opacity: 1; }

.project-card__content { padding: 36px; }

.project-card__title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    margin-bottom: 16px;
}

.project-card__desc {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.7;
    margin-bottom: 24px;
}

.project-card__tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}

.project-card__badge {
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent-primary);
    border-radius: var(--radius-full);
}

.project-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* ── Certifications ── */
.certifications__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.cert-card {
    padding: 36px 28px;
    text-align: center;
    transition: transform var(--transition);
}

.cert-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.15);
}

.cert-card__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: #fff;
}

.cert-card__icon--azure { background: linear-gradient(135deg, #0078D4, #00BCF2); }
.cert-card__icon--mern { background: var(--accent-gradient); }
.cert-card__icon--android { background: linear-gradient(135deg, #3DDC84, #073042); color: #073042; }

.cert-card__title {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.cert-card__desc {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.cert-card__year {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--accent-primary);
}

/* ── Contact ── */
.contact__grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 48px;
    align-items: start;
}

.contact__form { padding: 40px; }

.form-group { margin-bottom: 20px; }

.form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text);
    font-family: inherit;
    font-size: 0.9375rem;
    transition: all var(--transition);
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-secondary); opacity: 0.6; }

.form-feedback {
    margin-top: 16px;
    font-size: 0.875rem;
    text-align: center;
}

.form-feedback--error { color: #EF4444; }

.contact__intro {
    color: var(--text-secondary);
    font-size: 1.0625rem;
    line-height: 1.8;
    margin-bottom: 32px;
}

.contact__socials {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: all var(--transition);
}

.social-link i {
    width: 20px;
    text-align: center;
    color: var(--accent-primary);
    font-size: 1.125rem;
}

.social-link:hover {
    border-color: var(--accent-primary);
    transform: translateX(4px);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.15);
}

/* Success Overlay */
.success-overlay {
    position: fixed;
    inset: 0;
    background: var(--overlay);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.success-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

.success-overlay__content {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 48px;
    text-align: center;
    max-width: 400px;
    box-shadow: var(--shadow);
}

.success-overlay__icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, #10B981, #06B6D4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
}

.success-overlay__content h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.success-overlay__content p {
    color: var(--text-secondary);
    margin-bottom: 28px;
}

/* ── Footer ── */
.footer {
    padding: 32px 0;
    border-top: 1px solid var(--glass-border);
}

.footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer__copy {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.footer__actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.back-to-top {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition);
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--accent-gradient);
    border-color: transparent;
    color: #fff;
    transform: translateY(-2px);
}

/* ── Focus States (Accessibility) ── */
:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 3px;
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero__blob { animation: none; }
    .hero__scroll { animation: none; }
}

/* ── Responsive ── */

/* Large desktop — slightly tighter nav links */
@media (max-width: 1200px) {
    .nav-link {
        padding: 8px 10px;
        font-size: 0.8125rem;
    }

    .navbar__resume span { display: none; }
    .navbar__resume { padding: 10px 14px; }
}

/* Tablet & below — mobile navigation */
@media (max-width: 1024px) {
    :root {
        --navbar-height: 72px;
    }

    /* .navbar__inner {
        background: var(--glass-bg);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--glass-border);

        border-radius: 0;
    } */
    .navbar__inner {
        background: var(--glass-bg);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        
        /* Reset the borders and corners for the mobile layout */
        border: none;
        border-bottom: 1px solid var(--glass-border);
        border-radius: 0;
        -webkit-mask-image: none;
        mask-image: none;
        overflow: visible; /* Ensure mobile drawer isn't clipped */
    }
    
    .navbar--scrolled .navbar__inner {
        margin-top: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-top: none;
    }

    .navbar__desktop-only { display: none !important; }

    .navbar__toggle { display: flex; }

    .navbar__menu {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(320px, 100%);
        max-width: 100%;
        height: 100vh;
        height: 100dvh;
        flex: none;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        padding: calc(var(--navbar-height) + 24px) 24px 32px;
        background: var(--bg-elevated);
        border-left: 1px solid var(--glass-border);
        transform: translateX(100%);
        visibility: hidden;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s;
        z-index: 1000;
        gap: 4px;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .navbar__menu.is-open {
        transform: translateX(0);
        visibility: visible;
    }

    .nav-link {
        padding: 14px 16px;
        font-size: 1rem;
        border-radius: var(--radius-md);
        white-space: normal;
    }

    .navbar__drawer-footer {
        display: flex;
        flex-direction: column;
        gap: 16px;
        margin-top: auto;
        padding-top: 24px;
        border-top: 1px solid var(--glass-border);
    }

    .theme-toggle--drawer {
        display: flex;
        align-items: center;
        gap: 12px;
        width: 100%;
        padding: 4px 0;
    }

    .theme-toggle__label {
        font-size: 0.9375rem;
        font-weight: 500;
        color: var(--text-secondary);
    }

    .nav-overlay {
        display: block;
        pointer-events: none;
    }

    body.nav-open .nav-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .navbar__toggle[aria-expanded="true"] .navbar__toggle-bar:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .navbar__toggle[aria-expanded="true"] .navbar__toggle-bar:nth-child(2) { opacity: 0; }
    .navbar__toggle[aria-expanded="true"] .navbar__toggle-bar:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    /* Hero adjustments */
    .hero__blob--1 { width: 320px; height: 320px; right: -15%; }
    .hero__blob--2 { width: 280px; height: 280px; left: -15%; }
    .hero__blob--3 { width: 200px; height: 200px; }

    .hero__name { font-size: clamp(2.25rem, 7vw, 4rem); }
    .hero__role { margin-bottom: 32px; }
    .hero__scroll { bottom: 24px; }

    /* Section layouts */
    .about__grid { grid-template-columns: 1fr; }
    .about__image-wrap { justify-self: center; }
    .about__stats { grid-template-columns: repeat(2, 1fr); }
    .skills__universe { grid-template-columns: 1fr; }
    .skills__detail { position: static; }
    .project-card,
    .project-card--reverse { grid-template-columns: 1fr; direction: ltr; }
    .certifications__grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
    .contact__grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    :root {
        --navbar-height: 64px;
        --section-padding: clamp(64px, 10vw, 100px);
    }

    .hero {
        min-height: auto;
        padding-top: calc(var(--navbar-height) + 32px);
        padding-bottom: 72px;
    }

    .hero__name { font-size: clamp(2rem, 9vw, 3.25rem); }
    .hero__tagline { font-size: 1rem; margin-bottom: 20px; }
    .hero__role { margin-bottom: 28px; }
    .hero__actions { flex-direction: column; align-items: stretch; width: 100%; max-width: 300px; margin-inline: auto; }
    .hero__actions .btn { width: 100%; justify-content: center; }

    .hero__blob--1 { width: 240px; height: 240px; }
    .hero__blob--2 { width: 200px; height: 200px; }
    .hero__blob--3 { width: 160px; height: 160px; }

    .about__stats { grid-template-columns: 1fr 1fr; }
    .timeline__line { left: 20px; }
    .timeline__body { padding-left: 50px; }
    .project-card__actions { flex-direction: column; }
    .project-card__actions .btn { width: 100%; justify-content: center; }
    .footer__inner { flex-direction: column; gap: 20px; text-align: center; }
}

@media (max-width: 480px) {
    .navbar__logo-text { display: none; }

    .navbar__inner { padding-inline: 16px; }

    .navbar__menu {
        width: 100%;
        border-left: none;
    }

    .about__stats { grid-template-columns: 1fr; }
    .hero__typed { flex-direction: column; gap: 4px; }
    .hero__name { font-size: clamp(1.875rem, 10vw, 2.75rem); }
}
