/* ==========================================
   PORTFOLIO - STYLES & ANIMATIONS
   Color Palette: Indigo, Violet, Fuchsia accent, Cool Grays
   ========================================== */

/* Reset & Variables */
:root {
    /* Primary Colors - Indigo + Violet */
    --cyan: #7c3aed;          /* violet (secondary) */
    --cyan-light: #ede9fe;    /* violet-100 */
    --blue: #4f46e5;          /* indigo (primary) */
    --blue-light: #e0e7ff;    /* indigo-100 */
    --orange: #c026d3;        /* fuchsia (accent) */
    --orange-light: #fae8ff;  /* fuchsia-100 */
    --white: #ffffff;
    --light-bg: #f8fafc;
    --light-gray: #e2e8f0;
    --gray: #4b5563;          /* cool gray-600 */
    --dark: #1e1b4b;          /* indigo-950 */

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);

    /* Transitions */
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--white);
}

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

/* ==========================================
   NAVIGATION
   ========================================== */
.navbar {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 100;
    animation: slideDown 0.6s ease;
}

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

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    list-style: none;
    gap: 1rem 1.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}

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

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

/* ==========================================
   HERO SECTION
   ========================================== */
.hero {
    padding: 6rem 2rem;
    background: linear-gradient(135deg, var(--light-bg), var(--blue-light));
    animation: fadeIn 0.8s ease;
}

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

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hero-image-wrapper {
    margin-bottom: 2rem;
    animation: scaleIn 0.8s ease 0.2s both;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.hero-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: slideUp 0.8s ease 0.3s both;
}

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

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--cyan);
    margin-bottom: 1rem;
    animation: slideUp 0.8s ease 0.4s both;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--gray);
    margin-bottom: 2rem;
    line-height: 1.8;
    animation: slideUp 0.8s ease 0.5s both;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: slideUp 0.8s ease 0.6s both;
}

/* ==========================================
   BUTTONS
   ========================================== */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(79, 70, 229, 0.3);
}

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

.btn-secondary:hover {
    background: var(--blue-light);
    transform: translateY(-2px);
}

/* ==========================================
   SECTION STYLING
   ========================================== */
.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--dark);
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* About Section */
.about {
    padding: 5rem 2rem;
    background-color: var(--white);
}

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

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

.about-text p.about-lead {
    font-size: 1.3rem;
    font-weight: 500;
    font-style: italic;
    color: var(--dark);
    border-left: 3px solid var(--cyan);
    padding-left: 1.25rem;
    margin-bottom: 2rem;
}

.about-photo img {
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
    aspect-ratio: 4 / 5;
}

