@font-face {
    font-family: 'Gotham';
    src: url('../fonts/Gotham-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

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

:root {
    --black: #000000;
    --blue: #004aa0;
    --light-gray: #eceff1;
    --gray: #455a64;
}

html {
    scroll-padding-top: 160px;
}

body {
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 700;
    background: var(--black);
    color: var(--light-gray);
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* Loading screen */
.loading {
    position: fixed;
    inset: 0;
    background: var(--black);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 1s cubic-bezier(0.86, 0, 0.07, 1);
}

.loading.hide {
    opacity: 0;
    pointer-events: none;
}

.loading-text {
    font-family: 'Gotham', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    color: var(--gray);
    margin-bottom: 2rem;
    font-weight: 700;
}

.loading-bar {
    width: 200px;
    height: 1px;
    background: var(--gray);
    position: relative;
    overflow: hidden;
}

.loading-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--blue);
    animation: load 2s cubic-bezier(0.86, 0, 0.07, 1) infinite;
}

@keyframes load {
    to { left: 100%; }
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 2rem;
    z-index: 100;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.86, 0, 0.07, 1);
}

.nav-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-left {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    gap: 3rem;
    list-style: none;
}

.nav-right {
    flex: 1;
    display: flex;
    justify-content: flex-start;
    gap: 2rem;
    list-style: none;
}

.logo-container {
    flex: 0 0 auto;
    padding: 0 2rem;
    text-decoration: none;
}

.logo-icon {
    height: 75px;
    width: auto;
    display: block;
    transition: all 0.3s cubic-bezier(0.86, 0, 0.07, 1);
}

.logo-container:hover .logo-icon {
    transform: scale(1.05);
}

.nav-links {
    list-style: none;
}

.nav-links a {
    font-family: 'Gotham', sans-serif;
    color: var(--gray);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    position: relative;
    transition: all 0.4s cubic-bezier(0.86, 0, 0.07, 1);
}

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

/* Sub-header */
.sub-header {
    position: fixed;
    top: 90px;
    width: 100%;
    padding: 1.25rem 2rem 1rem;
    background: transparent;
    border-bottom: none;
    z-index: 101;
    text-align: center;
    min-height: 40px;
}

.company-name {
    font-family: 'Gotham', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    color: var(--light-gray);
    line-height: 1;
    padding-bottom: 3px;
    display: inline-block;
}

/* Main content */
main {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    padding: 12rem 4rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Hero section */
.hero {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding-top: 20px;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    overflow: hidden;
}

.hero-bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    opacity: 0.6;
    mask-image: linear-gradient(to bottom,
        transparent 0%,
        black 15%,
        black 85%,
        transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom,
        transparent 0%,
        black 15%,
        black 85%,
        transparent 100%);
}

.tagline {
    font-family: 'Gotham', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1.2;
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
}

.tagline .line {
    display: block;
    opacity: 0;
    transform: translateY(20px);
    animation: revealText 1s cubic-bezier(0.86, 0, 0.07, 1) forwards;
}

.tagline .line:nth-child(2) {
    animation-delay: 0.2s;
}

