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

:root {
    --primary-color: #000;
    --secondary-color: #666;
    --bg-color: #fff;
    --text-color: #000;
    --accent-color: #333;
    --border-color: #e5e5e5;
    --hover-color: #f5f5f5;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --accent-blue: #4A90E2;
    --accent-teal: #50C9C3;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --serif-font: Georgia, 'Times New Roman', Times, serif;
}

html {
    scroll-behavior: smooth;
}

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

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

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

.nav.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

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

.nav-logo a {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.nav-logo a:hover {
    opacity: 0.7;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 400;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--text-color);
    transition: var(--transition);
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background-color: var(--text-color);
    transition: var(--transition);
}

.nav-about-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-about-icon:hover {
    border-color: var(--text-color);
    transform: scale(1.05);
}

.nav-about-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#profile-img {
    display: block;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 8rem 2rem 4rem;
    text-align: center;
    position: relative;
}

.hero-content {
    max-width: 800px;
    animation: fadeInUp 1s ease-out;
    position: relative;
    z-index: 2;
}

.hero-photos-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.hero-bg-photo {
    position: absolute;
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    opacity: 0.65;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    filter: brightness(1.05) saturate(1.1);
}

.hero-bg-photo:hover {
    opacity: 0.9;
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    filter: brightness(1.1) saturate(1.2);
}

.hero-bg-photo-1 {
    top: 15%;
    left: 10%;
    animation: float 6s ease-in-out infinite;
}

.hero-bg-photo-2 {
    top: 20%;
    right: 15%;
    animation: float 8s ease-in-out infinite 1s;
}

.hero-bg-photo-3 {
    bottom: 25%;
    left: 8%;
    animation: float 7s ease-in-out infinite 2s;
}

.hero-bg-photo-4 {
    bottom: 20%;
    right: 12%;
    animation: float 9s ease-in-out infinite 0.5s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(2deg);
    }
}

.hero-title {
    font-size: clamp(4rem, 12vw, 9rem);
    font-weight: 900;
    line-height: 1;
    margin-bottom: 2rem;
    letter-spacing: -0.03em;
    text-transform: uppercase;
}

.hero-title .line {
    display: block;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.hero-title .line:nth-child(1) {
    animation-delay: 0.2s;
}

.hero-title .line:nth-child(2) {
    animation-delay: 0.4s;
}

.hero-title .line:nth-child(3) {
    animation-delay: 0.6s;
}

.hero-subtitle {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.8s forwards;
}

.hero-location {
    font-size: clamp(0.85rem, 1.5vw, 1rem);
    color: var(--secondary-color);
    margin-bottom: 0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 1s forwards;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: var(--primary-color);
    color: var(--bg-color);
    text-decoration: none;
    font-weight: 500;
    border-radius: 50px;
    transition: var(--transition);
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 1.2s forwards;
}

.cta-button:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.5;
    animation: bounce 2s infinite;
}

.scroll-indicator span {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.scroll-line {
    width: 1px;
    height: 30px;
    background-color: var(--text-color);
}

/* Section Styles */
section {
    padding: 6rem 0;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 300;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-bottom: 3rem;
    font-weight: 400;
}

/* Featured Projects */
.featured-projects {
    background-color: #fafafa;
}

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

.project-card {
    background-color: var(--bg-color);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid var(--border-color);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.project-image {
    position: relative;
    width: 100%;
    padding-top: 75%;
    background-color: var(--hover-color);
    overflow: hidden;
}

.project-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-placeholder svg {
    width: 60%;
    height: 60%;
}

.project-media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-video-embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.project-video-embed iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Play button overlay for video thumbnails */
.project-video-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-button-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(74, 144, 226, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    transition: var(--transition);
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
}

.project-video-link:hover .play-button-overlay,
.project-image:hover .play-button-overlay {
    background-color: var(--accent-blue);
    transform: translate(-50%, -50%) scale(1.15);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.6);
}

.project-image {
    cursor: pointer;
    position: relative;
}

#flowstate-play,
#home-monitor-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
}

.project-overlay {
    position: absolute;
    top: 1rem;
    right: 1rem;
    opacity: 0;
    transition: var(--transition);
}

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

.project-tag {
    background-color: var(--accent-blue);
    color: var(--bg-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

.project-info {
    padding: 2rem;
}

.project-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

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

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

.project-tech span {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    background-color: var(--hover-color);
    border-radius: 12px;
    color: var(--secondary-color);
    transition: var(--transition);
}

.project-tech span:hover {
    background-color: var(--accent-teal);
    color: var(--bg-color);
    transform: translateY(-2px);
}

/* More Projects */
.more-projects {
    padding: 6rem 0;
}

.projects-list {
    margin-top: 3rem;
}

.project-item {
    border-top: 1px solid var(--border-color);
    transition: var(--transition);
    cursor: pointer;
}

.project-item:last-child {
    border-bottom: 1px solid var(--border-color);
}

.project-item:hover:not(.expanded) {
    background-color: var(--hover-color);
}

.project-item.expanded {
    background-color: var(--hover-color);
}

.project-item-content {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    align-items: center;
    gap: 2rem;
    padding: 2rem 0;
    transition: var(--transition);
}

.project-item:hover .project-item-content {
    padding-left: 1rem;
    padding-right: 1rem;
}

.project-item-number {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--secondary-color);
}

.project-item-info h3 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.project-item-info p {
    color: var(--secondary-color);
    font-size: 0.95rem;
}

.project-item-arrow {
    font-size: 1.5rem;
    color: var(--secondary-color);
    transition: var(--transition);
}

.project-item:hover .project-item-arrow {
    transform: translateX(10px);
    color: var(--accent-blue);
}

.project-item.expanded .project-item-arrow {
    transform: rotate(90deg);
}

.project-item-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    background-color: var(--hover-color);
}

