/* ===== NIDHAL PORTFOLIO - MAIN STYLES ===== */

:root {
    --nidhal-primary: #FF6B6B;
    --nidhal-secondary: #4ECDC4;
    --nidhal-accent: #FFE66D;
    --nidhal-purple: #A78BFA;
    --nidhal-bg: #FFFBF5;
    --nidhal-text: #1a1a2e;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Outfit', sans-serif;
    background: var(--nidhal-bg);
    color: var(--nidhal-text);
    overflow-x: hidden;
    line-height: 1.6;
}
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

/* ===== ANIMATIONS ===== */
@keyframes floatShape {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-35px) rotate(20deg); }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideIn {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes revealPhoto {
    from { clip-path: circle(0% at 50% 50%); }
    to { clip-path: circle(75% at 50% 40%); }
}

/* ===== FLOATING SHAPES ===== */
.float-shape {
    position: absolute;
    opacity: 0.1;
    filter: blur(1px);
    pointer-events: none;
    z-index: 0;
}
.float-1 { width: 90px; height: 90px; background: var(--nidhal-primary); border-radius: 50%; top: 12%; left: 6%; animation: floatShape 7s ease-in-out infinite alternate; }
.float-2 { width: 65px; height: 65px; background: var(--nidhal-secondary); border-radius: 10px; top: 20%; right: 8%; animation: floatShape 9s ease-in-out 1s infinite alternate; }
.float-3 { width: 55px; height: 55px; background: var(--nidhal-accent); clip-path: polygon(50% 0%,0% 100%,100% 100%); top: 72%; left: 10%; animation: floatShape 8s ease-in-out 2s infinite alternate; }
.float-4 { width: 75px; height: 75px; background: var(--nidhal-purple); border-radius: 50%; top: 60%; right: 6%; animation: floatShape 10s ease-in-out 0.5s infinite alternate; }
.float-5 { width: 50px; height: 50px; background: #F97316; border-radius: 8px; top: 8%; left: 48%; animation: floatShape 6s ease-in-out 1.5s infinite alternate; }
.float-6 { width: 60px; height: 60px; background: #EC4899; clip-path: polygon(50% 0%,0% 100%,100% 100%); bottom: 10%; left: 45%; animation: floatShape 11s ease-in-out 3s infinite alternate; }

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(20px, 5vw, 60px);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(255,251,245,0.85);
    border-bottom: 1px solid rgba(0,0,0,0.04);
    transition: box-shadow 0.3s;
}
.navbar.scrolled { box-shadow: 0 4px 30px rgba(0,0,0,0.06); }
.nav-logo {
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav-logo .n {
    background: linear-gradient(135deg, var(--nidhal-primary), #F97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.nav-logo .last {
    font-size: 13px;
    font-weight: 400;
    color: #999;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-family: 'Space Mono', monospace;
}
.nav-links {
    display: flex;
    gap: 28px;
    align-items: center;
}
.nav-link {
    position: relative;
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #777;
    transition: color 0.3s;
    background: none;
    border: none;
    font-family: 'Space Mono', monospace;
    padding: 6px 0;
}
.nav-link:hover, .nav-link.active { color: var(--nidhal-primary); }
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--nidhal-primary), var(--nidhal-accent));
    border-radius: 2px;
}

/* Language toggle */
.lang-toggle {
    display: flex;
    border-radius: 50px;
    overflow: hidden;
    border: 2px solid #e5e5e5;
}
.lang-btn {
    padding: 5px 13px;
    border: none;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
    color: #777;
    font-family: 'Space Mono', monospace;
    text-decoration: none;
    display: inline-block;
}
.lang-btn.active { background: var(--nidhal-text); color: white; }

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
}
.hamburger span {
    width: 24px;
    height: 2.5px;
    background: var(--nidhal-text);
    border-radius: 2px;
    transition: all 0.3s;
}
.mobile-menu {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,251,245,0.98);
    backdrop-filter: blur(20px);
    z-index: 999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
}
.mobile-menu.open { display: flex; }
.mobile-menu .nav-link { font-size: 22px; }
.mobile-close {
    position: absolute;
    top: 20px;
    right: 24px;
    font-size: 32px;
    background: none;
    border: none;
    cursor: pointer;
}

