:root {
    --color-background: #F5F6F7;
    --color-surface: #D6E0E2;
    --color-primary: #607B8A;
    --color-primary-dark: #455763;
    --color-secondary: #C6D1D9;
    --color-accent-soft: #EBE2DA;
    --color-text: #1F1F1F;
    --color-text-muted: #4B4B4B;
    --color-border: #D9DEE2;
}

body {
    margin: 0;
    font-family: 'Inter', Arial, sans-serif;
    background: var(--color-background);
    color: var(--color-text);
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-primary-dark);
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 70px;
}

nav,
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1rem;
    background: var(--color-surface);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 2rem;
}

.nav-links li {
    display: inline;
}

.navbar a {
    text-decoration: none;
    color: inherit;
    font-size: 1rem;
    transition: color 0.3s ease;
}

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

.navbar a.active {
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 0.5rem;
}

.logo img{
    width: 32px;
    height: auto;
}

.hero {
    min-height: calc(100vh - 70px);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 1.25rem 2.5rem;
}

.hero-content {
    max-width: 600px;
}

.hero h1 {
    font-size: 1.4rem;
    margin-bottom: 0.25rem;
    font-weight: 400;
}

.hero h2 {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--color-text-muted);
    margin-bottom: 1.25rem;
}

.hero-image {
    margin-bottom: 1.75rem;
}

.hero-image img {
    width: 150px;
    height: 225px;
    border-radius: 50%;
    object-fit: cover;
}

.hero-doodle {
    position: absolute;
    pointer-events: none;
    opacity: 0.6;
}

.hero-doodle-plane {
    top: 37%;
    right: 69%;
    width: 100px;
}

.hero-doodle-star {
    top: 37%;
    right: 20%;
    width: 30px;
}

.hero-doodle-book {
    top: 43%;
    right: 13%;
    width: 22px;
}

.hero-doodle img {
    width: 100%;
    height: auto;
    display: block;
}

.hero p {
    line-height: 1.6;
    color: var(--color-text-muted);
    margin: 0 auto;
}

button:focus-visible,
a:focus-visible {
    outline: 3px solid var(--color-primary-dark);
    outline-offset: 3px;
}

.page-doodle {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
    width: 100%;
    z-index: -1;
}

.page-doodle img {
    width: 100%;
    height: auto;
    display: block;
}

#projects {
    padding: 3rem 1.25rem;
}

#projects h2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-surface);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    margin-bottom: 2.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.project-card img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    object-fit: cover;
}

.project-card h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--color-text);
}

.project-card p {
    margin: 0;
    line-height: 1.5;
    color: var(--color-text-muted);
}

.project-link {
    margin-top: 0.5rem;
    text-decoration: none;
    color: var(--color-primary-dark);
    font-weight: 600;
    border-bottom: 2px solid var(--color-primary-dark);
    width: fit-content;
}

.project-link:hover {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.technologies {
    padding: 3rem 1.25rem;
}

.technologies h2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
}

.tech-category {
    margin-bottom: 2.5rem;
}

.tech-category h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.tech-grid {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.tech-grid li {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.tech-grid img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.tech-grid p {
    margin: 0;
    font-size: 0.9rem;
}

.tech-grid li {
    transition: transform 0.2s ease;
}

.tech-grid li:hover {
    transform: translateY(-3px);
}

footer {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding: 2rem 1rem;
}

.footer-content {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    text-decoration: none;
    color: var(--color-text-muted);
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--color-primary);
}

.footer-copyright {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin: 0;
}

/* Project page layout */
.project-page {
    max-width: 760px;
    margin: 0 auto;
    padding: 1.5rem 1rem 4rem;
}

.project-header {
    padding: 1.5rem 0 0;
    max-width: 100%;
    margin: 0 0 2rem 0;
}

.back-link {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--color-primary-dark);
    text-decoration: none;
    font-weight: 600;
}

.back-link:hover {
    text-decoration: underline;
}

.project-header h1 {
    margin-bottom: 1rem;
    line-height: 1.15;
    font-size: 2rem;
}

.project-header p {
    line-height: 1.65;
    color: var(--color-text-muted);
    max-width: 65ch;
}

.project-meta {
    margin: 1.25rem 0;
    padding-left: 1.1rem;
}

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

.project-section {
    margin-bottom: 2.75rem;
}

.project-section h2 {
    margin-bottom: 0.9rem;
    font-size: 1.5rem;
}

.project-section h3 {
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}

.project-section p,
.project-section li {
    line-height: 1.65;
}

.project-section ul,
.project-section ol {
    padding-left: 1.2rem;
}

.project-media {
    margin: 1.25rem 0 0;
}

