/* Core Styling Baseline Setup */
html,
body {
    height: 100%;
}

body {
    line-height: 1.6;
    margin: 0;
    padding: 0;
    height: 100vh;
    height: 100svh;
    background-color: #0b1f3a;
    color: #ffffff;
    overflow: hidden;
}

/* NAVIGATION STRUCTURE HEADER */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 3rem;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
    background: rgba(2, 12, 27, 0.6);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 3.5rem;
}

.nav-logo {
    font-family: 'Cinzel', serif;
    color: #ffffff; 
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 2px;
    opacity: 0; 
    transform: translateY(-10px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-links {
    display: flex;
    gap: 2rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-links a {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.45);
    text-decoration: none;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.nav-links a:hover, .nav-links a.active-link {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-right a {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-outline {
    color: #d7faff;
    border: 1px solid rgba(165, 243, 252, 0.55);
    background: rgba(165, 243, 252, 0.05);
}

.btn-outline:hover,
.btn-outline:focus-visible {
    background: rgba(165, 243, 252, 0.14);
    border-color: #a5f3fc;
}

.btn-solid {
    color: #0b1f3a;
    background-color: #7ddbea;
    border: 1px solid #7ddbea;
    font-weight: 600 !important;
}

.btn-solid:hover,
.btn-solid:focus-visible {
    background-color: #a5f3fc;
    border-color: #a5f3fc;
}

.nav-right a:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

.nav-right a:hover,
.nav-right a:focus-visible {
    box-shadow: 0 0 16px rgba(165, 243, 252, 0.18);
    transform: translateY(-1px);
}

.nav-logo.reveal, .nav-links.reveal, .nav-right.reveal {
    opacity: 1;
    transform: translateY(0);
}

/* WIDER AND LEFT-ALIGNED SPLIT LAYOUT CONTAINER */
.split-hero-container {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    width: 92%;
    margin: 0 auto;
    height: calc(100vh - 2.5rem);
    height: calc(100svh - 2.5rem);
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    box-sizing: border-box;
    padding-top: 6rem;
}

/* LEFT HALF CONTENT PANEL */
.hero-left-content {
    flex: 1.4; 
    text-align: left;
    padding-left: 1rem;
}

.profile-greeting {
    color: #a5f3fc;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin: 0 0 0.65rem;
}

.profile-name {
    font-family: 'Cinzel', serif;
    font-size: 4.4rem; 
    font-weight: 400;
    line-height: 1.1;
    margin: 0 0 1.2rem 0;
    letter-spacing: -1px;
    color: #ffffff; 
}

/* Ice blue contrast highlight */
.highlight-surname {
    color: #a5f3fc; 
    font-weight: 700;
    text-shadow: 0 0 30px rgba(165, 243, 252, 0.2);
}

.student-badge {
    display: inline-block;
    max-width: 100%;
    box-sizing: border-box;
    margin: -0.55rem 0 1rem;
    padding: 0.45rem 0.85rem;
    border: 1px solid rgba(165, 243, 252, 0.32);
    border-radius: 999px;
    background: rgba(165, 243, 252, 0.07);
    color: #d7faff;
    font-size: 0.82rem;
    letter-spacing: 0.3px;
}

.student-badge span {
    padding: 0 0.2rem;
    color: #a5f3fc;
}

.profile-role {
    font-family: 'Inter', sans-serif;
    font-size: 1.8rem; 
    font-weight: 400;
    color: #a5f3fc; 
    margin: 0 0 1.5rem;
    letter-spacing: 0.5px;
}

.profile-role-typing {
    position: relative;
    display: inline-block;
    max-width: 100%;
    white-space: nowrap;
    vertical-align: bottom;
    clip-path: inset(0 100% 0 0);
    animation: typing 2.4s steps(25, end) 2.5s forwards;
}

.profile-role-typing::after {
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
    background-color: #a5f3fc;
    content: '';
    transform: translateX(-1px);
    animation: typing-caret 2.4s steps(25, end) 2.5s forwards, blink-caret 0.75s step-end 2.5s infinite;
}

@keyframes typing {
    from { clip-path: inset(0 100% 0 0); }
    to { clip-path: inset(0 0 0 0); }
}

@keyframes typing-caret {
    from { left: 0; }
    to { left: 100%; }
}

@keyframes blink-caret {
    50% { opacity: 0; }
}

.profile-description {
    font-size: 1.08rem;
    color: #8892b0;
    max-width: 560px;
    line-height: 1.8;
    margin: 0;
}

.current-focus {
    display: inline-block;
    margin: 0.8rem 0 0;
    padding-left: 0.65rem;
    border-left: 2px solid rgba(165, 243, 252, 0.72);
    color: #b7c5dc;
    font-size: 0.82rem;
    line-height: 1.6;
}

.current-focus span {
    color: #a5f3fc;
    font-weight: 600;
}

.opportunity-badge {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    width: fit-content;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0.75rem 0 0;
    padding: 0.35rem 0.65rem;
    border: 1px solid rgba(165, 243, 252, 0.24);
    border-radius: 999px;
    background: rgba(165, 243, 252, 0.05);
    color: #b7c5dc;
    font-size: 0.72rem;
    letter-spacing: 0.2px;
}

.opportunity-badge span {
    width: 7px;
    height: 7px;
    flex: none;
    border-radius: 50%;
    background: #7ddbea;
    box-shadow: 0 0 8px rgba(125, 219, 234, 0.75);
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1.5rem;
}

.social-links a {
    color: #a5f3fc;
    border: 1px solid rgba(165, 243, 252, 0.35);
    border-radius: 4px;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.social-links svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.social-links svg rect,
.social-links svg circle {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

.social-links svg .social-icon-dot {
    fill: currentColor;
    stroke: none;
}

.social-links svg .mail-icon-line {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.social-links a:hover,
.social-links a:focus-visible {
    color: #020c1b;
    background-color: #a5f3fc;
    border-color: #a5f3fc;
    box-shadow: 0 0 14px rgba(165, 243, 252, 0.3);
    transform: translateY(-2px);
}

/* RIGHT HALF PORTRAIT CONTAINER */
.hero-right-media {
    flex: 0.8;
    display: flex;
    justify-content: flex-end; 
}

.portrait-column {
    position: relative;
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.portrait-stage {
    position: relative;
    width: 100%;
    isolation: isolate;
}

.portrait-stage::before {
    position: absolute;
    z-index: 0;
    inset: 5% 0;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(100, 220, 245, 0.4), rgba(100, 220, 245, 0.14) 48%, transparent 75%);
    content: '';
    filter: blur(26px);
    pointer-events: none;
}

.portrait-frame {
    position: relative;
    z-index: 1;
    width: 100%;
    aspect-ratio: 4 / 5;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(165, 243, 252, 0.18);
    border-radius: 8px;
    overflow: hidden;
    backdrop-filter: blur(12px);
    box-shadow: 0 0 14px rgba(100, 220, 245, 0.55), 0 0 42px rgba(100, 220, 245, 0.36), 0 30px 60px rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-portrait {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;
    opacity: 0;
    transform: translateX(1rem);
    transition: opacity 0.45s ease, transform 0.45s ease;
    pointer-events: none;
}

.profile-portrait.is-active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.portrait-controls {
    position: absolute;
    z-index: 4;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0.55rem;
    pointer-events: none;
}

.portrait-arrow {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(165, 243, 252, 0.45);
    border-radius: 50%;
    background: rgba(2, 12, 27, 0.76);
    color: #a5f3fc;
    cursor: pointer;
    pointer-events: auto;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.portrait-arrow:hover,
.portrait-arrow:focus-visible {
    background: #a5f3fc;
    color: #020c1b;
}

.portrait-arrow:focus-visible,
.portrait-indicator:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.portrait-arrow svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.portrait-indicators {
    position: absolute;
    z-index: 5;
    bottom: 0.6rem;
    left: 50%;
    display: flex;
    gap: 0.15rem;
    padding: 0.15rem;
    border: 1px solid rgba(165, 243, 252, 0.25);
    border-radius: 999px;
    background: rgba(2, 12, 27, 0.76);
    transform: translateX(-50%);
}

.portrait-indicator {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.portrait-indicator::before {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.58);
    content: '';
    transition: width 0.2s ease, background-color 0.2s ease;
}

.portrait-indicator.is-active::before {
    width: 15px;
    background: #a5f3fc;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    clip-path: inset(50%);
}

.tech-badge {
    position: absolute;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.4rem 0.65rem 0.4rem 0.4rem;
    border: 1px solid rgba(165, 243, 252, 0.24);
    border-radius: 8px;
    background: rgba(3, 15, 30, 0.9);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
    color: #e8f7ff;
    font-size: 0.72rem;
    white-space: nowrap;
    backdrop-filter: blur(12px);
    animation: tech-float 4s ease-in-out infinite;
    pointer-events: none;
}

.tech-mark {
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    background: rgba(100, 255, 218, 0.12);
    color: #64ffda;
    font-size: 0.68rem;
    font-weight: 700;
}

.tech-badge-vscode {
    top: 8%;
    left: -1rem;
    animation-delay: -0.4s;
}

.tech-badge-vscode .tech-mark,
.tech-badge-intellij .tech-mark {
    color: #8acbff;
    background: rgba(72, 149, 239, 0.18);
}

.tech-badge-python {
    top: 30%;
    right: -1rem;
    animation-delay: -1.6s;
}

.tech-badge-python .tech-mark {
    color: #ffe083;
    background: rgba(255, 208, 77, 0.16);
}

.tech-badge-pycharm {
    bottom: 25%;
    left: -1.25rem;
    animation-delay: -2.6s;
}

.tech-badge-pycharm .tech-mark {
    color: #ff9add;
    background: rgba(255, 79, 181, 0.16);
}

.tech-badge-intellij {
    right: -1rem;
    bottom: 8%;
    animation-delay: -3.2s;
}

@keyframes tech-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}

/* STAGGERED ENTRANCE FADE ANIMATION SYSTEM */
.animate-fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-fade-up-delayed {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.2s, transform 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.2s;
}

.animate-fade-up.start-animation, .animate-fade-up-delayed.start-animation {
    opacity: 1;
    transform: translateY(0);
}

/* FOOTER */
footer {
    position: relative;
    z-index: 2;
    height: 2.5rem;
    padding: 0 2rem;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: rgba(255, 255, 255, 0.15);
    font-size: 0.68rem;
    letter-spacing: 1px;
}

.next-page-link {
    min-width: 78px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    margin-top: 0.35rem;
    padding: 0 0.6rem;
    border: 1px solid rgba(165, 243, 252, 0.45);
    border-radius: 4px;
    color: #a5f3fc;
    background: rgba(2, 12, 27, 0.76);
    transition: color 0.2s ease, background-color 0.2s ease;
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 600;
}

.next-page-link svg {
    width: 18px;
    height: 18px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.next-page-link:hover,
.next-page-link:focus-visible {
    color: #020c1b;
    background-color: #a5f3fc;
}

.next-page-link:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

/* LOADING SCREEN */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(2, 12, 27, 0.45); 
    backdrop-filter: blur(25px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.brand-logo {
    font-family: 'Cinzel', serif;
    color: #ffffff;
    font-size: 3.2rem;
    font-weight: 400;
    margin: 0;
    letter-spacing: 6px;
    animation: popUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes popUp {
    0% { opacity: 0; transform: scale(0.9) translateY(15px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.jiggle-loader {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.jiggle-loader .dot {
    width: 6px;
    height: 6px;
    background-color: #64ffda;
    border-radius: 50%;
    animation: jiggle 0.5s ease-in-out infinite alternate;
}

.jiggle-loader .dot:nth-child(2) { animation-delay: 0.12s; }
.jiggle-loader .dot:nth-child(3) { animation-delay: 0.24s; }
.jiggle-loader .dot:nth-child(4) { animation-delay: 0.36s; }

@keyframes jiggle {
    0% { transform: translateY(0); }
    100% { transform: translateY(-10px); }
}

/* Responsive Scaling */
@media (max-width: 992px) {
    .profile-name {
        font-size: 3.3rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0.65rem 1.5rem;
    }
    .split-hero-container {
        height: calc(100vh - 2.5rem);
        height: calc(100svh - 2.5rem);
        flex-direction: column;
        justify-content: center;
        text-align: center;
        gap: 0.25rem;
        padding: 4.75rem 0 0;
    }
    .hero-left-content {
        flex: 0 0 auto;
        width: 100%;
        box-sizing: border-box;
        text-align: center;
        padding-left: 0;
    }
    .profile-description {
        margin: 0 auto;
        font-size: 1rem;
        line-height: 1.45;
    }
    .current-focus {
        margin-top: 0.45rem;
        font-size: 0.76rem;
    }
    .opportunity-badge {
        margin-right: auto;
        margin-left: auto;
    }
    .profile-role {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }
    .profile-name {
        font-size: clamp(2.2rem, 7vw, 2.65rem);
        margin-bottom: 0.45rem;
    }
    .profile-greeting {
        margin-bottom: 0.35rem;
    }
    .social-links {
        margin-top: 0.6rem;
    }
    .social-links {
        justify-content: center;
    }
    .hero-right-media {
        justify-content: center;
        flex: 0 1 auto;
    }
    .portrait-column {
        width: min(64vw, 13rem);
        max-width: none;
    }
    .tech-badge {
        width: 34px;
        height: 34px;
        padding: 0;
        justify-content: center;
    }
    .tech-mark {
        width: 25px;
        height: 25px;
    }
    .tech-label {
        display: none;
    }
    .tech-badge-vscode {
        top: -0.5rem;
        left: -0.5rem;
    }
    .tech-badge-python {
        top: -0.5rem;
        right: -0.5rem;
    }
    .tech-badge-pycharm {
        bottom: 0.25rem;
        left: -0.5rem;
    }
    .tech-badge-intellij {
        right: -0.5rem;
        bottom: 0.25rem;
    }
    .nav-links, .nav-right {
        display: none;
    }
}

@media (max-width: 768px) and (max-height: 700px) {
    .split-hero-container {
        justify-content: flex-start;
        gap: 0.2rem;
        padding-top: 3.5rem;
    }
    .profile-name {
        font-size: clamp(1.9rem, 6vw, 2.25rem);
        margin-bottom: 0.35rem;
    }
    .profile-role {
        font-size: 1rem;
        margin-bottom: 0.45rem;
    }
    .profile-description {
        font-size: 0.8rem;
        line-height: 1.28;
    }
    .social-links {
        margin-top: 0.35rem;
    }
    .social-links a {
        width: 36px;
        height: 36px;
    }
    .portrait-column {
        width: min(45vw, 19svh, 8.5rem);
    }
}

@media (max-width: 430px) and (min-height: 701px) {
    .portrait-column {
        width: min(54vw, 9.5rem);
    }
}

@media (max-width: 430px) {
    .tech-badge,
    .portrait-controls {
        display: none;
    }
    .portrait-frame {
        margin-bottom: 1.75rem;
    }
    .portrait-indicators {
        bottom: -1.9rem;
        border: 0;
        background: transparent;
    }
    .portrait-indicator {
        width: 24px;
        height: 24px;
    }
    .next-page-link {
        margin-top: 0.45rem;
    }
}

@media (max-width: 430px) and (max-height: 700px) {
    .split-hero-container {
        padding-top: 3rem;
    }
    .profile-description {
        font-size: 0.78rem;
        line-height: 1.2;
    }
    .social-links {
        margin-top: 0.25rem;
    }
    .portrait-frame {
        margin-bottom: 1.6rem;
    }
    .portrait-indicators {
        bottom: -1.75rem;
    }
    .portrait-indicator {
        width: 20px;
        height: 20px;
    }
    .next-page-link {
        height: 28px;
        margin-top: 0.15rem;
    }
    .portrait-column {
        width: min(54vw, 21svh, 9.5rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    .tech-badge {
        animation: none;
    }
    .profile-role-typing {
        clip-path: none;
        animation: none;
    }
    .profile-role-typing::after {
        display: none;
        animation: none;
    }
    .profile-portrait {
        transition: none;
    }
    .portrait-arrow,
    .portrait-indicator::before,
    .next-page-link,
    .social-links a,
    .nav-right a {
        transition: none;
    }
    .social-links a:hover,
    .nav-right a:hover {
        transform: none;
    }
}
