/* ===== CSS Variables ===== */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #111118;
    --bg-card: #16161d;
    --bg-card-hover: #1c1c26;
    --text-primary: #e4e4e7;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --accent-primary: #6d28d9;
    --accent-secondary: #8b5cf6;
    --accent-tertiary: #a78bfa;
    --gradient-1: linear-gradient(135deg, #6d28d9, #8b5cf6, #c084fc);
    --gradient-2: linear-gradient(135deg, #6d28d9 0%, #8b5cf6 50%, #06b6d4 100%);
    --gradient-text: linear-gradient(90deg, #8b5cf6, #c084fc, #06b6d4);
    --border-color: rgba(139, 92, 246, 0.15);
    --border-hover: rgba(139, 92, 246, 0.4);
    --shadow-glow: 0 0 30px rgba(139, 92, 246, 0.15);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.3);
    --font-primary: 'Poppins', sans-serif;
    --font-code: 'Fira Code', monospace;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
}

::selection {
    background: rgba(139, 92, 246, 0.3);
    color: #fff;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-secondary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-normal);
}

img {
    max-width: 100%;
    display: block;
}

/* ===== Appearance Toggle (Fixed Top Right beside Contact) ===== */
.appearance-toggle {
    position: fixed;
    top: 18px;
    right: 40px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: var(--bg-card);
    color: var(--accent-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1001;
    overflow: hidden;
}

.appearance-toggle:hover {
    border-color: var(--accent-secondary);
    transform: rotate(30deg) scale(1.1);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.appearance-toggle i {
    transition: transform 0.4s ease;
}

/* ===== Black & White Mode ===== */
/* Grayscale applies to wrapper, not body — so toggle stays colorful */
.page-wrapper {
    transition: filter 0.4s ease;
}

body.bw-mode .page-wrapper {
    filter: grayscale(100%);
}

body.bw-mode .gradient-text {
    background: linear-gradient(90deg, #ccc, #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Toggle colors: colorful in normal mode */
.appearance-toggle {
    color: var(--accent-secondary);
    border-color: var(--border-color);
    background: var(--bg-card);
}

/* Toggle colors: white in B&W mode — stays visible because we exclude it from grayscale */
body.bw-mode .appearance-toggle {
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
    background: rgba(40, 40, 50, 0.95);
    filter: grayscale(0%);
}

body.bw-mode .appearance-toggle:hover {
    border-color: #fff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    filter: grayscale(0%);
}

/* ===== Cursor Glow ===== */
.cursor-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s;
    opacity: 0;
}

body:hover .cursor-glow {
    opacity: 1;
}

/* Cursor Dot */
.cursor-dot {
    position: fixed;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background 0.3s;
    opacity: 0;
}

body:hover .cursor-dot {
    opacity: 1;
}

/* Scale up when hovering links / buttons */
.cursor-dot.hovering {
    width: 40px;
    height: 40px;
    background: rgba(139, 92, 246, 0.25);
    border: 2px solid rgba(139, 92, 246, 0.6);
    mix-blend-mode: normal;
}

/* ===== Particles Canvas ===== */
#particlesCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* ===== Container ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* ===== Chatbot Widget ===== */
.chatbot-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9000;
}

.chatbot-bubble {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #1a1a2e;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-primary);
    transition: var(--transition-normal);
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.chatbot-bubble:hover {
    transform: scale(1.1);
    border-color: var(--accent-secondary);
}

.chatbot-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ef4444;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-tooltip {
    position: absolute;
    bottom: 75px;
    right: 0;
    background: #fff;
    color: #333;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 0.85rem;
    line-height: 1.5;
    width: 240px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    animation: tooltipFade 0.4s ease;
    transition: opacity 0.3s;
}

.chatbot-tooltip::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 24px;
    width: 16px;
    height: 16px;
    background: #fff;
    transform: rotate(45deg);
    border-radius: 2px;
}

.chatbot-tooltip.hidden {
    opacity: 0;
    pointer-events: none;
}

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

/* Chatbot Window */
.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 360px;
    height: 480px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    animation: chatOpen 0.3s ease;
}

.chatbot-window.active {
    display: flex;
}

@keyframes chatOpen {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.chatbot-header {
    padding: 16px 20px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
}

.chatbot-header h4 {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 600;
}

.chatbot-status {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    display: inline-block;
}

.chatbot-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px;
    transition: var(--transition-fast);
}

.chatbot-close:hover {
    color: var(--text-primary);
}

.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.chat-message {
    display: flex;
    max-width: 85%;
}

.chat-message.bot {
    align-self: flex-start;
}

.chat-message.user {
    align-self: flex-end;
}

.message-bubble {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.85rem;
    line-height: 1.6;
}

.chat-message.bot .message-bubble {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-bottom-left-radius: 4px;
}

.chat-message.user .message-bubble {
    background: var(--gradient-1);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.chatbot-input {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
}

.chatbot-input input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.85rem;
    outline: none;
    transition: var(--transition-normal);
}

.chatbot-input input:focus {
    border-color: var(--accent-secondary);
}

.chatbot-input input::placeholder {
    color: var(--text-muted);
}

.chatbot-input button {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: none;
    background: var(--gradient-1);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-input button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(109, 40, 217, 0.4);
}

@media (max-width: 768px) {
    .chatbot-window {
        width: 300px;
        height: 420px;
        right: -10px;
    }
    .chatbot-widget {
        bottom: 20px;
        right: 20px;
    }
}

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 16px 0;
    transition: var(--transition-normal);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

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

.nav-menu {
    display: flex;
    gap: 8px;
}

.nav-link {
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    transition: var(--transition-normal);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background: rgba(139, 92, 246, 0.1);
}

.nav-link.active {
    color: var(--accent-tertiary);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
    padding: 4px;
}

.bar {
    width: 25px;
    height: 2.5px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-normal);
}

.hamburger.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 1;
    padding: 120px 0 60px;
}

