:root {
    /* Colors */
    --primary-text: #1a1a1a;
    --secondary-text: #555555;
    --accent-blue: #0056b3;
    --accent-blue-hover: #004494;
    --bg-color: #ffffff;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --white: #ffffff;

    /* Slider Colors */
    --slider-color-1: #1877F2;
    /* Royal Blue */
    --slider-color-2: #22C55E;
    /* Emerald Green */
    --slider-color-3: #FF7203;
    /* Amber */
    --slider-color-4: #7A0916;
    /* Violet */

    /* Typography */
    --font-main: 'Red Hat Display', sans-serif;
    --font-heading: 'Red Hat Display', sans-serif;
    --text-h1: 600 48px/1.2 var(--font-heading);
    --text-h2: 500 32px/1.5 var(--font-heading);
    --text-h3: 500 24px/1.5 var(--font-heading);
    --text-b1: 400 16px/1.5 var(--font-main);
    --text-b2: 400 14px/1.5 var(--font-main);
    --text-label: 700 12px/1.2 var(--font-main);

    /* Spacing */
    --container-width: 1200px;
    --header-height: 80px;
}

@media (max-width: 900px) {
    :root {
        --text-h1: 600 40px/1.2 var(--font-heading);
        --text-h2: 500 28px/1.5 var(--font-heading);
        --text-h3: 500 20px/1.5 var(--font-heading);
        --text-b1: 400 16px/1.5 var(--font-main);
        --text-b2: 400 14px/1.5 var(--font-main);
        --text-label: 700 12px/1.2 var(--font-main);
    }
}

@media (max-width: 768px) {
    :root {
        --text-h1: 600 36px/1.2 var(--font-heading);
        --text-h2: 500 24px/1.5 var(--font-heading);
        --text-h3: 500 16px/1.5 var(--font-heading);
        --text-b1: 400 14px/1.5 var(--font-main);
        --text-b2: 400 12px/1.5 var(--font-main);
        --text-label: 700 10px/1 var(--font-main);
    }
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--primary-text);
    background-color: var(--bg-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 0px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 6px;
    font: var(--text-b1);
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--accent-blue);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--accent-blue-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 86, 179, 0.2);
}

