/* Professional Data Science Portfolio - Hackerish Terminal Theme */

/* Import Doto Font */
@import url('https://fonts.googleapis.com/css2?family=Doto:wght@100..900&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette - Hackerish Terminal Theme */
    --white: #FFFFFF;
    --primary-green: #11520e;
    --accent-green: #1a7d15;
    --terminal-green: #22f357;
    --dark-bg: #0a0e0d;
    --grey-dark: #1a1f1d;
    --grey-medium: #6b7b73;
    --grey-light: #e8ede9;
    --grey-lighter: #f5f7f6;
    --code-bg: #0d1310;
    
    /* Typography */
    --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-brand: 'Doto', sans-serif;
    --font-code: 'JetBrains Mono', 'Courier New', monospace;
    
    /* Spacing */
    --content-max-width: 1200px;
    --section-padding: 60px 20px;
    --nav-height: 70px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.6;
    color: #1a1f1d;
    background: var(--white);
}

/* Typography */
h1 {
    font-size: 4.5rem;
    font-weight: 900;
    color: var(--primary-green);
    margin-bottom: 20px;
    line-height: 1.1;
    font-family: var(--font-brand);
}

h1 .personal-name {
    display: block;
}

h1 .company-name {
    display: none;
}

h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--grey-dark);
    margin-bottom: 40px;
    text-align: center;
}

h2::before, h3::before {
    content: '> ';
    color: var(--primary-green);
    font-family: var(--font-code);
    font-weight: 500;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--grey-dark);
    margin-bottom: 15px;
    text-align: left;
}

h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--grey-dark);
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--primary-green);
    margin-bottom: 30px;
    font-weight: 500;
    font-family: var(--font-code);
}

.lead {
    font-size: 1.25rem;
    color: var(--grey-medium);
    margin-bottom: 50px;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Navigation */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(17, 82, 14, 0.15);
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--light-green);
}

.nav-container {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 40px;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary-green);
    font-family: var(--font-brand);
    text-decoration: none;
    font-optical-sizing: auto;
    line-height: 1.2;
    letter-spacing: -0.5px;
    transition: opacity 0.2s ease;
}

.logo:hover {
    opacity: 0.8;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.mobile-menu-toggle .bar {
    height: 3px;
    width: 100%;
    background-color: var(--primary-green);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 40px;
    align-items: center;
}

.nav-link {
    color: var(--grey-medium);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    padding: 5px 0;
}

.nav-link:hover {
    color: var(--primary-green);
}

.nav-link.active {
    color: var(--primary-green);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-green);
}

.lang-switch-wrapper {
    display: flex;
    align-items: center;
    margin-left: 10px;
}

.lang-switch-container {
    display: flex;
    background: var(--grey-light);
    border-radius: 20px;
    padding: 3px;
    position: relative;
    border: 1px solid rgba(0,0,0,0.05);
}

.lang-option {
    padding: 5px 12px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--grey-medium);
    text-decoration: none;
    border-radius: 17px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--font-code);
    position: relative;
    z-index: 1;
}

.lang-option.active {
    background: var(--primary-green);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(17, 82, 14, 0.3);
}

.lang-option:not(.active):hover {
    color: var(--primary-green);
}

/* Section Styles */
.section {
    min-height: auto;
    padding: var(--section-padding);
    padding-top: calc(var(--nav-height) + 10px);
    width: 100%;
}

.section:first-of-type {
    padding-top: calc(var(--nav-height) + 80px);
}

.section-light {
    background: var(--white);
}

.section-dark {
    background: var(--grey-lighter);
}


/* Home Section */
#home {
    background: var(--dark-bg);
    display: flex;
    align-items: center;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

#home h1 {
    color: var(--terminal-green);
}

#home .lead {
    color: #a0b0a8;
}

#home .profile-portrait {
    border-color: var(--primary-green);
    box-shadow: 0 0 20px rgba(46, 168, 39, 0.2);
}