.hero-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-greeting {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.greeting-line {
    width: 40px;
    height: 2px;
    background: var(--gradient-1);
    border-radius: 2px;
}

.hero-greeting h3 {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 4px;
    color: var(--accent-tertiary);
    text-transform: uppercase;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 36px;
    max-width: 540px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: var(--transition-normal);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-1);
    color: #fff;
    box-shadow: 0 4px 20px rgba(109, 40, 217, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(109, 40, 217, 0.5);
}

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

.btn-outline:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: var(--accent-secondary);
    transform: translateY(-2px);
}

/* Hero Stats */
.hero-stats {
    display: flex;
    gap: 40px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Hero Image */
.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.image-wrapper {
    position: relative;
    width: 340px;
    height: 340px;
    border-radius: 30px;
    overflow: hidden;
}

.image-border {
    position: absolute;
    inset: -3px;
    border-radius: 32px;
    background: var(--gradient-1);
    z-index: -1;
    animation: rotateBorder 6s linear infinite;
}

@keyframes rotateBorder {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 30px;
    border: 3px solid var(--bg-primary);
}

.profile-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border-radius: 30px;
    border: 3px solid var(--bg-primary);
    gap: 12px;
}

.profile-placeholder i {
    font-size: 4rem;
    color: var(--accent-secondary);
    opacity: 0.5;
}

.profile-placeholder span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Floating Cards */
.floating-card {
    position: absolute;
    padding: 10px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(10px);
    animation: float 6s ease-in-out infinite;
}

.floating-card i {
    font-size: 1.2rem;
}

.card-1 {
    top: 10%;
    right: -10px;
    animation-delay: 0s;
}

