/**
 * cuub.com.au - Modern Technical Design
 * A developer-focused aesthetic
 */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Sora:wght@300;400;500;600;700&display=swap');

:root {
    /* Dark technical palette */
    --bg-dark: #0a0a0f;
    --bg-card: #12121a;
    --bg-elevated: #1a1a24;
    --bg-hover: #22222e;
    
    /* Accent colors - electric cyan/blue */
    --accent-primary: #00d4ff;
    --accent-secondary: #7b61ff;
    --accent-gradient: linear-gradient(135deg, #00d4ff 0%, #7b61ff 100%);
    
    /* Text colors */
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #6a6a7a;
    
    /* Borders */
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-accent: rgba(0, 212, 255, 0.3);
    
    /* Typography */
    --font-display: 'Sora', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    /* Shadows */
    --glow-primary: 0 0 40px rgba(0, 212, 255, 0.15);
    --glow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
}

/* Base Styles */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-secondary);
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.7;
    overflow-x: hidden;
}

/* Background pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(0, 212, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(123, 97, 255, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Grid pattern overlay */
.grid-pattern {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: -1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 6vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 2.75rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

.display-title {
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.mono {
    font-family: var(--font-mono);
}

/* Links */
a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

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

/* Gradient text */
.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Code/terminal styling for labels */
.code-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-primary);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.code-label::before {
    content: '//';
    opacity: 0.5;
}

/* Navigation */
.navbar {
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 1rem 0;
}

.navbar-brand img {
    height: 48px;
    width: auto;
    filter: brightness(1.1);
}

.navbar-nav .nav-link {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0.75rem 1.25rem;
    position: relative;
    letter-spacing: 0.02em;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background: var(--accent-gradient);
    transition: transform 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--text-primary);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
}

.navbar-toggler {
    border: 1px solid var(--accent-primary);
    padding: 0.5rem 0.75rem;
    background: rgba(0, 212, 255, 0.1);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.25);
    outline: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%2300d4ff' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Hero Section */
.hero-section {
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 60%;
    height: 100%;
    background: radial-gradient(ellipse, rgba(0, 212, 255, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    right: -20%;
    width: 50%;
    height: 80%;
    background: radial-gradient(ellipse, rgba(123, 97, 255, 0.06) 0%, transparent 60%);
    pointer-events: none;
}

.hero-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-primary);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.hero-eyebrow::before {
    content: '';
    width: 30px;
    height: 1px;
    background: var(--accent-primary);
}

.hero-title {
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 2.5rem;
}

/* Buttons */
.btn-primary {
    background: var(--accent-gradient);
    border: none;
    color: var(--bg-dark);
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 1rem 2rem;
    letter-spacing: 0.02em;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-primary);
    color: var(--bg-dark);
}

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

.btn-outline-light {
    border: 1px solid var(--border-accent);
    color: var(--accent-primary);
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 1rem 2rem;
    background: transparent;
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--accent-primary);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.btn-outline-primary {
    border: 1px solid var(--border-accent);
    color: var(--accent-primary);
    background: transparent;
}

.btn-outline-primary:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.btn-outline-secondary {
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    background: transparent;
}

.btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-muted);
    color: var(--text-primary);
}

/* Utility Badges */
.bg-accent-subtle {
    background: rgba(0, 212, 255, 0.1) !important;
}

.text-accent {
    color: var(--accent-primary) !important;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    transition: all 0.4s ease;
}

.card:hover {
    border-color: var(--border-accent);
    box-shadow: var(--glow-card);
    transform: translateY(-4px);
}

.card-body {
    padding: 2rem;
}

/* Service/Feature Cards */
.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 2.5rem;
    height: 100%;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.feature-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-8px);
    box-shadow: var(--glow-card);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: var(--accent-primary);
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.feature-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Project Card (Portfolio) */
.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: row;
    min-height: 220px;
}

.project-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-8px);
    box-shadow: var(--glow-card);
}

.project-image {
    position: relative;
    width: 210px;
    min-width: 210px;
    overflow: hidden;
    background: var(--bg-elevated);
    order: 1;
    border-radius: 8px;
    margin: 1rem;
    margin-right: 0;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    order: 2;
}

