/* ===================================
   CSS RESET & BASE STYLES
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*:focus {
    outline: none;
}

a:focus,
button:focus {
    outline: none;
    box-shadow: none;
}

:root {
    /* Dark Mode Colors */
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-tertiary: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-tertiary: #666666;
    --accent-primary: #ffffff;
    --accent-secondary: #e0e0e0;
    --accent-gradient: linear-gradient(135deg, #ffffff 0%, #a0a0a0 100%);
    --border-color: #2a2a2a;
    --shadow-color: rgba(255, 255, 255, 0.05);
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Playfair Display', serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    /* Spacing */
    --section-padding: 120px;
    --container-width: 1200px;
    
    /* Transitions */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

[data-theme="light"] {
    /* Light Mode Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #fafafa;
    --bg-tertiary: #f5f5f5;
    --text-primary: #0a0a0a;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --accent-primary: #0a0a0a;
    --accent-secondary: #333333;
    --accent-gradient: linear-gradient(135deg, #0a0a0a 0%, #666666 100%);
    --border-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.05);
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===================================
   THEME TOGGLE
   =================================== */
.theme-toggle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    transform: scale(1.1);
    opacity: 0.7;
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    color: var(--text-primary);
    transition: var(--transition-smooth);
}

.theme-icon {
    position: absolute;
    transition: all 0.3s ease;
}

.theme-icon.sun {
    opacity: 0;
    transform: rotate(180deg) scale(0);
}

.theme-icon.moon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

[data-theme="light"] .theme-icon.sun {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

[data-theme="light"] .theme-icon.moon {
    opacity: 0;
    transform: rotate(-180deg) scale(0);
}

/* ===================================
   NAVIGATION
   =================================== */
.navbar {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    max-width: 90%;
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

@media (max-width: 968px) {
    .navbar {
        max-width: 95%;
        top: 1rem;
    }
}


[data-theme="light"] .navbar {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.nav-container {
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.nav-center {
    display: flex;
    align-items: center;
    gap: 3rem;
    flex: 1;
    justify-content: center;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    transition: var(--transition-smooth);
    color: var(--text-primary);
    outline: none;
}

.nav-logo:focus {
    outline: none;
    box-shadow: none;
}

.nav-logo:hover {
    transform: translateY(-2px);
    opacity: 0.7;
}

.nav-logo-text {
    display: inline-block;
    color: var(--text-primary);
    transition: var(--transition-smooth);
}

.nav-logo-letter {
    display: inline-block;
    animation: letterReveal 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) both;
}

.nav-logo-letter:nth-child(1) {
    animation-delay: 0.1s;
}

.nav-logo-letter:nth-child(2) {
    animation-delay: 0.2s;
}

@keyframes letterReveal {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    transition: var(--transition-smooth);
    padding: 0.5rem 0;
    outline: none;
    border: none;
}

.nav-link:focus {
    outline: none;
    box-shadow: none;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--text-primary);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--text-primary);
}

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

.nav-link.active {
    color: var(--text-primary);
}

.nav-link.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    z-index: 1001;
    padding: 0.5rem;
}

.hamburger span {
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition-smooth);
    border-radius: 2px;
}

.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(5px, -5px);
}

/* ===================================
   CONTAINER & UTILITIES
   =================================== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 4rem;
    text-align: center;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--text-primary);
}

/* ===================================
   HERO SECTION
   =================================== */
#home {
    scroll-margin-top: 0;
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 0;
    position: relative;
    overflow: hidden;
}

@media (max-width: 640px) {
    .hero {
        padding: 6rem 0 4rem;
        min-height: auto;
    }
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

[data-theme="light"] .hero::before {
    background: radial-gradient(circle at 20% 50%, rgba(0, 0, 0, 0.02) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(0, 0, 0, 0.02) 0%, transparent 50%);
}

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

.hero-greeting {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 400;
    font-style: italic;
    font-family: var(--font-display);
}

.hero-name {
    font-family: var(--font-display);
    font-size: 4.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.hero-title {
    font-size: 2rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2.5rem;
    max-width: 600px;
}

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

.btn {
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition-smooth);
    display: inline-block;
    cursor: pointer;
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-primary);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    background: var(--text-secondary);
}

