/* ========================================
   1. CSS Custom Properties
   ======================================== */
:root {
    --primary-dark: #0A1628;
    --primary: #1B2A4A;
    --primary-light: #2C4A7C;
    --accent: #3B82F6;
    --accent-hover: #2563EB;
    --accent-light: #DBEAFE;
    --text-dark: #1E293B;
    --text-medium: #64748B;
    --text-light: #F8FAFC;
    --bg-white: #FFFFFF;
    --bg-light: #F1F5F9;
    --bg-card: #FFFFFF;
    --border: #E2E8F0;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.05);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 50%;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-dark);
    line-height: 1.7;
    background: var(--bg-white);
    overflow-x: hidden;
}

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

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

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

a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 2px;
}

ul {
    list-style: none;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    background: var(--accent);
    color: #fff;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    z-index: 10000;
    font-weight: 600;
}

.skip-link:focus {
    top: 16px;
    color: #fff;
}

/* ========================================
   3. Utilities
   ======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 80px 0;
}

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

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

.section--dark {
    background: var(--primary-dark);
    color: var(--text-light);
}

.section__title {
    font-size: 2.25rem;
    font-weight: 700;
    text-align: center;
    color: var(--text-dark);
    line-height: 1.2;
}

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

.section__divider {
    width: 60px;
    height: 3px;
    background: var(--accent);
    margin: 16px auto 48px;
    border-radius: 2px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    text-decoration: none;
    line-height: 1.5;
}

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

.btn--primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn--outline {
    background: transparent;
    border-color: var(--accent);
    color: var(--accent);
}

.btn--outline:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-2px);
}

.btn--full {
    width: 100%;
}

/* Tags */
.tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--accent-light);
    color: var(--primary);
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.5;
}

.tag--sm {
    padding: 3px 10px;
    font-size: 0.75rem;
}

/* ========================================
   4. Navbar
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: var(--transition);
    background: transparent;
}

.navbar--scrolled {
    background: var(--primary-dark);
    box-shadow: var(--shadow-lg);
    padding: 12px 0;
}

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

.navbar__logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-light);
    letter-spacing: -0.5px;
}

.navbar__logo:hover {
    color: var(--accent);
}

.navbar__list {
    display: flex;
    align-items: center;
    gap: 4px;
}

.navbar__link {
    color: rgba(248, 250, 252, 0.8);
    font-size: 0.9375rem;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.navbar__link:hover,
.navbar__link--active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.navbar__link--cta {
    background: var(--accent);
    color: #fff;
    margin-left: 8px;
}

.navbar__link--cta:hover {
    background: var(--accent-hover);
    color: #fff;
}

/* Theme Switch */
.theme-switch {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(248, 250, 252, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    text-decoration: none;
    margin-left: 12px;
}

.theme-switch:hover {
    border-color: var(--accent);
    color: #fff;
    background: rgba(59, 130, 246, 0.1);
}

/* Hamburger */
.navbar__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
}

.navbar__toggle-bar {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-light);
    border-radius: 2px;
    transition: var(--transition);
}

.navbar__toggle--active .navbar__toggle-bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.navbar__toggle--active .navbar__toggle-bar:nth-child(2) {
    opacity: 0;
}

.navbar__toggle--active .navbar__toggle-bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ========================================
   5. Hero
   ======================================== */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(59, 130, 246, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

.hero__inner {
    display: grid;
    grid-template-columns: 1fr 0.8fr;
    align-items: center;
    gap: 60px;
    position: relative;
    z-index: 1;
    padding: 40px 0;
}

.hero__greeting {
    font-size: 1.125rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 8px;
}

.hero__name {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-light);
    line-height: 1.1;
    margin-bottom: 16px;
}

.hero__title {
    font-size: 1.125rem;
    color: rgba(248, 250, 252, 0.7);
    font-weight: 500;
    margin-bottom: 20px;
}

.hero__tagline {
    font-size: 1rem;
    color: rgba(248, 250, 252, 0.6);
    line-height: 1.7;
    max-width: 520px;
    margin-bottom: 32px;
}

.hero__actions {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.hero__actions .btn--outline {
    color: var(--text-light);
    border-color: rgba(248, 250, 252, 0.3);
}

.hero__actions .btn--outline:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.hero__socials {
    display: flex;
    gap: 16px;
}

.hero__socials a {
    color: rgba(248, 250, 252, 0.5);
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.hero__socials a:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

/* Hero Image */
.hero__image {
    display: flex;
    justify-content: center;
}

.hero__image-wrapper {
    width: 320px;
    height: 320px;
    border-radius: var(--radius-full);
    border: 4px solid rgba(59, 130, 246, 0.3);
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 60px rgba(59, 130, 246, 0.15);
}

.hero__image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero__image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    color: var(--text-light);
    font-size: 5rem;
    font-weight: 700;
    letter-spacing: -2px;
}

/* ========================================
   6. About
   ======================================== */
.about__content {
    max-width: 800px;
    margin: 0 auto;
}

.about__text {
    font-size: 1.0625rem;
    color: var(--text-medium);
    line-height: 1.8;
    text-align: center;
}

/* ========================================
   7. Education Timeline
   ======================================== */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0;
}

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

