

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Inter, sans-serif;
}

body {
    background: #F8F7F3;
    color: #1F1F1F;
    overflow-x: hidden;
}

/* ===========================
   NAVBAR
=========================== */

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(248, 247, 243, 0.90);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, .06);
}

.navbar {
    width: min(92%, 1400px);
    margin: 0 auto;
    height: 85px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* Brand */
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: #111;
    flex-shrink: 0;
}

.brand img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
}

.brand-text h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 2px;
    white-space: nowrap;
}

.brand-text span {
    font-size: 13px;
    color: #777;
    white-space: nowrap;
}

/* Navigation */
.nav-links {
    display: flex;
    align-items: center;
    gap: 40px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: #222;
    font-size: 15px;
    font-weight: 500;
    position: relative;
    transition: .3s ease;
    white-space: nowrap;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 2px;
    background: #111;
    transition: .3s ease;
}

.nav-links a:hover::after { width: 100%; }
.nav-links a:hover { color: #000; }

/* Contact Button */
.contact-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    background: #111;
    color: #fff;
    text-decoration: none;
    border-radius: 999px;
    font-weight: 600;
    transition: .3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.contact-btn:hover {
    background: #000;
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .15);
}

/* Hamburger */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 0;
}

.menu-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: #111;
    border-radius: 10px;
    transition: all 0.3s ease;
}

/* Hamburger → X animation */
.menu-toggle.active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* ===========================
   HERO
=========================== */

.hero {
    padding-top: 85px;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: calc(85px + 60px) 24px 80px;
}

.hero-content {
    max-width: 820px;
    width: 100%;
}

.tag {
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 13px;
    margin-bottom: 20px;
    display: block;
}

.hero h1 {
    font-size: clamp(2.4rem, 7vw, 5.5rem);
    line-height: 1.1;
    margin-bottom: 24px;
    font-weight: 700;
}

.description {
    font-size: clamp(15px, 2.5vw, 18px);
    color: #555;
    line-height: 1.8;
    max-width: 650px;
    margin: 0 auto 40px;
}

.cta-btn {
    display: inline-block;
    padding: 16px 36px;
    background: #1F1F1F;
    color: #fff;
    text-decoration: none;
    border-radius: 999px;
    font-weight: 600;
    transition: .3s ease;
    font-size: 15px;
}

.cta-btn:hover {
    transform: translateY(-3px);
    background: #000;
}

/* ===========================
   WORK
=========================== */

.work {
    width: min(90%, 1400px);
    margin: clamp(80px, 12vw, 180px) auto;
}

.work-header {
    max-width: 760px;
    margin-bottom: clamp(40px, 8vw, 90px);
}

.work-header span {
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: .8rem;
    color: #888;
    display: block;
}

.work-header h2 {
    font-size: clamp(2rem, 6vw, 5rem);
    line-height: 1.05;
    margin: 25px 0;
}

.work-header p {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.9;
}

/* ===========================
   PROJECT CARDS
=========================== */

.project-card {
    margin-bottom: clamp(60px, 10vw, 150px);
}

.project-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    max-height: 750px;
    object-fit: cover;
    border-radius: 28px;
    transition: transform .6s ease;
    display: block;
}

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

.project-info {
    margin-top: 28px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 30px;
}

.project-type {
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #888;
    font-size: .8rem;
    margin-bottom: 12px;
    display: block;
}

.project-info h3 {
    font-size: clamp(1.6rem, 4vw, 3rem);
    margin-bottom: 14px;
    line-height: 1.15;
}

.project-description {
    max-width: 680px;
    color: #666;
    line-height: 1.8;
    font-size: 1rem;
}

.project-links {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    white-space: nowrap;
    flex-shrink: 0;
}

.case-study {
    text-decoration: none;
    color: #111;
    font-weight: 600;
    white-space: nowrap;
    transition: transform .3s;
    display: inline-block;
}

.case-study:hover { transform: translateX(8px); }

.demo {
    text-decoration: none;
    color: #888;
    font-weight: 500;
    font-size: .9rem;
    white-space: nowrap;
    transition: color .3s;
    display: inline-block;
}

