/* ============================================= */
/*  RUHUL IKRAM — Portfolio Website v5            */
/*  Custom Asset Folder with Layered PNGs         */
/* ============================================= */

:root {
    --bg-primary: #e8e8e8;
    --bg-surface: #ffffff;
    --bg-dark: #1a1a1a;
    --bg-dark-card: #252525;
    --text-dark: #1a1a1a;
    --text-muted: #6b6b6b;
    --text-light: #999;
    --text-white: #f5f5f5;
    --accent-blue: #3a5ce4;
    --accent-blue-light: #4b6ef5;
    --imessage-blue: #007AFF;
    --imessage-blue-dark: #0063D1;
    --border: #ddd;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 6px 24px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.2);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-accent: 'Playfair Display', serif;
    --nav-height: 56px;
    --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    scroll-behavior: smooth;
}

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

img {
    max-width: 100%;
    display: block;
}

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

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==========================================
   NAVBAR
   ========================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 100;
    transition: all 0.4s ease;
}

.navbar.scrolled {
    background: rgba(232, 232, 232, 0.9);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: var(--shadow-sm);
}

.navbar .container {
    display: flex;
    align-items: center;
    height: 100%;
}

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

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: var(--text-dark);
}

/* ==========================================
   HERO DESK
   ========================================== */
.hero-desk {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: var(--nav-height);
    background-color: #9a9388;
    background-image: url('../assets/bg-desk.png');
    background-size: cover;
    background-position: center top;
    overflow: hidden;
}

.hero-desk::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.25) 100%);
    pointer-events: none;
}

/* ==========================================
   WORKSPACE DECORATIONS
   ========================================== */
.workspace-decor {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.decor-item {
    position: absolute;
    opacity: 0.4;
    transition: opacity 0.4s ease;
    filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.2));
}

.hero-desk:hover .decor-item {
    opacity: 0.55;
}

.decor-pencil {
    top: 18%;
    left: 8%;
    transform: rotate(-25deg);
}

.decor-coffee {
    top: 15%;
    right: 10%;
    transform: rotate(5deg);
}

.decor-mouse {
    bottom: 22%;
    right: 8%;
    transform: rotate(-10deg);
}

.decor-code {
    bottom: 30%;
    left: 6%;
}

.code-bracket {
    font-family: 'Courier New', monospace;
    font-size: 1.6rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    text-shadow: 1px 2px 4px rgba(0, 0, 0, 0.3);
}

.decor-plant {
    top: 55%;
    right: 14%;
}

.decor-keyboard {
    bottom: 14%;
    left: 14%;
    transform: rotate(-8deg);
}

/* ==========================================
   DESK SURFACE LAYOUT
   ========================================== */
.desk-surface {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================
   CUSTOM ASSET FOLDER (7 layers)
   ==========================================
   Structure (back to front):
   1. folder-back.png       (z: 1)
   2. file-empty.png        (z: 2, no interaction)
   3. file-work.png         (z: 3, interactive)
   4. file-studies.png      (z: 4, interactive)
   5. file-project.png      (z: 5, interactive)
   6. folder-front.png      (z: 6)
   7. stamp.png             (z: 7)

   User provides all PNGs as transparent assets.
   CSS positions them to match the mockup.
*/
.folder-asset {
    position: relative;
    width: 460px;
    height: 380px;
}

/* --- Shared layer styles --- */
.folder-asset .layer {
    position: absolute;
    pointer-events: none;
    user-select: none;
}

/* --- Layer 1: Folder Back --- */
.folder-back-img {
    bottom: 12%;
    left: 0;
    width: 100%;
    z-index: 1;
}

/* --- Layer 2-5: Files container --- */
.folder-files-layer {
    position: absolute;
    inset: 0;
    z-index: 3;
}

/* --- Individual file (shared) --- */
.asset-file {
    position: absolute;
    user-select: none;
}

.asset-file img {
    display: block;
    pointer-events: none;
    filter: drop-shadow(2px 4px 8px rgba(0, 0, 0, 0.2));
    transition: filter 0.3s ease;
}

/* --- File Empty (decorative, no interaction) --- */
.file-empty {
    z-index: 2;
    pointer-events: none;
    bottom: 9%;
    left: -13%;
    width: 60%;
}

/* --- Interactive files shared --- */
.file-interactive {
    cursor: pointer;
    transition: transform 0.4s var(--ease-spring);
}

.file-interactive:hover {
    z-index: 10 !important;
}

.file-interactive:hover img {
    filter: drop-shadow(4px 8px 16px rgba(0, 0, 0, 0.35));
}

.file-interactive:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 4px;
    border-radius: 6px;
}

/* --- File: Work (back-left, tilted left) --- */
.file-work {
    z-index: 3;
    top: 18%;
    left: -42%;
    width: 80%;
    transform: rotate(-15deg);
}

