/* ========================================
   PARTHA BHUYAN PORTFOLIO - index.css
   Dark Futuristic Cyberpunk Theme
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=Space+Mono:ital,wght@0,400;0,700;1,400&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&display=swap');

/* ─── CSS VARIABLES ─── */
:root {
    --bg: #060b14;
    --bg-2: #0a1220;
    --bg-3: #0f1a2e;
    --surface: rgba(255,255,255,0.04);
    --surface-hover: rgba(255,255,255,0.08);
    --border: rgba(255,255,255,0.08);
    --border-bright: rgba(99,179,237,0.3);
    --text: #e2eaf5;
    --text-muted: #7a94b0;
    --text-faint: #3d5068;
    --accent: #3b82f6;
    --accent-bright: #60a5fa;
    --accent-glow: rgba(59,130,246,0.3);
    --accent-2: #8b5cf6;
    --accent-2-glow: rgba(139,92,246,0.3);
    --success: #10b981;
    --warning: #f59e0b;
    --red: #ef4444;
    --font-display: 'Syne', sans-serif;
    --font-mono: 'Space Mono', monospace;
    --font-body: 'DM Sans', sans-serif;
    --nav-h: 76px;
    --radius: 12px;
    --radius-lg: 20px;
    --shadow-glow: 0 0 30px rgba(59,130,246,0.2);
    --shadow-deep: 0 20px 60px rgba(0,0,0,0.5);
    --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
}

[data-theme="light"] {
    --bg: #f0f4fc;
    --bg-2: #e4ecf8;
    --bg-3: #dce7f5;
    --surface: rgba(255,255,255,0.7);
    --surface-hover: rgba(255,255,255,0.9);
    --border: rgba(59,130,246,0.15);
    --border-bright: rgba(59,130,246,0.4);
    --text: #0f1a2e;
    --text-muted: #4a6580;
    --text-faint: #93aec8;
    --accent: #2563eb;
    --accent-bright: #3b82f6;
    --accent-glow: rgba(37,99,235,0.2);
    --accent-2: #7c3aed;
    --accent-2-glow: rgba(124,58,237,0.2);
    --shadow-glow: 0 0 30px rgba(37,99,235,0.15);
    --shadow-deep: 0 20px 60px rgba(0,0,0,0.1);
}

/* ─── RESET ─── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.6;
    overflow-x: hidden;
    transition: background var(--transition), color var(--transition);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ─── CONTAINER ─── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ─── SECTION SHARED ─── */
section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 4px;
    color: var(--accent);
    padding: 6px 16px;
    border: 1px solid var(--border-bright);
    border-radius: 30px;
    margin-bottom: 16px;
    background: var(--accent-glow);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 800;
    color: var(--text);
    line-height: 1.1;
}

.section-title span {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ─── BUTTONS ─── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    border: none;
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 20px var(--accent-glow);
    white-space: nowrap;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--accent-glow);
}

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

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 32px;
    background: transparent;
    color: var(--text);
    border: 2px solid var(--border-bright);
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
    transform: translateY(-2px);
}

/* ─── ANIMATIONS ─── */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

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

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

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px var(--accent-glow); }
    50% { box-shadow: 0 0 40px var(--accent-glow), 0 0 80px var(--accent-2-glow); }
}

@keyframes ticker {
    0% { transform: translateY(0); }
    25% { transform: translateY(-25%); }
    50% { transform: translateY(-50%); }
    75% { transform: translateY(-75%); }
    100% { transform: translateY(-100%); }
}

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

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes scanline {
    0% { top: -100%; }
    100% { top: 100%; }
}

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

@keyframes badge-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ─── REVEAL ANIMATIONS ─── */
.reveal-up { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; transition-delay: var(--delay, 0s); }
.reveal-left { opacity: 0; transform: translateX(-40px); transition: opacity 0.7s ease, transform 0.7s ease; transition-delay: var(--delay, 0s); }
.reveal-right { opacity: 0; transform: translateX(40px); transition: opacity 0.7s ease, transform 0.7s ease; transition-delay: var(--delay, 0s); }

.reveal-up.revealed,
.reveal-left.revealed,
.reveal-right.revealed {
    opacity: 1;
    transform: none;
}

