/* --- Global Variables & Resets --- */
:root {
    --font-primary: 'Inter', sans-serif;
    --bg-light: #f7f7f5;
    --bg-dark: #000000;
}

body {
    font-family: var(--font-primary);
    -webkit-font-smoothing: antialiased;
    margin: 0;
    scroll-behavior: smooth;
}

/* --- Themes --- */
.theme-light {
    background-color: var(--bg-light);
    color: black;
}

.theme-dark {
    background-color: var(--bg-dark);
    color: var(--bg-light);
}

/* --- Navigation --- */
.custom-navbar {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    background: inherit;
    z-index: 1000;
}

.brand-text {
    font-size: 1.75rem;
    color: inherit !important;
    text-decoration: none;
}

.nav-link {
    color: inherit !important;
    font-size: 0.95rem;
    font-weight: 400;
    position: relative;
    padding: 0.5rem 1rem;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 0;
    left: 50%;
    background-color: currentColor;
    transition: all 0.3s ease-in-out;
    transform: translateX(-50%);
}

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

.nav-separator {
    opacity: 0.3;
    font-weight: 300;
}

/* --- Hero Section --- */
.hero-section {
    height: calc(100vh - 90px);
    padding: 0;
    overflow: hidden;
    position: relative;
}

.hero-image-container {
    height: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
}

.profile-image {
    height: 85vh;
    width: auto;
    z-index: 2;
    display: block;
}

.hero-title {
    font-size: clamp(5rem, 8vw, 8rem);
    letter-spacing: -0.04em;
    line-height: 1;
    font-weight: 800;
}

.hero-tagline {
    font-size: 1.25rem;
    font-weight: 400;
    max-width: 450px;
    margin-bottom: 2rem;
}

.btn-custom {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.theme-light .btn-custom {
    background-color: #000000;
    color: #ffffff !important;
}

.theme-dark .btn-custom {
    background-color: #f7f7f5;
    color: #000000 !important;
}

.btn-custom:hover {
    background-color: transparent !important;
    border-color: currentColor;
    color: inherit !important;
}

.abstract-bg {
    position: absolute;
    top: 15%;
    right: -10%;
    width: 600px;
    height: 600px;
    background-color: rgba(0, 0, 0, 0.04);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    z-index: 1;
    transform: rotate(-15deg);
}

/* --- About Section --- */
.about-section {
    min-height: 100vh;
    background-color: #000000;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.text-wrapper {
    max-width: 85%;
    padding-left: 10%;
    text-align: left;
}

.name-intro {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.role-intro {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 1.5rem;
    display: block;
}

.description-text {
    font-size: clamp(1.1rem, 1.5vw, 1.3rem);
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.5);
    max-width: 420px;
}

/* --- Staggered Marquee --- */
.marquee-wrapper {
    width: 100%;
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: scroll-left 50s linear infinite;
}

.marquee-track:hover {
    animation-play-state: paused;
}

.staggered-grid {
    display: grid;
    grid-template-columns: repeat(4, 160px);
    grid-template-rows: repeat(3, 160px);
    gap: 30px;
    padding-right: 30px;
    flex-shrink: 0;
}

.staggered-grid div:nth-child(n+5):nth-child(-n+8) { transform: translateX(80px); }
.staggered-grid div:nth-child(n+9):nth-child(-n+12) { transform: translateX(160px); }

.m-card {
    width: 160px;
    height: 160px;
    background-color: #111;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes led-smooth-A {
    0%, 100% { filter: grayscale(0%); opacity: 1; }
    50% { filter: grayscale(100%); opacity: 0.8; }
}

/* Pattern B: Fades Gray (0s) -> Color (1s) -> Gray (2s) */
@keyframes led-smooth-B {
    0%, 100% { filter: grayscale(100%); opacity: 0.8; }
    50% { filter: grayscale(0%); opacity: 1; }
}

.m-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: none;
    /* opacity: 1;
    filter: grayscale(0%);
    transition: all 0.4s ease; */
    /* animation: color-pulse 2s infinite; */
}

/* 3. Apply the Smooth Pattern to the 4x3 Grid */

/* --- Line 1 & Line 3 Pattern (A, B, A, B) --- */
.staggered-grid div:nth-child(1) img, 
.staggered-grid div:nth-child(3) img,
.staggered-grid div:nth-child(9) img, 
.staggered-grid div:nth-child(11) img {
    animation: led-smooth-A 1s infinite ease-in-out;
}

.staggered-grid div:nth-child(2) img, 
.staggered-grid div:nth-child(4) img,
.staggered-grid div:nth-child(10) img, 
.staggered-grid div:nth-child(12) img {
    animation: led-smooth-B 1s infinite ease-in-out;
}

/* --- Line 2 Pattern (B, A, B, A) --- */
.staggered-grid div:nth-child(5) img, 
.staggered-grid div:nth-child(7) img {
    animation: led-smooth-B 1s infinite ease-in-out;
}

.staggered-grid div:nth-child(6) img, 
.staggered-grid div:nth-child(8) img {
    animation: led-smooth-A 1s infinite ease-in-out;
}

/* .m-card:hover img {
    opacity: 1;
    filter: grayscale(0%);
} */

@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* --- Works Section Refinement (Based on image_c097b6.png) --- */
.works-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background-color: #f7f7f5;
    padding: 60px 0; /* Tightened padding for better focus[cite: 1] */
}