.file-work:hover {
    transform: rotate(-8deg) translateY(-30px) scale(1.08);
}

/* --- File: Studies (right side, tilted right) --- */
.file-studies {
    z-index: 4;
    top: 10%;
    right: -20%;
    width: 50%;
    transform: rotate(18deg);
}

.file-studies:hover {
    transform: rotate(10deg) translateY(-30px) scale(1.08);
}

/* --- File: Project (top-center, frontmost) --- */
.file-project {
    z-index: 5;
    top: 1%;
    left: 28%;
    width: 52%;
    transform: rotate(3deg);
}

.file-project:hover {
    transform: rotate(0deg) translateY(-32px) scale(1.1);
}

/* --- Layer 6: Folder Front --- */
.folder-front-img {
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 6;
}

/* --- Layer 7: Stamp (center-left on folder front) --- */
.stamp-layer {
    position: absolute;
    z-index: 10;
    bottom: 20%;
    left: 8%;
    width: 38%;
    pointer-events: none;
}

.stamp-img {
    width: 100%;
    filter: drop-shadow(2px 3px 6px rgba(0, 0, 0, 0.15));
}

/* ==========================================
   BUBBLE TEXT POPUP (per file)
   ==========================================
   A floating rounded bubble that appears
   above the file on hover, iOS-style.
*/
.file-bubble {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%) translateY(-100%) scale(0.85);
    opacity: 0;
    pointer-events: none;
    transition: all 0.35s var(--ease-spring);
    z-index: 20;
}

.file-interactive:hover .file-bubble {
    opacity: 1;
    transform: translateX(-50%) translateY(-100%) scale(1);
}