/* ─── NAVBAR ─── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-h);
    padding: 0 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1003;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(6,11,20,0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

[data-theme="light"] .navbar.scrolled {
    background: rgba(240,244,252,0.9);
}

.logo {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -1px;
}

.logo-bracket {
    color: var(--accent);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    padding: 8px 14px;
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--accent);
    background: var(--accent-glow);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: var(--transition);
}

.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
}

.hamburger {
    display: none;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: var(--transition);
}

.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

/* ─── HERO ─── */
.hero {
    min-height: 100vh;
    padding: var(--nav-h) 5% 0;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(59,130,246,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59,130,246,0.05) 1px, transparent 1px);
    background-size: 60px 60px;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(59,130,246,0.15) 0%, transparent 70%);
    top: -100px;
    right: -100px;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(139,92,246,0.12) 0%, transparent 70%);
    bottom: -100px;
    left: 20%;
}

.scanline {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(59,130,246,0.4), transparent);
    animation: scanline 6s linear infinite;
}

.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 80px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 30px;
    background: var(--surface);
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease forwards;
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    animation: badge-blink 2s ease infinite;
}

.hero-name {
    font-family: var(--font-display);
    font-size: clamp(52px, 8vw, 100px);
    font-weight: 800;
    line-height: 0.95;
    color: var(--text);
    margin-bottom: 20px;
    animation: fadeInUp 0.6s ease 0.1s forwards;
    opacity: 0;
    animation-fill-mode: forwards;
}

.name-accent {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-roles {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    animation: fadeInUp 0.6s ease 0.2s forwards;
    opacity: 0;
    animation-fill-mode: forwards;
}

.role-prefix {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--text-muted);
    white-space: nowrap;
}

.roles-ticker {
    height: 24px;
    overflow: hidden;
    flex: 1;
}

.role-item {
    display: block;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--accent);
    height: 24px;
    line-height: 24px;
    animation: ticker 8s steps(1) infinite;
}

.hero-desc {
    font-size: 16px;
    color: var(--text-muted);
    max-width: 520px;
    margin-bottom: 32px;
    line-height: 1.8;
    animation: fadeInUp 0.6s ease 0.3s forwards;
    opacity: 0;
    animation-fill-mode: forwards;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    animation: fadeInUp 0.6s ease 0.4s forwards;
    opacity: 0;
    animation-fill-mode: forwards;
}

.hero-socials {
    display: flex;
    gap: 12px;
    animation: fadeInUp 0.6s ease 0.5s forwards;
    opacity: 0;
    animation-fill-mode: forwards;
}

.social-link {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--text-muted);
    background: var(--surface);
    transition: var(--transition);
}

.social-link:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
    transform: translateY(-3px);
}

/* Avatar */
.hero-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    animation: fadeInRight 0.8s ease 0.3s forwards;
    opacity: 0;
    animation-fill-mode: forwards;
}

.avatar-frame {
    position: relative;
    width: 280px;
    height: 280px;
    animation: float 4s ease-in-out infinite;
}

.avatar-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid transparent;
}

.ring-1 {
    inset: -16px;
    border-color: var(--border-bright);
    animation: spin-slow 12s linear infinite;
    border-style: dashed;
}

.ring-2 {
    inset: -32px;
    border-color: rgba(139,92,246,0.15);
    animation: spin-slow-rev 18s linear infinite;
}

.ring-3 {
    inset: 0;
    border: 2px solid;
    border-image: linear-gradient(135deg, var(--accent), var(--accent-2)) 1;
    border-radius: 50%;
}

.avatar-img {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--bg-2);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border);
    animation: pulse-glow 3s ease infinite;
}

.avatar-placeholder {
    font-size: 80px;
    color: var(--text-faint);
    opacity: 0.4;
}

.avatar-badge {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg-2);
    border: 1px solid var(--border-bright);
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    backdrop-filter: blur(10px);
    white-space: nowrap;
}

.avatar-badge i { color: var(--accent-2); }

.top-right {
    top: 0px;
    right: -40px;
}

.bottom-left {
    bottom: 10px;
    left: -50px;
}

.stat-cards {
    display: flex;
    gap: 12px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--accent);
    background: var(--accent-glow);
}

.stat-num {
    display: block;
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    letter-spacing: 1px;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--text-faint);
    letter-spacing: 2px;
    animation: fadeInUp 1s ease 1.5s forwards;
    opacity: 0;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: float 2s ease-in-out infinite;
}

/* ─── ABOUT ─── */
.about {
    background: var(--bg-2);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 80px;
    align-items: center;
}

.about-img-frame {
    position: relative;
}