/* Header */
header {
    height: var(--header-height);
    min-height: 40px;
    /* User requested min-height */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

header.scrolled {
    border-bottom-color: var(--border-color);
    background-color: rgba(255, 255, 255, 0.8);
}

.header-container {
    max-width: 1200px;
    /* User requested override */
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1001;
    gap: 24px;
    /* Ensure above mobile menu */
}

/* Logo Section */
.logo-section {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    justify-content: center;
    min-width: 200px;
    /* Prevent collapse */
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo img {
    height: 40px;
    /* Adjust based on preference */
    width: auto;
    display: block;
    flex-shrink: 0;
    min-width: 100px;
    /* Ensure visible size */
}

.nav-line {
    height: 1px;
    background-color: #e5e7eb;
    /* width: 80px; Removed fixed width */
    flex: 1;
    /* Allow line to fill gap */
    display: block;
}

/* Desktop Navigation */
.nav-desktop {
    flex: 0 auto;
    /* Stop growing, let logo section expand */
}

.nav-left {
    display: contents;
    justify-content: flex-start;
    padding-left: 20px;
    padding-right: 20px;
}

.nav-right {
    display: contents;
    justify-content: flex-end;
    padding-right: 20px;
    padding-left: 20px;
}

.nav-links-group {
    display: flex;
    gap: 40px;
    /*padding: 0 40px; */
    /* Added padding per user request */
}

.nav-links-group li {
    min-width: 90px;
    height: 40px;
    /* Using height to satisfy max-height and ensure vertical center */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    /* Common for text buttons */
    transition: background-color 0.2s ease;
}

.nav-links-group li:hover {
    background-color: rgba(0, 0, 0, 0.05);
    /* Subtle hover effect */
}

.nav-links-group a {
    font: var(--text-b1);
    color: var(--primary-text);
}

.nav-links-group a:hover {
    color: var(--accent-blue);
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font: var(--text-b1);
    color: var(--primary-text);
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background-color: var(--white);
    padding: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    transform: translateY(-150%);
    transition: transform 0.3s ease;
    z-index: 999;
    display: none;
    /* Hidden by default on desktop */
}

.mobile-menu.active {
    transform: translateY(0);
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: center;
}

.mobile-nav-links a {
    font: var(--text-b1);
    color: var(--primary-text);
    display: block;
    padding: 10px;
}

/* Hero Section */
#hero {
    padding-top: 100px;
    padding-bottom: 100px;
    text-align: center;
    min-height: 100vh;
    min-height: 100dvh;
    /* Dynamic viewport height for mobile browsers */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 800px;
}

.hero-intro {
    font: var(--text-h2);
    color: var(--secondary-text);
    margin-bottom: 16px;
}

.hero-title {
    font: var(--text-h1);
    margin-bottom: 24px;
    color: var(--primary-text);
}

.hero-subtitle {
    font: var(--text-b1);
    color: var(--secondary-text);
    margin-bottom: 100px;
}

/* Text Slider */
.text-slider {
    display: inline-block;
    height: 1.2em;
    vertical-align: bottom;
    overflow: hidden;
    text-align: center;
    margin-bottom: -10px;
    /* Adjust for alignment quirk if needed, or remove. Let's try 0 first, actually inline-block often adds unwanted space. */
    margin-bottom: -0.25em;
    /* Fine tune alignment with baseline */
}

.slider-track {
    display: block;
    animation: textSlide 10s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
}

.slider-item {
    display: block;
    height: 1.2em;
    padding-left: 10px;
    white-space: nowrap;
    /* Prevent wrapping */
}

.slider-item.variant-1 {
    color: var(--slider-color-1);
}

.slider-item.variant-2 {
    color: var(--slider-color-2);
}

.slider-item.variant-3 {
    color: var(--slider-color-3);
}

.slider-item.variant-4 {
    color: var(--slider-color-4);
}

@keyframes textSlide {

    0%,
    20% {
        transform: translateY(-80%);
    }

    25%,
    45% {
        transform: translateY(-60%);
    }

    50%,
    70% {
        transform: translateY(-40%);
    }

    75%,
    95% {
        transform: translateY(-20%);
    }

    100% {
        transform: translateY(0%);
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    color: var(--secondary-text);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
}

.scroll-indicator:hover {
    color: var(--accent-blue);
    transform: translateX(-50%) scale(1.1);
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0) translateX(-50%);
    }

    40% {
        transform: translateY(-10px) translateX(-50%);
    }

    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

/* Responsive */
@media (max-width: 900px) {

    #hero {
        padding: 80px 80px;
    }

    .nav-desktop,
    .nav-line {
        display: none;
    }

    .logo-section {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 0;
        /* Behind mobile btn */
    }

    .logo-section .logo {
        display: flex;
        pointer-events: auto;
    }

    .logo-section .logo img {
        display: block;
        height: 40px;
        width: auto;
    }

    .header-container {
        justify-content: center;
        position: relative;
    }

    .mobile-menu-btn {
        display: block;
        position: absolute;
        right: 24px;
        z-index: 10;
    }

    .mobile-menu {
        display: block;
        /* Enable for mobile to allow transform */
    }
}

@media (max-width: 768px) {

    #hero {
        padding: 16px 16px;
    }
}

/* Selected Work Section */
#work {
    padding: 80px 80px;
    background-color: var(--bg-light);
}

#work .container {
    padding: 0;
}

@media (max-width: 768px) {
    #work {
        padding: 24px 16px;
    }
}

.section-title {
    font: var(--text-h2);
    font-weight: 600;
    text-align: center;
    margin-bottom: 60px;
    color: var(--primary-text);
}

.project-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    background: var(--white);
    padding: 32px;
    border: 1px solid rgba(145, 158, 171, 0.2);
    border-radius: 16px;
    box-shadow: none;
    height: 458px;
    column-gap: 48px;
    row-gap: 24px;
}

.project-card:last-child {
    margin-bottom: 0;
}

.project-card.reverse {
    flex-direction: row-reverse;
}

