/* ==========================================================================
   Refined Design - Cohesive Gradient Flow
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@1,500&display=swap');
@import url('https://api.fontshare.com/v2/css?f[]=satoshi@400,500,700&display=swap');

:root {
    --bg: #0a0a0f;
    --surface: #141419;
    --surface-light: rgba(255,255,255,0.03);
    --text: rgba(255,255,255,0.85);
    --text-muted: rgba(255,255,255,0.55);
    --accent: #3b82f6;
    --accent-light: #60a5fa;
    --gradient-start: #1d4ed8;
    --gradient-end: #60a5fa;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Satoshi', -apple-system, sans-serif;
    font-size: 18px;
    line-height: 1.5;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

/* Subtle grain texture overlay */
body > *:first-child::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23noise)'/%3E%3C/svg%3E");
}

a {
    color: inherit;
    text-decoration: none;
}

/* Italic accent with animated gradient */
.italic-accent {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end), var(--gradient-start));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 6s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ==========================================================================
   Global gradient orbs - spans entire page
   ========================================================================== */

body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

body::before {
    width: 600px;
    height: 600px;
    background: var(--gradient-start);
    top: -200px;
    right: -200px;
    animation: float1 20s ease-in-out infinite;
}

body::after {
    width: 500px;
    height: 500px;
    background: var(--gradient-end);
    bottom: 20%;
    left: -150px;
    animation: float2 25s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-80px, 100px); }
}

@keyframes float2 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(60px, -80px); }
}

/* ==========================================================================
   Container
   ========================================================================== */

section {
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem;
    position: relative;
    background:
        radial-gradient(circle at 1px 1px, rgba(255,255,255,0.15) 1px, transparent 0);
    background-size: 32px 32px;
}

.hero-content {
    max-width: 850px;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(4rem, 12vw, 7rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

.hero-title .last-name {
    display: block;
}

.hero-tagline {
    font-size: 1.1rem;
    color: var(--text-muted);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.hero-description {
    font-size: 1.4rem;
    color: var(--text-muted);
    line-height: 1.55;
    max-width: 600px;
}

.hero-description .italic-accent {
    font-size: 1.5rem;
}

.hero-cta {
    margin-top: 3rem;
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.9rem 1.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    position: relative;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border-radius: 10px;
    z-index: -1;
    opacity: 0;
    filter: blur(12px);
    transition: opacity 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.35);
}

.btn-primary:hover::before {
    opacity: 0.6;
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: 1px solid rgba(255,255,255,0.08);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.15);
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    z-index: 2;
}

.scroll-indicator::after {
    content: '';
    width: 1px;
    height: 50px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.4; transform: scaleY(1); }
    50% { opacity: 1; transform: scaleY(1.2); }
}

/* ==========================================================================
   Scroll Animations
   ========================================================================== */

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

/* ==========================================================================
   About
   ========================================================================== */

#about {
    padding: 10rem 4rem;
    background: linear-gradient(to bottom,
        var(--bg) 0%,
        var(--bg) 20%,
        var(--surface) 80%,
        var(--surface) 100%
    );
}

.about-content {
    max-width: 900px;
    display: grid;
    grid-template-columns: 4px 1fr;
    gap: 3rem;
}

.about-accent {
    background: linear-gradient(to bottom, var(--gradient-start), var(--gradient-end));
    border-radius: 2px;
    background-size: 100% 200%;
    animation: gradientShift 4s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 0%; }
    50% { background-position: 0% 100%; }
}

.about-statement {
    font-size: clamp(1.6rem, 3.5vw, 2.25rem);
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 2rem;
}

.about-details {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.about-details p {
    margin-bottom: 1.25rem;
}

.about-details strong {
    color: var(--text);
    font-weight: 600;
}

/* ==========================================================================
   Tools
   ========================================================================== */

#tools {
    padding: 6rem 4rem 10rem;
    background: linear-gradient(to bottom,
        var(--surface) 0%,
        var(--bg) 30%,
        var(--bg) 100%
    );
}

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

.section-header h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 1200px;
}

