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

html {
    scroll-behavior: smooth;
}

nav a {
    transition: color 0.2s ease, transform 0.2s ease;
}

nav a:hover {
    color: #aad;
    transform: translateY(-1px);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 28px;
    background: rgba(15, 23, 42, 0.95);
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.22);
    backdrop-filter: blur(12px);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav a {
    color: white;
    text-decoration: none;
}

section {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

section h2 {
    font-size: 2rem;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
    position: relative;
    display: inline-block;
}

section h2::after {
    content: "";
    display: block;
    width: 70px;
    height: 4px;
    background: #28a745;
    border-radius: 2px;
    margin-top: 10px;
    opacity: 0.9;
}

body {
    font-family: 'Trebuchet MS', sans-serif;
    margin: 0;
    padding: 0;
    background: radial-gradient(circle at top left, rgba(0,123,255,0.12), transparent 18%),
                radial-gradient(circle at bottom right, rgba(40,167,69,0.10), transparent 20%),
                #f4f4f4;
    color: #333;
    line-height: 1.6;
}

.hero {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #2563eb 45%, #0ea5e9 100%);
    color: white;
    padding: 60px 20px;
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.24);
}

.hero-photo {
    width: 220px;
    height: 220px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid rgba(255, 255, 255, 0.75);
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.24);
}

.hero-text {
    max-width: 600px;
}

.hero-text h1 {
    font-size: 2.8rem;
    margin-bottom: 18px;
    letter-spacing: -0.02em;
}

.hero-text p {
    margin: 0 0 12px;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 22px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 12px 28px rgba(16, 185, 129, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.btn:hover {
    background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(16, 185, 129, 0.24);
}

.btn-secondary {
    background: linear-gradient(135deg, #ec4899 0%, #f472b6 100%);
    box-shadow: 0 12px 28px rgba(236, 72, 153, 0.18);
    border-color: rgba(255, 255, 255, 0.14);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #be185d 0%, #db2777 100%);
    box-shadow: 0 16px 30px rgba(236, 72, 153, 0.24);
}

.btn.btn-alt {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.18);
    border-color: rgba(255, 255, 255, 0.14);
}

.btn.btn-alt:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.24);
}

#education {
    padding-top: 0;
}

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

.timeline::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 0;
    height: 100%;
    width: 4px;
    background: #007bff;
    opacity: 0.3;
}

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

.timeline-dot {
    position: absolute;
    left: -2px;
    top: 8px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #007bff;
    border: 3px solid white;
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.2);
}

.timeline-content {
    background: white;
    padding: 18px 20px;
    border-radius: 14px;
    box-shadow: 0 0 18px rgba(0,0,0,0.08);
}

.timeline-year {
    display: inline-block;
    color: #007bff;
    font-weight: 700;
    margin-bottom: 8px;
}

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

.timeline-content p {
    margin: 0;
    color: #555;
}

/* small screen adjustments */
@media (max-width: 600px) {
    .timeline {
        padding-left: 24px;
    }

    .timeline::before {
        left: 8px;
    }

    .timeline-dot {
        left: 2px;
    }

    .timeline-content {
        padding: 16px;
    }
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.achievements-card {
    background-color: white;
    padding: 22px;
    border-radius: 16px;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.achievements-card.featured {
    grid-column: span 2;
}

.achievements-card.small {
    grid-column: span 1;
}

.achievement-thumb {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    margin-bottom: 16px;
}

@media (max-width: 900px) {
    .achievements-grid {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }

    .achievements-card.featured,
    .achievements-card.small {
        grid-column: span 2;
    }
}

@media (max-width: 600px) {
    .achievements-grid {
        grid-template-columns: 1fr;
    }

    .achievements-card.featured,
    .achievements-card.small {
        grid-column: span 1;
    }
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.skill {
    background-color: #007bff;
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
}

.contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 20px;
}

.achievements-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.16);
}

footer {
    text-align: center;
    padding: 24px 20px;
    background-color: #111827;
    color: #e5e7eb;
}

@media (prefers-color-scheme: dark) {
    body {
        background: #030712;
        color: #e2e8f0;
    }

    nav {
        background: rgba(15, 23, 42, 0.98);
        box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
    }

    nav a {
        color: #cbd5e1;
    }

    nav a:hover {
        color: #93c5fd;
    }

    section {
        color: #d1d5db;
    }

    .hero {
        background: linear-gradient(135deg, #0b1220 0%, #111827 45%, #1e3a8a 100%);
        box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
    }

    .timeline-content,
    .achievements-card {
        background: #111827;
        box-shadow: 0 18px 35px rgba(0, 0, 0, 0.25);
    }

    .timeline-year {
        color: #60a5fa;
    }

    .timeline-content p,
    .achievements-card p,
    .skill,
    section p {
        color: #cbd5e1;
    }

    .skill {
        background-color: #2563eb;
    }

    .btn {
        background: linear-gradient(135deg, #22c55e 0%, #14b8a6 100%);
        box-shadow: 0 12px 28px rgba(20, 184, 166, 0.2);
    }

    .btn-secondary {
        background: linear-gradient(135deg, #ec4899 0%, #f472b6 100%);
        box-shadow: 0 12px 28px rgba(236, 72, 153, 0.2);
    }

    .btn.btn-alt {
        background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
        box-shadow: 0 12px 28px rgba(37, 99, 235, 0.2);
    }

    footer {
        background: #0b1220;
        color: #cbd5e1;
    }
}

/* Mobile Responsive */
@media (max-width: 600px) {
    nav {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero {
        text-align: center;
        justify-content: center;
    }

    .hero-text {
        width: 100%;
    }

    .hero-photo {
        width: 180px;
        height: 180px;
    }
}
