/* ==========================================================================
   Marco Budow Portfolio - Stylesheet
   ========================================================================== */

/* ==========================================================================
   1. Variables & Reset
   ========================================================================== */

:root {
    /* Colors - Light Mode */
    --bg-color: #f8f9fa;
    --bg-alt-color: #ffffff;
    --text-color: #1a1a1a;
    --text-light: #555555;
    --primary-color: #2a9d8f;
    --primary-hover: #21867a;
    --secondary-color: #e9c46a;
    --accent-color: #e76f51;
    --border-color: #e5e5e5;
    --card-bg: #ffffff;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    /* Layout */
    --container-width: 1200px;
    --header-height: 80px;
    --radius: 24px;
}

[data-theme="dark"] {
    --bg-color: #0f0f0f;
    --bg-alt-color: #1a1a1a;
    --text-color: #f0f0f0;
    --text-light: #a0a0a0;
    --primary-color: #4db6ac;
    --primary-hover: #80cbc4;
    --border-color: #333333;
    --card-bg: #1a1a1a;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);
}

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

/* ==========================================================================
   2. Lenis Smooth Scroll
   ========================================================================== */

html.lenis {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-scrolling iframe {
    pointer-events: none;
}

/* ==========================================================================
   3. Base Styles
   ========================================================================== */

body {
    font-family: "Inter", sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
    overflow-x: hidden;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

img {
    max-width: 100%;
    height: auto;
}

/* ==========================================================================
   4. Typography
   ========================================================================== */

h1,
h2,
h3 {
    font-family: "Outfit", sans-serif;
    line-height: 1.1;
    color: var(--text-color);
    letter-spacing: -0.03em;
}

h1 {
    font-size: 4.5rem;
    font-weight: 800;
    margin-bottom: var(--spacing-sm);
}

h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

p {
    margin-bottom: var(--spacing-sm);
    font-size: 1.1rem;
}

/* ==========================================================================
   5. Utility Classes
   ========================================================================== */

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.section {
    padding: var(--spacing-xl) 0;
}

.section--bg-alt {
    background-color: var(--bg-alt-color);
}

.section__title {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-intro {
    max-width: 800px;
    margin: 0 auto 3rem;
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-light);
}

/* ==========================================================================
   6. Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid transparent;
    gap: 0.5rem;
    font-size: 1rem;
    font-family: "Outfit", sans-serif;
}

.btn:active {
    transform: scale(0.95);
}

.btn--primary {
    background-color: var(--text-color);
    color: var(--bg-color);
}

.btn--primary:hover {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 10px 30px rgba(42, 157, 143, 0.4);
}

.btn--secondary {
    background-color: transparent;
    border-color: var(--text-color);
    color: var(--text-color);
}

.btn--secondary:hover {
    background-color: var(--text-color);
    color: var(--bg-color);
}

.btn--outline {
    border-color: var(--border-color);
    color: var(--text-color);
    background-color: var(--bg-alt-color);
}

.btn--outline:hover {
    border-color: var(--text-color);
}

/* ==========================================================================
   7. Header - Glassmorphism
   ========================================================================== */

.header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: var(--container-width);
    height: 60px;
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 20px;
}

[data-theme="dark"] .header {
    background-color: rgba(30, 30, 30, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-family: "Outfit", sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-color);
}

.nav__list {
    display: flex;
    gap: 2rem;
}

.nav__link {
    font-weight: 500;
    font-size: 0.9rem;
    opacity: 0.7;
}

.nav__link:hover {
    opacity: 1;
    color: var(--primary-color);
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-color);
    padding: 0.5rem;
    transition: transform 0.3s;
}

.theme-toggle:hover {
    transform: rotate(180deg);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.hamburger {
    width: 24px;
    height: 2px;
    background: var(--text-color);
    position: relative;
    display: block;
}

.hamburger::before,
.hamburger::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 2px;
    background: var(--text-color);
    left: 0;
}

.hamburger::before {
    top: -6px;
}

.hamburger::after {
    bottom: -6px;
}

/* ==========================================================================
   8. Hero Section - Mesh Gradient
   ========================================================================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    padding-top: 100px;
}

.hero::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 50% 50%, rgba(42, 157, 143, 0.15), transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(233, 196, 106, 0.15), transparent 40%),
        radial-gradient(circle at 20% 80%, rgba(231, 111, 81, 0.15), transparent 40%);
    animation: mesh 20s infinite linear;
    z-index: -1;
    filter: blur(60px);
}

@keyframes mesh {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.hero__title {
    background: linear-gradient(135deg, var(--text-color) 30%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.hero__subtitle {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    font-weight: 400;
}

.hero__text {
    max-width: 600px;
    margin: 0 auto 3rem;
    font-size: 1.2rem;
    color: var(--text-light);
}

.hero__actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* ==========================================================================
   9. Bento Grid System
   ========================================================================== */

.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.bento-grid--projects {
    grid-template-columns: repeat(3, 1fr);
}

.bento-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: transform 0.1s ease, box-shadow 0.4s ease, border-color 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.bento-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.bento-card--large {
    grid-column: span 2;
}