/* ===== HERO ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px clamp(20px, 5vw, 80px) 60px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #FF6B6B18, #4ECDC418, #FFE66D18, #A78BFA18);
    background-size: 400% 400%;
    animation: gradientShift 12s ease infinite;
}
.hero-inner {
    display: flex;
    align-items: center;
    gap: clamp(40px, 6vw, 80px);
    max-width: 1200px;
    width: 100%;
    position: relative;
    z-index: 1;
}
.hero-text {
    flex: 1;
    animation: slideUp 0.8s ease-out;
}
.hero-greeting {
    font-family: 'Space Mono', monospace;
    font-size: 13px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--nidhal-primary);
    margin-bottom: 14px;
    font-weight: 700;
}
.hero-name {
    font-family: 'Sora', sans-serif;
    font-size: clamp(40px, 6vw, 72px);
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: 6px;
    background: linear-gradient(135deg, var(--nidhal-text), var(--nidhal-primary), var(--nidhal-purple));
    background-size: 200% 200%;
    animation: gradientShift 6s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-role {
    font-family: 'Space Mono', monospace;
    font-size: clamp(15px, 2vw, 20px);
    color: var(--nidhal-primary);
    margin-bottom: 24px;
    letter-spacing: 2px;
}
.hero-desc {
    font-size: 16px;
    line-height: 1.8;
    color: #666;
    max-width: 520px;
    font-weight: 300;
    margin-bottom: 36px;
}
.hero-btns {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}
.hero-photo-wrap {
    flex: 0 0 auto;
    animation: fadeInScale 1s ease-out 0.3s both;
}
.hero-photo-container {
    position: relative;
    width: clamp(280px, 28vw, 400px);
    height: clamp(340px, 34vw, 500px);
}
.hero-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 30px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.12);
    animation: revealPhoto 1.2s ease-out both;
}
.hero-photo-accent {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid var(--nidhal-primary);
    border-radius: 30px;
    top: 14px;
    left: 14px;
    z-index: -1;
    opacity: 0.3;
}
.hero-photo-dots {
    position: absolute;
    bottom: -20px;
    right: -20px;
    display: grid;
    grid-template-columns: repeat(4, 8px);
    gap: 6px;
    z-index: -1;
}
.hero-photo-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--nidhal-secondary);
    opacity: 0.3;
}

/* ===== BUTTONS ===== */
.btn-primary {
    background: linear-gradient(135deg, var(--nidhal-primary), #F97316);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Outfit', sans-serif;
    box-shadow: 0 4px 20px rgba(255,107,107,0.3);
    text-decoration: none;
    display: inline-block;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255,107,107,0.4);
}
.btn-secondary {
    background: transparent;
    color: var(--nidhal-text);
    border: 2px solid var(--nidhal-text);
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Outfit', sans-serif;
    text-decoration: none;
    display: inline-block;
}
.btn-secondary:hover {
    background: var(--nidhal-text);
    color: white;
}

/* ===== SECTIONS ===== */
.section {
    padding: 100px clamp(20px, 5vw, 80px);
    max-width: 1100px;
    margin: 0 auto;
}
.section-header {
    text-align: center;
    margin-bottom: 60px;
}
.section-title {
    font-family: 'Sora', sans-serif;
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--nidhal-primary), var(--nidhal-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.section-subtitle {
    font-size: 17px;
    color: #777;
    font-weight: 300;
}

/* ===== TIMELINE ===== */
.timeline {
    position: relative;
    padding-left: 60px;
    margin-bottom: 60px;
}
.timeline-line {
    position: absolute;
    left: 28px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--nidhal-primary), var(--nidhal-secondary), var(--nidhal-purple));
    border-radius: 2px;
}
.timeline-item {
    position: relative;
    margin-bottom: 40px;
    animation: slideIn 0.6s ease-out both;
}
.timeline-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid white;
    position: absolute;
    left: -40px;
    top: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}
.timeline-year {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 2px;
    margin-bottom: 6px;
}
.timeline-role {
    font-family: 'Sora', sans-serif;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 2px;
}
.timeline-company {
    font-size: 14px;
    color: var(--nidhal-primary);
    font-weight: 600;
    margin-bottom: 8px;
}
.timeline-desc {
    font-size: 15px;
    color: #666;
    line-height: 1.7;
    font-weight: 300;
}