.about-img-inner {
    width: 100%;
    aspect-ratio: 3/4;
    max-height: 500px;
    border-radius: var(--radius-lg);
    background: var(--bg-3);
    border: 1px solid var(--border);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.about-placeholder {
    font-size: 120px;
    color: var(--text-faint);
    opacity: 0.3;
}

.about-img-deco {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 140px;
    height: 140px;
    border: 2px solid var(--accent);
    border-radius: var(--radius);
    opacity: 0.3;
    z-index: -1;
}

.about-exp-badge {
    position: absolute;
    bottom: 30px;
    right: -20px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    padding: 16px 20px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow-glow);
}

.exp-num {
    display: block;
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
}

.exp-text {
    font-size: 11px;
    opacity: 0.85;
    line-height: 1.4;
    margin-top: 4px;
}

.about-subtitle {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
}

.about-desc {
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.8;
}

.about-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 28px 0;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.info-item i {
    color: var(--accent);
    font-size: 16px;
    margin-top: 3px;
    flex-shrink: 0;
}

.info-item div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.info-label {
    font-size: 11px;
    color: var(--text-faint);
    font-family: var(--font-mono);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.info-val {
    font-size: 14px;
    color: var(--text);
    font-weight: 500;
}

/* ─── SKILLS ─── */
.skills {
    background: var(--bg);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 48px;
}

.skill-category {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: var(--transition);
}

.skill-category:hover {
    border-color: var(--border-bright);
    background: var(--surface-hover);
}

.skill-category h3 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-category h3 i { color: var(--accent); }

.skill-list { display: flex; flex-direction: column; gap: 16px; }

.skill-item {}

.skill-name {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--text);
    margin-bottom: 8px;
}

.skill-name span:last-child {
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 12px;
}

.skill-bar {
    height: 6px;
    background: var(--bg-3);
    border-radius: 3px;
    overflow: hidden;
}

.skill-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    border-radius: 3px;
    transition: width 1.5s cubic-bezier(0.4,0,0.2,1);
}

.tech-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.tech-badge {
    padding: 8px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 30px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-muted);
    transition: var(--transition);
    cursor: default;
}

.tech-badge:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
    transform: translateY(-2px);
}

/* ─── SERVICES ─── */
.services {
    background: var(--bg-2);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    cursor: default;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover {
    border-color: var(--border-bright);
    transform: translateY(-6px);
    box-shadow: var(--shadow-glow);
    background: var(--surface-hover);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: var(--accent-glow);
    border: 1px solid var(--border-bright);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--accent);
    margin-bottom: 20px;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    border-color: transparent;
    transform: scale(1.1);
}

.service-card h3 {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

.service-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
}

.service-line {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle at bottom right, var(--accent-glow), transparent);
    opacity: 0;
    transition: opacity 0.4s;
}

.service-card:hover .service-line { opacity: 1; }

/* ─── WHY HIRE ME ─── */
.why-hire {
    background: var(--bg);
}

.why-hire-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 48px;
    align-items: start;
}

.tabs-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: sticky;
    top: calc(var(--nav-h) + 20px);
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
}

.tab-btn i { width: 20px; text-align: center; }

.tab-btn:hover {
    border-color: var(--border-bright);
    color: var(--text);
    background: var(--surface-hover);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--accent-glow), var(--accent-2-glow));
    border-color: var(--accent);
    color: var(--accent);
}

.tab-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    min-height: 400px;
}

.tab-panel {
    display: none;
    animation: fadeInUp 0.4s ease;
}

.tab-panel.active { display: block; }

.tab-panel h3 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

/* Timeline */
.timeline { display: flex; flex-direction: column; gap: 0; }

.timeline-item {
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: 20px;
    padding-bottom: 32px;
    position: relative;
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: 9px;
    top: 20px;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent), transparent);
}

.timeline-item:last-child::after { display: none; }

.timeline-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent);
    border: 3px solid var(--bg);
    flex-shrink: 0;
    margin-top: 2px;
    z-index: 1;
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--accent);
    display: block;
    margin-bottom: 6px;
}

