/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Prevent layout shift from scrollbar */
html {
    scrollbar-gutter: stable;
}

html, body {
    height: 100%;
    font-family: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #EEEEEE;
    color: #111111;
    line-height: 1.35;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Main portfolio content - centered in viewport */
.portfolio-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 160px;
    min-height: 100vh;
}

/* Profile section */
.profile-section {
    display: flex;
    flex-direction: column;
    gap: 42px;
    max-width: 1024px; /* Maintain readable width */
    width: 100%;
}

/* Profile image container */
.profile-image {
    position: relative;
    width: 64px;
    height: 64px;
}

.profile-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 64px;
    height: 64px;
    background-image: url('assets/profile-bg.png');
    background-size: cover;
    background-position: center;
    border-radius: 48px;
    z-index: 1;
}

.profile-photo {
    position: absolute;
    top: -6.8px;
    left: -4.4px;
    width: 72.73px;
    height: 75.96px;
    object-fit: cover;
    z-index: 2;
    border-radius: 48px;
}



/* Main title */
.main-title {
    font-family: 'Satoshi', sans-serif;
    font-weight: 500;
    font-size: 40px;
    line-height: 1.35em;
    color: #111111;
    text-align: left;
    margin: 0;
    min-height: 54px; /* Stable height: 40px * 1.35 = 54px */
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Dynamic text styling */
#dynamic-text {
    font-family: 'Satoshi', sans-serif;
    font-weight: 500;
    font-size: 40px;
    color: #111111;
    display: inline-block;
    min-width: 280px; /* Stable width for "DESIGN SYSTEM_" */
    min-height: 54px; /* Match main-title height */
    line-height: 1.35em;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Blinking cursor within dynamic text */
.blink {
    animation: blink 1.2s infinite;
}

/* Scrambled text styling */
.scrambled {
    color: #828282;
}

/* Responsive blinking cursor */
@media (max-width: 960px) {
    .blink {
        animation: blink 1.0s infinite; /* Faster blink on smaller screens */
    }
}

@media (max-width: 640px) {
    .blink {
        animation: blink 0.8s infinite; /* Even faster blink on mobile */
    }
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* Description text */
.description {
    font-family: 'Satoshi', sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.6; /* Adjusted for better readability */
    letter-spacing: 0.32px; /* 2% of 16px */
    color: #111111;
    text-align: left;
}

.description p {
    margin: 0;
}

.description br {
    line-height: 1.35em;
}

/* Underlined links */
.underlined-link {
    color: #111111;
    text-decoration: underline;
    text-decoration-color: #111111;
    text-underline-offset: 2px;
}

.underlined-link:hover {
    text-decoration-thickness: 2px;
}

/* Tooltip container */
.tooltip-container {
    position: relative;
    display: inline-block;
}

/* Tooltip styling */
.tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #111111;
    color: #EEEEEE;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 400;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    transform: translateX(-50%) translateY(-5px);
    z-index: 1000;
    margin-bottom: 8px;
}

/* Tooltip arrow */
.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #111111;
}

/* Show tooltip on hover */
.tooltip-container:hover .tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Footer - now inside main content */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 60px;
}

.footer-left,
.footer-right {
    font-family: 'Satoshi', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.35em;
    letter-spacing: 0.24px; /* 2% of 12px */
    color: #111111;
}

.footer-left {
    text-align: left;
}

.footer-right {
    text-align: right;
}

.footer p {
    margin: 0;
}

/* Language switcher */
.language-switcher {
    display: flex;
    align-items: center;
    font-family: 'Satoshi', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.35em;
    letter-spacing: 0.24px;
}

.lang-option {
    color: #828282;
    cursor: pointer;
    transition: color 0.2s ease;
}

.lang-option.active {
    color: #111111;
}

.lang-option:hover {
    color: #111111;
}

.lang-separator {
    color: #828282;
    margin: 0 8px;
}

/* View Portfolio bold styling */
[data-i18n="view-portfolio"] {
    font-weight: 500;
}


/* Responsive adjustments */
@media (max-width: 1440px) {
    .portfolio-content {
        padding: 60px 120px;
    }
    

}

@media (max-width: 960px) {

    .portfolio-content {
        padding: 60px 100px;
    }
   
    .main-title {
        font-size: 40px;
    }
    
    #dynamic-text {
        font-size: 40px; /* Always match main-title */
        min-width: 180px;
    }
    
    .description {
        font-size: 16px;
    }
}

@media (max-width: 640px) {
    .portfolio-content {
        padding: 30px 16px;
    }
    
    
    
    .main-title {
        font-size: 32px;
    }
    
    #dynamic-text {
        font-size: 32px; /* Always match main-title */
        min-width: 0; /* Remove fixed width to prevent overflow */
        width: auto;
    }
    
    .description {
        font-size: 16px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    .footer {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-top: 40px;
    }
    
    .footer-left {
        text-align: left;
    }
    
    .footer-right {
        text-align: right;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .portfolio-content {
        padding: 20px 12px;
    }
    
    .main-title {
        font-size: 28px;
        line-height: 1.3em;
    }
    
    #dynamic-text {
        font-size: 28px;
        min-width: 0;
        width: auto;
    }
    
    .profile-section {
        gap: 30px;
    }
    
    .description {
        font-size: 15px;
        line-height: 1.5;
    }
    
    .footer {
        margin-top: 30px;
    }
}

/* Very small mobile devices */
@media (max-width: 360px) {
    .portfolio-content {
        padding: 16px 8px;
    }
    
    .main-title {
        font-size: 24px;
        line-height: 1.25em;
    }
    
    #dynamic-text {
        font-size: 24px;
    }
    
    .description {
        font-size: 14px;
    }
}