[data-theme="light"] .btn-primary {
    background: var(--text-primary);
    color: var(--bg-primary);
}

[data-theme="light"] .btn-primary:hover {
    background: var(--text-secondary);
}

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

.btn-secondary:hover {
    background: var(--text-primary);
    color: var(--bg-primary);
    transform: translateY(-2px);
}

/* Hero Image Animation */
.hero-image {
    position: relative;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.dino-game-container {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.dino-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.dino-preview:hover {
    transform: scale(1.05);
}

#dinoPreviewCanvas {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-tertiary);
    padding: 1rem;
}

.speech-bubble-game {
    position: relative;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.speech-bubble-game::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid var(--border-color);
}

.speech-bubble-game p {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 500;
    text-align: center;
}

.game-full {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.game-full.expanding {
    animation: expandCanvas 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.game-full.collapsing {
    animation: collapseCanvas 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes expandCanvas {
    0% {
        opacity: 0;
        max-height: 0;
        transform: scaleY(0);
        transform-origin: top;
    }
    50% {
        opacity: 0.5;
        max-height: 200px;
    }
    100% {
        opacity: 1;
        max-height: 500px;
        transform: scaleY(1);
    }
}

@keyframes collapseCanvas {
    0% {
        opacity: 1;
        max-height: 500px;
        transform: scaleY(1);
        transform-origin: top;
    }
    50% {
        opacity: 0.5;
        max-height: 200px;
    }
    100% {
        opacity: 0;
        max-height: 0;
        transform: scaleY(0);
    }
}

.game-header {
    display: flex;
    justify-content: center;
    padding: 0.5rem 0;
}

.game-scores {
    display: flex;
    gap: 2rem;
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--text-secondary);
}

.game-scores strong {
    color: var(--text-primary);
    font-size: 1.2rem;
}

#dinoCanvas {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-tertiary);
    cursor: pointer;
    transition: var(--transition-smooth);
    max-width: 100%;
    height: auto;
}

#dinoCanvas:hover {
    border-color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.game-start-message {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1rem;
    animation: pulse 2s ease-in-out infinite;
}

.game-start-message strong {
    color: var(--text-primary);
    font-weight: 600;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* ===================================
   ABOUT SECTION
   =================================== */
.about {
    min-height: 100vh;
    padding: var(--section-padding) 0;
    background: var(--bg-secondary);
    scroll-margin-top: 0;
}

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

.about-text {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.about-intro {
    font-size: 1.2rem;
    color: var(--text-primary);
    font-weight: 500;
}

.about-text p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-tertiary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: var(--transition-smooth);
}

.stat-item:hover {
    transform: translateY(-5px);
    border-color: var(--text-primary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.stat-item h3 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.stat-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.skills-grid h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.skills-category {
    margin-bottom: 2rem;
}

.skills-category h4 {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tag {
    padding: 0.6rem 1.2rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: var(--transition-smooth);
    cursor: default;
}

.skill-tag:hover {
    border-color: var(--text-primary);
    background: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ===================================
   EXPERIENCE SECTION
   =================================== */
.experience {
    min-height: 100vh;
    padding: var(--section-padding) 0;
    scroll-margin-top: 0;
}

.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-left: 3rem;
    margin-bottom: 3rem;
}

.timeline-dot {
    position: absolute;
    left: -6px;
    top: 0;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--text-primary);
    box-shadow: 0 0 0 4px var(--bg-primary), 0 0 0 6px var(--text-primary);
}

.timeline-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    transition: var(--transition-smooth);
}

.timeline-content:hover {
    border-color: var(--text-primary);
    transform: translateX(10px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.timeline-header h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text-primary);
}

.timeline-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    font-family: var(--font-mono);
}

.timeline-content h4 {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.timeline-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.timeline-list li {
    color: var(--text-secondary);
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
}

.timeline-list li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--text-primary);
    font-size: 1.2rem;
}

/* ===================================
   PROJECTS SECTION
   =================================== */
.projects {
    min-height: 100vh;
    padding: var(--section-padding) 0;
    background: var(--bg-secondary);
    scroll-margin-top: 0;
}

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

.project-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--text-primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.project-header h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text-primary);
}

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