.timeline-body h4 {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.timeline-org {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 10px;
    display: block;
}

.timeline-body ul {
    list-style: disc;
    padding-left: 16px;
}

.timeline-body ul li {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 4px;
    line-height: 1.6;
}

/* Process Steps */
.process-steps { display: flex; flex-direction: column; gap: 20px; }

.process-step {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
}

.process-step:hover {
    border-color: var(--border-bright);
    transform: translateX(4px);
}

.step-num {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 800;
    color: var(--border-bright);
    flex-shrink: 0;
    line-height: 1;
}

.step-content h4 {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.step-content p { font-size: 14px; color: var(--text-muted); }

/* Ethics Grid */
.ethics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.ethic-item {
    padding: 24px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
}

.ethic-item:hover {
    border-color: var(--border-bright);
    background: var(--bg-3);
}

.ethic-item i {
    font-size: 24px;
    color: var(--accent);
    margin-bottom: 12px;
    display: block;
}

.ethic-item h4 {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.ethic-item p { font-size: 14px; color: var(--text-muted); }

/* Availability */
.availability-info { display: flex; flex-direction: column; gap: 16px; }

.avail-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
}

.avail-card:hover { border-color: var(--success); }

.avail-card i { font-size: 22px; color: var(--success); flex-shrink: 0; margin-top: 3px; }

.avail-card h4 {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.avail-card p { font-size: 14px; color: var(--text-muted); }

/* ─── PORTFOLIO ─── */
.portfolio-section { background: var(--bg-2); }

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
}

.project-card:hover {
    border-color: var(--border-bright);
    transform: translateY(-6px);
    box-shadow: var(--shadow-glow);
}

.project-img {
    aspect-ratio: 16/9;
    background: var(--bg-3);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-img-placeholder {
    font-size: 48px;
    color: var(--text-faint);
    opacity: 0.4;
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(59,130,246,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .project-overlay { opacity: 1; }

.project-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transform: scale(0.5);
    transition: var(--transition);
}

.project-card:hover .project-link { transform: scale(1); }

.project-info { padding: 24px; }

.project-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--accent);
    background: var(--accent-glow);
    border: 1px solid var(--border-bright);
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.project-info h3 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.project-info p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ─── TESTIMONIALS ─── */
.testimonials { background: var(--bg); }

.testimonial-carousel { position: relative; overflow: hidden; }

.testimonial-track {
    display: flex;
    gap: 24px;
    transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
}

.testimonial-card {
    min-width: calc(33.333% - 16px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    flex-shrink: 0;
    transition: var(--transition);
}

.testimonial-card:hover {
    border-color: var(--border-bright);
    transform: translateY(-4px);
}

.testimonial-stars {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    color: var(--warning);
}

.testimonial-card p {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.8;
    font-style: italic;
    margin-bottom: 24px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;                        /* clips image to circle */
    background: var(--bg-3);
    border: 2px solid var(--border-bright);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-faint);
    flex-shrink: 0;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;                       /* fill circle, crop edges */
    border-radius: 50%;
    display: block;
}

.testimonial-author h4 {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.testimonial-author span { font-size: 13px; color: var(--text-muted); }

.carousel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 32px;
}

.carousel-btn {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 16px;
}

.carousel-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
}

.carousel-dots { display: flex; gap: 8px; }

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background: var(--accent);
    width: 24px;
    border-radius: 4px;
}

/* ─── CONTACT ─── */
.contact { background: var(--bg-2); }

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 60px;
    align-items: start;
}

.contact-info h3 {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

.contact-info > p {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 32px;
}

.contact-items { display: flex; flex-direction: column; gap: 20px; margin-bottom: 32px; }

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.contact-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--accent-glow);
    border: 1px solid var(--border-bright);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--accent);
    flex-shrink: 0;
}

.contact-label {
    display: block;
    font-size: 11px;
    color: var(--text-faint);
    font-family: var(--font-mono);
    letter-spacing: 1px;
    margin-bottom: 3px;
}

.contact-val {
    display: block;
    font-size: 14px;
    color: var(--text);
    font-weight: 500;
}

.contact-socials {
    display: flex;
    gap: 12px;
}

.contact-socials a {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--text-muted);
    background: var(--surface);
    transition: var(--transition);
}

.contact-socials a:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
    transform: translateY(-3px);
}

/* Form */
.contact-form-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
}

.contact-form { display: flex; flex-direction: column; gap: 20px; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group { display: flex; flex-direction: column; gap: 8px; }

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    font-family: var(--font-mono);
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 15px;
    outline: none;
    transition: var(--transition);
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    background: var(--bg-3);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-faint); }

.form-status {
    font-size: 14px;
    text-align: center;
    padding: 8px;
    border-radius: var(--radius);
    min-height: 32px;
}

