/* ========================================
   George Alexander Portfolio - Main Styles
   ======================================== */

/* Reset & Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #050508;
    --bg-secondary: #0a0a10;
    --bg-card: #111118;
    --text-primary: #ffffff;
    --text-secondary: #9494a8;
    --accent-blue: #4d9de0;
    --accent-blue-bright: #3b82f6;
    --accent-blue-dark: #2563eb;
    --gradient: linear-gradient(135deg, #3b82f6 0%, #4d9de0 100%);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ========================================
   Navigation
   ======================================== */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    z-index: 1000;
    background: rgba(5, 5, 8, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}


.logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

/* Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    cursor: pointer;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 0.75rem;
    background: rgba(17, 17, 24, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0.5rem 0;
    min-width: 180px;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    transform: translateX(-50%) translateY(5px);
    z-index: 1001;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu li {
    margin: 0;
}

.nav-dropdown-menu a {
    display: block;
    padding: 0.6rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease, background 0.2s ease;
    white-space: nowrap;
}

.nav-dropdown-menu a:hover {
    color: var(--text-primary);
    background: rgba(59, 130, 246, 0.08);
}

.nav-right {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-cta {
    padding: 0.6rem 1.25rem;
    background: transparent;
    border: 1px solid var(--accent-blue);
    border-radius: 6px;
    color: var(--accent-blue);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease;
    width: fit-content;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    text-decoration: none;
}

.nav-cta:hover {
    background: var(--accent-blue);
    color: white;
}

.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
}

.nav-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 5%;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(59, 130, 246, 0.07) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(77, 157, 224, 0.07) 0%, transparent 50%);
}

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

/* Hero Title Animation Styles */
.hero-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    min-height: 1.3em;
    position: relative;
}

/* Gradient text for animated spans */
.hero-title #intro,
.hero-title #finalName .first-name,
.hero-title #finalName .last-name {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Greeting child spans get gradient individually */
.hero-title .hi-text,
.hero-title .george {
    display: inline-block;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-title .hi-text {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.hero-title .george {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Keep emoji yellow */
.hero-title .emoji {
    -webkit-text-fill-color: initial;
    background: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: inline-block;
    transform-origin: 70% 80%;
}

.hero-title .emoji.waving {
    animation: wave 1.8s ease-in-out;
}

@keyframes wave {
    0%   { transform: rotate(0deg); }
    15%  { transform: rotate(14deg); }
    30%  { transform: rotate(-8deg); }
    45%  { transform: rotate(14deg); }
    60%  { transform: rotate(-4deg); }
    75%  { transform: rotate(10deg); }
    100% { transform: rotate(0deg); }
}

/* Greeting and Intro - absolutely positioned, start hidden */
.hero-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    min-height: 1.3em;
    position: relative;
    width: 100%; /* Add this */
    display: flex; /* Add this */
    justify-content: center; /* Add this */
}

/* Greeting and Intro - absolutely positioned, start hidden */
.hero-title #greeting,
.hero-title #intro {
    display: block;
    position: absolute;
    left: 50%;
    top: 0;
    width: max-content; /* Change from 100% to max-content */
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    text-align: center;
    white-space: nowrap;
}

/* Intro text parts for squeeze animation */
.hero-title #intro .im-text {
    display: inline-block;
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    text-align: center;
    white-space: nowrap; /* Keep this */
}

/* Final Name - hidden by default, JS controls visibility */
.hero-title #finalName {
    display: none;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    white-space: nowrap;
    width: max-content; /* Add this */
}

/* First and Last name parts */
.hero-title #finalName .first-name,
.hero-title #finalName .last-name {
    display: inline-block;
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.hero-title #finalName .first-name {
    transform: translateY(20px);
}

.hero-title #finalName .last-name {
    transform: translateY(20px);
}

.hero-title #finalName .first-name.visible,
.hero-title #finalName .last-name.visible {
    opacity: 1;
    transform: translateX(0);
   
}

/* Hero Tagline */
.hero-tagline {
    font-size: clamp(1.05rem, 2.2vw, 1.3rem);
    color: var(--text-secondary);
    max-width: 850px;
    margin: 0 auto 2.5rem;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-tagline span {
    color: var(--text-primary);
    font-weight: 500;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease 0.4s both;
}

/* ========================================
   Buttons
   ======================================== */
.btn-primary {
    padding: 1rem 2rem;
    background: var(--gradient);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.15);
}

.btn-secondary {
    padding: 1rem 2rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.08);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Credibility Bar
   ======================================== */
