/* Reset y Variables CSS */
:root {
    --primary-color: #336699;
    --primary-dark: #2a5280;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-dark: #0f172a;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    --border-radius: 0.5rem;
    --transition: all 0.3s ease;
    --max-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Ubuntu', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Ubuntu', sans-serif;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: var(--shadow-md);
}

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

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

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

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo a {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

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

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

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

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

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

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, #e6f0f7 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23e2e8f0" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.1;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
}

/* Mobile-first approach for hero title visibility */
@media (max-width: 768px) {
    .hero-title {
        opacity: 1;
        transform: translateY(0);
        margin-top: 55px;
    }
}

.highlight {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

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

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

.hero-circle {
    width: 300px;
    height: 300px;
    border-radius: var(--border-radius);
    position: relative;
    left: -20px;
    animation: float 6s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.hero-icon {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), #f97316);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    box-shadow: var(--shadow-lg);
    animation: bounce 2s infinite;
}

.hero-ai-icon {
    position: absolute;
    top: -30px;
    right: -30px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    box-shadow: var(--shadow-lg);
    animation: float 4s ease-in-out infinite 1s;
}

.hero-circle::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    border-radius: var(--border-radius);
    border: 2px solid var(--primary-color);
    opacity: 0.3;
    animation: pulse 4s ease-in-out infinite;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-light);
    font-size: 1.5rem;
    animation: bounce 2s ease-in-out infinite;
}

/* About Section */
.about {
    padding: 6rem 0;
    background: var(--bg-primary);
}

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

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

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

