:root {
    /* ========== COLORS ========== */
    --bg-main: #0a0a0b;
    --bg-card: #181A1D;
    --color-primary: rgb(57, 101, 247);
    --color-white: #ffffff;
    --color-white-soft: rgba(255, 255, 255, 0.7);
    --color-white-dim: rgba(255, 255, 255, 0.2);
    --color-border: rgba(255, 255, 255, 0.1);
    --tag-color: var(--color-white-dim);
    --text-main: var(--color-white);
    --text-dim: var(--color-white-soft);

    /* ========== TYPOGRAPHY ========== */
    --font-main: 'Montserrat', sans-serif;
    --font-mono: monospace;
    --font-display: 'Playfair Display', serif;
    --font-skill: 'Fjalla One', sans-serif;

    /* ========== TRANSITIONS ========== */
    --transition-fast: 0.3s ease;
    --transition-smooth: 0.5s ease;

    /* ========== EFFECTS ========== */
    --shadow-glow: 0 0 25px var(--color-primary);
}

/* ========== RESET ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-main);
    font-family: var(--font-main);
    color: var(--color-white);
    overflow-x: hidden;
    position: relative;
    max-width: 100%;
    margin: 0;
}

h1,
h2,
h3 {
    font-family: var(--font-main);
    color: var(--color-white);
}

p {
    font-family: var(--font-main);
    color: var(--color-white-soft);
}

/* ========== BODY EFFECTS ========== */
body::before {
    content: '';
    position: fixed;
    left: 50%;
    top: 0;
    width: 1px;
    height: 100%;
    background-image: linear-gradient(to bottom, var(--bg-card) 50%, transparent 50%);
    background-size: 1px 10px;
    z-index: -1;
    opacity: 0.5;
}


@keyframes noise-shimmer {

    0%,
    100% {
        transform: translate(0, 0);
    }

    10% {
        transform: translate(-1%, -2%);
    }

    20% {
        transform: translate(-2%, 1%);
    }

    30% {
        transform: translate(1%, -1%);
    }

    40% {
        transform: translate(-1%, 1%);
    }

    50% {
        transform: translate(-2%, -2%);
    }

    60% {
        transform: translate(-1%, 2%);
    }

    70% {
        transform: translate(1%, -2%);
    }

    80% {
        transform: translate(-2%, 1%);
    }

    90% {
        transform: translate(1%, -1%);
    }
}

/* ========== SECTIONS ========== */
section {
    min-height: 10vh;
    padding: 100px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.section-title-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    padding: 15px 45px;
    margin-bottom: 3rem;
    vertical-align: top;
}

.section-label {
    font-size: 1.3rem;
    letter-spacing: 8px;
    text-transform: uppercase;
    color: var(--color-primary);
    margin: 0;
    padding: 20px 10px;
    display: block;
    text-align: center;
}

.text-center .section-title-wrapper {
    margin-left: auto;
    margin-right: auto;
}

/* ========== HERO SECTION ========== */
#hero .container {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 180px 20px 40px 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

#hero h1 {
    font-weight: 900;
}

#hero p {
    font-weight: 400;
}

.ctm-btn {
    background: transparent;
    border: 1px solid var(--color-white);
    color: var(--color-white);
    padding: 15px 40px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    width: fit-content;
    transition: var(--transition-fast);
    text-decoration: none;
    display: inline-block;
}

.ctm-btn:hover {
    background: var(--color-white);
    color: var(--bg-main);
}

/* ========== INTRO SECTION ========== */
#intro .container {
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('../assets/starry-sky.jpg') no-repeat center;
    background-size: cover;
    background-attachment: fixed;
    border-radius: 60px;
    padding: 160px 100px;
    max-width: 1300px;
    min-height: 80vh;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
    margin: 60px auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

#intro h2 {
    font-size: clamp(3.5rem, 8vw, 5.5rem);
    font-weight: 800;
    line-height: 0.85;
    letter-spacing: -3px;
    margin-bottom: 40px;
}

.role-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 40px;
}

.mini-tag {
    font-family: monospace;
    font-size: 0.7rem;
    color: var(--tag-color);
}

