/* ====================================
   Modern idremi Portfolio Styles - UPDATED
   Fixed: Title hover colors & Filter tab visibility
   ==================================== */

/* CSS Variables */
:root {
    /* idremi Brand Colors */
    --primary: #04a5dc;           /* idremi blue */
    --primary-dark: #0388b3;      /* darker blue for hovers */
    --idremi-blue: #04a5dc;
    --idremi-red: #e00a51;
    --idremi-teal: #0cc4b6;
    --idremi-orange: #ff7517;
    --idremi-purple: #b259a2;
    --idremi-yellow: #ffaa2e;
    
    --dark: #1a1a1a;
    --gray-900: #2d2d2d;
    --gray-800: #3d3d3d;
    --gray-700: #5d5d5d;
    --gray-600: #7d7d7d;
    --gray-500: #9d9d9d;
    --gray-400: #bdbdbd;
    --gray-300: #d5d5d5;
    --gray-200: #e8e8e8;
    --gray-100: #f5f5f5;
    --white: #e8eae8;              /* off-white background */
    --pure-white: #ffffff;
    
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Space Grotesk', sans-serif;
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    
    /* Updated sophisticated shadow system */
    --shadow-color: 220 10% 50%;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0px 0.3px 0.3px hsl(var(--shadow-color) / 0.37), 0.2px 0.9px 1px -0.8px hsl(var(--shadow-color) / 0.37), 0.4px 2.3px 2.6px -1.7px hsl(var(--shadow-color) / 0.37), 1px 5.6px 6.4px -2.5px hsl(var(--shadow-color) / 0.37);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.20);
    
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-primary);
    font-size: 18px; /* Increased from 16px to 18px */
    font-weight: 400; /* Regular weight for body copy */
    line-height: 1.6;
    color: var(--gray-900);
    background: var(--white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Headers use Bold weight */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-base);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(232, 234, 232, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-200);
    transition: var(--transition-base);
}

.nav.scrolled {
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo img {
    height: 32px;
    width: auto;
    transition: var(--transition-base);
}

.nav-logo:hover img {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    gap: 48px;
    list-style: none;
}

.nav-link {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 17px;
    color: var(--gray-700);
    position: relative;
    padding: 8px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--idremi-blue);
    transition: width var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
    color: var(--idremi-blue);
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    width: 28px;
    height: 28px;
    padding: 0;
}

.nav-toggle span {
    width: 100%;
    height: 2px;
    background: var(--gray-900);
    transition: var(--transition-base);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

@media (max-width: 768px) {
    .nav-container {
        padding: 16px 20px;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 69px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        gap: 0;
        padding: 20px;
        box-shadow: var(--shadow-md);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: var(--transition-base);
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }
    
    .nav-link {
        padding: 16px;
        border-bottom: 1px solid var(--gray-200);
    }

    .nav-link::after {
        display: none;
    }
}

/* Hero Section */
.hero {
    min-height: calc(80vh);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 120px 40px 140px; /* Increased bottom padding for scroll indicator */
    position: relative;
}

.hero-content {
    text-align: center;
    max-width: 1000px;
    width: 100%;
}

.hero-logo {
    margin-bottom: 60px;
    opacity: 0;
    animation: fadeInUp 1s ease forwards 0.3s;
}

.hero-logo .logo-large {
    width: 230px; /* Increased from 180px to 230px */
    height: auto;
    margin: 0 auto;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 7rem); /* Increased from 5rem to 7rem */
    font-weight: 700;
    line-height: 1.1;
    color: var(--gray-900);
    margin-bottom: 24px;
}

.title-line {
    display: inline-block;
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
    position: relative;
    cursor: pointer;
    transition: color var(--transition-base);
    margin: 0 12px;
}

.title-line:nth-child(1) {
    animation-delay: 0.2s;
}

.title-line:nth-child(2) {
    animation-delay: 0.25s;
}

.title-line:nth-child(3) {
    animation-delay: 0.3s;
}

.title-line:nth-child(4) {
    animation-delay: 0.35s;
}

.title-line:nth-child(5) {
    animation-delay: 0.4s;
}

