/* ===================================================
   Chris Green — Personal Site
   Soft Stone: warm gray, slate text, muted teal accent
   =================================================== */

:root {
    --bg: #f0ede8;
    --bg-raised: #e8e4de;
    --bg-hover: #e3ded7;
    --surface: #fff;
    --border: #d4cfc7;
    --border-light: #ddd8d0;
    --text: #2c2c2c;
    --text-muted: #6b6560;
    --text-dim: #9a9590;
    --accent: #3d8c8c;
    --accent-hover: #327474;
    --accent-light: rgba(61, 140, 140, 0.1);
    --accent-glow: rgba(61, 140, 140, 0.2);
    --bubble: rgba(61, 140, 140, 0.06);
    --bubble-border: rgba(61, 140, 140, 0.08);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    overflow-x: hidden;
}

::selection {
    background: var(--accent);
    color: #fff;
}

/* === Floating Bubbles === */
.bubbles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: var(--bubble);
    border: 1px solid var(--bubble-border);
    animation: float linear infinite;
    will-change: transform;
}

.bubble:nth-child(1) {
    width: 80px;
    height: 80px;
    left: 8%;
    animation-duration: 22s;
    animation-delay: 0s;
    bottom: -100px;
}

.bubble:nth-child(2) {
    width: 45px;
    height: 45px;
    left: 20%;
    animation-duration: 18s;
    animation-delay: -3s;
    bottom: -60px;
}

.bubble:nth-child(3) {
    width: 120px;
    height: 120px;
    left: 35%;
    animation-duration: 28s;
    animation-delay: -6s;
    bottom: -140px;
}

.bubble:nth-child(4) {
    width: 55px;
    height: 55px;
    left: 50%;
    animation-duration: 20s;
    animation-delay: -2s;
    bottom: -70px;
}

.bubble:nth-child(5) {
    width: 90px;
    height: 90px;
    left: 65%;
    animation-duration: 25s;
    animation-delay: -8s;
    bottom: -110px;
}

.bubble:nth-child(6) {
    width: 35px;
    height: 35px;
    left: 78%;
    animation-duration: 16s;
    animation-delay: -4s;
    bottom: -50px;
}

.bubble:nth-child(7) {
    width: 65px;
    height: 65px;
    left: 90%;
    animation-duration: 24s;
    animation-delay: -10s;
    bottom: -80px;
}

.bubble:nth-child(8) {
    width: 40px;
    height: 40px;
    left: 5%;
    animation-duration: 19s;
    animation-delay: -7s;
    bottom: -55px;
}

.bubble:nth-child(9) {
    width: 100px;
    height: 100px;
    left: 42%;
    animation-duration: 30s;
    animation-delay: -12s;
    bottom: -120px;
}

.bubble:nth-child(10) {
    width: 50px;
    height: 50px;
    left: 72%;
    animation-duration: 21s;
    animation-delay: -1s;
    bottom: -65px;
}

.bubble:nth-child(11) {
    width: 70px;
    height: 70px;
    left: 15%;
    animation-duration: 26s;
    animation-delay: -14s;
    bottom: -85px;
}

.bubble:nth-child(12) {
    width: 30px;
    height: 30px;
    left: 55%;
    animation-duration: 17s;
    animation-delay: -5s;
    bottom: -45px;
}

@keyframes float {
    0% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0;
    }
    5% {
        opacity: 1;
    }
    50% {
        transform: translateY(-50vh) translateX(30px) scale(1.05);
    }
    95% {
        opacity: 1;
    }
    100% {
        transform: translateY(-110vh) translateX(-20px) scale(0.95);
        opacity: 0;
    }
}

/* === Layout === */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

section {
    padding: 8rem 0;
    position: relative;
}

/* === Typography === */
h1, h2, h3 {
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--text);
}

h1 { font-size: clamp(3.5rem, 10vw, 7rem); }
h2 { font-size: 2rem; }
h3 { font-size: 1.25rem; }

p {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 1rem;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

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

/* === Navigation === */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.25rem 0;
    background: rgba(240, 237, 232, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.03em;
    transition: color 0.2s ease;
}

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

.logo-dot {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.25rem 0;
    position: relative;
    transition: color 0.2s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
    transition: width 0.3s ease;
}

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

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* === Hero === */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 6rem;
    position: relative;
    overflow: hidden;
}

.hero .container {
    position: relative;
}

.hero-tag {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeUp 0.6s ease 0.2s forwards;
}

.hero h1 {
    margin-bottom: 2.5rem;
    opacity: 0;
    animation: fadeUp 0.6s ease 0.4s forwards;
}

.hero-accent {
    color: var(--accent);
    display: inline-block;
}

.hero-bio {
    max-width: 480px;
    opacity: 0;
    animation: fadeUp 0.6s ease 0.6s forwards;
}

.hero-bio p {
    font-size: 1.15rem;
    line-height: 1.75;
    color: var(--text-muted);
}

.hero-cta {
    margin-top: 3rem;
    opacity: 0;
    animation: fadeUp 0.6s ease 0.8s forwards;
}

