/* ============================================================
   JAZIB AHMED — PORTFOLIO  |  JazibWebsite.css
   ============================================================ */

/* ===== CSS VARIABLES ===== */
:root {
    --blue:          rgb(84, 125, 236);
    --red:           rgb(218, 55, 58);
    --red-bright:    rgb(240, 75, 75);
    --green:         rgb(13, 189, 80);
    --bg:            #0b0d13;
    --glass-bg:      rgba(12, 15, 24, 0.80);
    --glass-border:  rgba(255, 255, 255, 0.07);
    --text:          #eef0f6;
    --text-muted:    rgba(238, 240, 246, 0.65);
    --grad-main:     linear-gradient(135deg, var(--blue), var(--red));
    --grad-green:    linear-gradient(135deg, var(--green), var(--blue));
    --grad-red:      linear-gradient(135deg, var(--red), var(--blue));
    --card-radius:   1rem;
    --img-border:    3px;
}

/* ===== RESET ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

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

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar            { width: 8px; }
::-webkit-scrollbar-track      { background: var(--bg); }
::-webkit-scrollbar-thumb      { background: var(--blue); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover{ background: var(--red); }


/* ============================================================
   LOADING SCREEN
   ============================================================ */
#loading-screen {
    position: fixed;
    inset: 0;
    background: var(--bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

#loading-circle {
    width: 11vw;
    height: 11vw;
    min-width: 80px;
    min-height: 80px;
    border-radius: 50%;
    background: url('images/logo.webp') center / cover no-repeat;
    animation: pulse-load 1.5s ease-in-out infinite alternate;
}

@keyframes pulse-load {
    0%   { transform: scale(1);    filter: brightness(0.85); }
    100% { transform: scale(1.18); filter: brightness(1.1); }
}


/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
    position: fixed;
    inset-block-start: 0;
    left: 0;
    right: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;           /* FIX: prevents horizontal overflow */
    padding: 1rem 3rem;
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    background: rgba(11, 13, 19, 0.72);
    border-bottom: 1px solid var(--glass-border);
}

.nav-brand {
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 0.02em;
    background: var(--grad-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    flex-shrink: 0;
}

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

.nav-links a {
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--red); }

/* nav icon hover swap */
.nav-social {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-shrink: 0;            /* FIX: icons never get squashed */
}

.nav-icon-wrap {
    position: relative;
    display: inline-block;
    width: 26px;
    height: 26px;
}

.nav-icon-wrap img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.35s ease;
}

.nav-icon-wrap .icon-back  { opacity: 0; }
.nav-icon-wrap .icon-front { opacity: 0.75; }
.nav-icon-wrap:hover .icon-back  { opacity: 1; }
.nav-icon-wrap:hover .icon-front { opacity: 0; }


/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.38) saturate(1.15);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        to bottom,
        rgba(11, 13, 19, 0.25) 0%,
        rgba(11, 13, 19, 0.55) 70%,
        rgba(11, 13, 19, 1)    100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    padding: 7rem 2rem 3rem;
    text-align: center;
    animation: fade-up 1s ease-out both;
    width: 100%;               /* FIX: keeps content from overflowing */
}

.hero-eyebrow {
    font-size: clamp(0.75rem, 1.4vw, 0.95rem);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--red);
}

.hero-title {
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: clamp(3rem, 7.5vw, 6.5rem);
    line-height: 1;
    background: linear-gradient(140deg, #ffffff 30%, var(--red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(0.85rem, 1.5vw, 1.05rem);
    color: var(--text-muted);
    letter-spacing: 0.06em;
    font-weight: 600;
}

/* --- hero cards --- */
.hero-cards {
    display: flex;
    align-items: flex-end;
    gap: 1.5rem;
    margin-top: 1.25rem;
    flex-wrap: nowrap;
    justify-content: center;
}

/* base card styles */
.hero-card {
    position: relative;
    border-radius: 0.6rem;
    overflow: hidden;
    padding: var(--img-border);
    background: var(--grad-main);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    flex-shrink: 0;
}

/* landscape side cards (Interests + Projects) */
.card-landscape {
    width: clamp(200px, 26vw, 360px);
    aspect-ratio: 4 / 3;
}

/* portrait centre card (About Me) */
.card-portrait {
    width: clamp(160px, 18vw, 260px);
    aspect-ratio: 2 / 3;
}

.hero-card:hover {
    transform: translateY(-7px) scale(1.02);
    box-shadow: 0 18px 48px rgba(218, 55, 58, 0.45);
}

.hero-card-inner {
    width: 100%;
    height: 100%;
    border-radius: calc(0.6rem - var(--img-border));
    overflow: hidden;
    position: relative;
}

.hero-card-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(0.72) contrast(1.05);
    transition: filter 0.3s, transform 0.4s;
}