.card-1 i { color: #61dafb; }

.card-2 {
    bottom: 20%;
    left: -20px;
    animation-delay: 2s;
}

.card-2 i { color: #68a063; }

.card-3 {
    bottom: 5%;
    right: 10px;
    animation-delay: 4s;
}

.card-3 i { color: #f7d54d; }

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

/* Scroll Indicator */
.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: fadeInUp 1s ease 2s both;
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid var(--text-muted);
    border-radius: 13px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.wheel {
    width: 4px;
    height: 10px;
    background: var(--accent-secondary);
    border-radius: 2px;
    animation: scrollWheel 2s ease-in-out infinite;
}

@keyframes scrollWheel {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(12px); opacity: 0; }
}

.scroll-indicator span {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ===== Sections ===== */
.section {
    padding: 120px 0;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
}

.section.fullpage-section {
    min-height: 100vh;
    padding: 120px 0 80px;
}

.section.fullpage-section > .container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

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

.section-grid.reverse {
    direction: rtl;
}

.section-grid.reverse > * {
    direction: ltr;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2;
}

.section-title.center {
    text-align: center;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.7;
}

.section-subtitle.center {
    text-align: center;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 40px;
}

.section-text {
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.8;
}

/* Code Window */
.code-window {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-glow);
}

.window-dots {
    display: flex;
    gap: 8px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }

.code-block {
    padding: 20px 24px;
    font-family: var(--font-code);
    font-size: 0.85rem;
    line-height: 1.8;
    overflow-x: auto;
}

.code-keyword { color: #c084fc; }
.code-variable { color: #67e8f9; }
.code-property { color: #86efac; }
.code-string { color: #fbbf24; }

/* Projects Preview Grid */
.projects-grid-preview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.preview-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    transition: var(--transition-normal);
}

.preview-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.preview-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(139, 92, 246, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.4rem;
    color: var(--accent-secondary);
    transition: var(--transition-normal);
}

.preview-card:hover .preview-card-icon {
    background: var(--gradient-1);
    color: #fff;
}

.preview-card h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ===== Contact Section ===== */
.contact-content {
    max-width: 750px;
    margin: 0 auto;
}

.contact-header {
    margin-bottom: 40px;
}

.contact-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.talk-badge {
    display: inline-block;
    background: var(--gradient-1);
    color: #fff;
    padding: 2px 18px;
    border-radius: 8px;
    font-size: 2.6rem;
}

.contact-description {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Contact Form */
.contact-form {
    margin-bottom: 40px;
}

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

.form-group {
    position: relative;
}

.form-group.full-width {
    margin-bottom: 24px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition-normal);
}

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

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--accent-secondary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.contact-form textarea {
    resize: vertical;
    min-height: 130px;
}

.btn-submit {
    background: var(--gradient-1);
    color: #fff;
    padding: 14px 40px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--font-primary);
    border: none;
    cursor: pointer;
    transition: var(--transition-normal);
    box-shadow: 0 4px 15px rgba(109, 40, 217, 0.3);
}

.btn-submit:hover {
    background: var(--gradient-1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(109, 40, 217, 0.5);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
}

.social-link {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-secondary);
    transition: var(--transition-normal);
}

.social-link:hover {
    color: #fff;
    background: var(--gradient-1);
    border-color: transparent;
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(109, 40, 217, 0.4);
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    .contact-title {
        font-size: 2rem;
    }
    .talk-badge {
        font-size: 1.8rem;
    }
}

/* ===== Footer ===== */
.footer {
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    position: relative;
    z-index: 1;
}

.footer p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ===== Animations ===== */
.animate-slide-up {
    opacity: 0;
    transform: translateY(40px);
    animation: slideUp 0.8s ease forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
.delay-4 { animation-delay: 0.8s; }

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    opacity: 0;
    animation: fadeIn 1s ease forwards;
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* Reveal Animations (scroll-triggered) */
.reveal-left,
.reveal-right,
.reveal-up {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left {
    transform: translateX(-60px);
}

.reveal-right {
    transform: translateX(60px);
}

.reveal-up {
    transform: translateY(60px);
}

.reveal-left.revealed,
.reveal-right.revealed,
.reveal-up.revealed {
    opacity: 1;
    transform: translate(0);
}

/* ===== About Page ===== */
.page-hero {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 140px 0 60px;
    position: relative;
    z-index: 1;
}

.page-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.page-hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* ===== About Page Hero ===== */
.about-hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 1;
    padding: 120px 0 60px;
}

.about-hero-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-hero-content .hero-greeting {
    margin-bottom: 16px;
}

.about-hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.about-hero-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 36px;
    max-width: 540px;
}

.about-hero-buttons {
    display: flex;
    gap: 16px;
}

.about-hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.about-hero-image .image-wrapper {
    width: 380px;
    height: 420px;
    border-radius: 30px;
}

.about-hero-image .image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 30px;
    border: 3px solid var(--bg-primary);
}

/* About Content */
.about-section {
    padding: 80px 0;
    position: relative;
    z-index: 1;
}

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

.about-image-section {
    position: sticky;
    top: 100px;
}

.about-main-image {
    width: 100%;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    position: relative;
}

.about-main-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 24px;
    object-fit: contain;
}

.about-main-image .profile-placeholder {
    border-radius: 24px;
}

/* Photo Collage */
.photo-collage {
    position: relative;
    width: 100%;
    height: 520px;
}

.collage-photo {
    position: absolute;
    border-radius: 16px;
    overflow: hidden;
    border: 3px solid var(--border-color);
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.collage-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease, filter 0.5s ease;
}

.collage-photo-1 {
    width: 65%;
    height: 70%;
    top: 10%;
    left: 0;
    z-index: 2;
}

.collage-photo-2 {
    width: 45%;
    height: 45%;
    top: 0;
    right: 0;
    z-index: 1;
}

.collage-photo-3 {
    width: 55%;
    height: 55%;
    bottom: 0;
    right: 5%;
    z-index: 1;
}

/* Hover: bring to front, scale up, overlap others */
.collage-photo:hover {
    z-index: 10;
    transform: scale(1.08);
    border-color: var(--accent-secondary);
    box-shadow: 0 20px 60px rgba(139, 92, 246, 0.3);
}

.collage-photo:hover img {
    transform: scale(1.05);
}

/* When one photo is hovered, dim the others */
.photo-collage:hover .collage-photo:not(:hover) {
    opacity: 0.6;
    filter: brightness(0.7);
    transform: scale(0.97);
}

.about-details h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.about-details p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 24px;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 32px;
}

.info-item {
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: var(--transition-normal);
}

.info-item:hover {
    border-color: var(--border-hover);
}

.info-item .label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.info-item .value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Skills Section */
.skills-section {
    padding: 80px 0;
    position: relative;
    z-index: 1;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 48px;
}

.skill-category {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 32px;
    transition: var(--transition-normal);
}

.skill-category:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
    transform: translateY(-4px);
}

