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

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.1);
    --radius: 12px;
    --transition: 0.3s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    line-height: 1.7;
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
}

/* === Navbar === */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow);
}

.nav-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-logo {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text);
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 8px;
    transition: all var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
    background: rgba(37,99,235,0.06);
}

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

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all var(--transition);
}

/* === Hero === */
.hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 80px;
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f0fe 50%, #f5f3ff 100%);
}

.hero-content {
    animation: fadeInUp 0.8s ease;
}

.hero-name {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
    color: var(--text);
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text-light);
    font-weight: 400;
}

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

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

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 40px;
    position: relative;
    letter-spacing: -0.01em;
}

.section-title::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    margin-top: 12px;
}

/* === About === */
.about-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 48px;
    align-items: start;
}

.about-photo img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    aspect-ratio: 1;
    object-fit: cover;
}

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

.about-quote {
    font-style: italic;
    color: var(--text-light);
    margin-top: 24px;
    padding-left: 20px;
    border-left: 3px solid var(--primary);
}

.about-links {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    color: var(--text-light);
    background: var(--bg-alt);
    text-decoration: none;
    transition: all var(--transition);
}

.social-link:hover {
    color: var(--primary);
    background: rgba(37,99,235,0.1);
    transform: translateY(-2px);
}

/* === Education === */
.education-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

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

.education-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.education-school {
    color: var(--primary);
    font-weight: 500;
    font-size: 0.95rem;
}

.education-period {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-top: 4px;
}

/* === Skills === */
.skills-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.skills-category {
    display: grid;
    grid-template-columns: 200px 1fr;
    align-items: start;
    padding: 0;
    background: var(--bg-alt);
}

.skills-category:not(:last-child) {
    border-bottom: 1px solid var(--border);
}

.skills-category h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    padding: 24px;
    margin: 0;
    background: var(--bg);
    align-self: stretch;
    display: flex;
    align-items: center;
    border-right: 1px solid var(--border);
}

.skills-category ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 24px;
}

.skills-category li {
    display: inline-flex;
    padding: 6px 14px;
    font-size: 0.85rem;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    transition: all var(--transition);
}

.skills-category li:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* === Hobbies === */
.hobbies-content p {
    margin-bottom: 16px;
    max-width: 700px;
}

.hobbies-links {
    display: flex;
    gap: 16px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.hobby-link {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all var(--transition);
}

.hobby-link:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}

/* === Timeline === */
.timeline-subtitle {
    color: var(--text-light);
    margin-bottom: 48px;
    font-size: 1.05rem;
}

.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 0 40px 48px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item.left {
    left: 0;
    text-align: right;
}

.timeline-item.right {
    left: 50%;
    text-align: left;
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 8px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid var(--bg);
    box-shadow: 0 0 0 2px var(--primary);
    z-index: 1;
}

.timeline-item.left::before {
    right: -7px;
}

.timeline-item.right::before {
    left: -7px;
}

.timeline-content {
    background: var(--bg-alt);
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.timeline-content:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.timeline-period {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.timeline-content h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 8px 0;
}

.timeline-content p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* === Footer === */
.footer {
    padding: 32px 0;
    text-align: center;
    border-top: 1px solid var(--border);
    color: var(--text-light);
    font-size: 0.85rem;
}

/* === Animations === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: rgba(255,255,255,0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 16px 24px;
        border-bottom: 1px solid var(--border);
        gap: 4px;
    }

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

    .nav-links a {
        padding: 12px 14px;
    }

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

    .about-photo {
        max-width: 200px;
    }

    .section {
        padding: 60px 0;
    }

    .hero {
        min-height: 50vh;
        padding: 100px 24px 60px;
    }

    /* Timeline mobile: single column */
    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        left: 0 !important;
        padding: 0 0 32px 52px;
        text-align: left !important;
    }

    .timeline-item::before {
        left: 13px !important;
        right: auto !important;
    }

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

    .skills-category h3 {
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 16px 24px;
    }

    .skills-category ul {
        padding: 16px 24px;
    }
}

/* === Admin Styles === */
.admin-wrap {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 24px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.admin-header h1 {
    font-size: 1.5rem;
}

.admin-header a {
    color: var(--text-light);
    font-size: 0.9rem;
}

.login-form {
    max-width: 360px;
    margin: 120px auto;
    padding: 40px;
    background: var(--bg-alt);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.login-form h1 {
    font-size: 1.3rem;
    margin-bottom: 24px;
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color var(--transition);
}

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

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

.btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.btn:hover {
    background: var(--primary-dark);
}

.btn-danger {
    background: #dc2626;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.alert-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.admin-section {
    margin-bottom: 32px;
    padding: 24px;
    background: var(--bg-alt);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.admin-section h2 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.admin-section h3 {
    font-size: 0.95rem;
    margin: 16px 0 12px;
    color: var(--text-light);
}

.entry-group {
    padding: 16px;
    margin-bottom: 12px;
    background: var(--bg);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.entry-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}
