/* ===========================
   Birch & Stone — Scandinavian Light Theme
   WCAG AA compliant (4.5:1+ text contrast)
   =========================== */

:root {
    --bg-body: #ece7e0;
    /* Warm stone */
    --bg-card: #f6f2ec;
    /* Light birch */
    --bg-alt: #e2dcd4;
    /* Darker stone for alternating sections */
    --bg-card-hover: #efe9e1;
    --accent: #4a7358;
    /* Deep moss green — 4.8:1 on body bg */
    --accent-light: #5e8a6d;
    /* Lighter moss — decorative only */
    --accent-alt: #8b5a38;
    /* Muted rust — 5.0:1 on body bg */
    --accent-alt-light: #b07856;
    /* Lighter rust — decorative only */
    --text-main: #2d2a26;
    /* Dark bark — 10:1+ contrast */
    --text-muted: #5c5752;
    /* Warm dark gray — 5.2:1 contrast */
    --border-subtle: rgba(45, 42, 38, 0.1);
    --border-hover: rgba(74, 115, 88, 0.3);
    --shadow-sm: 0 1px 3px rgba(45, 42, 38, 0.06);
    --shadow-md: 0 4px 12px rgba(45, 42, 38, 0.08);
    --shadow-lg: 0 8px 30px rgba(45, 42, 38, 0.1);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.3s ease;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

section {
    padding: 6rem 1rem;
    overflow: hidden;
    scroll-margin-top: 80px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3.5rem;
    color: var(--accent);
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-alt));
    margin: 0.75rem auto 0;
    border-radius: 2px;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(236, 231, 224, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(236, 231, 224, 0.97);
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--accent);
    letter-spacing: 1px;
    position: relative;
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-alt));
    border-radius: 1px;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.logo:hover::after {
    transform: scaleX(1);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
    padding-bottom: 4px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
}

.lang-btn {
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.lang-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(74, 115, 88, 0.06);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 4px;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-main);
    transition: all 0.3s ease;
    transform-origin: center;
}

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

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

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

/* Hero Section */
.hero-section {
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(74, 115, 88, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: heroGlow 8s ease-in-out infinite alternate;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -10%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(139, 90, 56, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: heroGlow 10s ease-in-out infinite alternate-reverse;
}

@keyframes heroGlow {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 0.6;
    }

    100% {
        transform: translate(30px, -20px) scale(1.1);
        opacity: 1;
    }
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    width: 100%;
    position: relative;
    z-index: 1;
}

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

.hero-image {
    flex: 0 0 auto;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--bg-card);
    box-shadow:
        var(--shadow-lg),
        0 0 0 1px var(--border-subtle);
    animation: float 6s ease-in-out infinite;
    position: relative;
}

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

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.hero-greeting {
    font-size: 1.125rem;
    color: var(--accent);
    margin-bottom: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.hero-name {
    font-size: 3.75rem;
    margin-bottom: 1rem;
    color: var(--text-main);
    line-height: 1.1;
}

.hero-title {
    font-size: 1.75rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-bottom: 1.5rem;
}

.hero-description {
    margin-bottom: 2.5rem;
    color: var(--text-muted);
    font-size: 1.125rem;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.5;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    background: #3d6249;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(74, 115, 88, 0.25);
}

.btn-secondary {
    border-color: var(--border-subtle);
    color: var(--text-main);
    background: var(--bg-card);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* About Section */
.about-content {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-subtle);
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.about-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-alt-light), var(--accent));
    border-radius: 3px 3px 0 0;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.about-text p:last-child {
    margin-bottom: 0;
}

/* Experience Section */
.bg-alt {
    background-color: var(--bg-alt);
    position: relative;
}

.bg-alt::before,
.bg-alt::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-subtle), transparent);
}

.bg-alt::before {
    top: 0;
}

.bg-alt::after {
    bottom: 0;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-light), var(--accent-alt-light), transparent);
    top: 0;
    bottom: 0;
    left: 0;
    margin-left: -1px;
}

.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
    padding-left: 2.5rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 0;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bg-alt);
    border: 3px solid var(--accent-light);
    box-shadow: 0 0 0 4px rgba(74, 115, 88, 0.1);
    transition: var(--transition);
    z-index: 1;
}

.timeline-item:hover::before {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 0 6px rgba(74, 115, 88, 0.15);
}