.project-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.project-links {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Responsive: Stack on smaller screens */
@media (max-width: 576px) {
    .project-card {
        flex-direction: column;
        min-height: auto;
    }
    
    .project-image {
        width: 100%;
        min-width: 100%;
        height: 180px;
        order: 1;
        border-radius: 15px 15px 0 0;
    }
    
    .project-content {
        order: 2;
    }
}

/* Section Styling */
.section-padding {
    padding: 5rem 0;
}

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

.section-title {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

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

.section-dark {
    background: var(--bg-card);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

/* Stats Row */
.stat-item {
    text-align: center;
    padding: 2rem;
}

.stat-number {
    font-family: var(--font-mono);
    font-size: 3rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* CTA Section */
.cta-section {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 24px;
    padding: 4rem;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 50%;
    height: 150%;
    background: radial-gradient(ellipse, rgba(0, 212, 255, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

/* Portfolio */
.portfolio-item {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-subtle);
    transition: all 0.3s ease;
}

.portfolio-item:hover {
    padding-left: 1rem;
}

.portfolio-item:last-child {
    border-bottom: none;
}

.portfolio-item a {
    color: var(--text-primary);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.portfolio-item a:hover {
    color: var(--accent-primary);
}

.portfolio-item a::after {
    content: '→';
    font-family: var(--font-mono);
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.portfolio-item a:hover::after {
    opacity: 1;
    transform: translateX(0);
}

/* Blog */
.blog-post {
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-subtle);
}

.blog-post:last-child {
    border-bottom: none;
}

.blog-post-title {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.blog-post-title a {
    color: var(--text-primary);
}

.blog-post-title a:hover {
    color: var(--accent-primary);
}

.blog-post-meta {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Forms */
.form-control,
.form-select {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 1rem 1.25rem;
    border-radius: 8px;
    font-family: var(--font-display);
}

.form-control:focus,
.form-select:focus {
    background: var(--bg-elevated);
    border-color: var(--accent-primary);
    color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

/* Footer */
.site-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-subtle);
    padding: 4rem 0 2rem;
}

.site-footer a {
    color: var(--text-secondary);
}

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

.footer-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
}

/* Alerts */
.alert-success {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
}

.alert-danger {
    background: rgba(255, 100, 100, 0.1);
    border: 1px solid #ff6464;
    color: #ff6464;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -50px;
    left: 0;
    background: var(--accent-primary);
    color: var(--bg-dark);
    padding: 12px 20px;
    text-decoration: none;
    z-index: 9999;
    font-weight: 600;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
}

/* 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);
}

/* Staggered animations */
.fade-in:nth-child(1) { transition-delay: 0s; }
.fade-in:nth-child(2) { transition-delay: 0.1s; }
.fade-in:nth-child(3) { transition-delay: 0.2s; }
.fade-in:nth-child(4) { transition-delay: 0.3s; }
.fade-in:nth-child(5) { transition-delay: 0.4s; }
.fade-in:nth-child(6) { transition-delay: 0.5s; }

/* Breadcrumb */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 1rem;
}

.breadcrumb-item a {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.breadcrumb-item.active {
    color: var(--text-secondary);
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--text-muted);
    content: '/';
}

/* Page Headers */
.page-header {
    padding: 6rem 0 4rem;
    position: relative;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at top, rgba(0, 212, 255, 0.05) 0%, transparent 60%);
    pointer-events: none;
}

/* Responsive */
@media (max-width: 992px) {
    .hero-section {
        min-height: auto;
        padding: 4rem 0;
    }
    
    .section-padding {
        padding: 4rem 0;
    }
    
    .cta-section {
        padding: 2.5rem;
    }
}

@media (max-width: 768px) {
    .display-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .navbar-collapse {
        background: var(--bg-card);
        padding: 1rem;
        margin-top: 1rem;
        border-radius: 12px;
        border: 1px solid var(--border-subtle);
    }
    
    .navbar-nav .nav-link::after {
        display: none;
    }
}