#home .profile-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(34, 243, 87, 0.2);
    border-left: 4px solid var(--terminal-green);
    backdrop-filter: blur(5px);
}

#hero-canvas {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    height: calc(100% - var(--nav-height));
    z-index: -1;
    pointer-events: none;
    opacity: 0.8;
}

.icon {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--primary-green);
    font-weight: 700;
}

/* Profile Section Layout */
.profile-container-flex {
    display: flex;
    gap: 40px;
    align-items: stretch;
    margin: 60px 0;
}

.profile-portrait {
    flex: 0 0 320px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(46, 168, 39, 0.2);
}

.profile-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.profile-portrait:hover img {
    transform: scale(1.03);
}

/* Profile Card */
.profile-card {
    background: var(--code-bg);
    border-left: 4px solid var(--primary-green);
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    position: relative;
    color: #d4ded6;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Center content vertically when stretched */
}

.profile-header {
    position: absolute;
    top: 15px;
    left: 20px;
    font-family: var(--font-code);
    font-size: 0.85rem;
    color: var(--terminal-green);
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.profile-item {
    display: grid;
    grid-template-columns: 30px 180px 1fr;
    align-items: center;
    gap: 15px;
    color: #d4ded6;
    font-size: 1.15rem;
}

.profile-icon {
    color: var(--terminal-green);
    font-size: 1.2rem;
}

.profile-label {
    font-family: var(--font-code);
    color: var(--grey-medium);
    font-weight: 500;
}

.profile-value {
    font-weight: 500;
}

/* Expertise Section Layout */
.expertise-stack {
    display: flex;
    flex-direction: column;
    gap: 40px; /* Tighter gap between major blocks */
}

.expertise-stack h2 {
    margin: 0 0 10px 0; /* Add small bottom margin to h2 */
    text-align: center;
}

.subsection-title {
    font-family: var(--font-brand);
    text-transform: uppercase;
    font-size: 1.1rem;
    letter-spacing: 1px;
    margin-bottom: 20px; /* Tighter grouping with content */
    text-align: center;
    color: var(--grey-medium);
    display: block;
    width: 100%;
}

/* Identity Pillars (The König Standard) */
.identity-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin: 0; /* Let expertise-stack handle vertical flow */
}

.identity-item {
    text-align: center;
    padding: 20px;
    transition: transform 0.3s ease;
}

.identity-item:hover {
    transform: translateY(-5px);
}

.identity-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 25px auto;
    color: var(--primary-green);
    background: var(--grey-lighter);
    padding: 15px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.identity-icon svg {
    width: 100%;
    height: 100%;
}

.identity-item h3 {
    text-align: center;
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: var(--grey-dark);
}

.identity-item h3::before {
    display: none; /* Remove the '> ' prefix for these headers */
}

.identity-item p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--grey-medium);
    margin: 0;
}

/* Academic Track Styling */
.academic-track {
    margin-top: 0;
    padding-top: 0;
}

.academic-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.academic-item {
    padding: 20px;
    background: var(--grey-lighter);
    border-radius: 4px;
    text-align: center;
    transition: all 0.3s ease;
}

.academic-item:hover {
    background: var(--white);
    box-shadow: 0 4px 15px rgba(17, 82, 14, 0.1);
    transform: translateY(-3px);
}

.academic-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 15px;
    color: var(--primary-green);
}

.academic-year {
    display: block;
    font-family: var(--font-code);
    font-size: 0.8rem;
    color: var(--primary-green);
    margin-bottom: 5px;
}

.academic-degree {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--grey-dark);
    margin-bottom: 5px;
}

.academic-location {
    font-size: 0.85rem;
    color: var(--grey-medium);
    line-height: 1.4;
    margin-bottom: 5px;
}

.academic-info {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-green);
    line-height: 1.4;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.service-category {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(17, 82, 14, 0.15);
}

.service-category h3 {
    color: var(--grey-dark);
    font-size: 1.3rem;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-green);
}

