:root {
    --sand: #EFEDE9;
    --ink: #141411;
    --muted: #7D7D7D;
    --dark-blue: #00223B;
    /* Base font size scales with viewport */
    font-size: clamp(12px, 1vw, 16px);
}

/* HK Gothic fonts from local fonts folder */
@font-face {
    font-family: 'HK Gothic';
    src: url('fonts/hk-gothic/HK Gothic Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'HK Gothic';
    src: url('fonts/hk-gothic/HK Gothic SemiBold.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
}

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

body {
    font-family: 'HK Gothic', sans-serif;
    font-weight: 600;
    background: var(--sand);
    color: var(--ink);
    min-height: 700vh;
    overflow-x: hidden;
    overflow-y: auto;
    font-size: clamp(14px, 1.2vw, 16px);
}

body::-webkit-scrollbar {
    display: none;
}

body {
    scrollbar-width: none;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    background: transparent;
    padding: clamp(15px, 1.56vw, 30px) clamp(20px, 3.65vw, 70px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
    pointer-events: none;
}

.header > * {
    pointer-events: auto;
}

.logo {
    display: block;
    z-index: 10001;
}

.logo-image {
    height: 80px;
    width: 232px;
    display: block;
    opacity: 1;
    visibility: visible;
}

.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
    z-index: 10001;
}

body.menu-open .menu-toggle {
    opacity: 0;
    pointer-events: none;
}

.menu-toggle span {
    width: 30px;
    height: 3px;
    background: #000;
    transition: all 0.3s ease;
    display: block;
    opacity: 1;
    visibility: visible;
}

/* Portfolio Frames */
.portfolio-frame {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    width: 100%;
    transition: transform 0.3s ease-out;
    will-change: transform;
}

.portfolio-frame-1 {
    background: #FFFFFF;
    z-index: 100;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: clamp(170px, 17.71vw, 340px) clamp(20px, 3.13vw, 60px) 0;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    width: 100%;
}

.portfolio-frame-1::after {
    content: '';
    position: absolute;
    right: 0px;
    bottom: 0;
    width: clamp(400px, 72.92vw, 1400px);
    max-width: 100%;
    height: clamp(300px, 41.67vw, 800px);
    background: url('assets/port1.png') center/cover no-repeat;
    background-size: cover;
    z-index: 1;
}

.portfolio-hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: clamp(15px, 1.56vw, 30px);
    width: clamp(275px, 28.7vw, 551px);
    max-width: 100%;
    z-index: 10;
    position: relative;
    margin-top: clamp(-30px, -3.13vw, -60px);
}

.portfolio-hero-title {
    font-family: 'HK Gothic', sans-serif;
    font-weight: 600;
    font-size: clamp(36px, 6.25vw, 120px);
    line-height: 100%;
    letter-spacing: clamp(-2px, -0.21vw, -4px);
    color: #141411;
    margin-top: clamp(-35px, -3.65vw, -70px) !important;
    transform: translateY(clamp(-20px, -2.08vw, -40px));
}

.portfolio-hero-description {
    font-family: 'HK Gothic', sans-serif;
    font-weight: 300;
    font-size: clamp(14px, 1.04vw, 20px);
    line-height: clamp(24px, 1.77vw, 34px);
    color: #7D7D7D;
    width: 100%;
    max-width: clamp(275px, 28.7vw, 551px);
}

.portfolio-frame-2 {
    background: #FFFFFF;
    z-index: 200;
    height: auto;
    min-height: 100vh;
    padding: 100px 0 50px;
    overflow: hidden;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
}

.portfolio-works-container {
    width: 100%;
    margin: 0;
    padding: 0 clamp(20px, 3.65vw, 70px);
    display: flex;
    flex-direction: column;
    gap: clamp(70px, 7.29vw, 140px);
    will-change: transform;
    transition: transform 0.1s ease-out;
    box-sizing: border-box;
}

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

.portfolio-works-intro {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: clamp(20px, 2.08vw, 40px);
    width: 100%;
    max-width: clamp(313px, 32.66vw, 627px);
}

.portfolio-works-tag {
    box-sizing: border-box;
    width: clamp(100px, 7.29vw, 140px);
    height: clamp(30px, 2.08vw, 40px);
    border: 1px solid #8A99A5;
    border-radius: clamp(10px, 1.04vw, 20px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'HK Gothic', sans-serif;
    font-weight: 700;
    font-size: clamp(12px, 0.73vw, 14px);
    line-height: clamp(14px, 0.94vw, 18px);
    text-transform: uppercase;
    color: #000000;
}

.portfolio-works-title {
    font-family: 'HK Gothic', sans-serif;
    font-weight: 600;
    font-size: clamp(36px, 5vw, 96px);
    line-height: clamp(44px, 4.58vw, 88px);
    letter-spacing: clamp(-2px, -0.21vw, -4px);
    color: #141414;
    width: auto;
}

.portfolio-works-subtitle {
    font-family: 'HK Gothic', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 0.83vw, 16px);
    line-height: clamp(24px, 1.67vw, 32px);
    color: #555555;
    width: 100%;
    max-width: clamp(200px, 16.46vw, 316px);
    margin-top: clamp(40px, 4.17vw, 80px);
}

.word-separator {
    display: inline-block;
    margin: 0 8px;
    color: #555555;
    opacity: 0.6;
    font-weight: 300;
}

.portfolio-projects-list {
    display: flex;
    flex-direction: column;
    gap: clamp(27px, 2.81vw, 54px);
    width: 100%;
}

.portfolio-project-card {
    width: 100%;
    background: #FFFFFF;
    position: relative;
    border-bottom: 1px solid #E6E9EB;
    padding-bottom: clamp(35px, 3.65vw, 70px);
}

.portfolio-project-card:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.project-content {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: clamp(20px, 2.08vw, 40px);
    width: 100%;
    min-height: clamp(300px, 23.96vw, 460px);
    flex-wrap: wrap;
}

.project-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: clamp(15px, 1.56vw, 30px);
    flex: 1;
    max-width: clamp(350px, 36.6vw, 702px);
    width: 100%;
}

