@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
    --bg: #030303;
    --bg-card: #0a0a0c;
    --text: #ffffff;
    --text-muted: #88888e;
    --accent: #00ff9d;
    --accent-soft: rgba(0, 255, 157, 0.1);
    --border: rgba(255, 255, 255, 0.08);
    --border-active: rgba(255, 255, 255, 0.2);

    --font-mono: 'JetBrains Mono', monospace;
    --font-sans: 'Outfit', sans-serif;

    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --header-height: 80px;
}

html[data-theme="light"] {
    --bg: #2d332d;
    --bg-card: #373d37;
    --text: #dce3dc;
    --text-muted: #a3aba3;
    --accent: #00ff9d;
    --accent-soft: rgba(0, 255, 157, 0.1);
    --border: rgba(255, 255, 255, 0.08);
    --border-active: rgba(255, 255, 255, 0.2);
}

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

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

body {
    background-color: var(--bg);
    background-image: radial-gradient(var(--border) 1px, transparent 1px);
    background-size: 32px 32px;
    color: var(--text);
    font-family: var(--font-sans);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 1rem;
}

.mono {
    font-family: var(--font-mono);
    font-weight: 500;
    letter-spacing: -0.02em;
}

/* Navigation */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4rem;
    background: rgba(var(--bg), 0.7);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.logo {
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--accent);
    letter-spacing: -2px;
}

.nav {
    display: flex;
    gap: 3rem;
}

.nav a {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: lowercase;
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

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

.theme-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 0.5rem 1.25rem;
    border-radius: 99px;
    color: var(--text);
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Full Viewport Sections */
.section {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    padding: var(--header-height) 10% 0;
    position: relative;
}

.section-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    position: relative;
}

.hero {
    flex-direction: column;
    justify-content: center;
}

.eyebrow {
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    display: block;
}

h1 {
    font-size: clamp(3.2rem, 10vw, 7rem);
    line-height: 0.95;
    margin-bottom: 2rem;
}

.lede {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    max-width: 45ch;
    color: var(--text-muted);
    font-weight: 400;
    margin-bottom: 3.5rem;
}

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

/* Buttons */
.cta-group {
    display: flex;
    gap: 1.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 1.25rem 2.5rem;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 99px;
    text-decoration: none;
    transition: var(--transition);
}

.btn:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--accent-soft);
}

.btn.primary {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}

.btn-small {
    padding: 0.75rem 1.5rem;
    font-size: 0.8rem;
}

/* Project Carousel */
.carousel-wrapper {
    position: relative;
    width: calc(100% + 10rem);
    margin-left: -5rem;
    padding: 0 5rem;
    overflow: hidden;
}

.carousel-container {
    display: flex;
    gap: 2rem;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 1rem 0 3rem;
}

.carousel-slide {
    flex: 0 0 calc(33.333% - 1.35rem);
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 2rem;
    border-radius: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 300px;
    transition: var(--transition);
}

@media (max-width: 1024px) {
    .carousel-slide {
        flex: 0 0 calc(50% - 1rem);
    }
}

@media (max-width: 768px) {
    .carousel-wrapper {
        width: 100%;
        margin-left: 0;
        padding: 0;
    }
}

@media (max-width: 640px) {
    .carousel-slide {
        flex: 0 0 100%;
    }
}

.carousel-slide:hover {
    border-color: var(--accent);
    transform: translateY(-10px);
}

.slide-content h3 {
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
}

.slide-content p {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.slide-actions {
    display: flex;
    gap: 1rem;
}

/* Side Arrows */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.5rem;
    z-index: 10;
}

.carousel-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 20px var(--accent-soft);
}

.carousel-btn.prev {
    left: 1rem;
}

.carousel-btn.next {
    right: 1rem;
}

@media (max-width: 768px) {
    .carousel-btn {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }

    .carousel-btn.prev {
        left: 0.5rem;
    }

    .carousel-btn.next {
        right: 0.5rem;
    }
}

/* Experience Section (Timeline Line) */
.experience-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.timeline-line {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
    mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
}

.timeline-progress {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 0;
    background: var(--accent);
    box-shadow: 0 0 15px var(--accent);
    transition: height 0.1s linear;
}

.experience-list {
    max-height: 70vh;
    overflow-y: auto;
    padding: 15vh 0 15vh 3.5rem;
    position: relative;
    scrollbar-width: none;
    -ms-overflow-style: none;
    mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
}

.experience-list::-webkit-scrollbar {
    display: none;
}

.experience-item {
    padding: 4rem 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
    opacity: 0.2;
    position: relative;
}

.experience-item::before {
    content: '';
    position: absolute;
    left: -3.5rem;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 50%;
    z-index: 2;
    transition: var(--transition);
}

.experience-item.active {
    opacity: 1;
    transform: translateX(20px);
}

.experience-item.active::before {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

.experience-item h3 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 0.5rem;
}

.experience-item .role {
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 1.25rem;
    display: block;
    margin-bottom: 1rem;
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.skill-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 2.5rem 1.5rem;
    border-radius: 1.5rem;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 1.1rem;
    transition: var(--transition);
}

.skill-card:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
    transform: translateY(-10px);
    color: var(--accent);
}

/* Certifications Section */
.cert-preview {
    width: 100%;
    aspect-ratio: 16/9;
    background: #111;
    border: 1px solid var(--border);
    border-radius: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.cert-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0.8;
    transition: var(--transition);
}

.carousel-slide:hover .cert-preview img {
    opacity: 1;
    transform: scale(1.05);
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(15px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 2.5rem;
    position: relative;
    padding: 5rem;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 2.5rem;
    right: 2.5rem;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    transition: var(--transition);
}

.modal-close:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: rotate(90deg);
}

.modal-image-container {
    width: 100%;
    aspect-ratio: 16/9;
    background: #111;
    border-radius: 1.5rem;
    margin-bottom: 3rem;
    overflow: hidden;
    border: 1px solid var(--border);
}

.modal-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.modal-text h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.modal-text p {
    font-size: 1.25rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* Footer */
footer {
    text-align: center;
    padding: 4rem 0;
    border-top: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

@media (max-width: 1024px) {
    .topbar {
        padding: 0 2rem;
    }

    .section {
        padding: var(--header-height) 5% 0;
    }

    .modal-content {
        padding: 3rem;
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }

    h1 {
        font-size: 4rem;
    }

    .modal-text h2 {
        font-size: 2rem;
    }
}