.credibility {
    padding: 4rem 5%;
    background: var(--bg-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.credibility-text {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
}

.credibility-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    flex-wrap: wrap;
    opacity: 0.6;
}

.credibility-logos span {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* ========================================
   Services/Expertise Section
   ======================================== */
.services {
    padding: 8rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

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

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.services-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

/* Diamond layout using flexbox */
.service-card:nth-child(1) {
    flex-basis: 350px;
    margin: 0 auto;
}

.service-card:nth-child(2),
.service-card:nth-child(3) {
    flex-basis: 350px;
    margin: 0;
}

.service-card:nth-child(4) {
    flex-basis: 350px;
    margin: 0 auto;
}

/* Responsive: Stack on smaller screens */
@media (max-width: 768px) {
    .services-grid {
        gap: 2rem;
    }
    
    .service-card:nth-child(1),
    .service-card:nth-child(2),
    .service-card:nth-child(3),
    .service-card:nth-child(4) {
        flex-basis: 100%;
        margin: 0;
    }
}

.service-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    cursor: pointer;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    border-radius: 10px 10px 0 0;
}

.service-card.blue::before {
    background: linear-gradient(90deg, #3b82f6, #4d9de0);
}

.service-card.purple::before {
    background: linear-gradient(90deg, #a855f7, #7c3aed);
}

.service-card.green::before {
    background: linear-gradient(90deg, #22c55e, #16a34a);
}

.service-card.orange::before {
    background: linear-gradient(90deg, #f97316, #ea580c);
}

.service-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.service-card.blue:hover {
    border-color: rgba(59, 130, 246, 0.25);
    box-shadow: 0 16px 48px rgba(59, 130, 246, 0.08);
}

.service-card.purple:hover {
    border-color: rgba(168, 85, 247, 0.25);
    box-shadow: 0 16px 48px rgba(168, 85, 247, 0.08);
}

.service-card.green:hover {
    border-color: rgba(34, 197, 94, 0.25);
    box-shadow: 0 16px 48px rgba(34, 197, 94, 0.08);
}

.service-card.orange:hover {
    border-color: rgba(249, 115, 22, 0.25);
    box-shadow: 0 16px 48px rgba(249, 115, 22, 0.08);
}

.service-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.05);
}

.service-card.blue .service-icon {
    background: linear-gradient(135deg, #3b82f6, #4d9de0);
}

.service-card.purple .service-icon {
    background: linear-gradient(135deg, #a855f7, #7c3aed);
}

.service-card.green .service-icon {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.service-card.orange .service-icon {
    background: linear-gradient(135deg, #f97316, #ea580c);
}

.service-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.service-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ========================================
   About Section
   ======================================== */
.about {
    padding: 8rem 5%;
    background: var(--bg-secondary);
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-content h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.about-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.about-stats {
    display: flex;
    gap: 3rem;
    margin-top: 2rem;
}

.stat h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ========================================
   Experience Bar
   ======================================== */
.experience-bar {
    padding: 5rem 5%;
    background: #ffffff;
    position: relative;
}

.experience-container {
    max-width: 1200px;
    margin: 0 auto;
}

.experience-text {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 3rem;
}

.experience-logos {
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* left takes remaining space, middle fixed, right takes remaining */
  align-items: center;
  column-gap: 5rem;
  width: 100%;
}

.experience-item:nth-child(1) { justify-self: end; }
.experience-item:nth-child(2) { justify-self: center; } /* Orrick */
.experience-item:nth-child(3) { justify-self: start; }

.experience-item {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.experience-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.experience-item:nth-child(1) { transition-delay: 0.1s; }
.experience-item:nth-child(2) { transition-delay: 0.3s; }
.experience-item:nth-child(3) { transition-delay: 0.5s; }

.experience-logo {
    height: 120px;
    width: auto;
    object-fit: contain;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.experience-logo:hover {
    opacity: 1;
}

.experience-logo.sion-hill {
    height: 180px;
    transform: translateX(50px) translateY(10px);
    

}

.experience-logo.orrick {
    height: 100px;
}

.experience-item span {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
}

/* ========================================
   Testimonials
   ======================================== */
.testimonials {
    padding: 8rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.testimonial-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    border-color: rgba(59, 130, 246, 0.15);
}

.testimonial-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    font-style: italic;
    margin-bottom: 0;
    line-height: 1.8;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 50px;
    height: 50px;
    background: var(--gradient);
    border-radius: 50%;
}

.author-info h4 {
    font-weight: 600;
    font-size: 1rem;
}

.author-info span {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* ========================================
   CTA Section
   ======================================== */
.cta {
    padding: 8rem 5%;
    background: var(--bg-secondary);
    text-align: center;
}

.cta-container {
    max-width: 700px;
    margin: 0 auto;
}

.cta h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* ========================================
   Footer
   ======================================== */
footer {
    padding: 4rem 5% 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
}

.footer-brand .logo {
    margin-bottom: 1rem;
    display: inline-block;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-links h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    max-width: 1200px;
    margin: 3rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    /* Nav — switch to flexbox so logo stays left, nav-right stays right */
    nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .nav-hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(5, 5, 8, 0.98);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        padding: 0.5rem 5% 1rem;
        gap: 0;
        list-style: none;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links li {
        padding: 0.75rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

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

    /* Dropdown on mobile — show inline */
    .nav-dropdown-menu {
        position: static;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        background: transparent;
        border: none;
        border-radius: 0;
        padding: 0;
        margin: 0;
        min-width: unset;
        box-shadow: none;
    }

    .nav-dropdown-menu a {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
    }

    /* About */
    .about-container {
        grid-template-columns: 1fr;
    }

    .about-image {
        width: 220px;
        height: 220px;
    }

    .about-stats {
        flex-wrap: wrap;
        gap: 1.5rem;
    }

    /* Experience logos */
    .experience-logos {
        grid-template-columns: 1fr;
        row-gap: 2.5rem;
        column-gap: 0;
    }

    .experience-item:nth-child(1),
    .experience-item:nth-child(2),
    .experience-item:nth-child(3) {
        justify-self: center;
    }

    .experience-logo.sion-hill {
        transform: none;
        height: 130px;
    }

    /* Credibility */
    .credibility-logos {
        gap: 2rem;
    }

    /* Footer */
    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Sections padding */
    .services,
    .about,
    .testimonials,
    .cta {
        padding: 5rem 5%;
    }
}