.hero-decoration {
    position: absolute;
    top: 50%;
    right: -5%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    animation: fadeIn 1s ease 1s forwards;
}

.deco-line {
    height: 1px;
    background: var(--border);
}

.deco-line:nth-child(1) { width: 120px; }

.deco-line:nth-child(2) {
    width: 80px;
    background: var(--accent);
    opacity: 0.4;
}

.deco-line:nth-child(3) { width: 40px; }

/* === Section Headers === */
.section-header {
    display: flex;
    align-items: baseline;
    gap: 1.25rem;
    margin-bottom: 4rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.section-number {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.05em;
    font-variant-numeric: tabular-nums;
}

.section-header h2 {
    margin-bottom: 0;
}

.section-subtitle {
    color: var(--text-dim);
    margin-top: -2.5rem;
    margin-bottom: 3rem;
    font-size: 1rem;
}

/* === About === */
.about {
    border-top: 1px solid var(--border);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-lead {
    font-size: 1.35rem;
    color: var(--text);
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

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

.interests-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.interests-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.interests-list li:first-child {
    border-top: 1px solid var(--border);
}

.interests-list li:hover {
    color: var(--text);
    padding-left: 0.5rem;
}

.interest-icon {
    font-size: 1.1rem;
    width: 1.5rem;
    text-align: center;
    flex-shrink: 0;
}

/* === Projects === */
.projects {
    border-top: 1px solid var(--border);
}

.projects-list {
    display: flex;
    flex-direction: column;
}

.project-item {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 2rem;
    align-items: start;
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--border);
    border-radius: 6px;
    transition: background 0.2s ease;
}

.project-item:first-child {
    border-top: 1px solid var(--border);
}

.project-item:hover {
    background: var(--bg-raised);
    margin: 0 -1.5rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.project-index {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-dim);
    padding-top: 0.25rem;
    font-variant-numeric: tabular-nums;
}

.project-body h3 {
    margin-bottom: 0.75rem;
    transition: color 0.2s ease;
}

.project-item:hover .project-body h3 {
    color: var(--accent);
}

.project-body p {
    font-size: 0.95rem;
    margin-bottom: 0;
    max-width: 520px;
}

.project-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 0.2rem;
}

.text-link {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-dim);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: color 0.2s ease;
}

.text-link:hover {
    color: var(--accent);
}

.text-link span {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
    display: inline-block;
}

.text-link:hover span {
    transform: translate(2px, -2px);
}

/* === Contact === */
.contact {
    border-top: 1px solid var(--border);
}

.contact-content {
    max-width: 600px;
}

.contact-lead {
    font-size: 1.35rem;
    color: var(--text);
    line-height: 1.5;
    margin-bottom: 3rem;
}

.social-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    background: var(--surface);
    transition: all 0.2s ease;
}

.social-links a i {
    font-size: 1rem;
}

.social-links a:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
    box-shadow: 0 2px 8px var(--accent-glow);
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.75rem;
    background: var(--accent);
    color: #fff;
    border: 1px solid var(--accent);
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #fff;
    box-shadow: 0 4px 16px var(--accent-glow);
    transform: translateY(-1px);
}

.btn-arrow {
    transition: transform 0.25s ease;
}

.btn:hover .btn-arrow {
    transform: translateY(3px);
}

/* === Footer === */
footer {
    padding: 3rem 0;
    border-top: 1px solid var(--border);
    position: relative;
    z-index: 1;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

footer p {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin: 0;
}

.footer-note {
    font-style: italic;
}

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

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

/* Scroll fade-in for sections */
section:not(.hero) {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

section.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* === Responsive === */
@media (max-width: 768px) {
    .container {
        padding: 0 1.25rem;
    }

    section {
        padding: 5rem 0;
    }

    .navbar {
        padding: 1rem 0;
    }

    .nav-links {
        gap: 1.5rem;
    }

    .nav-links a {
        font-size: 0.8rem;
    }

    h1 {
        font-size: clamp(2.5rem, 12vw, 4rem);
    }

    .hero {
        padding-top: 6rem;
        min-height: auto;
        padding-bottom: 4rem;
    }

    .hero-decoration {
        display: none;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .project-item {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .project-item:hover {
        margin: 0 -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .project-index {
        color: var(--accent);
    }

    .project-links {
        flex-direction: row;
        gap: 1.5rem;
    }

    .section-header {
        margin-bottom: 2.5rem;
    }

    .footer-container {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    /* Smaller bubbles on mobile */
    .bubble:nth-child(3),
    .bubble:nth-child(9) {
        display: none;
    }
}

@media (max-width: 480px) {
    .nav-links {
        gap: 1rem;
    }

    .social-links {
        flex-direction: column;
    }

    .social-links a {
        justify-content: center;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .bubble {
        animation: none;
        opacity: 0.5;
        bottom: auto;
        top: var(--top, 30%);
    }

    .hero-tag,
    .hero h1,
    .hero-bio,
    .hero-cta,
    .hero-decoration {
        opacity: 1;
        animation: none;
        transform: none;
    }

    section:not(.hero) {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
