/* ===========================
   RESET & BASE
=========================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #111111;
    --bg-card: #1a1a1a;
    --bg-card-hover: #222222;
    --orange: #FF6500;
    --orange-dark: #e05500;
    --white: #ffffff;
    --gray: #aaaaaa;
    --border: #2a2a2a;
    --font: 'Poppins', sans-serif;
}

html {
    scroll-behavior: smooth;
}

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

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

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

/* ===========================
   SCROLLBAR
=========================== */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--orange);
    border-radius: 3px;
}

/* ===========================
   NAVBAR
=========================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.2rem 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(17, 17, 17, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    padding: 0.8rem 5%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--orange);
    letter-spacing: 2px;
}

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

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--white);
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--orange);
    transition: width 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--orange);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.btn-hire-nav {
    background: var(--orange);
    color: var(--white);
    padding: 0.5rem 1.4rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.3s ease, transform 0.2s ease;
}

.btn-hire-nav:hover {
    background: var(--orange-dark);
    transform: translateY(-2px);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ===========================
   HERO SECTION
=========================== */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 6rem 5% 4rem;
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 3rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-text {
    z-index: 1;
}

.hero-greeting {
    font-size: 1.1rem;
    color: var(--gray);
    margin-bottom: 0.3rem;
    font-weight: 400;
}

.hero-name {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--white);
}

.hero-title {
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    font-weight: 700;
    color: var(--orange);
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

.hero-social {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.hero-social a {
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.hero-social a:hover {
    border-color: var(--orange);
    color: var(--orange);
    transform: translateY(-3px);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.btn-primary {
    background: var(--orange);
    color: var(--white);
    padding: 0.7rem 1.8rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: 2px solid var(--orange);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background: var(--orange-dark);
    border-color: var(--orange-dark);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    padding: 0.7rem 1.8rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: 2px solid var(--border);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-outline:hover {
    border-color: var(--orange);
    color: var(--orange);
    transform: translateY(-2px);
}

.hero-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--orange);
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--gray);
    margin-top: 0.3rem;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-photo-wrapper {
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 3px solid var(--border);
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 60px rgba(255, 101, 0, 0.15);
}

.hero-photo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 11%;
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    color: var(--gray);
    font-size: 5rem;
}

/* ===========================
   SECTION BASE
=========================== */
section {
    padding: 5rem 5%;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: 0.9rem;
    color: var(--gray);
    max-width: 500px;
    margin: 0 auto;
}

/* ===========================
   SERVICES SECTION
=========================== */
#services {
    background: var(--bg-primary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem 1.5rem;
    transition: all 0.3s ease;
}

.service-card:hover {
    border-color: var(--orange);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 101, 0, 0.1);
}

.service-icon {
    font-size: 2.2rem;
    color: var(--orange);
    margin-bottom: 1rem;
}

.service-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
    color: var(--white);
}

.service-desc {
    font-size: 0.85rem;
    color: var(--gray);
    line-height: 1.7;
}

/* ===========================
   ABOUT ME SECTION
=========================== */
#about {
    background: var(--bg-card);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
}

.about-image-wrapper {
    position: relative;
}

.about-photo {
    width: 100%;
    max-width: 420px;
    border-radius: 10px;
    object-fit: cover;
    filter: grayscale(20%);
}

.about-photo-placeholder {
    width: 100%;
    max-width: 420px;
    aspect-ratio: 1/1;
    background: var(--bg-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    font-size: 6rem;
    border: 1px solid var(--border);
}

.about-text h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.about-role {
    font-size: 0.9rem;
    color: var(--orange);
    margin-bottom: 1.2rem;
    font-weight: 500;
}

.about-desc {
    font-size: 0.9rem;
    color: var(--gray);
    line-height: 1.9;
    margin-bottom: 1.5rem;
}

.about-skills {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.skill-circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.circle-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
}

.circle-wrapper svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.circle-bg {
    fill: none;
    stroke: var(--border);
    stroke-width: 6;
}

.circle-progress {
    fill: none;
    stroke: var(--orange);
    stroke-width: 6;
    stroke-linecap: round;
}

/* Animasi circle jalan saat about-text sudah masuk viewport (.visible) */
.about-text.visible .circle-progress {
    animation: circle-fill 1.5s ease forwards;
}

@keyframes circle-fill {
    from { stroke-dashoffset: 201.06; }
    to   { stroke-dashoffset: var(--target); }
}

.circle-percent {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--white);
}