.stat {
    text-align: center;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    background: var(--bg-secondary);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.tech-visual {
    position: relative;
    height: 350px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 1px solid #334155;
}

.code-container {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #e2e8f0;
    position: relative;
    z-index: 2;
}

.code-line {
    margin: 0.5rem 0;
    opacity: 0;
    animation: typewriter 0.5s ease-out forwards;
}

.code-line:nth-child(1) { animation-delay: 0.2s; }
.code-line:nth-child(2) { animation-delay: 0.4s; }
.code-line:nth-child(3) { animation-delay: 0.6s; }
.code-line:nth-child(4) { animation-delay: 0.8s; }
.code-line:nth-child(5) { animation-delay: 1.0s; }
.code-line:nth-child(6) { animation-delay: 1.2s; }
.code-line:nth-child(7) { animation-delay: 1.4s; }

.indent {
    padding-left: 2rem;
}

.code-keyword {
    color: #c792ea;
    font-weight: 600;
}

.code-variable {
    color: #82aaff;
}

.code-property {
    color: #ffcb6b;
}

.code-string {
    color: #c3e88d;
}

.code-number {
    color: #f78c6c;
}

.code-boolean {
    color: #ff5370;
}

.floating-icons {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

.floating-icon {
    position: absolute;
    width: 35px;
    height: 35px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6366f1;
    font-size: 1rem;
    animation: float 6s ease-in-out infinite var(--delay);
}

.floating-icon:nth-child(1) { top: 10%; right: 15%; }
.floating-icon:nth-child(2) { top: 25%; right: 5%; }
.floating-icon:nth-child(3) { top: 45%; right: 20%; }
.floating-icon:nth-child(4) { top: 65%; right: 8%; }
.floating-icon:nth-child(5) { top: 80%; right: 25%; }
.floating-icon:nth-child(6) { top: 15%; right: 35%; }

/* Projects Section */
.projects {
    padding: 6rem 0;
    background: var(--bg-secondary);
}

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

.project-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

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

.project-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    position: relative;
    overflow: hidden;
    border-bottom: 4px solid #336699;
}

.project-card:nth-child(1) .project-image {
    background-image: url(assets/palanteganado.png);
    background-size: cover;
    background-position: center;
}

.project-card:nth-child(2) .project-image {
    background-image: url(assets/ventanilla.png);
    background-size: cover;
    background-position: center;
}

.project-card:nth-child(3) .project-image {
    background-image: url(assets/matias.png);
    background-size: cover;
    background-position: center;
}

.project-card:nth-child(4) .project-image {
    background-image: url(assets/garnersystem.png);
    background-size: cover;
    background-position: center;
}

.project-card:nth-child(5) .project-image {
    background-image: url(assets/tesseractsm.png);
    background-size: cover;
    background-position: center;
}

.project-card:nth-child(6) .project-image {
    background-image: url(assets/tecnicolas.png);
    background-size: cover;
    background-position: center;
}

.project-card:nth-child(7) .project-image {
    background-image: url(assets/aguacatin.png);
    background-size: cover;
    background-position: center;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

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

.project-link {
    width: 50px;
    height: 50px;
    background: var(--bg-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.2rem;
    transition: var(--transition);
}

.project-link:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.project-content {
    padding: 1.5rem;
}

.project-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

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

.tech-tag {
    background: var(--bg-secondary);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Skills Section */
.skills {
    padding: 6rem 0;
    background: var(--bg-primary);
}

.skills-content {
    display: grid;
    gap: 3rem;
}

.skills-category {
    text-align: center;
}

.category-title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    transition: var(--transition);
    border: 2px solid transparent;
}

.skill-item:hover {
    transform: translateY(-3px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.skill-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.skill-item span {
    font-weight: 500;
    color: var(--text-primary);
}

/* Experience Section */
.experience {
    padding: 6rem 0;
    background: var(--bg-secondary);
}

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

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

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
}

.timeline-item:nth-child(odd) {
    flex-direction: row-reverse;
}

.timeline-content {
    width: 55%;
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    position: relative;
}

.timeline-title {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.timeline-company {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-period {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.timeline-description {
    list-style: none;
    padding: 0;
}

.timeline-description li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.timeline-description li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* Contact Section */
.contact {
    padding: 6rem 0;
    background: var(--bg-primary);
}

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

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.contact-description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-top: 2rem;
    font-size: 1.1rem;
}

.contact-intro {
    margin-bottom: 2rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.contact-item:hover {
    background: var(--bg-primary);
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.contact-icon {
    width: 40px;
    height: 40px;
    background: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    flex-shrink: 0;
}

.contact-text strong {
    display: block;
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

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

.contact-items {
    margin-bottom: 2rem;
}

.contact-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 250px;
}

.contact-item i {
    width: 20px;
    color: var(--primary-color);
}

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

.social-link {
    width: 50px;
    height: 50px;
    background: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

/* Tech Showcase */
.tech-showcase {
    margin-top: 3rem;
    padding: 2rem 2.5rem 1.5rem 2.5rem;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    border-radius: var(--border-radius);
    border: 1px solid #334155;
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
}

.tech-showcase::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(245, 158, 11, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    animation: backgroundShift 8s ease-in-out infinite;
    pointer-events: none;
}

.tech-showcase::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%236366f1" stroke-width="0.5" opacity="0.3"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/><circle cx="25" cy="25" r="1" fill="%236366f1" opacity="0.6"><animate attributeName="opacity" values="0.3;1;0.3" dur="3s" repeatCount="indefinite"/></circle><circle cx="75" cy="45" r="1" fill="%23f59e0b" opacity="0.6"><animate attributeName="opacity" values="0.3;1;0.3" dur="4s" repeatCount="indefinite"/></circle><circle cx="50" cy="75" r="1" fill="%238b5cf6" opacity="0.6"><animate attributeName="opacity" values="0.3;1;0.3" dur="5s" repeatCount="indefinite"/></circle></svg>') repeat;
    opacity: 0.4;
    pointer-events: none;
}

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

.ai-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--border-radius);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards var(--delay);
    transition: all 0.3s ease;
}

.ai-item:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.ai-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent-color), #f97316);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.ai-content h5 {
    margin: 0 0 0.5rem 0;
    color: #e2e8f0;
    font-size: 1rem;
    font-weight: 600;
}

.ai-content p {
    margin: 0;
    color: #94a3b8;
    font-size: 0.9rem;
}

.tech-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(99, 102, 241, 0.2);
}

.neural-network {
    position: relative;
    width: 80px;
    height: 40px;
}

.node {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--accent-color);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.node:nth-child(1) { top: 0; left: 0; animation-delay: 0s; }
.node:nth-child(2) { top: 50%; left: 50%; transform: translateY(-50%); animation-delay: 0.7s; }
.node:nth-child(3) { bottom: 0; right: 0; animation-delay: 1.4s; }

.connection {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    opacity: 0.6;
    animation: dataFlow 3s ease-in-out infinite;
}

.connection:nth-child(4) {
    top: 4px;
    left: 8px;
    width: 45px;
    transform: rotate(25deg);
}

.connection:nth-child(5) {
    bottom: 4px;
    left: 8px;
    width: 45px;
    transform: rotate(-25deg);
}

.connection:nth-child(6) {
    top: 50%;
    right: 8px;
    width: 30px;
    transform: translateY(-50%);
}

.tech-tagline {
    color: #94a3b8;
    font-style: italic;
    font-size: 0.95rem;
}

/* Form */
.form {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--border-radius);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-footer .social-links {
    margin: 0;
}

/* Footer */
.footer {
    background: var(--bg-dark);
    color: white;
    padding: 2rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.05); }
}

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

@keyframes typewriter {
    0% { 
        opacity: 0; 
        transform: translateX(-20px);
    }
    100% { 
        opacity: 1; 
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    0% { 
        opacity: 0; 
        transform: translateY(20px);
    }
    100% { 
        opacity: 1; 
        transform: translateY(0);
    }
}

@keyframes dataFlow {
    0%, 100% { 
        opacity: 0.3; 
        transform: scaleX(0.5);
    }
    50% { 
        opacity: 1; 
        transform: scaleX(1);
    }
}

@keyframes backgroundShift {
    0%, 100% { 
        transform: translateX(0) translateY(0) scale(1);
    }
    25% { 
        transform: translateX(5px) translateY(-3px) scale(1.02);
    }
    50% { 
        transform: translateX(-3px) translateY(5px) scale(0.98);
    }
    75% { 
        transform: translateX(-5px) translateY(-2px) scale(1.01);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item {
        flex-direction: row !important;
        padding-left: 60px;
    }
    
    .timeline-marker {
        left: 30px;
        transform: translateX(-50%);
    }
    
    .timeline-content {
        width: 100%;
        margin-left: 0;
    }
    
    .timeline-content::before {
        left: -20px !important;
        border-right-color: var(--bg-primary) !important;
        border-left-color: transparent !important;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--bg-primary);
        flex-direction: column;
        justify-content: start;
        align-items: center;
        padding-top: 2rem;
        transition: var(--transition);
        box-shadow: var(--shadow-lg);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    .hero-container {
        padding: 2rem 1rem;
        gap: 3rem;
    }
    
    .hero-content {
        order: 1;
    }
    
    .hero-image {
        order: 2;
        justify-content: center;
        margin-bottom: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
        text-align: center;
        margin-bottom: 1.5rem;
        line-height: 1.1;
        word-wrap: break-word;
        hyphens: auto;
    }
    
    .hero-subtitle {
        text-align: center;
        font-size: 1.3rem;
    }
    
    .hero-description {
        text-align: center;
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .hero-buttons {
        justify-content: center;
        gap: 1rem;
    }
    
    .hero-circle {
        width: 280px;
        height: 280px;
        margin: 0 auto;
        left: 0;
    }
    
    .hero-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        bottom: -40px;
    }
    
    .hero-ai-icon {
        width: 55px;
        height: 55px;
        font-size: 1.3rem;
        top: -25px;
        right: 15px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .about-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .timeline {
        padding-left: 0;
    }
    
    .tech-visual {
        height: 350px;
        padding: 1.5rem;
    }
    
    .code-container {
        font-size: 0.8rem;
    }
    
    .floating-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .tech-showcase {
        padding: 1.5rem 2rem 1rem 2rem;
        margin-top: 2rem;
    }
    
    .ai-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .ai-item {
        padding: 1.2rem;
    }
    
    .tech-footer {
        flex-direction: column;
        gap: 1rem;
    }
    
    .contact-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .contact-item {
        min-width: auto;
        justify-content: center;
    }
    
    .form-footer {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-container {
        padding: 1.5rem 1rem;
        gap: 2rem;
        min-height: calc(100vh - 70px);
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .hero-title {
        font-size: 1.8rem;
        line-height: 1.2;
        margin-bottom: 1rem;
        margin-top: 55px;
        padding: 0 0.5rem;
        word-wrap: break-word;
        hyphens: auto;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .hero-description {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-circle {
        width: 220px;
        height: 220px;
    }
    
    .hero-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        bottom: -35px;
    }
    
    .hero-ai-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
        top: -20px;
        right: 10px;
    }
    
    .btn {
        padding: 0.65rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .project-card {
        margin: 0;
    }
    
    .tech-visual {
        height: 300px;
        padding: 1rem;
    }
    
    .code-container {
        font-size: 0.7rem;
        line-height: 1.4;
    }
    
    .floating-icon {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    
    .indent {
        padding-left: 1rem;
    }
    
    .tech-showcase {
        padding: 1rem 1.5rem 0.8rem 1.5rem;
        margin-top: 1.5rem;
    }
    
    .ai-item {
        padding: 1rem;
        gap: 0.8rem;
    }
    
    .ai-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    .ai-content h5 {
        font-size: 0.9rem;
    }
    
    .ai-content p {
        font-size: 0.8rem;
    }
    
    .neural-network {
        width: 60px;
        height: 30px;
    }
    
    .tech-tagline {
        font-size: 0.85rem;
        text-align: center;
    }
    
    .contact-item {
        font-size: 0.9rem;
        min-width: auto;
        justify-content: flex-start;
    }
    
    .form-footer {
        flex-direction: column;
        gap: 1rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}