.tool-card {
    background: var(--surface);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.4s ease;
    position: relative;
}

.tool-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255,255,255,0.08);
}

.tool-card:hover {
    transform: translateY(-8px) scale(1.02) rotateX(2deg);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow:
        0 25px 50px rgba(59, 130, 246, 0.2),
        0 0 40px rgba(59, 130, 246, 0.1);
}

.tool-number {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-light);
    letter-spacing: 0.05em;
    margin-bottom: 1.25rem;
}

.tool-card h3 {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.tool-type {
    font-size: 0.8rem;
    color: var(--accent-light);
    margin-bottom: 1.25rem;
}

.tool-card > p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.55;
    margin-bottom: 1.5rem;
}

.tool-tech {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.35);
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* ==========================================================================
   Experience
   ========================================================================== */

#experience {
    padding: 6rem 4rem 10rem;
    background: linear-gradient(to bottom,
        var(--bg) 0%,
        var(--surface) 25%,
        var(--surface) 100%
    );
}

.experience-list {
    max-width: 700px;
    position: relative;
    padding-left: 2.5rem;
}

.experience-list::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(to bottom, var(--gradient-start), var(--gradient-end), transparent);
    border-radius: 1px;
}

.job {
    position: relative;
    padding-bottom: 2.5rem;
}

.job::before {
    content: '';
    position: absolute;
    left: calc(-2.5rem - 3px);
    top: 8px;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 0 4px var(--surface);
}

.job:last-child {
    padding-bottom: 0;
}

.job h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.job-role {
    font-size: 0.85rem;
    color: var(--accent-light);
    margin-bottom: 0.6rem;
}

.job > p:last-child {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.55;
}

/* ==========================================================================
   Work
   ========================================================================== */

#work {
    padding: 6rem 4rem 10rem;
    background: linear-gradient(to bottom,
        var(--surface) 0%,
        var(--bg) 30%,
        var(--bg) 70%,
        var(--surface) 100%
    );
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
}

.work-card {
    background: var(--surface);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 0;
    transition: all 0.4s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.work-card:hover {
    transform: translateY(-6px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow:
        0 20px 50px rgba(59, 130, 246, 0.15),
        0 0 30px rgba(59, 130, 246, 0.1);
}

.work-header {
    padding: 1.5rem 1.5rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 1rem;
}

.work-context {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-light);
    margin-bottom: 0.5rem;
}

.work-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text);
}

.work-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.work-body > p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.55;
    flex: 1;
}

.work-outcome {
    margin-top: 1.25rem;
    padding: 1rem;
    background: var(--surface-light);
    border-radius: 8px;
    border-left: 3px solid var(--accent);
}

.work-outcome-label {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-light);
    margin-bottom: 0.4rem;
}

.work-outcome p {
    font-size: 0.9rem;
    color: var(--text);
    line-height: 1.5;
    margin: 0;
}

/* ==========================================================================
   Contact
   ========================================================================== */

.contact-section {
    padding: 10rem 4rem;
    text-align: center;
    background: var(--surface);
    position: relative;
}

.contact-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    filter: blur(100px);
    opacity: 0.2;
}

.contact-content {
    position: relative;
    z-index: 1;
}

.contact-section h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.contact-intro {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.contact-links a {
    padding: 0.9rem 2rem;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.contact-links a:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.35);
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer {
    background: var(--surface);
    color: rgba(255,255,255,0.3);
    text-align: center;
    padding: 2rem 4rem;
    font-size: 0.8rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
    .hero {
        padding: 6rem 2rem;
    }

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

    .about-accent {
        width: 50px;
        height: 4px;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    #about,
    #tools,
    #experience,
    #work,
    .contact-section {
        padding: 5rem 2rem;
    }

    .work-grid {
        grid-template-columns: 1fr;
    }

    body::before,
    body::after {
        opacity: 0.3;
    }
}

@media (max-width: 600px) {
    .hero-cta {
        flex-direction: column;
    }

    .btn {
        text-align: center;
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
    }
}
