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

:root {
    --primary-color: #F7931A;
    --primary-dark: #d17e15;
    --secondary-color: #333333;
    --text-primary: #000000;
    --text-secondary: #333333;
    --bg-primary: #ffffff;
    --bg-secondary: #f9f9f9;
    --border-color: #e0e0e0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

.section {
    padding: 5rem 0;
    position: relative;
    z-index: 1;
    background-color: var(--bg-primary);
}

.section-alt {
    background-color: var(--bg-secondary);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

/* ===========================
   Navigation
   =========================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #000000;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
}

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

/* Dropdown Menu */
.nav-item-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--bg-primary);
    box-shadow: var(--shadow-md);
    border-radius: 0.5rem;
    padding: 0.5rem 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    margin-top: 0.5rem;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.nav-item-dropdown:hover .dropdown-menu,
.nav-item-dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    width: 100%;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
    white-space: normal;
}

.dropdown-menu a:hover {
    background-color: var(--bg-secondary);
    color: var(--primary-color);
}

/* ===========================
   Hero Section
   =========================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: #000000;
    z-index: 0;
}

.hero-image-container {
    position: absolute;
    top: 50%;
    left: 100px;
    transform: translateY(-50%);
    width: 500px;
    height: 500px;
    background-image: url('assets/headshot.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 50%;
    opacity: 1;
    z-index: -1;
}

.hero-content {
    position: relative;
    max-width: 600px;
    margin-left: 600px;
    margin-right: auto;
    text-align: center;
    z-index: 0;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 100;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-title .highlight {
    color: #000000;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

.hero-description {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    white-space: nowrap;
}

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

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

.btn i {
    margin-left: 0.5rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: #ffffff;
    color: #F7931A;
    border-color: #F7931A;
}

.btn-secondary:hover {
    background-color: #F7931A;
    color: #ffffff;
    border-color: #F7931A;
}

/* ===========================
   About Section
   =========================== */
.about-content {
    max-width: 800px;
    margin: 0 auto;
}

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

/* ===========================
   Experience Section - Timeline
   =========================== */
.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #000000;
}

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

.timeline-marker {
    position: absolute;
    left: 11px;
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #000000;
    border: 4px solid var(--bg-secondary);
}

.timeline-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #747474;
    margin-bottom: 0.25rem;
}

.timeline-content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #000000;
    margin-bottom: 0.5rem;
}

.timeline-date {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.timeline-content ul {
    list-style: disc;
    margin-left: 1.5rem;
}

.timeline-content li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* ===========================
   Skills Section
   =========================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.skill-category {
    background-color: var(--bg-primary);
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
}

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

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tag {
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--primary-color);
    transition: var(--transition);
}

.skill-tag:hover {
    transform: translateY(-2px);
}

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

.project-card {
    background-color: transparent;
    perspective: 1000px;
    height: 450px;
    cursor: pointer;
}

.project-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: left;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.project-card.flipped .project-card-inner {
    transform: rotateY(180deg);
}

.project-card-front,
.project-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 0.75rem;
}

.project-card-front {
    box-shadow: var(--shadow-md);
}

.project-card-front {
    background-color: var(--bg-primary);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.project-card-front .btn {
    margin-top: auto;
    flex-shrink: 0;
}

.project-card-back {
    background-color: transparent;
    transform: rotateY(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.project-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    border-radius: 0.75rem;
}

.click-to-flip {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: auto;
    padding-top: 1rem;
    opacity: 0.7;
}

button.click-to-flip {
    opacity: 1;
    width: 100%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-card-back .click-to-flip {
    position: absolute;
    bottom: 1rem;
    left: 2rem;
    right: 2rem;
    width: auto;
    margin: 0;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.project-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

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

.project-tag {
    padding: 0.25rem 0.75rem;
    background-color: var(--bg-secondary);
    color: var(--primary-color);
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
}

/* ===========================
   Resume Section
   =========================== */
.resume-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.resume-intro {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.resume-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.resume-viewer {
    width: 100%;
    height: 1000px;
    border: none;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
}

.resume-viewer iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ===========================
   Contact Section
   =========================== */
.contact-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-intro {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

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

.contact-method {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.25rem;
    background-color: var(--bg-primary);
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    font-size: 1.125rem;
    color: var(--text-primary);
}

.contact-method:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    color: var(--primary-color);
}

.contact-methods a:nth-child(2):hover {
    color: #0077B5;
}

.contact-method svg {
    flex-shrink: 0;
}

/* ===========================
   Schedule Section
   =========================== */
.schedule-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.schedule-intro {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.calendar-wrapper {
    width: 100%;
    height: 600px;
    overflow: hidden;
    position: relative;
}

.calendar-wrapper iframe {
    position: absolute;
    top: -100px;
    left: 0;
    width: 100%;
    height: 700px;
}

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

.footer p {
    opacity: 0.8;
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 60px;
        flex-direction: column;
        background-color: var(--bg-primary);
        width: 100%;
        text-align: center;
        transition: var(--transition);
        box-shadow: var(--shadow-md);
        padding: 2rem 0;
    }

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

    .nav-toggle {
        display: flex;
    }

    /* Dropdown in mobile */
    .dropdown-menu {
        position: static;
        box-shadow: none;
        background-color: var(--bg-secondary);
        border-radius: 0;
        margin-top: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: max-height 0.3s ease;
    }

    .nav-item-dropdown.active .dropdown-menu {
        max-height: 300px;
    }

    .dropdown-menu a {
        padding: 0.75rem 2rem;
        text-align: center;
    }

    .hero {
        padding: 6rem 0 4rem;
        flex-direction: column;
    }

    .hero-image-container {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        width: 300px;
        height: 300px;
        margin: 0 auto 2rem auto;
    }

    .hero-content {
        margin-left: auto;
        margin-right: auto;
        max-width: 100%;
        padding: 0 1rem;
    }

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

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

    .hero-description {
        font-size: 1.5rem;
        white-space: normal;
    }

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

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

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

    .timeline::before {
        left: 10px;
    }

    .timeline-item {
        padding-left: 40px;
    }

    .timeline-marker {
        left: 1px;
    }

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

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

    .resume-viewer {
        height: 600px;
    }
}

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

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

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

    .section {
        padding: 3rem 0;
    }
}
