/* ============================================================
   Ryan Vuong Portfolio — Modern Dark Theme
   ============================================================ */

:root {
    --bg-primary:    #0a192f;
    --bg-secondary:  #112240;
    --bg-card:       #1d3557;
    --accent:        #64ffda;
    --accent-dim:    rgba(100, 255, 218, 0.08);
    --accent-border: rgba(100, 255, 218, 0.25);
    --text-bright:   #e6f1ff;
    --text-primary:  #ccd6f6;
    --text-secondary:#8892b0;
    --border:        rgba(100, 255, 218, 0.15);
    --nav-height:    70px;
    --ease:          cubic-bezier(0.4, 0, 0.2, 1);
    --font-sans:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono:     'Fira Code', 'Courier New', monospace;
}

/* ── Reset & Base ─────────────────────────────────────────── */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: opacity 0.2s var(--ease), color 0.2s var(--ease);
}

a:hover { opacity: 0.75; }

ul { list-style: none; }

img { max-width: 100%; display: block; }

/* ── Buttons ──────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background-color 0.25s var(--ease),
                color 0.25s var(--ease),
                border-color 0.25s var(--ease),
                transform 0.2s var(--ease);
}

.btn-primary {
    background-color: var(--accent);
    color: var(--bg-primary);
    font-weight: 700;
}

.btn-primary:hover {
    background-color: transparent;
    border-color: var(--accent);
    color: var(--accent);
    opacity: 1;
}

.btn-outline {
    border-color: var(--accent);
    color: var(--accent);
    background: transparent;
}

.btn-outline:hover {
    background-color: var(--accent-dim);
    opacity: 1;
}

.btn-large {
    padding: 16px 44px;
    font-size: 16px;
}

/* ── Layout Helpers ───────────────────────────────────────── */

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 48px;
}

.section {
    padding: 110px 0;
}

.section-alt {
    background-color: var(--bg-secondary);
}

.section-title {
    font-family: var(--font-sans);
    font-size: 28px;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 56px;
    display: flex;
    align-items: center;
    gap: 14px;
    white-space: nowrap;
}

.section-title::after {
    content: '';
    display: block;
    height: 1px;
    flex: 1;
    max-width: 280px;
    background-color: var(--border);
}

.section-num {
    font-family: var(--font-mono);
    font-size: 18px;
    color: var(--accent);
    font-weight: 400;
}

/* ── Scroll Reveal ────────────────────────────────────────── */

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Navbar ───────────────────────────────────────────────── */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 100;
    background-color: rgba(10, 25, 47, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.navbar.scrolled {
    border-bottom-color: var(--border);
    box-shadow: 0 6px 30px rgba(2, 12, 27, 0.5);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 48px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.nav-logo {
    font-family: var(--font-mono);
    font-size: 22px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 2px;
    flex-shrink: 0;
}

.nav-logo:hover { opacity: 0.8; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 36px;
    flex: 1;
    justify-content: center;
}

.nav-links a {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-primary);
    position: relative;
    padding-bottom: 2px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--accent);
    transition: width 0.3s var(--ease);
}

.nav-links a:hover { color: var(--accent); opacity: 1; }
.nav-links a:hover::after { width: 100%; }

.nav-resume {
    flex-shrink: 0;
    padding: 9px 18px;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--accent);
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
}

/* ── Hero ─────────────────────────────────────────────────── */

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: calc(var(--nav-height) + 60px) 80px 80px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.hero-greeting {
    font-family: var(--font-mono);
    font-size: 16px;
    color: var(--accent);
    margin-bottom: 24px;
    letter-spacing: 1px;
}

.hero-name {
    font-size: clamp(44px, 8vw, 80px);
    font-weight: 800;
    color: var(--text-bright);
    line-height: 1.05;
    margin-bottom: 14px;
}

.hero-title {
    font-size: clamp(28px, 5vw, 56px);
    font-weight: 700;
    color: var(--text-secondary);
    line-height: 1.2;
    margin-bottom: 32px;
}

.hero-desc {
    max-width: 560px;
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.85;
    margin-bottom: 44px;
}

.hero-desc strong {
    color: var(--accent);
    font-weight: 600;
}

.hero-cta {
    display: flex;
    gap: 18px;
    margin-bottom: 56px;
    flex-wrap: wrap;
}

.hero-socials {
    display: flex;
    gap: 28px;
}

.hero-socials a {
    font-size: 22px;
    color: var(--text-secondary);
    transition: color 0.25s var(--ease), transform 0.25s var(--ease);
}

.hero-socials a:hover {
    color: var(--accent);
    transform: translateY(-4px);
    opacity: 1;
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 80px;
}

.hero-scroll-indicator span {
    display: block;
    width: 1px;
    height: 72px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    margin: 0 auto;
    animation: scrollLine 2.2s ease infinite;
}

@keyframes scrollLine {
    0%   { opacity: 1; transform: scaleY(1);   transform-origin: top; }
    100% { opacity: 0; transform: scaleY(0.1); transform-origin: top; }
}

/* ── About ────────────────────────────────────────────────── */

.about-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 70px;
    align-items: start;
}

.about-text p {
    color: var(--text-secondary);
    font-size: 17px;
    line-height: 1.85;
    margin-bottom: 20px;
}

.about-text strong { color: var(--accent); font-weight: 600; }

.about-text a {
    color: var(--accent);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s var(--ease);
}

.about-text a:hover { border-bottom-color: var(--accent); opacity: 1; }

.about-edu {
    margin-top: 28px;
}

.edu-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 18px 22px;
}

.edu-card i {
    color: var(--accent);
    font-size: 20px;
    margin-top: 2px;
    flex-shrink: 0;
}

