* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

:root {
    --bg-gradient: linear-gradient(145deg, rgba(255, 237, 239, 1) 0%, rgba(255, 255, 255, 1) 42%, rgba(255, 237, 239, 1) 100%);
    --card-bg: rgba(255, 255, 255, 0.98);
    --glass-bg: rgba(255, 255, 255, 0.95);
    --text-main: #1d1d1f;
    --text-muted: #86868b;
    --accent-red: rgba(255, 58, 58, 0.16);
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    --radius: clamp(18px, 4vw, 32px);
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --page-gutter: clamp(16px, 4vw, 24px);
    --mobile-max-width: calc(100vw - 34px);
    --section-gap: clamp(14px, 3vw, 24px);
}

html {
    min-height: 100%;
}

body {
    position: relative;
    background: var(--bg-gradient);
    background-attachment: fixed;
    background-size: 400% 400%;
    animation: gradientFlow 20s ease infinite;
    min-height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: env(safe-area-inset-top, 10px) 10px env(safe-area-inset-bottom, 14px);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.5;
    /* Hide scrollbar for IE, Edge and Firefox */
    -ms-overflow-style: none;
    scrollbar-width: none;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(circle at top left, rgba(255, 80, 80, 0.18), transparent 18%),
        radial-gradient(circle at top right, rgba(255, 80, 80, 0.16), transparent 18%),
        radial-gradient(circle at bottom left, rgba(255, 80, 80, 0.14), transparent 18%),
        radial-gradient(circle at bottom right, rgba(255, 80, 80, 0.12), transparent 18%),
        repeating-linear-gradient(60deg, rgba(255, 255, 255, 0.08) 0, rgba(255, 255, 255, 0.08) 1px, transparent 1px, transparent 30px),
        repeating-linear-gradient(120deg, rgba(255, 255, 255, 0.08) 0, rgba(255, 255, 255, 0.08) 1px, transparent 1px, transparent 30px),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0, rgba(255, 255, 255, 0.08) 1px, transparent 1px, transparent 30px);
    background-size: cover, cover, cover, cover, 72px 124px, 72px 124px, 72px 124px;
    background-position: top left, top right, bottom left, bottom right, 0 0, 0 0, 0 0;
    background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, repeat, repeat, repeat;
    opacity: 0.22;
    z-index: -1;
    animation: hexDrift 22s linear infinite;
}

@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes hexDrift {
    0% {
        background-position: top left, top right, bottom left, bottom right, 0 0, 0 0, 0 0;
    }
    50% {
        background-position: top left, top right, bottom left, bottom right, 24px 12px, -24px 10px, 16px -14px;
    }
    100% {
        background-position: top left, top right, bottom left, bottom right, 0 0, 0 0, 0 0;
    }
}

/* Hide scrollbar for Chrome, Safari and Opera */
::-webkit-scrollbar {
    display: none;
}

.profile-container {
    background: var(--card-bg);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: none;
    width: min(520px, var(--mobile-max-width));
    max-width: 760px;
    min-height: calc(100vh - env(safe-area-inset-top, 18px) - env(safe-area-inset-bottom, 20px));
    max-height: calc(100vh - env(safe-area-inset-top, 18px) - env(safe-area-inset-bottom, 20px));
    height: auto;
    border-radius: var(--radius);
    padding: calc(var(--page-gutter) + env(safe-area-inset-top, 12px)) calc(var(--page-gutter) - 4px) calc(var(--page-gutter) + env(safe-area-inset-bottom, 18px)) calc(var(--page-gutter) - 4px);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
    transition: var(--transition);
    margin: env(safe-area-inset-top, 22px) auto env(safe-area-inset-bottom, 22px);
}

.profile-stack {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--section-gap);
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding-bottom: clamp(26px, 5vw, 34px);
}

.brand-strip {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding-bottom: 18px;
}

.profile-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: clamp(10px, 1.4vw, 14px);
    width: 100%;
    min-height: 0;
    margin-bottom: clamp(26px, 6vw, 36px);
}

.profile-avatar {
    width: clamp(58px, 14vw, 76px);
    height: clamp(58px, 14vw, 76px);
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 58, 58, 0.18);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.profile-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    overflow: hidden;
    align-items: center;
    text-align: center;
}