.skill-category-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    padding: 8px 16px;
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition-normal);
}

.skill-tag:hover {
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent-tertiary);
    border-color: var(--accent-secondary);
}

/* ===== Projects Page ===== */
.projects-section {
    padding: 80px 0;
    position: relative;
    z-index: 1;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 48px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition-normal);
    position: relative;
}

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

.project-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card));
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.project-image i {
    font-size: 3rem;
    color: var(--accent-secondary);
    opacity: 0.4;
}

.project-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-1);
    opacity: 0;
    transition: var(--transition-normal);
}

.project-card:hover .project-image::after {
    opacity: 0.1;
}

.project-info {
    padding: 28px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.project-tag {
    padding: 4px 12px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent-tertiary);
}

.project-info h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.project-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

.project-links {
    display: flex;
    gap: 12px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: var(--transition-normal);
}

.project-link:hover {
    border-color: var(--accent-secondary);
    color: var(--accent-tertiary);
    background: rgba(139, 92, 246, 0.1);
}

/* ===== Experience Timeline ===== */
.experience-section {
    padding: 80px 0;
    position: relative;
    z-index: 1;
}

.timeline {
    position: relative;
    max-width: 700px;
    margin: 48px auto 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 2px;
    height: 100%;
    background: var(--border-color);
}

.timeline-item {
    padding-left: 40px;
    padding-bottom: 48px;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gradient-1);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
}

