/* Material Design 3 Tokens & Variables */
:root {
    /* Core Colors - Android Green inspired */
    --md-sys-color-primary: #006e1c;
    --md-sys-color-on-primary: #ffffff;
    --md-sys-color-primary-container: #95f990;
    --md-sys-color-on-primary-container: #002204;
    
    --md-sys-color-secondary: #52634f;
    --md-sys-color-on-secondary: #ffffff;
    --md-sys-color-secondary-container: #d5e8cf;
    --md-sys-color-on-secondary-container: #111f0f;
    
    --md-sys-color-tertiary: #38656a;
    --md-sys-color-on-tertiary: #ffffff;
    --md-sys-color-tertiary-container: #bcebf0;
    --md-sys-color-on-tertiary-container: #002023;
    
    --md-sys-color-surface: #fcfdf6;
    --md-sys-color-on-surface: #1a1c19;
    --md-sys-color-surface-variant: #dee5d8;
    --md-sys-color-on-surface-variant: #424940;
    
    --md-sys-color-outline: #72796f;
    --md-sys-color-background: #edf3e7;
    --md-sys-color-on-background: #1a1c19;

    /* Surface Containers */
    --md-sys-color-surface-container-low: #f0f4ef;
    --md-sys-color-surface-container-high: #e0e5df;
    --md-sys-color-surface-container-highest: #e8f3e6;

    /* Typography */
    --md-sys-typescale-display-large: 400 57px/64px 'DM Sans', system-ui, sans-serif;
    --md-sys-typescale-display-medium: 400 45px/52px 'DM Sans', system-ui, sans-serif;
    --md-sys-typescale-display-small: 400 36px/44px 'DM Sans', system-ui, sans-serif;
    
    --md-sys-typescale-headline-large: 400 32px/40px 'DM Sans', system-ui, sans-serif;
    --md-sys-typescale-headline-medium: 400 28px/36px 'DM Sans', system-ui, sans-serif;
    --md-sys-typescale-headline-small: 400 24px/32px 'DM Sans', system-ui, sans-serif;
    
    --md-sys-typescale-title-large: 400 22px/28px 'DM Sans', system-ui, sans-serif;
    --md-sys-typescale-title-medium: 500 16px/24px 'DM Sans', system-ui, sans-serif;
    --md-sys-typescale-title-small: 500 14px/20px 'DM Sans', system-ui, sans-serif;
    
    --md-sys-typescale-body-large: 400 16px/24px 'DM Sans', system-ui, sans-serif;
    --md-sys-typescale-body-medium: 400 14px/20px 'DM Sans', system-ui, sans-serif;
    --md-sys-typescale-body-small: 400 12px/16px 'DM Sans', system-ui, sans-serif;
    
    --md-sys-typescale-label-large: 500 14px/20px 'DM Sans', system-ui, sans-serif;

    /* Shapes */
    --md-sys-shape-corner-extra-small: 4px;
    --md-sys-shape-corner-small: 8px;
    --md-sys-shape-corner-medium: 12px;
    --md-sys-shape-corner-large: 16px;
    --md-sys-shape-corner-extra-large: 28px;
    --md-sys-shape-corner-full: 9999px;

    /* Easing */
    --md-sys-motion-easing-standard: cubic-bezier(0.2, 0.0, 0, 1.0);
    
    /* Elevation & Shadows */
    --md-sys-shadow-color: rgba(0, 0, 0, 0.2);
    --md-sys-shadow-elevation-1: 0 1px 3px var(--md-sys-shadow-color);
    --md-sys-shadow-elevation-2: 0 1px 2px var(--md-sys-shadow-color), 0 2px 6px var(--md-sys-shadow-color);
}

/* Dark Theme Overrides */
body.dark-theme {
    --md-sys-color-primary: #7adb76;
    --md-sys-color-on-primary: #00390a;
    --md-sys-color-primary-container: #005313;
    --md-sys-color-on-primary-container: #95f990;
    
    --md-sys-color-secondary: #b9ccb4;
    --md-sys-color-on-secondary: #253423;
    --md-sys-color-secondary-container: #3b4b38;
    --md-sys-color-on-secondary-container: #d5e8cf;
    
    --md-sys-color-tertiary: #a0cfd4;
    --md-sys-color-on-tertiary: #00363b;
    --md-sys-color-tertiary-container: #1e4d52;
    --md-sys-color-on-tertiary-container: #bcebf0;
    
    --md-sys-color-surface: #1a1c19;
    --md-sys-color-on-surface: #e2e3dd;
    --md-sys-color-surface-variant: #252b23;
    --md-sys-color-on-surface-variant: #c2c9bd;
    
    --md-sys-color-outline: #8c9388;
    --md-sys-color-background: #252b23;
    --md-sys-color-on-background: #e2e3dd;

    /* Surface Containers */
    --md-sys-color-surface-container-low: #1e261d;
    --md-sys-color-surface-container-high: #2f362d;
    --md-sys-color-surface-container-highest: #253423;
    
    /* Elevation & Shadows */
    --md-sys-shadow-color: rgb(255, 255, 255,0.1);
    --md-sys-shadow-elevation-1: 0 1px 3px var(--md-sys-shadow-color);
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -ms-overflow-style: none;  /* Internet Explorer 10+ */
    scrollbar-width: none;  /* Firefox */
}

