/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --light-almond: #EEE5DA;
    --deep-charcoal: #262424;
    --white: #ffffff;
    --gray-light: #f8f9fa;
    --gray-medium: #6c757d;
    --gray-dark: #495057;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --shadow-light: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 10px 25px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 20px 40px rgba(0, 0, 0, 0.2);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--deep-charcoal);
    background-color: var(--light-almond);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(238, 229, 218, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo h2 {
    color: var(--deep-charcoal);
    font-weight: 700;
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--deep-charcoal);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
}

.nav-menu a:hover {
    color: #667eea;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition);
}

.nav-menu a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: var(--transition);
}

.hamburger:hover {
    background: rgba(102, 126, 234, 0.1);
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--deep-charcoal);
    margin: 3px 0;
    transition: var(--transition);
    border-radius: 2px;
}

/* Mobile Navigation Styles */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
        min-width: 44px;
        min-height: 44px;
        align-items: center;
        justify-content: center;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(238, 229, 218, 0.98);
        backdrop-filter: blur(15px);
        width: 100%;
        text-align: center;
        transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: var(--shadow-medium);
        padding: 2rem 0;
        gap: 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 0;
        padding: 0;
    }
    
    .nav-menu a {
        display: block;
        padding: 1rem 2rem;
        font-size: 1.1rem;
        font-weight: 600;
        border-bottom: 1px solid rgba(102, 126, 234, 0.1);
        transition: all 0.3s ease;
    }
    
    .nav-menu a:hover {
        background: rgba(102, 126, 234, 0.1);
        color: #667eea;
        transform: translateX(10px);
    }
    
    .nav-menu a::after {
        display: none;
    }
    
    /* Hamburger animation */
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    background: linear-gradient(135deg, var(--light-almond) 0%, #f5f0eb 100%);
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--deep-charcoal);
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    color: var(--gray-dark);
    margin-bottom: 2rem;
    font-weight: 500;
    font-style: italic;
}

.mission-container {
    margin-bottom: 2rem;
}

.mission-text {
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
    color: var(--deep-charcoal);
    margin-bottom: 1.5rem;
    line-height: 1.7;
    font-weight: 500;
}

.keyword-highlight {
    background: linear-gradient(120deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-weight: 600;
}

.hero-description {
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
    color: var(--gray-dark);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

/* Typewriter Animation */
.typewriter {
    overflow: hidden;
    border-right: 2px solid var(--deep-charcoal);
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--deep-charcoal); }
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
    padding: clamp(10px, 2.5vw, 12px) clamp(20px, 4vw, 24px);
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: var(--shadow-light);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-secondary {
    background: transparent;
    color: var(--deep-charcoal);
    border: 2px solid var(--deep-charcoal);
}

.btn-secondary:hover {
    background: var(--deep-charcoal);
    color: var(--light-almond);
    transform: translateY(-2px);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-photo {
    width: clamp(300px, 50vw, 500px);
    height: clamp(300px, 50vw, 500px);
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow-medium);
    border: 4px solid var(--white);
    transition: var(--transition);
}

.hero-photo:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-heavy);
}

/* Mobile Hero Section */
@media (max-width: 768px) {
    .hero {
        padding: 100px 0 60px;
        min-height: 90vh;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.1;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
        white-space: normal;
        animation: none;
        border-right: none;
    }
    
    .mission-text {
        font-size: 1rem;
        text-align: left;
    }
    
    .hero-description {
        font-size: 1rem;
        text-align: left;
    }
    
    .hero-cta {
        justify-content: center;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .hero-photo {
        width: 280px;
        height: 280px;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 80px 0 40px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-photo {
        width: 240px;
        height: 240px;
    }
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: clamp(2rem, 6vw, 4rem);
}

.section-header h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--deep-charcoal);
}