.sub-role {
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 1px;
    color: var(--text-main);
}

/* ========== NAVIGATION ========== */

.main-nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 30px 8%;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--color-white);
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dim);
    font-size: 0.75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    transition: var(--transition-fast);
}

.nav-links a:hover {
    color: var(--color-white);
}

.nav-resume {
    text-decoration: none;
    font-size: 0.75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-dim);
    transition: var(--transition-fast);
}

.nav-resume:hover {
    color: var(--color-primary);
}

/* ========== SCROLL INDICATOR ========== */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    text-align: center;
    font-size: 0.7rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    opacity: 0.6;
    font-family: var(--font-main);
}

.scroll-indicator .arrow {
    display: block;
    margin-top: 10px;
    font-size: 1.5rem;
    animation: scrollMove 2s infinite;
}

@keyframes scrollMove {

    0%,
    100% {
        transform: translateY(0);
        opacity: 0.3;
    }

    50% {
        transform: translateY(10px);
        opacity: 1;
    }
}

/* ========== QUOTE SECTION ========== */
.quote-container {
    position: relative;
    padding: 60px 80px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}


.big-quote {
    font-family: playfair display, serif;
    font-size: 140px;
    position: absolute;
    color: rgba(255, 255, 255, 0.1);
    line-height: 1;
    pointer-events: none;
}

.open-quote {
    top: 0;
    left: 0;
}


.close-quote {
    bottom: 0;
    right: 0;
}


.about-bio {
    font-size: 1rem;
    font-weight: 500;
    color: #ffffff;
    margin: 0;
    text-transform: uppercase;
    text-align: center;

}

/* ========== CODE TAGS ========== */


.code-tag,
.code-tag-end {
    font-family: var(--font-mono);
    color: var(--color-white-dim);
    font-size: 0.9rem;
    letter-spacing: 3px;
    display: block;
    position: absolute;

}

.code-tag {
    top: 0;
    left: 0;
}

.code-tag-end {
    bottom: 0;
    right: 0;
}

.type-display,
.color-swatch-wrapper {
    margin-top: 15px;
}

/* ========== TITLES ========== */
.main-title {
    font-size: clamp(2.8rem, 10vw, 7.5rem);
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1.05;
    margin: 0;
    letter-spacing: -1px;
}

.role-text {
    letter-spacing: 10px;
    font-weight: 300;
    font-size: 0.85rem;
    margin-bottom: 20px;
    opacity: 0.9;
    text-transform: uppercase;
    color: var(--color-primary);
}

.type-area,
.color-area {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 20px;
}

/* ========== SKILL CONSTELLATION ========== */

.skills-stars-constellation-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 40px auto;
}

.skills-constellation {
    width: 100%;
    height: auto;
    display: block;
}

#skill-nodes-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}


.skill-star {
    position: absolute;
    width: 20px;
    height: 20px;
    background: transparent;
    border-radius: 50%;

    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 10;
    pointer-events: auto;
}

.skill-star::after {
    content: attr(data-skill);
    position: absolute;
    font-size: 0.65rem;
    color: var(--text-dim, rgba(255, 255, 255, 0.6));
    font-family: 'Fjalla One', sans-serif;
    letter-spacing: 1px;
    white-space: nowrap;
    transition: all 0.3s ease;
}


.skill-star.top::after {
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
}

.skill-star.bottom::after {
    top: 120%;
    left: 50%;
    transform: translateX(-50%);
}

.skill-star.left::after {
    right: 120%;
    top: 50%;
    transform: translateY(-50%);
}

.skill-star.right::after {
    left: 120%;
    top: 50%;
    transform: translateY(-50%);
}

.skill-star.top-right::after {
    bottom: 100%;
    left: 100%;
    transform: none;
}


.skill-star:hover {

    background: none;
    box-shadow: none;
}

.skill-star:hover::after {
    color: #fff;
    opacity: 1;
    text-shadow: 0 0 10px var(--text-dim);

    transform: translateX(-50%) scale(1.05);
}


.skill-star.left:hover::after,
.skill-star.right:hover::after {
    transform: translateY(-50%) scale(1.05);
}

