/* WillToCoding - Estilos principales */

:root {
    --primary-color: #007AFF;
    --secondary-color: #5856D6;
    --accent-color: #FF6B6B;
    --success-color: #34C759;
    --background-color: #0a0a0a;
    --surface-color: #1a1a1a;
    --surface-hover: #252525;
    --text-color: #ffffff;
    --text-secondary: #a0a0a0;
    --border-color: #333;
    --accent-gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --card-gradient: linear-gradient(145deg, #1e1e1e, #151515);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

/* Header */
.site-header {
    background-color: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo img {
    height: 45px;
    width: auto;
}

.logo span {
    font-size: 1.5rem;
    font-weight: 700;
    color: #007AFF;
}

@media (max-width: 768px) {
    .logo img {
        height: 35px;
    }
    .logo span {
        font-size: 1.2rem;
    }
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--text-color);
}

/* Container */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 2rem;
    flex: 1;
}

/* Títulos principales */
.container > h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.container > p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.container p + p {
    margin-top: 1.5rem;
}

/* Separadores */
hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
    margin: 2.5rem 0;
}

/* Proyectos - Cards estilo Apple */
.container > h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.container > h3 a {
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    margin: -0.5rem -1rem;
    border-radius: 12px;
    display: inline-block;
}

.container > h3 a:hover {
    background: var(--surface-hover);
    color: var(--primary-color);
}

/* Stack tecnológico */
.container > p strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Hero Card - Newsletter Style */
.hero-card {
    background: linear-gradient(135deg, #4a9eff, #8b7fd6);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 20px 60px rgba(0, 122, 255, 0.2);
}

.hero-content {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-logo {
    width: 180px;
    height: 180px;
    object-fit: contain;
    flex-shrink: 0;
}

.hero-info {
    flex: 1;
}

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.hero-label::before {
    content: "📰";
    font-size: 0.85rem;
}

.hero-title {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0.25rem 0 0.75rem 0;
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
}

.hero-date {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    display: block;
    margin-bottom: 0.75rem;
}

.hero-description {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.6;
    margin: 0;
}

.hero-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 1.5rem;
}

.hero-author > a {
    display: block;
    flex-shrink: 0;
}

.author-photo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    box-shadow: 0 2px 10px rgba(0, 122, 255, 0.3);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.author-photo:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.5);
}

.author-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.author-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
}

.author-tags {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
}

.author-frequency {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
}

@media (max-width: 768px) {
    .hero-card {
        padding: 1.5rem;
        margin-top: 0;
    }

    .hero-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .hero-logo {
        width: 100px;
        height: 100px;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-author {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }

    .hero-author > a {
        margin-bottom: 0.5rem;
    }

    .author-photo {
        width: 60px;
        height: 60px;
    }

    .author-info {
        align-items: center;
    }

    .author-frequency {
        width: 100%;
        text-align: center;
        margin-top: 0.5rem;
    }
}

/* Lista de posts/items */
.latest-posts h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.item-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.item-list li {
    background: var(--card-gradient);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.item-list li:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 40px rgba(0, 122, 255, 0.15);
}

.item-list article h3 {
    margin-bottom: 0.5rem;
}

.item-list article .item-date {
    color: var(--text-secondary);
    font-size: 0.85rem;
    display: block;
    margin-bottom: 0.25rem;
}

.item-list article h3 a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
}

.item-list article h3 a:hover {
    color: var(--primary-color);
}

.item-list article p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Post individual */
.post {
    max-width: 750px;
    margin: 0 auto;
    padding: 0 1rem;
    box-sizing: border-box;
}

.post-content {
    box-sizing: border-box;
}

.post h1 {
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.post-date {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.post-content {
    font-size: 1.05rem;
    line-height: 1.8;
}

.post-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: var(--text-color);
}

.post-content p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.post-content ul, .post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content code {
    background-color: var(--surface-color);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-family: 'SF Mono', Monaco, 'Fira Code', monospace;
    font-size: 0.9em;
    color: var(--accent-color);
    word-break: break-all;
    overflow-wrap: break-word;
}

.post-content pre {
    background-color: var(--surface-color);
    padding: 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid var(--border-color);
}

.post-content pre code {
    background: none;
    padding: 0;
    color: var(--text-color);
}

.post-content a {
    color: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.post-content a:hover {
    color: var(--secondary-color);
}

.post-content img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .post-content img {
        border-radius: 8px;
        margin: 1.5rem 0;
    }
}

/* Tags */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    list-style: none;
    margin-top: 1rem;
}