.skill-name {
    font-size: 0.7rem;
    color: var(--gray);
    text-align: center;
}

/* Tools & Software */
.about-tools {
    max-width: 1100px;
    margin: 2.5rem auto 0;
}

.tools-label {
    font-size: 0.8rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    font-weight: 500;
    text-align: center;
}

.tools-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.tools-tags span {
    background: var(--bg-primary);
    border: 1px solid var(--orange);
    color: var(--orange);
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tools-tags span:hover {
    background: var(--orange);
    color: var(--white);
}

/* Skill Icon Cards */
.skill-icon-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.75rem;
}

.skill-icon-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem 0.6rem 0.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    text-align: center;
    transition: border-color 0.3s ease, transform 0.2s ease;
}

.skill-icon-card:hover {
    border-color: var(--orange);
    transform: translateY(-3px);
}

.skill-icon-wrap {
    width: 42px;
    height: 42px;
    background: rgba(255, 101, 0, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--orange);
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
}

.skill-icon-wrap img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    background: #fff;
    border-radius: 4px;
    padding: 2px;
}

.skill-icon-name {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--white);
    line-height: 1.3;
}

.skill-icon-level {
    font-size: 0.65rem;
    color: var(--gray);
    font-weight: 400;
}

/* ===========================
   PORTFOLIO SECTION
=========================== */
#portfolio {
    background: var(--bg-primary);
}

.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.45rem 1.2rem;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--gray);
    font-size: 0.85rem;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--orange);
    border-color: var(--orange);
    color: var(--white);
}

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

.portfolio-item {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-card);
    transition: all 0.3s ease;
    cursor: pointer;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    border-color: var(--orange);
    box-shadow: 0 10px 30px rgba(255, 101, 0, 0.1);
}

.portfolio-item.hidden {
    display: none;
}

.portfolio-empty {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    grid-column: 1 / -1;
    padding: 4rem 1rem;
    text-align: center;
}

.portfolio-empty i {
    font-size: 2.5rem;
    color: var(--orange);
    opacity: 0.5;
}

.portfolio-empty p {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--white);
    margin: 0;
}

.portfolio-empty span {
    font-size: 0.9rem;
    color: var(--gray);
}

.portfolio-thumb {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    display: block;
}

.portfolio-thumb-placeholder {
    width: 100%;
    aspect-ratio: 16/10;
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    font-size: 2rem;
    position: relative;
    overflow: hidden;
}

.portfolio-thumb-placeholder::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 60%, rgba(255,101,0,0.15));
}

.portfolio-info {
    padding: 1rem 1.2rem;
}

.portfolio-name {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.portfolio-category {
    font-size: 0.9rem;
    color: var(--orange);
}

/* ===========================
   CONTACT SECTION
=========================== */
#contact {
    background: var(--bg-card);
}

