/* 
 * Rick Rodriguez Jr. Website
 * Main Stylesheet
 * Color Scheme: White and Orange
 */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    /* White and orange color scheme */
    --primary-orange: #ff6b35;
    --accent-orange: #ff8c42;
    --dark-orange: #d94e1f;
    --light-gray: #f9f9f9;
    --medium-gray: #e8e8e8;
    --text-dark: #2a2a2a;
    --text-light: #666;
    --white: #ffffff;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Work Sans', sans-serif;
    color: var(--text-dark);
    line-height: 1.7;
    background: var(--white);
    overflow-x: hidden;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3 {
    font-family: 'DM Serif Display', serif;
    font-weight: normal;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--white);
    z-index: 1000;
    border-bottom: 1px solid var(--medium-gray);
    animation: slideDown 0.6s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'DM Serif Display', serif;
    font-size: 1.5rem;
    color: var(--primary-orange);
    text-decoration: none;
    font-weight: normal;
}

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

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-orange);
    transition: width 0.3s ease;
}

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

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

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-orange);
    cursor: pointer;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
main {
    margin-top: 80px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    padding: 8rem 0 6rem;
    animation: fadeIn 0.8s ease 0.3s both;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text {
    order: 1;
}

.hero-image {
    order: 2;
}

.hero h1 {
    font-size: 4rem;
    color: var(--dark-orange);
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero .subtitle {
    font-size: 1.4rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    font-weight: 300;
}

.hero .description {
    font-size: 1.1rem;
    color: var(--text-dark);
    max-width: 700px;
    line-height: 1.8;
}

.profile-image {
    width: 100%;
    max-width: 400px;
    border-radius: 4px;
    box-shadow: 0 8px 30px rgba(255, 107, 53, 0.2);
    margin-bottom: 3rem;
}

/* ============================================
   SECTIONS
   ============================================ */
section {
    padding: 5rem 0;
    animation: fadeIn 0.8s ease both;
}

section:nth-child(even) {
    background: var(--light-gray);
}

.section-title {
    font-size: 2.5rem;
    color: var(--dark-orange);
    margin-bottom: 3rem;
}

.section-subtitle {
    font-size: 1.3rem;
    color: var(--primary-orange);
    margin-bottom: 1rem;
    font-weight: 500;
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.highlight-box {
    background: var(--white);
    padding: 2rem;
    border-left: 4px solid var(--accent-orange);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.highlight-box h3 {
    color: var(--primary-orange);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.highlight-box ul {
    list-style: none;
    padding: 0;
}

.highlight-box li {
    padding: 0.5rem 0;
    color: var(--text-dark);
}

.highlight-box li::before {
    content: '→';
    color: var(--accent-orange);
    margin-right: 0.5rem;
    font-weight: bold;
}

/* ============================================
   SKILLS GRID
   ============================================ */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.skill-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 2px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.15);
}

.skill-card h3 {
    color: var(--primary-orange);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.skill-card ul {
    list-style: none;
    padding: 0;
}

.skill-card li {
    padding: 0.4rem 0;
    color: var(--text-dark);
    font-size: 0.95rem;
}

/* ============================================
   VALUES SECTION
   ============================================ */
.values-content {
    max-width: 800px;
}

.values-content p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
    text-align: center;
    padding: 6rem 0;
}

.cta-section h2 {
    font-size: 2.5rem;
    color: var(--dark-orange);
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.btn-primary {
    background: var(--primary-orange);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--dark-orange);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-orange);
    border: 2px solid var(--primary-orange);
}

.btn-secondary:hover {
    background: var(--primary-orange);
    color: var(--white);
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background: var(--dark-orange);
    color: var(--white);
    padding: 3rem 0 2rem;
    text-align: center;
}

footer p {
    opacity: 0.8;
    font-size: 0.95rem;
}

footer a {
    color: var(--accent-orange);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* ============================================
   RESUME PAGE SPECIFIC STYLES
   ============================================ */
.resume-header {
    padding: 4rem 0 3rem;
    text-align: center;
    animation: fadeIn 0.8s ease;
    opacity: 1 !important; /* Ensure always visible */
}

.resume-header h1 {
    font-size: 3rem;
    color: var(--dark-orange);
    margin-bottom: 0.5rem;
}

.resume-header .contact-info {
    color: var(--text-light);
    font-size: 1.1rem;
}

.resume-header .contact-info a {
    color: var(--primary-orange);
    text-decoration: none;
}

.resume-header .contact-info a:hover {
    text-decoration: underline;
}

.resume-section {
    padding: 3rem 0;
    animation: fadeIn 0.8s ease both;
    opacity: 1 !important; /* Ensure always visible */
}

.resume-section:nth-child(even) {
    background: var(--light-gray);
}

.resume-section .section-title {
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--accent-orange);
    font-size: 2rem;
}

.summary {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.experience-item, .education-item {
    margin-bottom: 2.5rem;
}

.experience-item:last-child, .education-item:last-child {
    margin-bottom: 0;
}

.job-header {
    margin-bottom: 1rem;
}

.job-title {
    font-size: 1.3rem;
    color: var(--primary-orange);
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.company {
    font-size: 1.1rem;
    color: var(--text-dark);
    font-weight: 500;
}

.location-date {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-top: 0.3rem;
}

.job-description {
    margin-top: 1rem;
    line-height: 1.8;
}

.job-description ul {
    margin-top: 0.75rem;
    padding-left: 1.5rem;
}

.job-description li {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.skill-category {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 2px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.skill-category h3 {
    color: var(--primary-orange);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.skill-category ul {
    list-style: none;
    padding: 0;
}

.skill-category li {
    padding: 0.4rem 0;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.skill-category li::before {
    content: '•';
    color: var(--accent-orange);
    font-weight: bold;
    margin-right: 0.5rem;
}

.download-section {
    text-align: center;
    padding: 3rem 0;
}

/* ============================================
   404 PAGE SPECIFIC STYLES
   ============================================ */
body.error-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.error-page main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
}

.error-container {
    max-width: 800px;
    text-align: center;
    animation: fadeIn 0.8s ease;
}

.error-code {
    font-family: 'Fira Code', monospace;
    font-size: 10rem;
    font-weight: 700;
    color: var(--primary-orange);
    line-height: 1;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    animation: glitch 3s infinite;
}

@keyframes glitch {
    0%, 90%, 100% {
        transform: translate(0);
    }
    92% {
        transform: translate(-2px, 2px);
    }
    94% {
        transform: translate(2px, -2px);
    }
    96% {
        transform: translate(-2px, -2px);
    }
    98% {
        transform: translate(2px, 2px);
    }
}

.error-code::before {
    content: '404';
    position: absolute;
    left: 2px;
    top: 0;
    color: var(--dark-orange);
    opacity: 0.8;
    z-index: -1;
    animation: glitchBefore 3s infinite;
}

@keyframes glitchBefore {
    0%, 90%, 100% {
        transform: translate(0);
        opacity: 0;
    }
    92% {
        transform: translate(-3px, 0);
        opacity: 0.8;
    }
    94% {
        transform: translate(3px, 0);
        opacity: 0;
    }
}

.error-message {
    background: var(--light-gray);
    border-left: 4px solid var(--primary-orange);
    padding: 2rem;
    margin: 2rem 0;
    text-align: left;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    animation: slideUp 0.8s ease 0.3s both;
}

.error-message .comment {
    color: var(--text-light);
    font-style: italic;
}

.error-message .keyword {
    color: var(--dark-orange);
    font-weight: 600;
}

.error-message .string {
    color: var(--primary-orange);
}

.error-message .function {
    color: #2a7f9f;
}

.cursor {
    display: inline-block;
    width: 10px;
    height: 20px;
    background: var(--primary-orange);
    animation: blink 1s step-end infinite;
    margin-left: 2px;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

.error-title {
    font-size: 2.5rem;
    color: var(--dark-orange);
    margin-bottom: 1rem;
}

.error-description {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 3rem;
    line-height: 1.8;
}

.action-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: slideUp 0.8s ease 0.5s both;
}

.suggestions {
    margin-top: 3rem;
    text-align: left;
    animation: fadeIn 1s ease 0.8s both;
}

.suggestions h3 {
    font-size: 1.2rem;
    color: var(--dark-orange);
    margin-bottom: 1rem;
    font-weight: 600;
}

.suggestions ul {
    list-style: none;
    padding: 0;
}

.suggestions li {
    padding: 0.5rem 0;
    color: var(--text-dark);
}

.suggestions li::before {
    content: '→';
    color: var(--primary-orange);
    margin-right: 0.5rem;
    font-weight: bold;
}

.suggestions a {
    color: var(--primary-orange);
    text-decoration: none;
}

.suggestions a:hover {
    text-decoration: underline;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero .subtitle {
        font-size: 1.1rem;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-text {
        order: 2;
    }

    .hero-image {
        order: 1;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 1rem 2rem;
        border-bottom: 1px solid var(--medium-gray);
        gap: 1rem;
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .section-title {
        font-size: 2rem;
    }

    section {
        padding: 3rem 0;
    }

    .cta-buttons,
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    /* Resume page mobile */
    .resume-header h1 {
        font-size: 2rem;
    }

    .resume-section .section-title {
        font-size: 1.5rem;
    }

    /* 404 page mobile */
    .error-code {
        font-size: 6rem;
    }

    .error-title {
        font-size: 1.8rem;
    }

    .error-description {
        font-size: 1rem;
    }

    .error-message {
        font-size: 0.75rem;
        padding: 1.5rem;
    }
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    /* Only apply animation to sections in main content, not resume-header */
    main section:not(.resume-header):not(.resume-section) {
        opacity: 0;
        animation: fadeIn 0.8s ease forwards;
    }

    main section:nth-child(1) { animation-delay: 0.1s; }
    main section:nth-child(2) { animation-delay: 0.2s; }
    main section:nth-child(3) { animation-delay: 0.3s; }
    main section:nth-child(4) { animation-delay: 0.4s; }
    main section:nth-child(5) { animation-delay: 0.5s; }
    main section:nth-child(6) { animation-delay: 0.6s; }
    main section:nth-child(7) { animation-delay: 0.7s; }
    main section:nth-child(8) { animation-delay: 0.8s; }
    main section:nth-child(9) { animation-delay: 0.9s; }
    main section:nth-child(10) { animation-delay: 1.0s; }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    header, footer, .download-section, .cta-section {
        display: none;
    }

    main {
        margin-top: 0;
    }

    .resume-section {
        page-break-inside: avoid;
    }

    section {
        animation: none;
        opacity: 1;
    }
}
