/* Variables - Next.js / Vercel Teal Aesthetic (Light Theme) */
:root {
    --bg-main: #ffffff;
    --bg-surface: #fafafa;
    --bg-hover: #f4f4f5;
    --text-primary: #09090b;
    --text-secondary: #52525b;
    --accent: #0d9488; /* Teal 600 */
    --accent-hover: #0f766e; /* Teal 700 */
    --accent-glow: rgba(13, 148, 136, 0.1);
    --border: #e4e4e7; /* Zinc 200 */
    --border-hover: #d4d4d8; /* Zinc 300 */
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    background-image: 
        linear-gradient(to right, rgba(0,0,0,0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0,0,0,0.03) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* Typography */
h1, h2, h3, h4, h5 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
    letter-spacing: -0.04em;
}

p {
    color: var(--text-secondary);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

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

/* Layout */
.container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 6rem 0;
}

.section-title {
    font-size: 2.25rem;
    margin-bottom: 1rem;
    text-align: center;
    background: linear-gradient(to right, #09090b, #52525b);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 4rem auto;
}

/* Header & Nav */
.header {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.brand {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.02em;
}

.brand i {
    color: var(--text-primary);
    font-size: 1.2rem;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-menu a {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s;
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--text-primary);
    color: var(--bg-main) !important;
}

.btn-primary:hover {
    background-color: #27272a; /* subtle dark hover */
}

/* Secondary ghost button style */
.btn-outline {
    background-color: transparent;
    border-color: var(--border);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--text-secondary);
    background-color: var(--bg-hover);
}

/* Hero Section */
.hero {
    padding: 8rem 0 6rem 0;
    background: transparent;
    border-bottom: 1px solid var(--border);
    text-align: center;
    position: relative;
}

/* Subtler top glow for light mode */
.hero::before {
    content: '';
    position: absolute;
    top: -150px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 300px;
    background: var(--accent-glow);
    filter: blur(100px);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(to bottom right, #09090b 30%, #52525b);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-size: 1.15rem;
    max-width: 600px;
    margin: 0 auto 2.5rem auto;
    color: var(--text-secondary);
}

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

.tech-badges {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    border-top: 1px dashed var(--border);
    padding-top: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.tech-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}

.tech-badge i {
    font-size: 1.1rem;
    color: var(--accent);
}

/* Architecture & Overview Sections */
.grid-cols-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: flex-start;
}

.card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    transition: border-color 0.3s;
    box-shadow: var(--shadow);
}

.card:hover {
    border-color: var(--border-hover);
}

.feature-list {
    list-style: none;
    margin-top: 1.5rem;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.feature-list li:last-child {
    margin-bottom: 0;
}

.feature-icon {
    color: var(--accent);
    font-size: 1rem;
    margin-top: 0.25rem;
    background: rgba(13, 148, 136, 0.1);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid rgba(13, 148, 136, 0.2);
}

.feature-content h4 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: var(--text-primary);
}

.feature-content p {
    font-size: 0.9rem;
}

/* Standard Grid */
.grid-cols-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.grid-cols-4 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.icon-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s;
    box-shadow: var(--shadow);
}

.icon-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.icon-card .icon-wrapper {
    width: 40px;
    height: 40px;
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-size: 1.2rem;
}

.icon-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.icon-card p {
    font-size: 0.9rem;
}

.module-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s;
}

.module-card:hover {
    border-color: var(--accent);
    background: var(--bg-main);
}

.module-card i {
    color: var(--accent);
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.module-card span {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Premium Showcase Layout */
.showcase-list {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin-top: 3rem;
}

.showcase-row {
    display: flex;
    align-items: stretch;
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03);
}

/* Optional alternating layout */
.showcase-row:nth-child(even) {
    flex-direction: row-reverse;
}
.showcase-row:nth-child(even) .showcase-image-wrapper {
    border-right: none;
    border-left: 1px solid var(--border);
}

.showcase-image-wrapper {
    flex: 0 0 60%;
    padding: 3rem;
    background: radial-gradient(circle at top left, #f3f4ff 0%, #ffffff 70%);
    border-right: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.showcase-image-wrapper img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    object-position: top;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0,0,0,0.05); /* Huge apple-style lifted shadow */
    cursor: zoom-in;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.showcase-image-wrapper img:hover {
    transform: translateY(-5px) scale(1.02);
}

.showcase-content {
    flex: 0 0 40%;
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--bg-main);
}

.showcase-content h5 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.showcase-content p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

@media (max-width: 992px) {
    .showcase-row, .showcase-row:nth-child(even) {
        flex-direction: column;
    }
    .showcase-image-wrapper {
        flex: 1 1 auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
        border-left: none !important;
        padding: 2rem;
    }
    .showcase-content {
        flex: 1 1 auto;
        padding: 2rem;
    }
}

/* Footer */
.footer {
    background-color: var(--bg-main);
    border-top: 1px solid var(--border);
    padding: 3rem 0;
    text-align: center;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

/* Lightbox Modal */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    overflow: auto;
}

.lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 2rem;
}

.lightbox img {
    max-width: 90%;
    max-height: 85vh;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover {
    color: var(--text-primary);
}

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

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

/* Antigravity Cursor Physics */
@media (pointer: fine) {
    body, a, button, img, .module-card, input, textarea, .showcase-item {
        cursor: none !important;
    }
}

.cursor-dot, .cursor-outline {
    position: fixed;
    top: 0; left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: #0f172a; /* Dark sleek dot ensures visibility on white */
    box-shadow: 0 0 10px rgba(13, 148, 136, 0.4);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(13, 148, 136, 0.6);
    transition: width 0.2s cubic-bezier(0.165, 0.84, 0.44, 1), height 0.2s cubic-bezier(0.165, 0.84, 0.44, 1), background-color 0.2s;
}

/* Magnetic Interaction Transition */
.nav-menu a {
    display: inline-block; /* MUST be inline-block for transforms to take effect */
}
.magnetic {
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.magnetic.active {
    transition: none; /* Let JS handle direct physics pulling */
}
/* Responsive */
@media (max-width: 992px) {
    .grid-cols-2, .grid-cols-3, .grid-cols-4 {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    .nav-menu { display: none; }
}