.project-item.expanded .project-item-details {
    max-height: 1000px;
    padding: 0 2rem 2rem;
}

.project-detail-content {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.project-detail-content p {
    color: var(--secondary-color);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

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

.project-detail-tech span {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--secondary-color);
}

.project-detail-image {
    width: 100%;
    max-width: 600px;
    margin-top: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.project-detail-image video {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

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

.project-link-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--accent-blue);
    color: var(--bg-color);
    text-decoration: none;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.project-link-button:hover {
    background-color: var(--accent-teal);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(80, 201, 195, 0.4);
}

/* About Section */
.about {
    background-color: #fafafa;
}

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

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

.skills {
    margin-top: 2rem;
}

.skills h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skills-grid span {
    padding: 0.5rem 1.25rem;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.skills-grid span:hover {
    background-color: var(--primary-color);
    color: var(--bg-color);
    border-color: var(--primary-color);
}


/* Publications */
.publications {
    padding: 6rem 0;
}

.publications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.publications-view-all {
    font-size: 0.95rem;
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 400;
}

.publications-view-all:hover {
    color: var(--text-color);
}

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

.publication-item {
    display: flex;
    gap: 3rem;
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-color);
    transition: var(--transition);
}

.publication-item:last-child {
    border-bottom: none;
}

.publication-item:hover {
    opacity: 0.7;
}

.publication-date {
    font-size: 0.85rem;
    color: var(--secondary-color);
    font-weight: 400;
    min-width: 120px;
    font-family: var(--font-family);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.publication-content {
    flex: 1;
}

.publication-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-family: var(--serif-font);
    line-height: 1.3;
}

.publication-description {
    font-size: 0.95rem;
    color: var(--secondary-color);
    line-height: 1.6;
    margin: 0;
}

.education {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.education h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.education p {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    line-height: 1.6;
    font-size: 0.95rem;
}

.education p strong {
    color: var(--text-color);
    font-weight: 600;
}

/* Experience Section */
.experience {
    padding: 6rem 0;
    background-color: #fafafa;
}

.experience-list {
    margin-top: 3rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.experience-item {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--border-color);
    align-items: flex-start;
}

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

.experience-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 8px;
}

.experience-content {
    flex: 1;
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    gap: 2rem;
}

.experience-role {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: var(--font-family);
}

.experience-company {
    font-size: 1rem;
    color: var(--secondary-color);
    font-weight: 400;
}

.experience-year {
    font-size: 0.95rem;
    color: var(--secondary-color);
    white-space: nowrap;
    font-weight: 400;
}

.experience-description {
    font-size: 0.95rem;
    color: var(--secondary-color);
    line-height: 1.6;
    margin: 0;
}

/* Contact Section */
.contact {
    padding: 4rem 0;
}

.contact-content {
    max-width: 900px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 3rem;
}

.contact-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-color);
    transition: var(--transition);
}

.contact-link:hover {
    padding-left: 1rem;
}

.contact-link:last-child {
    border-bottom: none;
}

.contact-label {
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--secondary-color);
}

.contact-value {
    font-size: 1.1rem;
    font-weight: 400;
}

/* Footer */
.footer {
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    color: var(--secondary-color);
    font-size: 0.9rem;
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .nav-about-icon {
        width: 35px;
        height: 35px;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background-color: var(--bg-color);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid var(--border-color);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-toggle {
        display: flex;
    }

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

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

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

    .hero {
        padding: 6rem 1.5rem 3rem;
    }

    .container {
        padding: 0 1.5rem;
    }

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

    .project-item-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .project-item-number {
        display: none;
    }

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

    .contact-link {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .publications-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

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

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

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

    .experience-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .experience-year {
        align-self: flex-start;
    }
}

@media (max-width: 480px) {
    .hero-bg-photo {
        width: 80px;
        height: 80px;
        opacity: 0.1;
    }

    .hero-bg-photo-1 {
        top: 10%;
        left: 5%;
    }

    .hero-bg-photo-2 {
        top: 15%;
        right: 8%;
    }

    .hero-bg-photo-3 {
        bottom: 20%;
        left: 5%;
    }

    .hero-bg-photo-4 {
        bottom: 15%;
        right: 8%;
    }

    .hero-title {
        font-size: 3.5rem;
        font-weight: 900;
    }

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

    .project-info {
        padding: 1.5rem;
    }

    section {
        padding: 4rem 0;
    }
}

/* Smooth scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

