import React, { useRef } from 'react'; import { View, Text, StyleSheet, Image, TouchableOpacity, Dimensions, ScrollView, Animated, Platform } from 'react-native'; import { useLocalSearchParams, useRouter } from 'expo-router'; import { useAppTheme } from '../../context/ThemeContext'; import { Feather } from '@expo/vector-icons'; import { BlurView } from 'expo-blur'; import * as Haptics from 'expo-haptics'; import { LinearGradient } from 'expo-linear-gradient'; const { width } = Dimensions.get('window'); const LIME = '#C6F135'; const IMG_H = 340; export default function DetailScreen() { const { id, title, category, img, author } = useLocalSearchParams(); const { colors, isDark } = useAppTheme(); const router = useRouter(); const scrollY = useRef(new Animated.Value(0)).current; const bg = isDark ? '#111111' : '#F5F5F5'; const cardBg = isDark ? '#1A1A1A' : '#FFFFFF'; const border = isDark ? '#2A2A2A' : '#EEEEEE'; const subText = isDark ? '#6B6B6B' : '#9B9B9B'; const imageTranslateY = scrollY.interpolate({ inputRange: [0, IMG_H], outputRange: [0, -IMG_H / 3], extrapolate: 'clamp' }); return ( {/* ── Hero image with parallax ── */} {/* ── Content card ── */} {category} {title} {author} Published 2 hours ago This is a deep dive into the topic of{' '} {title}. Implementing modern technologies requires a balance between performance and aesthetics. In biiproject, we prioritize the user experience by using the latest React Native features. Our modernization engine ensures that every pixel is optimized, every transition is smooth, and every interaction feels alive with haptic feedback and fluid motion. This content is curated by our AI engine and updated daily. {/* ── Floating back button ── */} { Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Medium); router.back(); }} > ); } const styles = StyleSheet.create({ container: { flex: 1 }, imageContainer: { width, height: IMG_H, overflow: 'hidden' }, heroImg: { width: '100%', height: IMG_H + 60, resizeMode: 'cover' }, gradient: { position: 'absolute', bottom: 0, left: 0, right: 0, height: 160 }, contentCard: { marginHorizontal: 16, marginTop: -32, borderRadius: 28, borderWidth: 1, padding: 24, shadowColor: '#000', shadowOffset: { width: 0, height: 8 }, shadowOpacity: 0.08, shadowRadius: 20, elevation: 6 }, badgeRow: { marginBottom: 12 }, catBadge: { alignSelf: 'flex-start', paddingHorizontal: 10, paddingVertical: 4, borderRadius: 8 }, catBadgeText: { fontSize: 10, fontFamily: 'Outfit_800ExtraBold', textTransform: 'uppercase', letterSpacing: 0.5, color: '#5A7000' }, title: { fontSize: 26, fontFamily: 'Outfit_800ExtraBold', lineHeight: 34, marginBottom: 20 }, authorRow: { flexDirection: 'row', alignItems: 'center', paddingBottom: 20, marginBottom: 20, borderBottomWidth: 1 }, authorImg: { width: 42, height: 42, borderRadius: 21, marginRight: 12 }, authorName: { fontSize: 15, fontFamily: 'Outfit_700Bold' }, date: { fontSize: 12, fontFamily: 'Outfit_400Regular', marginTop: 2 }, paragraph: { fontSize: 15, fontFamily: 'Outfit_400Regular', lineHeight: 26, marginBottom: 18 }, highlightBox: { flexDirection: 'row', alignItems: 'flex-start', borderRadius: 14, padding: 14, marginTop: 6 }, highlightText: { flex: 1, fontSize: 13, fontFamily: 'Outfit_400Regular', lineHeight: 20 }, backBtn: { position: 'absolute', top: Platform.OS === 'ios' ? 52 : 32, left: 20, zIndex: 100 }, blurBtn: { width: 44, height: 44, borderRadius: 22, alignItems: 'center', justifyContent: 'center', overflow: 'hidden' }, });