/* =========================
   1. ROOT & GLOBAL STYLES
========================= */
:root {
    --primary-blue: #007bff;
    --bg-gray: #f4f4f4;
    --text-dark: #333;
    --white: #ffffff;
    --border-color: #007bff;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6; 
    margin: 0;
    padding: 0;
    background-color: var(--bg-gray);
    color: var(--text-dark);
}

/* =========================
   2. HEADER & NAVIGATION
========================= */
header {
    background-color: var(--primary-blue);
    color: black;
    text-align: center;
    padding: 40px 20px;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header h1 {
    font-size: 2.3rem; 
    margin: 10px 0;
}

header img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 4px solid var(--white);
    object-fit: cover;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 15px 0 0 0;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap; 
}

nav ul li a {
    color: black;
    text-decoration: none;
    font-weight: bold;
    padding: 5px 8px;
    transition: color 0.3s ease, border-bottom 0.3s ease;
}

nav ul li a:focus {
    outline: 2px solid yellow;
    outline-offset: 3px;

}

nav ul li a:hover {
    color: var(--white); 
    border-bottom: 2px solid var(--white);
}

/* =========================
   3. TIGHTER LAYOUT (Desktop & Mobile)
========================= */
.cv-layout {
      max-width: 1250px; 
      margin: 30px auto;
      padding: 0 15px;
      display: flex;
      flex-direction: column; 
      box-sizing: border-box;
}

/* DESKTOP LAYOUT */
@media (min-width: 1000px) {
    .cv-layout {
        display: grid;
        grid-template-columns: 280px 1fr; /* Narrower sidebar */
        gap: 20px; /* TIGHTER GAP: Brings the two sides much closer */
        align-items: start;
    }
}

/* MOBILE ORDERING */
@media (max-width: 999px) {
    .content { order: 1; } 
    .sidebar { order: 2; }
}

/* =========================
   4. SECTIONS
========================= */
section {
    background: var(--white);
    /* BALANCED PADDING: Not too choked, but not too empty */
    padding: 25px; 
    margin-bottom: 20px; /* Closer spacing between vertical cards */
    border-top: 6px solid var(--border-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    border-radius: 6px;
    box-sizing: border-box;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

section:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.12);
}

section h2 {
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 15px; 
}
/* =========================
   5. PSEUDO-ELEMENT 
========================= */
section h2::after {
    content: "";
    display: block;
    width: 70px;
    height: 2px;
    background-color: var(--primary-blue);
    margin-top: 8px;
}

/* =========================
   6. PRINT STYLES
========================= */
@media print {
    nav, .menu-links { 
        display: none !important; 
    }

    /* 2. Show the URL next to every link (The Hint) */
    a::after {
        content: " (" attr(href) ")";
        font-size: 0.8rem;
        color: #555;
    }

    section {
        border-top: 2px solid var(--primary-blue);
        margin: 10px 0 !important;
        page-break-inside: avoid;
    }

    body {
        background: white !important;
        font-size: 11pt;
    }
}
/* =========================
   7. FOOTER (Blue & Compact)
========================= */
footer {
    background-color: #007bff;
    color: white;              
    width: 100%;              
    display: flex;             
    justify-content: center;   
    align-items: center;       
    padding: 20px 0;           
    margin-top: 50px;          
}