.form-status.success { color: var(--success); background: rgba(16,185,129,0.1); }
.form-status.error { color: var(--red); background: rgba(239,68,68,0.1); }

/* ─── FOOTER ─── */
.footer {
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 48px;
}

.footer-brand .logo {
    font-size: 22px;
    display: inline-block;
    margin-bottom: 16px;
}

.footer-brand p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 20px;
    max-width: 280px;
}

.footer-socials {
    display: flex;
    gap: 10px;
}

.footer-socials a {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: var(--text-muted);
    background: var(--surface);
    transition: var(--transition);
}

.footer-socials a:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
}

.footer-links h4 {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 20px;
}

.footer-links ul { display: flex; flex-direction: column; gap: 10px; }

.footer-links a {
    font-size: 14px;
    color: var(--text-muted);
    transition: var(--transition);
}

.footer-links a:hover { color: var(--accent); padding-left: 6px; }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    font-size: 13px;
    color: var(--text-faint);
}

.footer-bottom span { color: var(--accent); font-weight: 600; }

/* ─── SCROLL TOP ─── */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
    box-shadow: 0 4px 20px var(--accent-glow);
    border: none;
}

.scroll-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-top:hover { transform: translateY(-3px); box-shadow: 0 8px 30px var(--accent-glow); }

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
    .hero-content { grid-template-columns: 1fr; text-align: center; gap: 48px; }
    .hero-visual { margin: 0 auto; }
    .hero-actions, .hero-socials, .hero-roles { justify-content: center; }
    .hero-desc { margin: 0 auto 32px; }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .skills-grid { grid-template-columns: 1fr 1fr; }
    .portfolio-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .about-grid { grid-template-columns: 1fr; }
    .about-img-frame { max-width: 360px; margin: 0 auto; }
}

@media (max-width: 768px) {
    section { padding: 72px 0; }
    .nav-links {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        left: auto !important;
        bottom: 0 !important;
        height: 100dvh !important;
        width: 75vw !important;
        max-width: 300px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 6px !important;
        padding: 28px 20px 40px !important;
        transform: translateX(100%) !important;
        transition: transform 0.42s cubic-bezier(0.4,0,0.2,1) !important;
        background: rgba(8, 12, 28, 0.92) !important;
        backdrop-filter: blur(24px) saturate(160%) !important;
        -webkit-backdrop-filter: blur(24px) saturate(160%) !important;
        border-left: 1px solid rgba(79, 130, 246, 0.3) !important;
        border-radius: 0 !important;
        box-shadow: -12px 0 48px rgba(0,0,0,0.6), 0 0 80px rgba(59,130,246,0.06) inset !important;
        z-index: 1001 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        margin: 0 !important;
        list-style: none !important;
    }
    .nav-links.open { transform: translateX(0) !important; }
    .hamburger { display: flex; }
    .hero-name { font-size: clamp(40px, 12vw, 60px); }
    .hero-actions { flex-direction: column; gap: 12px; }
    .services-grid { grid-template-columns: 1fr; }
    .skills-grid { grid-template-columns: 1fr; }
    .portfolio-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .why-hire-layout { grid-template-columns: 1fr; }
    .tabs-nav { flex-direction: row; flex-wrap: wrap; position: static; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
    .testimonial-card { min-width: calc(80vw); }
    .form-row { grid-template-columns: 1fr; }
    .about-info-grid { grid-template-columns: 1fr; }
    .ethics-grid { grid-template-columns: 1fr; }
    .stat-cards { flex-direction: row; }
    .avatar-badge { display: none; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .hero-name { font-size: 40px; }
    .tab-btn { padding: 10px 12px; font-size: 13px; }
    .contact-form-wrap { padding: 24px; }
    .tab-content { padding: 24px; }
}

/* ========================================
   REFINEMENT ADDITIONS
   Loader, Images, Enhanced Animations,
   Theme Toggle, Mobile Nav, Carousel
   ======================================== */

/* ─── PAGE LOADER ─── */
.page-loader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: #060b14;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

[data-theme="light"] .page-loader { background: #f0f4fc; }

.loader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    animation: loader-appear 0.5s ease forwards;
}

@keyframes loader-appear {
    from { opacity: 0; transform: scale(0.9); }
    to   { opacity: 1; transform: scale(1); }
}

.loader-logo {
    font-family: 'Syne', sans-serif;
    font-size: 48px;
    font-weight: 800;
    color: #e2eaf5;
    letter-spacing: -2px;
    animation: loader-pulse 1.5s ease-in-out infinite;
}

@keyframes loader-pulse {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(59,130,246,0.4)); }
    50%       { filter: drop-shadow(0 0 24px rgba(139,92,246,0.8)); }
}

