/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    /* Color Palette */
    --bg-dark: #050a14;
    --bg-darker: #020408;
    --accent-blue: #00f2ff;
    --accent-purple: #bd00ff;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    /* Classical/Philosophical */
    --font-body: 'Inter', sans-serif;
    /* Modern/Tech */

    /* Spacing */
    --section-padding: 6rem 2rem;
    --container-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s ease;
}

ul {
    list-style: none;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1rem;
}

.text-gradient {
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;

}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    border: 1px solid var(--accent-blue);
    background: transparent;
    color: var(--accent-blue);
    transition: all 0.3s ease;
}

.btn:hover {
    background: var(--accent-blue);
    color: var(--bg-dark);
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.3);
}

/* Glassmorphism */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    transition: transform 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-blue);
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(5, 10, 20, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.lang-switch {
    display: flex;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.lang-switch a {
    opacity: 0.5;
}

.lang-switch a.active {
    opacity: 1;
    font-weight: bold;
    color: var(--accent-blue);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    opacity: 0.6;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, var(--bg-dark) 100%);
    z-index: -1;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    z-index: 1;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

/* Sections */
section {
    padding: var(--section-padding);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 4rem;
}

.section-title span {
    display: block;
    font-size: 1rem;
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--accent-purple);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* About Grid */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-img img {
    width: 100%;
    border-radius: 10px;
    filter: grayscale(20%);
    transition: 0.3s;
}

.about-img img:hover {
    filter: grayscale(0%);
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.2);
}

/* Expertise Cards */
.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card-icon {
    width: 50px;
    margin-bottom: 1.5rem;
}

/* Framework Visual Section */
.framework-container {
    position: relative;
    max-width: 900px;
    margin: 4rem auto 0;
    padding: 2rem;
    perspective: 1000px;
}

.framework-network {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto auto;
    gap: 2rem;
    position: relative;
    z-index: 2;
}

/* Position nodes in a tree/diamond structure */
.node-liberta {
    grid-column: 1;
    grid-row: 1;
    justify-self: center;
}

.node-fides {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
}

.node-logos {
    grid-column: 1 / span 2;
    grid-row: 2;
    justify-self: center;
}

.node-techne {
    grid-column: 1 / span 2;
    grid-row: 3;
    justify-self: center;
}

.node-ethos {
    grid-column: 1 / span 2;
    grid-row: 4;
    justify-self: center;
}

.framework-node {
    background: rgba(5, 10, 20, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    padding: 1.5rem;
    width: 280px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
    overflow: hidden;
    z-index: 10;
}

.framework-node::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    padding: 2px;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.framework-node:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: var(--accent-blue);
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.15);
    background: rgba(5, 10, 20, 0.8);
}

.node-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.node-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.node-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
    transition: color 0.3s ease;
}

.framework-node:hover .node-desc {
    color: #e0e0e0;
}

/* Specific Node Styling */
.node-logos {
    border-color: var(--accent-purple);
    box-shadow: 0 0 15px rgba(189, 0, 255, 0.1);
}

.node-logos:hover {
    border-color: var(--accent-purple);
    box-shadow: 0 0 30px rgba(189, 0, 255, 0.3);
}

/* Connecting Lines (SVG Overlay) */
.framework-connections {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.connection-line {
    stroke: var(--glass-border);
    stroke-width: 2;
    fill: none;
    transition: stroke 0.3s ease, stroke-width 0.3s ease;
}

/* Active State (JS) */
.framework-node.active {
    border-color: var(--accent-blue);
    background: rgba(0, 242, 255, 0.05);
}

.connection-line.active {
    stroke: var(--accent-blue);
    stroke-width: 3;
    filter: drop-shadow(0 0 5px var(--accent-blue));
    animation: flowLine 2s infinite linear;
    stroke-dasharray: 10 5;
}

@keyframes flowLine {
    to {
        stroke-dashoffset: -30;
    }
}

/* Contact */
.contact-container {
    text-align: center;
}

.contact-links {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem 0;
    border-top: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Mobile */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* Add toggle logic later if needed or simple stack */
    }

    .hero h1 {
        font-size: 2.5rem;
    }


    .about-grid {
        grid-template-columns: 1fr;
    }
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}