:root {
    --bg-primary: #050505;
    --bg-secondary: rgba(20, 20, 20, 0.6);
    --text-primary: #f5f5f7;
    --text-secondary: #a1a1a6;
    --accent: #00f2fe;
    --accent-glow: rgba(0, 242, 254, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.03);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body.light-mode {
    --bg-primary: #f5f5f7;
    --bg-secondary: rgba(230, 230, 235, 0.6);
    --text-primary: #1d1d1f;
    --text-secondary: #515154;
    --accent: #008eb3; /* Darker cyan for text contrast in light mode */
    --accent-glow: rgba(0, 142, 179, 0.2);
    --glass-border: rgba(0, 0, 0, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.7);
}

body.light-mode .gradient-text {
    background: linear-gradient(135deg, #1d1d1f 0%, #515154 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-brand {
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 50%, #b829e3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.light-mode .gradient-text-brand {
    background: linear-gradient(135deg, #1d1d1f 0%, var(--accent) 50%, #8a13a8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.light-mode .timeline-dot {
    box-shadow: 0 0 10px var(--accent-glow);
}

body.light-mode .btn-outline {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}



/* Accessibility: Skip Link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--accent);
    color: #fff;
    padding: 8px 16px;
    z-index: 9999;
    transition: var(--transition);
}
.skip-link:focus {
    top: 0;
}

/* Scroll Indicator Bar */
.scroll-bar-indicator {
    position: fixed;
    top: 90px;
    left: 30px;
    width: 60px;
    height: 6px;
    background: var(--accent);
    border-radius: 4px;
    z-index: 900;
    transform-origin: left center;
    will-change: transform;
    box-shadow: 0 0 15px var(--accent-glow);
}

/* Typography */

a, a:-webkit-any-link {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

h1, h2, h3, h4, .logo {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

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

/* Layout Utilities */
@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes rotate-border {
    to { --angle: 360deg; }
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    isolation: isolate;
    transform: translateZ(0);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Animated rotating border on hover */
.glass::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 16px;
    padding: 1px;
    background: conic-gradient(from var(--angle), transparent 70%, var(--accent) 100%);
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.glass:hover::after {
    opacity: 1;
    animation: rotate-border 2s linear infinite;
}

@media (max-width: 768px) {
    .glass::after {
        opacity: 1;
        animation: rotate-border 2s linear infinite;
    }
}


.section {
    padding: 120px 5% 150px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 5%;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    transition: var(--transition);
    transform: translateZ(0);
}

body.light-mode .navbar {
    background: rgba(245, 245, 247, 0.8);
}

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

.logo {
    font-size: 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    margin-left: 2.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--text-primary);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    margin: 5px auto;
    background-color: var(--text-primary);
    transition: var(--transition);
}

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

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

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

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 990;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

/* On WebKit we can add blur */
@supports (-webkit-backdrop-filter: blur(20px)) or (backdrop-filter: blur(20px)) {
    .mobile-menu-overlay {
        background: rgba(5, 5, 5, 0.85);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }
    body.light-mode .mobile-menu-overlay {
        background: rgba(245, 245, 247, 0.85);
    }
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
}

.mobile-link {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.mobile-menu-overlay.active .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-overlay.active .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu-overlay.active .mobile-link:nth-child(2) { transition-delay: 0.2s; }
.mobile-menu-overlay.active .mobile-link:nth-child(3) { transition-delay: 0.3s; }


/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 120px 5% 60px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    z-index: 2;
}

.tagline {
    color: var(--accent);
    font-family: var(--font-heading);
    font-weight: 500;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.9rem;
}

.hero h1 {
    font-size: clamp(3rem, 5vw, 4.5rem);
    margin-bottom: 1.5rem;
    font-weight: 900;
}

.hero-desc {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.95rem;
    cursor: pointer;
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-primary);
    border: 1px solid var(--text-primary);
}

.btn-primary:hover {
    background: transparent;
    color: var(--text-primary);
}

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

.btn-outline:hover {
    background: var(--glass-bg);
    border-color: var(--text-secondary);
}

/* Hero Visual */
.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.glow-orb {
    position: absolute;
    width: 300px;
    height: 300px;
    background: var(--accent-glow);
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    animation: pulse 4s ease-in-out infinite alternate;
}

.profile-img {
    border-radius: 24px;
    object-fit: cover;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    border: 1px solid var(--glass-border);
    max-width: 100%;
    height: auto;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.1); opacity: 1; }
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    perspective: 1000px;
}

.bento-card {
    padding: 2.5rem;
    position: relative;
    z-index: 1;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.6s ease, border-color 0.6s ease;
}

.bento-card:hover {
    box-shadow: 0 30px 60px rgba(0,0,0,0.6);
    border-color: rgba(255,255,255,0.15);
}

.bento-card.col-span-2 {
    grid-column: span 2;
}

.bento-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.bento-card p {
    color: var(--text-secondary);
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.project-card {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 280px;
    position: relative;
    z-index: 1;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.6s ease, border-color 0.6s ease, background 0.6s ease;
}

.project-card:hover {
    border-color: rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.08);
    box-shadow: 0 30px 60px rgba(0,0,0,0.6);
}

.project-content h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.project-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.project-content a {
    color: var(--text-primary) !important;
    text-decoration: none;
    transition: var(--transition);
}

.project-content a:hover {
    color: var(--accent) !important;
}

.project-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    position: relative;
    display: inline-block;
}

.project-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--text-primary);
    transition: width 0.3s ease;
}