.title-line:nth-child(6) {
    animation-delay: 0.45s;
}

.title-line:nth-child(7) {
    animation-delay: 0.3s;
}

.title-line:nth-child(8) {
    animation-delay: 0.35s;
}

.title-line:nth-child(9) {
    animation-delay: 0.4s;
}

.title-line:nth-child(10) {
    animation-delay: 0.45s;
}

/* Individual word colors on hover - using nth-of-type to skip <br> tags */
.title-line:nth-of-type(1):hover { color: var(--idremi-blue); }    /* Imagine - Blue */
.title-line:nth-of-type(2):hover { color: var(--idremi-red); }     /* Dream - Red */
.title-line:nth-of-type(3):hover { color: var(--idremi-teal); }    /* Reach - Teal */
.title-line:nth-of-type(4):hover { color: var(--idremi-orange); }  /* Evolve - Orange */
.title-line:nth-of-type(5):hover { color: var(--idremi-purple); }  /* Make - Purple */
.title-line:nth-of-type(6):hover { color: var(--idremi-yellow); }  /* Interact - Yellow */

/* Confetti container */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.confetti-piece {
    position: fixed;
    pointer-events: none;
    transform-origin: center;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: var(--gray-600);
    margin-bottom: 48px;
    opacity: 0;
    animation: fadeInUp 1s ease forwards 0.8s;
}

.cta-button {
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 16px;
    padding: 16px 48px;
    background: var(--primary);
    color: var(--pure-white);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    opacity: 0;
    animation: fadeInUp 1s ease forwards 1s;
}

.cta-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.cta-button:active {
    transform: translateY(0);
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--gray-900);
    font-size: 14px;
    opacity: 0;
    animation: fadeIn 1s ease forwards 1.2s;
    z-index: 1;
    width: auto;
    text-align: center;
}

@media (max-width: 768px) {
    .hero-scroll-indicator {
        bottom: 30px;
    }
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: var(--gray-600);
    animation: scrollLine 2s ease-in-out infinite;
}

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

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

@keyframes scrollLine {
    0%, 100% {
        transform: scaleY(1);
        transform-origin: top;
    }
    50% {
        transform: scaleY(0.5);
        transform-origin: bottom;
    }
}

/* Section Styles */
section {
    padding: 120px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-label {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary);
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 24px;
    line-height: 1.1;
}

.section-description {
    font-size: 1.25rem;
    color: var(--gray-600);
    max-width: 700px;
    margin: 0 auto;
}

/* Work Section */
.work {
    background: var(--white);
}

.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.filter-btn {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 15px;
    padding: 14px 36px;
    border-radius: var(--radius-lg);
    color: var(--pure-white);
    transition: all var(--transition-base);
    border: none;
    cursor: pointer;
    opacity: 1;
}

.filter-btn[data-filter="all"] {
    background: var(--idremi-blue);
}

.filter-btn[data-filter="web"] {
    background: var(--idremi-purple);
}

.filter-btn[data-filter="graphics"] {
    background: var(--idremi-teal);
}

.filter-btn[data-filter="motion"] {
    background: var(--idremi-orange);
}

.filter-btn:hover {
    transform: translateY(-3px);
    opacity: 0.95;
}

.filter-btn.active {
    transform: translateY(-3px);
    font-weight: 700;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

.project-card {
    opacity: 0;
    transform: translateY(30px);
}

.project-card.visible {
    animation: fadeInUp 0.6s ease forwards;
}

.project-card.hidden {
    display: none;
}

.project-card-wide {
    grid-column: span 3;
}

@media (max-width: 1024px) {
    .project-card-wide {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .project-card-wide {
        grid-column: span 1;
    }
}

.project-link {
    display: block;
    height: 100%;
}

.project-image {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--gray-100);
    aspect-ratio: 4 / 3;
    margin-bottom: 20px;
}

.project-card-wide .project-image {
    aspect-ratio: 16 / 9;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(4, 165, 220, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.project-view {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 18px;
    color: var(--pure-white);
    transform: translateY(10px);
    transition: transform var(--transition-base);
}

.project-link:hover .project-image img {
    transform: scale(1.08);
}

.project-link:hover .project-overlay {
    opacity: 1;
}

.project-link:hover .project-view {
    transform: translateY(0);
}

.project-info {
    padding: 0 8px;
}

.project-category {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-500);
    margin-bottom: 8px;
}

.project-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 8px;
    transition: color var(--transition-base);
}

.project-link:hover .project-title {
    color: var(--primary);
}

.project-description {
    color: var(--gray-600);
    font-size: 0.95rem;
}

/* About Section */
.about {
    background: linear-gradient(0deg, #c7c7c7 0%, #e8eae8 100%);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 80px;
    align-items: center;
}

@media (max-width: 1024px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 60px;
    }
}

.about-image {
    position: relative;
}

.profile-img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-xl);
    transition: opacity var(--transition-slow);
    display: block;
}