.timeline__item {
    position: relative;
    padding-left: 64px;
    padding-bottom: 40px;
}

.timeline__item:last-child {
    padding-bottom: 0;
}

.timeline__dot {
    position: absolute;
    left: 16px;
    top: 6px;
    width: 18px;
    height: 18px;
    border-radius: var(--radius-full);
    background: var(--accent);
    border: 3px solid var(--bg-white);
    box-shadow: var(--shadow-sm);
    z-index: 1;
}

.timeline__content {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.timeline__content:hover {
    box-shadow: var(--shadow-md);
}

.timeline__date {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-light);
    padding: 3px 12px;
    border-radius: 20px;
    margin-bottom: 10px;
}

.timeline__title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
    line-height: 1.3;
}

.timeline__subtitle {
    font-size: 0.9375rem;
    color: var(--text-medium);
    margin-bottom: 8px;
}

.timeline__detail {
    font-size: 0.875rem;
    color: var(--text-medium);
}

.timeline__grades {
    margin-top: 16px;
}

.timeline__grades-heading {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    margin-top: 12px;
}

.timeline__grades-heading:first-child {
    margin-top: 0;
}

.grades-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 6px;
}

.grade-item {
    font-size: 0.8125rem;
    color: var(--text-medium);
    padding: 4px 0;
}

.grade-item strong {
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-right: 8px;
    color: #fff;
    background: var(--accent);
}

/* Color coding for grades */
.grade-item strong:first-child {
    background: var(--accent);
}

/* ========================================
   8. Experience
   ======================================== */
.experience__card {
    max-width: 900px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.experience__card:hover {
    box-shadow: var(--shadow-md);
}

.experience__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.experience__role {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.experience__company {
    font-size: 1rem;
    color: var(--accent);
    font-weight: 500;
}

.experience__date {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-light);
    padding: 6px 16px;
    border-radius: 20px;
    white-space: nowrap;
}

.experience__list {
    list-style: none;
    margin-bottom: 24px;
}

.experience__list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 12px;
    font-size: 0.9375rem;
    color: var(--text-medium);
    line-height: 1.7;
}

.experience__list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
    background: var(--accent);
}

.experience__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ========================================
   9. Projects
   ======================================== */
.projects__filters {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    border: 1px solid var(--border);
    background: var(--bg-white);
    color: var(--text-medium);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.filter-btn--active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

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

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: 3px solid transparent;
    border-radius: var(--radius-md);
    padding: 28px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-top-color: var(--accent);
}

.project-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.project-card__icon {
    color: var(--accent);
}

.project-card__year {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-medium);
    background: var(--bg-light);
    padding: 3px 10px;
    border-radius: 12px;
}

.project-card__title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
    line-height: 1.3;
}

.project-card__desc {
    font-size: 0.875rem;
    color: var(--text-medium);
    line-height: 1.6;
    margin-bottom: 16px;
    flex-grow: 1;
}

.project-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* ========================================
   10. Skills
   ======================================== */
.skills__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.skill-category {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 28px;
    text-align: center;
    transition: var(--transition);
}

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

.skill-category__icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-light);
    border-radius: var(--radius-lg);
    color: var(--accent);
}

.skill-category__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.skill-category__tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.skill-tag {
    display: inline-block;
    padding: 6px 14px;
    background: var(--accent-light);
    color: var(--primary);
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: var(--transition);
}

.skill-tag:hover {
    background: var(--accent);
    color: #fff;
}

/* ========================================
   11. Certificates
   ======================================== */
.certs__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.cert-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    transition: var(--transition);
}

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

.cert-card__icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    background: var(--accent-light);
    border-radius: var(--radius-full);
}

.cert-card__title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
    line-height: 1.3;
}

.cert-card__org {
    font-size: 0.8125rem;
    color: var(--text-medium);
    margin-bottom: 8px;
}

.cert-card__year {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-light);
    padding: 2px 10px;
    border-radius: 12px;
}

/* ========================================
   12. Extracurricular
   ======================================== */
.activities__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.activity-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 28px;
    text-align: center;
    transition: var(--transition);
}

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

.activity-card__icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-light);
    border-radius: var(--radius-full);
    color: var(--accent);
}

.activity-card__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.activity-card__desc {
    font-size: 0.875rem;
    color: var(--text-medium);
    line-height: 1.6;
    margin-bottom: 12px;
}

.activity-card__year {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
}

/* ========================================
   13. Contact
   ======================================== */
.contact__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1000px;
    margin: 0 auto;
}

.contact__text {
    font-size: 1rem;
    color: rgba(248, 250, 252, 0.7);
    line-height: 1.7;
    margin-bottom: 32px;
}

.contact__details {
    margin-bottom: 32px;
}