@keyframes revealText {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.subtitle {
    font-family: 'Gotham', sans-serif;
    color: var(--blue);
    letter-spacing: 0.2em;
    font-size: 0.9rem;
    font-weight: 700;
    opacity: 0;
    animation: fadeIn 1s ease 0.8s forwards;
    position: relative;
    z-index: 2;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* Scroll anchor */
.scroll-anchor {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    cursor: pointer;
    z-index: 10;
}

.scroll-anchor .circle {
    width: 50px;
    height: 50px;
    border: 2px solid var(--blue);
    border-radius: 50%;
    opacity: 0.5;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    animation: breathe 2.5s infinite;
}

@keyframes breathe {
    0%, 100% { 
        transform: scale(1); 
        opacity: 0.5;
    }
    50% { 
        transform: scale(1.08);
        opacity: 0.7;
    }
}

.scroll-anchor .arrow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateY(-10px);
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 9px solid var(--blue);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-anchor:hover .arrow {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(0);
}

.scroll-anchor:hover .circle {
    animation: none;
    opacity: 0.9;
    background: rgba(0, 74, 160, 0.15);
}

/* Work section */
.work-section {
    margin-top: 8rem;
    padding-top: 8rem;
    padding-bottom: 12rem;
    position: relative;
    min-height: 80vh;
}

.work-header {
    font-family: 'Gotham', sans-serif;
    color: var(--gray);
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    margin-bottom: 3rem;
    font-weight: 700;
}

.header-subtitle {
    color: var(--gray);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    opacity: 0.6;
}

/* Asymmetric layout */
.work-grid.enhanced {
    display: flex;
    gap: 1.5rem;
    min-height: 500px;
    align-items: stretch;
}

.work-item.item1 {
    flex: 0 0 calc(50% - 0.75rem);
}

.work-grid.enhanced .work-item.item2:last-child {
    flex: 0 0 calc(50% - 0.75rem);
}

.right-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 1.5rem;
}

.right-grid .work-item {
    position: relative;
    min-height: 0;
}

.right-grid .item2 {
    grid-column: 1;
    grid-row: 1;
}

.right-grid .item3 {
    grid-column: 2;
    grid-row: 1;
}

.right-grid .item4 {
    grid-column: 1;
    grid-row: 2;
}

.right-grid .item5 {
    grid-column: 2;
    grid-row: 2;
}

.right-grid .work-thumbnail-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.right-grid .work-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Work item base */
.work-grid.enhanced .work-item {
    position: relative;
    overflow: hidden;
    background: var(--black);
    border: 2px solid transparent;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
    cursor: pointer;
}

/* Coming soon */
.work-item.coming-soon {
    background: transparent !important;
    border: 2px solid transparent;
    background-image: 
        linear-gradient(#000, #000),
        linear-gradient(90deg, 
            rgba(0, 74, 160, 0.1),
            rgba(0, 74, 160, 0.4),
            rgba(0, 74, 160, 0.1));
    background-origin: border-box;
    background-clip: padding-box, border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.320, 1);
    animation: phase 3s infinite;
}

@keyframes phase {
    0%, 100% { 
        background-image: 
            linear-gradient(#000, #000),
            linear-gradient(90deg, 
                rgba(0, 74, 160, 0.1),
                rgba(0, 74, 160, 0.4),
                rgba(0, 74, 160, 0.1));
    }
    50% { 
        background-image: 
            linear-gradient(#000, #000),
            linear-gradient(270deg, 
                rgba(0, 74, 160, 0.1),
                rgba(0, 74, 160, 0.4),
                rgba(0, 74, 160, 0.1));
    }
}

.work-item.coming-soon:hover {
    transform: none;
    animation-duration: 1.5s;
    box-shadow: 0 0 30px rgba(0, 74, 160, 0.2);
}

.work-item.coming-soon:hover .work-title {
    animation: pulse 2s infinite;
}

.work-item.coming-soon:active {
    transform: scale(0.98);
}

.coming-soon .work-content {
    position: relative;
    padding: 2rem;
    text-align: center;
    transform: none;
    opacity: 1;
}

.coming-soon .work-title {
    color: rgba(0, 74, 160, 0.5);
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    text-shadow: none;
}

.coming-soon .work-client {
    opacity: 0.5;
    transform: none;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10% { transform: translateX(-8px) rotate(-1deg); }
    20% { transform: translateX(8px) rotate(1deg); }
    30% { transform: translateX(-6px) rotate(-1deg); }
    40% { transform: translateX(6px) rotate(0.5deg); }
    50% { transform: translateX(-4px); }
    60% { transform: translateX(4px); }
    70% { transform: translateX(-2px); }
    80% { transform: translateX(2px); }
    90% { transform: translateX(-1px); }
}

.coming-soon.shake {
    animation: shake 0.3s ease;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

/* Scroll anchors */
.scroll-anchor-about,
.scroll-anchor-contact {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    cursor: pointer;
    z-index: 50;
    pointer-events: all;
}

.scroll-anchor-about .circle,
.scroll-anchor-contact .circle {
    width: 50px;
    height: 50px;
    border: 2px solid var(--blue);
    border-radius: 50%;
    opacity: 0.5;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    animation: breathe 2.5s infinite;
}

.scroll-anchor-about .arrow,
.scroll-anchor-contact .arrow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateY(-10px);
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 9px solid var(--blue);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-anchor-about:hover .arrow,
.scroll-anchor-contact:hover .arrow {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(0);
}

.scroll-anchor-about:hover .circle,
.scroll-anchor-contact:hover .circle {
    animation: none;
    opacity: 0.9;
    background: rgba(0, 74, 160, 0.15);
}

/* Thumbnail wrapper */
.work-thumbnail-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.work-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
}

/* Dark overlay */
.work-grid.enhanced .work-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, 
        rgba(0,0,0,0) 0%, 
        rgba(0,0,0,0.4) 50%, 
        rgba(0,0,0,0.95) 100%);
    z-index: 1;
    transition: background 0.4s ease;
    pointer-events: none;
}

/* Video preview */
.work-video-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.6s ease;
    z-index: 0;
    pointer-events: none;
}

