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

:root {
    --color-accent: #009bdf;
    --color-accent-dark: #0085c2;
    --color-light: #758398;
    --color-bg: #fff;
    --color-bg-alt: #f5f5f5;
    --color-border: #e0e0e0;
    --font-body: 'Inter', sans-serif;
    --font-heading: 'Playfair Display', serif;
    --max-width: 1150px;
    --max-width-nav: 1250px;
    --max-width-wide: 1200px;
    --transition: 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: #000;
    line-height: 1.4;
}

h1 { font-size: 5.75rem; font-weight: 900; }
h2 { font-size: 3rem; font-weight: 700; line-height: 1.45; }
h3 { font-size: 2.5rem; font-weight: 700; line-height: 1.45; }
h4 { font-size: 2rem; font-weight: 700; }
h5 { font-size: 1.5rem; font-weight: 600; }
h6 { font-size: 1rem; font-weight: 500; }

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: #000;
    background: var(--color-bg);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

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

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.hero .container,
.footer .container {
    max-width: var(--max-width-wide);
}

/* ===== Navbar ===== */
.navbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: transparent;
}

.nav-container {
    max-width: var(--max-width-nav);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding-top: 0;
}

.nav-logo {
    display: flex;
    align-items: center;
    margin-left: -36.5px;
    margin-top: -60px;
}

.logo-img {
    height: 250px;
    width: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
    padding-top: 30px;
}

.nav-links a {
    font-family: var(--font-heading);
    font-weight: 400;
    text-transform: uppercase;
    padding: 8px 0;
    position: relative;
}

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

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #000;
    transition: var(--transition);
}

/* ===== Hero ===== */
.hero {
    padding: 180px 0 30px;
    background: var(--color-bg-alt);
    position: relative;
    overflow: visible;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 818px;
    height: 825px;
    background-image: url('/static/images/bg-02-free-img.png');
    background-position: 100% 0%;
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.hero-label {
    font-family: var(--font-body);
    text-transform: uppercase;
    color: var(--color-light);
    margin-bottom: 20px;
    padding-bottom: 8px;
    display: inline-block;
    position: relative;
}

.hero-label::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 2px;
    background-color: #000;
}

.hero-tagline {
    color: var(--color-light);
    margin-top: 20px;
}

.hero-contact-info {
    display: flex;
    align-items: center;
    gap: 12px;
    text-transform: uppercase;
    margin-top: 50px;
}

.hero-contact-info svg {
    flex-shrink: 0;
    width: 25px;
    height: 25px;
    fill: var(--color-accent);
}

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

.hero-image img {
    border-radius: 500px;
    max-width: none;
    width: 650px;
    box-shadow: rgba(0, 0, 0, 0.5) 0px 0px 10px 0px;
}

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

.section-label {
    font-family: var(--font-body);
    text-transform: capitalize;
    color: var(--color-accent);
    font-weight: 500;
    margin-bottom: 20px;
}

.section-heading {
    color: var(--color-accent);
    margin-bottom: 32px;
    font-weight: 700;
    line-height: 1.3;
}

.section-body {
    max-width: none;
}

.section-body p {
    margin-bottom: 20px;
    line-height: 1.8;
}

.section-body p ~ p,
.content-text p ~ p {
    color: var(--color-light);
}

.section-body h3 {
    font-weight: 700;
    line-height: 1.5;
}

.section-body h4 {
    font-weight: 700;
    margin: 24px 0 12px;
}

/* ===== Content with Image Layout ===== */
.content-with-image {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 60px;
    align-items: start;
}