.bubble-inner {
    background: rgba(30, 30, 30, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 12px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-width: 120px;
    text-align: center;
    box-shadow:
        0 8px 28px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.bubble-emoji {
    font-size: 1.3rem;
}

.bubble-title {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.02em;
}

.bubble-desc {
    font-size: 0.68rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.03em;
}

/* Bubble arrow pointing down */
.bubble-arrow {
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid rgba(30, 30, 30, 0.92);
    margin: 0 auto;
}

/* ==========================================
   3D iOS CHAT BUBBLE (Contact)
   ========================================== */
.chat-bubble-3d {
    display: none;
    /* Hidden for now — uncomment when ready */
    cursor: pointer;
    position: relative;
    align-self: flex-end;
    margin-bottom: 40px;
    transition: all 0.4s var(--ease-spring);
}

.chat-bubble-3d:hover {
    transform: translateY(-8px) scale(1.05);
}

.chat-bubble-3d:focus-visible {
    outline: 2px solid var(--imessage-blue);
    outline-offset: 6px;
    border-radius: 20px;
}

.chat-bubble-3d .bubble-body {
    background: linear-gradient(135deg, var(--imessage-blue) 0%, var(--imessage-blue-dark) 100%);
    border-radius: 22px 22px 22px 6px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow:
        0 6px 24px rgba(0, 122, 255, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 2;
    min-width: 180px;
    transition: box-shadow 0.3s ease;
}

.chat-bubble-3d:hover .bubble-body {
    box-shadow:
        0 10px 36px rgba(0, 122, 255, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.chat-bubble-3d .bubble-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 100%);
    border-radius: 22px 22px 0 0;
    pointer-events: none;
}

.bubble-avatar {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.bubble-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bubble-sender {
    font-size: 0.65rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.bubble-text {
    font-size: 0.88rem;
    font-weight: 600;
    color: #fff;
}

/* iMessage tail */
.chat-bubble-3d .bubble-tail {
    position: absolute;
    bottom: -1px;
    left: -6px;
    width: 16px;
    height: 16px;
    z-index: 1;
}

.chat-bubble-3d .bubble-tail::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--imessage-blue-dark);
    border-bottom-right-radius: 14px;
}

/* Typing dots */
.chat-bubble-3d::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 8px;
    width: 8px;
    height: 8px;
    background: rgba(0, 122, 255, 0.3);
    border-radius: 50%;
    box-shadow: 14px 0 0 rgba(0, 122, 255, 0.2), 28px 0 0 rgba(0, 122, 255, 0.1);
    animation: typingDots 1.4s ease-in-out infinite;
}

@keyframes typingDots {

    0%,
    100% {
        opacity: 0.4;
        transform: scale(0.9);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* ==========================================
   SCROLL INDICATOR
   ========================================== */
.scroll-indicator {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.scroll-indicator span {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
}

.scroll-line {
    width: 1px;
    height: 30px;
    background: rgba(255, 255, 255, 0.25);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    animation: scrollDown 1.8s ease-in-out infinite;
}

@keyframes scrollDown {
    0% {
        top: -100%;
    }

    50% {
        top: 100%;
    }

    100% {
        top: 100%;
    }
}

/* ==========================================
   CONTENT SECTIONS
   ========================================== */
.content-section {
    padding: 90px 0;
}

.section-dark {
    background: var(--bg-dark);
    color: var(--text-white);
}

.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: var(--bg-primary);
    margin-bottom: 16px;
    color: var(--text-dark);
}

.section-dark .section-icon {
    background: var(--bg-dark-card);
    color: var(--text-white);
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: 2.6rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    text-align: center;
}

.section-header h2 em {
    font-family: var(--font-accent);
    font-style: italic;
    font-weight: 700;
}

.section-sub {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.section-dark .section-sub {
    color: rgba(255, 255, 255, 0.4);
}

.section-header.light h2 {
    color: var(--text-white);
}

/* ==========================================
   PROJECT GRID
   ========================================== */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.project-card {
    background: var(--bg-surface);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform 0.4s var(--ease-out), box-shadow 0.4s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.card-preview {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #f0f0f0;
}

.card-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .card-preview img {
    transform: scale(1.06);
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(26, 26, 26, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .card-overlay {
    opacity: 1;
}

.overlay-btn {
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 8px 20px;
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    border-radius: 30px;
    transition: all 0.3s ease;
}

.overlay-btn:hover {
    background: #fff;
    color: var(--text-dark);
}

.card-body {
    padding: 22px;
    position: relative;
}

.card-tools {
    position: absolute;
    top: 22px;
    right: 22px;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.card-body h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 6px;
    padding-right: 36px;
}

.card-body p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 14px;
}

.card-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.card-tags span {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 4px 10px;
    background: var(--bg-primary);
    border-radius: 20px;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ==========================================
   WORK CARDS (Dark Supreme)
   ========================================== */
.work-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
}

.work-card {
    background: var(--bg-dark-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    padding: 28px;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s var(--ease-out), box-shadow 0.4s ease;
}

.work-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-blue), #7c3aed, var(--accent-blue));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.work-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.work-card:hover::before {
    opacity: 1;
}

.work-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.work-badge {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-blue-light);
}

.work-period {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
}

.work-card h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-white);
    margin-bottom: 4px;
}

.work-company {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 10px;
}

.work-desc {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.6;
    margin-bottom: 14px;
}

.work-skills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.work-skills span {
    font-size: 0.62rem;
    font-weight: 700;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ==========================================
   STUDIES
   ========================================== */
.studies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.study-card {
    background: var(--bg-surface);
    border-radius: 18px;
    border: 1px solid var(--border);
    padding: 28px;
    transition: transform 0.4s var(--ease-out), box-shadow 0.4s ease;
    position: relative;
    overflow: hidden;
}

.study-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #f59e0b, #ef4444);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.study-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.study-card:hover::after {
    opacity: 1;
}

.study-card.online::after {
    background: linear-gradient(90deg, var(--accent-blue), #06b6d4);
}

.study-year {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.study-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.study-body h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.study-major {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 8px;
}

.study-desc {
    font-size: 0.8rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* ==========================================
   CONTACT (Pill links)
   ========================================== */
.section-contact {
    background: var(--bg-dark);
    color: var(--text-white);
    padding: 80px 0;
}

.contact-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 60px;
    max-width: 800px;
    margin: 0 auto;
}

.contact-left {
    flex: 1;
}

.contact-left h2 {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}

.contact-left h2 em {
    font-family: var(--font-accent);
    font-style: italic;
}

.contact-left p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.6;
}

.contact-right {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-pill-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    background: var(--imessage-blue);
    color: #fff;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s var(--ease-spring);
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.25);
}

.contact-pill-link:hover {
    transform: translateX(6px) scale(1.03);
    box-shadow: 0 6px 24px rgba(0, 122, 255, 0.4);
    background: var(--accent-blue-light);
}

.pill-emoji {
    font-size: 1.1rem;
}

/* ==========================================
   FOOTER
   ========================================== */
.footer {
    text-align: center;
    padding: 20px 0;
    background: #111;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.75rem;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    .desk-surface {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .folder-asset {
        width: 340px;
        height: 280px;
    }

    .chat-bubble-3d {
        align-self: center;
        margin-bottom: 0;
    }

    .section-header h2 {
        font-size: 2rem;
    }

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

    .work-cards {
        grid-template-columns: 1fr;
    }

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

    .contact-wrapper {
        flex-direction: column;
        gap: 30px;
    }

    .decor-item {
        display: none;
    }
}

@media (max-width: 480px) {
    .folder-asset {
        width: 280px;
        height: 230px;
    }

    .section-header h2 {
        font-size: 1.6rem;
    }

    .contact-left h2 {
        font-size: 1.8rem;
    }
}