/* Play icon */
.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    color: var(--light-gray);
    z-index: 3;
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.320, 1);
    pointer-events: none;
}

.play-icon svg {
    filter: drop-shadow(0 2px 20px rgba(0,0,0,0.8));
}

/* Content styling */
.work-grid.enhanced .work-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    z-index: 2;
    background: none;
    opacity: 1;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
}

.work-grid.enhanced .work-title {
    font-family: 'Gotham', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.320, 1);
    text-shadow: 0 2px 8px rgba(0,0,0,0.9);
}

.work-grid.enhanced .work-client {
    font-family: 'Gotham', sans-serif;
    color: var(--light-gray);
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    font-weight: 700;
    opacity: 0.7;
    transform: translateY(0);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1) 0.1s;
    text-shadow: 0 1px 4px rgba(0,0,0,0.9);
}

/* Hover states */
.work-grid.enhanced .work-item:hover {
    transform: scale(1.03);
    border-color: var(--blue);
    z-index: 10;
    box-shadow: 0 20px 40px rgba(0, 74, 160, 0.3);
}

.work-grid.enhanced .work-item:hover::before {
    background: linear-gradient(to bottom, 
        rgba(0,0,0,0) 0%, 
        rgba(0,0,0,0.2) 50%, 
        rgba(0,0,0,0.9) 100%);
}

.work-grid.enhanced .work-item:hover .work-thumbnail {
    transform: scale(1.1);
    filter: contrast(1.1) brightness(1.05);
}

.work-grid.enhanced .work-item:hover .work-video-preview {
    opacity: 1;
}

.work-grid.enhanced .work-item:hover .play-icon {
    transform: translate(-50%, -50%) scale(1);
}

.work-grid.enhanced .work-item:hover .work-title {
    transform: translateY(-5px);
}

.work-grid.enhanced .work-item:hover .work-client {
    opacity: 1;
    transform: translateY(0);
}

/* About section */
.about {
    margin-top: 12rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    padding-top: 20vh;
    padding-bottom: 10rem;
    position: relative;
}

.about h2 {
    font-family: 'Gotham', sans-serif;
    font-weight: 700;
    letter-spacing: 0.2em;
    margin-bottom: 3rem;
    font-size: 2.25rem;
}

.about p {
    font-family: 'Gotham', sans-serif;
    color: #8B949E;
    line-height: 1.8;
    margin-bottom: 2rem;
    font-weight: 700;
}

.about .highlight {
    color: var(--light-gray);
    font-weight: 700;
}

/* Slot words */
.slot-word {
    position: relative;
    display: inline-block;
    cursor: pointer;
    user-select: none;
    color: var(--blue);
    padding: 0 3px;
    padding-right: 24px;
    min-width: fit-content;
    transition: all 0.2s ease;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-decoration-color: rgba(0, 74, 160, 0.3);
    text-underline-offset: 3px;
    border-radius: 2px;
}

.slot-word::after {
    content: '⟲';
    position: absolute;
    right: 3px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9em;
    opacity: 0.5;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.slot-word:hover {
    background: rgba(0, 74, 160, 0.08);
    text-decoration-color: rgba(0, 74, 160, 0.5);
}

.slot-word:hover::after {
    opacity: 0.8;
    transform: translateY(-50%) rotate(90deg);
}

.slot-word:active {
    transform: scale(0.98);
    background: rgba(0, 74, 160, 0.15);
}

.slot-word:active::after {
    opacity: 1;
    transform: translateY(-50%) rotate(180deg);
}

@keyframes slotRoll {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
        filter: blur(0);
    }
    25% {
        transform: translateY(-8px) scale(1.15);
        opacity: 0;
        filter: blur(2px);
    }
    50% {
        transform: translateY(8px) scale(1.15);
        opacity: 0;
        filter: blur(2px);
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
        filter: blur(0);
    }
}

@keyframes colorShift {
    0%, 100% { color: var(--blue); }
    50% { color: rgba(236, 239, 241, 0.8); }
}