.tag-list li a {
    background-color: var(--surface-color);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
}

.tag-list li a:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Footer */
.site-footer {
    background-color: var(--surface-color);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
}

.footer-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.footer-content .made-with {
    color: #34C759;
    font-weight: 500;
    font-size: 0.85rem;
    margin-top: 1.5rem;
    margin-bottom: 0;
}

.footer-content .social-label {
    color: var(--text-color);
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
}

.social-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.social-links a svg {
    vertical-align: middle;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color);
    background: var(--surface-hover);
}

.social-links a:hover svg {
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    nav ul {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .container {
        padding: 1rem 1rem 2rem 1rem;
    }

    .container > h1 {
        font-size: 2rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero {
        padding: 3rem 1.5rem;
        border-radius: 16px;
    }

    .item-list li {
        padding: 1.25rem;
    }

    /* Footer responsive */
    .social-links {
        flex-wrap: nowrap;
        gap: 0.25rem;
    }

    .social-links a {
        font-size: 0;
        padding: 0.5rem;
    }

    .social-links a svg {
        width: 20px;
        height: 20px;
    }
}

/* Animaciones sutiles */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.container {
    animation: fadeIn 0.5s ease-out;
}

/* Projects Grid - Estilo arturorivas.com */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.project-card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: all 0.3s ease;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.project-card:hover,
.project-card:active {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(0, 122, 255, 0.15);
}

.project-header {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.project-tags span {
    background: transparent;
    color: #34C759;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid #34C759;
}

.project-card p {
    color: #a0a0a0;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
    flex-grow: 1;
}

.project-link {
    display: none;
}

/* Responsive grid */
@media (max-width: 900px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* Experience Section */
.experience-grid,
.education-grid {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.experience-card,
.education-card {
    background: var(--card-gradient);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.experience-card:hover,
.education-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(0, 122, 255, 0.15);
}

.experience-header,
.education-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.experience-role,
.education-degree {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
}

.experience-date,
.education-date {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 500;
}

.experience-company,
.education-institution {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.experience-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.experience-tags span {
    background: transparent;
    color: #34C759;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid #34C759;
}

.experience-card p,
.education-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 600px) {
    .experience-header,
    .education-header {
        flex-direction: column;
    }

    .experience-card,
    .education-card {
        padding: 1.25rem;
    }
}

/* Section Title */
.container .section-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-color);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
    background: transparent;
    -webkit-background-clip: initial;
    -webkit-text-fill-color: var(--text-color);
    background-clip: initial;
}

.container h1.section-title {
    margin: 0 0 1.5rem 0;
}

.container h2.section-title {
    margin: 3rem 0 1.5rem 0;
}

/* App Store Grid */
.appstore-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.appstore-card {
    background: var(--card-gradient);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.appstore-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(0, 122, 255, 0.15);
}

.appstore-content {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.app-icon {
    width: 100px;
    height: 100px;
    border-radius: 22px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.app-info {
    flex: 1;
}

.app-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.app-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-color);
}

.app-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.app-info .project-tags {
    margin-bottom: 0.75rem;
}

.app-info p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

.qr-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.qr-code {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    background: white;
    padding: 0.5rem;
}

.qr-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

@media (max-width: 600px) {
    .appstore-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .app-header {
        justify-content: center;
    }

    .app-info .project-tags {
        justify-content: center;
    }
}

/* Private Notice */
.private-notice {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
    margin-top: 2rem;
    font-style: italic;
}

/* Profile Photo */
.profile-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 2rem auto;
    display: block;
    border: 3px solid var(--primary-color);
    box-shadow: 0 4px 20px rgba(0, 122, 255, 0.3);
}