.section-header p {
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
    color: var(--gray-dark);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Mobile Section Headers */
@media (max-width: 768px) {
    .section-header {
        margin-bottom: 3rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .section-header p {
        font-size: 1rem;
        padding: 0 1rem;
    }
}

/* Tech Stack Section */
.tech-stack {
    padding: clamp(60px, 8vw, 100px) 0;
    background: var(--white);
}

.tech-slider {
    overflow: hidden;
    position: relative;
    padding: 2rem 0;
}

.tech-track {
    display: flex;
    animation: scroll 20s linear infinite;
    width: max-content;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 2rem;
    padding: 1.5rem;
    background: transparent;
    border-radius: var(--border-radius);
    transition: var(--transition);
    min-width: 150px;
    min-height: 100px;
}

.tech-item:hover {
    transform: translateY(-5px);
    box-shadow: none;
}



.tech-item .tech-icon {
    width: 8rem;
    height: 8rem;
    margin-bottom: 0.5rem;
    object-fit: contain;
    /* vertical-align: middle; */
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.tech-item span {
    font-weight: 600;
    color: var(--deep-charcoal);
    text-align: center;
    font-size: 0.9rem;
}



@keyframes scroll {
    0% {
        transform: translateX(10%);
    }
    100% {
        transform: translateX(-90%);
    }
}

@keyframes gallery-scroll {
    0% {
        transform: translateX(10%);
    }
    100% {
        transform: translateX(-90%);
    }
}

@keyframes gallery-scroll-reverse {
    0% {
        transform: translateX(-90%);
    }
    100% {
        transform: translateX(10%);
    }
}

/* Specific gallery section animations */
#photography-gallery .gallery-track {
    animation: gallery-scroll 30s linear infinite;
}

#origami-gallery .gallery-track {
    animation: gallery-scroll-reverse 35s linear infinite;
}

#art-gallery .gallery-track {
    animation: gallery-scroll 40s linear infinite;
}

/* Mobile Tech Stack */
@media (max-width: 768px) {
    .tech-slider {
        padding: 1.5rem 0;
    }
    
    .tech-track {
        animation: none;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
        width: 100%;
    }
    
    .tech-item {
        margin: 0;
        min-width: 100px;
        padding: 1rem;
        flex: 0 0 calc(33.333% - 1rem);
        max-width: 120px;
        background: transparent;
        box-shadow: none;
    }
    

    
    .tech-item .tech-icon {
        width: 4rem;
        height: 4rem;
    }
    

}

@media (max-width: 480px) {
    .tech-item {
        flex: 0 0 calc(50% - 0.5rem);
        max-width: 100px;
    }
    

    
    .tech-item .tech-icon {
        width: 3.6rem;
        height: 3.6rem;
    }
    

}

@keyframes scroll-achievements {
    0% {
        transform: translateX(-50%);
    }
    100% {
        transform: translateX(0);
    }
}



/* Experience Section */
.experience {
    padding: clamp(60px, 8vw, 100px) 0;
    background: var(--light-almond);
}

/* Achievements Section */
.achievements {
    padding: clamp(60px, 8vw, 100px) 0;
    background: var(--white);
}

.achievements-grid {
    overflow: hidden;
    position: relative;
    padding: 2rem 0;
}

.achievements-track {
    display: flex;
    animation: scroll-achievements 25s linear infinite;
    width: max-content;
}

.achievement-card {
    perspective: 1000px;
    height: 200px;
    width: 280px;
    cursor: pointer;
    margin: 0 1rem;
    flex-shrink: 0;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.achievement-card.flipped .card-inner {
    transform: rotateY(180deg);
}



.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

.card-front {
    background: var(--light-almond);
    border: 3px solid transparent;
    background-clip: padding-box;
}

.card-back {
    background: var(--white);
    transform: rotateY(180deg);
    border: 2px solid var(--gray-medium);
}

.achievement-card:hover .card-front {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.achievement-score {
    font-size: 2rem;
    font-weight: 700;
    color: var(--deep-charcoal);
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}



.card-front h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--deep-charcoal);
    margin-bottom: 0.5rem;
}