.project-badge {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: clamp(10px, 0.73vw, 14px) clamp(15px, 1.04vw, 20px);
    gap: clamp(5px, 0.52vw, 10px);
    width: clamp(150px, 10.94vw, 210px);
    height: clamp(35px, 2.45vw, 47px);
    background: #00223B;
    border-radius: clamp(3px, 0.31vw, 6px);
    font-family: 'HK Gothic', sans-serif;
    font-weight: 600;
    font-size: clamp(14px, 0.83vw, 16px);
    line-height: clamp(20px, 1.46vw, 28px);
    text-transform: uppercase;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.project-title {
    font-family: 'HK Gothic', sans-serif;
    font-weight: 600;
    font-size: clamp(24px, 2.19vw, 42px);
    line-height: clamp(36px, 3.13vw, 60px);
    letter-spacing: -0.02em;
    text-transform: capitalize;
    color: #000000;
    width: auto;
    max-width: 100%;
}

.project-description {
    font-family: 'HK Gothic', sans-serif;
    font-weight: 300;
    font-size: clamp(14px, 0.94vw, 18px);
    line-height: clamp(24px, 1.77vw, 34px);
    color: #555555;
    width: 100%;
}

.project-image {
    width: 100%;
    max-width: clamp(320px, 34.38vw, 660px);
    min-width: clamp(240px, 25vw, 480px);
    height: clamp(250px, 20.83vw, 400px);
    background: #D9D9D9;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
}

.project-placeholder {
    width: 100%;
    height: 100%;
    background: #D9D9D9;
}

/* Frame 3: Contact Section */
.portfolio-frame-3 {
    background: linear-gradient(164.47deg, rgba(0, 0, 0, 0.5) 48.44%, rgba(0, 0, 0, 0) 138.37%), url('assets/port5.png');
    background-size: 105%;
    background-position: center 20%;
    background-repeat: no-repeat;
    z-index: 50;
    height: 100vh;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 100px 0 120px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
}

.portfolio-contact-overlay {
    width: min(960px, 90%);
    text-align: center;
    padding: 0 20px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.portfolio-contact-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 187px;
    height: 40px;
    border: 1px solid #FFFFFF;
    border-radius: 20px;
    font-family: 'HK Gothic', sans-serif;
    font-weight: 700;
    font-size: 14px;
    line-height: 18px;
    text-transform: uppercase;
    color: #FFFFFF;
    margin-bottom: 20px;
}

.portfolio-contact-title {
    font-family: 'HK Gothic', sans-serif;
    font-weight: 600;
    font-size: clamp(32px, 5vw, 96px);
    line-height: clamp(40px, 6.51vw, 125px);
    letter-spacing: clamp(-6px, -0.63vw, -12px);
    color: #FFFFFF;
    margin: clamp(5px, 0.52vw, 10px) 0 clamp(5px, 0.52vw, 10px);
    width: 100%;
    max-width: clamp(600px, 63.75vw, 1222px);
    margin-left: clamp(-40px, -4.17vw, -80px);
    margin-right: auto;
    white-space: nowrap;
    text-align: left;
}

.portfolio-contact-description {
    font-family: 'HK Gothic', 'Geist', sans-serif;
    font-weight: 200;
    font-size: clamp(14px, 0.94vw, 18px);
    line-height: clamp(20px, 1.41vw, 27px);
    color: #e2dcdc;
    margin: 0 auto clamp(12px, 1.25vw, 24px);
    max-width: clamp(550px, 57.29vw, 1100px);
    width: 100%;
    text-align: center;
}

.portfolio-contact-form {
    background: #FFFFFF;
    backdrop-filter: blur(2.5px);
    border-radius: clamp(16px, 1.67vw, 32px);
    padding: clamp(20px, 2.08vw, 40px);
    display: flex;
    flex-direction: column;
    gap: clamp(14px, 1.46vw, 28px);
    border: 1px solid #E6E9EB;
    margin: 0 auto;
    width: 100%;
    max-width: clamp(400px, 41.67vw, 800px);
    min-height: clamp(250px, 20.16vw, 387px);
    height: auto;
}

.portfolio-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(16px, 1.67vw, 32px);
}