.loader-logo .logo-bracket { color: #3b82f6; }

.loader-bar-wrap {
    width: 280px;
    height: 4px;
    background: rgba(255,255,255,0.08);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

[data-theme="light"] .loader-bar-wrap { background: rgba(0,0,0,0.08); }

.loader-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #3b82f6);
    background-size: 200% 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
    animation: loader-shimmer 1.5s linear infinite;
}

@keyframes loader-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.loader-text {
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    letter-spacing: 3px;
    color: #7a94b0;
    text-transform: uppercase;
    animation: blink-text 1s ease infinite;
}

@keyframes blink-text {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

/* ─── THEME TOGGLE ANIMATED ─── */
.theme-toggle {
    position: relative;
    overflow: hidden;
}

.theme-toggle i {
    transition: transform 0.5s cubic-bezier(0.34,1.56,0.64,1), opacity 0.3s ease;
    display: block;
}

.theme-toggle.spinning i {
    animation: theme-spin 0.5s cubic-bezier(0.34,1.56,0.64,1) forwards;
}

@keyframes theme-spin {
    0%   { transform: rotate(0deg) scale(1); opacity: 1; }
    50%  { transform: rotate(180deg) scale(0); opacity: 0; }
    100% { transform: rotate(360deg) scale(1); opacity: 1; }
}

.theme-toggle::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 10px;
    background: radial-gradient(circle, var(--accent-glow), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.theme-toggle:active::after { opacity: 1; }

/* Smooth theme transition on ALL elements */
body,
.navbar,
.hero,
section,
.service-card,
.skill-category,
.project-card,
.testimonial-card,
.about-img-inner,
.tab-content,
.contact-form-wrap,
.footer,
input, textarea {
    transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease !important;
}

/* ─── AVATAR IMAGE (HERO) ─── */
.avatar-img {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    border-radius: 50%;
    transition: transform 0.5s cubic-bezier(0.34,1.56,0.64,1), filter 0.4s ease;
    filter: brightness(1.02) contrast(1.02);
}

.avatar-frame:hover .avatar-photo {
    transform: scale(1.06);
    filter: brightness(1.08) contrast(1.05) saturate(1.1);
}

/* Subtle glow ring on hover */
.avatar-frame:hover .avatar-img {
    box-shadow: 0 0 30px rgba(59,130,246,0.4), 0 0 60px rgba(139,92,246,0.2);
}

/* ─── ABOUT IMAGE ─── */
.about-img-inner {
    position: relative;
    overflow: hidden;
}

.about-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform 0.6s cubic-bezier(0.34,1.56,0.64,1), filter 0.4s ease;
    filter: brightness(1.0) contrast(1.02);
}

.about-img-frame:hover .about-photo {
    transform: scale(1.04);
    filter: brightness(1.06) contrast(1.04) saturate(1.05);
}

.about-img-inner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(59,130,246,0.08) 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s;
}

.about-img-frame:hover .about-img-inner::after { opacity: 1; }

/* Glow effect on about image hover */
.about-img-frame:hover .about-img-inner {
    box-shadow: 0 20px 60px rgba(59,130,246,0.2), 0 0 30px rgba(139,92,246,0.1);
}

/* ─── SKILL PERCENTAGE COUNTER ─── */
.skill-name span.skill-pct {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--accent);
    min-width: 36px;
    text-align: right;
    transition: none;
}

/* ─── ENHANCED CAROUSEL ─── */
.testimonial-carousel {
    position: relative;
    overflow: hidden;
    touch-action: pan-y;
    cursor: grab;
}

.testimonial-carousel:active { cursor: grabbing; }

.testimonial-track {
    display: flex;
    gap: 24px;
    transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
    will-change: transform;
}

.testimonial-track.paused { transition: none; }

/* Auto-slide pause on hover */
.testimonial-carousel:hover .testimonial-track {
    /* handled via JS */
}

/* Carousel buttons with ripple */
.carousel-btn {
    position: relative;
    overflow: hidden;
}