h1 {
    font-size: clamp(0.95rem, 3.4vw, 1.12rem);
    font-weight: 700;
    letter-spacing: 0.01em;
    margin: 0;
    line-height: 1.05;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.subtitle {
    color: var(--text-muted);
    font-size: clamp(0.72rem, 2.4vw, 0.86rem);
    margin: 0;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(10px, 1.2vw, 14px);
    flex-wrap: wrap;
    padding: clamp(12px, 3vw, 16px) clamp(18px, 4vw, 22px);
    width: 100%;
    max-width: calc(100% - 4px);
    margin: 0 auto calc(clamp(24px, 5vw, 28px) + env(safe-area-inset-bottom, 12px));
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 58, 58, 0.12);
    border-radius: 22px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
    position: static;
}

.contact-icon {
    width: clamp(38px, 10vw, 44px);
    height: clamp(38px, 10vw, 44px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.92);
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
    font-size: 0.95rem;
    box-shadow: inset 0 0 0 0 rgba(255, 58, 58, 0.06);
    text-decoration: none;
}

.contact-icon:hover {
    transform: translateY(-1px);
    background: rgba(255, 58, 58, 0.12);
    color: #ff3a3a;
}

.brand-logo {
    width: auto;
    height: clamp(42px, 8vw, 54px);
    object-fit: contain;
    filter: opacity(0.95);
}

.icon-btn-light:hover {
    background: #f2f2f2;
}

.section-title {
    width: 100%;
    font-size: clamp(0.68rem, 1.2vw, 0.82rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    margin: 0 0 10px;
    text-align: center;
    color: rgba(29, 29, 31, 0.58);
}

@media (min-width: 720px) {
    .section-title {
        text-align: left;
    }

    .contact-row {
        margin: 10px auto 22px;
        padding: 16px 18px;
        max-width: 560px;
    }
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(12px, 1.5vw, 16px);
    margin-top: clamp(16px, 3vw, 20px);
    margin-bottom: 26px;
}

.portfolio-card,
.link-item {
    text-decoration: none;
    color: inherit;
}

.portfolio-card {
    display: grid;
    grid-template-rows: 1fr auto;
    background: #ffffff;
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid rgba(255, 58, 58, 0.16);
    aspect-ratio: 11 / 10;
    min-height: 104px;
}

.portfolio-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.08);
}

.portfolio-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portfolio-info {
    padding: 12px 14px 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.portfolio-name {
    font-size: clamp(0.9rem, 1.2vw, 1rem);
    font-weight: 600;
    color: var(--text-main);
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(10px, 1.4vw, 16px);
    margin-top: clamp(18px, 3vw, 22px);
    margin-bottom: 28px;
}

.link-item {
    width: 100%;
    background: #ffffff;
    padding: clamp(12px, 1.6vw, 16px);
    border-radius: calc(var(--radius) - 4px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    color: var(--text-main);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    border: 1px solid rgba(255, 58, 58, 0.14);
    aspect-ratio: 4 / 3.2;
    min-height: 64px;
    max-height: 80px;
    position: relative;
    overflow: hidden;
}

.link-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.09);
    background: #ffffff;
}

.link-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    justify-content: center;
}

.link-title {
    font-size: clamp(0.9rem, 1.3vw, 1rem);
    font-weight: 600;
}

.link-subtitle {
    font-size: clamp(0.72rem, 1.1vw, 0.86rem);
    color: var(--text-muted);
    line-height: 1.4;
}

