:root {
    --bg-color: #2b2820;
    --text-color: #e8dcc4;
    --accent-color: #d9a45b;
    --hover-color: #f0b166;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Inter", sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    transition: background-color 0.8s ease;
}

.background-effect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
    opacity: 0.15;
    background: radial-gradient(
        ellipse at center,
        transparent,
        rgba(217, 164, 91, 0.03) 40%,
        rgba(217, 164, 91, 0.05)
    );
    transition: opacity 0.8s ease;
}

.floating-dots {
    position: absolute;
    width: 2px;
    height: 2px;
    background-color: var(--accent-color);
    border-radius: 50%;
    opacity: 0.5;
}

.container {
    max-width: 1200px;
    width: 90%;
    margin: 0 auto;
    z-index: 2;
    position: relative;
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr auto;
    padding: 2rem 0;
    transition: opacity 0.5s ease;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    margin-bottom: 3rem;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

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

.social-links a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.social-links a:hover {
    color: var(--accent-color);
}

.social-icon {
    width: 18px;
    height: 18px;
}

main {
    padding: 1rem 0;
    display: flex;
    flex-direction: column;
}

.headline {
    font-size: clamp(2.5rem, 6vw, 4rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    max-width: 800px;
    color: var(--accent-color);
    text-align: left;
}

.subheadline {
    font-size: clamp(1.2rem, 2vw, 1.4rem);
    line-height: 1.3;
    margin-bottom: 5rem;
    max-width: 650px;
    color: var(--text-color);
    font-weight: 400;
    opacity: 0.9;
    text-align: left;
}

.work-heading {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    font-weight: 500;
}
.projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
    margin-bottom: 4.5rem;
}

.project-card {
    border: 1px solid rgba(217, 164, 91, 0.2);
    background-color: rgba(43, 40, 32, 0.5);
    border-radius: 12px;
    padding: 1.8rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.project-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.project-card h4 {
    color: var(--accent-color);
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    line-height: 1.3;
}

.project-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: 1.5rem;
    letter-spacing: 0.15px;
    font-weight: 400;
}

.card-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
}

.external-icon {
    width: 18px;
    height: 18px;
    opacity: 0.7;
    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
}

.project-card:hover .external-icon {
    opacity: 1;
    transform: translateY(-2px);
}

.team-section {
    margin-bottom: 3rem;
    padding: 2rem 0;
    position: relative;
}

.team-section h2 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-color);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.team-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.team-member {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.team-member a {
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px dashed rgba(217, 164, 91, 0.5);
    padding-bottom: 2px;
}

.team-member a:hover {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

.team-member p {
    font-size: 1rem;
    opacity: 0.8;
    font-style: italic;
    letter-spacing: 0.2px;
}

footer {
    text-align: left;
    font-size: 0.8rem;
    opacity: 0.7;
    padding: 1rem 0;
}

/* Interactive Escape Key Styles */
.escape-key {
    cursor: pointer;
    transition:
        transform 0.2s ease,
        filter 0.3s ease;
    position: relative;
    width: 50px;
    height: 50px;
}

.escape-key svg {
    width: 100%;
    height: 100%;
    transition: all 0.3s ease;
}

.escape-key:hover {
    transform: scale(1.05);
}

.escape-key:active {
    transform: scale(0.95);
}

.escape-key.pressed svg {
    filter: drop-shadow(0 0 8px var(--accent-color));
}

/* Escape Modal Styles */
.escape-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.5s ease,
        visibility 0.5s ease;
}

.escape-modal.active {
    opacity: 1;
    visibility: visible;
}

.escape-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 3rem;
    font-weight: 700;
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    border: 2px solid transparent;
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 30px rgba(255, 201, 142, 0.2);
    transition: all 0.3s ease;
}

.escape-link:hover {
    transform: scale(1.05);
    box-shadow: 0 0 50px rgba(255, 201, 142, 0.4);
    border-color: rgba(255, 201, 142, 0.5);
}

.escape-link .external-icon {
    width: 36px;
    height: 36px;
    stroke: var(--accent-color);
}

/* Chromatic text effect */
.chromatic-text {
    position: relative;
    color: white;
    text-shadow:
        2px 2px 0 #ff3366,
        -2px -2px 0 #00ddff,
        2px -2px 0 #99ff33,
        -2px 2px 0 #ffaa00;
    animation: chromatic-pulse 3s infinite alternate;
}

@keyframes chromatic-pulse {
    0% {
        text-shadow:
            2px 2px 0 #ff3366,
            -2px -2px 0 #00ddff,
            2px -2px 0 #99ff33,
            -2px 2px 0 #ffaa00;
    }
    50% {
        text-shadow:
            3px 3px 0 #ff00ff,
            -3px -3px 0 #00ffcc,
            3px -3px 0 #ffcc00,
            -3px 3px 0 #33ccff;
    }
    100% {
        text-shadow:
            2px 2px 0 #ff3366,
            -2px -2px 0 #00ddff,
            2px -2px 0 #99ff33,
            -2px 2px 0 #ffaa00;
    }
}

/* Dark mode when escape key is activated */
body.escape-mode {
    background-color: #000000;
}

body.escape-mode .background-effect {
    opacity: 0;
}

body.escape-mode .container {
    opacity: 0;
    pointer-events: none;
}

/* Rainbow border for escape key during hover */
.escape-key:hover svg rect,
.escape-key:hover svg line,
.escape-key:hover svg path {
    animation: rainbow-stroke 3s linear infinite;
}

@keyframes rainbow-stroke {
    0% {
        stroke: #ff3366;
    }
    20% {
        stroke: #ff9933;
    }
    40% {
        stroke: #99ff33;
    }
    60% {
        stroke: #33ccff;
    }
    80% {
        stroke: #cc66ff;
    }
    100% {
        stroke: #ff3366;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .social-links {
        width: 100%;
        justify-content: flex-start;
        gap: 1.2rem;
    }

    .headline {
        font-size: 2rem;
    }

    .projects {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .project-card {
        padding: 1.5rem;
    }

    .project-card h4 {
        font-size: 1.2rem;
    }

    .escape-link {
        font-size: 2rem;
        padding: 0.8rem 1.5rem;
    }

    .escape-link .external-icon {
        width: 24px;
        height: 24px;
    }
}