.slot-word.changing {
    animation: slotRoll 0.4s ease-out, colorShift 0.4s ease-out;
}

/* Contact */
.contact {
    margin-top: 8rem;
    text-align: center;
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.reactive-form-container {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.status-text {
    font-family: 'Gotham', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 1.75rem;
    min-height: 3rem;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
    color: var(--gray);
}

.status-text.active {
    color: var(--light-gray);
}

.status-text.ready {
    color: var(--blue);
}

.form-field {
    margin-bottom: 2rem;
    position: relative;
}

.input-field,
.textarea-field {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(236, 239, 241, 0.4);
    padding: 1.25rem 0;
    font-family: 'Gotham', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--light-gray);
    text-align: center;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.320, 1);
}

.textarea-field {
    border: 1px solid rgba(236, 239, 241, 0.4);
    border-radius: 0;
    padding: 1.5rem;
    text-align: center;
    min-height: 150px;
    resize: vertical;
}

.input-field:focus,
.textarea-field:focus {
    outline: none;
    border-color: var(--blue);
}

.input-field:focus {
    border-bottom-width: 2px;
    margin-bottom: -1px;
}

.textarea-field:focus {
    background: rgba(0, 74, 160, 0.02);
    transform: scale(1.01);
}

.input-field::placeholder,
.textarea-field::placeholder {
    color: rgba(236, 239, 241, 0.3);
    font-weight: 700;
    text-align: center;
}

.submit-btn {
    margin-top: 2rem;
    padding: 1rem 3rem;
    background: rgba(0, 74, 160, 0.05);
    border: 2px solid rgba(0, 74, 160, 0.3);
    color: rgba(236, 239, 241, 0.6);
    font-family: 'Gotham', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.320, 1);
}

.form-ready .submit-btn {
    border-color: var(--blue);
    color: var(--blue);
    background: transparent;
    opacity: 1;
}

.form-ready .submit-btn:hover {
    background: var(--blue);
    color: var(--black);
    transform: scale(1.05);
}

.submit-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.form-alternative {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(69, 90, 100, 0.2);
    font-family: 'Gotham', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--light-gray);
}

