/* Custom styles for dark theme */
:root {
    --bs-dark: #0a0a0a;
    --bs-black: #000000;
    --bs-yellow: #ffd500;
    --bs-gray-800: #1a1a1a;
    --bs-gray-700: #2a2a2a;
    --bs-gray-600: #3a3a3a;
}

body {
    background: linear-gradient(
        to bottom,
        #000000 0%,
        #1a1a1a 25%,
        var(--bs-dark) 100%
    ) !important;
    color: #ffffff !important;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Ancizar Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 1.125rem; /* 18px base instead of 16px */
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Homepage specific - make hero fill entire main */
main:has(.hero-section) {
    padding: 0;
}

main .hero-section {
    flex: 1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: #ffffff;
    font-family: 'Ancizar Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 700;
}

/* Welcome heading gradient */
.hero-content h1 {
    background: linear-gradient(
        135deg,
        #ffffff 0%,
        #e0e5ff 40%,
        #c5d0ff 60%,
        #ffffff 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Increase heading sizes */
.display-1 { font-size: 6rem !important; }
.display-2 { font-size: 5.5rem !important; }
.display-3 { font-size: 6.5rem !important; }
.display-4 { font-size: 4rem !important; }
h1, .h1 { font-size: 2.75rem !important; }
h2, .h2 { font-size: 2.25rem !important; }
h3, .h3 { font-size: 1.875rem !important; }
h4, .h4 { font-size: 1.5rem !important; }
h5, .h5 { font-size: 1.25rem !important; }
h6, .h6 { font-size: 1.125rem !important; }

/* Lead paragraph */
.lead {
    font-size: 1.375rem !important;
}

.text-warning {
    color: var(--bs-yellow) !important;
}

/* Navigation */
.navbar {
    padding: 1rem 0;
    position: relative;
    z-index: 100;
}

.navbar-brand {
    font-size: 1.75rem;
    transition: all 0.4s ease-out;
    font-family: 'Ancizar Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 700;
    position: relative;
    background: linear-gradient(
        90deg,
        var(--bs-yellow) 0%,
        #fff3a0 50%,
        var(--bs-yellow) 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: var(--bs-yellow);
    letter-spacing: 0;
}

.navbar-brand:hover {
    -webkit-text-fill-color: transparent;
    animation: subtleGradientShift 0.8s ease-out forwards;
    text-decoration: none !important;
    transform: scale(1.02);
    letter-spacing: 0.5px;
    text-shadow: 0 0 20px rgba(255, 213, 0, 0.3);
}

@keyframes subtleGradientShift {
    0% {
        background-position: 0% 0;
    }
    100% {
        background-position: 100% 0;
    }
}

.nav-link {
    padding: 0.5rem 1rem !important;
    transition: color 0.3s ease;
    position: relative;
    font-size: 1.125rem;
}

.nav-link:hover {
    color: var(--bs-yellow) !important;
}

.nav-link.active {
    color: #ffffff !important;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background-color: var(--bs-yellow);
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: flex-start;
    padding-top: 120px;
    background: #000000 url('/images/headshots/steve_hs_4.png') no-repeat right top;
    background-size: auto 90%;
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
}

/* Add bottom padding only when content overflows on small screens */
@media (max-width: 768px) and (max-height: 700px) {
    .hero-section {
        padding-bottom: 160px;
        min-height: calc(100vh + 160px);
    }
}

/* For very short screens (like landscape phones) */
@media (max-width: 768px) and (max-height: 500px) {
    .hero-section {
        padding-bottom: 200px;
        min-height: calc(100vh + 200px);
    }
}

/* Grid Overlay */
.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.grid-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.2) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.2) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(
        ellipse 900px 600px at 10% 10%,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 0.8) 25%,
        rgba(0, 0, 0, 0.5) 45%,
        transparent 70%
    );
    -webkit-mask-image: radial-gradient(
        ellipse 900px 600px at 10% 10%,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 0.8) 25%,
        rgba(0, 0, 0, 0.5) 45%,
        transparent 70%
    );
}

.hero-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.hero-image:hover {
    filter: grayscale(50%);
}

/* Animated background lines */
.animated-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.line {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 213, 0, 0.3), transparent);
    animation: moveLine 20s linear infinite;
}

.line:nth-child(1) {
    top: 10%;
    width: 30%;
    animation-duration: 25s;
    animation-delay: 0s;
}