@media (min-width: 720px) {
    .profile-container {
        width: min(100%, 1040px);
        max-width: 1080px;
        min-height: auto;
        height: auto;
        padding: clamp(20px, 3vw, 30px);
        border: 1px solid rgba(255, 255, 255, 0.72);
        border-radius: 32px;
    }

    .profile-stack {
        grid-template-columns: minmax(280px, 360px) minmax(420px, 1fr);
        grid-template-areas:
            "brand-strip brand-strip"
            "profile-block portfolio-section"
            "quick-section quick-section"
            "contact-row contact-row";
        gap: 16px;
        padding-bottom: 0;
    }

    .brand-strip {
        grid-area: brand-strip;
        padding-bottom: 0;
    }

    .brand-logo {
        height: clamp(48px, 4vw, 72px);
        width: auto;
    }

    .profile-block {
        grid-area: profile-block;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        gap: 14px;
        padding: 16px;
        background: rgba(255, 255, 255, 0.72);
        border-radius: 24px;
        border: 1px solid rgba(255, 255, 255, 0.68);
        text-align: left;
    }

    .profile-copy {
        align-items: flex-start;
        text-align: left;
    }

    .contact-row {
        position: static;
        grid-area: contact-row;
        width: auto;
        padding: 0;
        gap: 8px;
        justify-content: center;
        background: transparent;
        backdrop-filter: none;
        border-top: none;
        margin: 0 auto;
    }

    .portfolio-section {
        grid-area: portfolio-section;
    }

    .quick-section {
        grid-area: quick-section;
    }

    .portfolio-grid {
        gap: 14px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .portfolio-card {
        min-height: 128px;
        border-radius: 20px;
    }

    .portfolio-info {
        padding: 14px 16px 16px;
    }

    .quick-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
    }

    .link-item {
        min-height: 74px;
        max-height: 82px;
        padding: 10px 12px;
    }

    .profile-avatar {
        width: clamp(64px, 9vw, 84px);
        height: clamp(64px, 9vw, 84px);
    }

    .contact-icon {
        width: 44px;
        height: 44px;
    }
}

@media (min-width: 960px) {
    .profile-stack {
        grid-template-columns: minmax(300px, 380px) minmax(500px, 1fr);
        gap: 22px;
    }

    .profile-container {
        width: min(100%, 1100px);
        max-width: 1140px;
        padding: clamp(24px, 2vw, 36px);
    }

    .quick-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 18px;
    }

    .link-item {
        min-height: 104px;
    }

    .section-title {
        margin-bottom: 14px;
        font-size: 0.82rem;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    padding: env(safe-area-inset-top, 20px) 20px env(safe-area-inset-bottom, 20px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 900px;
    max-height: 95vh;
    border-radius: var(--radius);
    padding: 0;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 58, 58, 0.14);
    transform: translateY(20px);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    overflow: hidden;
    position: relative;
}


.modal-overlay.active .modal-content {
    transform: translateY(0);
}

/* Contact Modal Styles */
.modal-contact {
    max-width: min(540px, calc(100vw - 32px));
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 320px;
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 18px 0;
}

.modal-header h3 {
    font-size: clamp(1.2rem, 2vw, 1.4rem);
    margin: 0;
}

.modal-header-subtitle {
    margin: 4px 0 0;
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.45;
}

.close-modal-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(223, 225, 230, 0.85);
    background: rgba(255, 255, 255, 0.94);
    color: #444;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 18px 0;
    overflow-y: auto;
    min-height: 0;
}

.contact-profile {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    padding: 16px 16px 14px;
    border-radius: 22px;
    background: rgba(255, 245, 245, 0.85);
    border: 1px solid rgba(255, 58, 58, 0.12);
}

.contact-profile h4 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.contact-role {
    margin: 0;
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.contact-card {
    background: #ffffff;
    border-radius: 22px;
    padding: 14px 14px;
    border: 1px solid rgba(255, 58, 58, 0.12);
    box-shadow: 0 10px 24px rgba(25, 34, 67, 0.08);
}

.contact-details-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-location-card {
    background: linear-gradient(180deg, rgba(255, 250, 250, 1), rgba(255, 239, 239, 1));
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(224, 224, 224, 0.45);
}

.info-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.info-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(255, 58, 58, 0.12);
    color: #ff3a3a;
    font-size: 1rem;
    flex-shrink: 0;
}

.info-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    word-break: break-word;
}

.info-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.info-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.45;
}

.modal-footer {
    padding: 14px 18px 18px;
    background: #fff;
}

.save-btn {
    width: 100%;
    padding: 14px 0;
    font-size: 0.95rem;
    border-radius: 14px;
}

/* Responsive Media Queries */

