/* =============================================
   BASE & RESET
   ============================================= */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    background-color: #111111;
    color: #e2f0f0;
    min-height: 100vh;
}

/* =============================================
   ACCESSIBILITY
   ============================================= */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* =============================================
   LAYOUT
   ============================================= */
#app {
    padding: 16px;
}

.content-wrapper {
    max-width: 1168px;
    margin: 0 auto;
}

/* =============================================
   CONTENT ANIMATION
   ============================================= */
@keyframes sectionFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.main-content {
    animation: sectionFadeIn 0.4s ease-out both;
}

/* =============================================
   TYPOGRAPHY
   ============================================= */
h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #71946c;
    margin: 16px 0;
}

@media (min-width: 768px) {
    h2 {
        font-size: 2rem;
    }
}

/* =============================================
   SITE HEADER
   ============================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: #111111;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin: -16px -16px 16px;
    padding: 16px;
}

@media (min-width: 768px) {
    .site-header {
        flex-direction: row;
        align-items: flex-start;
        padding: 32px 16px 16px;
        margin: -32px -16px 16px;
    }
}

.site-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #71946c;
    margin: 0 0 12px;
    line-height: 1.1;
}

@media (min-width: 768px) {
    .site-title {
        font-size: 3rem;
        margin-bottom: 16px;
    }
}

.site-title a {
    color: inherit;
    text-decoration: none;
}

.site-subtitle {
    display: block;
    font-size: 1.125rem;
    font-weight: 400;
    margin-top: 4px;
    color: #71946c;
}

/* =============================================
   SOCIAL ICON LINKS
   ============================================= */
.social-links {
    display: flex;
    align-items: center;
    height: 42px;
    flex-shrink: 0;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.8125rem;
    color: #6b1919;
    margin-right: 16px;
    text-decoration: none;
    transition: color 0.2s ease;
    line-height: 1;
}

.social-link:last-child {
    margin-right: 0;
}

.social-link:hover {
    color: #a02626;
}

.social-link--resume {
    font-size: 0.9rem;
    font-weight: 600;
    gap: 7px;
    padding: 0 14px;
    height: 36px;
    border-radius: 999px;
    border: 1.5px solid #6b1919;
    color: #6b1919;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.social-link--resume:hover {
    background-color: #6b1919;
    color: #e2f0f0;
}


/* =============================================
   PAGE SECTION ROUTING
   ============================================= */
.page-section {
    display: none;
}

.page-section.section--active {
    display: block;
}

/* =============================================
   HOME: PROFILE / INTRO
   ============================================= */
.home-intro {
    display: flex;
    flex-direction: column;
    margin-bottom: 48px;
}

@media (min-width: 768px) {
    .home-intro {
        flex-direction: row;
        align-items: center;
        margin-bottom: 5vh;
        padding-top: 32px;
    }
}

.profile-image {
    display: block;
    max-width: 248px;
    border-radius: 50%;
    filter: grayscale(40%);
    margin: 0 auto 48px;
    transition: transform 0.3s ease;
}

.profile-image:hover {
    /*transform: scale(1.09);*/
}

@media (min-width: 768px) {
    .profile-image {
        flex-shrink: 0;
        margin: 0 48px 0 0;
    }
}

.intro-text {
    color: #ffffff;
    font-size: 1.5rem;
    line-height: 1.44;
}

@media (min-width: 768px) {
    .intro-text {
        font-size: 2rem;
        font-weight: 300;
    }
}

/* =============================================
   PROJECT CARDS GRID (2-column)
   ============================================= */
.card-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 0 0 32px;
    align-items: flex-start;
}

.project-card {
    width: 100%;
    margin: 8px 0;
    background-color: #1e1e1e;
    border: none;
    border-radius: 4px;
    color: #e2f0f0;
    text-align: left;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.44;
    padding: 24px;
    display: inline-block;
    vertical-align: top;
}

@media (min-width: 768px) {
    .project-card {
        width: calc(50% - 16px);
        margin: 8px;
        font-size: 1.125rem;
    }
}

button.project-card {
    cursor: pointer;
}

button.project-card:hover .card-title {
    color: #c52f2f;
}

button.project-card:hover .card-video video {
    filter: grayscale(0);
}

/* Video thumbnail inside card — bleeds to card edges */
.card-video {
    position: relative;
    margin: -24px -24px 0;
    background-color: #252525;
    border-radius: 4px 4px 0 0;
    overflow: hidden;
}

.card-video video {
    width: 100%;
    display: block;
    filter: grayscale(0.5);
    transition: filter 0.3s ease;
}

