:root {
    /* Colors - Original Palette */
    --bg-primary: #F4F4F4;
    --bg-sec: #EFEFEF;
    --text-primary: #000000;
    --text-sec: #444444;
    --accent: #222222;
    --accent-hover: #000000;
    --border-color: #CCCCCC;
    --footer-bg: #EAEAEA;
    --footer-text: #000000;

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacings */
    --container-max: 1100px; /* Increased from 1000px for a more 'airy' feel */
}

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

/* Scroll Snapping */
html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
    scrollbar-gutter: stable; /* Prevents layout shift */
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #CCCCCC;
    border-radius: 10px;
}

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

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}

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

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--accent);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Utilities */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

.section-light {
    background-color: var(--bg-sec);
}

.section-header {
    margin-bottom: 2rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.title-line {
    height: 4px;
    width: 60px;
    background-color: var(--accent);
    border-radius: 2px;
}

/* Typography styles */
[data-lucide] {
    width: 1.25rem;
    height: 1.25rem;
}

.icon-small {
    width: 1rem !important;
    height: 1rem !important;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 500;
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

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

.btn-primary:hover {
    background-color: var(--text-sec);
    transform: translateY(-2px);
}

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

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

.btn-text {
    background: none;
    color: var(--accent);
    padding: 0;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: underline;
}

.btn-text:hover {
    color: var(--text-sec);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(244, 244, 244, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
    max-width: 1200px; /* Increased for better desktop positioning */
}

.nav-logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem; /* Increased slightly for better 'fit' */
    color: var(--text-primary);
    letter-spacing: -0.5px;
    transition: opacity 0.3s ease;
}

.nav-logo:hover {
    opacity: 0.8;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-sec);
    transition: color 0.3s;
    position: relative;
    padding: 0.5rem 0;
}

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

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

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
}

/* Full Page Sections */
/* Each section fits perfectly 100% of the screen */
.section,
.hero-section {
    height: 100vh;
    height: 100dvh;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 64px; /* Adjusted to match navbar height */
    position: relative;
    overflow: hidden; /* Default to hidden to prevent double scroll */
}

/* Only allow internal scrolling if the screen is too small/short */
@media screen and (max-height: 700px), (max-width: 768px) {
    .section,
    .hero-section {
        overflow-y: auto;
        scroll-snap-align: none; /* Disable snapping on small screens for better UX */
        height: auto;
        min-height: 100vh;
    }
    
    html {
        scroll-snap-type: none;
    }
}

/* Hero Section */
.hero-content {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.hero-image-wrapper {
    flex-shrink: 0;
}

.profile-circle,
.profile-img {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--text-primary);
    object-fit: cover;
}

.profile-circle .initial {
    font-family: var(--font-heading);
    font-size: 5rem;
    font-weight: 700;
    color: var(--bg-primary);
}

.hero-text {
    flex: 1;
}

.heading-large {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -1.5px;
    margin-bottom: 0.5rem;
}

.subheading {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-sec);
    margin-bottom: 1.5rem;
}

.separator {
    color: var(--border-color);
    margin: 0 0.5rem;
}

.intro-text {
    font-size: 1rem;
    color: var(--text-sec);
    margin-bottom: 2rem;
    max-width: 600px;
}

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

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.about-text p {
    color: var(--text-sec);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.personal-info {
    margin-top: 1.5rem;
    display: flex;
    gap: 2rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
}

.info-item i {
    color: var(--text-sec);
}

.about-quote blockquote {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    line-height: 1.4;
    color: var(--text-sec);
    font-weight: 500;
    padding-left: 1.5rem;
    border-left: 4px solid var(--accent);
    font-style: italic;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.skill-card {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
}

.skill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.skill-header-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-icon {
    color: var(--text-primary);
}

.skill-header h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
}

.skill-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.skill-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.skill-list li i {
    width: 14px;
    height: 14px;
    margin-top: 4px;
    color: var(--text-sec);
    flex-shrink: 0;
}

.skill-name {
    color: var(--text-sec);
    font-size: 0.9rem;
}


/* Unified Grid for Experience and Achievements (2x2) */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.info-card {
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.info-card:hover {
    transform: translateY(-3px);
    border-color: var(--text-primary);
}

.info-card-meta {
    font-size: 0.8rem;
    color: var(--text-sec);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.info-card-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.info-card-org {
    color: var(--text-sec);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.info-card-desc {
    color: var(--text-sec);
}

.info-card-desc li {
    margin-bottom: 0.3rem;
    font-size: 0.85rem;
    list-style-type: disc;
    margin-left: 1rem;
}

/* Hobbies */
.hobbies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.hobby-card {
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
    background-color: transparent;
    transition: transform 0.3s;
}

.hobby-card:hover {
    transform: translateY(-3px);
    border-color: var(--text-primary);
}

.hobby-card i {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.hobby-card h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.hobby-card p {
    font-size: 0.85rem;
    color: var(--text-sec);
    margin-bottom: 1rem;
}

/* Footer (Full Screen Snap Variant) */
.footer {
    height: 100vh;
    height: 100dvh;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: var(--footer-bg);
    color: var(--footer-text);
    border-top: 1px solid rgba(0, 0, 0, 0.05); /* Softer border */
    overflow: hidden; /* Prevent double scroll on large screen */
}

@media screen and (max-height: 700px), (max-width: 768px) {
    .footer {
        height: auto;
        min-height: 60vh;
        padding: 4rem 0;
        overflow: visible;
        scroll-snap-align: none;
    }
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-text {
    max-width: 500px;
    color: var(--text-sec);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.footer-social {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: all 0.3s;
}

.social-icon:hover {
    background-color: var(--text-primary);
    color: var(--bg-primary);
}

.footer-nav {
    margin-bottom: 3rem;
}

.footer-nav a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-sec);
    transition: color 0.3s;
}

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

.footer-bottom {
    width: 100%;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-sec);
}

/* Reveal Animations */
.reveal {
    opacity: 0;
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

.reveal-up { transform: translateY(50px); }
.reveal-down { transform: translateY(-50px); }
.reveal-left { transform: translateX(-50px); }
.reveal-right { transform: translateX(50px); }

.reveal.active {
    opacity: 1;
    transform: translate(0, 0);
}

/* Staggered Delays */
.reveal.delay-1 { transition-delay: 0.1s; }
.reveal.delay-2 { transition-delay: 0.2s; }
.reveal.delay-3 { transition-delay: 0.3s; }
.reveal.delay-4 { transition-delay: 0.4s; }
.reveal.delay-5 { transition-delay: 0.5s; }

/* Media Queries */
@media (max-width: 768px) {
    .heading-large {
        font-size: 2.5rem;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .hero-image-wrapper {
        margin-top: 2rem;
    }

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

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

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

    .personal-info {
        justify-content: center;
    }

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

    .nav-links {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: var(--bg-primary);
        flex-direction: column;
        padding: 1rem 0;
        border-bottom: 1px solid var(--border-color);
        text-align: center;
        gap: 1.5rem;
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }
}