.edu-school {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-bright);
    margin: 0 !important;
}

.edu-detail {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-secondary);
    margin: 4px 0 0 !important;
}

.about-image-wrapper {
    display: flex;
    justify-content: center;
}

.about-image-container {
    position: relative;
    width: 260px;
    height: 260px;
    flex-shrink: 0;
}

.about-image-container::after {
    content: '';
    position: absolute;
    top: 16px;
    left: 16px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--accent);
    border-radius: 6px;
    z-index: 0;
    transition: top 0.3s var(--ease), left 0.3s var(--ease);
}

.about-image-container:hover::after {
    top: 10px;
    left: 10px;
}

.about-image-container img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    filter: grayscale(15%) brightness(0.92);
    transition: filter 0.3s var(--ease);
}

.about-image-container:hover img {
    filter: grayscale(0%) brightness(1);
}

/* ── Experience / Timeline ────────────────────────────────── */

.timeline {
    position: relative;
    padding-left: 36px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent), rgba(100, 255, 218, 0.1));
}

.timeline-item {
    position: relative;
    margin-bottom: 56px;
}

.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
    position: absolute;
    left: -36px;
    top: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: var(--accent);
    border: 3px solid var(--bg-secondary);
    box-shadow: 0 0 0 2px var(--accent);
}

.timeline-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 30px 36px;
    transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.timeline-content:hover {
    border-color: var(--accent);
    transform: translateX(6px);
    box-shadow: -4px 4px 24px rgba(0, 0, 0, 0.3);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.timeline-role {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 5px;
}

.timeline-company {
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 7px;
}

.timeline-company i { color: var(--accent); }

.timeline-date {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--accent);
    white-space: nowrap;
    padding-top: 4px;
}

.timeline-bullets {
    margin-bottom: 24px;
    padding-left: 0;
}

.timeline-bullets li {
    position: relative;
    padding-left: 22px;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.75;
    margin-bottom: 10px;
}

.timeline-bullets li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent);
}

.timeline-bullets li strong {
    color: var(--text-primary);
    font-weight: 600;
}

.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--accent);
    background-color: var(--accent-dim);
    border: 1px solid var(--accent-border);
    border-radius: 4px;
    padding: 4px 10px;
}

/* ── Skills ───────────────────────────────────────────────── */

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.skill-category {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 28px 26px;
    transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.skill-category:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
}

.skill-category h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-bright);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-category h4 i { color: var(--accent); }

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--text-secondary);
    background-color: rgba(100, 255, 218, 0.04);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 6px 12px;
    transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.skill-tag:hover {
    color: var(--accent);
    border-color: var(--accent);
    background-color: var(--accent-dim);
}

/* ── Projects ─────────────────────────────────────────────── */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 36px;
}

.project-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.3s var(--ease),
                transform 0.35s var(--ease),
                box-shadow 0.35s var(--ease);
}

.project-card:hover {
    border-color: var(--accent);
    transform: translateY(-8px);
    box-shadow: 0 24px 48px rgba(2, 12, 27, 0.6);
}

.project-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease);
}

.project-card:hover .project-image { transform: scale(1.06); }

.project-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(10, 25, 47, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s var(--ease);
}

.project-card:hover .project-overlay { opacity: 1; }

.project-link {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 5px;
    padding: 11px 22px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s var(--ease);
}

.project-link:hover { background-color: var(--accent-dim); opacity: 1; }

.project-body { padding: 26px; }

.project-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 12px;
}

.project-desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 20px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tech-tag {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--accent);
    background-color: var(--accent-dim);
    border-radius: 4px;
    padding: 4px 10px;
}

.project-links {
    display: flex;
    gap: 24px;
}

.project-links a {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 7px;
    transition: color 0.2s var(--ease);
}

.project-links a:hover { color: var(--accent); opacity: 1; }

/* ── Contact ──────────────────────────────────────────────── */

.contact-wrapper {
    max-width: 580px;
    margin: 0 auto;
    text-align: center;
}

.contact-desc {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.85;
    margin-bottom: 44px;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 36px;
    margin-top: 44px;
    flex-wrap: wrap;
}

.contact-links a {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s var(--ease), transform 0.2s var(--ease);
}

.contact-links a:hover { color: var(--accent); transform: translateY(-3px); opacity: 1; }

/* ── Footer ───────────────────────────────────────────────── */

.footer {
    border-top: 1px solid var(--border);
    padding: 28px 40px;
    text-align: center;
}

.footer p {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.9;
}

.footer a { color: var(--accent); }

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 900px) {
    .skills-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: calc(var(--nav-height) + 40px) 28px 72px;
    }

    .hero-scroll-indicator { left: 28px; }

    .container { padding: 0 28px; }

    .section { padding: 80px 0; }

    .nav-links,
    .nav-resume {
        display: none;
    }

    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background-color: var(--bg-secondary);
        padding: 28px;
        gap: 22px;
        border-bottom: 1px solid var(--border);
        z-index: 99;
    }

    .nav-toggle { display: block; }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .about-image-wrapper { order: -1; }

    .about-image-container {
        width: 210px;
        height: 210px;
        margin: 0 auto;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .timeline-header {
        flex-direction: column;
        gap: 6px;
    }

    .section-title { font-size: 22px; }

    .hero-cta { flex-direction: column; }

    .hero-cta .btn { justify-content: center; }
}

@media (max-width: 480px) {
    .contact-links { gap: 22px; }

    .nav-container { padding: 0 24px; }

    .timeline { padding-left: 28px; }

    .timeline-dot { left: -28px; }

    .timeline-content { padding: 22px 20px; }
}
