/* Homepage — S-tier design system */

/* ===== Typography overrides ===== */
.homepage {
    font-family: 'DM Sans', system-ui, sans-serif;
    line-height: 1.6;
}

.homepage h1,
.homepage h2,
.homepage .serif {
    font-family: 'Instrument Serif', Georgia, serif;
    font-weight: 400;
    letter-spacing: -0.03em;
}

/* ===== Background — clean, not busy ===== */
.homepage .orbital-grid {
    background-color: var(--bg-primary);
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(75, 156, 211, 0.12), transparent);
}

/* Fixed attachment on desktop only — causes jank on iOS */
@media (min-width: 1024px) {
    .homepage .orbital-grid { background-attachment: fixed; }
}

/* ===== Animations ===== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-in { animation: fadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.delay-1 { animation-delay: 0.12s; opacity: 0; }
.delay-2 { animation-delay: 0.24s; opacity: 0; }
.delay-3 { animation-delay: 0.36s; opacity: 0; }

@media (prefers-reduced-motion: reduce) {
    .animate-in { animation: none; opacity: 1; transform: none; }
    .delay-1, .delay-2, .delay-3 { opacity: 1; }
}

/* ===== Page entrance ===== */
.homepage .orbital-grid {
    animation: fadeIn 0.5s ease both;
}

/* ===== Hero — commanding, generous space ===== */
.home-hero {
    padding-top: calc(var(--nav-height) + 4rem);
    padding-bottom: 5rem;
    position: relative;
}

@media (min-width: 640px) {
    .home-hero { padding-top: calc(var(--nav-height) + 6rem); padding-bottom: 7rem; }
}

@media (min-width: 1024px) {
    .home-hero { padding-top: calc(var(--nav-height) + 8rem); padding-bottom: 8rem; }
}

.home-hero-inner {
    max-width: 52rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    text-align: center;
}

@media (min-width: 640px) { .home-hero-inner { padding: 0 2rem; } }

/* Avatar */
.home-avatar {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 2.5rem;
    display: block;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.08),
        0 0 0 4px rgba(75, 156, 211, 0.08);
    transition: box-shadow 0.4s ease;
}

.home-avatar:hover {
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.12),
        0 0 0 4px rgba(75, 156, 211, 0.15),
        0 0 40px rgba(75, 156, 211, 0.1);
}

@media (min-width: 640px) { .home-avatar { width: 5.5rem; height: 5.5rem; } }

/* Headline */
.home-headline {
    font-size: 2.75rem;
    margin-bottom: 1.25rem;
    letter-spacing: -0.035em;
    line-height: 1.05;
    color: #fff;
}

@media (min-width: 640px) { .home-headline { font-size: 3.5rem; } }
@media (min-width: 768px) { .home-headline { font-size: 4.25rem; } }
@media (min-width: 1024px) { .home-headline { font-size: 4.75rem; } }

/* Subheadline */
.home-subheadline {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 2.5rem;
    max-width: 38rem;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

@media (min-width: 640px) { .home-subheadline { font-size: 1.25rem; } }

.home-subheadline a {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    transition: border-color 0.2s, color 0.2s;
}

.home-subheadline a:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.6);
}

/* ===== Social icons ===== */
.home-social {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
}

.social-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem;
    border-radius: 10px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.25s ease;
}

.social-icon-link:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.social-icon-link svg {
    width: 1.125rem;
    height: 1.125rem;
    color: rgba(255, 255, 255, 0.45);
    transition: color 0.2s;
}

.social-icon-link:hover svg { color: rgba(255, 255, 255, 0.85); }
.social-icon-link--linkedin:hover svg { color: #0A66C2; }

/* ===== Section divider ===== */
.home-section + .home-section,
.home-cta,
.home-quote {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

/* ===== Sections layout ===== */
.home-section {
    max-width: 72rem;
    margin: 0 auto;
    padding: 4rem 1.25rem;
}

@media (min-width: 640px) { .home-section { padding: 5rem 1.5rem; } }
@media (min-width: 1024px) { .home-section { padding: 6rem 2rem; } }

.home-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 3rem;
    font-family: 'DM Sans', system-ui, sans-serif;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

@media (min-width: 640px) { .home-section-title { font-size: 1.125rem; margin-bottom: 3.5rem; } }

.home-category-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.35);
    text-align: left;
    margin-bottom: 1rem;
    font-family: 'DM Sans', system-ui, sans-serif;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding-left: 0.125rem;
}

.home-category {
    max-width: 64rem;
    margin: 0 auto 3rem;
}

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

/* ===== Project cards grid ===== */
.home-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

@media (min-width: 640px) { .home-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; } }
@media (min-width: 1024px) { .home-grid { grid-template-columns: repeat(3, 1fr); } }

