:root {
    --bg-dark: #0f172a;
    --bg-dark-2: #1e293b;
    --bg-light: #f8fafc;
    --card: rgba(255, 255, 255, 0.08);
    --text: #e5e7eb;
    --text-dark: #1f2937;
    --muted: #94a3b8;
    --accent: #d4a85f;
    --accent-2: #f0c987;
    --white: #ffffff;
    --shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
    --radius-xl: 28px;
    --radius-lg: 18px;
    --radius-md: 14px;
    --max: 1200px;
    --transition: 0.28s ease;
}

* {
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
        sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

img {
    max-width: 100%;
    display: block;
}
a {
    text-decoration: none;
    color: inherit;
}
button {
    font: inherit;
}

.container {
    width: min(calc(100% - 2rem), var(--max));
    margin: 0 auto;
}

.section {
    padding: 5rem 0;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
    margin: 0 0 0.8rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.section-subtitle {
    max-width: 640px;
    color: #475569;
    margin: 0 0 2rem;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(14px);
    background: rgba(15, 23, 42, 0.76);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    overflow: visible;
}

.site-header::after {
    content: '';
    position: absolute;
    left: -5%;
    bottom: -28px;
    width: 110%;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    pointer-events: none;
    z-index: 0;
}

.nav {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 78px;
    gap: 1rem;
}

.hero::after {
    content: none;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--white);
    font-weight: 800;
    letter-spacing: 0.04em;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    place-items: center;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: var(--bg-dark);
    box-shadow: var(--shadow);
}

.brand-mark .brand-d {
    color: #ffffff;
    margin-right: 1px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
}

.nav-links a {
    position: relative;
    padding: 0.4rem 0;
    transition: color var(--transition);
}

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

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

.menu-btn {
    display: none;
    border: 0;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
    cursor: pointer;
}

.hero {
    position: relative;
    overflow: hidden;
    background: radial-gradient(
            circle at top left,
            rgba(212, 168, 95, 0.18),
            transparent 30%
        ),
        radial-gradient(
            circle at 85% 20%,
            rgba(255, 255, 255, 0.12),
            transparent 25%
        ),
        linear-gradient(135deg, var(--bg-dark), var(--bg-dark-2));
    color: var(--text);
    padding: 4rem 0 1;
}

.hero::after {
    content: '';
    position: absolute;
    left: -10%;
    bottom: -70px;
    width: 120%;
    height: 120px;
    border-radius: 50%;
    background: var(--bg-light);
    z-index: 0;
}

.hero::after {
    bottom: -70px;
}

.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 3rem;
    min-height: calc(100vh - 175px);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent-2);
    font-size: 0.92rem;
    margin-bottom: 1rem;
}

.hero h1 {
    margin: 0;
    font-size: clamp(2.8rem, 6vw, 5.4rem);
    line-height: 0.95;
    letter-spacing: -0.05em;
}

.hero h1 span {
    color: var(--accent);
}

.hero p {
    max-width: 620px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.06rem;
    margin: 1.25rem 0 2rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.4rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    min-height: 52px;
    padding: 0.9rem 1.4rem;
    border-radius: 14px;
    font-weight: 700;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition),
        background var(--transition);
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: var(--bg-dark);
    box-shadow: 0 18px 28px rgba(212, 168, 95, 0.22);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.18);
    color: var(--white);
}

.hero-socials {
    display: flex;
    gap: 0.8rem;
}

.social-link {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    transition: transform var(--transition), background var(--transition);
}

.social-link:hover {
    transform: translateY(-3px);
    background: rgba(212, 168, 95, 0.18);
}

.hero-visual {
    position: relative;
}

.hero-card {
    position: relative;
    border-radius: 32px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow);
    min-height: 620px;
}

.hero-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.floating-card {
    position: absolute;
    left: -2rem;
    bottom: 2rem;
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: white;
    padding: 1rem 1.1rem;
    border-radius: 18px;
    box-shadow: var(--shadow);
    max-width: 260px;
    backdrop-filter: blur(10px);
    animation: float 5s ease-in-out infinite;
}

.floating-card strong {
    display: block;
    color: var(--accent-2);
    margin-bottom: 0.2rem;
}

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

.about-grid,
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: center;
}

.about-list {
    display: grid;
    gap: 1rem;
    margin-top: 2rem;
}

