/* Base Reset & Body */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: linear-gradient(15deg, #0f0f0f 10%, #2a2d30 60%, #101214);
    color: #e0e0e0;
    line-height: 1.6;
    background-attachment: fixed;
}

/* Snap Container */
.snap-container {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

/* Sections */
.section {
    height: 100vh;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    position: relative; /* For absolute positioning of indicator */
}

.hero { background-color: rgba(0,0,0,0.5); }
.about { background-color: rgba(20,20,20,0.5); }
.portfolio { background-color: rgba(40,40,40,0.5); }
.contact { background-color: rgba(60,60,60,0.5); }

h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

p {
    font-size: 1.1rem;
    max-width: 600px;
    margin-bottom: 1rem;
}

/* Profile */
.profile-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 3px solid #4a4a4a;
    margin-bottom: 1rem;
}

.name { font-size: 2.5rem; color: #ffffff; }
.bio { font-size: 1.2rem; margin-bottom: 1.5rem; }

/* Buttons */
.button-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.button-link {
    background-color: #1e1e1e;
    color: #fff;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 8px;
    transition: background 0.3s, transform 0.2s;
    min-width: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.button-link:hover {
    background-color: #333;
    transform: scale(1.05);
}

/* Scroll Indicator (only on non-last sections) */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #aaa;
    font-size: 0.9rem;
    opacity: 0.8;
    justify-content: space-between;
    height: 8dvh;
}

.scroll-indicator .arrow {
    width: 24px;
    height: 24px;
    transform: rotate(45deg);
    margin-bottom: 20px;
}

.scroll-indicator .arrow::before,
.scroll-indicator .arrow::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: solid #aaa;
    border-width: 0 3px 3px 0;
    animation: fade-pulse 2s infinite; 
}
.scroll-indicator .arrow::before { transform: translate(-100%, -50%); }
.scroll-indicator .arrow::after { transform: translate(-50%, 0%); }
@keyframes fade-pulse { 0%,100% { opacity: 0.4; } 50% { opacity: 1; } }

.channel-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    margin: 2rem 0;
}

.channel-grid > div {
    background: rgba(30,30,30,0.6);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
}

/* Carousel Wrapper – centers and constrains width */
.carousel-wrapper {
    width: 100%;
    max-width: 900px;          /* wider on desktop, still centered */
    margin: 1.5rem auto;
    overflow: hidden;          /* hides overflow during scroll */
}

/* Carousel Container – the scrollable area */
.carousel {
    display: flex;
    gap: 1.5rem;               /* space between cards */
    overflow-x: auto;          /* enables horizontal scroll */
    scroll-snap-type: x mandatory;   /* snaps to each card */
    scroll-behavior: smooth;   /* smooth momentum */
    padding: 0 1rem;           /* breathing room on sides */
    -webkit-overflow-scrolling: touch; /* smooth iOS momentum */
    scrollbar-width: thin;     /* nicer scrollbar (optional) */
    scrollbar-color: #444 #222;
}

/* Hide scrollbar visually but keep functionality */
.carousel::-webkit-scrollbar {
    height: 8px;
}
.carousel::-webkit-scrollbar-track {
    background: #222;
}
.carousel::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

/* Individual Cards */
.carousel-card {
    flex: 0 0 85%;             /* ~85% width → peeks next card (mobile friendly) */
    max-width: 380px;          /* cap card size on large screens */
    scroll-snap-align: center; /* snap to center of card */
    background: rgba(30, 30, 30, 0.7);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.carousel-card:hover {
    transform: translateY(-8px); /* subtle lift on hover */
}

.card-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 1rem;
    aspect-ratio: 16 / 9;     /* consistent thumbnail shape */
    object-fit: cover;
}

.carousel-card a {
    background: #000000;
    color:#ffffff;
    padding:6px;
    border-radius:6px;
    text-decoration:none;
    width:100%;
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 1.5rem auto;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 2;
    transition: background 0.2s;
}

.carousel-arrow:hover { background: rgba(0,0,0,0.8); }
.carousel-arrow.prev { left: 10px; }
.carousel-arrow.next { right: 10px; }

/* Hide arrows on small screens if you want (optional) */
@media (max-width: 600px) {
    .carousel-arrow { display: none; }
}

/* Dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 1rem;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    background: #555;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}

.carousel-dot.active {
    background: #fff;
    transform: scale(1.3);
}

/* Make cards full-width on very small screens */
@media (max-width: 500px) {
    .carousel-card {
        flex: 0 0 92%;
    }
}

/* Responsive */
@media (max-width: 600px) {
    .section { padding: 1rem; }
    .button-link { min-width: 100%; }
    .scroll-indicator { bottom: 20px; font-size: 0.8rem; }
}

@media (min-width: 601px) {
    .carousel-card {
        flex: 0 0 86%;
        max-width: 600px;   
    }
}

@media (min-width: 901px) {
    .carousel-card {
        flex: 0 0 90%;
        max-width: 900px;  
    }
}