/* ===== SKILLS ===== */
.skills-wrap { text-align: center; }
.skills-label {
    font-family: 'Sora', sans-serif;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
}
.skill-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}
.skill-tag {
    padding: 9px 20px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    transition: transform 0.3s;
    cursor: default;
}
.skill-tag:hover { transform: scale(1.08); }

/* ===== PORTFOLIO ===== */
.filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
}
.filter-btn {
    padding: 8px 22px;
    border-radius: 50px;
    border: 2px solid #e5e5e5;
    background: white;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Space Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.filter-btn.active, .filter-btn:hover {
    border-color: var(--nidhal-primary);
    background: var(--nidhal-primary);
    color: white;
}
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}
.portfolio-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175,0.885,0.32,1.275);
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.04);
    cursor: pointer;
}
.portfolio-card.hidden { display: none; }
.portfolio-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}
.portfolio-thumb {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}
.portfolio-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 50%, rgba(255,255,255,0.15));
    pointer-events: none;
}
.portfolio-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    font-family: 'Space Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.portfolio-info { padding: 20px; }
.portfolio-info h3 {
    font-family: 'Sora', sans-serif;
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 4px;
}
.portfolio-info p {
    font-size: 13px;
    color: #999;
    font-family: 'Space Mono', monospace;
}

/* ===== CAPSULES ===== */
.capsules-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.capsule-card {
    display: flex;
    gap: 24px;
    align-items: center;
    padding: 28px;
    background: white;
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.175,0.885,0.32,1.275);
    border: 1px solid rgba(0,0,0,0.04);
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    cursor: pointer;
}
.capsule-card:hover {
    transform: translateX(8px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.08);
}
.capsule-icon {
    width: 70px;
    height: 70px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    flex-shrink: 0;
}
.capsule-content { flex: 1; }
.capsule-content h3 {
    font-family: 'Sora', sans-serif;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}
.capsule-content .dur {
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}
.capsule-content p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    font-weight: 300;
}
.capsule-play {
    flex-shrink: 0;
    padding: 10px 22px;
    border-radius: 50px;
    border: 2px solid;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    background: transparent;
    font-family: 'Space Mono', monospace;
}
.capsule-play:hover { transform: scale(1.08); }

/* ===== CONTACT ===== */
.contact-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.input-field {
    width: 100%;
    padding: 14px 20px;
    border: 2px solid #e5e5e5;
    border-radius: 14px;
    font-size: 15px;
    font-family: 'Outfit', sans-serif;
    transition: all 0.3s;
    background: white;
    outline: none;
}
.input-field:focus {
    border-color: var(--nidhal-primary);
    box-shadow: 0 0 0 4px rgba(255,107,107,0.1);
}
textarea.input-field {
    min-height: 140px;
    resize: vertical;
}
.contact-status {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    display: none;
}
.contact-status.success {
    display: block;
    background: #d4edda;
    color: #155724;
}
.contact-status.error {
    display: block;
    background: #f8d7da;
    color: #721c24;
}
.contact-side h3 {
    font-family: 'Sora', sans-serif;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
}
.socials-row {
    display: flex;
    gap: 14px;
    margin-top: 20px;
    flex-wrap: wrap;
}
.social-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    transition: all 0.3s;
    cursor: pointer;
    border: 2px solid #e5e5e5;
    background: white;
}
.social-icon:hover { transform: translateY(-4px) scale(1.1); }

/* ===== VIDEO MODAL ===== */
.video-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.video-modal.open { display: flex; }
.video-modal-inner {
    position: relative;
    width: 100%;
    max-width: 900px;
    aspect-ratio: 16/9;
}
.video-modal-inner iframe,
.video-modal-inner video {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    border: 0;
    min-height: 300px;
}
.video-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
}

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    padding: 40px 20px;
    font-size: 13px;
    color: #bbb;
    font-family: 'Space Mono', monospace;
    border-top: 1px solid #f0f0f0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .hero-inner {
        flex-direction: column-reverse;
        text-align: center;
    }
    .hero-text {
        align-items: center;
        display: flex;
        flex-direction: column;
    }
    .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-photo-container {
        width: 260px;
        height: 320px;
    }
    .contact-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .hamburger { display: flex; }
    .nav-links { display: none !important; }
    .capsule-card {
        flex-direction: column;
        text-align: center;
    }
    .capsule-play { align-self: center; }
    .timeline { padding-left: 40px; }
    .timeline-dot { left: -30px; }
}