.about-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.about-icon {
    min-width: 38px;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(212, 168, 95, 0.14);
    color: #9a6c20;
    font-weight: 800;
}

.image-card {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow);
    min-height: 500px;
}

.image-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.image-card:hover img {
    transform: scale(1.04);
}

.dark-band {
    background: linear-gradient(135deg, var(--bg-dark), var(--bg-dark-2));
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.dark-band::before,
.dark-band::after {
    content: '';
    position: absolute;
    left: -10%;
    width: 120%;
    height: 120px;
    border-radius: 50%;
    background: var(--bg-light);
}

.dark-band::before {
    top: -70px;
}
.dark-band::after {
    bottom: -70px;
}

.timeline {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.timeline-card,
.skill-card,
.project-card,
.contact-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 1.4rem;
    box-shadow: var(--shadow);
    backdrop-filter: blur(8px);
    transition: transform var(--transition), border-color var(--transition);
}

.timeline-card:hover,
.skill-card:hover,
.project-card:hover,
.contact-card:hover {
    transform: translateY(-4px);
    border-color: rgba(212, 168, 95, 0.35);
}

.timeline-head {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 0.8rem;
}

.timeline-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: rgba(212, 168, 95, 0.15);
    color: var(--accent-2);
    font-weight: 800;
    flex-shrink: 0;
}

.timeline-card h3,
.skill-card h3,
.project-card h3 {
    margin: 0;
    font-size: 1.35rem;
}

.timeline-meta {
    color: var(--accent-2);
    font-weight: 700;
    margin-top: 0.2rem;
    font-size: 0.96rem;
}

.timeline-card p {
    margin: 0.7rem 0 0;
    color: rgba(255, 255, 255, 0.78);
}

.skills-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2rem;
    align-items: start;
}

.skills-grid,
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.skill-card,
.project-card,
.contact-card {
    background: white;
    border: 1px solid #e5e7eb;
    color: var(--text-dark);
}

.skill-icon,
.project-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(
        135deg,
        rgba(212, 168, 95, 0.18),
        rgba(212, 168, 95, 0.32)
    );
    color: #8b5e16;
    font-weight: 800;
    margin-bottom: 1rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 220px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag {
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    font-size: 0.82rem;
    background: #f1f5f9;
    color: #334155;
    font-weight: 600;
}

.bars {
    margin-top: 2rem;
    display: grid;
    gap: 1rem;
}

.bar-item {
    display: grid;
    gap: 0.5rem;
}

.bar-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-weight: 700;
}

.bar-track {
    height: 12px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transition: width 1.2s ease;
}

.contact-panel {
    background: linear-gradient(135deg, var(--bg-dark), var(--bg-dark-2));
    color: white;
    border-radius: 28px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.contact-list {
    display: grid;
    gap: 1rem;
    margin: 1.5rem 0 2rem;
}

.contact-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    color: rgba(255, 255, 255, 0.88);
}

.contact-row .icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent-2);
    flex-shrink: 0;
}

.contact-form {
    display: grid;
    gap: 1rem;
}

.field {
    display: grid;
    gap: 0.45rem;
}

.field input,
.field textarea {
    width: 100%;
    border: 1px solid #dbe2ea;
    background: white;
    padding: 0.95rem 1rem;
    border-radius: 14px;
    outline: none;
    font: inherit;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.field input:focus,
.field textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(212, 168, 95, 0.12);
}

.footer {
    padding: 2rem 0 3rem;
    text-align: center;
    color: #64748b;
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
/******************
    GALERY
*******************/
.gallery-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin: 1.5rem 0 2rem;
}

.gallery-filter-btn {
    border: 1px solid #dbe2ea;
    background: white;
    color: var(--text-dark);
    padding: 0.8rem 1.1rem;
    border-radius: 999px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
}

.gallery-filter-btn:hover,
.gallery-filter-btn.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: var(--bg-dark);
    border-color: transparent;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.gallery-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition),
        opacity var(--transition);
}

.gallery-card:hover {
    transform: translateY(-4px);
}

.gallery-card.hidden {
    display: none;
}

.gallery-media {
    position: relative;
    min-height: 240px;
    overflow: hidden;
    background: #0f172a;
}

