/* =========================================================
   VERTICODE — ISO-Grade Design System
   Premium Frontend CSS | v2.0
   ========================================================= */

:root {
    /* Brand Palette */
    --primary: #00d2ff;
    --primary-rgb: 0, 210, 255;
    --primary-glow: rgba(0, 210, 255, 0.18);
    --secondary: #3a7bd5;
    --secondary-rgb: 58, 123, 213;
    --accent: #6366f1;
    --accent-rgb: 99, 102, 241;
    --danger: #ef4444;
    --success: #10b981;

    /* Dark Surface Colors */
    --bg-dark: #020617;
    --bg-dark-soft: #0f172a;
    --bg-card-dark: rgba(30, 41, 59, 0.45);
    --text-light: #f8fafc;
    --text-muted-light: #94a3b8;
    --border-dark: rgba(255, 255, 255, 0.07);

    /* Light Surface Colors */
    --bg-light: #f8fafc;
    --bg-light-soft: #f1f5f9;
    --bg-card-light: rgba(255, 255, 255, 0.95);
    --text-dark: #0f172a;
    --text-muted-dark: #475569;
    --border-light: rgba(0, 0, 0, 0.07);

    /* Typography */
    --font-heading: 'Outfit', system-ui, -apple-system, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;

    /* Fluid Spacing */
    --space-xs: clamp(0.25rem, 1vw, 0.5rem);
    --space-sm: clamp(0.5rem, 2vw, 1rem);
    --space-md: clamp(1rem, 2vw, 1.25rem);
    --space-lg: clamp(1.25rem, 3vw, 2rem);
    --space-xl: clamp(2rem, 5vw, 3rem);
    --space-2xl: clamp(3rem, 8vw, 4.5rem);
    --space-3xl: clamp(4.5rem, 10vw, 6.5rem);

    /* Border Radii */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: clamp(24px, 5vw, 40px);
    --radius-full: 9999px;

    /* Easing Curves */
    --ease-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    --ease-smooth: 0.55s cubic-bezier(0.16, 1, 0.3, 1);
    --ease-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-enter: 0.4s cubic-bezier(0, 0, 0.2, 1);
}

/* ── Reset ── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 100%;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    /* Firefox thin scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 210, 255, 0.3) transparent;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-family: var(--font-body);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ── Premium Slim Scrollbar ── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(0, 210, 255, 0.35);
    border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(0, 210, 255, 0.6); }

/* ── Focus Visible (Accessibility) ── */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ── Typography Scale ── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.15;
    color: inherit;
    letter-spacing: -0.025em;
}

h1 { font-size: clamp(2.25rem, 7vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.75rem, 5vw, 2.85rem); font-weight: 700; }
h3 { font-size: clamp(1.25rem, 3.5vw, 1.85rem); font-weight: 700; }
h4 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }
h5 { font-size: clamp(0.95rem, 2vw, 1.1rem); }

p {
    font-size: clamp(0.9rem, 1vw, 1rem);
    margin-bottom: 1.4rem;
    color: var(--text-muted-dark);
    max-width: 72ch;
    line-height: 1.75;
}

.section-dark p { color: var(--text-muted-light); }
p:last-child { margin-bottom: 0; }

a {
    text-decoration: none;
    color: inherit;
    transition: var(--ease-fast);
}

ul { list-style: none; }

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-md);
}

/* ── Layout ── */
.container {
    width: 90%;
    max-width: 1280px;
    margin: 0 auto;
}

.section-padding { padding: var(--space-2xl) 0; }
.flex-center { display: flex; align-items: center; justify-content: center; }

/* ── Grid System ── */
.grid { display: grid; gap: var(--space-lg); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 1024px) {
    .grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .grid-cols-2, .grid-cols-3 { grid-template-columns: 1fr; }
    .container { width: 93%; }
}

.grid-responsive {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: var(--space-lg);
}

@media (max-width: 640px) {
    .grid-responsive { grid-template-columns: 1fr; }
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-lg); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-lg); }

@media (max-width: 992px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ── Typography Utilities ── */
.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.overline {
    font-size: clamp(0.7rem, 1.5vw, 0.8rem);
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: var(--space-sm);
    display: block;
    color: var(--primary);
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75em 2em;
    font-weight: 600;
    font-size: 0.9rem;
    font-family: var(--font-body);
    border-radius: var(--radius-md);
    transition: var(--ease-bounce);
    border: 2px solid transparent;
    cursor: pointer;
    gap: 0.6em;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #020617;
    font-weight: 700;
    box-shadow: 0 8px 24px -6px rgba(var(--primary-rgb), 0.45);
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 32px -10px rgba(var(--primary-rgb), 0.55);
}

.btn-outline {
    background: transparent;
    border-color: var(--border-light);
    color: var(--text-dark);
}

.section-dark .btn-outline {
    border-color: var(--border-dark);
    color: var(--text-light);
}

.btn-outline:hover {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.06);
    transform: translateY(-4px);
}

/* ── Cards ── */
.card {
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    background: white;
    border: 1px solid var(--border-light);
    transition: var(--ease-smooth);
    display: flex;
    flex-direction: column;
}

