:root {
    --bg-color: #f0ece4;
    --text-main: #1a1a1a;
    --text-muted: #555;
    --accent: #e85d2c;
    --accent-secondary: #2a7a68;
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(0, 0, 0, 0.08);
    --card-shadow: rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

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

h1, h2, h3, .logo {
    font-family: 'Outfit', sans-serif;
}

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

/* UI Structure */
#ui-container {
    position: relative;
    width: 100%;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: rgba(240, 236, 228, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    transition: background 0.3s ease;
}

.logo {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: -1px;
    background: linear-gradient(135deg, var(--accent), #d4a373);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent);
}

/* ═══════════════════════════════════════════════════════════
   SECTIONS
   ═══════════════════════════════════════════════════════════ */
.section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 6rem 8%;
    position: relative;
}

/* Content scroll reveal */
.content {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.content.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Centered Sections (After About Me) */
.section-center {
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.section-center .glass-card {
    margin: 0 auto;
    text-align: center;
}

.section-center h2 {
    text-align: center;
    width: 100%;
}

.section-center .skills-grid,
.section-center .projects-grid,
.section-center .logo-grid {
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
}

/* Glass Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 4px 30px var(--card-shadow);
}

.glass-card.wide {
    max-width: 1000px;
}

/* ═══════════════════════════════════════════════════════════
   HERO SECTION — Split layout
   ═══════════════════════════════════════════════════════════ */
.hero {
    display: flex;
    align-items: center;
    gap: 4rem;
    padding-top: 8rem;
}

.hero-content {
    flex: 1;
    max-width: 550px;
}

.hero-image {
    flex: 1;
    max-width: 550px;
}

.hero-image img {
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
    transition: transform 0.5s ease;
}

.hero-image img:hover {
    transform: scale(1.02);
}

.subtitle {
    font-size: 1rem;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.title {
    font-size: 4.5rem;
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.description {
    font-size: 1.2rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

p {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* Button */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    background: var(--accent);
    border: 2px solid var(--accent);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.btn:hover {
    background: transparent;
    color: var(--accent);
    box-shadow: 0 4px 20px rgba(232, 93, 44, 0.25);
}

.btn.primary {
    background: var(--accent-secondary);
    border-color: var(--accent-secondary);
    color: #fff;
}
.btn.primary:hover {
    background: transparent;
    color: var(--accent-secondary);
    box-shadow: 0 4px 20px rgba(42, 122, 104, 0.25);
}

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

.hero-btns, .footer-btns {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-btns {
    justify-content: center;
    margin-top: 1.5rem;
}

.contact-details {
    margin-bottom: 2rem;
}

.contact-details p {
    font-size: 1.3rem;
    color: var(--text-main);
    margin: 0.5rem 0;
}

/* ═══════════════════════════════════════════════════════════
   ABOUT — Side by side text + image
   ═══════════════════════════════════════════════════════════ */
.about-card {
    display: flex;
    gap: 2.5rem;
    align-items: center;
    max-width: 900px;
}

.about-text {
    flex: 1;
}

.about-image {
    flex: 0.8;
}

.about-image img {
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

/* ═══════════════════════════════════════════════════════════
   SKILLS — Cards with icon images
   ═══════════════════════════════════════════════════════════ */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.skill-category {
    text-align: center;
}

.skill-icon {
    width: 100%;
    height: 160px;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.skill-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.skill-icon:hover img {
    transform: scale(1.05);
}

.skill-category h3 {
    font-size: 1.3rem;
    color: var(--text-main);
    margin-bottom: 0.75rem;
    border-bottom: 3px solid var(--accent);
    display: inline-block;
    padding-bottom: 0.4rem;
}

/* ═══════════════════════════════════════════════════════════
   PROJECTS — Cards with image thumbnails
   ═══════════════════════════════════════════════════════════ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.project-card {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
}

.project-img {
    height: 160px;
    overflow: hidden;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.project-card h3 {
    font-size: 1.15rem;
    color: var(--accent);
    padding: 1rem 1.25rem 0.5rem;
    font-family: 'Outfit', sans-serif;
}

.project-card p {
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--text-muted);
    padding: 0 1.25rem 1.25rem;
}

/* ═══════════════════════════════════════════════════════════
   EXTRA — Text + image gallery
   ═══════════════════════════════════════════════════════════ */
.extra-card {
    max-width: 900px;
}

.extra-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

.extra-img {
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.extra-img:hover {
    transform: scale(1.03);
}

/* ═══════════════════════════════════════════════════════════
   TECH LOGOS / TOOLS SECTION
   ═══════════════════════════════════════════════════════════ */
.tech-logos-section {
    min-height: auto;
    padding: 4rem 8%;
}

.logo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
    margin: 2rem auto 0;
    max-width: 900px;
}

.logo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 1rem;
    background: rgba(255,255,255,0.5);
    border-radius: 14px;
    border: 1px solid rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.logo-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.logo-icon {
    font-size: 2.5rem;
}

.logo-item span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    text-align: center;
}

/* Footer */
.footer-block {
    text-align: center;
}

.footer-credits {
    margin-top: 2rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════
   MOBILE MENU
   ═══════════════════════════════════════════════════════════ */
.menu-toggle {
    display: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-main);
    z-index: 101;
    user-select: none;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 70%;
        max-width: 300px;
        background: rgba(240, 236, 228, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s ease;
        z-index: 100;
        border-left: 1px solid rgba(0,0,0,0.08);
    }

    .nav-links.active {
        right: 0;
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    }

    .nav-links li { margin: 1.5rem 0; }
    .section { padding: 4rem 5%; }
    .glass-card { padding: 1.5rem; }

    .hero {
        flex-direction: column;
        gap: 2rem;
        padding-top: 7rem;
    }
    .hero-content, .hero-image {
        max-width: 100%;
    }
    .title { font-size: 2.8rem; }

    .about-card {
        flex-direction: column;
    }

    .extra-images {
        grid-template-columns: 1fr;
    }

    .logo-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        max-width: 100%;
    }
}

/* ═══════════════════════════════════════════════════════════
   DRIFT CAR — Cursor follower with physics
   ═══════════════════════════════════════════════════════════ */
#drift-car {
    position: fixed;
    top: 0;
    left: 0;
    width: 120px;
    height: 40px;
    z-index: 9999;
    pointer-events: none;
    transition: filter 0.2s ease;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.25));
}

#drift-car svg {
    width: 100%;
    height: 100%;
}

#drift-car.drifting {
    filter: drop-shadow(0 4px 16px rgba(255, 40, 0, 0.6))
            drop-shadow(0 0 12px rgba(255, 40, 0, 0.4));
}

#skid-canvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.6;
}

/* ═══════════════════════════════════════════════════════════
   PROJECT DETAIL MODAL
   ═══════════════════════════════════════════════════════════ */
.project-card {
    cursor: pointer;
    position: relative;
}

.card-hint {
    display: block;
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--accent);
    opacity: 0;
    transition: opacity 0.3s ease;
    font-weight: 600;
}

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

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: #fff;
    border-radius: 20px;
    max-width: 680px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 0;
    position: relative;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    font-size: 1.8rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.modal-img {
    width: 100%;
    height: 220px;
    border-radius: 20px 20px 0 0;
    overflow: hidden;
}

.modal-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-content h2 {
    padding: 24px 28px 0;
    font-size: 1.6rem;
    color: var(--text-main);
}

.modal-meta {
    padding: 10px 28px 0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.meta-tag {
    background: var(--bg-color);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.modal-desc {
    padding: 16px 28px;
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.modal-section {
    padding: 0 28px 20px;
}

.modal-section h4 {
    font-size: 1rem;
    color: var(--text-main);
    margin-bottom: 10px;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-tags span {
    background: linear-gradient(135deg, var(--accent), #d35400);
    color: #fff;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}

.modal-section ul {
    list-style: none;
    padding: 0;
}

.modal-section ul li {
    padding: 6px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-left: 20px;
    position: relative;
}

.modal-section ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-secondary);
    font-weight: 700;
}

.modal-section ul li:last-child {
    border-bottom: none;
}

/* Hide scrollbar but allow scrolling */
.modal-content::-webkit-scrollbar {
    width: 6px;
}
.modal-content::-webkit-scrollbar-track {
    background: transparent;
}
.modal-content::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 3px;
}

@media (max-width: 600px) {
    .modal-content {
        max-height: 90vh;
        border-radius: 16px;
    }
    .modal-img {
        height: 160px;
        border-radius: 16px 16px 0 0;
    }
    .modal-content h2 {
        font-size: 1.3rem;
        padding: 16px 20px 0;
    }
    .modal-desc, .modal-section {
        padding-left: 20px;
        padding-right: 20px;
    }
}