.about-highlights {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.highlight-card {
    padding: 2rem;
    background: linear-gradient(135deg, var(--blue-light), var(--cyan-light));
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.highlight-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.highlight-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.highlight-label {
    color: var(--gray);
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

/* Philosophy / How I Work Section */
.philosophy {
    padding: 5rem 2rem;
    background: linear-gradient(135deg, var(--blue-light), var(--cyan-light));
}

.philosophy-intro {
    text-align: center;
    color: var(--gray);
    font-size: 1.1rem;
    margin-top: -1.5rem;
    margin-bottom: 3rem;
}

.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
}

.philosophy-card {
    padding: 2rem;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: var(--transition);
}

.philosophy-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.philosophy-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 1rem;
}

.philosophy-card h3 {
    color: var(--blue);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.philosophy-card p {
    color: var(--gray);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Projects Section */
.projects {
    padding: 5rem 2rem;
    background-color: var(--light-bg);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.project-header {
    padding: 2rem;
    color: var(--white);
}

.project-header h3 {
    font-size: 1.5rem;
}

.project-body {
    padding: 2rem;
}

.project-body p {
    color: var(--gray);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.project-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.badge {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: linear-gradient(135deg, var(--blue-light), var(--cyan-light));
    color: var(--blue);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.project-link {
    display: inline-block;
    color: var(--blue);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.project-link:hover {
    color: var(--cyan);
    transform: translateX(5px);
}

/* Skills Section */
.skills {
    padding: 5rem 2rem;
    background-color: var(--white);
}

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

.skill-category {
    padding: 2rem;
    background: linear-gradient(135deg, var(--blue-light), var(--cyan-light));
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.skill-category h3 {
    color: var(--blue);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

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

.skill-category li {
    color: var(--dark);
    padding: 0.5rem 0;
    font-weight: 500;
    position: relative;
    padding-left: 1.5rem;
}

.skill-category li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--cyan);
    font-weight: bold;
}

/* Resume Section */
.resume {
    padding: 5rem 2rem;
    background-color: var(--light-bg);
}

.resume-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.resume-item {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--light-gray);
}

.resume-item:last-child {
    border-bottom: none;
}

.resume-item h4 {
    color: var(--dark);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.resume-year {
    color: var(--cyan);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.resume-item p {
    color: var(--gray);
    line-height: 1.8;
}

.resume-download,
.resume-note {
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.resume-download {
    background: linear-gradient(135deg, var(--blue-light), var(--cyan-light));
}

.resume-note {
    background: linear-gradient(135deg, var(--orange-light), rgba(192, 38, 211, 0.1));
}

.resume-download h3,
.resume-note h3 {
    margin-bottom: 1rem;
    color: var(--dark);
}

.resume-download p,
.resume-note p {
    color: var(--gray);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.resume-note-list {
    list-style: none;
    margin-bottom: 1rem;
}

.resume-note-list li {
    padding: 0.35rem 0;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
}

.resume-note-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--cyan);
    font-weight: bold;
}

.resume-note a:not(.btn) {
    color: var(--blue);
    font-weight: 600;
    text-decoration: none;
}

.resume-note a:not(.btn):hover {
    color: var(--cyan);
    text-decoration: underline;
}

/* Off the Clock Section */
.pastimes {
    padding: 5rem 2rem;
    background-color: var(--white);
}

.pastimes-intro {
    text-align: center;
    color: var(--gray);
    font-size: 1.1rem;
    margin-top: -1.5rem;
    margin-bottom: 3rem;
}

.pastimes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 900px) {
    .pastimes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .pastimes-grid {
        grid-template-columns: 1fr;
    }
}

.pastime-card {
    display: flex;
    flex-direction: column;
    padding: 0.9rem;
    background: var(--light-bg);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.pastime-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.pastime-photo {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    margin-bottom: 1rem;
    object-fit: cover;
    display: block;
}

.pastime-body {
    padding: 0 0.6rem 0.4rem;
}

.pastime-body h3 {
    color: var(--blue);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.pastime-body p {
    color: var(--gray);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ==========================================
   PHOTO FRAMES (every picture on the page)
   ========================================== */
.hero-image,
.about-photo img,
.pastime-photo,
.contact-portrait {
    padding: 6px;
    background-color: var(--white);
    border: 1px solid var(--light-gray);
    box-shadow: var(--shadow-md);
}

/* Contact Section */
.contact {
    padding: 5rem 2rem;
    background: linear-gradient(135deg, var(--blue-light), var(--cyan-light));
}

.contact-content {
    text-align: center;
}

.contact-portrait {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    margin-bottom: 1.5rem;
}

.contact-content p {
    font-size: 1.1rem;
    color: var(--dark);
    margin-bottom: 2rem;
}

.contact-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: var(--white);
    color: var(--blue);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.contact-link:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    background: var(--orange-light);
    color: var(--orange);
}

.contact-icon {
    font-size: 1.3rem;
}

/* Footer */
.footer {
    padding: 2rem;
    background: var(--dark);
    color: var(--white);
    text-align: center;
}

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

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

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

    .btn {
        width: 100%;
        text-align: center;
    }

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

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

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

    .nav-links {
        gap: 1rem;
        font-size: 0.9rem;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

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

    .contact-links {
        gap: 1rem;
    }

    .contact-link {
        flex: 1;
        min-width: 150px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .hero {
        padding: 3rem 1rem;
    }

    .hero-image {
        width: 150px;
        height: 150px;
    }

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

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

    .nav-links {
        display: none;
    }

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

    .highlight-card {
        padding: 1.5rem;
    }
}

/* ==========================================
   REVEAL ON SCROLL
   ========================================== */
/* keep sideways-flying cards from nudging a scrollbar mid-animation */
section {
    overflow-x: clip;
}

.js .reveal,
.js .reveal-stagger > * {
    opacity: 0;
    translate: 0 90px;
    scale: 0.9;
    filter: blur(12px);
    transition: opacity 0.6s ease,
                translate 0.8s cubic-bezier(0.34, 1.56, 0.64, 1),
                scale 0.8s cubic-bezier(0.34, 1.56, 0.64, 1),
                filter 0.7s ease,
                transform 0.3s ease, box-shadow 0.3s ease;
}

/* Directional: staggered children fly in alternately from the sides */
.js .reveal-stagger > *:nth-child(odd) { translate: -80px 30px; }
.js .reveal-stagger > *:nth-child(even) { translate: 80px 30px; }

.js .reveal.is-visible,
.js .reveal-stagger.is-visible > * {
    opacity: 1;
    translate: 0;
    scale: 1;
    filter: blur(0);
}

.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.12s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.24s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.36s; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.48s; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.60s; }
.reveal-stagger.is-visible > *:nth-child(n+7) { transition-delay: 0.68s; }

@media (prefers-reduced-motion: reduce) {
    .js .reveal,
    .js .reveal-stagger > *,
    .js .reveal-stagger > *:nth-child(odd),
    .js .reveal-stagger > *:nth-child(even) {
        opacity: 1;
        translate: 0;
        scale: 1;
        filter: none;
        transition: none;
    }
}