.service-category ul {
    list-style: none;
}

.service-category li {
    padding: 10px 0;
    padding-left: 25px;
    position: relative;
    color: var(--grey-medium);
    font-size: 1.1rem;
    line-height: 1.7;
}

.service-category li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary-green);
    font-weight: bold;
    font-size: 1.2rem;
}

/* Portfolio Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.project-card {
    background: var(--white);
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 4px solid var(--primary-green);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(17, 82, 14, 0.15);
}

.project-icon {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary-green);
    font-family: var(--font-code);
    font-weight: 700;
}

.project-card h3 {
    color: var(--grey-dark);
    margin-bottom: 15px;
}

.project-card p {
    color: var(--grey-medium);
    margin-bottom: 20px;
}

.tech-stack {
    font-size: 0.9rem;
    color: var(--grey-medium);
    font-weight: 500;
    padding-top: 15px;
    border-top: 1px solid var(--grey-light);
}

.tech-overview {
    padding: 30px 40px;
    background: #111111;
    border-left: 4px solid var(--primary-green);
    border-radius: 12px;
    font-family: var(--font-code);
}

.tech-header {
    color: var(--terminal-green);
    font-size: 0.85rem;
    margin-bottom: 25px;
}

.tech-skill-groups {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.tech-skill-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px 15px;
    border-radius: 6px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.tech-skill-group:hover {
    background: rgba(100, 255, 148, 0.05);
    transform: translateX(10px);
}

.tech-skill-label {
    color: var(--terminal-green);
    font-size: 0.95rem;
    font-weight: 600;
}

.tech-skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.skill-tag {
    color: #d4ded6;
    font-size: 0.9rem;
    padding: 4px 8px;
    background: rgba(46, 168, 39, 0.1);
    border: 1px solid rgba(46, 168, 39, 0.2);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.skill-tag:hover {
    background: rgba(46, 168, 39, 0.2);
    border-color: var(--terminal-green);
    color: var(--terminal-green);
}

.tech-footer {
    margin-top: 30px;
    color: #d4ded6;
}

/* Project Timeline */
.project-timeline {
    position: relative;
    padding: 20px 0;
    margin-bottom: 40px;
}

.project-timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-green);
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 60px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-content {
    position: relative;
}

.timeline-marker {
    position: absolute;
    left: -47px;
    top: 10px;
    width: 14px;
    height: 14px;
    background: var(--primary-green);
    border: 3px solid var(--white);
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--primary-green);
}

.timeline-card {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    border-left: 4px solid var(--primary-green);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.timeline-card .project-date {
    position: absolute;
    top: 30px;
    right: 30px;
    font-family: var(--font-code);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-green);
}

.timeline-card:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 30px rgba(17, 82, 14, 0.15);
}

.timeline-card h3 {
    margin-bottom: 10px;
    color: var(--grey-dark);
}

.project-type {
    font-size: 0.85rem;
    color: var(--primary-green);
    font-family: var(--font-code);
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeline-card p {
    color: var(--grey-medium);
    line-height: 1.7;
    margin-bottom: 20px;
}

/* Consolidated Typography for Main Sections */
#expertise h2,
#services h2,
#portfolio h2,
#contact h2 {
    font-size: 2.3rem;
    line-height: 1.25;
    margin-bottom: 32px;
}

#expertise .subsection-title {
    font-size: 1rem;
    line-height: 1.4;
}

#expertise .identity-item h3,
#services .service-category h3,
#portfolio .timeline-card h3,
#portfolio .project-card h3 {
    font-size: 1.25rem;
    line-height: 1.35;
}

#expertise .identity-item p,
#services .service-category li,
#portfolio .timeline-card p {
    font-size: 1rem;
    line-height: 1.6;
}

/* Contact Section */
#contact {
    padding: 120px 0px;
}

.contact-methods {
    text-align: center;
}

