/* ===========================
   ROOT VARIABLES & SETUP
   =========================== */
:root {
    --primary-color: #E63946;
    --secondary-color: #A4161A;
    --text-dark: #1a1a1a;
    --text-light: #666666;
    --bg-light: #FAF9F7;
    --bg-white: #FFFFFF;
    --border-color: #f0ede8;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    --radius: 12px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-white);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* ===========================
   TYPOGRAPHY
   =========================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

/* ===========================
   BUTTONS
   =========================== */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    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;
}

/* ===========================
   NAVIGATION
   =========================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-link {
    color: var(--text-dark);
    font-weight: 500;
    position: relative;
}

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

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: var(--transition);
}

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

/* ===========================
   HERO SECTION
   =========================== */
.hero {
    margin-top: 80px;
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    background: var(--bg-white);
    position: relative;
    overflow: hidden;
}

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

.hero-title {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.hero-subtitle-secondary {
    font-size: 1.2rem;
    color: var(--secondary-color);
    font-weight: 500;
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

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

.hero-social a {
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.hero-social a:hover {
    transform: translateY(-3px);
    color: var(--secondary-color);
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
    height: 100%;
}

.animated-shape {
    position: absolute;
    width: 420px;
    height: 420px;
    background: linear-gradient(135deg, rgba(230, 57, 70, 0.15), rgba(164, 22, 26, 0.15));
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: shape 6s ease-in-out infinite;
    z-index: 1;
}

@keyframes shape {
    0%, 100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
    50% {
        border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
    }
}

.hero-image {
    position: relative;
    width: 320px;
    height: 320px;
    object-fit: cover;
    border-radius: 50%;
    border: 8px solid var(--bg-white);
    box-shadow: var(--shadow-lg);
    z-index: 2;
    transition: var(--transition);
}

.hero-image:hover {
    transform: scale(1.05);
}

/* ===========================
   SECTION STYLES
   =========================== */
section {
    padding: 80px 0;
}

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

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* ===========================
   ABOUT SECTION
   =========================== */
.about {
    background: var(--bg-white);
}

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

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

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

.stat {
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.stat:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--text-light);
    font-weight: 500;
}

/* ===========================
   SKILLS SECTION
   =========================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.skill-category h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

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

.skill-tag {
    display: inline-block;
    background: linear-gradient(135deg, rgba(230, 57, 70, 0.1), rgba(164, 22, 26, 0.1));
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
    border: 1px solid rgba(230, 57, 70, 0.3);
    transition: var(--transition);
}

.skill-tag:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: transparent;
}

/* ===========================
   PROJECTS SECTION
   =========================== */
.projects {
    background: var(--bg-white);
}

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

.project-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.project-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transition: var(--transition);
}

.project-card:hover .project-image {
    transform: scale(1.05);
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.project-content p {
    font-size: 0.95rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

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

.project-tags span {
    display: inline-block;
    background: rgba(230, 57, 70, 0.1);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
}

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

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    transition: var(--transition);
}

.project-link:hover {
    color: var(--secondary-color);
    gap: 0.8rem;
}

/* ===========================
   EDUCATION SECTION
   =========================== */
.education {
    background: var(--bg-white);
}

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

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

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

.timeline-item:nth-child(odd) {
    text-align: right;
    padding-left: 0;
    padding-right: calc(50% + 2rem);
}

.timeline-item:nth-child(even) {
    padding-left: calc(50% + 2rem);
    padding-right: 0;
}

.timeline-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: white;
    border: 4px solid var(--primary-color);
    border-radius: 50%;
    top: 0;
    z-index: 10;
}

.timeline-content {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.timeline-content:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

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

.timeline-degree {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.3rem;
}

.timeline-institution {
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.3rem;
}

.timeline-details {
    font-size: 0.95rem;
    color: var(--text-light);
    margin: 0;
}

/* ===========================
   EXPERIENCE SECTION
   =========================== */
.experience {
    background: var(--bg-white);
}

.experience-list {
    max-width: 900px;
    margin: 0 auto;
}

.experience-item {
    background: white;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border-left: 4px solid var(--primary-color);
}

.experience-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(5px);
}

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

.experience-header h3 {
    color: var(--primary-color);
    margin: 0;
}

.experience-date {
    color: var(--text-light);
    font-size: 0.95rem;
    font-weight: 500;
}

.experience-company {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.experience-details {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0 0;
}

.experience-details li {
    padding: 0.5rem 0;
    color: var(--text-light);
    position: relative;
    padding-left: 1.5rem;
}

.experience-details li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* ===========================
   RESEARCH SECTION
   =========================== */
.research {
    background: var(--bg-white);
}

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

.research-item {
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-align: center;
}

.research-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
}

.research-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80px;
}

.research-item h3 {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.research-item p {
    font-size: 0.95rem;
    margin: 0;
}

/* ===========================
   PUBLICATIONS SECTION
   =========================== */
.publications {
    background: white;
}

.publications-list {
    max-width: 900px;
    margin: 0 auto;
}

.publication-item {
    display: flex;
    gap: 2rem;
    padding: 2rem;
    margin-bottom: 2rem;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.publication-item:hover {
    background: var(--bg-white);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.publication-marker {
    min-width: 80px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    padding-top: 0.5rem;
}

.publication-content h3 {
    color: var(--text-dark);
    margin-top: 0;
    font-size: 1.1rem;
    line-height: 1.4;
}

.publication-venue {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.publication-date {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.publication-doi {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.publication-doi a {
    word-break: break-all;
}

.publication-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

/* ===========================
.contact {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.contact .section-title {
    color: white;
}

.contact .section-title::after {
    background: rgba(255, 255, 255, 0.5);
}

.contact-subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

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

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.contact-item i {
    font-size: 1.5rem;
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.contact-item h4 {
    color: white;
    margin-bottom: 0.5rem;
}

.contact-item p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.contact-item a {
    color: white;
    border-bottom: 1px solid white;
    padding-bottom: 2px;
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: none;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.95);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.contact-form .btn-primary {
    background: white;
    color: var(--primary-color);
    font-weight: 700;
    margin-top: 0.5rem;
}

.contact-form .btn-primary:hover {
    background: rgba(255, 255, 255, 0.9);
}

/* ===========================
   FOOTER
   =========================== */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-social {
    display: flex;
    gap: 1.5rem;
}

.footer-social a {
    color: white;
    font-size: 1.3rem;
    transition: var(--transition);
}

.footer-social a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        gap: 0;
        list-style: none;
        box-shadow: var(--shadow-md);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-link::after {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .hero .container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

    .hero-buttons {
        flex-direction: column;
    }

    .hero-visual {
        display: flex;
        order: -1;
        margin-bottom: 1.5rem;
    }

    .animated-shape {
        width: 280px;
        height: 280px;
    }

    .hero-image {
        width: 220px;
        height: 220px;
        border-width: 6px;
    }

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

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer .container {
        flex-direction: column;
        gap: 1rem;
    }

    section {
        padding: 60px 0;
    }

    .timeline::before {
        left: 0;
        transform: translateX(0);
    }

    .timeline-item {
        padding: 0;
        padding-left: 3rem;
    }

    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        text-align: left;
        padding-left: 3rem;
        padding-right: 0;
    }

    .timeline-marker {
        left: 0;
        transform: translateX(-50%);
    }

    .publication-item {
        flex-direction: column;
        gap: 1rem;
    }

    .publication-marker {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

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

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

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

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

    section {
        padding: 40px 0;
    }

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

/* ===========================
   ANIMATIONS
   =========================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===========================
   UTILITY CLASSES
   =========================== */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