.form-alternative a {
    color: var(--blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

.form-alternative a:hover {
    color: var(--light-gray);
}

.social-links {
    margin-top: 2rem;
    display: flex;
    gap: 2.5rem;
    justify-content: center;
}

.social-links a {
    color: var(--gray);
    transition: all 0.3s cubic-bezier(0.23, 1, 0.320, 1);
    opacity: 0.7;
}

.social-links a:hover {
    color: var(--blue);
    opacity: 1;
    transform: translateY(-2px);
}

/* Video Modal */
.video-modal {
    display: none;
    position: fixed;
    z-index: 100000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.video-modal.show {
    display: flex;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    padding: 20px;
    background: #0a0a0a;
    border-radius: 4px;
    overflow-y: auto;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: #0a0a0a;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.modal-description {
    margin-top: 1.5rem;
    padding: 1.5rem;
    border-top: 1px solid rgba(0, 74, 160, 0.2);
    color: #eceff1;
    font-size: 0.9rem;
    font-family: 'Gotham', sans-serif;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1.8;
}

.modal-description h3 {
    color: #ffffff;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.modal-description .project-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
    color: var(--blue);
    font-size: 0.85rem;
}

.modal-description a {
    color: var(--blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

.modal-description a:hover {
    color: var(--light-gray);
}

/* Project description formatting */
.project-details {
    margin-top: 1.5rem;
    line-height: 1.8;
    color: #eceff1;
    text-align: left;
    font-weight: 700;
}

.project-details strong,
.project-details b {
    font-weight: 700;
    color: #ffffff;
}

/* Allow colored elements to pass color to nested strong/b */
.project-details [style*="color"] strong,
.project-details [style*="color"] b,
.project-details strong[style*="color"],
.project-details b[style*="color"] {
    color: inherit;
}

.project-details em,
.project-details i {
    font-style: italic;
}

.project-details p {
    margin-bottom: 1rem;
}

.project-details br {
    display: block;
    content: "";
    margin-bottom: 0.75rem;
}

.project-details ul,
.project-details ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.project-details li {
    margin-bottom: 0.5rem;
}

.project-details a {
    color: var(--blue);
    text-decoration: underline;
}

.project-details h1:not([style*="color"]),
.project-details h2:not([style*="color"]),
.project-details h3:not([style*="color"]),
.project-details h4:not([style*="color"]),
.project-details h5:not([style*="color"]),
.project-details h6:not([style*="color"]) {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: #004aa0;
}

/* Headings with inline color styles - preserve margins/weight but allow custom color */
.project-details h1[style*="color"],
.project-details h2[style*="color"],
.project-details h3[style*="color"],
.project-details h4[style*="color"],
.project-details h5[style*="color"],
.project-details h6[style*="color"] {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.project-details h1 { font-size: 2em; }
.project-details h2 { font-size: 1.5em; }
.project-details h3 { font-size: 1.17em; }
.project-details h4 { font-size: 1em; }
.project-details h5 { font-size: 0.83em; }
.project-details h6 { font-size: 0.67em; }

/* Web project specific modal styling */
.web-project-content {
    max-width: 900px;
    margin: 0 auto;
}

.web-project-content p {
    margin-bottom: 1.25rem;
}

.close-modal-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
    margin-bottom: 20px;
    padding: 10px 0;
}

.close-hint {
    font-family: 'Gotham', sans-serif;
    color: var(--gray);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    opacity: 0.6;
}

.close-modal {
    font-family: 'Gotham', sans-serif;
    font-size: 2.5rem;
    color: var(--light-gray);
    background: transparent;
    border: none;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
}

.close-modal:hover {
    color: var(--blue);
    transform: scale(1.1);
}

/* Mobile fixes */
@media screen and (max-width: 768px) {
    nav {
        background: rgba(0, 0, 0, 0.98) !important;
        backdrop-filter: blur(10px) !important;
        border-bottom: 1px solid rgba(69, 90, 100, 0.2) !important;
    }
    
    .sub-header {
        background: rgba(0, 0, 0, 0.95) !important;
    }
    
    main {
        padding-top: 180px !important;
    }
    
    .work-grid.enhanced {
        display: flex !important;
        flex-direction: column !important;
    }
    
    .right-grid {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
    }
    
    .work-item,
    .work-item.item1,
    .work-item.item2,
    .work-item.item3,
    .work-item.item4,
    .work-item.item5 {
        width: 100% !important;
        margin-bottom: 1rem !important;
        min-height: 250px !important;
    }

    .work-title {
        white-space: normal !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 3 !important;
        -webkit-box-orient: vertical !important;
        line-height: 1.3 !important;
        max-height: 3.9em !important;
    }
    
    .work-section {
        padding-bottom: 6rem !important;
    }
    
    .slot-word {
        display: inline !important;
        margin: 0 2px !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }
    
    .nav-left, .nav-right {
        gap: 1rem !important;
    }
    
    .nav-links a {
        font-size: 0.75rem !important;
        letter-spacing: 0.1em !important;
    }
    
    .logo-icon {
        height: 50px !important;
    }
    
    .nav-content {
        display: grid !important;
        grid-template-columns: 1fr auto 1fr !important;
        align-items: center !important;
    }
    
    .nav-left {
        justify-content: flex-end !important;
    }
    
    .nav-right {
        justify-content: flex-start !important;
    }
    
    .logo-container {
        padding: 0.5rem 1rem !important;
    }
    
    .about {
        padding: 4rem 1.5rem 9rem !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }
    
    .about p {
        margin-bottom: 1rem !important;
        line-height: 1.5 !important;
        font-size: 0.95rem !important;
    }
    
    .about h2 {
        font-size: 1.75rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    .scroll-anchor-contact {
        bottom: 6rem !important;
    }
    
    .submit-btn {
        border: 2px solid var(--blue) !important;
        border-color: var(--blue) !important;
    }
    
    .work-item.coming-soon {
        border: 2px solid var(--blue) !important;
        background-image: none !important;
        background: var(--black) !important;
        animation: none !important;
    }
    
    section#contact .reactive-form-container .form-alternative {
        text-align: center !important;
    }
    
    section#contact .reactive-form-container .form-alternative p:last-of-type {
        text-align: center !important;
    }
    
    section#contact .reactive-form-container .form-alternative p:last-of-type a {
        display: table !important;
        margin-left: auto !important;
        margin-right: auto !important;
        font-size: 0.8rem !important;
    }
    
    .contact {
        margin-top: 4rem !important;
        padding-top: 2rem !important;
        padding-bottom: 3rem !important;
    }
    
    body {
        min-height: auto !important;
    }
}