.email-button {
    display: inline-block;
    padding: 20px 50px;
    background: var(--primary-green);
    color: var(--white);
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 700;
    font-family: var(--font-brand);
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(46, 168, 39, 0.3);
    position: relative;
    overflow: hidden;
}

.email-button:hover {
    background: var(--accent-green);
    transform: translateY(-3px);
    box-shadow: 0 0 20px rgba(46, 168, 39, 0.6), 0 0 40px rgba(46, 168, 39, 0.2);
    animation: contact-glow 2s infinite alternate;
}

.email-button::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.email-button:hover::after {
    opacity: 1;
}

/* Footer */
footer {
    background: var(--grey-dark);
    color: var(--white);
    padding: 40px 20px;
    border-top: 4px solid var(--primary-green);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-section:nth-child(2) {
    text-align: center;
}

.footer-section:nth-child(3) {
    text-align: right;
}

.footer-section h4 {
    color: var(--white);
    margin-bottom: 25px;
    font-family: var(--font-brand);
    font-size: 1.2rem;
}

.footer-section p {
    color: var(--grey-medium);
    margin-bottom: 15px;
}

.footer-section li {
    list-style: none;
    margin-bottom: 12px;
}

.footer-section li::before {
    display: none;
    content: none;
}

.footer-section a {
    color: var(--grey-medium);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--terminal-green);
}

.footer-legal,
.footer-connect {
    list-style: none;
    list-style-type: none;
    padding: 0;
    margin: 0;
}

