/* ============================================================
   desca.dev - Swiss-Grid Urban Nightscape
   Colors: #0C1628, #162040, #1A2A48, #5A8AB0, #B08A5A, #E0E4EA, #6A7A9A, #70B0D0, #3A5A8A
   Fonts: Space Grotesk, Inter, JetBrains Mono
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background-color: #0C1628;
    color: #E0E4EA;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.05vw, 1.05rem);
    line-height: 1.75;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: #5A8AB0;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #70B0D0;
}

/* --- Visible 12-Column Swiss Grid Overlay --- */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 0;
    pointer-events: none;
    z-index: 1;
    padding: 0 calc((100vw - 1200px) / 2);
    opacity: 0;
    transition: opacity 1s ease 0.5s;
}

.grid-overlay.visible {
    opacity: 1;
}

.grid-line {
    border-left: 1px solid rgba(26, 42, 72, 0.15);
    height: 100%;
}

.grid-line:last-child {
    border-right: 1px solid rgba(26, 42, 72, 0.15);
}

@media (max-width: 1280px) {
    .grid-overlay {
        padding: 0 24px;
    }
}

/* --- Navigation --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background-color: rgba(12, 22, 40, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(58, 90, 138, 0.3);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 48px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #E0E4EA;
    letter-spacing: -0.02em;
}

.nav-brand:hover {
    color: #E0E4EA;
}

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

.nav-link {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #6A7A9A;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #5A8AB0;
}

/* --- Skyline Hero Section --- */
.section-skyline {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    background-color: #0C1628;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.skyline-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 48px;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
    align-items: center;
}

.hero-text {
    grid-column: 1 / 9;
    padding-top: 60px;
}

.hero-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(4rem, 10vw, 8rem);
    line-height: 1;
    color: #E0E4EA;
    letter-spacing: -0.04em;
    margin-bottom: 24px;
}

.hero-title .letter {
    display: inline-block;
    filter: blur(8px);
    opacity: 0;
    transition: filter 0.6s ease, opacity 0.6s ease;
}

.hero-title .letter.revealed {
    filter: blur(0);
    opacity: 1;
}

.hero-subtitle {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.05vw, 1.05rem);
    line-height: 1.75;
    color: #6A7A9A;
    max-width: 540px;
    margin-bottom: 24px;
    opacity: 0;
    filter: blur(4px);
    transition: opacity 0.8s ease 1.2s, filter 0.8s ease 1.2s;
}

.hero-subtitle.revealed {
    opacity: 1;
    filter: blur(0);
}

.hero-illustration {
    grid-column: 9 / 13;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 60px;
}

.city-circuit-svg {
    width: 100%;
    max-width: 320px;
    height: auto;
}