.project-card:hover .project-link::after {
    width: 100%;
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

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

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 3rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: 14px;
    top: 8px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 2px solid var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

.timeline-content {
    padding: 2rem;
    position: relative;
    z-index: 1;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.6s ease, border-color 0.6s ease;
}

.timeline-content:hover {
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    border-color: rgba(255,255,255,0.15);
}

.timeline-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.2rem;
}

.timeline-content h4 {
    color: var(--accent);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-family: var(--font-body);
    font-weight: 500;
}

.timeline-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Typography & Lists */
.styled-list {
    list-style-type: disc;
    padding-left: 1.5rem;
    color: var(--text-secondary);
}
.styled-list li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}
.styled-list li:last-child {
    margin-bottom: 0;
}

.clean-list {
    list-style-type: none;
    padding-left: 0;
}
.clean-list li {
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 0.75rem;
}
.clean-list li:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

/* Grids */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}
.metric-card {
    padding: 2rem;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
}
.metric-card.large {
    grid-row: span 2;
    justify-content: center;
}
.metric-card h2 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    margin-bottom: 0.5rem;
    color: var(--accent);
}
.metric-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}
@media (max-width: 900px) {
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
    }
    .metric-card.large {
        grid-column: span 2;
        grid-row: span 1;
    }
}
@media (max-width: 600px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    .metric-card.large {
        grid-column: span 1;
    }
}

.habits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
@media (max-width: 900px) {
    .habits-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .habits-grid { grid-template-columns: 1fr; }
}

.toolkit-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2rem;
    align-items: start;
}
.toolkit-column h3 {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}
@media (max-width: 1024px) {
    .toolkit-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
    .toolkit-grid { grid-template-columns: 1fr; }
}

/* Footer */
footer {
    border-top: 1px solid var(--glass-border);
    padding: 2rem 5%;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    margin-left: 1.5rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a:hover {
    color: var(--text-primary);
}

/* Apple-like Animations */
.fade-up {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
    transition: opacity 1s cubic-bezier(0.22, 1, 0.36, 1), transform 1s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

.fade-in {
    opacity: 0;
    filter: blur(10px);
    transition: opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1), filter 1.2s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, filter;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.fade-in.visible {
    opacity: 1;
    filter: blur(0px);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* Mobile Responsiveness */
@media (max-width: 900px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }
    .bento-card.col-span-2 {
        grid-column: span 1;
    }
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 100px;
        justify-content: center;
    }
    .hero-content {
        margin-bottom: 3rem;
    }
    .hero-actions {
        justify-content: center;
    }
    .nav-content {
        flex-direction: row;
    }
    .logo {
        margin-bottom: 0;
    }
    .nav-links {
        display: none;
    }
    .hamburger {
        display: block;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    .profile-img {
        width: 240px;
        height: 240px;
    }
    .scroll-bar-indicator {
        display: none !important;
    }
    .glass {
        z-index: 10;
    }
}
