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

:root {
    --color-bg: #0f1a2e;
    --color-surface: #152238;
    --color-border: #1e3150;
    --color-text: #e8edf4;
    --color-text-secondary: #8a9bba;
    --color-primary: #6988c4;
    --color-primary-hover: #849ed4;
    --color-accent: #0d1526;
    --color-sand: #141e33;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --max-width: 1100px;
    --radius: 8px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
    --transition: 0.2s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

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

ul {
    list-style: none;
}

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

/* ========== Navbar ========== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 26, 46, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-logo {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: -0.02em;
}

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

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: all var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-text);
    border-bottom-color: var(--color-primary);
}

.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: var(--color-text);
    border-radius: 2px;
    transition: all var(--transition);
}

/* ========== Hero ========== */
.hero {
    padding: 80px 0 0;
    overflow: hidden;
    background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-bg) 100%);
}

.hero-content {
    display: flex;
    align-items: flex-end;
    gap: 60px;
}

.hero-text {
    flex: 1;
    padding-bottom: 80px;
}

.hero-greeting {
    font-size: 1rem;
    color: var(--color-primary);
    font-weight: 500;
    margin-bottom: 8px;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 8px;
}

.hero h2 {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--color-text-secondary);
    margin-bottom: 20px;
}

.hero-description {
    font-size: 1.05rem;
    color: var(--color-text-secondary);
    max-width: 520px;
    margin-bottom: 32px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 12px;
}

.hero-image {
    flex-shrink: 0;
    position: relative;
    width: 420px;
    height: 500px;
}

/* Outer soft glow */
.hero-image::before {
    content: '';
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(105, 136, 196, 0.12) 0%, transparent 70%);
    z-index: 0;
}

.hero-image-bg {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: linear-gradient(145deg, #2a3a5c 0%, #3e5a8c 40%, #6988c4 100%);
    box-shadow:
        0 0 0 8px rgba(105, 136, 196, 0.1),
        0 0 0 20px rgba(105, 136, 196, 0.05),
        inset 0 -20px 40px rgba(0, 0, 0, 0.25),
        0 20px 50px rgba(0, 0, 0, 0.3);
    z-index: 0;
    overflow: hidden;
}

/* Decorative shimmer on the circle */
.hero-image-bg::before {
    content: '';
    position: absolute;
    top: -30%;
    left: -30%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 60%);
    border-radius: 50%;
}

/* Subtle pattern dots */
.hero-image-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 12px 12px;
}

.hero-image img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: bottom center;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.2));
}

/* ========== Buttons ========== */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 500;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all var(--transition);
    border: none;
    text-align: center;
}

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

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

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

.btn-secondary:hover {
    background: var(--color-surface);
    color: var(--color-text);
    border-color: var(--color-primary);
    transform: translateY(-1px);
}

/* ========== Section Titles ========== */
.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 40px;
}

/* ========== About ========== */
.about {
    padding: 80px 0;
    background: var(--color-sand);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 48px;
}

.about-text p {
    color: var(--color-text-secondary);
    margin-bottom: 16px;
    line-height: 1.7;
}

.about-interests h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.about-interests p {
    color: var(--color-text-secondary);
    line-height: 1.7;
}

/* ========== Skills Grid ========== */
.skills {
    padding: 80px 0;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.skill-card {
    padding: 28px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    transition: all var(--transition);
}

.skill-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.skill-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.skill-card p {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* ========== Tech Stack ========== */
.tech-stack {
    padding: 60px 0 80px;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tech-tag {
    display: inline-block;
    padding: 8px 16px;
    background: var(--color-accent);
    color: var(--color-primary);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* ========== Page Header ========== */
.page-header {
    padding: 60px 0 40px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
}

.page-header p {
    color: var(--color-text-secondary);
    font-size: 1.05rem;
}

/* ========== Resume Timeline ========== */
.resume-section {
    padding: 60px 0;
}

.resume-section + .resume-section {
    border-top: 1px solid var(--color-border);
}

.timeline {
    position: relative;
    padding-left: 32px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--color-border);
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -32px;
    top: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--color-bg);
    border: 3px solid var(--color-primary);
    background: var(--color-bg);
}

.timeline-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.timeline-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.timeline-date {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    font-weight: 500;
    white-space: nowrap;
}

.timeline-company {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    margin-bottom: 12px;
}

.timeline-content ul {
    list-style: disc;
    padding-left: 20px;
}

.timeline-content li {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-bottom: 6px;
    line-height: 1.6;
}

/* ========== Education ========== */
.education-card {
    padding: 28px;
    background: var(--color-surface);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
}

.education-card p:last-child {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-top: 8px;
}

/* ========== Projects ========== */
.projects-section {
    padding: 60px 0 80px;
}

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

.project-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all var(--transition);
}

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

.project-thumbnail {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.project-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-thumbnail {
    background: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    font-weight: 500;
    font-size: 0.95rem;
}

.project-info {
    padding: 20px;
}

.project-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.project-info p {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.project-tag {
    font-size: 0.75rem;
    padding: 4px 10px;
    background: var(--color-surface);
    color: var(--color-text-secondary);
    border-radius: 100px;
    font-weight: 500;
}

.project-link {
    font-size: 0.9rem;
    font-weight: 500;
}

/* ========== Contact ========== */
.contact-section {
    padding: 60px 0 80px;
}

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

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-family: var(--font-family);
    font-size: 0.9rem;
    background: var(--color-surface);
    color: var(--color-text);
    transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(105, 136, 196, 0.2);
}

.form-group textarea {
    resize: vertical;
}

.form-status {
    margin-top: 12px;
    font-size: 0.9rem;
    font-weight: 500;
}

.form-status.success {
    color: #16a34a;
}

.form-status.error {
    color: #dc2626;
}

.contact-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-link-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--color-surface);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    transition: all var(--transition);
}

.contact-link-item:hover {
    border-color: var(--color-primary);
    color: var(--color-text);
    transform: translateX(4px);
}

.contact-link-label {
    font-weight: 600;
    font-size: 0.9rem;
}

.contact-link-item span:last-child {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

/* ========== Footer ========== */
.footer {
    border-top: 1px solid var(--color-border);
    padding: 32px 0;
}

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

.footer p {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

.footer-links a:hover {
    color: var(--color-text);
}

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

    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--color-surface);
        border-bottom: 1px solid var(--color-border);
        padding: 16px 24px;
        gap: 0;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        padding: 12px 0;
        border-bottom: none;
    }

    .hero {
        padding: 48px 0 0;
    }

    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
        gap: 0;
    }

    .hero h1 {
        font-size: 2.25rem;
    }

    .hero-description {
        margin: 0 auto 28px;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-text {
        padding-bottom: 48px;
    }

    .hero-image {
        width: 280px;
        height: 340px;
        margin: 0 auto 16px;
    }

    .hero-image-bg {
        width: 230px;
        height: 230px;
    }

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

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

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

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .timeline-header {
        flex-direction: column;
        gap: 4px;
    }
}

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

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

    .btn {
        width: 100%;
    }
}