.demo:hover { color: #111; }

/* ===========================
   SKILLS
=========================== */

.skills {
    width: min(90%, 1400px);
    margin: 0 auto clamp(80px, 12vw, 180px);
    text-align: center;
}

.skills h2 {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    margin-bottom: 35px;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.skill-list span {
    padding: 10px 22px;
    border: 1px solid rgba(0, 0, 0, .1);
    border-radius: 999px;
    font-size: .9rem;
    color: #333;
    background: #fff;
    transition: border-color .25s, transform .25s;
}

.skill-list span:hover {
    border-color: #111;
    transform: translateY(-2px);
}

/* ===========================
   SERVICES
=========================== */

.services {
    width: min(90%, 1400px);
    margin: 0 auto clamp(80px, 12vw, 180px);
}

.section-heading {
    max-width: 760px;
    margin-bottom: clamp(40px, 8vw, 90px);
}

.section-heading span {
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: .8rem;
    color: #888;
    display: block;
}

.section-heading h2 {
    font-size: clamp(2rem, 5vw, 3.4rem);
    line-height: 1.15;
    margin-top: 25px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service-card {
    padding: 36px;
    background: #fff;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, .06);
    transition: transform .3s, box-shadow .3s;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .07);
}

.service-card h3 {
    font-size: 1.15rem;
    margin-bottom: 12px;
}

.service-card p {
    color: #666;
    line-height: 1.7;
    font-size: .95rem;
}

/* ===========================
   CTA BANNER
=========================== */

.cta {
    width: min(90%, 1400px);
    margin: 0 auto clamp(80px, 12vw, 180px);
    background: #111;
    color: #fff;
    border-radius: 28px;
    padding: clamp(60px, 10vw, 110px) clamp(28px, 6vw, 80px);
    text-align: center;
}

.cta span {
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: .8rem;
    color: #9CA3AF;
    display: block;
}

.cta h2 {
    font-size: clamp(1.8rem, 5vw, 3.4rem);
    margin: 20px 0;
    line-height: 1.2;
}

.cta p {
    color: #B0B0B0;
    max-width: 600px;
    margin: 0 auto 35px;
    line-height: 1.8;
    font-size: 1rem;
}

.cta .cta-btn {
    background: #fff;
    color: #111;
}

.cta .cta-btn:hover {
    background: #eee;
    transform: translateY(-3px);
}

/* ===========================
   FOOTER
=========================== */

footer {
    width: min(90%, 1400px);
    margin: 0 auto;
    padding: 50px 0 60px;
    border-top: 1px solid rgba(0, 0, 0, .08);
    text-align: center;
}

footer h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

footer p {
    color: #777;
    font-size: .9rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 26px;
    margin: 22px 0;
    flex-wrap: wrap;
}

.footer-links a {
    text-decoration: none;
    color: #333;
    font-size: .9rem;
    font-weight: 500;
    transition: color .25s;
}

.footer-links a:hover { color: #000; }

.footer-note {
    font-size: .8rem;
    color: #999;
    margin-top: 10px;
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   1440px → Large Desktop
   1200px → Regular Desktop
   992px  → Small Desktop / Landscape Tablet
   768px  → Tablet Portrait
   600px  → Large Phone
   480px  → Regular Phone
   360px  → Small Phone
   320px  → Tiny Phone (iPhone SE etc.)
============================================ */

/* ── 1440px+ : Large / Ultrawide desktops ── */
@media (min-width: 1440px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 32px;
    }
    .navbar {
        height: 90px;
    }
    .hero {
        padding-top: calc(90px + 80px);
    }
}

/* ── Under 1200px : Compact desktop ── */
@media (max-width: 1200px) {
    .nav-links {
        gap: 28px;
    }
    .services-grid {
        gap: 20px;
    }
    .service-card {
        padding: 28px;
    }
}

/* ── Under 992px : Small desktop / Landscape tablet ── */
@media (max-width: 992px) {
    .project-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    .project-links {
        flex-direction: row;
        align-items: center;
        gap: 24px;
    }
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .nav-links {
        gap: 22px;
    }
    .contact-btn {
        padding: 12px 22px;
        font-size: 14px;
    }
}

/* ── Under 768px : Tablet portrait ── */
@media (max-width: 768px) {
    /* Hamburger appears */
    .menu-toggle {
        display: flex;
    }

    /* Mobile nav overlay */
    .nav-links {
        position: fixed;
        top: 85px;
        left: -100%;
        flex-direction: column;
        background: #F8F7F3;
        width: 100%;
        height: calc(100vh - 85px);
        gap: 32px;
        padding-top: 60px;
        transition: left 0.4s ease;
        border-top: 1px solid rgba(0, 0, 0, .05);
        align-items: center;
        overflow-y: auto;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links a {
        font-size: 20px;
    }

    /* Hide contact btn on mobile — it's in the nav overlay instead */
    .contact-btn {
        display: none;
    }

    /* Project cards */
    .project-card img {
        border-radius: 18px;
        aspect-ratio: 4 / 3;
    }

    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* CTA */
    .cta {
        border-radius: 20px;
    }

    /* Footer links stack gracefully */
    .footer-links {
        gap: 18px;
    }
}

/* ── Under 600px : Large phone ── */
@media (max-width: 600px) {
    .hero {
        padding-left: 20px;
        padding-right: 20px;
        padding-bottom: 60px;
    }

    .project-card img {
        border-radius: 14px;
        aspect-ratio: 4 / 3;
    }

    .service-card {
        padding: 24px;
    }

    .work-header p,
    .project-description {
        font-size: .97rem;
    }

    .project-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .cta h2 {
        font-size: clamp(1.6rem, 6vw, 2.2rem);
    }
}

/* ── Under 480px : Regular phone ── */
@media (max-width: 480px) {
    .navbar {
        height: 70px;
    }

    .hero {
        padding-top: calc(70px + 40px);
    }

    .nav-links {
        top: 70px;
        height: calc(100vh - 70px);
        gap: 28px;
        padding-top: 48px;
    }

    /* Hide subtitle in brand on small screens */
    .brand-text span {
        display: none;
    }

    .brand img {
        width: 42px;
        height: 42px;
    }

    .brand-text h3 {
        font-size: 16px;
    }

    .project-card img {
        border-radius: 12px;
    }

    .skill-list span {
        padding: 8px 16px;
        font-size: .82rem;
    }

    .cta {
        border-radius: 16px;
        padding: 48px 22px;
    }

    .footer-links {
        flex-direction: column;
        gap: 14px;
        align-items: center;
    }
}

/* ── Under 360px : Small phone (Samsung Galaxy S8, older iPhones) ── */
@media (max-width: 360px) {
    .navbar {
        height: 64px;
    }

    .hero {
        padding-top: calc(64px + 36px);
    }

    .nav-links {
        top: 64px;
        height: calc(100vh - 64px);
    }

    .brand img {
        width: 36px;
        height: 36px;
    }

    .brand-text h3 {
        font-size: 15px;
    }

    .cta-btn {
        padding: 13px 26px;
        font-size: 14px;
    }

    .project-card img {
        border-radius: 10px;
        aspect-ratio: 3 / 2;
    }

    .service-card {
        padding: 20px;
    }

    .service-card h3 {
        font-size: 1rem;
    }
}

/* ── Under 320px : Tiny (iPhone SE 1st gen) ── */
@media (max-width: 320px) {
    .navbar {
        height: 60px;
    }

    .hero {
        padding-top: calc(60px + 32px);
    }

    .nav-links {
        top: 60px;
        height: calc(100vh - 60px);
        padding-top: 36px;
        gap: 22px;
    }

    .nav-links a {
        font-size: 17px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .description {
        font-size: 14px;
    }

    .cta-btn {
        padding: 12px 22px;
        font-size: 13px;
    }

    .skill-list span {
        padding: 7px 14px;
        font-size: .78rem;
    }
}

/* ── 4K / Ultrawide screens (2560px+) ── */
@media (min-width: 2560px) {
    .navbar,
    .work,
    .skills,
    .services,
    .cta,
    footer {
        max-width: 1800px;
    }

    .hero-content {
        max-width: 1100px;
    }

    .hero h1 {
        font-size: 6.5rem;
    }

    .description {
        font-size: 1.3rem;
        max-width: 800px;
    }

    .nav-links a {
        font-size: 17px;
    }

    .contact-btn {
        padding: 16px 34px;
        font-size: 16px;
    }
}

/* ── Reduced motion: respect user accessibility preference ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}