/* ========================================
   CSS Custom Properties
   ======================================== */
:root {
    /* Colors - derived from gold/black background */
    --gold-primary: #D4A912;
    --gold-light: #E8C547;
    --gold-dark: #A68A0D;
    --black: #0D0D0D;
    --card-bg: #FFFCF5;
    --card-border: rgba(212, 169, 18, 0.3);
    --text-primary: #1A1A1A;
    --text-secondary: #4A4A4A;
    --text-muted: #6B6B6B;
    --divider: rgba(212, 169, 18, 0.2);

    /* Typography */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --line-height-tight: 1.3;
    --line-height-normal: 1.6;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 2.5rem;

    /* Card */
    --card-max-width: 760px;
    --card-padding: var(--space-xl);
    --card-radius: 16px;
    --card-shadow:
        0 4px 6px rgba(0, 0, 0, 0.1),
        0 10px 40px rgba(0, 0, 0, 0.25),
        0 0 80px rgba(212, 169, 18, 0.15);
}

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

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

@keyframes subtleFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

@keyframes bgPan {
    0% {
        transform: scale(1.05) translate(0, 0);
    }
    50% {
        transform: scale(1.08) translate(-1%, -0.5%);
    }
    100% {
        transform: scale(1.05) translate(0, 0);
    }
}

/* ========================================
   Reset & Base
   ======================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    color: var(--text-primary);
    background-color: var(--black);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
}

/* ========================================
   Background
   ======================================== */
.bg-wrapper {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}

.bg-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    animation: bgPan 30s ease-in-out infinite;
}

/* Bokeh particle canvas, layered over the background image */
#bokeh-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
}

/* ========================================
   Card Container
   ======================================== */
.card {
    position: relative;
    width: 100%;
    max-width: var(--card-max-width);
    background: var(--card-bg);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.8s ease-out;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow:
        0 6px 12px rgba(0, 0, 0, 0.12),
        0 16px 48px rgba(0, 0, 0, 0.28),
        0 0 100px rgba(212, 169, 18, 0.2);
}

/* Gold top accent bar with shimmer */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background:
        linear-gradient(90deg, var(--gold-dark), var(--gold-primary), var(--gold-light), var(--gold-primary), var(--gold-dark)),
        linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    background-size: 100% 100%, 200% 100%;
    animation: shimmer 4s ease-in-out infinite;
}

.card-content {
    padding: var(--space-2xl) var(--card-padding) var(--card-padding);
}

/* ========================================
   Header & Logo
   ======================================== */
.header {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.logo {
    width: 85%;
    max-width: 320px;
    height: auto;
    margin-bottom: var(--space-md);
    animation: subtleFloat 6s ease-in-out infinite;
}

.tagline {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

/* ========================================
   Sections
   ======================================== */
.section {
    padding: var(--space-lg) 0;
}

.section + .section {
    border-top: 1px solid var(--divider);
}

/* Two-column layout for About + Projects on wider screens */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 1px solid var(--divider);
}

.content-grid .section {
    padding: var(--space-lg) 0;
}

.content-grid .section + .section {
    border-top: none;
    border-left: 1px solid var(--divider);
    padding-left: var(--space-xl);
}

.content-grid .section:first-child {
    padding-right: var(--space-xl);
}

.content-grid + .section {
    border-top: 1px solid var(--divider);
}

.section-title {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--gold-dark);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--space-sm);
}

/* ========================================
   About Section
   ======================================== */
.about-text {
    color: var(--text-secondary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    margin-bottom: var(--space-md);
}

.capabilities {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs) var(--space-md);
    margin-top: var(--space-md);
}

.capabilities li {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.capabilities li::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--gold-primary);
    border-radius: 50%;
    flex-shrink: 0;
    animation: pulse 3s ease-in-out infinite;
}

.capabilities li:nth-child(2)::before {
    animation-delay: 0.5s;
}

.capabilities li:nth-child(3)::before {
    animation-delay: 1s;
}

/* ========================================
   Projects Section
   ======================================== */
.projects-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.projects-list li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: var(--space-sm);
    margin: 0 calc(var(--space-sm) * -1);
    border-radius: 8px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.projects-list li:hover {
    background-color: rgba(212, 169, 18, 0.06);
    transform: translateX(4px);
}

.project-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--gold-primary);
    transition: transform 0.2s ease;
}

.projects-list li:hover .project-icon {
    transform: scale(1.15);
}

.project-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: var(--font-size-base);
    transition: color 0.2s ease;
}

.project-link:hover,
.project-link:focus {
    color: var(--gold-dark);
}

.project-link:focus {
    outline: 2px solid var(--gold-primary);
    outline-offset: 2px;
    border-radius: 2px;
}

.project-desc {
    display: block;
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 2px;
}

/* ========================================
   Contact Section
   ======================================== */
.contact {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.contact-icon {
    width: 18px;
    height: 18px;
    color: var(--gold-primary);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.contact:hover .contact-icon {
    transform: rotate(-10deg) scale(1.1);
}

.contact a {
    color: var(--text-primary);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact a:hover,
.contact a:focus {
    color: var(--gold-dark);
}

.contact a:focus {
    outline: 2px solid var(--gold-primary);
    outline-offset: 2px;
    border-radius: 2px;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    padding-top: var(--space-lg);
    border-top: 1px solid var(--divider);
    margin-top: var(--space-lg);
}

.company-info {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    text-align: center;
}

/* ========================================
   Responsive
   ======================================== */
/* Collapse to single column on narrower screens */
@media (max-width: 620px) {
    .content-grid {
        grid-template-columns: 1fr;
    }

    .content-grid .section + .section {
        border-top: 1px solid var(--divider);
        border-left: none;
        padding-left: 0;
    }

    .content-grid .section:first-child {
        padding-right: 0;
    }
}

@media (max-width: 480px) {
    :root {
        --card-padding: var(--space-lg);
        --space-2xl: 2rem;
    }

    body {
        padding: var(--space-md);
        align-items: flex-start;
        padding-top: var(--space-xl);
    }

    .logo {
        width: 90%;
    }

    .capabilities {
        flex-direction: column;
        gap: var(--space-xs);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .bg-wrapper img {
        animation: none;
        transform: scale(1.02);
    }

    .card {
        animation: none;
    }

    .card:hover {
        transform: none;
    }

    .logo {
        animation: none;
    }

    .capabilities li::before {
        animation: none;
    }

    .projects-list li:hover {
        transform: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --card-bg: #FFFFFF;
        --text-secondary: #1A1A1A;
        --text-muted: #333333;
    }
}