.carousel-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 10px;
    background: radial-gradient(circle at center, var(--accent-glow), transparent 70%);
    opacity: 0;
    transform: scale(0);
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.carousel-btn:hover::after {
    opacity: 1;
    transform: scale(1);
}

.carousel-btn i {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.carousel-btn:hover i { transform: scale(1.2); }

/* ─── MOBILE NAV ENHANCED ─── */
.hamburger {
    position: relative;
    z-index: 1002;
}

/* Animated hamburger → X */
.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.4s cubic-bezier(0.4,0,0.2,1), opacity 0.3s ease, width 0.3s ease;
    transform-origin: center;
}

.hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── Hide hamburger when drawer is open (drawer has its own close btn) ── */
@media (max-width: 768px) {
    body.nav-open .hamburger {
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }
    .hamburger {
        transition: opacity 0.2s ease;
    }
}

/* Mobile nav — Premium Glassmorphism Drawer */
@media (max-width: 768px) {
    .nav-links {
        /* All drawer styles now in first @media (max-width: 768px) block */
        /* This block intentionally left minimal to avoid conflicts */
    }

    .nav-links.open { transform: translateX(0) !important; }

    /* Nav link pill style */
    .nav-link {
        width: 100% !important;
        padding: 12px 18px !important;
        font-size: 15px !important;
        font-weight: 500 !important;
        border-radius: 10px !important;
        border-bottom: none !important;
        color: rgba(180, 200, 230, 0.75) !important;
        text-align: left !important;
        transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease !important;
        letter-spacing: 0.3px;
    }
    .nav-link:hover {
        background: rgba(59,130,246,0.12) !important;
        color: var(--accent) !important;
        transform: translateX(4px) !important;
    }
    .nav-link.active {
        background: linear-gradient(135deg,
            rgba(59,130,246,0.18),
            rgba(139,92,246,0.12)) !important;
        color: var(--accent) !important;
        border: 1px solid rgba(59,130,246,0.25) !important;
        box-shadow: 0 2px 12px rgba(59,130,246,0.12) !important;
    }

    /* Overlay — dark dim only, NO backdrop-filter (prevents stacking context bug) */
    .nav-overlay {
        position: fixed; inset: 0;
        background: rgba(0,0,0,0.6);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.35s ease, visibility 0.35s ease;
        pointer-events: none;
    }
    .nav-overlay.visible {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
}

/* ─── DRAWER HEADER ─── */
#drawer-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px 20px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.15);
    flex-shrink: 0;
}

.drawer-logo {
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 1px;
}

.drawer-close {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(180, 200, 230, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    flex-shrink: 0;
}

.drawer-close:hover {
    background: rgba(59,130,246,0.15);
    border-color: rgba(59,130,246,0.4);
    color: var(--accent);
}

@media (max-width: 768px) {
    #drawer-header {
        display: flex !important;
    }
}

/* ─── SCROLL LOCK ─── */
body.nav-open {
    overflow: hidden;
}

/* ─── SKILL COUNTER DISPLAY ─── */
.skill-counter {
    display: inline-block;
    min-width: 36px;
    text-align: right;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--accent);
    font-weight: 700;
}

/* ─── ENHANCED HERO ENTER ─── */
.hero-name {
    opacity: 0;
    animation: hero-name-in 0.8s cubic-bezier(0.34,1.56,0.64,1) 0.2s forwards;
}

@keyframes hero-name-in {
    from { opacity: 0; transform: translateY(40px) skewY(3deg); }
    to   { opacity: 1; transform: translateY(0) skewY(0deg); }
}

/* ─── SECTION BACKGROUND PATTERN ─── */
.skills::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(59,130,246,0.04) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
}

.skills { position: relative; overflow: hidden; }

/* ─── GLOW PULSE ON ACTIVE NAV ─── */
.nav-link.active {
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}

/* ─── ENHANCED CARD HOVER GLOW ─── */
.service-card:hover {
    box-shadow: 0 20px 60px rgba(59,130,246,0.15), 0 0 30px rgba(139,92,246,0.1) !important;
}

.project-card:hover {
    box-shadow: 0 20px 60px rgba(59,130,246,0.15), 0 0 40px rgba(139,92,246,0.12) !important;
}

/* ─── LIGHT MODE LOADER ─── */
[data-theme="light"] .loader-logo {
    color: #0f1a2e;
}

[data-theme="light"] .loader-text {
    color: #4a6580;
}

