/* =============================================
   Edmund Dionisio Portfolio - Main Stylesheet
   Color Theme: Blue and Black
   ============================================= */

/* =============================================
   CSS Variables
   ============================================= */
:root {
    /* Colors */
    --color-primary: #4a90d9;
    --color-primary-dark: #2563ab;
    --color-primary-light: #6ba3df;
    --color-secondary: #0ea5e9;
    --color-accent: #38bdf8;

    --color-bg-dark: #0a0e14;
    --color-bg-darker: #050810;
    --color-bg-card: #121820;
    --color-bg-hover: #1a2332;

    --color-text-primary: #e5e7eb;
    --color-text-secondary: #9ca3af;
    --color-text-tertiary: #6b7280;

    --color-border: #1e293b;
    --color-border-light: #334155;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-code: 'Fira Code', 'Courier New', monospace;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(74, 144, 217, 0.3);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg-dark);
    color: var(--color-text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-light);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* =============================================
   Container & Layout
   ============================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

section {
    padding: var(--spacing-xl) 0;
    position: relative;
}

/* =============================================
   Navigation
   ============================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(10, 14, 20, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
    transition: all var(--transition-normal);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
    background-color: rgba(10, 14, 20, 0.98);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 110px;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-code);
    color: var(--color-text-primary);
    display: flex;
    align-items: center;
}

.navbar-banner {
    height: 90px;
    width: auto;
    max-width: 300px;
    object-fit: contain;
}

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

.logo-text {
    margin: 0 0.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--color-text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 0.5rem 0;
    transition: color var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    transition: width var(--transition-normal);
}

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

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 0.4rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--color-text-primary);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

/* =============================================
   Hero Section
   ============================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.network-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(74, 144, 217, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(74, 144, 217, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.greeting {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--color-text-secondary);
    font-weight: 400;
}

.name {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
    min-height: 3rem;
    font-weight: 500;
}

.typing-wrapper {
    display: inline-flex;
    align-items: center;
}

.cursor {
    color: var(--color-primary);
    animation: blink 1s infinite;
    margin-left: 0.1rem;
}

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

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

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-tertiary);
    font-size: 0.875rem;
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 24px;
    height: 24px;
    border-left: 2px solid var(--color-primary);
    border-bottom: 2px solid var(--color-primary);
    transform: rotate(-45deg);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* =============================================
   Buttons
   ============================================= */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    cursor: pointer;
    border: 2px solid transparent;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    color: white;
}

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

.btn-secondary:hover {
    background-color: var(--color-primary);
    color: white;
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--color-border-light);
    color: var(--color-text-primary);
}

.btn-outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background-color: rgba(74, 144, 217, 0.1);
}

/* =============================================
   Section Titles
   ============================================= */
.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
    border-radius: 2px;
}

.section-intro {
    text-align: center;
    color: var(--color-text-secondary);
    max-width: 800px;
    margin: 0 auto 3rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* =============================================
   About Section
   ============================================= */
.about {
    background-color: var(--color-bg-darker);
}

.about-content {
    max-width: 900px;
    margin: 3rem auto 0;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--color-text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
}

.about-text .lead {
    font-size: 1.25rem;
    color: var(--color-text-primary);
    font-weight: 500;
}

.about-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    padding: 2rem;
    background-color: var(--color-bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
}

.highlight-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.highlight-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* =============================================
   Experience Timeline
   ============================================= */
.experience {
    background-color: var(--color-bg-dark);
}

.timeline {
    max-width: 900px;
    margin: 3rem auto 0;
    position: relative;
    padding-left: 3rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--color-primary), var(--color-accent));
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    padding-left: 2rem;
}

.timeline-marker {
    position: absolute;
    left: -3rem;
    top: 0.5rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--color-primary);
    border: 3px solid var(--color-bg-dark);
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.3);
}

.timeline-content {
    background-color: var(--color-bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    transition: all var(--transition-normal);
}

.timeline-content:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-glow);
    transform: translateX(0.5rem);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.timeline-header h3 {
    font-size: 1.5rem;
    color: var(--color-primary);
}

.timeline-date {
    color: var(--color-text-tertiary);
    font-size: 0.9rem;
    font-family: var(--font-code);
}

.timeline-description ul {
    list-style: none;
    padding-left: 0;
}

.timeline-description li {
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    position: relative;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.timeline-description li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-weight: bold;
}

/* =============================================
   Skills Section
   ============================================= */
