/* ============================================================
   GEOMetric Studio - Shared Styles
   ============================================================ */

:root {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #1a1f2e;
    --bg-card: #21262d;
    --gradient-green: #4AE54A;
    --gradient-teal: #00D4AA;
    --gradient-cyan: #00BFFF;
    --gradient-purple: #8B5CF6;
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;
    --border-color: #30363d;
    --accent-gradient: linear-gradient(135deg, var(--gradient-green), var(--gradient-teal), var(--gradient-cyan), var(--gradient-purple));
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

/* Background effects */
.bg-grid {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image:
        linear-gradient(rgba(0, 212, 170, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 170, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

.gradient-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.35;
    pointer-events: none;
    z-index: 0;
    animation: float 20s ease-in-out infinite;
}

.orb-1 { width: 600px; height: 600px; background: var(--gradient-purple); top: -200px; right: -200px; }
.orb-2 { width: 500px; height: 500px; background: var(--gradient-cyan); bottom: -150px; left: -150px; animation-delay: -7s; }
.orb-3 { width: 400px; height: 400px; background: var(--gradient-green); top: 50%; left: 50%; transform: translate(-50%, -50%); opacity: 0.15; animation-delay: -14s; }

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
}

/* ---- Typography ---- */
.gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h1, h2, h3, h4 { line-height: 1.2; }

/* ---- Buttons ---- */
.btn {
    display: inline-block;
    padding: 0.8rem 1.6rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--accent-gradient);
    color: var(--bg-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(0, 191, 255, 0.3);
}

.btn-ghost {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--gradient-cyan);
    box-shadow: 0 0 16px rgba(0, 191, 255, 0.12);
}

.btn-ghost:hover {
    background: rgba(0, 191, 255, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 0 24px rgba(0, 191, 255, 0.25);
}

/* ---- Navigation ---- */
nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 1rem 2rem;
    background: rgba(13, 17, 23, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon { width: 42px; height: 42px; }
.logo-icon svg { width: 100%; height: 100%; }

.logo-text {
    font-weight: 700;
    font-size: 1.35rem;
}

.logo-text span {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
}

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

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0; right: 0;
    height: 2px;
    background: var(--accent-gradient);
    border-radius: 1px;
}

.nav-cta {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
}

.mobile-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

/* ---- Sections ---- */
section {
    padding: 7rem 2rem;
    position: relative;
    z-index: 1;
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    margin-bottom: 4rem;
}

.section-header.centered {
    text-align: center;
}

.section-tag {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    background: rgba(0, 212, 170, 0.08);
    border: 1px solid rgba(0, 212, 170, 0.2);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gradient-teal);
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 640px;
    line-height: 1.7;
}

.section-header.centered .section-subtitle {
    margin: 0 auto;
}

/* ---- Cards ---- */
.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    transition: all 0.4s ease;
}

.card:hover {
    border-color: rgba(0, 212, 170, 0.25);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
}

.card-icon {
    width: 52px;
    height: 52px;
    background: rgba(0, 212, 170, 0.08);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
}

.card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ---- Page hero (inner pages) ---- */
.page-hero {
    padding: 10rem 2rem 5rem;
    position: relative;
    z-index: 1;
}

.page-hero .section-container {
    max-width: 800px;
}

.page-hero .section-title {
    font-size: clamp(2.2rem, 4.5vw, 3.2rem);
    margin-bottom: 1.25rem;
}

.page-hero .section-subtitle {
    font-size: 1.15rem;
    max-width: 640px;
}

/* ---- Divider ---- */
.section-divider {
    height: 1px;
    background: var(--border-color);
    max-width: 1200px;
    margin: 0 auto;
}

/* ---- Footer ---- */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 2rem;
    position: relative;
    z-index: 1;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    color: var(--text-muted);
    margin-top: 1rem;
    font-size: 0.9rem;
}

.footer-column h4 {
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.footer-column ul { list-style: none; }

.footer-column ul li { margin-bottom: 0.5rem; }

.footer-column ul a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-column ul a:hover { color: var(--text-primary); }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: var(--text-muted);
    text-decoration: none;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.social-links a:hover {
    color: var(--text-primary);
    border-color: var(--gradient-teal);
}

/* ---- Contact form (shared) ---- */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gradient-cyan);
}

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

.form-group select { cursor: pointer; }

/* ---- Portfolio items ---- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.portfolio-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border-color: rgba(0, 212, 170, 0.2);
}

.portfolio-image {
    height: 220px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top left;
    transition: transform 0.4s ease;
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.03);
}

.portfolio-content {
    padding: 1.75rem;
}

.portfolio-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.portfolio-tags span {
    padding: 0.25rem 0.75rem;
    background: rgba(0, 212, 170, 0.08);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gradient-teal);
}

.portfolio-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.portfolio-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ---- Blog / Insights cards ---- */
.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2rem;
}

.insight-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.4s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.insight-card:hover {
    border-color: rgba(0, 212, 170, 0.25);
    transform: translateY(-4px);
}

.insight-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.insight-category {
    padding: 0.2rem 0.6rem;
    background: rgba(0, 212, 170, 0.08);
    border-radius: 8px;
    color: var(--gradient-teal);
    font-weight: 600;
}

.insight-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.insight-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    flex-grow: 1;
}

.insight-card .read-more {
    margin-top: 1.25rem;
    color: var(--gradient-cyan);
    font-weight: 600;
    font-size: 0.85rem;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-secondary); flex-direction: column; padding: 1.5rem 2rem; gap: 1rem; border-bottom: 1px solid var(--border-color); }
    .nav-links.active { display: flex; }
    .mobile-toggle { display: flex; }
    .nav-cta { display: none; }

    section { padding: 4rem 1.5rem; }
    .page-hero { padding: 8rem 1.5rem 3rem; }

    .form-row { grid-template-columns: 1fr; }
    .portfolio-grid { grid-template-columns: 1fr; }
    .insights-grid { grid-template-columns: 1fr; }

    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
}

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

/* ---- Scroll reveal ---- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