.contact-form {
    max-width: 700px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
    margin-bottom: 1.2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group input,
.form-group select,
.form-group textarea {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.8rem 1rem;
    color: var(--white);
    font-family: var(--font);
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
    outline: none;
    width: 100%;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #555;
}

.form-group select option {
    background: var(--bg-primary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--orange);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-submit {
    text-align: right;
    margin-top: 1rem;
}

.btn-send {
    background: var(--orange);
    color: var(--white);
    border: none;
    padding: 0.75rem 2.5rem;
    border-radius: 6px;
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-send:hover {
    background: var(--orange-dark);
    transform: translateY(-2px);
}

/* ===========================
   FOOTER
=========================== */
footer {
    background: #0a0a0a;
    padding: 3rem 5% 1.5rem;
    border-top: 1px solid var(--border);
}

.footer-top {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: start;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--orange);
}

.footer-logo-subtitle {
    font-size: 0.75rem;
    color: var(--gray);
    margin-top: 0.3rem;
}

.footer-nav {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.footer-nav a {
    font-size: 0.85rem;
    color: var(--gray);
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: var(--orange);
}

.footer-social {
    display: flex;
    gap: 0.8rem;
    justify-content: flex-end;
}

.footer-social a {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    border-color: var(--orange);
    color: var(--orange);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-contact-info {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-contact-info a {
    font-size: 0.8rem;
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.3s ease;
}

.footer-contact-info a:hover {
    color: var(--orange);
}

.footer-copy {
    font-size: 0.75rem;
    color: var(--gray);
}

/* ===========================
   ANIMATIONS
=========================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===========================
   RESPONSIVE — TABLET (≤900px)
=========================== */
@media (max-width: 900px) {
    section {
        padding: 4rem 5%;
    }

    /* Hero */
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-social,
    .hero-buttons,
    .hero-stats {
        justify-content: center;
    }

    .hero-image {
        order: -1;
    }

    .hero-photo-wrapper {
        width: 220px;
        height: 220px;
    }

    /* Services — 2 kolom di tablet */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* About */
    .about-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
    }

    .about-image-wrapper {
        display: flex;
        justify-content: center;
    }

    .about-photo-placeholder {
        max-width: 320px;
    }

    .skill-icon-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .about-skills {
        justify-content: center;
    }

    /* Portfolio */
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .portfolio-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 0.5rem;
        scrollbar-width: none; /* Firefox */
    }

    .portfolio-filters::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Edge */
    }

    .filter-btn {
        flex-shrink: 0;
    }

    /* Footer */
    .footer-top {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }

    .footer-nav {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .footer-social {
        justify-content: center;
    }
}

/* ===========================
   RESPONSIVE — MOBILE (≤600px)
=========================== */
@media (max-width: 600px) {
    section {
        padding: 3.5rem 4%;
    }

    /* Navbar */
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(17,17,17,0.98);
        flex-direction: column;
        padding: 1.2rem 1.5rem;
        gap: 1rem;
        border-bottom: 1px solid var(--border);
        z-index: 999;
    }

    .nav-links.open {
        display: flex;
    }

    .btn-hire-nav {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    /* Hero */
    .hero-photo-wrapper {
        width: 180px;
        height: 180px;
    }

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

    .hero-stats {
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    /* Services — tetap 2 kolom di mobile sesuai mockup */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .service-card {
        padding: 1.2rem 1rem;
    }

    .service-icon {
        font-size: 1.8rem;
    }

    /* About */
    .about-photo-placeholder {
        max-width: 260px;
        font-size: 4rem;
    }

    .skill-icon-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .about-text h2 {
        font-size: 1.3rem;
    }

    .about-skills {
        gap: 1rem;
    }

    .circle-wrapper {
        width: 68px;
        height: 68px;
    }

    /* Portfolio — 2 kolom di mobile sesuai mockup */
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .portfolio-name {
        font-size: 0.8rem;
    }

    /* Contact form — 1 kolom */
    .form-row {
        grid-template-columns: 1fr;
    }

    .form-submit {
        text-align: center;
    }

    .btn-send {
        width: 100%;
    }

    /* Footer */
    .footer-top {
        gap: 1.2rem;
    }

    .footer-nav {
        gap: 0.8rem;
        font-size: 0.8rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 0.8rem;
    }

    .footer-contact-info {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
}

/* ===========================
   RESPONSIVE — KECIL (≤380px)
=========================== */
@media (max-width: 380px) {
    .hero-title {
        font-size: 1.7rem;
    }

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

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

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn-primary,
    .btn-outline {
        width: 100%;
        justify-content: center;
    }
}

/* ===========================
   PORTFOLIO MODAL
=========================== */
.portfolio-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.portfolio-modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.portfolio-modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    max-width: 860px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.3s ease;
    scrollbar-width: thin;
    scrollbar-color: var(--orange) transparent;
}

.portfolio-modal-overlay.open .portfolio-modal {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    background: none;
    border: none;
    color: var(--gray);
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
    z-index: 10;
}

.modal-close:hover {
    color: var(--orange);
}

.modal-header {
    position: relative;
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid var(--border);
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.modal-meta {
    font-size: 0.8rem;
    color: var(--orange);
}

.modal-body {
    padding: 1.5rem;
}

.modal-desc {
    font-size: 0.88rem;
    color: var(--gray);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.modal-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.modal-gallery img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.modal-gallery img:hover {
    transform: scale(1.02);
    border-color: var(--orange);
}

.modal-gallery img:first-child:nth-last-child(odd) {
    grid-column: 1 / -1;
}

@media (max-width: 600px) {
    .modal-gallery {
        grid-template-columns: 1fr;
    }
}

/* ===========================
   LIGHTBOX
=========================== */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.lightbox-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.lightbox-overlay img {
    max-width: 92vw;
    max-height: 92vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 0 60px rgba(0,0,0,0.8);
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.lightbox-close:hover {
    color: var(--orange);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,101,0,0.15);
    border: 1px solid rgba(255,101,0,0.3);
    border-radius: 50%;
    color: #fff;
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255,101,0,0.4);
}

.lightbox-counter {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
}

.modal-gallery img {
    cursor: zoom-in;
}
