/* Mobile & tablet — max 768px */

.container {
    width: min(1100px, 94%);
}

/* Header & Navigation */
header {
    top: 10px;
    width: min(1000px, 96%);
    border-radius: 16px;
}

nav {
    height: auto;
    min-height: 58px;
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 0;
}

.logo {
    font-size: 1rem;
    flex: 1;
    min-width: 0;
    order: 1;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 0;
    flex-shrink: 0;
    order: 2;
}

.nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: white;
    cursor: pointer;
    flex-shrink: 0;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.btn-cv {
    width: auto;
    padding: 8px 12px;
    font-size: 0.78rem;
    white-space: nowrap;
}

.nav-menu-wrapper {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    padding-top: 16px;
    margin-top: 12px;
    margin-left: 0;
    border-top: 1px solid var(--border);
    order: 3;
    flex: none;
    justify-content: flex-start;
}

.nav-menu-wrapper.nav-open {
    display: flex;
}

nav ul {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

nav ul li a {
    display: block;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.95rem;
}

nav ul li a:active {
    background: var(--primary-light);
    color: var(--primary);
}

/* Hero — full viewport like desktop */
.hero {
    height: calc(100dvh - 88px);
    min-height: 520px;
    display: flex;
    align-items: center;
    padding: 20px 0;
}

.hero .container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.hero-content {
    max-width: 100%;
    margin-top: auto;
    margin-bottom: auto;
}

.hero h1 {
    font-size: 2rem;
    line-height: 1.25;
    margin-bottom: 16px;
}

.hero-desc {
    font-size: 1rem;
}

.hero-highlights {
    margin-top: 22px;
    gap: 8px;
}

.hero-highlight {
    font-size: 0.76rem;
    padding: 7px 12px;
}

.hero-footer-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    margin-top: auto;
    padding-top: 24px;
}

.hero-contact-link {
    font-size: 0.82rem;
    word-break: break-all;
}

.scroll-down-indicator {
    display: none;
}

.education-card {
    padding: 22px 20px;
    margin-bottom: 36px;
}

.education-degree {
    font-size: 1.1rem;
}

.section-subtitle {
    font-size: 1.35rem;
    margin-bottom: 24px;
}

/* Sections */
section {
    padding: 40px 0;
}

section .container {
    padding: 28px 18px;
    border-radius: 18px;
}

section h2 {
    font-size: 1.6rem;
    margin-bottom: 28px;
}

/* Project cards */
.projects-wrapper {
    padding: 0 4px;
}

.projects-slider {
    gap: 16px;
    padding-bottom: 16px;
    scroll-padding-inline: 4px;
}

.card {
    flex-direction: column;
    min-height: auto;
    flex: 0 0 100%;
    border-radius: 16px;
}

.card-image-side {
    min-height: 180px;
    width: 100%;
    flex: none;
}

.card-image-side::after {
    background: linear-gradient(to top, rgba(252, 252, 252, 1) 0%, rgba(252, 252, 252, 0.1) 100%);
}

.card-content-side {
    padding: 22px 20px;
}

.card-header h3 {
    font-size: 1.2rem;
}

.card-footer {
    flex-direction: column;
    gap: 10px;
}

.card-footer .btn-sm {
    width: 100%;
}

.slider-arrow {
    display: flex;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.slider-arrow.left {
    left: 2px;
}

.slider-arrow.right {
    right: 2px;
}

.slider-arrow svg {
    width: 20px !important;
    height: 20px !important;
}

/* Timeline */
.timeline {
    padding: 10px 0;
}

.timeline-item {
    padding: 8px 0 24px 36px;
}

.timeline-title {
    font-size: 1.05rem;
}

.timeline-desc {
    font-size: 0.88rem;
}

/* Skills grid */
#skills .container > div {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 24px !important;
}

#skills h3 {
    font-size: 1rem !important;
}

/* Contact */
#contact .container > div:first-of-type {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 28px !important;
    margin: 28px auto !important;
}

#contact .container > div:last-of-type {
    margin-top: 32px !important;
}

#contact .container > div:last-of-type a {
    display: block !important;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
}

/* Footer */
footer {
    padding: 32px 0;
    margin-top: 32px;
}

footer .container {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center;
    gap: 16px !important;
}

footer .container > div:nth-child(2) {
    flex-direction: column !important;
    align-items: center;
    gap: 10px !important;
}

footer .container > div:nth-child(2) a {
    font-size: 0.85rem;
    word-break: break-all;
}

/* Sticky Links in Header */
@media (max-width: 768px) {
    .sticky-contact-links .link-text {
        display: none;
    }
    .sticky-contact-links {
        justify-content: center;
        gap: 20px;
    }
}

/* Very small screens */
@media (max-width: 380px) {
    .hero h1 {
        font-size: 1.75rem;
    }

    .badge {
        font-size: 0.75rem;
        padding: 5px 12px;
    }

    section .container {
        padding: 22px 14px;
    }

    .btn-cv {
        padding: 8px 10px;
        font-size: 0.72rem;
    }
}