.timeline-content {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.timeline-item:hover .timeline-content {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.timeline-date {
    font-size: 0.85rem;
    color: var(--accent-alt);
    margin-bottom: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.timeline-content h3 {
    margin-bottom: 0.25rem;
    font-size: 1.25rem;
}

.timeline-content h4 {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 400;
    margin-bottom: 1rem;
}

.timeline-content p {
    margin-bottom: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tags span {
    background: rgba(74, 115, 88, 0.08);
    color: var(--accent);
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(74, 115, 88, 0.15);
    transition: var(--transition);
}

.tags span:hover {
    background: rgba(74, 115, 88, 0.14);
    border-color: rgba(74, 115, 88, 0.3);
}

.large-tags span {
    font-size: 0.95rem;
    padding: 0.5rem 1.25rem;
}

/* Education Cards & Grid */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-alt-light));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-lg);
}

.card:hover::before {
    opacity: 1;
}

.card-header {
    font-size: 0.85rem;
    color: var(--accent-alt);
    margin-bottom: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.15rem;
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.card .small {
    margin-top: 1rem;
    font-size: 0.85rem;
    font-style: italic;
}

/* Skills Section */
.skills-wrapper {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    max-width: 800px;
    margin: 0 auto;
}

.skill-category h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.skill-list li {
    background: var(--bg-card);
    padding: 1rem 1.25rem;
    margin-bottom: 0.5rem;
    border-radius: 0.5rem;
    border-left: 3px solid var(--accent);
    color: var(--text-main);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.skill-list li:hover {
    border-left-color: var(--accent-alt);
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

/* Contact Section */
.text-center {
    text-align: center;
}

.text-center > p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.contact-card {
    background: var(--bg-card);
    padding: 1.5rem 2.5rem;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    min-width: 180px;
    border: 1px solid var(--border-subtle);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.contact-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.contact-card .icon {
    font-size: 1.75rem;
    color: var(--accent);
    transition: var(--transition);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(74, 115, 88, 0.08);
}

.contact-card:hover .icon {
    background: rgba(74, 115, 88, 0.14);
    color: var(--accent);
}

.contact-card .text,
.contact-card .screen-text {
    font-weight: 500;
    font-size: 0.95rem;
}

/* GitHub Card Hover */
.github-card:hover {
    border-color: rgba(45, 42, 38, 0.2);
}

.github-card:hover .icon {
    background: rgba(45, 42, 38, 0.08);
    color: var(--text-main);
}

/* Brand Colors on Hover */
.linkedin-card:hover {
    border-color: #0077b5;
    background: rgba(0, 119, 181, 0.04);
}

.linkedin-card:hover .icon {
    background: rgba(0, 119, 181, 0.1);
    color: #0077b5;
}

/* Print Text Toggling */
.print-text {
    display: none;
}

/* Footer */
footer {
    padding: 2.5rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border-subtle);
    margin-top: auto;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation delays for timeline items and cards */
.timeline-item.fade-in:nth-child(1) { transition-delay: 0s; }
.timeline-item.fade-in:nth-child(2) { transition-delay: 0.1s; }
.timeline-item.fade-in:nth-child(3) { transition-delay: 0.2s; }
.timeline-item.fade-in:nth-child(4) { transition-delay: 0.3s; }

.card.fade-in:nth-child(1) { transition-delay: 0s; }
.card.fade-in:nth-child(2) { transition-delay: 0.1s; }
.card.fade-in:nth-child(3) { transition-delay: 0.2s; }
.card.fade-in:nth-child(4) { transition-delay: 0.3s; }

/* Responsive */
@media (max-width: 900px) {
    .container {
        padding: 0 1.5rem;
    }

    .hero-container {
        flex-direction: column-reverse;
        text-align: center;
        gap: 2rem;
    }

    .hero-text {
        max-width: 100%;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-image {
        width: 220px;
        height: 220px;
    }

    .hero-name {
        font-size: 2.75rem;
    }

    .hero-section {
        min-height: auto;
        height: auto;
        padding-top: 100px;
        padding-bottom: 3rem;
        overflow: visible;
    }
}

@media (max-width: 768px) {
    section {
        padding: 3.5rem 0.75rem;
    }

    .container {
        padding: 0 1.25rem;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(236, 231, 224, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 0.5rem 0;
        gap: 0;
        border-bottom: 1px solid var(--border-subtle);
    }

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

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        display: block;
        padding: 1rem 2rem;
    }

    .nav-links a::after {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    /* Fix mobile nav cutoff */
    section {
        scroll-margin-top: 80px;
    }

    .hero-container {
        padding-top: 1rem;
        gap: 1.5rem;
    }

    .hero-name {
        font-size: 2.25rem;
        padding: 0 0.5rem;
    }

    /* Reduce section title size to prevent overflow */
    .section-title {
        font-size: 1.75rem;
        width: 100%;
        left: auto;
        transform: none;
        margin-bottom: 2.5rem;
    }

    .hero-title {
        font-size: 1.35rem;
        padding: 0;
        margin-bottom: 1rem;
    }

    .hero-description {
        font-size: 1rem;
        padding: 0 0.5rem;
        margin-bottom: 1.75rem;
    }

    .hero-image {
        width: 170px;
        height: 170px;
    }

    .hero-section::before {
        width: 300px;
        height: 300px;
    }

    .hero-section::after {
        width: 200px;
        height: 200px;
    }

    .timeline::after {
        left: 0;
    }

    .timeline-item {
        padding-left: 2rem;
    }

    .timeline-content {
        padding: 1.25rem;
    }

    .nav-right {
        gap: 1rem;
    }

    /* Contact cards: 2-column grid on tablets and phones */
    .contact-links {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        margin-top: 2rem;
    }

    .contact-card {
        min-width: 0;
        padding: 1.25rem 1rem;
    }

    .contact-card .icon {
        width: 44px;
        height: 44px;
        font-size: 1.5rem;
    }

    .about-content {
        padding: 2rem 1.5rem;
    }

    /* Education grid: single column on mobile */
    .grid-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .card {
        padding: 1.5rem;
    }

    /* Smaller tags on mobile */
    .large-tags span {
        font-size: 0.85rem;
        padding: 0.4rem 1rem;
    }

    .btn {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }

    .about-text p {
        font-size: 1rem;
    }

    .skills-wrapper {
        gap: 2rem;
    }
}

/* Small phones */
@media (max-width: 480px) {
    section {
        padding: 3rem 0.5rem;
    }

    .container {
        padding: 0 1rem;
    }

    .nav-container {
        padding: 0.85rem 1rem;
    }

    .hero-name {
        font-size: 1.85rem;
        padding: 0;
    }

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

    .hero-title {
        font-size: 1.15rem;
    }

    .hero-description {
        font-size: 0.95rem;
        margin-bottom: 2rem;
        padding: 0;
    }

    .hero-image {
        width: 160px;
        height: 160px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .btn {
        width: 100%;
        max-width: 260px;
        padding: 0.75rem 1.5rem;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }

    .about-content {
        padding: 1.5rem 1.25rem;
    }

    .about-text p {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    .timeline-item {
        padding-left: 1.5rem;
        margin-bottom: 2rem;
    }

    .timeline-content {
        padding: 1rem;
    }

    .timeline-content h3 {
        font-size: 1.1rem;
    }

    .timeline-content h4 {
        font-size: 0.85rem;
    }

    .timeline-content p {
        font-size: 0.9rem;
    }

    .timeline-date {
        font-size: 0.8rem;
    }

    .tags span {
        font-size: 0.75rem;
        padding: 0.25rem 0.65rem;
    }

    .large-tags span {
        font-size: 0.8rem;
        padding: 0.35rem 0.85rem;
    }

    .card {
        padding: 1.25rem;
    }

    .card h3 {
        font-size: 1.05rem;
    }

    .card p {
        font-size: 0.9rem;
    }

    .contact-links {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }

    .contact-card {
        padding: 1rem 0.75rem;
        gap: 0.5rem;
    }

    .contact-card .icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .contact-card .text,
    .contact-card .screen-text {
        font-size: 0.8rem;
    }

    .skill-list li {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .text-center > p {
        font-size: 0.95rem;
    }

    footer {
        padding: 1.5rem 0;
        font-size: 0.8rem;
    }
}

/* Print Styles */
@media print {

    /* Reset all backgrounds and specific text colors to black/white */
    *,
    *::before,
    *::after {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
        border-color: #000 !important;
        transition: none !important;
        animation: none !important;
    }

    /* Force visibility of all animated elements */
    .fade-in {
        opacity: 1 !important;
        transform: none !important;
        visibility: visible !important;
    }

    /* Force white canvas */
    body,
    html {
        background-color: #fff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        font-size: 10pt;
        line-height: 1.4;
        color: #000 !important;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .container {
        width: 100%;
        max-width: none;
        padding: 0;
        margin: 0;
    }

    /* ESSENTIAL FIX: Allow overflow and breaks */
    section {
        padding: 0.5rem 0;
        overflow: visible !important;
        page-break-inside: auto;
        break-inside: auto;
    }

    /* Hide unnecessary elements */
    .navbar,
    .hero-buttons,
    .hamburger,
    #lang-toggle,
    footer,
    .contact-card .icon,
    .timeline::after,
    .section-title::after {
        display: none !important;
    }

    /* Hero Section - Compact Header with Image */
    .hero-section {
        height: auto;
        min-height: 0;
        padding-top: 1rem;
        padding-bottom: 0.5rem;
        background: none;
        text-align: left;
        border-bottom: 2px solid #000;
        margin-bottom: 1rem;
        display: block;
        opacity: 1 !important;
        transform: none !important;
    }

    .hero-container {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 2rem;
        justify-content: flex-start;
    }

    .hero-text {
        flex: 1;
        max-width: none;
        text-align: left;
    }

    .hero-image {
        display: block !important;
        width: 120px;
        height: 120px;
        border: 2px solid #000;
        box-shadow: none;
        animation: none;
        margin-right: 0;
    }

    .hero-name {
        background: none;
        color: #000 !important;
        font-size: 20pt;
        margin-bottom: 0;
        line-height: 1.2;
    }

    .hero-title {
        font-size: 12pt;
        color: #000 !important;
        font-weight: normal;
        margin-bottom: 0.2rem;
    }

    .hero-description {
        color: #000 !important;
        font-size: 10pt;
        margin-bottom: 0.5rem;
        max-width: 100%;
        text-align: left;
    }

    .hero-greeting {
        display: none;
    }

    /* Contact Info - Compact List under header */
    #contact {
        display: block;
        padding: 0;
        border: none;
        margin-bottom: 1rem;
        order: -1;
        overflow: visible !important;
        opacity: 1 !important;
    }

    #contact .section-title,
    #contact p {
        display: none;
    }

    .contact-links {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1.5rem;
        margin-top: 0;
        justify-content: flex-start;
        padding-bottom: 0.5rem;
        border-bottom: 1px dotted #ccc;
    }

    .contact-card {
        display: inline-block !important;
        padding: 0;
        border: none;
        min-width: auto;
        background: none !important;
    }

    .contact-card span {
        font-size: 9pt;
        font-family: 'Consolas', 'Monaco', monospace;
        color: #333 !important;
    }

    /* Print Text Toggling */
    .print-text {
        display: inline !important;
        font-family: 'Consolas', 'Monaco', monospace;
        font-size: 9pt;
        color: #333 !important;
    }

    .screen-text {
        display: none !important;
    }

    .contact-card span {
        font-size: 9pt;
        font-family: 'Consolas', 'Monaco', monospace;
        color: #333 !important;
    }

    /* Section Titles */
    .section-title {
        font-size: 14pt;
        text-align: left;
        left: 0;
        transform: none;
        margin-bottom: 0.5rem;
        margin-top: 1rem;
        color: #000 !important;
        border-bottom: 1px solid #000;
        display: block;
        width: 100%;
        padding-bottom: 0.1rem;
        font-weight: bold;
        text-transform: uppercase;
        opacity: 1 !important;
    }

    .section-title::after {
        display: none;
    }

    /* Timeline & Cards */
    .timeline-item,
    .card {
        padding-left: 0;
        margin-bottom: 0.8rem;
        page-break-inside: avoid;
        break-inside: avoid;
        border: none !important;
        background: transparent !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .timeline-item::before {
        display: none;
    }

    .timeline-content {
        padding: 0;
        border: none !important;
        background: transparent !important;
    }

    .timeline-content h3,
    .card h3 {
        font-size: 11pt;
        font-weight: bold;
        display: inline-block;
        margin-bottom: 0;
        color: #000 !important;
    }

    .timeline-date,
    .card-header {
        float: right;
        font-size: 9pt;
        color: #000 !important;
        font-weight: bold;
    }

    .timeline-content h4,
    .card p {
        font-size: 10pt;
        color: #000 !important;
        font-style: italic;
        margin-bottom: 0.2rem;
        display: block;
    }

    .timeline-content p,
    .card .small {
        margin-bottom: 0.2rem;
        color: #000 !important;
    }

    /* Remove About box style */
    .about-content {
        padding: 0;
        border: none;
        opacity: 1 !important;
        transform: none !important;
    }

    .about-text p {
        margin-bottom: 0.5rem;
        text-align: justify;
    }

    /* Skills - Comma separated inline list */
    .skill-category {
        margin-bottom: 0.5rem;
    }

    .skill-category h3 {
        font-size: 10pt;
        font-weight: bold;
        margin-bottom: 0;
        display: inline;
    }

    .skill-category h3::after {
        content: ": ";
    }

    .skill-list,
    .tags {
        display: inline;
        margin: 0;
        padding: 0;
    }

    .skill-list li,
    .tags span {
        display: inline;
        font-size: 10pt;
        padding: 0;
        margin: 0;
        background: none !important;
        border: none !important;
        color: #000 !important;
    }

    .skill-list li::after,
    .tags span::after {
        content: ", ";
    }

    .skill-list li:last-child::after,
    .tags span:last-child::after {
        content: ".";
    }

    /* Links */
    a {
        text-decoration: none !important;
        color: #000 !important;
    }

    a[href]::after {
        content: none !important;
    }

    /* Final safeguard for any .visible or .fade-in */
    .visible,
    .fade-in {
        opacity: 1 !important;
        transform: none !important;
        visibility: visible !important;
    }
}
