/* ===================================================================
   Global Styles
   =================================================================== */
html, body {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Poppins', sans-serif;
    color: #1a1a1a;
    margin: 0;
}

/* ===================================================================
   Animation Keyframes
   =================================================================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(-30px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes float {
    0%   { transform: translateY(0px); }
    50%  { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to   { opacity: 1; transform: scale(1); }
}

/* Animation Classes */
.animate-fadeInUp    { animation: fadeInUp 0.8s ease-out forwards; }
.animate-fadeInRight { animation: fadeInRight 0.8s ease-out forwards; }
.animate-float       { animation: float 4s ease-in-out infinite; }
.animate-scaleIn     { animation: scaleIn 0.8s ease-out forwards; }

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-500 { animation-delay: 0.5s; }

/* ===================================================================
   HERO — Rounded Hexagon Portrait
   Head pops out of the top point, body sits inside the polygon.
   =================================================================== */
.image-pop {
    position: relative;
    width: clamp(250px, 74vw, 410px);
    aspect-ratio: 320 / 430;      /* tall box: hexagon sits low, head pops up top */
    margin: 0 auto;
    /* Purple project-colored glow cast by the hexagon */
    filter: drop-shadow(0 35px 55px rgba(139, 92, 246, 0.35));
    overflow: visible;            /* let the head spill out the top */
    will-change: transform;
}

/* The backdrop shadow and the clipped photo both take the hexagon shape */
.hex-bg,
.hex-img {
    position: absolute;
    inset: 0;
    -webkit-clip-path: url(#hexClip);
    clip-path: url(#hexClip);
}

/* Offset purple hexagon behind the yellow one = the polygon's colored shadow */
.hex-bg {
    background: #8b5cf6;
    z-index: 1;
    transform: translate(14px, 18px);
    opacity: 0.9;
}

/* Solid yellow polygon; the PNG's transparent surround lets this show through */
.hex-img {
    z-index: 2;
    background: #fcd535;
}

.hex-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

/* Duplicate portrait, unclipped, so the head rises above the polygon.
   Same box + same object-fit as .hex-img so the pixels line up exactly;
   lower half is masked away so it melts into the clipped body. */
.head-pop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    z-index: 3;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 26%, transparent 42%);
            mask-image: linear-gradient(to bottom, #000 0%, #000 26%, transparent 42%);
    pointer-events: none;
}

/* ===================================================================
   Hero Decorative Elements
   =================================================================== */
.decor-dots {
    position: absolute;
    top: 60px;
    left: -28px;
    z-index: 0;
}

.brush-stroke {
    position: absolute;
    bottom: 50px;
    right: -50px;
    width: 140px;
    z-index: 5;
    opacity: 0.85;
    color: #a5f3fc;
    pointer-events: none;
}

@media (max-width: 640px) {
    .decor-dots  { left: -6px; top: 30px; transform: scale(0.8); }
    .brush-stroke { right: -10px; width: 100px; }
}

.hero-quote {
    position: absolute;
    top: 100px;
    right: -160px;
    width: 160px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    color: #1a1a1a;
}

.vertical-text {
    writing-mode: vertical-rl;
}

.horizontal-line {
    display: inline-block;
    width: 40px;
    height: 2px;
    background-color: #000;
    vertical-align: middle;
}

/* ===================================================================
   Animation Stopped State (after page load)
   =================================================================== */
.animations-finished .animate-fadeInUp,
.animations-finished .animate-fadeInRight,
.animations-finished .animate-float,
.animations-finished .animate-scaleIn,
.animations-finished .play-text {
    animation: none !important;
}

/* ===================================================================
   Services Section
   =================================================================== */
.service-item {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}

.service-item.show {
    opacity: 1;
    transform: translateY(0);
}

.service-item:hover {
    padding-left: 30px;
    background-color: rgba(255, 255, 255, 0.3);
}

/* ===================================================================
   Buttons & Links
   =================================================================== */
button, a {
    transition: all 0.3s ease;
}

button:active {
    transform: scale(0.95);
}

/* ===================================================================
   Navbar
   =================================================================== */
#main-nav {
    background-color: transparent;
}

.navbar-scrolled {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
    padding-top: 0.85rem !important;
    padding-bottom: 0.85rem !important;
}

/* Mobile menu open state (paired with Tailwind opacity utilities in JS) */
#mobile-menu.open {
    opacity: 1;
    pointer-events: auto;
}

/* ===================================================================
   Hero pinned-scroll
   The section is pinned by GSAP ScrollTrigger; the next section
   scrolls up over it. This spacer reserves the pin distance.
   =================================================================== */
.hero-section {
    background: #fff;
    position: relative;
    z-index: 10;          /* sits below .after-hero (z-20) so it gets covered */
}

/* The section that scrolls up over the pinned hero must be opaque */
.after-hero {
    position: relative;
    z-index: 20;
}

/* ===================================================================
   Portfolio
   =================================================================== */
.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.portfolio-item {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-item.hidden-filter {
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
    position: absolute;
    visibility: hidden;
}

.filter-btn.active {
    color: #000;
    border-color: #000;
}

.portfolio-grid {
    transition: all 0.5s ease;
}

/* ===================================================================
   Mobile Menu
   =================================================================== */
#mobile-menu {
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu.open {
    transform: translateX(0);
}

/* ===================================================================
   Skills
   =================================================================== */
.skill-card {
    transition: all 0.4s ease;
    border: 2px solid transparent;
}

.skill-card:hover {
    border-color: #fcd535;
    background: white;
    transform: translateY(-10px);
}

@media (max-width: 639px) {
    .skill-card:hover { transform: translateY(-5px); }
}

/* ===================================================================
   Timeline / Experience
   =================================================================== */
.timeline-item {
    position: relative;
    padding-left: 40px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 2px;
    height: 100%;
    background: #e5e7eb;
}

.timeline-dot {
    position: absolute;
    left: -5px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #8b5cf6;
    border: 3px solid white;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}

/* ===================================================================
   Testimonials
   =================================================================== */
.testimonial-track {
    overflow: hidden;
    width: 100%;
}

.testimonial-slider {
    display: flex;
    transition-transform: 0.5s ease-in-out;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .testimonial-slider {
        gap: 2rem;
    }
}

.testimonial-card {
    flex: 0 0 calc(50% - 0.75rem);
    transition: all 0.3s ease;
}

@media (max-width: 767px) {
    .testimonial-card {
        flex: 0 0 100%;
    }
}

.testimonial-card:hover {
    transform: scale(1.02);
}

/* ===================================================================
   Contact Form
   =================================================================== */
.form-input {
    background: #f9fafb;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.form-input:focus {
    background: white;
    border-color: #8b5cf6;
    outline: none;
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.05);
}

/* ===================================================================
   Background Accents
   =================================================================== */
.blob-shape {
    filter: blur(80px);
    opacity: 0.15;
    z-index: -1;
}

/* ===================================================================
   Scroll-reveal base states (avoid flash before observer fires)
   =================================================================== */
.scroll-anim-up,
.scroll-anim-left {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.scroll-anim-left {
    transform: translateX(-30px);
}

.scroll-anim-up.animate-fadeInUp,
.scroll-anim-left.animate-fadeInUp {
    opacity: 1;
    transform: none;
}

/* Fallback: if JS/observer never runs, reveal content anyway */
.no-js .scroll-anim-up,
.no-js .scroll-anim-left {
    opacity: 1;
    transform: none;
}