/* Meta bar overlaid on the bottom of the video */
.card-meta {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 16px;
    background: rgba(30, 30, 30, 0.85);
    font-size: 0.875rem;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

/* Card title (red heading with arrow) */
.card-title {
    color: #a02626;
    font-size: 1.125rem;
    font-weight: 700;
    margin: 12px 0 4px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    transition: color 0.2s ease;
}

@media (min-width: 768px) {
    .card-title {
        font-size: 1.5rem;
    }
}

.card-title-arrow {
    margin-left: auto;
    flex-shrink: 0;
    font-size: 0.875em;
    transition: margin-right 0.3s ease;
}

button.project-card:hover .card-title-arrow {
    margin-right: 10px;
}

.card-role {
    display: block;
    width: 100%;
    font-size: 0.875rem;
    font-weight: 400;
    color: #e2f0f0;
    margin-top: 2px;
}

.card-desc {
    margin: 8px 0 0;
    color: #e2f0f0;
    font-size: 0.95rem;
}

/* =============================================
   EDUCATION CARDS
   ============================================= */
.edu-title {
    color: #a02626;
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 6px;
}

.edu-year {
    font-weight: 400;
    font-size: 0.88em;
    color: #b0b0b0;
}

.edu-desc {
    color: #e2f0f0;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

/* =============================================
   SKILLS / BADGE TAGS
   ============================================= */
.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 8px;
    padding: 8px 12px 0;
    margin-bottom: 32px;
    list-style: none;
}

@media (min-width: 768px) {
    .skills-list {
        padding: 8px 46px 0;
    }
}

.skill-tag {
    font-size: 1.125rem;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #f46049;
    color: #f46049;
    white-space: nowrap;
    cursor: default;
    transition: background-color 0.1s ease, color 0.1s ease;
}

.skill-tag:hover {
    color: #121212;
    background-color: #f46049;
}

/* =============================================
   ABOUT ME PANEL  (dark anthracite — replaces old light-blue section)
   ============================================= */
.about-panel {
    background-color: #1c1c1c;
    border-radius: 4px;
    padding: 32px 24px 40px;
    margin-top: 24px;
}

.about-panel > h2 {
    color: #e2f0f0;
    margin-top: 0;
}

.about-panel-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #e2f0f0;
    margin: 0 0 16px;
}

@media (min-width: 768px) {
    .about-panel-text {
        font-size: 1.5rem;
    }
}

.email-link {
    color: #f46049;
    text-decoration: none;
    transition: color 0.2s ease;
}

.email-link:hover {
    color: #f53214;
}


/* =============================================
   PROJECT DETAIL PAGES
   ============================================= */
.detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.detail-header h2 {
    margin: 0;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: #71946c;
    padding: 0;
    transition: color 0.2s ease;
}

.back-btn:hover {
    color: #a2c49c;
}

.detail-video {
    width: 100%;
    background-color: #252525;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 24px;
}

.detail-video video {
    width: 100%;
    display: block;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 32px;
}

@media (min-width: 768px) {
    .detail-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.detail-card {
    background-color: #1e1e1e;
    border-radius: 4px;
    padding: 24px;
}

.detail-card.full-width {
    grid-column: 1 / -1;
}

.detail-card h3 {
    color: #71946c;
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 12px;
}

.detail-card p {
    line-height: 1.6;
    color: #e2f0f0;
    margin: 0 0 10px;
}

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

/* Info list (role, team, duration, engine) */
.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid #2a2a2a;
    color: #e2f0f0;
    line-height: 1.4;
}

.info-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-list li i {
    color: #71946c;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

/* Bullet list (role highlights, challenges, tools) */
.bullet-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bullet-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
    color: #e2f0f0;
    line-height: 1.5;
}

.bullet-list li:last-child {
    margin-bottom: 0;
}

.bullet-list li i {
    color: #71946c;
    margin-top: 3px;
    flex-shrink: 0;
    width: 16px;
    text-align: center;
}

/* =============================================
   FLOATING HOME BUTTON
   ============================================= */
.go-home {
    display: none;
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
}

body:not(.isHome) .go-home {
    display: flex;
    justify-content: center;
    align-items: center;
}

.go-home button {
    padding: 0 30px;
    height: 45px;
    background-color: #f46049;
    border: none;
    cursor: pointer;
    color: #111111;
    font-size: 16px;
    font-weight: 800;
    border-radius: 25px;
    font-family: inherit;
    white-space: nowrap;
    transition: background-color 0.2s ease;
}

.go-home button:hover {
    background-color: #f6bbb2;
}