.content-left {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.content-left .section-heading {
    margin-bottom: 0;
}

/* ===== University Lists ===== */
.university-list {
    list-style: disc;
    padding: 0 0 0 20px;
    margin: 0 0 24px 0;
}

.university-list li {
    padding: 6px 0;
}

/* ===== Skills & Experience ===== */
.skills-section h2,
.experience-section h2 {
    margin-bottom: 32px;
    font-weight: 700;
}

.skill-item {
    margin-bottom: 20px;
}

.skill-name {
    margin-bottom: 6px;
    display: block;
}

.skill-bar {
    height: 24px;
    background: var(--color-border);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.skill-fill {
    width: 0;
    height: 100%;
    background: var(--color-accent);
    transition: width 1s ease;
}

.skill-percent {
    font-weight: 600;
    color: #fff;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.skill-bar-wrapper {
    position: relative;
}

/* ===== Timeline (Experience) ===== */
.timeline {
    position: relative;
    padding-left: 0;
}

.timeline-item {
    position: relative;
    margin-bottom: 48px;
    display: grid;
    grid-template-columns: 140px 30px 1fr;
    gap: 8px;
    align-items: start;
}

.timeline-date-col {
    text-align: right;
    padding-top: 4px;
}

.timeline-date {
    font-weight: 700;
    text-transform: uppercase;
    padding-bottom: 6px;
    border-bottom: 2px solid #000;
    display: block;
}

.timeline-company {
    margin-top: 8px;
    color: var(--color-light);
}

.timeline-arrow {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 20px;
}

.timeline-arrow svg {
    width: 18px;
    height: 18px;
    fill: #000;
}

.timeline-content h5 {
    margin-bottom: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.timeline-content p {
    line-height: 1.7;
    margin-bottom: 8px;
}

/* ===== Full-width background image divider ===== */
.bg-divider {
    width: 100%;
    height: 400px;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-tagline {
    margin-bottom: 16px;
    font-style: italic;
    color: var(--color-light);
}

.footer-cta {
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 6px;
}

.footer-social-title {
    margin-bottom: 16px;
    text-align: right;
}

.footer-social-links {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--color-light);
    border-radius: 4px;
}

.social-icon svg {
    width: 14px;
    height: 14px;
    fill: #fff;
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid var(--color-border);
}

img.emoji {
    display: inline;
    width: 1em;
    height: 1em;
    vertical-align: -0.1em;
    margin: 0 2px;
}

/* ===== Contact Page ===== */
.contact-hero {
    padding: 140px 0 40px;
    background: var(--color-bg-alt);
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.contact-bg-image {
    border-radius: 8px;
    width: 100%;
}

.contact-form-wrapper h2 {
    margin-bottom: 12px;
}

.contact-form-wrapper > p {
    margin-bottom: 32px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
}

.required {
    color: #e74c3c;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-family: var(--font-body);
    transition: border-color var(--transition), box-shadow var(--transition);
    background: #fff;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(84, 179, 214, 0.15);
}

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

.btn {
    display: inline-block;
    padding: 14px 36px;
    font-family: var(--font-body);
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition);
}

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

.btn-primary:hover {
    background: var(--color-accent-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(84, 179, 214, 0.3);
}

/* ===== Flash Messages (Lightbox) ===== */
.flash-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.flash-modal {
    background: #fff;
    border-radius: 8px;
    padding: 32px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.flash {
    padding: 14px 20px;
    border-radius: 4px;
    margin-bottom: 16px;
}

.flash-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.flash-close {
    padding: 10px 32px;
    background: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

/* ===== 404 ===== */
.error-page h3 {
    margin-bottom: 12px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    h1 { font-size: 2.75rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }
    h5 { font-size: 1.15rem; }

    .nav-toggle {
        display: flex;
    }

    .nav-logo {
        margin-left: -20px;
        margin-top: -30px;
    }

    .logo-img {
        height: 130px;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 80px 24px 24px;
        gap: 16px;
        border-bottom: 1px solid var(--color-border);
        transform: translateY(-120%);
        transition: transform var(--transition);
        z-index: 99;
    }

    .nav-links.open {
        transform: translateY(0);
    }

    .hero {
        padding: 100px 0 30px;
        overflow: hidden;
    }

    .hero::before {
        width: 100%;
        height: 300px;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        text-align: center;
    }

    .hero-contact-info {
        justify-content: center;
    }

    .hero-image {
        order: -1;
        max-width: 280px;
        margin: 0 auto;
    }

    .hero-image img {
        max-width: 100%;
        width: 100%;
    }

    .content-with-image {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .contact-hero {
        padding: 100px 0 24px;
    }

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

    .contact-info {
        display: none;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 32px 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-social-title {
        text-align: left;
    }

    .footer-social-links {
        justify-content: flex-start;
    }

    .timeline-item {
        grid-template-columns: 80px 24px 1fr;
    }

    .bg-divider {
        height: 200px;
        background-attachment: scroll;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.5rem; }

    .hero {
        padding: 80px 0 24px;
    }

    .hero-image {
        max-width: 220px;
    }

    .timeline-item {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .timeline-date-col {
        text-align: left;
    }

    .timeline-arrow {
        display: none;
    }
}
