/* ── Reset ───────────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* ── Page Transition ─────────────────────────────────────── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Base ────────────────────────────────────────────────── */
body {
    font-family: Georgia, serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    animation: fadeIn 0.15s ease;
}

.page-fade-out {
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

/* ── Layout ──────────────────────────────────────────────── */
.container { display: flex; min-height: 100vh; width: 100%; }

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
    width: 200px;
    background-color: #f5f5f5;
    color: #333;
    padding: 20px;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: hidden;
    box-sizing: border-box;
    border: none;
    z-index: 10;
}

.sidebar h1 {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
    line-height: 1.2;
    cursor: default;
    color: #000;
}

.sidebar nav ul { list-style: none; }
.sidebar nav ul li { margin-bottom: 15px; }

.sidebar nav ul li a {
    color: #333;
    text-decoration: none;
    font-size: 16px;
    display: block;
    padding: 5px 0;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.sidebar nav ul li a:hover { border-bottom: 1px solid #333; }
.sidebar nav ul li a.active { font-weight: bold; border-bottom: 2px solid #333; }

/* ── Main Content ────────────────────────────────────────── */
.main-content {
    margin-left: 200px;
    padding: 40px;
    background-color: #fff;
    flex: 1;
    box-sizing: border-box;
    min-height: 100vh;
    width: calc(100% - 200px);
}

/* ── Content Card (full width, left-aligned) ────────────── */
.content-card {
    max-width: 100%;
}

/* ── Content Header ──────────────────────────────────────── */
.content-header {
    border-bottom: 2px solid #333;
    padding-bottom: 20px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content-header h1 { font-size: 48px; font-weight: bold; }

/* ── Sections ────────────────────────────────────────────── */
.content-section { margin-bottom: 40px; display: none; }
.content-section.active { display: block; }
.content-section h2 { font-size: 24px; margin-bottom: 15px; color: #333; }
.content-section p { margin-bottom: 15px; text-align: justify; }

/* ── Portfolio ───────────────────────────────────────────── */
.portfolio-list { display: flex; flex-direction: column; gap: 20px; margin-top: 20px; }

.portfolio-item {
    display: block;
    text-decoration: none;
    color: inherit;
    background-color: #f9f9f9;
    padding: 24px 28px;
    border: 1px solid #ddd;
    transition: box-shadow 0.3s ease;
    border-radius: 6px;
    width: 100%;
}

.portfolio-item:hover { box-shadow: 0 4px 8px rgba(0,0,0,0.1); }
.portfolio-item h3 { margin-bottom: 8px; color: #333; font-size: 20px; }
.portfolio-item p { margin-bottom: 0; text-align: left; }

/* ── Contact Form ────────────────────────────────────────── */
.contact-form {
    background-color: #f9f9f9;
    padding: 30px;
    border: 1px solid #ddd;
    margin-top: 20px;
}

.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: bold; }

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    font-family: Georgia, serif;
    font-size: 14px;
}

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

.btn {
    background-color: #333;
    color: white;
    padding: 12px 30px;
    border: none;
    cursor: pointer;
    font-family: Georgia, serif;
    font-size: 16px;
    transition: background-color 0.2s ease;
}

.btn:hover { background-color: #555; }
.btn:disabled { background-color: #999; cursor: not-allowed; }
.form-help { font-size: 12px; color: #666; margin-top: 3px; display: block; }

/* ── Social Box ──────────────────────────────────────────── */
.social-box {
    border: 1px solid #ddd;
    padding: 20px 24px;
    background-color: #f9f9f9;
    border-radius: 6px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: 30px;
}

.social-box h3 { margin-bottom: 12px; font-size: 18px; }
.social-links { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 10px; }

.social-links a {
    color: #333;
    text-decoration: none;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #333;
    padding-bottom: 2px;
    transition: border-bottom-width 0.15s ease;
}

.social-links a:hover { color: #000; border-bottom-width: 2px; }

/* ── Form Status ─────────────────────────────────────────── */
.form-status {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    display: none;
}

.form-status.success { background-color: #d4edda; border: 1px solid #c3e6cb; color: #155724; }
.form-status.error   { background-color: #f8d7da; border: 1px solid #f5c6cb; color: #721c24; }

/* ── Skip Link ───────────────────────────────────────────── */
.skip-link {
    position: absolute;
    top: -100px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 1000;
}
.skip-link:focus { top: 6px; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .container { flex-direction: column; }
    .sidebar { position: relative; width: 100%; height: auto; order: 1; }
    .main-content { margin-left: 0; order: 2; width: 100%; }
    .content-header h1 { font-size: 36px; }
    .content-header { flex-direction: column; align-items: flex-start; }
    .content-card { padding: 0; }

    /* Education year spans: stack below title instead of floating right */
    .edu-year {
        position: static !important;
        display: block;
        margin-top: 6px;
        font-size: 13px;
        color: #666;
        font-style: italic;
    }
}