.section-dark .card {
    background: var(--bg-card-dark);
    border-color: var(--border-dark);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.card:hover {
    transform: translateY(-10px);
    border-color: rgba(var(--primary-rgb), 0.4);
    box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(var(--primary-rgb), 0.08);
}

.section-dark .card:hover {
    box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(var(--primary-rgb), 0.12);
}

/* ── Icon Box ── */
.icon-box {
    width: clamp(44px, 6vw, 60px);
    height: clamp(44px, 6vw, 60px);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: var(--space-md);
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--primary);
    transition: var(--ease-smooth);
    flex-shrink: 0;
}

.card:hover .icon-box {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #020617;
    transform: rotate(8deg) scale(1.08);
    box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.3);
}

/* ── Form Elements ── */
.form-group { margin-bottom: var(--space-md); }

.form-group label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted-dark);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-light);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-dark);
    transition: var(--ease-fast);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.12);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: #94a3b8; }

.form-group textarea { resize: vertical; min-height: 110px; }

/* ── Navbar ── */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: var(--space-sm) 0;
    transition: var(--ease-smooth);
}

nav.scrolled {
    padding: 0.5rem 0;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 2px 24px rgba(0, 0, 0, 0.04);
}

nav.dark-nav.scrolled {
    background: rgba(2, 6, 23, 0.88);
    border-bottom-color: var(--border-dark);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: inherit;
    opacity: 0.75;
    position: relative;
    padding-bottom: 2px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--primary);
    border-radius: 99px;
    transition: var(--ease-fast);
}

.nav-links a:hover { opacity: 1; color: var(--primary); }
.nav-links a:hover::after { width: 100%; }

/* ── Section Backgrounds ── */
.section-light { background: var(--bg-light); }
.section-dark { background: var(--bg-dark); color: var(--text-light); }

/* ── Hero ── */
.hero {
    min-height: 100vh;
    padding-top: 130px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: var(--space-xl);
    align-items: center;
}

@media (max-width: 992px) {
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .hero-grid > div { margin: 0 auto; }
    .hero-grid img { max-width: 80%; margin: 0 auto; }
}

/* ── Portfolio ── */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: var(--space-lg);
}

.project-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 16/10;
    cursor: pointer;
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--ease-smooth);
}

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

.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.2) 60%, transparent 100%);
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 0;
    transition: var(--ease-smooth);
}

.project-card:hover .project-overlay { opacity: 1; }

/* ── Animations ── */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.6s var(--ease-enter), transform 0.6s var(--ease-enter);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-18px); }
}

.animate-float { animation: float 7s ease-in-out infinite; }

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0.3); }
    50% { box-shadow: 0 0 0 12px rgba(var(--primary-rgb), 0); }
}

/* ── Mobile Menu ── */
.menu-toggle {
    display: none;
    font-size: 1.35rem;
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 8px;
    transition: var(--ease-fast);
    color: inherit;
}

.menu-toggle:hover { background: rgba(0,0,0,0.05); }

@media (max-width: 768px) {
    .menu-toggle { display: block; }
    #nav-cta { display: none; }
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(320px, 85vw);
        height: 100vh;
        background: var(--bg-dark);
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        padding: var(--space-2xl) var(--space-xl);
        gap: var(--space-lg);
        transition: var(--ease-smooth);
        z-index: 999;
        border-left: 1px solid var(--border-dark);
        box-shadow: -24px 0 60px rgba(0,0,0,0.3);
    }
    .nav-links.active { right: 0; }
    .nav-links a {
        font-size: 1.3rem;
        font-weight: 700;
        color: white;
        opacity: 1;
    }
    .nav-links a::after { display: none; }
}

/* ── Footer ── */
.footer-main {
    background: var(--bg-dark);
    color: var(--text-light);
    padding: var(--space-2xl) 0 var(--space-lg);
    border-top: 1px solid var(--border-dark);
    position: relative;
}

.footer-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.35;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.footer-grid h4 {
    color: white;
    font-size: 0.72rem;
    margin-bottom: var(--space-lg);
    letter-spacing: 0.12em;
}

.footer-links-list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.footer-link {
    color: var(--text-muted-light);
    font-size: 0.875rem;
    transition: var(--ease-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.footer-link:hover { color: var(--primary); transform: translateX(4px); }

.social-icon:hover {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
    transform: translateY(-3px);
}

@media (max-width: 992px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-xl); }
}

@media (max-width: 640px) {
    .footer-grid { grid-template-columns: 1fr; gap: var(--space-lg); }
    .footer-main { text-align: center; }
    .footer-link:hover { transform: none; }
    .footer-links-list { align-items: center; }
}

/* ── Glass Morphism Utility ── */
.glass {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
}

/* ── Trust / ISO Badge Elements ── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.9rem;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid;
}

.badge-primary {
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--primary);
    border-color: rgba(var(--primary-rgb), 0.25);
}

/* ── Divider ── */
.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-light), transparent);
    margin: var(--space-xl) 0;
}

.section-dark .divider {
    background: linear-gradient(90deg, transparent, var(--border-dark), transparent);
}

/* ── Stat Items ── */
.stat-item {
    padding: var(--space-md);
    position: relative;
}

/* ── Responsive Navbar ── */
@media (max-width: 480px) {
    h1 { font-size: clamp(1.75rem, 8vw, 2.5rem); }
    h2 { font-size: clamp(1.5rem, 6vw, 2rem); }
    .btn { padding: 0.65em 1.5em; font-size: 0.85rem; }
    .section-padding { padding: var(--space-xl) 0; }
}

/* ── Print Styles ── */
@media print {
    nav, footer, .btn { display: none !important; }
    body { background: white; color: black; }
    .section-dark { background: white; color: black; }
}