.contact__item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.contact__item svg {
    color: var(--accent);
    flex-shrink: 0;
}

.contact__item a,
.contact__item span {
    color: rgba(248, 250, 252, 0.8);
    font-size: 0.9375rem;
}

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

.contact__socials {
    display: flex;
    gap: 16px;
}

.contact__socials a {
    color: rgba(248, 250, 252, 0.5);
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.contact__socials a:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

/* Form */
.contact__form {
    background: rgba(255, 255, 255, 0.05);
    padding: 32px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(248, 250, 252, 0.8);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    color: var(--text-light);
    font-size: 0.9375rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-input::placeholder {
    color: rgba(248, 250, 252, 0.3);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

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

.form-status {
    margin-top: 16px;
    font-size: 0.875rem;
    text-align: center;
    min-height: 20px;
}

.form-status--success {
    color: #10B981;
}

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

/* ========================================
   14. Footer
   ======================================== */
.footer {
    background: var(--primary-dark);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 40px 0 24px;
}

.footer__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 24px;
}

.footer__logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-light);
}

.footer__tagline {
    font-size: 0.8125rem;
    color: rgba(248, 250, 252, 0.5);
    margin-top: 4px;
}

.footer__links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.footer__links a {
    color: rgba(248, 250, 252, 0.6);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

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

.footer__socials {
    display: flex;
    gap: 16px;
}

.footer__socials a {
    color: rgba(248, 250, 252, 0.4);
    transition: var(--transition);
    display: flex;
    align-items: center;
}

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

.footer__bottom {
    text-align: center;
}

.footer__bottom p {
    font-size: 0.8125rem;
    color: rgba(248, 250, 252, 0.4);
}

/* ========================================
   15. Scroll to Top
   ======================================== */
.scroll-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 44px;
    height: 44px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 999;
}

.scroll-top--visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

/* ========================================
   16. Scroll Animations
   ======================================== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.projects__grid .animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.projects__grid .animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.skills__grid .animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.skills__grid .animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.certs__grid .animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.certs__grid .animate-on-scroll:nth-child(3) { transition-delay: 0.15s; }
.certs__grid .animate-on-scroll:nth-child(4) { transition-delay: 0.2s; }

/* ========================================
   17. Responsive
   ======================================== */

/* Tablet */
@media (max-width: 1024px) {
    .hero__inner {
        gap: 40px;
    }

    .hero__name {
        font-size: 2.75rem;
    }

    .hero__image-wrapper {
        width: 260px;
        height: 260px;
    }

    .contact__inner {
        gap: 40px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }

    .section__title {
        font-size: 1.75rem;
    }

    .section__divider {
        margin-bottom: 36px;
    }

    /* Navbar mobile */
    .navbar__toggle {
        display: flex;
    }

    .theme-switch {
        margin-left: auto;
        margin-right: 12px;
    }

    .theme-switch span {
        display: none;
    }

    .navbar__menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--primary-dark);
        padding: 80px 32px 32px;
        transition: var(--transition);
        box-shadow: var(--shadow-xl);
    }

    .navbar__menu--open {
        right: 0;
    }

    .navbar__list {
        flex-direction: column;
        gap: 0;
    }

    .navbar__link {
        display: block;
        padding: 12px 16px;
        font-size: 1rem;
        border-radius: var(--radius-sm);
    }

    .navbar__link--cta {
        margin-left: 0;
        margin-top: 8px;
        text-align: center;
    }

    /* Hero mobile */
    .hero {
        min-height: auto;
        padding: 120px 0 60px;
    }

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

    .hero__name {
        font-size: 2.25rem;
    }

    .hero__tagline {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .hero__actions {
        justify-content: center;
    }

    .hero__socials {
        justify-content: center;
    }

    .hero__image {
        order: -1;
    }

    .hero__image-wrapper {
        width: 200px;
        height: 200px;
    }

    /* Projects grid */
    .projects__grid {
        grid-template-columns: 1fr;
    }

    /* Skills grid */
    .skills__grid {
        grid-template-columns: 1fr;
    }

    /* Contact */
    .contact__inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    /* Experience */
    .experience__header {
        flex-direction: column;
    }

    .experience__card {
        padding: 24px;
    }

    /* Timeline */
    .grades-grid {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .footer__top {
        flex-direction: column;
        text-align: center;
    }

    .footer__links {
        justify-content: center;
    }

    .footer__socials {
        justify-content: center;
    }
}

/* Small phones */
@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero__name {
        font-size: 1.875rem;
    }

    .hero__actions {
        flex-direction: column;
    }

    .hero__actions .btn {
        width: 100%;
    }

    .project-card {
        padding: 20px;
    }

    .experience__card {
        padding: 20px;
    }

    .contact__form {
        padding: 20px;
    }

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

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

    .scroll-top {
        bottom: 20px;
        right: 20px;
    }
}

/* ========================================
   18. Reduced Motion
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .animate-on-scroll {
        opacity: 1;
        transform: none;
    }
}