@media (max-width: 720px) {
    .modal-overlay#contactModal {
        padding: env(safe-area-inset-top, 14px) 12px calc(env(safe-area-inset-bottom, 22px) + 4px);
        align-items: stretch;
        justify-content: flex-end;
    }

    .modal-overlay#contactModal .modal-content {
        max-width: 100%;
        max-height: calc(100vh - env(safe-area-inset-top, 14px) - env(safe-area-inset-bottom, 22px) - 8px);
        width: 100%;
        border-radius: 24px 24px 0 0;
        box-shadow: 0 18px 46px rgba(0, 0, 0, 0.18);
        overflow: hidden;
        display: flex;
        flex-direction: column;
        margin: 0 auto;
    }

    .modal-contact {
        max-width: 100%;
        padding: 0;
        min-height: auto;
        height: auto;
        display: flex;
        flex-direction: column;
        max-height: calc(100vh - env(safe-area-inset-top, 14px) - env(safe-area-inset-bottom, 22px) - 8px);
    }

    .modal-overlay#contactModal .modal-header {
        padding: 18px 18px 0;
        margin-bottom: 0;
    }

    .contact-profile {
        padding: 16px 16px 14px;
        gap: 6px;
    }

    .contact-profile h4 {
        font-size: 1rem;
        line-height: 1.2;
    }

    .contact-role {
        font-size: 0.8rem;
        line-height: 1.4;
    }

    .modal-drag-handle {
        display: block;
    }

    .modal-body {
        padding: 14px 18px 0;
    }

    .info-item {
        gap: 10px;
        padding-bottom: 10px;
    }

    .info-label {
        font-size: 0.78rem;
        line-height: 1.4;
    }

    .info-value {
        font-size: 0.92rem;
        line-height: 1.4;
    }

    .modal-overlay#contactModal .modal-footer {
        padding: 14px 18px 18px;
    }

    .save-btn {
        width: 100%;
        padding: 14px 0;
        font-size: 0.95rem;
    }

    .modal-overlay#contactModal .modal-content::after {
        content: '';
        display: block;
        height: env(safe-area-inset-bottom, 12px);
        width: 100%;
    }
}

@media (max-width: 520px) {
    .profile-container {
        width: min(520px, calc(100vw - 24px));
        padding-left: 14px;
        padding-right: 14px;
        padding-top: 14px;
        margin-top: calc(env(safe-area-inset-top, 14px) + 4px);
        margin-bottom: calc(env(safe-area-inset-bottom, 14px) + 4px);
    }

    .profile-stack {
        padding-bottom: clamp(16px, 4vw, 24px);
    }

    .brand-strip {
        padding-bottom: 8px;
    }

    .profile-block {
        margin-bottom: 12px;
        gap: clamp(6px, 4vw, 10px);
    }

    .profile-avatar {
        width: clamp(50px, 17vw, 68px);
        height: clamp(50px, 17vw, 68px);
    }

    .profile-copy {
        gap: 3px;
    }

    .portfolio-grid {
        gap: clamp(10px, 4vw, 14px);
        margin-top: 0;
    }

    .portfolio-card {
        min-height: 100px;
    }

    .quick-grid {
        gap: clamp(8px, 4vw, 12px);
        margin-top: clamp(12px, 4vw, 16px);
        margin-bottom: 24px;
    }

    .link-item {
        min-height: 70px;
        padding: clamp(12px, 4vw, 14px);
    }

    .contact-row {
        padding: clamp(10px, 3vw, 14px) clamp(14px, 4vw, 16px);
        gap: clamp(8px, 3vw, 12px);
        max-width: calc(100% - 12px);
    }

    .section-title {
        margin-bottom: 14px;
    }

    .modal-overlay#contactModal .modal-content {
        padding: 0;
    }

    .modal-contact {
        padding: 12px 12px 10px;
        min-height: auto;
        height: auto;
    }

    .contact-profile {
        margin-bottom: 10px;
        gap: 6px;
    }

    .contact-profile h4 {
        font-size: 0.98rem;
    }

    .contact-role {
        font-size: 0.78rem;
    }

    .contact-chip {
        padding: 5px 10px;
        font-size: 0.72rem;
    }

    .contact-info-grid {
        gap: 10px;
        margin-bottom: 10px;
    }

    .contact-info-card {
        padding: 12px 10px;
        border-radius: 18px;
    }

    .info-item {
        gap: 10px;
        margin-bottom: 10px;
    }

    .info-label,
    .info-text span {
        font-size: 0.82rem;
        line-height: 1.3;
    }

    .info-text {
        gap: 4px;
    }

    .modal-overlay#contactModal .modal-footer {
        padding: 10px 0 0;
        gap: 10px;
        margin-top: auto;
    }

    .save-btn {
        width: 100%;
        padding: 12px 0;
        font-size: 0.92rem;
    }

    .viewer-header {
        position: absolute;
        top: 14px;
        right: 14px;
        bottom: auto;
        z-index: 2200;
    }

    .fullscreen-overlay .viewer-header {
        position: absolute;
        top: 14px;
        right: 14px;
        bottom: auto;
    }

    .fullscreen-overlay .viewer-content {
        padding-bottom: 0;
    }

    .modal-footer {
        position: static;
        top: auto;
        right: auto;
        width: 100%;
        padding-top: 12px;
        border-top: 1px solid #f0f0f0;
        margin-top: 12px;
        justify-content: space-between;
    }

    .icon-btn-light {
        width: 42px;
        height: 42px;
    }
}