.gallery-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-video-thumb .gallery-play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 3rem;
    color: white;
    background: rgba(15, 23, 42, 0.28);
}

.gallery-content {
    padding: 1.1rem 1.1rem 1.2rem;
}

.gallery-content h3 {
    margin: 0.4rem 0 0.35rem;
    font-size: 1.2rem;
}

.gallery-content p {
    margin: 0;
    color: #64748b;
}

.gallery-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(212, 168, 95, 0.16);
    color: #9a6c20;
    font-size: 0.82rem;
    font-weight: 700;
}

.gallery-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
}

.gallery-modal.open {
    display: block;
}

.gallery-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(6px);
}

.gallery-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(92vw, 980px);
    margin: 4vh auto;
    background: #0f172a;
    color: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

.gallery-modal-close {
    position: absolute;
    top: 0.9rem;
    right: 0.9rem;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 2;
}

.gallery-modal-media {
    position: relative;
    background: #020617;
    min-height: 520px;
}

.gallery-modal-media img,
.gallery-modal-media iframe,
.gallery-modal-media video {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
}

.gallery-modal-media img {
    object-fit: contain;
    background: #020617;
}

.gallery-modal-media iframe,
.gallery-modal-media video {
    min-height: 520px;
}

.gallery-modal-info {
    padding: 1.3rem 1.4rem 1.5rem;
}

.gallery-modal-info h3 {
    margin: 0 0 0.35rem;
    font-size: 1.4rem;
}

.gallery-modal-info p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.gallery-card {
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
    background: #0f172a;
}

.gallery-card:hover {
    transform: translateY(-4px);
}

.gallery-card.hidden {
    display: none;
}

.gallery-media {
    position: relative;
    min-height: 260px;
    overflow: hidden;
}

.gallery-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-video-thumb .gallery-play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 3rem;
    color: white;
    background: rgba(15, 23, 42, 0.28);
}

body.modal-open {
    overflow: hidden;
}

.scroll-top-btn {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 56px;
    height: 56px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: var(--bg-dark);
    font-size: 1.6rem;
    font-weight: 800;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.22);
    cursor: pointer;
    z-index: 1200;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity var(--transition), transform var(--transition),
        visibility var(--transition);
}

.scroll-top-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    transform: translateY(-3px);
}

@media (max-width: 640px) {
    .scroll-top-btn {
        right: 16px;
        bottom: 16px;
        width: 50px;
        height: 50px;
        font-size: 1.4rem;
    }
}

@media (max-width: 980px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    .gallery-media {
        min-height: 160px;
    }
}

@media (max-width: 1080px) {
    .hero-grid,
    .about-grid,
    .contact-grid,
    .skills-layout {
        grid-template-columns: 1fr;
    }

    .hero-card {
        min-height: 520px;
    }

    .floating-card {
        left: 1rem;
    }
}

@media (max-width: 820px) {
    .menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .nav-links {
        position: absolute;
        top: calc(100% + 0.75rem);
        right: 0;
        left: 0;
        background: rgba(15, 23, 42, 0.98);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 18px;
        padding: 1rem;
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.9rem;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.28);
        z-index: 2000;
    }

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

    .nav-links a {
        width: 100%;
        padding: 0.35rem 0;
    }

    .timeline,
    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding-top: 2rem;
    }

    .hero-grid {
        min-height: auto;
    }
}

@media (max-width: 560px) {
    .container {
        width: min(calc(100% - 1.2rem), var(--max));
    }

    .section {
        padding: 4rem 0;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        width: 100%;
    }

    .hero-card {
        min-height: 420px;
    }

    .floating-card {
        position: static;
        margin-top: 1rem;
        max-width: none;
    }

    .contact-panel,
    .timeline-card,
    .skill-card,
    .project-card,
    .contact-card {
        padding: 1.1rem;
    }
}

.menu-btn {
    display: none;
    border: 0;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
    cursor: pointer;
}

@media (max-width: 820px) {
    .menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .nav-links {
        position: absolute;
        top: calc(100% + 0.6rem);
        right: 1rem;
        left: 1rem;
        background: rgba(15, 23, 42, 0.96);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 18px;
        padding: 1rem;
        display: none;
        flex-direction: column;
        align-items: flex-start;
        box-shadow: var(--shadow);
        z-index: 1200;
    }

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