/* ========================================
   CSS VARIABLES
   ======================================== */
:root {
    --color-bg: #fafbfc;
    --color-surface: #fff;
    --color-primary: #ce003d;
    --color-primary-hover: linear-gradient(112deg, #ce003d 0%, #edb553 100%);
    --color-text: #132440;
    --color-text-secondary: #66707c;
    --color-accent: #50b8c6;
    --color-footer-bg: #3e0012;
    --color-footer-text: #fafbfc;
    --radius: 10px;
    --shadow: 0 4px 20px rgba(33, 128, 141, 0.05);
    --space: 3rem;
    --font-base: "Inter", "Geist", Arial, sans-serif;
}

/* ========================================
   BASE STYLES
   ======================================== */
html {
    font-family: var(--font-base);
    color: var(--color-text);
    background: var(--color-bg);
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background: var(--color-bg);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0.5rem;
    margin-bottom: 0.7rem;
    font-weight: 600;
}

p {
    color: var(--color-text-secondary);
    margin-bottom: 1rem;
}

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

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

/* ========================================
   LAYOUT
   ======================================== */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 1px 10px rgba(33, 128, 141, 0.07);
    border-radius: 0 0 var(--radius) var(--radius);
    overflow: hidden;
}

.nav-container {
    margin: 0 auto;
    margin: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

main {
    padding: 2.5rem 0;
}

.container {
    margin: 0 auto;
    padding: 1rem 2rem;
}

.container-section {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(33, 128, 141, 0.05);
    padding: 2rem 2rem;
    margin-bottom: 2rem;
    transition: box-shadow 0.25s;
    margin: 0rem 16rem 2rem 16rem;
    margin: 0rem 12rem;
}

.container-section:hover {
    box-shadow: 0 6px 30px rgba(33, 128, 141, 0.18);
}

.projects-container {
    padding: 1rem 2rem;
}

footer {
    background: var(--color-footer-bg);
    color: var(--color-footer-text);
    padding: 2.5rem 0 1.4rem;
    box-shadow: 0 -2px 8px rgba(33, 128, 141, 0.04);
    font-size: 1rem;
    border-radius: var(--radius) var(--radius) 0 0;
    margin-top: 2rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    align-items: start;
    padding: 0 var(--space);
}

.footer-section h3 {
    color: white;
    margin-bottom: 0.7rem;
    font-size: 1.15em;
}

.footer-section p {
    margin: 0.3rem 0 0.6rem;
    color: var(--color-footer-text);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.2rem;
    border-top: 1px solid white;
    color: #c6dee5;
}

/* ========================================
   COMPONENTS
   ======================================== */

/* --- Navigation & Brand --- */
.logo {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: -0.01em;
    text-decoration: none;
}

.brand-logo {
    height: 60px;
    width: auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

/* Hamburger Menu Button */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    background: none;
    border: none;
    z-index: 1001;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--color-text);
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

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

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

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

ul.nav-menu {
    display: flex;
    gap: 0.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
    border-radius: var(--radius) 0 0 var(--radius);
}

.nav-link {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.9rem;
    border-radius: var(--radius);
    transition:
        color 0.2s,
        background 0.2s;
}

.nav-link:hover {
    color: var(--color-surface);
    background: var(--color-primary-hover);
    box-shadow: 0 2px 6px rgb(255, 255, 255);
}

/* --- Hero Section --- */
.hero {
    position: relative;
    padding: 2.5rem 0;
    background: linear-gradient(112deg, #ce003d 0%, #edb553 100%);
    color: #fff;
    text-align: center;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin: 5px;
    min-height: 20vh;
    overflow: hidden;
}

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

.hero-title {
    font-size: 2.7rem;
    font-weight: 700;
    margin: 0.8rem 0;
}

.hero-title .BC {
    font-weight: 900;
    font-size: 1.5em;
    background: #f5ccd8;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.06em;
}

.BC-enh {
    font-weight: 900;
    font-size: 1.5em;
    color: white;
}

.BC-enh.rotated-n {
    display: inline-block;
    transform: rotate(0deg);
    transition: none;
}

.BC-enh.rotated-n.active {
    animation: rotateNtoU 1.5s ease-in-out forwards;
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    margin-bottom: 2rem;
    color: #fafbfc;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

/* Canvas Background */
#neuralCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--radius);
    pointer-events: none;
    z-index: 1;
}

/* Hero Carousel Controls */
.arrows {
    position: absolute;
    width: 100%;
    top: 50%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    box-sizing: border-box;
    transform: translateY(-50%);
    z-index: 3;
}

button.arrow {
    background: rgba(0, 0, 0, 0.1);
    border: none;
    color: white;
    font-size: 28px;
    padding: 12px 18px;
    border-radius: var(--radius);
    cursor: pointer;
    user-select: none;
    transition: background 0.3s ease;
}

button.arrow:hover {
    background: rgba(0, 0, 0, 0.3);
}

.dots {
    position: absolute;
    bottom: 10px;
    width: 100%;
    text-align: center;
    z-index: 3;
}

.dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin: 0 6px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s ease;
}

.dot.active {
    background: white;
}

.dot:hover {
    background: rgba(255, 255, 255, 0.7);
}

/* --- Buttons --- */
.btn {
    background: var(--color-primary);
    color: #fafbfc;
    border-radius: var(--radius);
    padding: 0.65rem 1.25rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(33, 128, 141, 0.1);
    border: none;
    text-decoration: none;
    font-size: 1rem;
    margin: 0.2rem;
    transition: background 0.18s;
    cursor: pointer;
}

.btn:hover {
    background: var(--color-primary-hover);
    color: #fff;
}

/* --- Cards --- */
.card {
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: box-shadow 0.25s;
}

/* --- Gauges --- */
.gauges-wrapper {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin: 40px auto;
    max-width: 1000px;
}

.gauge-container {
    position: relative;
    width: 280px;
    height: 180px;
}

.gauge-text {
    position: absolute;
    top: 70%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
}

.gauge-value {
    font-size: 56px;
    font-weight: 700;
    background: linear-gradient(45deg, #9100da 0%, #daa700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    line-height: 1;
}

.gauge-label {
    font-size: 14px;
    color: #64748b;
    margin-top: 8px;
    font-weight: 500;
}

.gauge-bg {
    fill: none;
    stroke: #e2e8f0;
    stroke-width: 20;
    stroke-linecap: round;
}

.gauge-progress {
    fill: none;
    stroke: url(#gradient);
    stroke-width: 20;
    stroke-linecap: round;
    stroke-dasharray: 220;
    stroke-dashoffset: 220;
    transition: stroke-dashoffset 2s ease-out;
}

svg {
    filter: drop-shadow(0 4px 12px rgba(102, 126, 234, 0.15));
}

/* --- Forms & Contact Info --- */
.contact-form {
    display: flex;
    margin-bottom: 1rem;
    padding: 1.5rem;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    padding: 0.8rem;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius);
    font-family: var(--font-base);
    font-size: 1rem;
    color: var(--color-text);
    background-color: var(--color-surface);
    transition:
        border-color 0.2s ease-in-out,
        box-shadow 0.2s ease-in-out;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(206, 0, 61, 0.2);
    outline: none;
}

.form-group textarea {
    resize: vertical;
}

.contact-form .btn {
    align-self: flex-start;
}

.contact-info {
    margin-bottom: 1.5rem;
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rotateNtoU {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(180deg);
    }
}

#heroTitle1,
#heroTitle2,
#heroTitle3 {
    animation: fadeInUp 500ms ease-out both;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 800px) {
    .nav-container,
    .container,
    .footer-container {
        max-width: 100%;
        padding: 0 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    main {
        padding: 1.3rem 0;
    }

    .card {
        padding: 1rem;
    }
    .container-section {
        margin: 0rem 0rem 2rem 0rem;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    ul.nav-menu {
        position: fixed;
        top: 64px;
        right: -100%;
        width: 70%;
        max-width: 300px;
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        padding: 2rem 0;
        gap: 0;
        box-shadow: -2px 0 10px rgba(33, 128, 141, 0.1);
        transition: right 0.3s ease;
        backdrop-filter: blur(10px);
    }

    ul.nav-menu.active {
        right: 0;
    }

    ul.nav-menu li {
        width: 100%;
    }

    .nav-link {
        display: block;
        width: 100%;
        padding: 1rem 1.5rem;
        border-radius: 0;
        text-align: left;
    }

    .nav-link:hover {
        background: var(--color-primary);
    }

    .gauges-wrapper {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 500px) {
    .nav-menu {
        gap: 1rem;
    }

    .hero {
        padding: 2.5rem 1rem;
    }

    .hero-title {
        font-size: 1.35rem;
    }

    .btn {
        font-size: 0.98rem;
        padding: 0.6rem 1rem;
    }
}

.card-body p a {
    text-decoration: underline;
}