.card-front p {
    color: var(--gray-dark);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.card-back h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--deep-charcoal);
    margin-bottom: 0.5rem;
}

.card-back p {
    color: var(--gray-dark);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.card-back .org {
    font-weight: 600;
    color: var(--deep-charcoal);
}

.card-back .date {
    font-style: italic;
    color: var(--gray-medium);
}

.learn-more {
    margin-top: 1rem;
    color: var(--deep-charcoal);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.learn-more:hover {
    color: #667eea;
    transform: translateX(3px);
}

/* Achievement level indicators */
.achievement-card[data-achievement="madhava-2018"] .card-front,
.achievement-card[data-achievement="madhava-2017"] .card-front,
.achievement-card[data-achievement="kvpy"] .card-front {
    border-color: #FFD700;
    background: linear-gradient(135deg, var(--light-almond) 0%, #fff8dc 100%);
}

.achievement-card[data-achievement="jee-mains"] .card-front {
    border-color: #C0C0C0;
    background: linear-gradient(135deg, var(--light-almond) 0%, #f5f5f5 100%);
}

.achievement-card[data-achievement="toefl"] .card-front,
.achievement-card[data-achievement="gmat"] .card-front,
.achievement-card[data-achievement="gre"] .card-front {
    border-color: #667eea;
    background: linear-gradient(135deg, var(--light-almond) 0%, #e8f2ff 100%);
}

/* Mobile Achievements */
@media (max-width: 768px) {
    .achievements-grid {
        padding: 1rem 0;
    }
    
    .achievements-track {
        animation: none;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
        width: 100%;
    }
    
    .achievement-card {
        height: 160px;
        width: calc(50% - 0.5rem);
        margin: 0;
        flex: 0 0 auto;
        min-width: 140px;
    }
    
    .achievement-score {
        font-size: 1.3rem;
    }
    
    .card-front h3,
    .card-back h3 {
        font-size: 1.1rem;
    }
    
    .card-front p,
    .card-back p {
        font-size: 0.8rem;
    }
    
    .card-front,
    .card-back {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .achievement-card {
        width: calc(100% - 0.5rem);
        height: 140px;
    }
    
    .achievement-score {
        font-size: 1.2rem;
    }
    
    .card-front h3,
    .card-back h3 {
        font-size: 1rem;
    }
    
    .card-front p,
    .card-back p {
        font-size: 0.75rem;
    }
}

/* Achievement card entrance animations */
.achievement-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.achievement-card.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation delay for cards */
.achievement-card:nth-child(1) { transition-delay: 0.1s; }
.achievement-card:nth-child(2) { transition-delay: 0.2s; }
.achievement-card:nth-child(3) { transition-delay: 0.3s; }
.achievement-card:nth-child(4) { transition-delay: 0.4s; }
.achievement-card:nth-child(5) { transition-delay: 0.5s; }
.achievement-card:nth-child(6) { transition-delay: 0.6s; }
.achievement-card:nth-child(7) { transition-delay: 0.7s; }
.achievement-card:nth-child(8) { transition-delay: 0.8s; }
.achievement-card:nth-child(9) { transition-delay: 0.9s; }
.achievement-card:nth-child(10) { transition-delay: 1.0s; }

.experience-timeline {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 600px;
}

.experience-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    width: 100%;
}

.dial-container {
    position: relative;
    width: 400px;
    height: 400px;
}

.dial {
    width: 300px;
    height: 300px;
    border: 8px solid var(--deep-charcoal);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--white);
    box-shadow: var(--shadow-medium);
    cursor: grab;
    transition: transform 0.3s ease;
}

.dial:active {
    cursor: grabbing;
}

.year-markers {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.year-marker {
    position: absolute;
    top: 50%;
    left: 50%;
    background: var(--white);
    color: var(--deep-charcoal);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: var(--shadow-light);
    border: 2px solid var(--deep-charcoal);
    cursor: pointer;
    pointer-events: auto;
    transition: var(--transition);
    z-index: 10;
}

.year-marker:hover {
    background: var(--gradient-primary);
    color: var(--white);
    transform: scale(1.1);
}

.year-marker.active {
    background: var(--gradient-primary);
    color: var(--white);
    transform: scale(1.1);
}

.experience-content {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-light);
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Mobile Experience Timeline */
@media (max-width: 768px) {
    .experience-timeline {
        min-height: auto;
        padding: 2rem 0;
    }
    
    .experience-content-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .dial-container {
        width: 300px;
        height: 300px;
        margin: 0 auto;
    }
    
    .dial {
        width: 250px;
        height: 250px;
        border-width: 6px;
    }
    
    .year-marker {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .experience-content {
        padding: 1.5rem;
        min-height: 300px;
    }
    
    .experience-item h3 {
        font-size: 1.5rem;
    }
    
    .experience-item .company {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .dial-container {
        width: 250px;
        height: 250px;
    }
    
    .dial {
        width: 200px;
        height: 200px;
        border-width: 4px;
    }
    
    .year-marker {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
    
    .experience-content {
        padding: 1rem;
        min-height: 250px;
    }
}

.experience-item {
    margin-bottom: 2rem;
}

.experience-item:last-child {
    margin-bottom: 0;
}

.experience-item h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--deep-charcoal);
}

.experience-item .company {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gray-dark);
    margin-bottom: 0.5rem;
}

.experience-item .period {
    font-size: 1rem;
    color: var(--gray-medium);
    margin-bottom: 1rem;
    font-style: italic;
}

.experience-item .description {
    color: var(--gray-dark);
    line-height: 1.7;
}

.experience-item .description ul {
    margin-left: 1.5rem;
}

.experience-item .description li {
    margin-bottom: 0.5rem;
}

.experience-separator {
    height: 2px;
    background: var(--gradient-primary);
    margin: 2rem 0;
    border-radius: 1px;
}

/* Glass effect */
.glass {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

    /* Projects Section */
    .projects {
        padding: clamp(60px, 8vw, 100px) 0;
        background: var(--light-almond);
    }

    .projects-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
        gap: 2rem;
        margin-bottom: 3rem;
    }

    /* Mobile Projects Grid */
    @media (max-width: 768px) {
        .projects-grid {
            grid-template-columns: 1fr;
            gap: 1.5rem;
            margin-bottom: 2rem;
        }
        
        .project-card {
            max-width: 100%;
        }
        
        .project-image {
            height: 200px;
        }
        
        .project-content {
            padding: 1.5rem;
        }
        
        .project-title {
            font-size: 1.3rem;
        }
        
        .project-excerpt {
            font-size: 0.95rem;
        }
        
        .project-tags {
            gap: 0.4rem;
        }
        
        .tag {
            font-size: 0.8rem;
            padding: 0.2rem 0.6rem;
        }
        
        .project-links {
            flex-direction: column;
            gap: 0.8rem;
        }
        
        .project-link {
            width: 100%;
            justify-content: center;
            padding: 0.8rem 1rem;
            font-size: 0.9rem;
        }
    }

    @media (max-width: 480px) {
        .project-content {
            padding: 1rem;
        }
        
        .project-title {
            font-size: 1.2rem;
        }
        
        .project-excerpt {
            font-size: 0.9rem;
        }
    }

    .project-card {
        background: var(--white);
        border-radius: var(--border-radius);
        overflow: hidden;
        box-shadow: var(--shadow-light);
        transition: var(--transition);
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    .project-card:hover {
        transform: translateY(-10px);
        box-shadow: var(--shadow-heavy);
    }

    .project-image {
        position: relative;
        height: 250px;
        overflow: hidden;
    }

    .project-image .image-placeholder {
        width: 100%;
        height: 100%;
        background: var(--white);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        border: 2px dashed var(--gray-medium);
    }

    .project-image .image-placeholder i {
        font-size: 3rem;
        color: var(--gray-medium);
        margin-bottom: 1rem;
    }

    .project-image .image-placeholder p {
        color: var(--gray-medium);
        font-weight: 500;
    }

    .project-category {
        position: absolute;
        top: 1rem;
        right: 1rem;
        background: var(--gradient-primary);
        color: var(--white);
        padding: 0.5rem 1rem;
        border-radius: 20px;
        font-size: 0.875rem;
        font-weight: 600;
    }

    .project-content {
        padding: 2rem;
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .project-meta {
        display: flex;
        gap: 1rem;
        margin-bottom: 1rem;
        font-size: 0.875rem;
        color: var(--gray-medium);
    }

    .project-date {
        font-weight: 500;
    }

    .project-read-time {
        display: flex;
        align-items: center;
    }

    .project-read-time::before {
        content: '•';
        margin-right: 0.5rem;
    }

    .project-title {
        font-size: 1.5rem;
        font-weight: 700;
        margin-bottom: 1rem;
        color: var(--deep-charcoal);
        line-height: 1.3;
    }

    .project-excerpt {
        color: var(--gray-dark);
        line-height: 1.7;
        margin-bottom: 1.5rem;
        flex: 1;
    }

    .project-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }

    .tag {
        background: var(--white);
        color: var(--deep-charcoal);
        padding: 0.25rem 0.75rem;
        border-radius: 15px;
        font-size: 0.875rem;
        font-weight: 500;
        border: 1px solid var(--gray-medium);
        transition: var(--transition);
    }

    .tag:hover {
        background: var(--deep-charcoal);
        color: var(--light-almond);
        border-color: var(--deep-charcoal);
    }

    .project-links {
        display: flex;
        gap: 1rem;
        flex-wrap: wrap;
        margin-top: auto;
    }

    .project-link {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        text-decoration: none;
        color: var(--gray-dark);
        font-size: 0.875rem;
        font-weight: 500;
        padding: 0.5rem 1rem;
        border-radius: var(--border-radius);
        transition: var(--transition);
        border: 1px solid transparent;
    }

    .project-link:hover {
        color: var(--deep-charcoal);
        background: var(--white);
        border-color: var(--gray-medium);
        transform: translateY(-2px);
    }

    .project-link.primary {
        background: var(--gradient-primary);
        color: var(--white);
        border-color: transparent;
    }

    .project-link.primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.project-link.disabled {
    background: var(--gray-medium);
    color: var(--white);
    cursor: not-allowed;
    opacity: 0.6;
}

.project-link.disabled:hover {
    transform: none;
    box-shadow: none;
}

    .projects-cta {
        text-align: center;
    }

    /* Extras Section */
.extras {
    padding: clamp(60px, 8vw, 100px) 0;
    background: var(--white);
}

.extras-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

/* Mobile Extras Grid */
@media (max-width: 768px) {
    .extras-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .extra-card {
        padding: 2rem;
    }
    
    .extra-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 1rem;
    }
    
    .extra-icon i {
        font-size: 1.8rem;
    }
    
    .extra-card h3 {
        font-size: 1.3rem;
    }
    
    .extra-card p {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    
    .extra-placeholder {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .extra-card {
        padding: 1.5rem;
    }
    
    .extra-icon {
        width: 60px;
        height: 60px;
    }
    
    .extra-icon i {
        font-size: 1.5rem;
    }
    
    .extra-card h3 {
        font-size: 1.2rem;
    }
    
    .extra-card p {
        font-size: 0.9rem;
    }
    
    .extra-placeholder {
        height: 160px;
    }
}

.extra-card {
    background: var(--light-almond);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    text-align: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.extra-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-heavy);
}

.extra-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.extra-icon i {
    font-size: 2rem;
    color: var(--white);
}

.extra-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--deep-charcoal);
}

.extra-card p {
    color: var(--gray-dark);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.extra-placeholder {
    width: 100%;
    height: 200px;
    background: var(--white);
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 2px dashed var(--gray-medium);
}

.extra-placeholder i {
    font-size: 3rem;
    color: var(--gray-medium);
    margin-bottom: 1rem;
}

.extra-placeholder p {
    color: var(--gray-medium);
    font-weight: 500;
}

/* Extra Card Overlay for Gallery Links */
.extra-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9), rgba(118, 75, 162, 0.9));
    color: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(100%);
    transition: var(--transition);
    border-radius: var(--border-radius);
}

.gallery-link:hover .extra-overlay {
    opacity: 1;
    transform: translateY(0);
}

.extra-overlay span {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.extra-overlay i {
    font-size: 1.5rem;
    animation: slide-right 0.6s ease infinite;
}

@keyframes slide-right {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(5px);
    }
}

/* Gallery section highlight animation */
.gallery-section.highlight {
    animation: highlight-gallery 2s ease-out;
}

@keyframes highlight-gallery {
    0% {
        background: rgba(102, 126, 234, 0.1);
        transform: scale(1);
    }
    50% {
        background: rgba(102, 126, 234, 0.2);
        transform: scale(1.02);
    }
    100% {
        background: transparent;
        transform: scale(1);
    }
}

/* Footer */
.footer {
    background: var(--deep-charcoal);
    color: var(--light-almond);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3, .footer-section h4 {
    margin-bottom: 1rem;
    color: var(--white);
}

.footer-section p {
    color: var(--light-almond);
    opacity: 0.8;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--light-almond);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--deep-charcoal);
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--gradient-primary);
    color: var(--white);
    transform: translateY(-2px);
}