.hero-card:hover .hero-card-inner img {
    filter: brightness(0.55);
    transform: scale(1.05);
}

.hero-card-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.6rem 0.5rem;
    text-align: center;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: clamp(0.9rem, 1.8vw, 1.25rem);
    color: #fff;
    background: linear-gradient(to top, rgba(0,0,0,0.72), transparent);
    -webkit-text-stroke: 0.5px rgba(0,0,0,0.3);
}

/* --- hero social pills --- */
.hero-social {
    display: flex;
    gap: 0.85rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.social-pill {
    padding: 0.45rem 1.25rem;
    border-radius: 2rem;
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.06);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    text-transform: uppercase;
    transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.2s;
    backdrop-filter: blur(8px);
}

.social-pill:hover {
    background: var(--grad-main);
    color: #fff;
    border-color: transparent;
    transform: translateY(-2px);
}

/* --- scroll hint --- */
.scroll-hint {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    opacity: 0.45;
    animation: fade-up 1.5s ease-out 1s both;
}

.scroll-hint span {
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-weight: 600;
}

.scroll-line {
    width: 1px;
    height: 2.5rem;
    background: linear-gradient(to bottom, var(--text-muted), transparent);
    animation: scroll-drop 1.5s ease-in-out infinite;
}

@keyframes scroll-drop {
    0%   { transform: scaleY(0); transform-origin: top; }
    50%  { transform: scaleY(1); transform-origin: top; }
    51%  { transform: scaleY(1); transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
}


/* ============================================================
   SECTION DIVIDER
   ============================================================ */
.section-divider {
    width: 70%;
    margin: 0 auto;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--glass-border), transparent);
}


/* ============================================================
   CONTENT SECTIONS
   ============================================================ */
.content-section {
    display: flex;
    align-items: center;
    gap: 5rem;
    padding: 6rem 6vw;
    min-height: 80vh;
    position: relative;
}

/* subtle tinted background per section */
.about-section::before,
.interests-section::before,
.projects-section::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.04;
}

.about-section::before     { background: radial-gradient(ellipse at 20% 50%, var(--blue), transparent 70%); }
.interests-section::before { background: radial-gradient(ellipse at 80% 50%, var(--green), transparent 70%); }
.projects-section::before  { background: radial-gradient(ellipse at 20% 50%, var(--red), transparent 70%); }

/* flip interests so image is on the right */
.interests-section { flex-direction: row-reverse; }


/* ===== SECTION IMAGE ===== */
.section-image {
    flex: 1;
    min-width: 0;
}

.section-image img {
    width: 100%;
    display: block;
    border-radius: calc(var(--card-radius) + var(--img-border));
    padding: var(--img-border);
    background: var(--grad-main);
    object-fit: cover;
    box-shadow: 0 16px 50px rgba(84, 125, 236, 0.18);
    transition: box-shadow 0.3s;
}

.section-image img:hover {
    box-shadow: 0 20px 60px rgba(182, 103, 221, 0.28);
}


/* ===== SECTION CARD ===== */
.section-card {
    flex: 1;
    min-width: 0;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--card-radius);
    padding: 2.75rem 2.5rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.45);
}

.section-heading {
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: clamp(1.75rem, 3vw, 2.4rem);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    position: relative;
}

.section-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 2.75rem;
    height: 3px;
    border-radius: 99px;
}

/* per-section heading colour + underline gradient */
.about-section     .section-heading          { color: var(--blue); }
.about-section     .section-heading::after   { background: var(--grad-main); }

.interests-section .section-heading          { color: var(--green); }
.interests-section .section-heading::after   { background: var(--grad-green); }

.projects-section  .section-heading          { color: var(--red); }
.projects-section  .section-heading::after   { background: var(--grad-red); }


/* about text */
.section-text {
    font-size: clamp(0.95rem, 1.4vw, 1.15rem);
    line-height: 1.85;
    color: var(--text-muted);
    font-weight: 600;
}

/* shared list styles */
.section-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.section-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    font-size: clamp(0.88rem, 1.3vw, 1.05rem);
    color: var(--text-muted);
    line-height: 1.6;
    font-weight: 600;
}

.list-marker {
    flex-shrink: 0;
    font-size: 0.7em;
    margin-top: 0.35em;
    font-weight: 900;
}