*::-webkit-scrollbar {
    display: none;
}

html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

body {
    font-family: 'DM Sans', system-ui, sans-serif;
    background-color: var(--md-sys-color-surface);
    color: var(--md-sys-color-on-surface);
    transition: background-color 0.3s var(--md-sys-motion-easing-standard), color 0.3s var(--md-sys-motion-easing-standard);
    overflow-x: hidden;
}

.material-symbols-rounded {
    overflow: hidden;
}
/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

.content-area {
    flex: 1;
    padding: 24px;
    margin-left: 80px;
    max-width: 1200px;
    margin-right: auto;
}

/* Typography Classes */
.display-large { font: var(--md-sys-typescale-display-large); }
.display-small { font: var(--md-sys-typescale-display-small); }
.headline-medium { font: var(--md-sys-typescale-headline-medium); margin-bottom: 24px; }
.headline-small { font: var(--md-sys-typescale-headline-small); }
.title-large { font: var(--md-sys-typescale-title-large); }
.body-large { font: var(--md-sys-typescale-body-large); }
.body-medium { font: var(--md-sys-typescale-body-medium); }
.body-small { font: var(--md-sys-typescale-body-small); }

/* Navigation Rail */
.navigation-rail {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 80px;
    background-color: var(--md-sys-color-surface);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 0;
    z-index: 100;
    border-right: 1px solid transparent; /* Optional divider */
}

.nav-header {
    margin-bottom: 40px;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    align-items: center;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: var(--md-sys-shape-corner-full);
    color: var(--md-sys-color-on-surface-variant);
    text-decoration: none;
    position: relative;
    transition: all 0.2s var(--md-sys-motion-easing-standard);
}

.nav-item .material-symbols-rounded {
    font-size: 24px;
    z-index: 2;
}

.nav-item .label {
    font: var(--md-sys-typescale-label-large);
    font-size: 12px;
    margin-top: 4px;
    opacity: 0;
    display: none;
}

.nav-indicator {
    position: absolute;
    top: 0;
    width: 56px;
    height: 32px;
    border-radius: 16px;
    background-color: transparent;
    transition: background-color 0.2s var(--md-sys-motion-easing-standard);
    z-index: 1;
    top: 12px;
}

.nav-item.active {
    color: var(--md-sys-color-on-secondary-container);
}

.nav-item.active .nav-indicator {
    background-color: var(--md-sys-color-secondary-container);
}

.nav-item:hover .nav-indicator {
    background-color: var(--md-sys-color-surface-variant);
}

.nav-item.active:hover .nav-indicator {
    background-color: var(--md-sys-color-secondary-container);
}

/* Buttons */
.icon-button {
    background: none;
    border: none;
    color: var(--md-sys-color-on-surface-variant);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--md-sys-shape-corner-full);
    transition: background-color 0.2s;
}