/* SVG drawing animations */
.city-circuit-svg line,
.city-circuit-svg rect,
.city-circuit-svg path,
.city-circuit-svg circle {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.city-circuit-svg.draw line,
.city-circuit-svg.draw rect,
.city-circuit-svg.draw path,
.city-circuit-svg.draw circle {
    opacity: 1;
}

.svg-trace {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 2s ease;
}

.city-circuit-svg.draw .svg-trace {
    stroke-dashoffset: 0;
}

/* Skyline Silhouette */
.skyline-silhouette {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1;
    opacity: 0;
    transition: opacity 1s ease;
}

.skyline-silhouette.visible {
    opacity: 1;
}

.skyline-svg {
    width: 100%;
    height: 200px;
    display: block;
}

/* --- Section Dividers --- */
.section-divider {
    position: relative;
    width: 100%;
    height: 80px;
    background-color: #162040;
    display: flex;
    align-items: center;
    justify-content: center;
}

.divider-rule {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: rgba(58, 90, 138, 0.3);
}

.divider-annotation {
    position: relative;
    z-index: 2;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 10px;
    color: rgba(106, 122, 154, 0.5);
    background-color: #162040;
    padding: 0 16px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* --- Content Sections --- */
.section-content {
    position: relative;
    width: 100%;
    padding: 96px 0;
    background-color: #0C1628;
}

.section-content--final {
    padding-bottom: 120px;
}

.content-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 48px;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
}

.content-text {
    grid-column: 2 / 8;
}

.content-illustration {
    grid-column: 8 / 12;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* --- Blueprint Labels --- */
.blueprint-label {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 10px;
    color: rgba(106, 122, 154, 0.5);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.blueprint-label--hero {
    margin-bottom: 24px;
}

.illustration-label {
    margin-top: 16px;
    margin-bottom: 0;
    text-align: center;
}

/* --- Typography --- */
.section-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.2;
    color: #E0E4EA;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}

.body-text {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.05vw, 1.05rem);
    line-height: 1.75;
    color: #E0E4EA;
    margin-bottom: 24px;
}

.body-text:last-of-type {
    margin-bottom: 24px;
}

/* --- Work Items --- */
.work-item {
    margin-bottom: 48px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(26, 42, 72, 0.3);
}

.work-item:last-of-type {
    border-bottom: none;
}

.work-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: clamp(1.1rem, 1.5vw, 1.35rem);
    color: #E0E4EA;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.work-tag {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 12px;
    color: rgba(90, 138, 176, 0.7);
    letter-spacing: 0.08em;
}

/* --- Tool Items --- */
.tool-item {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 18px 0;
    border-bottom: 1px solid rgba(26, 42, 72, 0.3);
}

.tool-item:last-of-type {
    border-bottom: none;
}

.tool-name {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 14px;
    color: #B08A5A;
    white-space: nowrap;
    min-width: 120px;
}

.tool-separator {
    color: rgba(106, 122, 154, 0.4);
    font-size: 14px;
}

.tool-description {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(0.85rem, 1vw, 0.95rem);
    color: #6A7A9A;
    line-height: 1.6;
}

/* --- Contact Links --- */
.contact-links {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-link {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(26, 42, 72, 0.3);
    transition: border-color 0.3s ease;
}

.contact-link:hover {
    border-color: rgba(90, 138, 176, 0.5);
}

.contact-label {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 12px;
    color: #6A7A9A;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    min-width: 80px;
}

.contact-value {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.05vw, 1.05rem);
    color: #5A8AB0;
    transition: color 0.3s ease;
}

.contact-link:hover .contact-value {
    color: #70B0D0;
}

/* --- Section SVGs --- */
.section-svg {
    width: 100%;
    max-width: 280px;
    height: auto;
}

/* --- Blur-Focus Entry Animation --- */
.blur-entry {
    opacity: 0;
    filter: blur(4px);
    transform: translateY(15px);
    transition: opacity 0.6s ease, filter 0.6s ease, transform 0.6s ease;
}

.blur-entry.visible {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

/* --- Footer --- */
.site-footer {
    width: 100%;
    padding: 48px 0;
    background-color: #162040;
    border-top: 1px solid rgba(58, 90, 138, 0.3);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-brand {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: #6A7A9A;
    letter-spacing: -0.02em;
}

.footer-annotation {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 10px;
    color: rgba(106, 122, 154, 0.5);
    letter-spacing: 0.1em;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .nav-inner {
        padding: 0 24px;
    }

    .nav-links {
        gap: 20px;
    }

    .skyline-content {
        padding: 0 24px;
        grid-template-columns: 1fr;
    }

    .hero-text {
        grid-column: 1 / -1;
    }

    .hero-illustration {
        grid-column: 1 / -1;
        padding-top: 24px;
    }

    .city-circuit-svg {
        max-width: 240px;
    }

    .content-grid {
        padding: 0 24px;
        grid-template-columns: 1fr;
    }

    .content-text {
        grid-column: 1 / -1;
    }

    .content-illustration {
        grid-column: 1 / -1;
    }

    .section-svg {
        max-width: 200px;
    }

    .tool-item {
        flex-direction: column;
        gap: 4px;
    }

    .tool-separator {
        display: none;
    }

    .footer-inner {
        padding: 0 24px;
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .nav-links {
        gap: 14px;
    }

    .nav-link {
        font-size: 12px;
    }

    .hero-title {
        font-size: clamp(2.5rem, 12vw, 4rem);
    }

    .section-content {
        padding: 72px 0;
    }

    .contact-link {
        flex-direction: column;
        gap: 4px;
    }
}
