/* ==========================================
   CSS Reset & Base Styles
   ========================================== */

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

:root {
    /* Color Palette */
    --bg-primary: #0B0F14;
    --bg-secondary: #0F172A;
    --bg-elevated: #1a1f2e;

    --accent-cyan: #40CFFF;
    --accent-blue: #38BDF8;
    --accent-violet: #8B5CF6;
    --accent-purple: #6366F1;

    --text-primary: #E5E7EB;
    --text-secondary: #CBD5E1;
    --text-muted: #94A3B8;

    --border-subtle: rgba(148, 163, 184, 0.1);
    --border-medium: rgba(148, 163, 184, 0.2);

    /* Spacing */
    --section-padding: 120px;
    --container-padding: 24px;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================
   Navigation
   ========================================== */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(11, 15, 20, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px var(--container-padding);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.logo-bracket {
    color: var(--accent-cyan);
    font-weight: 700;
}

.logo-text {
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-violet));
    transition: width 0.3s ease;
}

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

.nav-link:hover::after {
    width: 100%;
}

.nav-link-cta {
    padding: 8px 20px;
    border: 1px solid var(--accent-cyan);
    border-radius: 6px;
    color: var(--accent-cyan);
    transition: all 0.3s ease;
}

.nav-link-cta::after {
    display: none;
}

.nav-link-cta:hover {
    background: rgba(64, 207, 255, 0.1);
    box-shadow: 0 0 20px rgba(64, 207, 255, 0.2);
}

