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

:root {
    --primary-color: #ffffff;
    --secondary-color: #f8fafc;
    --accent-color: #3b82f6;
    --accent-hover: #2563eb;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--primary-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    transform: translateY(-100%);
    animation: slideDown 0.5s ease forwards;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

@keyframes slideDown {
    to { transform: translateY(0); }
}

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

.nav-logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
}

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

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

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

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

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 24px;
    height: 2px;
    margin: 6px auto;
    background: var(--text-primary);
    transition: var(--transition);
}

/* Hero Section with Construction Background */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 80px 24px;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(135deg, rgba(30, 41, 59, 0.92) 0%, rgba(15, 23, 42, 0.95) 100%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800"><defs><linearGradient id="g1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:%233b82f6;stop-opacity:0.3"/><stop offset="100%" style="stop-color:%238b5cf6;stop-opacity:0.2"/></linearGradient></defs><rect fill="%231e293b" width="1200" height="800"/><g opacity="0.15"><rect x="100" y="500" width="80" height="300" fill="%2364748b"/><rect x="200" y="450" width="100" height="350" fill="%23475569"/><rect x="320" y="400" width="120" height="400" fill="%23334155"/><rect x="460" y="350" width="150" height="450" fill="%231e293b"/><rect x="630" y="300" width="100" height="500" fill="%230f172a"/><rect x="750" y="380" width="130" height="420" fill="%23334155"/><rect x="900" y="420" width="90" height="380" fill="%23475569"/><rect x="1010" y="480" width="110" height="320" fill="%2364748b"/></g><g opacity="0.1"><line x1="0" y1="600" x2="1200" y2="600" stroke="%2394a3b8" stroke-width="1"/><line x1="0" y1="500" x2="1200" y2="500" stroke="%2394a3b8" stroke-width="1"/><line x1="0" y1="400" x2="1200" y2="400" stroke="%2394a3b8" stroke-width="1"/></g><g opacity="0.2"><circle cx="200" cy="200" r="100" fill="url(%23g1)"/><circle cx="1000" cy="150" r="150" fill="url(%23g1)"/></g></svg>');
    background-size: cover;
    background-position: center;
    z-index: -1;
    transform: translateZ(0);
    will-change: transform;
}

