:root {
    --bg: #f5f5f5;
    --surface: #ffffff;
    --border: #e0e0e0;
    --accent: #0a0a0a;
    --text: #0a0a0a;
    --muted: #888888;
    
    --container-width: 1100px;
    --transition-base: 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    color: var(--text);
    background-color: var(--bg);
}

body {
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Typography */
h1, h2, h3 {
    font-weight: 700;
    line-height: 1.2;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 3rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
}

/* Custom Cursor */
#custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
}

.cursor-point {
    width: 8px;
    height: 8px;
    background: var(--text);
    border-radius: 50%;
    position: absolute;
    transform: translate(-50%, -50%);
    transition: width 120ms, height 120ms, opacity 120ms;
}

.cursor-ring {
    width: 28px;
    height: 28px;
    border: 1px solid var(--accent);
    border-radius: 50%;
    position: absolute;
    transform: translate(-50%, -50%);
    transition: width 120ms, height 120ms;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    height: 70px;
    display: flex;
    align-items: center;
    z-index: 1000;
    transition: background var(--transition-base), backdrop-filter var(--transition-base);
}

nav.scrolled {
    background: rgba(245, 245, 245, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

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

nav .logo {
    font-weight: 700;
    text-decoration: none;
    color: var(--text);
    font-size: 1.25rem;
}

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

.nav-links a {
    text-decoration: none;
    color: var(--muted);
    font-size: 0.9rem;
    transition: color var(--transition-base);
}

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

/* Section Common */
section {
    padding: 100px 0;
}

/* Hero */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.2;
    mask-image: radial-gradient(circle at center, black, transparent 80%);
    pointer-events: none;
    z-index: -1;
}

#hero h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    margin-bottom: 1.5rem;
    min-height: 1.2em;
}

#hero .subtitle {
    font-size: 1.25rem;
    color: var(--muted);
    margin-bottom: 3rem;
    max-width: 600px;
}

.hero-metrics {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
}

.metric {
    display: flex;
    flex-direction: column;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.metric-label {
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
}

.metric-separator {
    color: var(--border);
    font-size: 1.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: #0a0a0a;
    color: #f5f5f5;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: 200ms;
}

.btn:hover {
    background: #333333;
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: 2rem;
}

.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 768px) {
    .cols-2, .cols-3 { grid-template-columns: 1fr; }
    .nav-links { gap: 1rem; }
    .hero-metrics { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .metric-separator { display: none; }
}

/* Cards */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 2.5rem;
    transition: border-color var(--transition-base);
}

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

.card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

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

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    background: var(--border);
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge.live {
    color: var(--accent);
}

.stack-badges {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.stack-badges span {
    font-size: 0.75rem;
    color: var(--accent);
    background: var(--border);
    padding: 2px 8px;
}

/* Stack Section */
.stack-list {
    font-size: 1.5rem;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.stack-list span {
    color: var(--text);
}

/* Form */
#contact-form {
    max-width: 600px;
    margin-top: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

.form-group input, 
.form-group textarea {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 1rem;
    font-family: inherit;
    transition: border-color var(--transition-base);
}

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

.form-status {
    margin-top: 1rem;
    font-size: 0.9rem;
}

.form-status.success { color: #16a34a; }
.form-status.error { color: #dc2626; }

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

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(24px);
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    
    #custom-cursor, .hero-grid {
        display: none !important;
    }
    
    * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

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

.about-text h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.about-text p {
    color: var(--muted);
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.7;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    border-left: 1px solid var(--border);
    padding-left: 3rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Process */
.process-steps {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2rem;
}

.step {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.step-number {
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 700;
    letter-spacing: 0.1em;
}

.step h3 {
    font-size: 1rem;
    font-weight: 700;
}

.step p {
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.6;
}

/* Responsive nuevas secciones */
@media (max-width: 768px) {
    .about-grid { grid-template-columns: 1fr; gap: 2rem; }
    .about-stats { border-left: none; padding-left: 0; border-top: 1px solid var(--border); padding-top: 2rem; }
    .process-steps { grid-template-columns: 1fr 1fr; }
}