.line:nth-child(2) {
    top: 25%;
    width: 50%;
    animation-duration: 30s;
    animation-delay: 2s;
}

.line:nth-child(3) {
    top: 40%;
    width: 20%;
    animation-duration: 20s;
    animation-delay: 1s;
}

.line:nth-child(4) {
    top: 60%;
    width: 40%;
    animation-duration: 35s;
    animation-delay: 3s;
}

.line:nth-child(5) {
    top: 75%;
    width: 60%;
    animation-duration: 28s;
    animation-delay: 4s;
}

.line:nth-child(6) {
    top: 90%;
    width: 35%;
    animation-duration: 22s;
    animation-delay: 1.5s;
}

@keyframes moveLine {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(calc(100vw + 100%));
    }
}

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

/* Buttons */
.btn {
    font-size: 1.125rem;
    padding: 0.5rem 1.25rem;
}

.btn-lg {
    font-size: 1.25rem;
    padding: 0.75rem 1.5rem;
}

.btn-warning {
    background-color: var(--bs-yellow);
    border-color: var(--bs-yellow);
    color: #000000;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-warning:hover {
    background-color: #e6c200;
    border-color: #e6c200;
}

.btn-outline-warning {
    color: var(--bs-yellow);
    border-color: var(--bs-yellow);
    background-color: transparent;
    transition: all 0.3s ease-in-out;
}

.btn-outline-warning:hover {
    background-color: var(--bs-yellow);
    border-color: var(--bs-yellow);
    color: #000000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 213, 0, 0.3);
}

/* Cards */
.card {
    background-color: var(--bs-gray-800);
    border: 1px solid var(--bs-gray-700);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 213, 0, 0.1);
}

.project-card .card-img-top {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.project-card a:hover .card-img-top {
    transform: scale(1.05);
    opacity: 0.9;
}

.project-card a {
    overflow: hidden;
    display: block;
}

.card-title {
    color: #ffffff;
}

.card-text {
    color: #cccccc;
}

/* Forms */
.form-control,
.form-select {
    background-color: var(--bs-gray-800);
    border: 1px solid var(--bs-gray-600);
    color: #ffffff;
}

.form-control:focus,
.form-select:focus {
    background-color: var(--bs-gray-700);
    border-color: var(--bs-yellow);
    color: #ffffff;
    box-shadow: 0 0 0 0.25rem rgba(255, 213, 0, 0.25);
}

.form-label {
    color: #ffffff;
}

.form-control::placeholder,
.form-select::placeholder {
    color: #777777;
    opacity: 1;
}

.form-control::-webkit-input-placeholder {
    color: #777777;
}

.form-control::-moz-placeholder {
    color: #777777;
    opacity: 1;
}

.form-control:-ms-input-placeholder {
    color: #777777;
}

/* Project filters */
.filter-pills .nav-link {
    color: #cccccc;
    background-color: var(--bs-gray-800);
    border: 1px solid var(--bs-gray-600);
    margin: 0 0.25rem;
    transition: all 0.3s ease;
}

.filter-pills .nav-link:hover {
    color: var(--bs-yellow);
    border-color: var(--bs-yellow);
}

.filter-pills .nav-link.active {
    background-color: var(--bs-yellow);
    color: #000000;
    border-color: var(--bs-yellow);
}

/* Badge */
.badge {
    font-weight: 500;
}

.bg-warning {
    background-color: var(--bs-yellow) !important;
    color: #000000;
}

/* Project Card Animations */
.project-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.project-card.show {
    opacity: 1;
    transform: translateY(0);
}

.project-card.hide {
    opacity: 0;
    transform: scale(0.95) translateY(-10px);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

/* Links */
a {
    color: var(--bs-yellow);
    text-decoration: none;
    transition: color 0.3s ease;
    cursor: pointer;
}

a:hover {
    color: #e6c200;
    text-decoration: underline;
}

/* Project and Publication Link Cursors */
.project-card a,
.publication-image-link,
.publication-item h3 a {
    cursor: pointer;
}

.project-card:hover {
    cursor: pointer;
}

/* Social Connect Links */
.social-connect {
    position: relative;
}

.social-connect a {
    transition: all 0.3s ease;
    padding: 0.5rem;
    margin: -0.25rem;
    border-radius: 0.5rem;
    position: relative;
}

.social-connect a:hover {
    background-color: rgba(255, 213, 0, 0.1);
    text-decoration: none;
}

.social-connect a:hover i {
    transform: scale(1.1);
}


.social-connect i {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
    font-size: 1.25rem;
}

.social-connect small {
    color: #999999 !important;
}

/* Scrolling Text Section */
.scroll-text-section {
    padding: 150px 0;
    position: relative;
    overflow: hidden;
    background: #0a0a0a;
}

.scroll-text-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse at center,
        rgba(255, 213, 0, 0.15) 0%,
        transparent 50%
    );
    pointer-events: none;
}