.works-title {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 10px;
}

.works-tagline {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 40px;
}

.slider-window {
    width: 100%;
    max-width: 1150px; /* Limits width to keep content creatively managed[cite: 1] */
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    border: 1px solid #000;
    background: #fff;
}

.works-slider {
    display: flex;
    transition: transform 0.8s cubic-bezier(0.85, 0, 0.15, 1);
}

.project-card {
    min-width: 100%;
}

.card-inner {
    padding: 40px; /* Reduced padding to tighten the box[cite: 1] */
    min-height: 500px; /* Managed height to reduce empty space[cite: 1] */
    display: flex;
    align-items: center;
}

/* Image Presentation */
.project-image-box {
    border: 1px solid #eee;
    padding: 8px;
    background: #fafafa;
}

.project-image-box img {
    width: 100%;
    height: auto;
    display: block;
}

/* Project Details */
.project-meta-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.meta-date {
    font-size: 0.85rem;
    font-weight: 700;
    color: #000;
}

.meta-btn {
    border: 1px solid #000;
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #000;
    text-decoration: none;
    transition: all 0.2s ease;
}

.meta-btn:hover {
    background-color: #000;
    color: #fff;
}

.project-name {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 15px;
    letter-spacing: -1.5px;
}

.project-desc {
    font-size: 1rem;
    line-height: 1.6;
    color: #444;
    margin-bottom: 30px;
}

/* Statistics Boxes */
.project-stats-flex {
    display: flex;
    gap: 10px;
}

.stat-box {
    flex: 1;
    border: 1px solid #000;
    padding: 15px;
    text-align: left;
}

.stat-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    color: #999;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.stat-value {
    font-size: 1.15rem;
    font-weight: 800;
    color: #000;
}

/* Slider Arrows */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    z-index: 1100;
    cursor: pointer;
    padding: 10px;
}

.nav-arrow img {
    width: 25px;
    opacity: 0.5;
    transition: all 0.2s ease;
}

.nav-arrow:hover img {
    opacity: 1;
    transform: scale(1.1);
}

.prev-arrow { left: 15px; }
.next-arrow { right: 15px; }

/* Responsive Styling */
@media (max-width: 991px) {
    .card-inner { padding: 25px; flex-direction: column; }
    .nav-arrow { display: none; }
}

/* --- Feedback Section --- */
.feedback-section {
    background-color: #000000;
    color: #ffffff;
    padding: 100px 0 120px 0;
    overflow: hidden;
}

/* Header Grid/Flex */
.feedback-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 60px;
    gap: 30px;
}

.feedback-title {
    font-size: clamp(3rem, 6vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 5px;
}

.feedback-subtitle {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 10px;
}

.feedback-desc {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    max-width: 250px;
    line-height: 1.4;
    margin: 0;
}

/* Ethos Button */
.btn-review {
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-review:hover {
    background-color: #ffffff;
    color: #000000;
}

/* --- Marquee Animation --- */
.feedback-marquee-wrapper {
    width: 100%;
    overflow: hidden;
    /* Optional: Fades the edges slightly so cards smoothly appear/disappear */
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.feedback-marquee-track {
    display: flex;
    gap: 30px;
    width: max-content;
    /* 40s controls the speed. Lower = faster, Higher = slower */
    animation: scroll-feedbacks 40s linear infinite;
    padding: 0 15px; 
}

/* Pause animation on hover for readability */
.feedback-marquee-track:hover {
    animation-play-state: paused;
}

@keyframes scroll-feedbacks {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } 
}

/* --- Feedback Cards --- */
.feedback-card {
    background-color: #ffffff;
    width: 400px;
    height: 400px;
    border-radius: 12px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    box-sizing: border-box;
}

.card-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.reviewer-name {
    color: #000000;
    font-weight: 600;
    font-size: 1.05rem;
}

.platform-badge {
    background-color: #f2f2f2;
    color: #555;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Screenshot Display */
.screenshot-box {
    flex: 1; /* Takes up remaining vertical space */
    background-color: #fafafa;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0px;
}

.screenshot-box img {
   width: 100%; 
    height: 100%; 
    object-fit: cover; 
    display: block;
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .feedback-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .feedback-card {
        width: 320px;
        height: 320px;
    }
}

/* --- Call To Action Section --- */
.cta-section {
    padding: 120px 0 80px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.cta-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.1;
    margin-bottom: 20px;
    color: #000000;
}

.cta-subtitle {
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    color: #444444;
    line-height: 1.6;
    margin-bottom: 40px;
}

/* Work With Me Button */
.btn-work {
    display: inline-block;
    background-color: #ffffff;
    color: #000000;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 15px 35px;
    border-radius: 4px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    margin-bottom: 50px;
    border: 1px solid #eeeeee;
}

.btn-work:hover {
    background-color: #000000;
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Social Links Layout */
.social-links-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

.social-icon {
    color: #000000;
    font-size: 1.4rem;
    text-decoration: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.social-icon:hover {
    transform: scale(1.1);
    opacity: 0.7;
}

.social-divider {
    color: #cccccc;
    font-weight: 300;
    font-size: 1.2rem;
}

/* Collaboration Text */
.collaboration-text {
    font-size: 0.85rem;
    color: #666666;
    font-weight: 500;
}

/* --- Footer --- */
.site-footer {
    padding: 25px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-text {
    font-size: 0.7rem;
    color: #888888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
    font-weight: 600;
}