/* Design System & Custom Properties */
:root[data-theme="dark"] {
    --bg: #050505;
    --bg-secondary: #0d0d0d;
    --fg: #f3f3f3;
    --fg-muted: #888888;
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.3);
    --accent: #ffffff;
    --accent-inverse: #000000;
    --grid-line: rgba(255, 255, 255, 0.025);
    --selection-bg: #f3f3f3;
    --selection-fg: #050505;
    --feedback-success: #4ade80;
    --feedback-error: #f87171;
}

:root[data-theme="light"] {
    --bg: #fcfcfc;
    --bg-secondary: #f3f3f3;
    --fg: #0d0d0d;
    --fg-muted: #666666;
    --border: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.3);
    --accent: #000000;
    --accent-inverse: #ffffff;
    --grid-line: rgba(0, 0, 0, 0.025);
    --selection-bg: #0d0d0d;
    --selection-fg: #fcfcfc;
    --feedback-success: #15803d;
    --feedback-error: #b91c1c;
}

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

html,
body {
    width: 100%;
    height: 100%;
    background-color: var(--bg);
    color: var(--fg);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.6s cubic-bezier(0.16, 1, 0.3, 1), color 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

::selection {
    background-color: var(--selection-bg);
    color: var(--selection-fg);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--fg-muted);
}


/* Canvas Background */
#canvas-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
    opacity: 0.6;
}

/* Structural Background Grid Lines */
.grid-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    z-index: 2;
    pointer-events: none;
}

.grid-line {
    height: 100%;
    border-right: 1px solid var(--grid-line);
}

.grid-line:last-child {
    border-right: none;
}

/* App Container Layout */
.app-container {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem 5vw;
    z-index: 3;
}

/* Header */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-dot {
    width: 8px;
    height: 8px;
    background-color: var(--fg);
    border-radius: 50%;
}

.logo-text {
    font-family: 'Syne', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.15rem;
    color: var(--fg);
}



/* Main Content Area */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem 0;
}

.hero-section {
    max-width: 65rem;
}

/* Badges */
.badge-container {
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

.badge {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.25rem;
    color: var(--fg-muted);
    border-bottom: 1px solid var(--fg-muted);
    padding-bottom: 0.25rem;
}

/* Typography Title */
.main-title {
    font-family: 'Syne', sans-serif;
    font-size: clamp(3rem, 7.5vw, 6.5rem);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.02em;
    margin-bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    text-transform: uppercase;
}

.title-word {
    display: block;
    overflow: hidden;
    opacity: 0;
    transform: translateY(100px);
    animation: slideUpTitle 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.title-word:nth-child(1) {
    animation-delay: 0.1s;
}

.title-word:nth-child(2) {
    animation-delay: 0.25s;
}

.title-word:nth-child(3) {
    animation-delay: 0.4s;
}

.stroke-text {
    color: transparent;
    -webkit-text-stroke: 1px var(--fg);
}

/* Description */
.description {
    font-size: clamp(1rem, 2vw, 1.15rem);
    line-height: 1.6;
    font-weight: 300;
    color: var(--fg-muted);
    max-width: 38rem;
    margin-bottom: 0;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
}


/* Footer Section */
.main-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    padding-top: 2.5rem;
    margin-top: 0;
    width: 100%;
}

.copyright {
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 0.15rem;
    color: var(--fg-muted);
}



/* Social links list */
.social-links {
    display: flex;
    gap: 2rem;
}

.social-link {
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.15rem;
    color: var(--fg-muted);
    text-decoration: none;
    position: relative;
    padding-bottom: 2px;
    transition: color 0.3s;
}

.social-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--fg);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.social-link:hover {
    color: var(--fg);
}

.social-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Keyframe Animations */
@keyframes pulse {

    0%,
    100% {
        opacity: 0.4;
        transform: scale(0.9);
    }

    50% {
        opacity: 1;
        transform: scale(1.15);
    }
}

@keyframes blink {

    0%,
    100% {
        opacity: 0.2;
    }

    50% {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes slideUpTitle {
    0% {
        opacity: 0;
        transform: translateY(100px);
    }

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

/* Responsive Media Queries */
@media (max-width: 1024px) {
    .app-container {
        padding: 2.5rem 4vw;
    }

    .main-content {
        padding: 3rem 0;
    }
}

@media (max-width: 768px) {
    .grid-lines {
        grid-template-columns: repeat(3, 1fr);
    }

    .grid-line:nth-child(4) {
        display: none;
    }

    .app-container {
        padding: 2rem 6vw;
    }

    .main-content {
        padding: 2rem 0;
    }

    .main-title {
        margin-bottom: 2rem;
    }

}

@media (max-width: 600px) {
    .grid-lines {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-line:nth-child(3) {
        display: none;
    }

    .main-header {
        flex-direction: row;
        justify-content: space-between;
    }

    .main-footer {
        flex-direction: column;
        gap: 2rem;
        align-items: flex-start;
        padding-top: 2rem;
    }

    .social-links {
        flex-wrap: wrap;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .app-container {
        padding: 1.5rem 5vw;
    }

}