.scroll-container {
    --bg: #0a0a0a;
    --color-active: var(--bs-yellow);
    --color-inactive: #4a4a4a;
    --font-size: clamp(2.5rem, 7vw, 4.5rem);
    --font-weight: 700;
    --scroll-item-height: 1.5em;
    --mask-height: calc(var(--scroll-item-height) * 3);
    
    position: relative;
    display: inline-flex;
    align-items: baseline;
    gap: 0.4em;
    font-size: var(--font-size);
    font-weight: var(--font-weight);
    font-family: 'Ancizar Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    text-align: left;
    margin: 0 auto;
    display: flex;
    justify-content: center;
}

.scroll-text-static {
    color: var(--color-inactive);
    font-weight: 400;
    letter-spacing: -0.02em;
}

.scroller {
    height: var(--mask-height);
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        transparent 15%,
        black 35%,
        black 65%,
        transparent 85%,
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        transparent 15%,
        black 35%,
        black 65%,
        transparent 85%,
        transparent 100%
    );
}

.scroller__list {
    margin: 0;
    padding: 0;
    list-style: none;
    animation: scroll 16s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    position: relative;
    top: var(--scroll-item-height);
}

.scroller__item {
    height: var(--scroll-item-height);
    line-height: var(--scroll-item-height);
    white-space: nowrap;
    color: var(--color-inactive);
    transition: color 0.3s ease;
    letter-spacing: -0.02em;
    padding: 0 0.1em;
}

.scroller__item:nth-child(1),
.scroller__item:nth-child(9) {
    color: var(--color-active);
}

.scroller__item--final {
    position: relative;
}

.scroller__item--final a {
    color: inherit;
    text-decoration: none;
    position: relative;
    display: inline-block;
    background: linear-gradient(
        90deg,
        var(--bs-yellow) 0%,
        #ff6b6b 50%,
        var(--bs-yellow) 100%
    );
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

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

.scroller__item--final a::after {
    content: '→';
    position: absolute;
    right: -1.5em;
    opacity: 0;
    transition: all 0.3s ease;
    -webkit-text-fill-color: var(--bs-yellow);
}

.scroller__item--final a:hover::after {
    opacity: 1;
    right: -1.2em;
}

@keyframes scroll {
    0% {
        transform: translateY(calc(var(--scroll-item-height) * -1));
    }
    11.11% {
        transform: translateY(calc(var(--scroll-item-height) * -2));
    }
    22.22% {
        transform: translateY(calc(var(--scroll-item-height) * -3));
    }
    33.33% {
        transform: translateY(calc(var(--scroll-item-height) * -4));
    }
    44.44% {
        transform: translateY(calc(var(--scroll-item-height) * -5));
    }
    55.55% {
        transform: translateY(calc(var(--scroll-item-height) * -6));
    }
    66.66% {
        transform: translateY(calc(var(--scroll-item-height) * -7));
    }
    77.77% {
        transform: translateY(calc(var(--scroll-item-height) * -8));
    }
    88.88%, 100% {
        transform: translateY(calc(var(--scroll-item-height) * -9));
    }
}

/* Footer */
footer {
    margin-top: 0 !important;
}

/* Homepage specific - position footer at bottom */
body:has(.hero-section) footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
}

footer .text-muted {
    color: #999999 !important;
}

/* Social Media Links */
.social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.social-link {
    color: #999999;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: transparent;
}

.social-link:hover {
    color: var(--bs-yellow);
    transform: translateY(-3px);
}

.social-link:hover .fa-linkedin {
    color: #0077B5;
}

.social-link:hover .fa-github {
    color: #ffffff;
}

.social-link:hover .fa-facebook {
    color: #1877F2;
}