.project-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 24px;
    flex: 1;
    max-width: 515px;
    min-width: inherit;
    flex-shrink: 0;
    height: 100%;
}

.project-main-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.project-actions {
    display: flex;
    align-items: flex-start;
}

.project-logo-wrapper {
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    margin-bottom: 0;
}

.project-logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 32px;
}

.project-logo .logo-img {
    height: 32px;
    width: auto;
}

.project-title {
    font: var(--text-h2);
    margin: 0;
    color: #212b36;
}

.project-desc {
    font: var(--text-b1);
    margin: 0;
    color: #212b36;
}

.project-tags {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
}

.project-tags-row {
    display: flex;
    flex-direction: row;
    gap: 8px;
    flex-wrap: wrap;
}

.project-tags .project-tag {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 6px;
    border: 1px solid rgba(145, 158, 171, 0.2);
    border-radius: 2px;
    font: var(--text-label);
    color: #637381;
    text-align: center;
    white-space: nowrap;
}

.btn-explore {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background-color: rgba(63, 139, 231, 0.12);
    border-radius: 4px;
    font: var(--text-b1);
    font-weight: 600;
    color: #065dc7;
    text-decoration: none;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.btn-explore:hover {
    background-color: rgba(63, 139, 231, 0.2);
}

.btn-explore svg {
    flex-shrink: 0;
}

.project-image {
    width: 518px;
    height: 100%;
    background-color: #f4f6f8;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    box-shadow: none;
    transition: transform 0.3s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.02);
}

@media (max-width: 1200px) {
    .project-card {
        flex-direction: column;
        align-items: stretch;
        height: auto;
    }

    .project-card.reverse {
        flex-direction: column;
    }

    .project-content {
        max-width: none;
    }

    .project-image {
        width: 100%;
        height: auto;
        min-height: 300px;
    }
}

@media (max-width: 900px) {
    .project-card {
        padding: 20px;
    }

    .project-image {
        min-height: 250px;
    }
}

/* About Section */
#about {
    padding: 80px 80px;
    background-color: var(--white);
}

.about-card {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    padding: 32px 32px;
    background: var(--white);
    border: 1px solid rgba(145, 158, 171, 0.2);
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
    column-gap: 48px;
}

.about-photo {
    flex: 1 1 0;
    background-color: #f4f6f8;
    border-radius: 12px;
    overflow: hidden;
    min-height: 360px;
    max-width: 518px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-details {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: inherit;
    row-gap: 24px;
    max-width: 515px;
}

.about-headline h3 {
    font: var(--text-h2);
    color: #212b36;
    margin-bottom: 16px;
}

.about-headline p {
    font: var(--text-b1);
    color: #454f5b;
}

.about-highlight {
    font-weight: 700;
    font-style: italic;
}

.about-feature {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.skill-badges {
    display: flex;
    gap: 12px;
    align-items: center;
}

.skill-badge {
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    aspect-ratio: 1/1;
    border-radius: 8px;
    border: 1px solid rgba(145, 158, 171, 0.2);
    background: var(--white);
    transition: border-color 0.3s ease-out, box-shadow 0.3s ease-out;
}

.skill-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.skill-badge.is-active {
    background: rgba(63, 139, 231, 0.08);
    border-color: rgba(63, 139, 231, 0.48);
    box-shadow: 0 6px 16px rgba(6, 93, 199, 0.12);
}

.about-meta h4 {
    font: var(--text-b1);
    font-weight: 700;
    color: #212b36;
    margin-bottom: 6px;
}

.about-meta p {
    font: var(--text-b1);
    color: #454f5b;
}

.about-social {
    display: flex;
    gap: 12px;
}

.social-btn {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: rgba(63, 139, 231, 0.12);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.social-btn img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.social-btn:hover {
    background: rgba(63, 139, 231, 0.18);
    transform: translateY(-2px);
}

@media (max-width: 900px) {
    #about {
        padding: 80px 80px;

    }

    .about-card {
        flex-direction: column;
        padding: 24px 20px;
        gap: 24px;
    }

    .about-photo {
        width: 100%;
        min-height: 260px;
        max-width: none;
    }

    .about-details {
        max-width: none;
    }
}

@media (max-width: 768px) {
    #about {
        padding: 24px 16px;
    }
}

/* Contact Section */
#contact {
    padding: 80px 80px;
    background-color: var(--bg-light);
}