/* ==========================================
   Hero Section
   ========================================== */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px var(--container-padding) 80px;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(64, 207, 255, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-container {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.hero-content {
    z-index: 10;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(64, 207, 255, 0.05);
    border: 1px solid rgba(64, 207, 255, 0.2);
    border-radius: 24px;
    font-size: 13px;
    color: var(--accent-cyan);
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease-out;
}

.status-indicator {
    width: 8px;
    height: 8px;
    background: var(--accent-cyan);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero-title {
    font-size: 72px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease-out 0.1s backwards;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 40px;
    max-width: 540px;
    animation: fadeInUp 0.6s ease-out 0.2s backwards;
}

.hero-cta {
    display: flex;
    gap: 16px;
    animation: fadeInUp 0.6s ease-out 0.3s backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-family: var(--font-sans);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    color: var(--bg-primary);
    box-shadow: 0 4px 20px rgba(64, 207, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(64, 207, 255, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
    border-color: var(--accent-cyan);
    background: rgba(64, 207, 255, 0.05);
}

/* Hero Visual */
.hero-visual {
    position: relative;
    animation: fadeIn 0.8s ease-out 0.4s backwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Hero Logo */
.hero-logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 400px;
}

.hero-logo {
    max-width: 380px;
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 20px 60px rgba(64, 207, 255, 0.15));
    animation: logoFloat 3s ease-in-out infinite;
}

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

/* OLD CODE WINDOW STYLES (COMMENTED FOR POTENTIAL REVERT) */
.code-window {
    position: relative;
    background: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.code-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.6);
    border-bottom: 1px solid var(--border-subtle);
}

.code-dots {
    display: flex;
    gap: 6px;
}

.code-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-muted);
    opacity: 0.3;
}

.code-dots span:nth-child(1) { background: #ff5f56; }
.code-dots span:nth-child(2) { background: #ffbd2e; }
.code-dots span:nth-child(3) { background: #27c93f; }

.code-title {
    font-size: 13px;
    color: var(--text-secondary);
}

.code-content {
    padding: 24px;
    overflow-x: auto;
}

.code-content pre {
    margin: 0;
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.8;
}

.code-keyword { color: #ff79c6; }
.code-class { color: var(--accent-cyan); }
.code-function { color: var(--accent-blue); }
.code-string { color: #50fa7b; }
.code-comment { color: var(--text-muted); font-style: italic; }

/* Floating Cards */
.floating-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: rgba(11, 15, 20, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-medium);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    animation: float 3s ease-in-out infinite;
}

.card-1 {
    top: -20px;
    right: -30px;
    animation-delay: 0s;
}

.card-2 {
    bottom: 80px;
    left: -40px;
    animation-delay: 1s;
}

.card-3 {
    bottom: -20px;
    right: 60px;
    animation-delay: 2s;
}

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

/* Hero Scroll Indicator */
.hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.scroll-indicator {
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, var(--accent-cyan), transparent);
    animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
    0% { opacity: 0; transform: translateY(-10px); }
    50% { opacity: 1; }
    100% { opacity: 0; transform: translateY(10px); }
}

/* ==========================================
   Section Styles
   ========================================== */

.section-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-tag {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-violet);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.section-title {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

/* ==========================================
   About Me Section
   ========================================== */

.about {
    padding: var(--section-padding) 0;
    background: var(--bg-secondary);
    position: relative;
}

.about-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.about-content {
    margin-bottom: 80px;
}

.about-intro {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 80px;
    align-items: center;
}

.about-text {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.about-lead {
    font-size: 20px;
    line-height: 1.8;
    color: var(--text-primary);
}

.about-lead strong {
    color: var(--accent-cyan);
    font-weight: 600;
}

.about-description,
.about-drive {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.about-description strong,
.about-drive strong {
    color: var(--text-primary);
    font-weight: 600;
}

.about-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-wrapper {
    position: relative;
    width: 320px;
    height: 320px;
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
    position: relative;
    z-index: 2;
    border: 2px solid var(--border-medium);
}

.image-border {
    position: absolute;
    top: -12px;
    left: -12px;
    right: 12px;
    bottom: 12px;
    border: 2px solid var(--accent-cyan);
    border-radius: 16px;
    z-index: 1;
    opacity: 0.5;
}

.image-border::after {
    content: '';
    position: absolute;
    top: 24px;
    left: 24px;
    right: -24px;
    bottom: -24px;
    border: 2px solid var(--accent-violet);
    border-radius: 16px;
    z-index: 0;
    opacity: 0.3;
}

/* Technology Specialty Cards */
.about-tech {
    margin-top: 60px;
}

.tech-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.tech-specialty-card {
    padding: 32px 24px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tech-specialty-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-violet));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tech-specialty-card:hover {
    border-color: var(--border-medium);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.tech-specialty-card:hover::before {
    opacity: 1;
}

.specialty-icon {
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
}

.specialty-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.specialty-description {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ==========================================
   Expertise Section
   ========================================== */

.expertise {
    padding: var(--section-padding) 0;
    background: var(--bg-primary);
    position: relative;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.tech-card {
    padding: 40px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.tech-card:hover {
    border-color: var(--border-medium);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.tech-icon {
    margin-bottom: 24px;
}

.tech-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.tech-description {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 24px;
}

.tech-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tech-list li {
    font-size: 14px;
    color: var(--text-muted);
    padding-left: 20px;
    position: relative;
}

.tech-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-cyan);
}

/* ==========================================
   Work Section
   ========================================== */

.work {
    padding: var(--section-padding) 0;
    background: var(--bg-secondary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.project-card {
    display: block;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.project-card:hover {
    border-color: var(--border-medium);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.project-image {
    aspect-ratio: 16 / 10;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 40px;
}

.project-logo img {
    max-width: 180px;
    max-height: 180px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 16px;
}

/* Larger size for CADERNO (third project) */
.projects-grid .project-card:nth-child(3) .project-logo img {
    max-width: 220px;
    max-height: 220px;
}

.project-content {
    padding: 32px;
}

.project-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.project-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 6px 12px;
    background: rgba(64, 207, 255, 0.1);
    border: 1px solid rgba(64, 207, 255, 0.2);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--accent-cyan);
}

/* ==========================================
   Contact Section
   ========================================== */

.contact {
    padding: var(--section-padding) 0;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.contact-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.contact-content {
    z-index: 10;
}

.contact-description {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 40px;
    max-width: 540px;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.contact-link:hover {
    border-color: var(--accent-cyan);
    background: rgba(64, 207, 255, 0.05);
    transform: translateX(4px);
}

.contact-link svg {
    color: var(--accent-cyan);
}

.contact-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-info-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.info-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.info-card:hover {
    border-color: var(--border-medium);
    transform: translateX(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.info-icon {
    flex-shrink: 0;
}

.info-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 600;
}

.info-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

/* ==========================================
   Footer
   ========================================== */

.footer {
    padding: 60px 0 40px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.footer-content {
    text-align: center;
    margin-bottom: 40px;
}

.footer-logo {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 16px;
}

.footer-text {
    font-size: 15px;
    color: var(--text-muted);
}

.footer-bottom {
    text-align: center;
    padding-top: 32px;
    border-top: 1px solid var(--border-subtle);
}

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

/* ==========================================
   Responsive Design
   ========================================== */

@media (max-width: 1024px) {
    :root {
        --section-padding: 80px;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .hero-title {
        font-size: 56px;
    }

    .about-intro {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .about-image {
        order: -1;
    }

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

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

    .contact-container {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .contact-info-cards {
        flex-direction: row;
        gap: 16px;
    }

    .info-card {
        flex: 1;
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 60px;
    }

    .nav-links {
        gap: 20px;
    }

    .nav-link {
        font-size: 13px;
    }

    .hero {
        padding: 100px var(--container-padding) 60px;
    }

    .hero-title {
        font-size: 40px;
    }

    .hero-description {
        font-size: 16px;
    }

    .hero-cta {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .floating-card {
        display: none;
    }

    .hero-logo-container {
        min-height: 300px;
    }

    .hero-logo {
        max-width: 280px;
    }

    .section-title {
        font-size: 36px;
    }

    .about-lead {
        font-size: 18px;
    }

    .about-description,
    .about-drive {
        font-size: 15px;
    }

    .image-wrapper {
        width: 280px;
        height: 280px;
    }

    .tech-cards-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .tech-specialty-card {
        padding: 24px 20px;
    }

    .tech-grid,
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .tech-card,
    .project-content {
        padding: 24px;
    }

    .contact-info-cards {
        flex-direction: column;
        gap: 16px;
    }

    .info-card {
        flex-direction: row;
        text-align: left;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 32px;
    }

    .section-title {
        font-size: 28px;
    }

    .nav-logo {
        font-size: 18px;
    }

    .about-lead {
        font-size: 16px;
    }

    .image-wrapper {
        width: 240px;
        height: 240px;
    }

    .hero-logo-container {
        min-height: 250px;
    }

    .hero-logo {
        max-width: 220px;
    }

    .project-logo {
        padding: 24px;
    }

    .project-logo img {
        max-width: 120px;
        max-height: 120px;
    }

    /* Larger size for CADERNO on mobile */
    .projects-grid .project-card:nth-child(3) .project-logo img {
        max-width: 150px;
        max-height: 150px;
    }

    .code-content {
        padding: 16px;
    }

    .code-content pre {
        font-size: 12px;
    }
}