.interests-section .list-marker { color: var(--green); }
.projects-section  .list-marker { color: var(--red); }

/* links inside project list */
.section-list a {
    color: var(--red);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s, color 0.2s;
    font-weight: 700;
}
.section-list a:hover { border-bottom-color: var(--red); color: #fff; }


/* ============================================================
   SCROLL REVEAL ANIMATIONS
   ============================================================ */
/* FIX: all reveal elements now use .reveal only */
.reveal {
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-left  { transform: translateX(-48px); }
.fade-right { transform: translateX( 48px); }

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

@keyframes fade-up {
    from { opacity: 0; transform: translateY(36px); }
    to   { opacity: 1; transform: translateY(0); }
}


/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    text-align: center;
    padding: 2rem 1rem;
    border-top: 1px solid var(--glass-border);
    color: rgba(255,255,255,0.18);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    font-weight: 600;
}


/* ============================================================
   IMAGE CAROUSEL
   ============================================================ */
.img-carousel {
    flex: 1;
    min-width: 0;
    position: relative;
    border-radius: calc(var(--card-radius) + var(--img-border));
    padding: var(--img-border);
    background: var(--grad-main);
    box-shadow: 0 16px 50px rgba(84, 125, 236, 0.15);
    overflow: hidden;
    height: clamp(260px, 36vw, 520px);
}

.carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-track img {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #0b0d13;
    border-radius: calc(var(--card-radius) - 2px);
}

/* prev / next buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(11, 13, 19, 0.65);
    border: 1px solid var(--glass-border);
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background 0.2s, transform 0.2s;
    z-index: 10;
    padding: 0;
    user-select: none;
}

.carousel-btn:hover {
    background: var(--red);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev { left:  0.6rem; }
.carousel-btn.next { right: 0.6rem; }

/* dots */
.carousel-dots {
    position: absolute;
    bottom: 0.6rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.4rem;
    z-index: 10;
}

.carousel-dots .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

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


/* ============================================================
   RESPONSIVE — tablet / small desktop
   ============================================================ */
@media (max-width: 900px) {
    /* navbar */
    .navbar     { padding: 0.75rem 1.25rem; }
    .nav-links  { display: none; }
    .nav-brand  { font-size: 1rem; }
    .nav-icon-wrap { width: 22px; height: 22px; }

    /* sections go single-column */
    .content-section {
        flex-direction: column !important;
        padding: 3.5rem 5vw;
        gap: 2rem;
        min-height: auto;
    }

    .section-card { padding: 1.75rem 1.5rem; }

    /* hero */
    .hero-content { padding: 5.5rem 1.5rem 2.5rem; gap: 1rem; }
    .hero-eyebrow { font-size: 0.7rem; }

    /* hero cards */
    .hero-cards {
        flex-wrap: wrap;
        align-items: center;
        gap: 0.75rem;
        width: 100%;
        justify-content: center;
    }
    .card-landscape { width: clamp(120px, 40vw, 200px); }
    .card-portrait  { width: clamp(90px,  28vw, 150px); }

    /* carousel height */
    .img-carousel { height: clamp(220px, 55vw, 360px); }
}


/* ============================================================
   RESPONSIVE — phone  (≤ 500px)
   ============================================================ */
@media (max-width: 500px) {
    .hero-title    { font-size: clamp(2.2rem, 11vw, 3.2rem); }
    .hero-subtitle { font-size: 0.8rem; }
    .hero-eyebrow  { font-size: 0.65rem; letter-spacing: 0.08em; }
    .hero-content  { padding: 5rem 1rem 2rem; }

    /* stack portrait card above landscape pair */
    .hero-cards { flex-direction: column; align-items: center; }

    /* FIX: more aggressive card sizing so nothing overflows */
    .card-landscape { width: 90vw; aspect-ratio: 16/9; }
    .card-portrait  { width: 65vw; }

    .section-card    { padding: 1.5rem 1.25rem; }

    /* FIX: tighter section gap on phone */
    .content-section { padding: 2.5rem 4vw; gap: 1.25rem; }

    /* FIX: smaller carousel height + cover images on phone */
    .img-carousel { height: clamp(200px, 65vw, 300px); }
    .carousel-track img { object-fit: cover; }

    /* FIX: smaller carousel buttons so they don't cover images */
    .carousel-btn {
        width: 2rem;
        height: 2rem;
        font-size: 1.5rem;
    }

    .scroll-hint { display: none; }
}