/* Legal & Detail Pages */
article {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

article h1 {
    margin-bottom: 40px;
    color: var(--primary-green);
}

article h2 {
    margin-top: 40px;
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: var(--grey-dark);
}

article p {
    margin-bottom: 20px;
    color: var(--grey-medium);
}

.content-container {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Responsive Design */
/* Laptop screens - reduce hero content to fit viewport */
@media (max-width: 1440px) and (max-height: 900px) {
    h1 {
        font-size: 3.2rem;
    }
    
    .lead {
        font-size: 1.1rem;
        margin-bottom: 35px;
    }
    
    .profile-container-flex {
        margin: 40px 0;
        gap: 30px;
    }
    
    .profile-card {
        padding: 30px;
    }
    
    .profile-item {
        gap: 12px;
        font-size: 1rem;
    }
    
    .profile-info {
        gap: 12px;
    }
}

@media (max-width: 1200px) and (max-height: 800px) {
    h1 {
        font-size: 2.8rem;
    }
    
    .lead {
        font-size: 1rem;
        margin-bottom: 30px;
    }
    
    .profile-container-flex {
        margin: 30px 0;
        gap: 25px;
    }
    
    .profile-card {
        padding: 25px;
    }
    
    .profile-item {
        gap: 10px;
        font-size: 0.95rem;
        grid-template-columns: 25px 160px 1fr;
    }
    
    .profile-info {
        gap: 10px;
        margin-top: 15px;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 55px 10px;
        --nav-height: 60px;
    }

    body {
        font-size: 15px;
    }
    
    h1 {
        font-size: 2.5rem;
    }

    .profile-container-flex {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    .profile-portrait {
        width: 100%;
        max-width: 320px;
        height: auto;
        aspect-ratio: 3 / 4;
        flex: 0 0 auto;
    }
    
    h2 {
        font-size: 2rem;
    }

    #expertise h2,
    #services h2,
    #portfolio h2,
    #contact h2 {
        font-size: 1.8rem;
    }
    
    .nav-container {
        padding: 0 10px;
    }

    .content-container {
        padding: 0 10px;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        justify-content: center;
        gap: 30px;
        transition: right 0.3s ease;
        box-shadow: -10px 0 20px rgba(0,0,0,0.1);
        z-index: 1000;
    }
    
    .nav-menu.active {
        right: 0;
    }

    .mobile-menu-toggle.active .bar:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    
    .mobile-menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
    
    .nav-link {
        font-size: 1.2rem;
    }
    
    .logo {
        font-size: 1.25rem;
        max-width: 70%;
    }
    
    .expertise-expandable {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .footer-section:nth-child(2),
    .footer-section:nth-child(3) {
        text-align: center;
    }
    
    .identity-grid,
    .services-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
    }
    
    .why-section {
        padding: 30px 20px;
    }
    
    .social-links {
        flex-direction: column;
        align-items: center;
    }
    
    .profile-card {
        padding: 30px 20px;
    }

    .profile-item {
        grid-template-columns: 18px 1fr;
        grid-template-areas:
            "icon label"
            "icon value";
        column-gap: 8px;
        row-gap: 3px;
        font-size: 0.95rem;
        align-items: start;
    }

    .profile-icon {
        grid-area: icon;
        margin-top: 1px;
    }
    
    .profile-label {
        grid-area: label;
        display: block;
        font-size: 0.82rem;
        white-space: nowrap;
    }

    .profile-value {
        grid-area: value;
        line-height: 1.45;
    }

    .tech-overview {
        padding: 20px 14px;
    }

    .tech-header {
        font-size: 0.75rem;
        margin-bottom: 16px;
    }

    .tech-skill-groups {
        gap: 14px;
    }

    .tech-skill-group {
        padding: 6px 8px;
        gap: 6px;
    }

    .tech-skill-label {
        font-size: 0.78rem;
    }

    .tech-skill-tags {
        gap: 6px;
    }

    .skill-tag {
        font-size: 0.74rem;
        padding: 2px 6px;
    }
    
    .expertise-header {
        padding: 20px;
    }
    
    .expertise-title {
        gap: 15px;
    }
    
    .expertise-icon {
        width: 24px;
        height: 24px;
    }
    
    .expertise-header h3 {
        font-size: 1.1rem;
    }

    .subsection-title {
        font-size: 0.9rem;
        margin-bottom: 14px;
    }

    .identity-item h3,
    .service-category h3,
    .timeline-card h3 {
        font-size: 1.05rem;
    }

    .identity-item p,
    .service-category li,
    .timeline-card p {
        font-size: 0.92rem;
        line-height: 1.5;
    }

    .service-category {
        padding: 20px;
    }

    .service-category h3 {
        margin-bottom: 12px;
        padding-bottom: 10px;
    }

    .service-category li {
        padding-top: 7px;
        padding-bottom: 7px;
    }
    
    .timeline-item {
        padding-left: 20px;
    }
    
    .project-timeline::before {
        display: none;
    }
    
    .timeline-marker {
        display: none;
    }
    
    .timeline-card {
        padding: 20px;
    }

    .timeline-card .project-date {
        position: static;
        display: block;
        margin-bottom: 8px;
        font-size: 0.8rem;
    }

    .timeline-card h3 {
        margin-bottom: 8px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    h1 {
        font-size: 2rem;
    }

    #expertise h2,
    #services h2,
    #portfolio h2,
    #contact h2 {
        font-size: 1.55rem;
    }

    .subsection-title {
        font-size: 0.82rem;
        margin-bottom: 10px;
    }

    .identity-item h3,
    .service-category h3,
    .timeline-card h3 {
        font-size: 0.95rem;
        margin-bottom: 10px;
    }

    .identity-item p,
    .service-category li,
    .timeline-card p {
        font-size: 0.84rem;
        line-height: 1.4;
    }

    .service-category {
        padding: 16px;
    }

    .service-category h3 {
        padding-bottom: 8px;
    }

    .service-category li {
        padding-top: 6px;
        padding-bottom: 6px;
    }
    
    .nav-menu {
        width: 100%;
    }
    
    .lang-switch-wrapper {
        margin-left: 0;
    }

    .lang-option {
        padding: 4px 10px;
    }
    
    .profile-card {
        padding: 18px 14px;
    }
    
    .profile-item {
        grid-template-columns: 16px 1fr;
        grid-template-areas:
            "icon label"
            "icon value";
        font-size: 0.9rem;
        column-gap: 6px;
        row-gap: 2px;
    }

    .profile-label {
        font-size: 0.75rem;
    }

    .tech-overview {
        padding: 16px 10px;
    }

    .tech-header {
        font-size: 0.7rem;
        margin-bottom: 12px;
    }

    .tech-skill-groups {
        gap: 10px;
    }

    .tech-skill-group {
        padding: 4px 6px;
        gap: 5px;
    }

    .tech-skill-label {
        font-size: 0.72rem;
    }

    .skill-tag {
        font-size: 0.68rem;
        padding: 2px 5px;
    }

    .content-container {
        padding: 0 10px;
    }
    
    .timeline-item {
        padding-left: 0;
    }
    
    .project-timeline::before {
        display: none;
    }
    
    .timeline-marker {
        display: none;
    }
}

/* Smooth animations - Scroll Triggered */
.section > h2,
.section > p,
.hero-content > *,
.profile-item,
.tech-header,
.service-category, 
.project-card, 
.expertise-card-expand, 
.timeline-item, 
.tech-skill-group,
.academic-item,
.email-button {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.165, 0.84, 0.44, 1), 
                transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
    will-change: opacity, transform;
}

.is-visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Staggered Entrance Delays (Sequential reveal when items enter roughly together) */
.services-grid > .is-visible:nth-child(1),
.projects-grid > .is-visible:nth-child(1),
.identity-grid > .is-visible:nth-child(1),
.timeline > .is-visible:nth-child(1),
.tech-skill-groups > .is-visible:nth-child(1),
.foundation-column > .is-visible:nth-child(1),
.profile-info > .is-visible:nth-child(1) { transition-delay: 0.1s; }

.services-grid > .is-visible:nth-child(2),
.projects-grid > .is-visible:nth-child(2),
.identity-grid > .is-visible:nth-child(2),
.timeline > .is-visible:nth-child(2),
.tech-skill-groups > .is-visible:nth-child(2),
.foundation-column > .is-visible:nth-child(2),
.profile-info > .is-visible:nth-child(2) { transition-delay: 0.2s; }

.services-grid > .is-visible:nth-child(3),
.projects-grid > .is-visible:nth-child(3),
.identity-grid > .is-visible:nth-child(3),
.timeline > .is-visible:nth-child(3),
.tech-skill-groups > .is-visible:nth-child(3),
.foundation-column > .is-visible:nth-child(3),
.profile-info > .is-visible:nth-child(3) { transition-delay: 0.3s; }

.services-grid > .is-visible:nth-child(4),
.projects-grid > .is-visible:nth-child(4),
.timeline > .is-visible:nth-child(4),
.tech-skill-groups > .is-visible:nth-child(4),
.profile-info > .is-visible:nth-child(4) { transition-delay: 0.4s; }

.services-grid > .is-visible:nth-child(5),
.projects-grid > .is-visible:nth-child(5),
.timeline > .is-visible:nth-child(5),
.tech-skill-groups > .is-visible:nth-child(5),
.profile-info > .is-visible:nth-child(5) { transition-delay: 0.5s; }

.services-grid > .is-visible:nth-child(6),
.projects-grid > .is-visible:nth-child(6),
.timeline > .is-visible:nth-child(6),
.tech-skill-groups > .is-visible:nth-child(6),
.profile-info > .is-visible:nth-child(6) { transition-delay: 0.6s; }

.profile-info > .is-visible:nth-child(7) { transition-delay: 0.7s; }

/* Staggered Hero elements */
.hero-content > .is-visible:nth-child(1) { transition-delay: 0.1s; }
.hero-content > .is-visible:nth-child(2) { transition-delay: 0.2s; }
.hero-content > .is-visible:nth-child(3) { transition-delay: 0.3s; }
.hero-portrait.is-visible { transition-delay: 0.2s; }

@media (max-width: 992px) {
    .academic-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .academic-grid {
        grid-template-columns: 1fr;
    }
}

