@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600&family=Inter:wght@400;500&display=swap');

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #080808;
    --surface: #111111;
    --surface-hover: #191919;
    --text: #ffffff;
    --text-dim: rgba(255, 255, 255, 0.52);
    --text-muted: rgba(255, 255, 255, 0.35);
    --border: rgba(255, 255, 255, 0.06);
    --gap: 5px;
    --radius: 9px;
}

html,
body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

#main {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 160px 40px;
    min-height: 100vh;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 44px;
    width: 480px;
}

/* ─── Header ─── */
.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.name {
    font-size: 26px;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--text);
}

.title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dim);
    letter-spacing: 0.01em;
}

/* ─── Section ─── */
.section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.section-title {
    font-size: 17px;
    font-weight: 500;
    color: var(--text);
    letter-spacing: -0.01em;
}

/* ─── Experience grid ─── */
.exp-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--gap);
    width: 100%;
}

.exp-cell {
    height: 54px;
    background: var(--surface);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background 0.2s;
    cursor: pointer;
}

.exp-svg {
    color: var(--text);
    opacity: 0.2;
    transition: opacity 0.2s;
}

.exp-cell:hover .exp-svg {
    opacity: 0.45;
}

/* ─── List items ─── */
.list-grid {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
    width: 100%;
}

.list-item {
    height: 46px;
    background: var(--surface);
    border-radius: var(--radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    text-decoration: none;
    transition: background 0.2s;
    cursor: pointer;
}

.list-item:hover {
    background: var(--surface-hover);
}

.list-item-name {
    font-size: 17px;
    font-weight: 500;
    color: var(--text-dim);
    letter-spacing: -0.01em;
}

.list-item-meta {
    font-size: 14px;
    color: var(--text-muted);
}

/* ─── Fonts section ─── */
.font-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap);
    width: 100%;
}

.font-item {
    height: 76px;
    background: var(--surface);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
    transition: background 0.2s;
}

.font-item:hover {
    background: var(--surface-hover);
}

.font-label {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.2s;
}

.font-item:hover .font-label {
    color: var(--text-dim);
}

.font-montserrat {
    font-family: 'Montserrat', sans-serif;
}

.font-inter {
    font-family: 'Inter', sans-serif;
}

.font-gilroy {
    font-family: 'Gilroy', 'Montserrat', sans-serif;
    font-weight: 600;
}

.font-garamond {
    font-family: 'Apple Garamond', 'Garamond', 'EB Garamond', Georgia, serif;
    font-weight: 400;
    font-style: italic;
}

/* ─── Work section ─── */
.work-tall {
    height: 248px;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    display: block;
    text-decoration: none;
    cursor: pointer;
}

.work-tall img,
.work-tall video,
.work-short img,
.work-short video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    image-rendering: -webkit-optimize-contrast;
}

.work-tall:hover img,
.work-tall:hover video,
.work-short:hover img,
.work-short:hover video {
    opacity: 0.7;
    transform: scale(1.02);
}

.work-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap);
    width: 100%;
}

.work-short {
    height: 138px;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    display: block;
    text-decoration: none;
    cursor: pointer;
}

/* ─── Testimonials ─── */
.testimonial-grid {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
    width: 100%;
}

.testimonial-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: background 0.2s;
}

.testimonial-card:hover {
    background: var(--surface-hover);
}

.testimonial-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.testimonial-pfp {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--surface-hover);
}

.testimonial-pfp-fallback {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--surface-hover);
}

.testimonial-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.testimonial-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dim);
    letter-spacing: -0.01em;
}

.testimonial-company {
    font-size: 12px;
    color: var(--text-muted);
}

.testimonial-text {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ─── Contact ─── */
.contact-grid {
    display: flex;
    flex-direction: row;
    gap: var(--gap);
    width: 100%;
    align-items: stretch;
}

.contact-item-x {
    flex: 1;
    height: 46px;
    background: var(--surface);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
}

.contact-item-x:hover {
    background: var(--surface-hover);
}

.contact-item-email {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    background: var(--surface);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
}

.contact-item-email:hover {
    background: var(--surface-hover);
}

.contact-svg {
    color: var(--text);
    opacity: 0.28;
    transition: opacity 0.2s;
}

.contact-item-x:hover .contact-svg,
.contact-item-email:hover .contact-svg {
    opacity: 0.55;
}

/* ─── Lightbox ─── */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1), background 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.lightbox-overlay.open {
    opacity: 1;
    pointer-events: all;
    background: rgba(0, 0, 0, 0.88);
}

.lightbox-inner {
    position: relative;
    max-width: 90vw;
    max-height: 88vh;
    transform: scale(0.85) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lightbox-overlay.open .lightbox-inner {
    transform: scale(1) translateY(0);
}

.lightbox-inner img,
.lightbox-inner video {
    display: block;
    max-width: 90vw;
    max-height: 84vh;
    width: auto;
    height: auto;
    border-radius: 10px;
    object-fit: contain;
    outline: none;
}

.lightbox-close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 32px;
    height: 32px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
    z-index: 10;
}

.lightbox-close:hover {
    background: var(--surface-hover);
}

.lightbox-close iconify-icon {
    color: var(--text);
    font-size: 20px;
    opacity: 0.5;
    transition: opacity 0.15s, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lightbox-close:hover iconify-icon {
    opacity: 0.85;
    transform: scale(1.1) rotate(90deg);
}

/* make work tiles look clickable */
[data-lightbox] {
    cursor: pointer;
}

/* ─── Responsive ─── */
@media (max-width: 620px) {
    #main {
        padding: 60px 20px;
    }

    .container {
        width: 100%;
    }

    .exp-grid {
        grid-template-columns: repeat(3, 1fr);
    }

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

/* ─── Forms ─── */
input[type="text"] {
    width: 100%;
    height: 46px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0 16px;
    color: var(--text);
    font-family: inherit;
    font-size: 15px;
    outline: none;
    transition: background 0.2s, border-color 0.2s;
}

input[type="text"]::placeholder {
    color: var(--text-muted);
}

input[type="text"]:focus {
    background: var(--surface-hover);
    border-color: rgba(255, 255, 255, 0.15);
}

/* ─── Webhook Proxy Elements ─── */
.back-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 10px;
}

.back-icon {
    color: var(--text-dim);
    transition: color 0.2s;
}

.back-link:hover .back-icon {
    color: var(--text);
}

.section-desc {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 4px;
    line-height: 1.5;
}

.output-box {
    margin-top: 6px;
    cursor: default !important;
}

.output-text {
    font-size: 14px;
    user-select: all;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 88%;
}

.copy-btn {
    cursor: pointer;
    color: var(--text-dim);
    transition: color 0.2s;
}

.copy-btn:hover {
    color: var(--text);
}

.copy-btn.success {
    color: var(--text) !important;
}