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

:root {
    --primary-color: #0f172a;
    --secondary-color: #111827;
    --accent-color: #3b82f6;            /* Softer blue for buttons/links */
    --text-color: #0f172a;
    --text-light: #6b7280;
    --bg-color: #f9fafb;
    --bg-gray: #ffffff;
    --border-color: #e5e7eb;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.18);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.5;
    color: var(--text-color);
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--bg-color);
    box-shadow: 0 1px 0 rgba(148, 163, 184, 0.25);
    z-index: 1000;
}

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

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.75rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover {
    color: var(--accent-color);
    transform: translateY(-1px);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    padding: 120px 0 96px;
    background-image: url('images/Generic_TartanWave.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 0;
}

.hero .container {
    position: relative;
    z-index: 1;
}

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

.hero-image img {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid white;
    box-shadow: var(--shadow-lg);
}

.hero-text h1 {
    font-size: 2.75rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.hero-description {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.7rem 1.4rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-color);
    border: 1px solid rgba(148, 163, 184, 0.4);
}

.btn-secondary:hover {
    background-color: rgba(148, 163, 184, 0.08);
    transform: translateY(-2px);
}

/* Hero-specific button tweaks for better contrast on dark banner */
.hero .btn-secondary {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.7);
    background-color: rgba(15, 23, 42, 0.25);
}

.hero .btn-secondary:hover {
    background-color: rgba(15, 23, 42, 0.45);
}

.hero .btn-primary {
    box-shadow: 0 18px 45px rgba(37, 99, 235, 0.35);
}

.hero .btn-primary:hover {
    box-shadow: 0 24px 65px rgba(37, 99, 235, 0.45);
}

/* Sections */
.section {
    padding: 88px 0;
}

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

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

/* Experience Section */
.experience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.experience-card {
    background-color: var(--bg-gray);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.experience-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 80px rgba(15, 23, 42, 0.20);
    border-color: rgba(37, 99, 235, 0.45);
}

.experience-icon {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.experience-icon img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 0.5rem;
}

.experience-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.experience-company {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.experience-duration {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.experience-description {
    color: var(--text-light);
    line-height: 1.6;
}

/* Hobbies Section */
#hobbies {
    background-image: url('images/IMG_5618.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
}

#hobbies::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Dark overlay for readability on top of the photo */
    background-color: rgba(0, 0, 0, 0.55);
    z-index: 0;
}

#hobbies .container {
    position: relative;
    z-index: 1;
}

#hobbies .section-title {
    color: #ffffff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

@media (max-width: 768px) {
    /* iOS/Safari can behave poorly with fixed backgrounds */
    #hobbies {
        background-attachment: scroll;
    }
}

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

.hobby-card {
    text-align: center;
    padding: 2rem;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 1rem;
    transition: transform 0.3s ease;
    box-shadow: var(--shadow);
}

.hobby-card:hover {
    transform: translateY(-3px);
}

.hobby-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hobby-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.hobby-card p {
    color: var(--text-light);
}

/* Resume Section */
.resume-content {
    max-width: 800px;
    margin: 0 auto;
}

.resume-summary {
    background-color: var(--bg-gray);
    padding: 2rem;
    border-radius: 1rem;
    margin-bottom: 2rem;
}

.resume-summary h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.resume-section {
    margin-bottom: 2.5rem;
}

.resume-section h3 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.resume-item {
    margin-bottom: 1.5rem;
}

.resume-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.resume-item h4 {
    font-size: 1.25rem;
    color: var(--text-color);
}

.resume-date {
    color: var(--text-light);
    font-size: 0.9rem;
}

.resume-subtitle {
    color: var(--text-light);
}

.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

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

.resume-download {
    text-align: center;
    margin-top: 3rem;
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info h3,
.contact-form h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.contact-methods {
    margin-top: 2rem;
}

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

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

.contact-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.contact-item a:hover {
    text-decoration: underline;
}

/* Contact Form */
.contact-form {
    background-color: var(--bg-color);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
}

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

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--accent-color);
}

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

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

    .hamburger {
        display: flex;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-image {
        display: flex;
        justify-content: center;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

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

    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }

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

    .footer .container {
        flex-direction: column;
        gap: 1rem;
    }

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

    .experience-grid,
    .hobbies-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 1.75rem;
    }

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

    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}