.skill-star.top-right:hover::after {
    transform: scale(1.1);
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.4;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* ========== WORK GRID ========== */
.work-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.grid-item {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: var(--transition-smooth);
}

.grid-item:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

/* ========== CONTACT SECTION ========== */
#contact .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 60px 0;
}

#contact .contact-subtitle {
    text-align: center;
    margin: 20px auto;
    max-width: 600px;
    font: var(--font-main);
    font-size: small;
}

#contact .cv-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.social-icon {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.7rem;
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

.social-icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.5px;
}

.social-icon:hover {
    color: var(--color-primary);
    transform: translateY(-3px);
}

.social-icon span {
    font-size: 0.7rem;
    letter-spacing: 2px;
    font-weight: 700;
}


/* ========== FLOATING ASSETS ========== */
.floating-asset {
    position: absolute;
    opacity: 0.4;
    z-index: 0;
    pointer-events: none;
    filter: drop-shadow(0 0 15px var(--color-primary));
}

.moon {
    top: 10%;
    right: 10%;
    width: 150px;
    filter: drop-shadow(0 0 20px var(--color-primary));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

/* ========== CONTAINER STYLING ========== */
#about .container,
#design-system .container,
#work .container,
#contact .container {
    background: transparent;
    border: none;
    box-shadow: none;
    max-width: 1100px;
    margin: 0 auto;
}

/* ========== WHO AM I SECTION ========== */

#who-am-i {
    position: relative;
}

#who-am-i .section-label {
    text-align: left;
    display: block;
    width: 100%;
    margin-bottom: 50px;
    padding-left: 0;
}

#who-am-i .about-text {
    font-size: 0.85rem;
    line-height: 1.6;
    max-width: 520px;
    color: var(--text-dim);
}

#who-am-i .highlight-line {
    display: block;
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--color-primary);
    margin: 30px 0;
}

#who-am-i .row {
    align-items: flex-end;
    padding-bottom: 10px;
    display: flex;
}

/* ========== ABOUT CONSTELLATION IMAGE ========== */
.skill-star::after {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    opacity: 0.6;
}



.skills-constellation {
    width: 100%;
    max-width: 580px;
    height: auto;
    position: relative;
    left: 0 !important;
    top: 0 !important;
    margin: 0 !important;

}

.skills-title {
    margin-left: 80px;
    text-align: left;
}

/* ========== REVEAL ANIMATIONS ========== */
.reveal-hidden {
    opacity: 0;
    transform: translateY(40px);
    transition: var(--transition-smooth);
}

.reveal-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== BRANDING GRID ========== */
.branding-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 100px;
    align-items: flex-start;
    padding-top: 60px;
}

.type-display {
    position: relative;
    padding: 40px 0;
    display: flex;
    align-items: center;
}

.big-a-bg {
    font-size: 25rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.03);
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: -1;
    line-height: 1;
}

.font-specs h3 {
    font-size: 2rem;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.font-specs p {
    font-size: 0.9rem;
    color: var(--color-white-soft);
    letter-spacing: 4px;
    line-height: 2;
}

.color-swatch-wrapper {
    display: flex;
    justify-content: center;
    padding: 0;
    margin-top: -6px;
}

.color-parchment {
    width: 200px;
    height: 280px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 20px 20px 60px rgba(0, 0, 0, 0.5);
}

.color-parchment::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 5%;
    width: 90%;
    height: 30px;
    background: #2a2d31;
    border-radius: 50% / 100% 100% 0 0;
    transform: rotateX(180deg);
    filter: brightness(0.5);
}

.hex-code {
    font-size: 2.5rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.15);
    letter-spacing: -2px;
    transform: rotate(-90deg);
}