.project-media video,
.project-media img {
    width: 100%;
    display: block;
    border-radius: 10px;
    border: 1px solid var(--color-border);
}

.project-media--image {
    max-width: 420px;
}

.project-media--image img {
    margin: 0 auto;
}

.project-media figcaption {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    margin-top: 0.95rem;
    line-height: 1.5;
}

.lightbox-close:focus-visible,
.lightbox-nav:focus-visible {
    outline: 3px solid var(--color-primary-dark);
    outline-offset: 3px;
}

/* Lightbox */
.lightbox[hidden] {
    display: none;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
}

.lightbox-content {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
}

.lightbox-figure {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-figure img {
    display: block;
    max-width: min(100%, 900px);
    max-height: 75vh;
    width: auto;
    height: auto;
    border-radius: 10px;
    background: var(--color-surface);
}

.lightbox-figure figcaption {
    margin-top: 0.75rem;
    color: var(--color-surface);
    text-align: center;
    line-height: 1.5;
    max-width: 60ch;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    border: none;
    background-color: rgba(255, 255, 255, 0.12);
    color: var(--color-surface);
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    font-size: 1.75rem;
    cursor: pointer;
}

.lightbox-nav {
    border: none;
    background-color: rgba(255, 255, 255, 0.12);
    color: var(--color-surface);
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    font-size: 2rem;
    cursor: pointer;
}

.lightbox-prev,
.lightbox-next {
    align-self: center;
}

body.lightbox-open {
    overflow: hidden;
}

.featured-gallery {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 1.25rem;
}

.featured-image {
    display: block;
    margin: 0 auto;
    width: 65%;
    padding: 0;
    border: none;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: none;
}

.featured-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
    border: 1px solid var(--color-border);
}

.featured-image:hover img {
    transform: scale(1.01);
    transition: transform 0.2s ease;
}

.thumbnail-gallery {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
}

.thumbnail-item {
    display: block;
    width: 20%;
    padding: 0;
    border: none;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background-color: none;
}

.thumbnail-item img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.thumbnail-item:hover img {
    opacity: 1;
}

.thumbnail-item:focus-visible {
    outline: 3px solid var(--color-primary-dark);
    outline-offset: 3px;
}

.about-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem;
}

.about-header button {
    display: flex;
    gap: 0.5rem;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.about-header button img {
    width: 18px;
    height: 18px;
}

.about-header button a {
    margin-top: 0.1rem;
}

.about-header {
    margin-bottom: 2.5rem;
}

.about-header h1 {
    margin-bottom: 1rem;
    line-height: 1.2;
}

.about-lead {
    max-width: 700px;
    line-height: 1.6;
    color: var(--color-text-muted);
    margin: 0;
}

.about-section {
    margin-bottom: 2rem;
}

.about-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
}

.about-card h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.35rem;
    color: var(--color-text);
}

.about-card p {
    margin: 0 0 1rem 0;
    line-height: 1.65;
    color: var(--color-text-muted);
}

.about-card p:last-child {
    margin-bottom: 0;
}

.about-card li {
    color: var(--color-text-muted);
}

.intro-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.intro-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.intro-card h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.35rem;
    color: var(--color-text);
}

.intro-card p {
    margin: 0 0 1rem 0;
    line-height: 1.65;
    color: var(--color-text-muted);
}

.intro-card p:last-child {
    margin-bottom: 0;
}

.intro-image {
    width: 150px;
}


@media (min-width: 700px) {
    .page-doodle-1 {
        width: 100%;
        max-height: 290px;
        margin: 0 auto;
    }

    .page-doodle-2 {
        width: 100%;
        max-height: 300px;
        margin: 0 auto;
    }

    #projects-container {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }

    .project-card {
        margin-bottom: 0;
    }

    .technologies {
        max-width: 1000px;
        margin: 0 auto;
        padding: 3rem 2rem;
    }

    .tech-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 1.5rem;
    }

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

    .lightbox-content {
        gap: 1rem;
        padding: 2rem;
    }

    .intro-section {
        display: flex;
        flex-direction: row;
        align-items: stretch;
        gap: 1.5rem;
    }

    .intro-card {
        flex: 1;
        order: 1;
    }

    .intro-image {
        width: 150px;
        height: 100%;
        flex-shrink: 0;
        order: 2;
        object-fit: cover;
    }

    .featured-image {
        width: 30%;
    }

    .thumbnail-item {
        width: 15%;
    }
}

@media (min-width: 1080px) {
    .page-doodle-1 {
        width: 100%;
        height: 100px;
        margin: 0 auto;
    }

    .page-doodle-2 {
        width: 100%;
        max-height: 600px;
        margin: 0 auto;
    }
}