portfolio / src /app /globals.css
jashdoshi77's picture
Add smooth scrolling integration with Lenis
643f2c3
@import "tailwindcss";
/* ============================================
Premium Scrollytelling Portfolio
Dark Mode Design System
============================================ */
:root {
--background: #050505;
--foreground: #ffffff;
--text-heading: rgba(255, 255, 255, 0.9);
--text-body: rgba(255, 255, 255, 0.6);
--text-muted: rgba(255, 255, 255, 0.4);
--accent: rgba(255, 255, 255, 0.08);
}
@theme inline {
--color-background: var(--background);
--color-foreground: var(--foreground);
--font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
/* ============================================
Base Styles
============================================ */
html {
scroll-behavior: auto;
/* Framer Motion handles scroll */
overflow-x: clip;
}
/* Lenis Smooth Scroll Styles */
html.lenis,
html.lenis body {
height: auto;
}
.lenis.lenis-smooth {
scroll-behavior: auto !important;
}
.lenis.lenis-smooth [data-lenis-prevent] {
overscroll-behavior: contain;
}
.lenis.lenis-stopped {
overflow: hidden;
}
.lenis.lenis-scrolling iframe {
pointer-events: none;
}
body {
background: var(--background);
color: var(--foreground);
font-family: var(--font-sans);
font-feature-settings: "kern" 1, "liga" 1;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-rendering: optimizeLegibility;
overflow-x: hidden;
}
/* ============================================
Typography
============================================ */
.text-heading {
color: var(--text-heading);
letter-spacing: -0.02em;
line-height: 1.1;
}
.text-body {
color: var(--text-body);
letter-spacing: -0.01em;
line-height: 1.6;
}
.text-muted {
color: var(--text-muted);
}
/* ============================================
Loading Screen
============================================ */
.loading-screen {
position: fixed;
inset: 0;
z-index: 100;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background: var(--background);
}
.loading-progress {
font-size: 4rem;
font-weight: 200;
letter-spacing: -0.04em;
color: var(--text-heading);
font-variant-numeric: tabular-nums;
}
.loading-text {
font-size: 0.875rem;
text-transform: uppercase;
letter-spacing: 0.2em;
color: var(--text-muted);
margin-top: 1.5rem;
}
.loading-bar {
width: 200px;
height: 1px;
background: var(--accent);
margin-top: 2rem;
overflow: hidden;
position: relative;
}
.loading-bar-fill {
height: 100%;
background: var(--text-body);
transition: width 0.1s ease-out;
}
/* ============================================
Canvas Container
============================================ */
.canvas-container {
position: sticky;
top: 0;
left: 0;
width: 100%;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
}
.scroll-canvas {
max-width: 100%;
max-height: 100%;
object-fit: contain;
}
/* ============================================
Text Overlays
============================================ */
.text-overlay {
position: fixed;
z-index: 10;
pointer-events: none;
padding: 2rem;
max-width: 600px;
}
.text-overlay-center {
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
}
.text-overlay-left {
top: 50%;
left: 5%;
transform: translateY(-50%);
text-align: left;
}
.text-overlay-right {
top: 50%;
right: 5%;
transform: translateY(-50%);
text-align: right;
}
.overlay-heading {
font-size: clamp(2rem, 5vw, 4rem);
font-weight: 300;
color: var(--text-heading);
letter-spacing: -0.03em;
line-height: 1.1;
margin-bottom: 0.5rem;
}
.overlay-subheading {
font-size: clamp(1rem, 2vw, 1.5rem);
font-weight: 400;
color: var(--text-body);
letter-spacing: -0.01em;
line-height: 1.4;
}
.overlay-cta {
display: inline-flex;
align-items: center;
gap: 0.75rem;
margin-top: 2rem;
padding: 1rem 2rem;
background: rgba(255, 255, 255, 0.1);
border: 1px solid rgba(255, 255, 255, 0.15);
border-radius: 9999px;
color: var(--text-heading);
font-size: 0.875rem;
font-weight: 500;
letter-spacing: 0.02em;
backdrop-filter: blur(20px);
pointer-events: auto;
cursor: pointer;
transition: all 0.3s ease;
}
.overlay-cta:hover {
background: rgba(255, 255, 255, 0.15);
border-color: rgba(255, 255, 255, 0.25);
transform: translateY(-2px);
}
/* ============================================
Scroll Progress Indicator
============================================ */
.scroll-progress {
position: fixed;
top: 50%;
right: 2rem;
transform: translateY(-50%);
z-index: 50;
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.scroll-dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: var(--accent);
transition: all 0.3s ease;
}
.scroll-dot.active {
background: var(--text-heading);
transform: scale(1.5);
}
/* ============================================
Mobile Responsive
============================================ */
@media (max-width: 768px) {
.text-overlay {
padding: 1.5rem;
max-width: 90%;
}
.text-overlay-left,
.text-overlay-right {
left: 50%;
right: auto;
transform: translate(-50%, -50%);
text-align: center;
}
.overlay-heading {
font-size: clamp(1.5rem, 8vw, 2.5rem);
}
.overlay-subheading {
font-size: clamp(0.875rem, 4vw, 1.125rem);
}
.scroll-progress {
right: 1rem;
}
}