.timeline-date {
    font-size: 0.8rem;
    color: var(--accent-tertiary);
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.timeline-item h4 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.timeline-item h5 {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.timeline-item p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===== Education Section ===== */
.education-section {
    padding: 80px 0;
    position: relative;
    z-index: 1;
}

.education-grid {
    max-width: 800px;
    margin: 48px auto 0;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.education-card {
    display: flex;
    gap: 24px;
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.education-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-1);
    border-radius: 4px 0 0 4px;
}

.education-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(139, 92, 246, 0.15);
}

.education-icon {
    width: 56px;
    height: 56px;
    min-width: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    font-size: 1.4rem;
    color: var(--accent-secondary);
}

.education-info {
    flex: 1;
}

.education-date {
    font-size: 0.8rem;
    color: var(--accent-tertiary);
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.education-info h4 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.education-info h5 {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.education-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

.education-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.edu-tag {
    padding: 4px 14px;
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--accent-tertiary);
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* ===== Responsive ===== */

/* Tablet */
@media (max-width: 1024px) {
    .container {
        padding: 0 24px;
    }

    .hero-container {
        padding: 0 24px;
        gap: 40px;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .section-grid {
        gap: 50px;
    }

    .section.fullpage-section {
        padding: 100px 0 60px;
    }

    .contact-title {
        font-size: 2.4rem;
    }

    .talk-badge {
        font-size: 2.2rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        flex-direction: column;
        background: var(--bg-secondary);
        border-left: 1px solid var(--border-color);
        padding: 100px 32px 32px;
        transition: var(--transition-slow);
        gap: 4px;
    }

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

    .nav-link {
        padding: 14px 20px;
        font-size: 1rem;
    }

    /* Theme toggle on mobile - smaller and repositioned */
    .appearance-toggle {
        top: 18px;
        right: 70px;
        width: 38px;
        height: 38px;
        font-size: 0.95rem;
    }

    /* Fullpage sections on mobile */
    .fullpage-section {
        min-height: 100vh;
        min-height: 100dvh; /* dynamic viewport height for mobile browsers */
    }

    .section.fullpage-section {
        padding: 90px 0 40px;
        min-height: 100vh;
        min-height: 100dvh;
    }

    .hero.fullpage-section {
        padding: 80px 0 30px;
    }

    /* Fix container padding on mobile */
    .container {
        padding: 0 20px;
    }

    .section.fullpage-section > .container {
        padding: 0 20px;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
        padding: 0 20px;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-greeting h3 {
        font-size: 0.7rem;
        letter-spacing: 2px;
    }

    .hero-description {
        max-width: 100%;
        font-size: 0.95rem;
        margin-bottom: 24px;
    }

    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
        gap: 12px;
        margin-bottom: 32px;
    }

    .hero-stats {
        justify-content: center;
        gap: 28px;
    }

    .hero-image {
        order: -1;
    }

    .image-wrapper {
        width: 220px;
        height: 220px;
    }

    .floating-card {
        display: none;
    }

    .section-grid,
    .section-grid.reverse {
        grid-template-columns: 1fr;
        gap: 30px;
        direction: ltr;
    }

    .section-title {
        font-size: 1.8rem;
        text-align: center;
    }

    .section-subtitle {
        text-align: center;
        font-size: 0.95rem;
    }

    .section-text {
        text-align: center;
        font-size: 0.9rem;
    }

    .section-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .page-hero h1 {
        font-size: 2.2rem;
    }

    /* About section mobile */
    .about-hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .about-hero-content .hero-greeting {
        justify-content: center;
    }

    .about-hero-desc {
        margin-left: auto;
        margin-right: auto;
    }

    .about-hero-buttons {
        justify-content: center;
    }

    .about-hero-title {
        font-size: 2.2rem;
    }

    .about-hero-image .image-wrapper {
        width: 280px;
        height: 320px;
    }

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

    .about-image-section {
        position: relative;
        top: 0;
    }

    .photo-collage {
        height: 380px;
    }

    .collage-photo-1 {
        width: 60%;
        height: 65%;
    }

    .collage-photo-2 {
        width: 42%;
        height: 40%;
    }

    .collage-photo-3 {
        width: 50%;
        height: 50%;
    }

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

    /* Code window mobile */
    .code-block {
        font-size: 0.72rem;
        padding: 14px 16px;
    }

    .code-window {
        max-width: 100%;
        overflow-x: auto;
    }

    /* Projects mobile */
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid-preview {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .preview-card {
        padding: 20px 16px;
    }

    .preview-card-icon {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
        margin-bottom: 10px;
    }

    .preview-card h4 {
        font-size: 0.82rem;
    }

    /* Contact section mobile */
    .contact-content {
        padding: 0;
    }

    .contact-title {
        font-size: 2rem;
        text-align: center;
    }

    .talk-badge {
        font-size: 1.8rem;
    }

    .contact-description {
        text-align: center;
        font-size: 0.9rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .contact-form input,
    .contact-form textarea {
        padding: 14px 16px;
        font-size: 0.9rem;
    }

    .btn-submit {
        width: 100%;
        padding: 14px 32px;
    }

    .social-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Education mobile */
    .education-card {
        flex-direction: column;
        gap: 16px;
        padding: 24px;
    }

    .education-icon {
        width: 48px;
        height: 48px;
        min-width: 48px;
    }

    .scroll-indicator {
        display: none;
    }

    /* Fullpage section animations - simpler on mobile */
    .fullpage-section .container,
    .fullpage-section .hero-container {
        transform: translateY(30px);
    }

    .fullpage-section::before {
        background-attachment: scroll; /* no fixed bg on mobile */
    }

    /* Footer mobile */
    .footer {
        padding: 24px 0;
    }

    .footer p {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .hero-greeting h3 {
        font-size: 0.6rem;
        letter-spacing: 1.5px;
    }

    .hero-description {
        font-size: 0.85rem;
        line-height: 1.7;
    }

    .btn {
        padding: 12px 24px;
        font-size: 0.85rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

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

    .hero-stats {
        gap: 20px;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    .image-wrapper {
        width: 180px;
        height: 180px;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .section.fullpage-section {
        padding: 80px 0 30px;
    }

    /* Projects grid single column on small screens */
    .projects-grid-preview {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    /* Contact small screens */
    .contact-title {
        font-size: 1.6rem;
    }

    .talk-badge {
        font-size: 1.4rem;
        padding: 2px 14px;
    }

    .contact-email {
        font-size: 0.95rem;
        padding: 12px 20px;
    }

    .social-link {
        width: 44px;
        height: 44px;
        border-radius: 12px;
        font-size: 1rem;
    }

    /* Nav dots smaller on tiny screens */
    .section-nav-dots {
        right: 8px;
        gap: 10px;
    }

    .section-nav-dots .dot-link {
        width: 8px;
        height: 8px;
    }
}

/* ===== Typing Indicator Dots ===== */
.typing-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: 0s; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* ===== Full Page Sections ===== */
.fullpage-section {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

/* Background image layer for each section */
.fullpage-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -2;
    transition: transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Dark overlay for readability */
.fullpage-section::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
}

/* Home Section Background */
.fullpage-section[data-bg="home"]::before {
    background-image: url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?w=1920&q=80');
}
.fullpage-section[data-bg="home"]::after {
    background: linear-gradient(135deg, rgba(10, 10, 15, 0.92) 0%, rgba(17, 17, 24, 0.85) 50%, rgba(109, 40, 217, 0.15) 100%);
}

/* About Section Background */
.fullpage-section[data-bg="about"]::before {
    background-image: url('https://images.unsplash.com/photo-1555066931-4365d14bab8c?w=1920&q=80');
}
.fullpage-section[data-bg="about"]::after {
    background: linear-gradient(135deg, rgba(10, 10, 15, 0.93) 0%, rgba(17, 17, 24, 0.88) 50%, rgba(6, 182, 212, 0.1) 100%);
}

/* Projects Section Background */
.fullpage-section[data-bg="projects"]::before {
    background-image: url('https://images.unsplash.com/photo-1550439062-609e1531270e?w=1920&q=80');
}
.fullpage-section[data-bg="projects"]::after {
    background: linear-gradient(135deg, rgba(10, 10, 15, 0.93) 0%, rgba(17, 17, 24, 0.88) 50%, rgba(139, 92, 246, 0.12) 100%);
}

/* Contact Section Background */
.fullpage-section[data-bg="contact"]::before {
    background-image: url('https://images.unsplash.com/photo-1519389950473-47ba0277781c?w=1920&q=80');
}
.fullpage-section[data-bg="contact"]::after {
    background: linear-gradient(135deg, rgba(10, 10, 15, 0.94) 0%, rgba(17, 17, 24, 0.90) 50%, rgba(109, 40, 217, 0.1) 100%);
}

/* Parallax-like subtle movement on scroll */
.fullpage-section.in-view::before {
    transform: scale(1.05);
}

/* ===== Section Scroll Animations ===== */
/* Elements inside sections animate in when section is visible */
.fullpage-section .container,
.fullpage-section .hero-container {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.fullpage-section.in-view .container,
.fullpage-section.in-view .hero-container {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation for child elements */
.fullpage-section.in-view .section-content {
    animation: sectionContentIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.fullpage-section.in-view .section-image {
    animation: sectionContentIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

.fullpage-section.in-view .contact-content {
    animation: sectionContentIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

@keyframes sectionContentIn {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Section transition divider */
.fullpage-section + .fullpage-section::before {
    /* subtle top fade for continuity */
}

/* Nav dot indicators on the right side */
.section-nav-dots {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.section-nav-dots .dot-link {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--text-muted);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.section-nav-dots .dot-link:hover {
    border-color: var(--accent-secondary);
    transform: scale(1.3);
}

.section-nav-dots .dot-link.active {
    background: var(--accent-secondary);
    border-color: var(--accent-secondary);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.5);
}

.section-nav-dots .dot-link .dot-tooltip {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, right 0.3s ease;
}

.section-nav-dots .dot-link:hover .dot-tooltip {
    opacity: 1;
    right: 28px;
}

@media (max-width: 768px) {
    .section-nav-dots {
        right: 14px;
        gap: 12px;
    }
    .section-nav-dots .dot-link {
        width: 10px;
        height: 10px;
    }
    .section-nav-dots .dot-link .dot-tooltip {
        display: none;
    }
    
    /* Chatbot on mobile */
    .chatbot-widget {
        bottom: 16px;
        right: 16px;
    }
    .chatbot-bubble {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    .chatbot-window {
        width: calc(100vw - 40px);
        max-width: 340px;
        height: 400px;
        right: -8px;
    }
}

/* ===== Preloader ===== */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

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

.preloader-logo {
    font-size: 4rem;
    font-weight: 700;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    min-height: 4.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preloader-cursor {
    display: inline-block;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: preloaderBlink 0.6s step-end infinite;
    margin-left: 2px;
    font-weight: 300;
}

@keyframes preloaderBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.preloader-bar {
    width: 200px;
    height: 3px;
    background: var(--bg-card);
    border-radius: 4px;
    margin-top: 24px;
    overflow: hidden;
}

.preloader-bar-fill {
    width: 0%;
    height: 100%;
    background: var(--gradient-1);
    border-radius: 4px;
    animation: preloaderFill 1.8s ease-in-out forwards;
}

.preloader-text {
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
}

@keyframes preloaderFill {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* ===== Scroll Progress Bar ===== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--gradient-2);
    z-index: 10000;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

/* ===== Light Mode ===== */
body.light-mode {
    --bg-primary: #f5f5f7;
    --bg-secondary: #e8e8ed;
    --bg-card: #ffffff;
    --bg-card-hover: #f0f0f5;
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a6a;
    --text-muted: #7a7a9a;
    --border-color: rgba(109, 40, 217, 0.2);
    --border-hover: rgba(109, 40, 217, 0.5);
    --shadow-glow: 0 0 30px rgba(109, 40, 217, 0.1);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.08);
}

body.light-mode .page-wrapper {
    filter: none;
}

body.light-mode .appearance-toggle {
    background: #fff;
    color: #f59e0b;
    border-color: rgba(109, 40, 217, 0.2);
}

body.light-mode .navbar {
    background: rgba(245, 245, 247, 0.9);
    backdrop-filter: blur(20px);
}

body.light-mode .navbar.scrolled {
    background: rgba(245, 245, 247, 0.95);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

body.light-mode .fullpage-section::before {
    background: rgba(245, 245, 247, 0.88);
}

body.light-mode .code-window {
    background: #f8f8fc;
    border-color: rgba(109, 40, 217, 0.15);
}

body.light-mode .code-line {
    color: #4a4a6a;
}

body.light-mode .preview-card {
    background: #fff;
    border-color: rgba(109, 40, 217, 0.1);
}

body.light-mode .chatbot-window {
    background: #fff;
}

body.light-mode .chatbot-header {
    background: var(--gradient-1);
}

body.light-mode .chat-input {
    background: #f5f5f7;
    border-color: rgba(109, 40, 217, 0.2);
    color: #1a1a2e;
}

body.light-mode .form-input {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(109, 40, 217, 0.15);
    color: #1a1a2e;
}

body.light-mode ::selection {
    background: rgba(139, 92, 246, 0.2);
    color: #1a1a2e;
}

body.light-mode ::-webkit-scrollbar-track {
    background: #f5f5f7;
}

body.light-mode .section-nav-dots .dot-link::before {
    background: rgba(109, 40, 217, 0.3);
}

body.light-mode .section-nav-dots .dot-link.active::before {
    background: var(--accent-primary);
}

body.light-mode .testimonial-card {
    background: #fff;
}

body.light-mode .blog-card {
    background: #fff;
}

body.light-mode footer {
    background: #e8e8ed;
}

/* ===== Typewriter Cursor ===== */
.typewriter::after {
    content: '|';
    display: inline-block;
    animation: blink 0.7s step-end infinite;
    color: var(--accent-secondary);
    font-weight: 300;
    margin-left: 2px;
}

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

/* ===== Cursor Trail Canvas ===== */
#cursorTrail {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
}

/* ===== 3D Tilt Cards ===== */
.tilt-card {
    transition: transform 0.15s ease-out;
    transform-style: preserve-3d;
}

.tilt-card:hover {
    box-shadow: 0 20px 60px rgba(139, 92, 246, 0.2);
}

/* ===== Gradient Border Animation ===== */
.gradient-border {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.gradient-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: conic-gradient(
        from var(--gradient-angle, 0deg),
        #6d28d9,
        #8b5cf6,
        #06b6d4,
        #c084fc,
        #6d28d9
    );
    z-index: -1;
    border-radius: inherit;
    animation: gradientRotate 4s linear infinite;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gradient-border:hover::before {
    opacity: 1;
}

.gradient-border::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: var(--bg-card);
    z-index: -1;
    border-radius: inherit;
}

/* Disable gradient-border pseudo-elements inside fullpage sections to avoid stacking issues */
.fullpage-section .gradient-border::before,
.fullpage-section .gradient-border::after {
    z-index: 0;
}

.fullpage-section .gradient-border > * {
    position: relative;
    z-index: 1;
}

@keyframes gradientRotate {
    0% { --gradient-angle: 0deg; }
    100% { --gradient-angle: 360deg; }
}

@property --gradient-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

/* ===== Testimonials Section ===== */
.testimonials .container {
    max-width: 900px;
}

.testimonials-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

/* Ensure testimonials & blog sections content is always visible */
.testimonials.fullpage-section .container,
.blog.fullpage-section .container {
    opacity: 1 !important;
    transform: none !important;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-top: -16px;
    margin-bottom: 40px;
}

.section-subtitle.center {
    text-align: center;
}

/* Section Badge */
.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 18px;
    border-radius: 30px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.25);
    color: var(--accent-secondary);
    font-size: 0.78rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
}

.section-badge i {
    font-size: 0.7rem;
}

.testimonials-slider {
    position: relative;
    min-height: 280px;
}

.testimonial-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 40px 36px 30px;
    text-align: center;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 0;
    transform: translateX(60px) scale(0.95);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    border: 1px solid var(--border-color);
    z-index: 1;
}

.testimonial-card.active {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
    z-index: 2;
}

.testimonial-card.exit-left {
    opacity: 0;
    transform: translateX(-60px) scale(0.95);
}

.testimonial-quote {
    font-size: 2rem;
    color: var(--accent-tertiary);
    margin-bottom: 16px;
    opacity: 0.5;
}

.testimonial-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 24px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.testimonial-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.testimonial-author-info {
    text-align: left;
}

.testimonial-author h4 {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 2px;
    font-weight: 600;
}

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

.testimonial-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 18px;
}

.testimonial-stars {
    color: #f59e0b;
    font-size: 0.85rem;
    display: flex;
    gap: 3px;
}

.testimonial-tag {
    padding: 3px 12px;
    border-radius: 20px;
    background: rgba(139, 92, 246, 0.12);
    color: var(--accent-tertiary);
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.testimonial-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.testimonial-btn:hover {
    border-color: var(--accent-secondary);
    background: var(--accent-primary);
    color: #fff;
    transform: scale(1.1);
}

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

.t-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
}

.t-dot.active {
    background: var(--accent-primary);
    transform: scale(1.3);
}

/* ===== Blog/Articles Section ===== */
.blog .container {
    max-width: 1100px;
}

.blog-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    text-align: left;
}

.blog-card {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1;
}

.blog-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-hover);
}

.blog-card-image {
    height: 160px;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.blog-card-image i {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.3);
}

.blog-card-category {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    font-size: 0.7rem;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    backdrop-filter: blur(10px);
}

.blog-card-content {
    padding: 24px;
}

.blog-card-meta {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.blog-card-meta i {
    margin-right: 4px;
    font-size: 0.75rem;
}

.blog-card-content h3 {
    font-size: 1.05rem;
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.5;
}

.blog-card-content p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 14px;
}

/* Blog Tags */
.blog-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.blog-tag {
    padding: 3px 10px;
    border-radius: 14px;
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent-tertiary);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    border: 1px solid rgba(139, 92, 246, 0.15);
    transition: all 0.3s ease;
}

.blog-tag:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.4);
}

/* Blog Card Overlay */
.blog-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.5));
    display: flex;
    justify-content: flex-end;
}

.blog-card-reading {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    gap: 5px;
    backdrop-filter: blur(4px);
    background: rgba(0, 0, 0, 0.25);
    padding: 3px 10px;
    border-radius: 12px;
}

.blog-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--accent-secondary);
    font-weight: 500;
    transition: all 0.3s ease;
}

.blog-read-more:hover {
    color: var(--accent-tertiary);
    gap: 10px;
}

.blog-read-more i {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.blog-read-more:hover i {
    transform: translateX(4px);
}

/* ===== Button Ripple Effect ===== */
.ripple-btn {
    position: relative;
    overflow: hidden;
}

.ripple-btn .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: rippleEffect 0.6s linear;
    pointer-events: none;
}

@keyframes rippleEffect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ===== Magnetic Buttons ===== */
.magnetic-btn {
    transition: transform 0.2s ease;
}

/* ===== Fullpage Section BG for New Sections ===== */
.fullpage-section[data-bg="testimonials"]::before {
    background-image: url('https://images.unsplash.com/photo-1522071820081-009f0129c71c?w=1920&q=80');
}
.fullpage-section[data-bg="testimonials"]::after {
    background: linear-gradient(135deg, rgba(10, 10, 15, 0.94) 0%, rgba(17, 17, 24, 0.90) 50%, rgba(109, 40, 217, 0.12) 100%);
}

.fullpage-section[data-bg="blog"]::before {
    background-image: url('https://images.unsplash.com/photo-1499750310107-5fef28a66643?w=1920&q=80');
}
.fullpage-section[data-bg="blog"]::after {
    background: linear-gradient(135deg, rgba(10, 10, 15, 0.93) 0%, rgba(17, 17, 24, 0.88) 50%, rgba(6, 182, 212, 0.1) 100%);
}

/* ===== Responsive for New Sections ===== */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .testimonial-card {
        padding: 28px 20px 24px;
    }

    .testimonial-text {
        font-size: 0.95rem;
    }

    .section-subtitle {
        font-size: 0.9rem;
    }

    .preloader-logo {
        font-size: 3rem;
    }

    #cursorTrail {
        display: none;
    }

    .cursor-glow,
    .cursor-dot {
        display: none;
    }
}

@media (max-width: 480px) {
    .blog-grid {
        gap: 16px;
    }

    .blog-card-content {
        padding: 16px;
    }

    .testimonial-card {
        padding: 24px 16px 20px;
    }
}
