/* ================================================
   Brittany Chiang Portfolio Clone - CSS
   ================================================ */

:root {
    --bg: #0a192f;
    --bg-light: #112240;
    --bg-card-hover: #172a45;
    --navy-shadow: rgba(2, 12, 27, 0.7);
    --slate: #8892b0;
    --light-slate: #a8b2d8;
    --lightest-slate: #ccd6f6;
    --white: #e6f1ff;
    --green: #64ffda;
    --green-tint: rgba(100, 255, 218, 0.1);
    --navy: #0a192f;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'Fira Code', 'Fira Mono', monospace;
    --transition: all 0.25s cubic-bezier(0.645, 0.045, 0.355, 1);
    --fz-xs: 12px;
    --fz-sm: 13px;
    --fz-md: 14px;
    --fz-lg: 15px;
    --fz-xl: 16px;
    --fz-xxl: 20px;
    --fz-heading: 32px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    color: var(--slate);
    font-family: var(--font-sans);
    font-size: var(--fz-xl);
    line-height: 1.3;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.skip-link {
    position: absolute;
    top: -100vh;
    left: 0;
    z-index: 999;
    color: var(--green);
    padding: 8px 16px;
    background: var(--bg);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: var(--fz-sm);
}

.skip-link:focus {
    top: 0;
}

/* Layout */
.container {
    display: flex;
    max-width: 1280px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 0 48px;
    gap: 0;
}

/* LEFT PANEL */
.left-panel {
    position: sticky;
    top: 0;
    max-height: 100vh;
    width: 50%;
    padding: 96px 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-shrink: 0;
    overflow: hidden;
}

.header-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.name-link {
    font-size: clamp(32px, 5vw, 64px);
    font-weight: 600;
    color: var(--lightest-slate);
    text-decoration: none;
    letter-spacing: -0.5px;
    line-height: 1.1;
    transition: var(--transition);
    display: block;
    margin-bottom: 12px;
}

.name-link:hover {
    color: var(--white);
}

.role {
    font-size: clamp(14px, 3vw, 20px);
    font-weight: 500;
    color: var(--lightest-slate);
    margin-bottom: 20px;
    letter-spacing: 0.02em;
}

.tagline {
    color: var(--slate);
    font-size: var(--fz-md);
    max-width: 280px;
    line-height: 1.6;
    margin-bottom: 40px;
}

/* Navigation */
.main-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 40px 0;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: var(--fz-xs);
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--slate);
    transition: var(--transition);
    padding: 4px 0;
}

.nav-line {
    display: block;
    width: 32px;
    height: 1px;
    background-color: var(--slate);
    transition: var(--transition);
    transform-origin: left center;
}

.nav-link:hover,
.nav-link.active {
    color: var(--lightest-slate);
}

.nav-link:hover .nav-line,
.nav-link.active .nav-line {
    width: 64px;
    background-color: var(--lightest-slate);
}

/* Social Links */
.social-links {
    list-style: none;
    display: flex;
    gap: 20px;
    align-items: center;
    padding-top: 32px;
}

.social-icon {
    width: 20px;
    height: 20px;
    color: var(--slate);
    transition: var(--transition);
    display: block;
}

.social-links a:hover .social-icon {
    color: var(--lightest-slate);
    transform: translateY(-3px);
}

/* RIGHT PANEL */
.right-panel {
    flex: 1;
    padding: 96px 0 96px 64px;
}

/* Section */
.section {
    margin-bottom: 80px;
    scroll-margin-top: 96px;
}

.section-header {
    display: none;
}

.section-title {
    font-size: var(--fz-xs);
    font-family: var(--font-mono);
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--lightest-slate);
    margin-bottom: 32px;
    padding-top: 16px;
}

/* About */
.about-content p {
    color: var(--slate);
    line-height: 1.7;
    margin-bottom: 16px;
    font-size: var(--fz-lg);
}

.about-content p:last-child {
    margin-bottom: 0;
}

/* Links */
.link {
    color: var(--green);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    padding-bottom: 1px;
    transition: var(--transition);
}

.link:hover {
    border-bottom-color: var(--green);
}

/* Experience */
.experience-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.experience-item {
    display: grid;
    grid-template-columns: minmax(0, 160px) 1fr;
    gap: 24px;
    padding: 20px;
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
}

.experience-item:hover {
    background-color: var(--bg-card-hover);
    box-shadow: 0 4px 30px var(--navy-shadow);
}

.experience-item:hover .exp-link {
    color: var(--green);
}

.exp-period {
    font-family: var(--font-mono);
    font-size: var(--fz-xs);
    font-weight: 400;
    color: var(--slate);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-top: 4px;
    overflow: hidden;
}

.exp-title {
    font-size: var(--fz-md);
    font-weight: 500;
    margin-bottom: 8px;
    line-height: 1.4;
}