.profile-img-1 {
    position: relative;
    z-index: 2;
}

.profile-img-2 {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    z-index: 1;
}

.about-image:hover .profile-img-1 {
    opacity: 0;
}

.about-image:hover .profile-img-2 {
    opacity: 1;
}

.about-text {
    max-width: 700px;
}

.about-subtitle {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 16px 0 32px;
}

.about-text p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--gray-700);
    margin-bottom: 24px;
}

.about-quote {
    font-style: italic;
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--primary);
    padding: 32px;
    background: var(--pure-white);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-md);
    margin: 40px 0;
    box-shadow: var(--shadow-sm);
}

.about-skills {
    margin: 48px 0;
}

.about-skills h4 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 20px;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.skill-tag {
    display: inline-block;
    padding: 10px 20px;
    background: var(--pure-white);
    color: var(--gray-700);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.skill-tag:hover {
    background: var(--primary);
    color: var(--pure-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Contact Section */
.contact {
    background: var(--white);
}

.contact-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 80px;
    align-items: start;
}

@media (max-width: 1024px) {
    .contact-content {
        grid-template-columns: 1fr;
        gap: 60px;
    }
}

/* Form Styles */
.contact-form {
    background: var(--gray-100);
    padding: 48px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

@media (max-width: 768px) {
    .contact-form {
        padding: 32px 24px;
    }
}

.form-group {
    margin-bottom: 28px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 8px;
    font-size: 15px;
}

.required {
    color: var(--primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    font-family: var(--font-primary);
    font-size: 15px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    background: var(--pure-white);
    color: var(--gray-900);
    transition: all var(--transition-base);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(4, 165, 220, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
}

.form-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

@media (max-width: 480px) {
    .form-actions {
        flex-direction: column;
    }
}

.reset-button {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 16px;
    padding: 16px 48px;
    background: var(--gray-300);
    color: var(--gray-700);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
}

.reset-button:hover {
    background: var(--gray-400);
}

.form-note {
    font-size: 14px;
    color: var(--gray-600);
}

/* Contact Info */
.contact-info-wrapper {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact-info-card {
    background: var(--gray-100);
    padding: 32px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.contact-info-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.contact-info-icon {
    width: 56px;
    height: 56px;
    background: var(--primary);
    color: var(--pure-white);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.contact-info-card h4 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 12px;
}

.contact-info-card a {
    font-size: 1.125rem;
    color: var(--primary);
}

.contact-info-card a:hover {
    color: var(--primary-dark);
}

/* Footer */
.footer {
    background: var(--gray-900) !important;
    color: var(--gray-400);
    padding: 60px 0;
    position: relative;
}

.footer-content {
    text-align: center;
}

.footer-logo {
    margin-bottom: 24px;
}

.footer-logo img {
    width: calc(8vh);
    height: auto;
    margin: 0 auto;
    /* opacity: 0.8; */
}

.footer p {
    margin-bottom: 8px;
}

.footer-version a {
    color: var(--gray-500);
    font-size: 14px;
}

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

.back-to-top {
    position: absolute;
    top: -24px;
    right: 40px;
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: var(--pure-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

@media (max-width: 768px) {
    section {
        padding: 80px 0;
    }
    
    .section-header {
        margin-bottom: 60px;
    }
}

/* Coalesce Canvas Background */
#coalesce-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

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