/* Mobile Footer */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }
    
    .footer-section h3, .footer-section h4 {
        font-size: 1.2rem;
    }
    
    .footer-section p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .social-links {
        justify-content: center;
        gap: 1.5rem;
    }
    
    .social-links a {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }
}

.footer-bottom {
    border-top: 1px solid rgba(238, 229, 218, 0.2);
    padding-top: 1rem;
    text-align: center;
    color: var(--light-almond);
    opacity: 0.8;
}

/* Gallery Section */
.gallery {
    padding: clamp(3rem, 6vw, 5rem) 0;
    background: var(--light-almond);
}

.gallery-section {
    margin-bottom: 4rem;
}

.gallery-category {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--deep-charcoal);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gallery-category i {
    color: #667eea;
}

.gallery-slider {
    overflow: hidden;
    position: relative;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.gallery-track {
    display: flex;
    animation: gallery-scroll 25s linear infinite;
    width: max-content;
}

.gallery-item {
    margin: 0 1rem;
    min-width: 250px;
    max-width: 300px;
    flex-shrink: 0;
    aspect-ratio: 4/3;
}

/* Tablet and Mobile Gallery - Disable animation */
@media (max-width: 1024px) {
    .gallery-slider {
        padding: 1.5rem 0;
    }

    .gallery-track {
        animation: none !important;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
        width: 100%;
    }

    .gallery-item {
        aspect-ratio: 3/2;
        margin: 0;
        min-width: 200px;
        flex: 0 0 calc(50% - 1rem);
        max-width: 250px;
    }

    .gallery-overlay {
        padding: 1rem 0.8rem 0.8rem;
    }

    .gallery-overlay span {
        font-size: 0.85rem;
    }

    .gallery-category {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
    }
}

/* Small tablets and large phones */
@media (max-width: 768px) {
    .gallery-track {
        animation: none !important;
    }

    .gallery-item {
        flex: 0 0 calc(33.333% - 0.8rem);
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .gallery-track {
        animation: none !important;
        gap: 0.8rem;
    }

    .gallery-item {
        aspect-ratio: 4/3;
        min-width: 180px;
        flex: 0 0 calc(50% - 0.8rem);
        max-width: 220px;
    }

    .gallery-overlay {
        padding: 0.8rem 0.6rem 0.6rem;
    }

    .gallery-overlay span {
        font-size: 0.8rem;
    }

    .gallery-category {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
}

.gallery-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    aspect-ratio: 4/3;
    /* Remove margin from here since it's handled in the slider context */
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    cursor: pointer;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: var(--white);
    padding: 1.5rem 1rem 1rem;
    transform: translateY(100%);
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay span {
    font-weight: 500;
    font-size: 0.9rem;
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-heavy);
}

.lightbox-caption {
    color: var(--white);
    margin-top: 1rem;
    font-size: 1rem;
    text-align: center;
    max-width: 600px;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--white);
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.lightbox-close {
    top: -60px;
    right: 0;
}

.lightbox-prev {
    left: -80px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: -80px;
    top: 50%;
    transform: translateY(-50%);
}

@media (max-width: 768px) {
    .lightbox-prev,
    .lightbox-next {
        display: none;
    }
    
    .lightbox-close {
        top: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
        font-size: 1.5rem;
    }
    
    .lightbox-image {
        max-height: 70vh;
        max-width: 95vw;
    }
    
    .lightbox-caption {
        font-size: 0.9rem;
        margin-top: 0.8rem;
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .lightbox-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
    }
    
    .lightbox-image {
        max-height: 60vh;
    }
    
    .lightbox-caption {
        font-size: 0.8rem;
        margin-top: 0.6rem;
    }
}

/* Touch Target Optimization */
@media (max-width: 768px) {
    /* Ensure all interactive elements meet minimum touch target size */
    .nav-menu a,
    .btn-primary,
    .btn-secondary,
    .project-link,
    .extra-card,
    .gallery-item,
    .achievement-card,
    .year-marker,
    .tech-item,
    .hangman-key,
    .hangman-btn,
    .lightbox-close,
    .lightbox-prev,
    .lightbox-next {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Improve touch feedback */
    .nav-menu a:active,
    .btn-primary:active,
    .btn-secondary:active,
    .project-link:active,
    .extra-card:active,
    .gallery-item:active,
    .achievement-card:active,
    .year-marker:active,
    .tech-item:active,
    .hangman-key:active,
    .hangman-btn:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
    
    /* Disable hover effects on touch devices */
    .nav-menu a:hover,
    .btn-primary:hover,
    .btn-secondary:hover,
    .project-link:hover,
    .extra-card:hover,
    .gallery-item:hover,
    .achievement-card:hover,
    .year-marker:hover,
    .tech-item:hover,
    .hangman-key:hover,
    .hangman-btn:hover {
        transform: none;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--light-almond);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-medium);
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .mission-text {
        font-size: 1rem;
    }
    
    .typewriter {
        white-space: normal;
        animation: none;
        border-right: none;
    }
    
    .experience-content-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .dial-container {
        width: 300px;
        height: 300px;
    }
    
    .dial {
        width: 250px;
        height: 250px;
    }
    
    .year-marker {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .experience-content {
        padding: 1.5rem;
        min-height: 300px;
    }
    
    .experience-item h3 {
        font-size: 1.5rem;
    }
    
    .experience-item .company {
        font-size: 1.1rem;
    }
    
    .extras-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .project-links {
        flex-direction: column;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-cta {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .mission-text {
        font-size: 0.95rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .tech-item {
        margin: 0 1rem;
        min-width: 100px;
    }
}

/* Hangman Game Styles */
.hangman-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 1rem;
}

.hangman-modal.active {
    display: flex;
}

.hangman-container {
    background: rgba(238, 229, 218, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 2rem;
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-heavy);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.hangman-header {
    text-align: center;
    margin-bottom: 2rem;
}

.hangman-header h2 {
    color: var(--deep-charcoal);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.hangman-rules {
    background: rgba(255, 255, 255, 0.3);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hangman-rules h4 {
    color: var(--deep-charcoal);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.hangman-rules ul {
    list-style: none;
    padding: 0;
}

.hangman-rules li {
    color: var(--gray-dark);
    margin-bottom: 0.3rem;
    padding-left: 1rem;
    position: relative;
}

.hangman-rules li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #667eea;
}

.hangman-game-area {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.hangman-figure {
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hangman-figure svg {
    width: 150px;
    height: 180px;
    color: var(--deep-charcoal);
}

.hangman-figure .hidden {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hangman-figure line,
.hangman-figure circle {
    transition: opacity 0.3s ease;
}

.hangman-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
}

.hangman-word {
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    color: var(--deep-charcoal);
    letter-spacing: 0.5rem;
    font-family: 'Roboto Mono', monospace;
    background: rgba(255, 255, 255, 0.3);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hangman-message {
    text-align: center;
    font-size: 1.1rem;
    color: var(--gray-dark);
    min-height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hangman-message-win {
    color: #28a745;
    font-weight: 600;
}

.hangman-message-lose {
    color: #dc3545;
    font-weight: 600;
}

.hangman-keyboard {
    margin-bottom: 1.5rem;
}

.hangman-keyboard-layout {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 0.5rem;
    max-width: 500px;
    margin: 0 auto;
}

.hangman-key {
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 0.8rem 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--deep-charcoal);
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hangman-key:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.hangman-key:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.hangman-key-correct {
    background: rgba(40, 167, 69, 0.3);
    border-color: #28a745;
    color: #28a745;
}

.hangman-key-wrong {
    background: rgba(220, 53, 69, 0.3);
    border-color: #dc3545;
    color: #dc3545;
}

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

.hangman-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.hangman-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.hangman-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--deep-charcoal);
    transition: all 0.2s ease;
}

.hangman-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Responsive Design for Hangman */
@media (max-width: 768px) {
    .hangman-container {
        padding: 1.5rem;
        margin: 1rem;
        max-height: 95vh;
        overflow-y: auto;
    }
    
    .hangman-game-area {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .hangman-figure svg {
        width: 120px;
        height: 150px;
    }
    
    .hangman-word {
        font-size: 1.5rem;
        letter-spacing: 0.3rem;
    }
    
    .hangman-keyboard-layout {
        grid-template-columns: repeat(7, 1fr);
        gap: 0.4rem;
        max-width: 400px;
    }
    
    .hangman-key {
        padding: 0.6rem 0.3rem;
        font-size: 0.9rem;
        min-width: 35px;
        height: 35px;
        min-height: 44px;
    }
    
    .hangman-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .hangman-btn {
        width: 100%;
        max-width: 200px;
        justify-content: center;
        min-height: 44px;
    }
    
    .hangman-rules {
        font-size: 0.9rem;
    }
    
    .hangman-rules li {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .hangman-container {
        padding: 1rem;
        margin: 0.5rem;
    }
    
    .hangman-header h2 {
        font-size: 1.5rem;
    }
    
    .hangman-word {
        font-size: 1.2rem;
        letter-spacing: 0.2rem;
    }
    
    .hangman-keyboard-layout {
        grid-template-columns: repeat(6, 1fr);
        gap: 0.3rem;
    }
    
    .hangman-key {
        padding: 0.5rem 0.2rem;
        font-size: 0.8rem;
        min-width: 30px;
        height: 30px;
        min-height: 44px;
    }
    
    .hangman-figure svg {
        width: 100px;
        height: 120px;
    }
    
    .hangman-rules {
        padding: 0.8rem;
    }
    
    .hangman-rules h4 {
        font-size: 1rem;
    }
    
    .hangman-rules li {
        font-size: 0.8rem;
    }
}