.skills {
    background-color: var(--color-bg-darker);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.skill-category {
    background-color: var(--color-bg-card);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    transition: all var(--transition-normal);
}

.skill-category:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-glow);
}

.skill-category h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-primary);
    text-align: center;
}

.skill-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skill-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skill-name {
    color: var(--color-text-primary);
    font-size: 0.95rem;
    font-weight: 500;
}

.skill-bar {
    height: 8px;
    background-color: var(--color-bg-hover);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    border-radius: var(--radius-sm);
    transition: width 1s ease-in-out;
    animation: skillLoad 1.5s ease-in-out;
}

@keyframes skillLoad {
    from { width: 0; }
}

/* =============================================
   Certifications Section
   ============================================= */
.certifications {
    background-color: var(--color-bg-dark);
}

.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.cert-placeholder {
    background-color: var(--color-bg-card);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    border: 2px dashed var(--color-border-light);
    text-align: center;
    transition: all var(--transition-normal);
}

.cert-placeholder:hover {
    border-color: var(--color-primary);
    border-style: solid;
    transform: translateY(-5px);
}

.cert-icon {
    color: var(--color-primary);
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
}

.cert-placeholder h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    color: var(--color-text-primary);
}

.cert-placeholder p {
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.cert-badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background-color: rgba(74, 144, 217, 0.1);
    color: var(--color-primary);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid var(--color-primary);
}

/* =============================================
   Projects Section
   ============================================= */
.projects {
    background-color: var(--color-bg-darker);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    background-color: var(--color-bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--color-border);
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-color: var(--color-primary);
}

.project-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: var(--color-bg-hover);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex-grow: 1;
}

.project-content h3 {
    font-size: 1.5rem;
    color: var(--color-primary);
}

.project-content p {
    color: var(--color-text-secondary);
    line-height: 1.6;
    flex-grow: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    padding: 0.375rem 0.875rem;
    background-color: rgba(74, 144, 217, 0.1);
    color: var(--color-primary);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    border: 1px solid rgba(74, 144, 217, 0.3);
}

/* =============================================
   Contact Section
   ============================================= */
.contact {
    background-color: var(--color-bg-dark);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 3rem;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--color-primary);
}

.contact-info p {
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.contact-item svg {
    flex-shrink: 0;
    color: var(--color-primary);
    margin-top: 0.25rem;
}

.contact-item h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--color-text-primary);
}

.contact-item p,
.contact-item a {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
}

.contact-form-container {
    background-color: var(--color-bg-card);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    color: var(--color-text-primary);
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    padding: 0.875rem;
    background-color: var(--color-bg-hover);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.1);
}

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

.form-note {
    font-size: 0.875rem;
    color: var(--color-text-tertiary);
    text-align: center;
    margin-top: -0.5rem;
}

/* =============================================
   Footer
   ============================================= */
.footer {
    background-color: var(--color-bg-darker);
    padding: 2rem 0;
    border-top: 1px solid var(--color-border);
}

.footer-content {
    text-align: center;
    color: var(--color-text-tertiary);
}

.footer-content p {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

/* =============================================
   Responsive Design
   ============================================= */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 130px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 130px);
        background-color: rgba(10, 14, 20, 0.98);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 1.5rem;
        gap: 0;
        transition: left var(--transition-normal);
        border-top: 1px solid var(--color-border);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        width: 100%;
        text-align: center;
        padding: 1.25rem 1rem;
        font-size: 1.1rem;
        border-bottom: 1px solid var(--color-border);
        min-height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 0;
    }

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

    .navbar-banner {
        height: 68px;
        max-width: 225px;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

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

    .contact-content {
        grid-template-columns: 1fr;
    }

    .timeline {
        padding-left: 2rem;
    }

    .timeline-marker {
        left: -2rem;
    }

    .about-highlights {
        grid-template-columns: 1fr;
    }

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

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

@media (max-width: 480px) {
    :root {
        --spacing-lg: 3rem;
        --spacing-xl: 4rem;
    }

    .nav-container {
        padding: 2rem 1rem;
        min-height: 110px;
    }

    section {
        padding: var(--spacing-lg) 0;
    }

    .container {
        padding: 0 var(--spacing-sm);
    }

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

    .navbar-banner {
        height: 53px;
        max-width: 180px;
    }

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

/* =============================================
   Utility Classes
   ============================================= */
.text-center {
    text-align: center;
}

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

.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }

.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }

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

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Smooth scrolling offset for fixed navbar */
section {
    scroll-margin-top: 120px;
}