.contact-container {
    display: flex;
    gap: 80px;
}

.contact-left {
    flex: 1;
}

.contact-left h2 {
    font: var(--text-h2);
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--primary-text);
}

.contact-left p {
    color: var(--secondary-text);
    font: var(--text-b1);
}

.contact-decoration {
    width: 200px;
    height: 200px;
    background-color: #f0f4f8;
    border-radius: 50% 40% 60% 50%;
    opacity: 0.5;
}

.contact-right {
    flex: 1;
}

.contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.full-width {
    grid-column: span 2;
}

#contact-button-container {
    grid-column: span 2;
    display: flex;
    justify-content: flex-end;
}

.form-group label {
    font: var(--text-label);
    color: var(--primary-text);
}

.form-group input,
.form-group textarea {
    padding: 16px;
    background-color: var(--white);
    border: 1px solid transparent;
    border-radius: 8px;
    font: var(--text-b1);
    transition: border-color 0.3s ease;
    resize: none;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    background-color: var(--white);
    resize: none;
}

/* Footer */
#footer {
    padding: 40px 80px;
    background-color: var(--white);
    position: relative;
    overflow: hidden;
}

.footer-bg-vector {
    position: absolute;
    left: -14px;
    bottom: -219px;
    width: 415px;
    height: 415px;
    z-index: 0;
    pointer-events: none;
}

.footer-bg-vector::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('asset/decoration/Vector.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.footer-bg-vector-1 {
    position: absolute;
    left: -503px;
    bottom: -637.969px;
    width: 3427px;
    height: 1051px;
    z-index: 0;
    pointer-events: none;
}

.footer-bg-vector-1::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('asset/decoration/abstract.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.footer-container {
    display: flex;
    flex-direction: column;
    gap: 32px;
    position: relative;
    z-index: 1;
}

.footer-divider {
    height: 1px;
    width: 100%;
    background-color: rgba(145, 158, 171, 0.2);
    border-top: 1px solid rgba(145, 158, 171, 0.2);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 380px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: inherit;
}

.footer-logo-icon {
    height: 30px;
    width: auto;
    display: block;
}

.footer-logo-text {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 20px;
    line-height: normal;
    color: #000;
    display: flex;
    align-items: center;
    padding: 4px 0;
}

.footer-logo-text span {
    margin-left: 0;
}

.footer-social {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.footer-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    gap: 8px;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.footer-social-btn img {
    width: 16px;
    height: 16px;
    display: block;
}

.footer-social-btn:hover {
    opacity: 0.7;
}

.copyright {
    font: var(--text-b1);
    color: #212b36;
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 56px;
    align-items: flex-start;
    justify-content: flex-end;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-col h4 {
    font: var(--text-b1);
    font-weight: 700;
    color: #065dc7;
    margin: 0;
}

.footer-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 8px 0;
    font: var(--text-b2);
}

.footer-list a {
    color: #1d1b1e;
    text-decoration: none;
    transition: color 0.2s ease;
    display: block;
}

.footer-list a:hover {
    color: #065dc7;
}

@media (max-width: 900px) {

    #contact {
        padding: 80px 80px;
    }

    .contact-container {
        flex-direction: column;
        gap: 40px;
    }

    .contact-form {
        display: flex;
        gap: 24px;
        flex-direction: column;
    }

    .form-group.full-width {
        grid-column: span 1;
    }

    #footer {
        padding: 40px 80px;
    }

    .footer-content {
        flex-direction: row;
        gap: 24px;
    }

    .footer-brand {
        width: 100%;
    }

    .footer-links {
        flex-wrap: wrap;
        gap: 40px;
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {

    #contact {
        padding: 24px 36px;
    }

    .footer-content {
        flex-direction: column;
        gap: 40px;
    }

    #footer {
        padding: 24px 16px;
    }
}

/* Hide logo when menu is open */
header.menu-open .logo-section {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}