/* ========== MEDIA QUERIES ========== */
@media (max-width: 900px) {

    .branding-grid {
        grid-template-columns: 1fr;
        gap: 60px;
        text-align: center;
    }

    .main-title {
        font-size: clamp(2rem, 8vw, 4rem);
        text-align: center;
    }

    section {
        padding: 80px 20px;
    }

    .type-display,
    .color-swatch-wrapper {
        justify-content: center;
    }

    .big-a-bg {
        font-size: 8rem;
        left: 0;
    }

    #intro .container {
        padding: 100px 20px;
    }

    #hero .container {
        padding: 160px 20px 120px 20px;
    }

    .nav-links {
        flex-wrap: wrap;
        gap: 20px;
    }

    .social-links {
        flex-wrap: wrap;
        gap: 20px;
    }

    .role-text {
        letter-spacing: 4px;
    }

    .section-label {
        letter-spacing: 3px;
    }

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

    #who-am-i .row {
        flex-direction: column;
        text-align: center;
    }

    #who-am-i .col-md-6 {
        width: 100%;
    }

    .skills-stars-constellation-container {
        margin-top: 40px;
        max-width: 400px;
    }

    .skill-star::after {
        font-size: 0.6rem;
        letter-spacing: 1px;
    }

    .skill-star.top::after {
        bottom: 120%;
    }

    .skill-star.bottom::after {
        top: 120%;
    }

    .skill-star.left::after {
        right: 120%;
    }

    .skill-star.right::after {
        left: 120%;
    }

}

@media (max-width: 480px) {
    .main-nav {
        padding: 20px 10px;
    }

    .nav-links {
        gap: 12px;
    }

    .nav-links a {
        font-size: 0.65rem;
        letter-spacing: 1px;
    }

    .nav-logo {
        display: none;
    }

    .main-title {
        font-size: clamp(1.8rem, 10vw, 3rem);
    }

    .font-specs h3 {
        font-size: 1.2rem;
    }

    .font-specs p {
        font-size: 0.7rem;
    }

    .color-parchment {
        width: 150px;
        height: 220px;
    }

    .skill-star::after {
        font-size: 0.55rem;
        font-weight: 600;
    }

    .skill-star.top::after {
        bottom: 110%;
    }

    .skill-star.bottom::after {
        top: 110%;
    }

    .skill-star.left::after {
        right: 110%;
    }

    .skill-star.right::after {
        left: 110%;
    }

    .skills-stars-constellation-container {
        max-width: 100%;
        margin-top: 20px;
    }
}

@media (max-width: 375px) {
    body {
        overflow-x: hidden;
    }

    .branding-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 20px;
        text-align: center;
    }

    .main-title {
        font-size: clamp(1.5rem, 10vw, 2.5rem);
        line-height: 1;
    }

    #intro .container,
    #hero .container,
    #work .container,
    #about .container,
    #design-system .container,
    #contact .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
    }

    .role-text {
        font-size: 0.7rem;
        letter-spacing: 4px;
        margin-bottom: 20px;
    }

    .type-display {
        justify-content: center;
        margin-bottom: 20px;
    }

    .font-specs p.alphabet {
        font-size: 0.7rem;
        word-break: break-all;
        letter-spacing: 2px;
    }

    .font-specs h3 {
        font-size: 1.2rem;
    }

    .big-a-bg {
        font-size: 6rem;
        left: 0;
        overflow: hidden;
        max-width: 100vw;
        transform: translateY(-50%);
    }

    .font-specs p {
        font-size: 0.65rem;
        letter-spacing: 1.5px;
        word-break: break-word;
    }

    .color-swatch-wrapper {
        justify-content: center;
    }

    .moon {
        width: 60px;
        right: 5%;
        top: 5%;
    }


    .color-parchment {
        width: 120px;
        height: 180px;
    }

    .main-nav {
        padding-left: 15px;
        padding-right: 15px;
    }

    .section-label {
        font-size: 0.6rem;
        letter-spacing: 2px;
    }

    .work-grid {
        gap: 15px;
    }

    .code-tag,
    .code-tag-end {
        font-size: 0.7rem;
    }

    @keyframes twinkle {

        0%,
        100% {
            opacity: 0.4;
            transform: translate(-50%, -50%) scale(1);
        }

        50% {
            opacity: 1;
            transform: translate(-50%, -50%) scale(1.05);
        }
    }

    .skill-star::after {
        font-size: 0.5rem;
        letter-spacing: 0.5px;
    }

    @media (pointer: coarse) {
        .skill-star {

            width: 40px;
            height: 40px;
        }
    }
}