.project-link {
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.project-link:hover {
    color: var(--text-primary);
    transform: translateY(-2px);
}

.project-description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

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

.tech-tag {
    padding: 0.4rem 0.8rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    font-family: var(--font-mono);
}

.project-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: auto;
}

.project-features li {
    color: var(--text-secondary);
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
    font-size: 0.95rem;
}

.project-features li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--text-primary);
}

/* ===================================
   HONORS SECTION
   =================================== */
.honors {
    padding: var(--section-padding) 0;
}

.honors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.honor-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    transition: var(--transition-smooth);
}

.honor-card:hover {
    transform: translateY(-10px);
    border-color: var(--text-primary);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.honor-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.honor-card h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.honor-card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===================================
   CONTACT SECTION
   =================================== */
.contact {
    min-height: 100vh;
    padding: var(--section-padding) 0;
    background: var(--bg-secondary);
    scroll-margin-top: 0;
}

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

.contact-intro {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 3rem;
}

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

.email-preview {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.email-form-wrapper {
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.email-form-wrapper.expanding {
    animation: expandCanvas 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.email-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.email-form-header h3 {
    color: var(--text-primary);
    font-size: 1.4rem;
    margin: 0;
}

.email-form-close {
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.email-form-close:hover {
    background: rgba(255, 0, 0, 0.8);
    transform: rotate(90deg);
}

.email-form-inline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.email-form-inline input,
.email-form-inline textarea {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.9rem 1.2rem;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.email-form-inline input:focus,
.email-form-inline textarea:focus {
    outline: none;
    border-color: var(--text-primary);
    background: var(--bg-primary);
}

.email-form-inline textarea {
    resize: vertical;
    min-height: 100px;
}

.email-success-inline {
    text-align: center;
    padding: 2rem;
    animation: fadeIn 0.5s ease;
}

.email-success-inline svg {
    color: #4CAF50;
    margin-bottom: 1rem;
    animation: scaleIn 0.5s ease;
}

.email-success-inline h4 {
    color: var(--text-primary);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.email-success-inline p {
    color: var(--text-secondary);
}

.contact-methods-side {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.contact-card {
    background: var(--bg-tertiary);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: var(--transition-smooth);
    text-decoration: none;
    color: var(--text-primary);
}

.contact-card-btn {
    cursor: pointer;
    width: 100%;
}

.contact-card {
    display: block;
}

.contact-card:hover {
    transform: translateY(-10px);
    border-color: var(--text-primary);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.contact-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.contact-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.contact-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.social-link {
    color: var(--text-secondary);
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
}

.social-link:hover {
    color: var(--text-primary);
    border-color: var(--text-primary);
}

/* ===================================
   RESUME MODAL
   =================================== */
.resume-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.resume-modal-content {
    position: relative;
    width: 85%;
    max-width: 700px;
    height: 80vh;
    background: var(--bg-primary);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.resume-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.resume-close:hover {
    background: rgba(255, 0, 0, 0.8);
    transform: rotate(90deg);
}

.resume-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: var(--bg-secondary);
}

.resume-paper {
    background: var(--bg-tertiary);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    text-align: center;
    animation: paperSlideIn 0.6s ease-out;
    max-width: 300px;
}

@keyframes paperSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.resume-paper h2 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
    font-family: var(--font-display);
}

.printing-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.loading-lines {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.loading-lines .line {
    height: 3px;
    background: linear-gradient(90deg, var(--border-color) 0%, var(--text-primary) 50%, var(--border-color) 100%);
    background-size: 200% 100%;
    border-radius: 2px;
    animation: printLine 1.5s ease-in-out infinite;
}

.loading-lines .line:nth-child(1) {
    width: 100%;
    animation-delay: 0s;
}

.loading-lines .line:nth-child(2) {
    width: 90%;
    animation-delay: 0.2s;
}

.loading-lines .line:nth-child(3) {
    width: 95%;
    animation-delay: 0.4s;
}

.loading-lines .line:nth-child(4) {
    width: 85%;
    animation-delay: 0.6s;
}

.loading-lines .line:nth-child(5) {
    width: 70%;
    animation-delay: 0.8s;
}

@keyframes printLine {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.resume-viewer {
    position: relative;
    width: 100%;
    height: 100%;
    animation: fadeIn 0.5s ease;
}

.resume-viewer iframe {
    width: 100%;
    height: calc(100% - 50px);
    border: none;
}

.download-btn {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: var(--text-primary);
    color: var(--bg-primary);
    border: none;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background: var(--text-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.download-btn svg {
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* ===================================
   EMAIL MODAL
   =================================== */
.email-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.email-modal-content {
    position: relative;
    width: 90%;
    max-width: 500px;
    background: var(--bg-primary);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.email-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.email-close:hover {
    background: rgba(255, 0, 0, 0.8);
    transform: rotate(90deg);
}

.email-header {
    margin-bottom: 1.5rem;
    text-align: center;
}

.email-header h2 {
    color: var(--text-primary);
    font-size: 1.6rem;
    margin: 0;
    font-family: var(--font-display);
}

.email-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.email-form input,
.email-form textarea {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.9rem 1.2rem;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.email-form input:focus,
.email-form textarea:focus {
    outline: none;
    border-color: var(--text-primary);
    background: var(--bg-secondary);
}

.email-form textarea {
    resize: vertical;
    min-height: 100px;
}

.email-send-btn {
    background: var(--text-primary);
    color: var(--bg-primary);
    border: none;
    border-radius: 10px;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.email-send-btn:hover:not(:disabled) {
    background: var(--text-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.email-send-btn:active:not(:disabled) {
    transform: translateY(0);
}

.email-send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.email-success {
    text-align: center;
    padding: 2rem 1rem;
    animation: fadeIn 0.5s ease;
}

.email-success svg {
    color: #4CAF50;
    margin-bottom: 1rem;
    animation: scaleIn 0.5s ease;
}

.email-success h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-display);
}

.email-success p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ===================================
   FOOTER
   =================================== */
.footer {
    padding: 2rem 0;
    text-align: center;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
}

.footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===================================
   ANIMATIONS
{{ ... }}
   =================================== */
.fade-in {
    animation: fadeIn 0.8s ease-out;
}

.fade-in-delay-1 {
    animation: fadeIn 0.8s ease-out 0.2s both;
}

.fade-in-delay-2 {
    animation: fadeIn 0.8s ease-out 0.4s both;
}

.fade-in-delay-3 {
    animation: fadeIn 0.8s ease-out 0.6s both;
}

.fade-in-delay-4 {
    animation: fadeIn 0.8s ease-out 0.8s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

[data-aos] {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

[data-aos].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 968px) {
    :root {
        --section-padding: 80px;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-name {
        font-size: 3.5rem;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-image {
        height: auto;
        min-height: 250px;
    }

    .dino-game-container {
        max-width: 100%;
    }

    #dinoCanvas {
        width: 100%;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .nav-container {
        padding: 0.5rem 1rem;
        gap: 0.5rem;
        justify-content: space-between;
    }

    .nav-center {
        display: none;
    }

    .nav-right {
        gap: 0.75rem;
    }

    .nav-logo {
        font-size: 1rem;
        padding: 0.4rem 0.8rem;
    }

    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 30px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
    }

    .hamburger span {
        width: 100%;
        height: 2px;
        background: var(--text-primary);
        border-radius: 10px;
        transition: all 0.3s ease;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .theme-toggle {
        width: 38px;
        height: 38px;
    }

    .contact-methods-side {
        grid-template-columns: 1fr;
    }

    .email-form-wrapper {
        padding: 1.5rem;
    }

    .resume-modal-content {
        width: 95%;
        height: 85vh;
        padding: 2rem 1.5rem;
    }

    .theme-toggle svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 1rem;
    }

    .navbar {
        max-width: 98%;
        top: 0.5rem;
        border-radius: 40px;
    }

    .nav-container {
        padding: 0.4rem 0.75rem;
    }

    .theme-toggle {
        width: 36px;
        height: 36px;
    }

    .hamburger {
        width: 36px;
        height: 36px;
    }

    .hero-name {
        font-size: 2rem;
        line-height: 1.2;
        word-break: break-word;
        margin-bottom: 0.5rem;
    }

    .hero-title {
        font-size: 1rem;
        line-height: 1.4;
        margin-bottom: 1rem;
    }

    .hero-description {
        font-size: 0.9rem;
        line-height: 1.6;
        margin-bottom: 1.5rem;
    }

    .hero-greeting {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }

    .btn {
        width: 100%;
        text-align: center;
        padding: 0.9rem 1.5rem;
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 3rem;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .timeline-item {
        padding-left: 2rem;
    }

    .timeline-content {
        padding: 1.5rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-card {
        padding: 1.5rem;
    }

    .nav-menu {
        width: 75%;
        max-width: 280px;
    }

    .nav-link {
        font-size: 1.05rem;
        padding: 0.75rem 1rem;
        display: block;
        text-align: left;
    }

    .dino-preview canvas {
        width: 150px;
        height: 120px;
    }

    .speech-bubble-game {
        max-width: 150px;
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
    }

    #dinoCanvas {
        max-width: 100%;
        height: auto;
    }

    .game-scores {
        font-size: 0.85rem;
    }

    .email-container {
        margin-bottom: 1.5rem;
    }

    .email-preview .contact-card {
        padding: 1.5rem;
    }

    .email-form-wrapper {
        padding: 1.25rem;
    }

    .email-form-header h3 {
        font-size: 1.2rem;
    }

    .email-form-inline input,
    .email-form-inline textarea {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .contact-methods-side {
        gap: 1.5rem;
    }

    .contact-card {
        padding: 1.5rem;
    }

    .contact-icon {
        font-size: 2rem;
    }

    .resume-modal-content {
        padding: 1.5rem;
    }

    .resume-paper {
        padding: 1.5rem;
        max-width: 250px;
    }

    .skills-grid {
        padding: 1.5rem;
    }

    .skill-tag {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
}

/* ===================================
   ACCESSIBILITY
   =================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--text-primary);
    outline-offset: 2px;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
    outline: none;
}

/* Skip to main content link for accessibility */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--text-primary);
    color: var(--bg-primary);
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    z-index: 100;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* Touch-friendly button sizes */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .contact-card,
    .nav-link,
    .theme-toggle,
    .hamburger {
        min-height: 44px;
        min-width: 44px;
    }
    
    .email-send-btn,
    .download-btn {
        min-height: 48px;
    }
    
    /* Increase tap targets for mobile */
    .project-link,
    .social-link {
        min-width: 48px;
        min-height: 48px;
    }
    
    /* Disable hover effects on touch devices */
    .contact-card:hover {
        transform: none;
    }
}

/* ===================================
   PRINT STYLES
   =================================== */
@media print {
    .navbar,
    .scroll-indicator {
        display: none;
    }
}