/* ===== Project card ===== */
.project-card {
    display: block;
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
    color: #fff;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

@media (min-width: 640px) { .project-card { padding: 1.25rem 1.5rem; } }

.project-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Named card variants — subtle left accents */
.project-card--trade    { border-left: 2px solid rgba(239, 68, 68, 0.4); }
.project-card--trade:hover { border-left-color: rgba(239, 68, 68, 0.7); }
.project-card--bomforge { border-left: 2px solid rgba(59, 130, 246, 0.4); }
.project-card--bomforge:hover { border-left-color: rgba(59, 130, 246, 0.7); }
.project-card--actor    { border-left: 2px solid rgba(255, 255, 255, 0.15); }
.project-card--actor:hover { border-left-color: rgba(255, 255, 255, 0.4); }
.project-card--nft      { border-left: 2px solid rgba(168, 85, 247, 0.4); }
.project-card--nft:hover { border-left-color: rgba(168, 85, 247, 0.7); }
.project-card--md2fig   { border-left: 2px solid rgba(168, 85, 247, 0.3); }
.project-card--md2fig:hover { border-left-color: rgba(168, 85, 247, 0.6); }
.project-card--saint    { border-left: 2px solid rgba(245, 158, 11, 0.4); }
.project-card--saint:hover { border-left-color: rgba(245, 158, 11, 0.7); }
.project-card--gpt      { border-left: 2px solid rgba(245, 158, 11, 0.3); }
.project-card--gpt:hover { border-left-color: rgba(245, 158, 11, 0.6); }
.project-card--csv      { border-left: 2px solid rgba(99, 102, 241, 0.3); }
.project-card--csv:hover { border-left-color: rgba(99, 102, 241, 0.6); }

.project-card-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.project-card-name {
    font-size: 1rem;
    font-weight: 600;
    font-family: 'DM Sans', system-ui, sans-serif;
    letter-spacing: -0.01em;
}

@media (min-width: 640px) { .project-card-name { font-size: 1.0625rem; } }

.project-card-badge {
    display: inline-flex;
    font-size: 0.6875rem;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.badge-red    { background: rgba(239, 68, 68, 0.12); color: #fca5a5; }
.badge-blue   { background: rgba(59, 130, 246, 0.12); color: #93c5fd; }
.badge-cyan   { background: rgba(6, 182, 212, 0.12); color: #67e8f9; }
.badge-purple { background: rgba(168, 85, 247, 0.12); color: #d8b4fe; }
.badge-pink   { background: rgba(236, 72, 153, 0.12); color: #f9a8d4; }
.badge-green  { background: rgba(16, 185, 129, 0.12); color: #6ee7b7; }
.badge-amber  { background: rgba(245, 158, 11, 0.12); color: #fcd34d; }
.badge-yellow { background: rgba(234, 179, 8, 0.12); color: #fde047; }
.badge-orange { background: rgba(249, 115, 22, 0.12); color: #fdba74; }
.badge-teal   { background: rgba(20, 184, 166, 0.12); color: #5eead4; }
.badge-white  { background: rgba(255, 255, 255, 0.06); color: rgba(255, 255, 255, 0.6); }
.badge-indigo { background: rgba(99, 102, 241, 0.12); color: #a5b4fc; }

.project-card-desc {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.6;
}

/* ===== More projects (collapsed on mobile) ===== */
.home-more-projects {
    display: none;
    max-width: 64rem;
    margin: 0.75rem auto 0;
}

@media (min-width: 640px) {
    .home-more-projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
}

@media (min-width: 1024px) {
    .home-more-projects { grid-template-columns: repeat(3, 1fr); }
}

.home-more-projects.is-open { display: grid; grid-template-columns: 1fr; gap: 0.75rem; }
@media (min-width: 640px) { .home-more-projects.is-open { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .home-more-projects.is-open { grid-template-columns: repeat(3, 1fr); } }

.home-show-more {
    text-align: center;
    margin-top: 1.5rem;
}

@media (min-width: 640px) { .home-show-more { display: none; } }

.home-show-more-btn {
    padding: 0.5rem 1.5rem;
    font-size: 0.8125rem;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.01em;
}

.home-show-more-btn:hover {
    color: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ===== Writing CTA ===== */
.home-cta {
    max-width: 72rem;
    margin: 0 auto;
    padding: 4rem 1.25rem;
}

@media (min-width: 640px) { .home-cta { padding: 5rem 1.5rem; } }

.home-cta-card {
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    max-width: 36rem;
    margin: 0 auto;
}

@media (min-width: 640px) { .home-cta-card { padding: 3rem 2.5rem; } }

.home-cta-card h2 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 0.75rem;
    font-family: 'Instrument Serif', Georgia, serif;
    letter-spacing: -0.02em;
}

@media (min-width: 640px) { .home-cta-card h2 { font-size: 1.75rem; } }

.home-cta-card p {
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
}

.home-cta-link {
    display: inline-block;
    padding: 0.625rem 1.5rem;
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    text-decoration: none;
    transition: all 0.25s ease;
    letter-spacing: 0.01em;
}

.home-cta-link:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-1px);
}

/* ===== Work History — timeline feel ===== */
.home-work-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    max-width: 40rem;
    margin: 0 auto;
    text-align: left;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.home-work-card {
    display: block;
    padding: 1.25rem 1.5rem;
    border-radius: 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    text-decoration: none;
    color: #fff;
    transition: background 0.2s;
    position: relative;
}

.home-work-card::before {
    content: '';
    position: absolute;
    left: -3.5px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: background 0.25s ease;
}

.home-work-card:hover {
    background: rgba(255, 255, 255, 0.02);
}

.home-work-card:hover::before {
    background: rgba(75, 156, 211, 0.6);
}

.home-work-card:last-child { border-bottom: none; }

.home-work-card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.25rem;
    gap: 1rem;
}

.home-work-card h3 {
    font-size: 1rem;
    font-weight: 600;
    font-family: 'DM Sans', system-ui, sans-serif;
    letter-spacing: -0.01em;
}

.home-work-card-year {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.3);
    font-family: 'DM Sans', system-ui, sans-serif;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

.home-work-card p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.45);
}

/* ===== Education ===== */
.home-education {
    max-width: 36rem;
    margin: 0 auto;
}

.home-edu-card {
    padding: 1.75rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(75, 156, 211, 0.12);
}

.home-edu-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.home-edu-logo {
    width: 3.5rem;
    height: 3.5rem;
    object-fit: contain;
    flex-shrink: 0;
    opacity: 0.85;
}

.home-edu-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    font-family: 'DM Sans', system-ui, sans-serif;
    letter-spacing: -0.01em;
}

.home-edu-header p {
    color: rgba(75, 156, 211, 0.8);
    font-size: 0.875rem;
}

.home-edu-degree {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 0.25rem;
}

.home-edu-degree a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    transition: border-color 0.2s;
}

.home-edu-degree a:hover { border-color: rgba(255, 255, 255, 0.4); }

.home-edu-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.home-edu-badge {
    display: inline-flex;
    font-size: 0.75rem;
    padding: 0.1875rem 0.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
}

.home-edu-badge--morehead {
    background: rgba(234, 179, 8, 0.1);
    color: rgba(250, 204, 21, 0.8);
}

.home-edu-badge--morehead:hover { background: rgba(234, 179, 8, 0.18); }

.home-edu-badge--unc {
    background: rgba(75, 156, 211, 0.1);
    color: rgba(75, 156, 211, 0.8);
}

/* ===== Photo grid — cinematic ===== */
.home-photos {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    max-width: 72rem;
    margin: 0 auto;
    padding: 3rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

@media (min-width: 768px) {
    .home-photos { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
}

.home-photo-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.home-photo-wrap {
    overflow: hidden;
    aspect-ratio: 16 / 10;
    border-radius: 8px;
}

@media (min-width: 768px) { .home-photo-wrap { aspect-ratio: 4 / 3; } }

.home-photo-wrap img,
.home-photo-wrap video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    filter: brightness(0.9);
}

.home-photo-item:hover .home-photo-wrap img,
.home-photo-item:hover .home-photo-wrap video {
    transform: scale(1.04);
    filter: brightness(1);
}

.home-photo-caption {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 0.5rem;
    padding-left: 0.125rem;
}

/* ===== Quote — refined ===== */
.home-quote {
    max-width: 72rem;
    margin: 0 auto;
    padding: 5rem 1.25rem 6rem;
}

@media (min-width: 640px) { .home-quote { padding: 6rem 1.5rem 7rem; } }

.home-quote-card {
    border-radius: 0;
    padding: 0;
    max-width: 36rem;
    margin: 0 auto;
    background: transparent;
    border: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.home-quote-text {
    text-align: center;
}

.home-quote-text p {
    font-size: 1.125rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 0.75rem;
    line-height: 1.8;
}

@media (min-width: 640px) { .home-quote-text p { font-size: 1.25rem; } }

.home-quote-text p:first-child {
    color: rgba(255, 255, 255, 0.55);
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 1.25rem;
    letter-spacing: 0.01em;
}

@media (min-width: 640px) { .home-quote-text p:first-child { font-size: 1.375rem; } }

.home-quote-text .chi-rho {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.2);
    margin-top: 1.5rem;
    display: block;
}

/* ===== Footer — elevated ===== */
.site-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding: 3rem 1.25rem;
    text-align: center;
    margin-top: 0;
    background: transparent;
}

@media (min-width: 640px) { .site-footer { padding: 4rem 1.5rem; } }

.footer-shell {
    max-width: 40rem;
    margin: 0 auto;
}

.footer-title {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.375rem;
}

.footer-subtitle {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 0.75rem;
}

.footer-prayer {
    margin-bottom: 1.5rem;
}

.footer-prayer a {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.25);
    text-decoration: none;
    font-style: italic;
    transition: color 0.2s;
}

.footer-prayer a:hover { color: rgba(255, 255, 255, 0.5); }

.footer-meta {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.2);
    margin-bottom: 1.5rem;
}

.footer-actions {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.footer-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    transition: all 0.2s;
}

.footer-btn:hover {
    color: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.03);
}

/* ===== Mobile responsive ===== */
@media (max-width: 640px) {
    .home-headline { font-size: 2.5rem; }
    .home-section-title { margin-bottom: 2rem; }
}