.exp-link {
    color: var(--lightest-slate);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.exp-link:hover {
    color: var(--green);
}

.arrow-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    transition: var(--transition);
}

.exp-link:hover .arrow-icon {
    transform: translate(3px, -3px);
}

.exp-prev-roles {
    font-size: var(--fz-sm);
    color: var(--slate);
    margin-bottom: 8px;
}

.exp-description {
    font-size: var(--fz-sm);
    color: var(--slate);
    line-height: 1.6;
    margin-bottom: 16px;
}

.tech-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.tech-tag {
    font-family: var(--font-mono);
    font-size: var(--fz-xs);
    color: var(--green);
    background-color: var(--green-tint);
    padding: 4px 10px;
    border-radius: 9999px;
    white-space: nowrap;
}

.exp-links-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.exp-ext-link {
    font-family: var(--font-mono);
    font-size: var(--fz-xs);
    font-weight: 500;
    color: var(--lightest-slate);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.exp-ext-link:hover {
    color: var(--green);
}

.link-icon {
    width: 14px;
    height: 14px;
}

.resume-link-wrap {
    padding: 20px;
}

.resume-link {
    font-family: var(--font-mono);
    font-size: var(--fz-md);
    font-weight: 500;
    color: var(--lightest-slate);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
}

.resume-link:hover {
    color: var(--green);
    border-bottom-color: var(--green);
}

.resume-link:hover .arrow-icon {
    transform: translate(4px, -4px);
}

/* Projects */
.projects-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.project-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 24px;
    padding: 20px;
    border-radius: 8px;
    transition: var(--transition);
}

.project-item:hover {
    background-color: var(--bg-card-hover);
    box-shadow: 0 4px 30px var(--navy-shadow);
}

.project-item:hover .exp-link {
    color: var(--green);
}

.project-image-wrap {
    width: 100px;
    height: 56px;
    overflow: hidden;
    border-radius: 4px;
    border: 1px solid var(--bg-light);
    flex-shrink: 0;
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.8);
    transition: var(--transition);
}

.project-item:hover .project-image {
    filter: brightness(1);
}

.project-title {
    font-size: var(--fz-md);
    font-weight: 500;
    margin-bottom: 6px;
    line-height: 1.4;
}

.project-badge {
    font-family: var(--font-mono);
    font-size: var(--fz-xs);
    color: var(--slate);
    margin-bottom: 8px;
}

.project-description {
    font-size: var(--fz-sm);
    color: var(--slate);
    line-height: 1.6;
    margin-bottom: 12px;
}

/* Writing */
.writing-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.writing-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 24px;
    padding: 20px;
    border-radius: 8px;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}

.writing-item:hover {
    background-color: var(--bg-card-hover);
    box-shadow: 0 4px 30px var(--navy-shadow);
}

.writing-item:hover .writing-title {
    color: var(--green);
}

.writing-image-wrap {
    width: 100px;
    height: 56px;
    overflow: hidden;
    border-radius: 4px;
    border: 1px solid var(--bg-light);
    flex-shrink: 0;
}

.writing-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.8);
    transition: var(--transition);
}

.writing-item:hover .writing-image {
    filter: brightness(1);
}

.writing-year {
    font-family: var(--font-mono);
    font-size: var(--fz-xs);
    color: var(--slate);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 6px;
}

.writing-title {
    font-size: var(--fz-md);
    font-weight: 500;
    color: var(--lightest-slate);
    line-height: 1.4;
    transition: var(--transition);
}

/* Footer */
.site-footer {
    margin-top: 80px;
    padding: 20px;
}

.site-footer p {
    font-family: var(--font-mono);
    font-size: var(--fz-xs);
    color: var(--slate);
    line-height: 1.8;
}


/* Active nav highlight */
.nav-link.active {
    color: var(--lightest-slate);
}

/* Responsive */
@media (max-width: 1080px) {
    .container {
        padding: 0 32px;
    }
    .left-panel {
        width: 45%;
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
        padding: 0 24px;
    }
    .left-panel {
        position: static;
        max-height: none;
        width: 100%;
        padding: 64px 0 32px;
    }
    .right-panel {
        padding: 0 0 64px;
    }
    .main-nav {
        display: none;
    }
    .section-header {
        display: block;
        position: sticky;
        top: 0;
        z-index: 10;
        margin: 0 -24px 32px;
        padding: 16px 24px;
        backdrop-filter: blur(8px);
        background: rgba(10, 25, 47, 0.85);
    }
    .section-title {
        margin-bottom: 0;
        padding-top: 0;
    }
    .experience-item,
    .project-item,
    .writing-item {
        grid-template-columns: 1fr;
    }
    .exp-period {
        padding-top: 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    .name-link {
        font-size: 28px;
    }
}