/* Project Detail Page */
.project-detail-section {
    min-height: calc(100vh - 200px);
}

.project-hero-image {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: cover;
    border: 1px solid var(--bs-gray-700);
}

.project-sidebar {
    top: 2rem;
}

.project-sidebar .card {
    background-color: var(--bs-gray-800);
    border-color: var(--bs-gray-700);
}

.project-sidebar .card-body {
    padding: 1.5rem;
}

.project-details p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #e0e0e0;
}

.feature-list {
    list-style: none;
    padding-left: 0;
}

.feature-list li {
    position: relative;
    padding-left: 2rem;
    font-size: 1.125rem;
    line-height: 1.8;
}

.feature-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--bs-yellow);
    font-weight: bold;
}

/* Breadcrumb styling */
.breadcrumb {
    font-size: 0.9rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: #666;
}

.breadcrumb-item a {
    color: #999;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: var(--bs-yellow);
}

/* Publications Page */
.publication-item {
    transition: transform 0.3s ease;
}

.publication-item:hover {
    transform: translateX(5px);
}

.publication-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.publication-placeholder {
    width: 100%;
    transition: transform 0.3s ease;
}

.publication-image-link:hover .publication-image,
.publication-image-link:hover .publication-placeholder {
    transform: scale(1.05);
    opacity: 0.9;
}

.publication-image-link {
    overflow: hidden;
    border-radius: 0.375rem;
}

.hover-warning:hover {
    color: var(--bs-yellow) !important;
}

/* Mobile Navigation Styling */
@media (max-width: 991px) {
    .navbar-collapse {
        background-color: rgba(0, 0, 0, 0.95);
        margin-top: 1rem;
        padding: 1rem 0;
        border-radius: 0.5rem;
        backdrop-filter: blur(10px);
    }
    
    .navbar-nav {
        align-items: center;
    }
    
    .navbar-nav .nav-item {
        text-align: center;
        width: 100%;
        position: relative;
    }
    
    .navbar-nav .nav-link {
        padding: 1rem 2rem !important;
        font-size: 1.25rem;
        transition: all 0.3s ease;
    }
    
    .navbar-nav .nav-link:hover {
        background-color: rgba(255, 213, 0, 0.1);
        transform: scale(1.05);
    }
    
    /* Gradient separator between menu items */
    .navbar-nav .nav-item:not(:last-child)::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 20%;
        right: 20%;
        height: 1px;
        background: linear-gradient(
            to right,
            transparent,
            rgba(255, 213, 0, 0.2) 20%,
            rgba(255, 213, 0, 0.4) 50%,
            rgba(255, 213, 0, 0.2) 80%,
            transparent
        );
    }
    
    /* Remove active underline on mobile */
    .navbar-nav .nav-link.active::after {
        display: none;
    }
    
    /* Add active state styling */
    .navbar-nav .nav-link.active {
        background-color: rgba(255, 213, 0, 0.1);
        border-radius: 0.5rem;
    }
}

/* Responsive */
@media (max-width: 768px) {
    /* Add more padding on mobile for internal pages */
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
    
    /* Add spacing between form and sidebar on contact page */
    .col-lg-8 {
        margin-bottom: 3rem;
    }
    
    .hero-section {
        text-align: center;
        background-blend-mode: normal, multiply;
        padding-top: 60px;
        background-image: url('/images/headshots/steve_hs_4.png');
        background-position: center top;
    }
    
    /* Reduce headshot opacity on mobile */
    .hero-section::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.7);
        pointer-events: none;
        z-index: 0;
    }
    
    .hero-section .row {
        flex-direction: column-reverse;
    }
    
    .hero-image {
        margin-bottom: 2rem;
    }
    
    /* Reduce Welcome text size and center it */
    .hero-content {
        text-align: center;
    }
    
    .hero-content .display-3 {
        font-size: 5rem !important;
    }
    
    /* Remove yellow underline from active menu items on mobile */
    .nav-link.active::after {
        display: none;
    }
    
    /* Center buttons on mobile */
    .hero-content .d-flex {
        justify-content: center !important;
    }
    
    .hero-content .btn {
        width: 100%;
        max-width: 250px;
        margin: 0.2rem;
    }
    
    .scroll-container {
        --font-size: clamp(2rem, 10vw, 3rem);
    }
    
    .scroll-text-section {
        padding: 80px 0;
    }
}