.hero-content {
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards 0.3s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-name {
    font-size: clamp(48px, 10vw, 80px);
    font-weight: 700;
    margin-bottom: 16px;
    color: #ffffff;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    letter-spacing: -2px;
}

.hero-title {
    font-size: clamp(18px, 3vw, 24px);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
    font-weight: 400;
}

.hero-location {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 32px;
}

.hero-contact {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 14px;
    padding: 12px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.contact-item:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    transform: translateY(-2px);
}

.contact-item svg {
    flex-shrink: 0;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    opacity: 0;
    animation: fadeIn 0.5s ease forwards 1s;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid rgba(255, 255, 255, 0.6);
    border-bottom: 2px solid rgba(255, 255, 255, 0.6);
    transform: rotate(45deg);
    animation: bounce 1.5s infinite;
}

@keyframes bounce {
    0%, 100% { transform: rotate(45deg) translate(0, 0); }
    50% { transform: rotate(45deg) translate(5px, 5px); }
}

/* Section Styles */
section {
    padding: 100px 0;
}

.section-title {
    font-size: clamp(28px, 5vw, 40px);
    font-weight: 700;
    margin-bottom: 48px;
    text-align: center;
    position: relative;
    color: var(--text-primary);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border-radius: 2px;
}

/* About Section */
.about {
    background: var(--secondary-color);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.about-paragraph {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.8;
    text-align: left;
    font-weight: 400;
}

/* Experience Section */
.experience {
    background: var(--primary-color);
}

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

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

.timeline-item {
    position: relative;
    padding-left: 40px;
    padding-bottom: 40px;
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.6s ease;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: 0;
    top: 4px;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.timeline-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.timeline-company {
    color: var(--accent-color);
    font-size: 14px;
    margin-bottom: 4px;
}

.timeline-date {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 12px;
}

.timeline-description {
    list-style: none;
    color: var(--text-secondary);
    font-size: 14px;
}

.timeline-description li {
    position: relative;
    padding-left: 16px;
    margin-bottom: 8px;
}

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

/* Education Section */
.education {
    background: var(--secondary-color);
}

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

.education-card {
    background: var(--primary-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(30px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.education-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.education-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.education-icon {
    color: var(--accent-color);
    margin-bottom: 16px;
}

.education-degree {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.education-school {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 4px;
}

.education-date {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 8px;
}

.education-gpa {
    color: var(--accent-color);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.education-thesis {
    color: var(--text-muted);
    font-size: 12px;
    font-style: italic;
    line-height: 1.5;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}

/* Projects Section */
.projects {
    background: var(--primary-color);
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 15px;
    margin-top: -32px;
    margin-bottom: 48px;
    font-weight: 400;
}

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

.project-card {
    background: var(--primary-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(30px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.project-card.featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto 1fr;
    border-color: var(--accent-color);
    border-width: 2px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.03) 0%, rgba(139, 92, 246, 0.03) 100%);
}

.project-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.project-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.project-icon-header {
    padding: 24px 24px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.project-card.featured .project-icon-header {
    padding: 32px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    border-right: 1px solid var(--border-color);
}

.project-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    flex-shrink: 0;
    transition: var(--transition);
}

.project-card:hover .project-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    transform: scale(1.05);
}

.project-badge {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent-color);
    background: rgba(59, 130, 246, 0.08);
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.project-info {
    padding: 20px 24px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-card.featured .project-info {
    padding: 32px;
}

.project-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
    line-height: 1.4;
}

.project-card.featured .project-title {
    font-size: 20px;
}

.project-category {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 400;
    margin-bottom: 12px;
    display: none;
}

.project-description {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
    flex: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 16px;
}

.project-tags span {
    font-size: 11px;
    font-weight: 500;
    padding: 4px 10px;
    background: var(--secondary-color);
    color: var(--text-muted);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.project-card:hover .project-tags span {
    border-color: rgba(59, 130, 246, 0.3);
    color: var(--accent-color);
    background: rgba(59, 130, 246, 0.05);
}

/* Skills Section */
.skills {
    background: var(--secondary-color);
}

.skills-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 32px;
    max-width: 1000px;
    margin: 0 auto;
}

.skills-category {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.skills-category.visible {
    opacity: 1;
    transform: translateY(0);
}

.skills-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

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

.skill-tag {
    padding: 8px 16px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border: none;
    border-radius: 20px;
    font-size: 13px;
    color: #ffffff;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.skill-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Footer */
.footer {
    background: var(--secondary-color);
    border-top: 1px solid var(--border-color);
    padding: 32px 0;
    text-align: center;
}

.footer p {
    color: var(--text-muted);
    font-size: 14px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9);
    z-index: 2000;
    overflow-y: auto;
    padding: 40px 20px;
}

.modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.modal-content {
    background: var(--primary-color);
    border-radius: 20px;
    max-width: 900px;
    width: 100%;
    position: relative;
    animation: modalSlideIn 0.3s ease;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

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

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 32px;
    color: var(--text-secondary);
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 40px;
}

.modal-header {
    margin-bottom: 32px;
}

.modal-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.modal-subtitle {
    color: var(--accent-color);
    font-size: 14px;
    font-weight: 500;
}

.modal-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.modal-gallery img {
    width: 100%;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.modal-gallery img:hover {
    transform: scale(1.02);
}

.modal-description {
    color: var(--text-secondary);
    line-height: 1.8;
}

.modal-description h4 {
    color: var(--text-primary);
    margin: 24px 0 12px;
    font-size: 18px;
}

.modal-description ul {
    margin-left: 20px;
    margin-bottom: 16px;
}

.modal-description li {
    margin-bottom: 8px;
}

.thesis-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: var(--transition);
}

.thesis-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Responsive */
@media (max-width: 900px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-card.featured {
        grid-template-columns: 1fr;
    }

    .project-card.featured .project-icon-header {
        flex-direction: row;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        min-width: unset;
        padding: 20px 24px;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 60px;
        flex-direction: column;
        background: var(--secondary-color);
        width: 100%;
        text-align: center;
        transition: var(--transition);
        padding: 24px 0;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: block;
    }

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

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

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

    .hero-contact {
        flex-direction: column;
        align-items: center;
    }

    .contact-item {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .timeline::before {
        left: 4px;
    }

    .timeline-item {
        padding-left: 28px;
    }

    .timeline-marker {
        width: 12px;
        height: 12px;
    }

    section {
        padding: 60px 0;
    }

    .modal-body {
        padding: 24px;
    }

    .modal-title {
        font-size: 22px;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .scroll-indicator,
    .project-overlay,
    .modal {
        display: none !important;
    }

    .hero {
        min-height: auto;
        padding: 40px 24px;
    }

    section {
        padding: 40px 0;
        page-break-inside: avoid;
    }
}