@media (max-width: 768px) {
    .portfolio-form-row {
        grid-template-columns: 1fr;
    }
}

.portfolio-contact-form input,
.portfolio-contact-form textarea {
    width: 100%;
    padding: clamp(12px, 0.83vw, 16px) 0;
    border: none;
    border-bottom: 1px solid #E6E9EB;
    border-radius: 0;
    font-family: 'HK Gothic', sans-serif;
    font-size: clamp(14px, 0.83vw, 16px);
    font-weight: 500;
    color: #000000;
    background: transparent;
    outline: none;
}

.portfolio-contact-form input:focus,
.portfolio-contact-form textarea:focus {
    border-bottom-color: #00223B;
}

.portfolio-contact-form input::placeholder,
.portfolio-contact-form textarea::placeholder {
    color: #C7C7C7;
}

.portfolio-contact-form textarea {
    min-height: 60px;
    resize: vertical;
    grid-column: 1 / -1;
}

.portfolio-contact-form button {
    padding: clamp(14px, 1.46vw, 28px) clamp(20px, 2.08vw, 40px);
    background: #00223B;
    color: #FFFFFF;
    border: none;
    border-radius: clamp(6px, 0.63vw, 12px);
    font-family: 'HK Gothic', sans-serif;
    font-size: clamp(14px, 0.94vw, 18px);
    font-weight: 700;
    letter-spacing: -0.02em;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: clamp(300px, 38.33vw, 736px);
    height: clamp(40px, 3.33vw, 64px);
    margin-top: clamp(4px, 0.36vw, 7px);
}

.portfolio-contact-form button:hover {
    background: #003a5f;
    transform: translateY(-2px);
}

.form-message {
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 18px;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@media (max-width: 1024px) {
    .project-content {
        flex-direction: column;
        gap: clamp(15px, 1.56vw, 30px);
    }
    
    .project-image {
        width: 100%;
        max-width: 100%;
        min-width: 100%;
    }

    .portfolio-contact-title {
        margin-left: 0;
        white-space: normal;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .portfolio-frame-1 {
        flex-direction: column;
    }

    .portfolio-frame-1::after {
        position: relative;
        width: 100%;
        height: clamp(200px, 30vh, 400px);
    }
}