.bento-card--wide {
    grid-column: 1 / -1;
}

.bento-card--featured {
    grid-column: span 2;
    grid-row: span 2;
}

.bento-card__title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.bento-card__desc {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.bento-card__list li {
    margin-bottom: 0.5rem;
    padding-left: 1.2rem;
    position: relative;
    font-size: 0.95rem;
}

.bento-card__list li::before {
    content: "•";
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.bento-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.bento-card__tags span {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.bento-card__icon {
    font-size: 3rem;
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    opacity: 0.1;
    transition: opacity 0.3s, transform 0.3s;
}

.bento-card:hover .bento-card__icon {
    opacity: 0.2;
    transform: scale(1.1);
}

.bento-card__visual {
    font-size: 5rem;
    text-align: center;
    margin-top: 2rem;
    opacity: 0.8;
}

/* ==========================================================================
   10. Project Cards
   ========================================================================== */

.project-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.project-header {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.project-title {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.project-teaser {
    font-size: 1.1rem;
    color: var(--text-light);
    font-style: italic;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    background: var(--bg-color);
    padding: 1rem;
    border-radius: 12px;
}

.project-meta li strong {
    color: var(--primary-color);
}

.project-body h4 {
    font-size: 1.2rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.project-body ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.project-body p {
    color: var(--text-light);
}

/* ==========================================================================
   11. Resume Timeline
   ========================================================================== */

.timeline {
    max-width: 800px;
    margin: 0 auto;
    border-left: 2px solid var(--border-color);
    padding-left: 2rem;
}

.timeline__item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline__item::before {
    content: "";
    position: absolute;
    left: -39px;
    top: 0;
    width: 16px;
    height: 16px;
    background: var(--bg-color);
    border: 4px solid var(--primary-color);
    border-radius: 50%;
}

.timeline__date {
    font-family: "Outfit", sans-serif;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.timeline__role {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.timeline__company {
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

/* ==========================================================================
   12. Contact Section
   ========================================================================== */

.contact-form {
    max-width: 600px;
    margin: 0 auto 3rem;
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-color);
    color: var(--text-color);
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.contact__links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.contact__link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--bg-alt-color);
    border-radius: 50px;
    font-weight: 500;
    border: 1px solid var(--border-color);
}

.contact__link:hover {
    background: var(--text-color);
    color: var(--bg-color);
    border-color: var(--text-color);
}

.contact__link svg {
    flex-shrink: 0;
}

/* ==========================================================================
   13. Footer
   ========================================================================== */

.footer {
    padding: 3rem 0;
    text-align: center;
    color: var(--text-light);
    border-top: 1px solid var(--border-color);
}

.footer__container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    justify-content: center;
}

.footer__links {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
}

.footer__links a {
    opacity: 0.8;
}

.footer__links a:hover {
    opacity: 1;
    color: var(--primary-color);
}

/* ==========================================================================
   14. Accessibility
   ========================================================================== */

.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-color);
    color: var(--bg-color);
    padding: 1rem 2rem;
    border-radius: 0 0 12px 12px;
    z-index: 9999;
    transition: top 0.3s;
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Focus visible styles for keyboard navigation */
:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Remove outline for mouse users */
:focus:not(:focus-visible) {
    outline: none;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero::before {
        animation: none;
    }
}

/* ==========================================================================
   15. Animations
   ========================================================================== */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   16. Legal Pages
   ========================================================================== */

.legal-content {
    max-width: 800px;
    margin: 0 auto;
}

.legal-content h2 {
    font-size: 1.5rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.legal-content h2:first-of-type {
    margin-top: 0;
}

.legal-content h3 {
    font-size: 1.2rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.legal-content p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

.legal-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

.legal-content a:hover {
    color: var(--primary-hover);
}

.legal-content ul {
    list-style: disc;
    padding-left: 2rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.legal-content ul li {
    margin-bottom: 0.25rem;
}

.legal-content__date {
    margin-top: 3rem;
    font-size: 0.9rem;
    font-style: italic;
}

.section--legal {
    padding-top: 140px;
}

/* ==========================================================================
   17. Responsive Design
   ========================================================================== */

@media (max-width: 900px) {
    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2.25rem;
    }

    .bento-grid--projects {
        grid-template-columns: 1fr;
    }

    .bento-card--large,
    .bento-card--wide,
    .bento-card--featured {
        grid-column: span 1;
    }

    .hero__title {
        font-size: 3rem;
    }

    .header {
        width: 95%;
        top: 10px;
        padding: 0 15px;
    }

    .nav__list {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--bg-color);
        flex-direction: column;
        padding: 2rem;
        border-radius: 20px;
        box-shadow: var(--shadow-lg);
    }

    .nav__list.active {
        display: flex;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .hero {
        padding-top: 120px;
    }

    .hero__actions {
        flex-direction: column;
        align-items: center;
    }

    .project-meta {
        flex-direction: column;
        gap: 0.75rem;
    }

    .contact__links {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2.5rem;
    }

    .hero__subtitle {
        font-size: 1.2rem;
    }

    .project-card {
        padding: 1.5rem;
    }

    .bento-card {
        padding: 1.5rem;
    }
}