@media (max-width: 380px) {
    .profile-container {
        width: min(100%, calc(100vw - 20px));
        padding-left: 12px;
        padding-right: 12px;
    }

    .profile-block {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 12px;
        margin-bottom: 30px;
        padding: 6px 0;
        width: 100%;
    }

    .profile-avatar {
        width: clamp(44px, 15vw, 58px);
        height: clamp(44px, 15vw, 58px);
        flex-shrink: 0;
    }

    .profile-copy {
        align-items: flex-start;
        text-align: left;
        gap: 4px;
        min-width: 0;
        flex: 1;
        max-width: calc(100% - 64px);
        width: auto;
    }

    .profile-copy h1 {
        font-size: 0.88rem;
        line-height: 1.1;
    }

    .profile-copy .subtitle {
        font-size: 0.68rem;
        line-height: 1.3;
    }

    .portfolio-grid,
    .quick-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .portfolio-card,
    .link-item {
        min-height: auto;
        padding: 8px 10px;
    }

    .portfolio-card {
        min-height: 78px;
    }

    .portfolio-name {
        font-size: 0.78rem;
        line-height: 1.2;
    }

    .quick-grid {
        margin-top: 12px;
        margin-bottom: 18px;
    }

    .link-item {
        aspect-ratio: auto;
    }

    .contact-row {
        padding: 10px 10px;
        gap: 8px;
        max-width: 100%;
    }
}

@media (min-width: 1200px) {
    .profile-container {
        width: min(100%, 1200px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-container>* {
    animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Modal Headers & Controls */
.modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.modal-header h3 {
    font-size: clamp(16px, 1.6vw, 20px);
    font-weight: 600;
    margin-bottom: 2px;
}


.full-resume-frame {
    width: 100%;
    height: 100%;
    min-height: 100vh;
    border: none;
}

.custom-scrollbar {
    display: none;
}

.scrollbar-thumb {
    display: none;
}

.modal-description {
    font-size: clamp(14px, 1.4vw, 15px);
    line-height: 1.6;
    color: #444;
    text-align: center;
    margin-bottom: clamp(24px, 4vh, 32px);
}

.modal-footer {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.view-btn {
    background: black;
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.view-btn:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.footer-actions {
    display: flex;
    gap: 12px;
}

.icon-btn-light {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f5f5f7;
    border: 1px solid #e5e5e7;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 18px;
    transition: var(--transition);
}

/* Full Screen Viewer Styles */
.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.98);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}


.fullscreen-overlay.active {
    opacity: 1;
    visibility: visible;
}

.viewer-header {
    position: absolute;
    top: clamp(14px, 2.4vw, 20px);
    right: clamp(14px, 2.4vw, 20px);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    z-index: 2100;
}

.viewer-content {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: stretch;
    overflow: hidden;
    padding: 0;
}

.close-viewer-btn {
    width: clamp(44px, 5vw, 60px);
    height: clamp(44px, 5vw, 60px);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    border: none;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2100;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    opacity: 0.55;
}

.close-viewer-btn:hover {
    transform: scale(1.05) rotate(90deg);
    background: rgba(255, 255, 255, 0.95);
    opacity: 1;
}

.full-resume-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}