.icon-button:hover {
    background-color: var(--md-sys-color-surface-variant);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 24px;
    border-radius: var(--md-sys-shape-corner-full);
    font: var(--md-sys-typescale-label-large);
    text-decoration: none;
    cursor: pointer;
    gap: 8px;
    transition: box-shadow 0.2s, background-color 0.2s;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-filled {
    background-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
}

.btn-filled:hover {
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    opacity: 0.92;
}

.btn-outlined {
    background-color: transparent;
    border: 1px solid var(--md-sys-color-outline);
    color: var(--md-sys-color-primary);
}

.btn-outlined:hover {
    background-color: var(--md-sys-color-surface-variant);
}

.btn-tonal {
    background-color: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
}

.btn-text {
    background-color: transparent;
    color: var(--md-sys-color-primary);
    padding: 0 12px;
}

.btn-text:hover {
    background-color: var(--md-sys-color-surface-variant);
}

/* Sections */
.section {
    padding: 64px 0;
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Hero */
.hero-section {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
}

.hero-content {
    flex: 1;
}

.hero-actions {
    margin-top: 32px;
    display: flex;
    gap: 16px;
    flex-wrap: nowrap;
}

.hero-image-container {
    flex: 1;
    display: flex;
    justify-content: center;
}

.profile-placeholder {
    width: 280px;
    height: 280px;
    background-color: var(--md-sys-color-primary-container);
    border-radius: var(--md-sys-shape-corner-extra-large);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--md-sys-color-on-primary-container);
}

.profile-placeholder .material-symbols-rounded {
    font-size: 96px;
}

/* Cards */
.card {
    background-color: var(--md-sys-color-surface-variant);
    border-radius: var(--md-sys-shape-corner-medium);
    padding: 24px;
    color: var(--md-sys-color-on-surface-variant);
    transition: transform 0.2s;
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.skill-category-card {
    display: flex;
    flex-direction: column;
    gap: 24px;
    height: 100%;
    background-color: var(--md-sys-color-surface-container-low);
    padding: 32px;
    border-radius: 24px;
    border: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.skill-category-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.skill-icon {
    color: var(--md-sys-color-primary);
    font-size: 32px;
    background-color: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
    padding:1rem;
    border-radius: 16px;
}

.skill-category-title {
    color: var(--md-sys-color-on-surface);
    margin: 0;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.chip {
    height: 36px;
    padding: 0 20px;
    border-radius: 12px;
    border: none;
    background-color: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
    display: flex;
    align-items: center;
    font: var(--md-sys-typescale-label-large);
    transition: all 0.2s;
}

.chip:hover {
    background-color: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
    transform: scale(1.05);
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.project-card {
    padding: 0;
    overflow: hidden;
    background-color: var(--md-sys-color-background);
    border: none;
    border-radius: 24px;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-4px);
}

.card-media {
    height: 200px;
    background-color: var(--md-sys-color-tertiary-container);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--md-sys-color-on-tertiary-container);
}


.card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 16px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    margin-bottom: 8px;
}

.tag {
    font: var(--md-sys-typescale-label-large);
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 8px;
    background-color: var(--md-sys-color-surface-container-high);
    color: var(--md-sys-color-on-surface-variant);
}


.card-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

/* Contact */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.icon-box {
    width: 48px;
    height: 48px;
    background-color: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-text {
    display: flex;
    flex-direction: column;
}

.info-text a {
    color: var(--md-sys-color-primary);
    text-decoration: none;
}

.info-text a:hover {
    text-decoration: underline;
}

.social-links-labeled {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: var(--md-sys-color-surface);
    border: 1px solid var(--md-sys-color-outline);
    border-radius: 100px;
    text-decoration: none;
    color: var(--md-sys-color-on-surface);
    font: var(--md-sys-typescale-label-large);
    transition: all 0.2s;
}

.social-btn:hover {
    background-color: var(--md-sys-color-secondary-container);
    border-color: transparent;
    color: var(--md-sys-color-on-secondary-container);
}

/* Contact Form */
.contact-form-wrapper {
    background-color: var(--md-sys-color-surface-variant);
    padding: 32px;
    border-radius: 24px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.text-field {
    position: relative;
    background-color: var(--md-sys-color-surface);
    border-radius: 4px 4px 0 0;
    height: 56px;
    display: flex;
    align-items: flex-end;
}

.text-field.textarea-field {
    height: auto;
    min-height: 120px;
}

.text-field input,
.text-field textarea {
    width: 100%;
    height: 100%;
    background: none;
    border: none;
    border-bottom: 1px solid var(--md-sys-color-outline);
    padding: 24px 16px 8px;
    font: var(--md-sys-typescale-body-large);
    color: var(--md-sys-color-on-surface);
    outline: none;
    border-radius: 4px 4px 0 0;
    transition: border-color 0.2s, background-color 0.2s;
    resize: none;
}

.text-field textarea {
    padding-top: 24px;
}

.text-field input:focus,
.text-field textarea:focus {
    border-bottom: 2px solid var(--md-sys-color-primary);
    border-bottom: 2px solid var(--md-sys-color-primary);
    background-color: var(--md-sys-color-surface-container-highest);
}


.text-field label {
    position: absolute;
    left: 16px;
    top: 16px;
    font: var(--md-sys-typescale-body-large);
    color: var(--md-sys-color-on-surface-variant);
    pointer-events: none;
    transition: all 0.2s ease-out;
}


.text-field input:focus ~ label,
.text-field input:not(:placeholder-shown) ~ label,
.text-field textarea:focus ~ label,
.text-field textarea:not(:placeholder-shown) ~ label {
    top: 4px;
    font-size: 12px;
    color: var(--md-sys-color-primary);
}

.submit-btn {
    align-self: flex-end;
}


@media (max-width: 768px) {
    .contact-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .contact-form-wrapper {
        padding: 24px;
    }
}



/* Mobile Responsive */
@media (max-width: 768px) {
     a {
        cursor: default;
     }
    
    /* Typography Scaling */
    .display-large {
        font-size: 40px;
        line-height: 48px;
    }
    
    .display-small {
        font-size: 28px;
        line-height: 36px;
    }
    
    .headline-medium {
        font-size: 24px;
        line-height: 32px;
    }
    
    .headline-small {
        font-size: 20px;
        line-height: 28px;
    }
    
    /* Improve body text readability */
    .body-large,
    .body-medium {
        line-height: 1.6;
    }
    
    /* Layout Adjustments */
    .app-container {
        flex-direction: column;
        padding-bottom: 64px;
    }

    .content-area {
        margin-left: 0;
        padding: 16px;
    }
    
    /* Section Spacing */
    .section {
        padding: 40px 0;
        margin-bottom: 10px;
        min-height: auto; /* Remove min-height constraint */
    }

    .section.hero-section{
        min-height: 90vh !important;
    }
    /* Navigation Refinements */
    .navigation-rail {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 64px;
        flex-direction: row;
        padding: 0;
        border-right: none;
        box-shadow: var(--md-sys-shadow-elevation-1);
        justify-content: space-around;
    }

    .nav-header {
        display: block;
        position: fixed;
        top: 20px;
        right: 20px;
        z-index: 200;
        margin: 0;
    }
    
    /* Improved theme toggle touch target */
    #theme-toggle {
        position: relative;
        width: 40px;
        height: 40px; 
        border-radius: var(--md-sys-shape-corner-full);
        background-color: var(--md-sys-color-surface);
        border: 1px solid var(--md-sys-color-outline);
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s var(--md-sys-motion-easing-standard);
        cursor: pointer;
        opacity: 0.8;
    }
    
    #theme-toggle:hover {
        background-color: var(--md-sys-color-surface-variant);
        opacity: 1;
        transform: scale(1.02);
    }
    
    #theme-toggle:active {
        transform: scale(0.98);
    }
    
    #theme-toggle .material-symbols-rounded {
        font-size: 20px;
        color: var(--md-sys-color-on-surface-variant);
        transition: color 0.2s var(--md-sys-motion-easing-standard);
    }
    
    #theme-toggle:hover .material-symbols-rounded {
        color: var(--md-sys-color-on-surface);
    }

    .nav-links {
        flex-direction: row;
        justify-content: space-around;
        gap: 0;
    }
    
    .nav-item {
        width: 100%;
        height: 100%;
        cursor: default;
    }
    
    .nav-indicator {
        width: 64px;
        top: -4px;
    }

    /* Enhanced Mobile Hero Section */
    .hero-section {
        flex-direction: column-reverse;
        text-align: center;
        gap: 24px;
        padding: 40px 0 !important;
    }
    
    .hero-content .display-small {
        color: var(--md-sys-color-primary);
        font-weight: 500;
        margin-bottom: 8px;
        display: block;
    }
    
    .hero-content .display-large {
        margin-bottom: 16px;
    }
    
    .hero-content .headline-small {
        color: var(--md-sys-color-on-surface-variant);
        font-weight: 400;
        margin-bottom: 32px;
    }
    
    .hero-actions {
        display: flex;
        justify-content: center;
        margin-top: 24px;
        flex-wrap: nowrap;
        gap: 12px;
    }
    
    .hero-actions .btn {
        min-width: 140px;
        flex-shrink: 0;
    }
    
    /* Enhanced Profile Section */
    .profile-placeholder {
        width: 280px;
        height: 280px;
        background: linear-gradient(135deg, var(--md-sys-color-primary-container) 0%, var(--md-sys-color-secondary-container) 100%);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--md-sys-color-on-primary-container);
        margin: 0 auto;
        transition: all 0.4s var(--md-sys-motion-easing-standard);
    }
    
    .profile-placeholder:hover {
        transform: scale(1.02);
    }
    
    .profile-placeholder .material-symbols-rounded {
        font-size: 96px;
    }
    
    /* Grid Optimizations */
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    /* Reduce skill card padding */
    .skill-category-card {
        padding: 24px;
    }
    
    /* Button Touch Targets */
    .btn {
        min-height: 44px;
        padding: 0 20px;
    }
}

/* Extra small screens - stack hero buttons */
@media (max-width: 360px) {
    .hero-section {
        gap: 0px;
        padding: 40px 0;
    }
    
    .hero-actions {
        display: flex;
        flex-direction: row;
        width: 100%;
        gap: 8px;
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-actions .btn {
        width: 50%;
        min-height: 48px;
        font-size: 14px;
        padding: 0 16px;
    }
    
    .hero-content .display-large {
        font-size: 36px;
        line-height: 44px;
    }
    
    .hero-content .display-small {
        font-size: 24px;
        line-height: 32px;
    }
    
    .hero-content .headline-small {
        font-size: 18px;
        line-height: 26px;
    }
    
    .profile-placeholder {
        width: 240px;
        height: 240px;
    }
    
    .profile-placeholder .material-symbols-rounded {
        font-size: 80px;
    }
}
