@font-face {
    font-family: 'SF Pro Text';
    src: url('assets/fonts/SF-Pro-Text-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'SF Pro Text';
    src: url('assets/fonts/SF-Pro-Text-Bold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'SF Mono';
    src: url('assets/fonts/SF-Mono-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'SF Mono';
    src: url('assets/fonts/SF-Mono-Bold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
}

:root {
    --bg-primary: #0a0a0a;
    --bg-surface: rgba(255, 255, 255, 0.03);
    --bg-surface-hover: rgba(255, 255, 255, 0.06);
    --border-glass: rgba(255, 255, 255, 0.05);
    --text-primary: #f5f5f7;
    --text-secondary: rgba(245, 245, 247, 0.55);
    --text-tertiary: rgba(245, 245, 247, 0.3);
    --accent: #7c6aef;
    --accent-glow: rgba(124, 106, 239, 0.2);

    --glass-blur: blur(30px) saturate(1.5);
    --transition-smooth: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'SF Pro Text', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    max-width: 100vw;
}

img,
video,
svg {
    max-width: 100%;
    height: auto;
}

.page-loader {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
    will-change: opacity;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.loader-spinner {
    width: 36px;
    height: 36px;
    border: 2px solid var(--border-glass);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    will-change: transform;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loader-text {
    font-family: 'SF Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-tertiary);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.gradient-orb {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 50vw;
    height: 50vw;
    max-width: 600px;
    max-height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(124, 106, 239, 0.12) 0%, rgba(0, 191, 165, 0.08) 50%, transparent 70%);
    filter: blur(120px);
    transform: translate(-50%, -50%);
    z-index: -1;
    animation: orbFloat 25s infinite alternate ease-in-out;
    pointer-events: none;
    will-change: transform;
}

@keyframes orbFloat {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-45%, -55%) scale(1.05); }
    100% { transform: translate(-55%, -45%) scale(0.95); }
}

.glass-panel {
    background: var(--bg-surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    transition: var(--transition-smooth);
}

.glass-panel:hover {
    background: var(--bg-surface-hover);
}

section {
    position: relative;
    padding: 100px 5%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 1;
    overflow: hidden;
    max-width: 100vw;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: bold;
    text-align: center;
    margin-bottom: 4rem;
    background: linear-gradient(135deg, var(--text-primary), var(--text-tertiary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.01em;
}

.hero-section {
    min-height: 100dvh;
    align-items: center;
    text-align: center;
    padding: 0 5%;
    position: relative;
    justify-content: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: -30px;
}

.hero-image-wrapper {
    position: relative;
    width: 160px;
    height: 160px;
    margin-bottom: 2rem;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid var(--border-glass);
    box-shadow: 0 0 40px var(--accent-glow);
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .hero-image-wrapper {
        width: 180px;
        height: 180px;
    }
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-name {
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: bold;
    letter-spacing: -0.04em;
    margin-bottom: 0.5rem;
}

.hero-roles {
    font-family: 'SF Mono', monospace;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    color: var(--accent);
    min-height: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.typewriter-cursor {
    display: inline-block;
    width: 8px;
    height: 1.2em;
    background-color: var(--accent);
    margin-left: 4px;
    animation: blink 1s step-end infinite;
    will-change: opacity;
}

@keyframes blink {
    50% { opacity: 0; }
}

.hero-resume-btn {
    margin-top: 2rem;
}

.scroll-indicator {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-tertiary);
    font-size: 0.8rem;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.scroll-indicator:hover {
    opacity: 1;
}

.scroll-indicator svg {
    width: 20px;
    height: 20px;
    animation: bounce 2.5s infinite;
    will-change: transform;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px); }
    60% { transform: translateY(-4px); }
}

.nav-dock {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 100px;
    z-index: 100;
    max-width: 92vw;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.nav-dock::-webkit-scrollbar {
    display: none;
}

.nav-item {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.4rem 0.75rem;
    border-radius: 100px;
    transition: var(--transition-smooth);
    white-space: nowrap;
}

.nav-item:hover, .nav-item.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.about-container {
    height: 50rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    perspective: 1000px;
    width: 100%;
}

@media (min-width: 768px) {
    .about-container {
        height: 60rem;
    }
}

.about-header {
    width: 100%;
    text-align: center;
    position: absolute;
    top: 15%;
    z-index: 2;
}

.about-card {
    max-width: 600px;
    width: 92%;
    min-height: 20rem;
    margin: 0 auto;
    border: 1px solid var(--border-glass);
    background: rgba(18, 18, 18, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    transform-origin: top center;
    overflow: hidden;
    position: relative;
    will-change: transform;
    display: flex;
    flex-direction: column;
}

.macos-bar {
    display: flex;
    align-items: center;
    padding: 0.8rem 1.2rem;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-glass);
}

.macos-dots {
    display: flex;
    gap: 8px;
}

.macos-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.macos-dot.close { background-color: #ff5f56; }
.macos-dot.minimize { background-color: #ffbd2e; }
.macos-dot.maximize { background-color: #27c93f; }

.about-inner {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

@media (min-width: 768px) {
    .about-inner {
        padding: 3rem;
    }
}

.about-summary {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.badges {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.badge {
    padding: 0.35rem 0.8rem;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    color: var(--text-tertiary);
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition-smooth);
    text-decoration: none;
}

.badge svg {
    flex-shrink: 0;
}

.badge:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    transform: translateY(-2px);
    border-color: var(--border-glass);
}

.experience-content {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.timeline-item {
    margin-bottom: 3.5rem;
    position: relative;
    padding-left: 1.5rem;
    border-left: 2px solid var(--border-glass);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

.timeline-role {
    font-size: clamp(1.05rem, 2vw, 1.2rem);
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    text-align: left;
}

.timeline-company {
    font-size: 0.9rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
    text-align: left;
}

.timeline-period {
    font-family: 'SF Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-bottom: 1.5rem;
    text-align: left;
}

.timeline-responsibilities {
    list-style-type: disc;
    text-align: left;
    margin-left: 1.5rem;
}

.timeline-responsibilities li {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.6rem;
    position: relative;
}

.skills-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.skills-panel {
    padding: 2rem;
    text-align: center;
}

.skills-panel h3 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.tag {
    padding: 0.35rem 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.tag:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    transform: translateY(-2px);
    border-color: var(--accent);
}

.portfolio-category {
    margin-bottom: 4rem;
}

.portfolio-category:last-child {
    margin-bottom: 0;
}

.portfolio-category-title {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    font-weight: bold;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 2rem;
    letter-spacing: -0.01em;
}

.masonry-grid {
    column-count: 2;
    column-gap: 0.5rem;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

@media (min-width: 600px) {
    .masonry-grid { 
        column-count: 3; 
        column-gap: 0.75rem; 
    }
}

@media (min-width: 1024px) {
    .masonry-grid { 
        column-count: 4; 
    }
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 0.5rem;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: rgba(255,255,255,0.02);
    will-change: transform, opacity;
}

@media (min-width: 600px) {
    .masonry-item {
        margin-bottom: 0.75rem;
    }
}

.masonry-item a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.masonry-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

.masonry-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 12px;
}

.masonry-item:hover .masonry-overlay {
    opacity: 1;
}

.masonry-item:hover img {
    transform: scale(1.05);
}

.view-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1.2rem;
    border-radius: 100px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
    transform: translateY(10px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.masonry-item:hover .view-btn {
    transform: translateY(0) scale(1);
    background: rgba(255, 255, 255, 0.2);
}

.certifications-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.cert-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.cert-title {
    font-size: clamp(1rem, 2vw, 1.1rem);
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.cert-authority {
    color: var(--accent);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.cert-competencies {
    margin: 1rem 0 1.5rem;
    flex-grow: 1;
    list-style: none;
}

.cert-competencies li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition-smooth);
    margin-top: auto;
}

.btn svg {
    flex-shrink: 0;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.footer {
    padding: 4rem 5%;
    text-align: center;
    background: rgba(0,0,0,0.5);
    border-top: 1px solid var(--border-glass);
}

.footer-socials {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-socials a {
    color: var(--text-secondary);
    transition: var(--transition-smooth);
    display: inline-flex;
}

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

.footer-copy {
    color: var(--text-tertiary);
    font-size: 0.8rem;
}

.reveal {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
    filter: blur(5px);
    transition: none;
    will-change: opacity, transform, filter;
}

.parallax-bg {
    will-change: transform;
}

@media (max-width: 767px) {
    section {
        padding: 60px 5%;
    }

    .nav-dock {
        bottom: 16px;
        gap: 0.25rem;
        padding: 0.5rem 0.75rem;
    }

    .nav-item {
        font-size: 0.75rem;
        padding: 0.35rem 0.6rem;
    }

    .scroll-indicator {
        bottom: 70px;
    }

    .about-card {
        border-radius: 12px;
    }

    .about-inner {
        padding: 1.5rem;
    }

    .gradient-orb {
        width: 80vw;
        height: 80vw;
    }
}
