/* =========================================
   Resume Builder - Global Styles & Tokens
   ========================================= */

   :root {
    /* Colors - Light Mode */
    --bg-main: #f1f5f9;
    --bg-panel: rgba(255, 255, 255, 0.85); /* Glassmorphism */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --primary-color: #4f46e5; /* Rich indigo */
    --primary-hover: #4338ca;
    --secondary-color: rgba(241, 245, 249, 0.8);
    --secondary-hover: rgba(226, 232, 240, 0.9);
    --accent-color: #8b5cf6;
    --border-color: #e2e8f0;
    --danger-color: #ef4444;
    --success-color: #10b981;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* Document Settings */
    --font-ui: 'Inter', sans-serif;
    --transition-fast: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
}

.dark-mode {
    --bg-main: #0b0f19;
    --bg-panel: rgba(30, 41, 59, 0.7); /* Dark Glassmorphism */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: rgba(255,255,255,0.1);
    --secondary-color: rgba(255,255,255,0.05);
    --secondary-hover: rgba(255,255,255,0.1);
}

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

body {
    font-family: var(--font-ui);
    background-color: var(--bg-main);
    background-image: radial-gradient(circle at 15% 50%, rgba(79, 70, 229, 0.08), transparent 25%),
                      radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.08), transparent 25%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.5;
    transition: background-color var(--transition-fast), color var(--transition-fast);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* =========================================
   Typography & Buttons
   ========================================= */

h1, h2, h3, h4 {
    color: var(--text-primary);
    font-weight: 600;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-ui);
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}
.btn-primary:hover { background-color: var(--primary-hover); }

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover { background-color: var(--secondary-hover); }

.btn-icon {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border-radius: 50%;
    background-color: var(--secondary-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.btn-icon:hover { background-color: var(--secondary-hover); transform: scale(1.05); }

.btn-outline {
    background: transparent;
    border: 1px dashed var(--border-color);
    color: var(--primary-color);
    width: 100%;
}
.btn-outline:hover {
    border-style: solid;
    background-color: rgba(59, 130, 246, 0.05);
}

/* =========================================
   Layout: Header
   ========================================= */

.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: var(--bg-panel);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    z-index: 10;
}

.logo h1 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.score-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--secondary-color);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.score-bar-wrapper {
    width: 60px;
    height: 6px;
    background-color: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
}

.score-bar {
    height: 100%;
    background-color: var(--success-color);
    width: 0%;
    transition: width 0.5s ease;
}

.select-dropdown {
    padding: 0.6rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background-color: var(--bg-panel);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
}

/* =========================================
   Layout: Main Split View
   ========================================= */

body.fullscreen-mode .form-panel {
    display: none !important;
}
body.fullscreen-mode .preview-panel {
    padding: 0 !important;
}
body.fullscreen-mode .preview-wrapper {
    margin: 2rem auto;
}
body.fullscreen-mode #portfolio-container {
    border-radius: 0 !important;
    border: none !important;
}

.app-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.form-panel {
    width: 40%;
    min-width: 350px;
    max-width: 500px;
    background-color: var(--bg-panel);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.form-scroll-container {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

.form-scroll-container::-webkit-scrollbar,
.preview-panel::-webkit-scrollbar {
    width: 6px;
}
.form-scroll-container::-webkit-scrollbar-thumb,
.preview-panel::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 4px;
}

.preview-panel {
    flex: 1;
    background-color: var(--bg-main);
    display: flex;
    justify-content: center;
    padding: 2rem;
    overflow-y: auto;
}

/* =========================================
   Form Components
   ========================================= */

.accordion-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    background-color: var(--bg-main);
    overflow: hidden;
}

.accordion-header {
    padding: 1rem 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background-color: var(--bg-panel);
    transition: background-color var(--transition-fast);
}

.accordion-header:hover {
    background-color: var(--secondary-color);
}

.accordion-header h2 {
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toggle-icon {
    transition: transform var(--transition-fast);
    color: var(--text-secondary);
}

.accordion-item.open .toggle-icon {
    transform: rotate(180deg);
}

.accordion-content {
    padding: 1.2rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-panel);
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-1 { display: grid; grid-template-columns: 1fr; gap: 1rem; }

.form-group {
    margin-bottom: 0.5rem;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
    color: var(--text-secondary);
}

input[type="text"], input[type="email"], input[type="tel"], textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input:focus, textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

.dynamic-item {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-bottom: 1rem;
    position: relative;
    display: flex;
    gap: 0.5rem;
    transition: opacity 0.2s ease;
}

.dynamic-item .inputs {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.drag-handle {
    cursor: grab;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    padding: 0 0.5rem;
}
.drag-handle:active { cursor: grabbing; }

.sortable-ghost {
    opacity: 0.4;
    background-color: rgba(59, 130, 246, 0.05);
}

.btn-remove {
    background: transparent;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.5rem;
    opacity: 0.6;
    transition: opacity var(--transition-fast);
}

.btn-remove:hover {
    opacity: 1;
}

/* =========================================
   Resume Preview Area Layout & Base
   ========================================= */

.preview-wrapper {
    width: 210mm;       /* Standard A4 Width */
    min-height: 297mm;  /* Standard A4 Height */
    background-color: white;
    box-shadow: var(--shadow-lg);
    position: relative;
    color: #333;        /* Ensure preview is always standard colors regardless of dark mode */
}

/* Empty State Handling */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 297mm;
    color: #94a3b8;
    text-align: center;
    padding: 2rem;
}
.empty-state h2 { margin: 1rem 0 0.5rem; color: #64748b; }
.empty-state i { opacity: 0.3; }

/* Base Resume Structure */
.resume-preview {
    width: 100%;
    height: 100%;
    padding: 0;
    box-sizing: border-box;
    font-family: inherit;
    color: #333;
}
.resume-preview * {
    box-sizing: border-box;
    word-break: break-word;
    min-width: 0;
}

.resume-preview [contenteditable="true"] {
    outline: none;
    border-radius: 2px;
    transition: background-color 0.2s;
    min-width: 10px;
    display: inline-block;
}
p[contenteditable="true"], div[contenteditable="true"] {
    display: block;
}

.resume-preview a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s;
}
.resume-preview a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

.resume-preview [contenteditable="true"]:hover {
    background-color: rgba(59, 130, 246, 0.1);
    cursor: text;
}
.resume-preview [contenteditable="true"]:focus {
    background-color: rgba(59, 130, 246, 0.15);
    border-bottom: 1px dashed var(--primary-color);
}

/* When PDF is generating, remove backgrounds */
.pdf-generating .resume-preview [contenteditable="true"] {
    background-color: transparent !important;
    border: none !important;
}

/* Shared Core Components */
.tag {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    background-color: #e2e8f0;
    color: #334155;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    margin: 0.2rem 0.2rem 0.2rem 0;
}


/* =========================================
   TEMPLATE 1: MODERN
   ========================================= */

.template-modern {
    font-family: 'Roboto', sans-serif;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.template-modern .resume-header {
    background-color: #1e293b;
    color: #f8fafc;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.template-modern .resume-photo img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #3b82f6;
}

.template-modern .header-text {
    flex: 1;
}

.template-modern .r-name { font-size: 2.5rem; margin-bottom: 0.2rem; color: #fff;}
.template-modern .r-title { font-size: 1.2rem; color: #3b82f6; font-weight: 400; margin-bottom: 1rem;}

.template-modern .resume-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: #94a3b8;
}

.template-modern .resume-contact i { color: #3b82f6; margin-right: 0.3rem;}

.template-modern .resume-layout {
    display: flex;
    padding: 2rem;
    gap: 2rem;
    flex: 1;
}

.template-modern .layout-main { flex: 2; }
.template-modern .layout-sidebar { flex: 1; }

.template-modern .section-title {
    font-size: 1.2rem;
    color: #1e293b;
    text-transform: uppercase;
    border-bottom: 2px solid #3b82f6;
    padding-bottom: 0.4rem;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.template-modern .r-item { margin-bottom: 1.2rem; }
.template-modern .r-item-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.2rem;
}
.template-modern .r-item-title { font-size: 1.05rem; color: #1e293b; }
.template-modern .r-item-date { font-size: 0.85rem; color: #64748b; font-weight: 500;}
.template-modern .r-item-subtitle { font-size: 0.95rem; color: #3b82f6; margin-bottom: 0.4rem; font-weight: 500;}
.template-modern .r-body-text { font-size: 0.9rem; color: #475569; line-height: 1.5; }

.template-modern .cert-list { list-style: none; padding: 0; }
.template-modern .cert-list li { margin-bottom: 0.8rem; font-size: 0.9rem; color: #475569;}
.template-modern .cert-meta { font-size: 0.8rem; color: #64748b; }

.template-modern .resume-section { margin-bottom: 2rem; }


/* =========================================
   TEMPLATE 2: PROFESSIONAL
   ========================================= */

.template-professional {
    font-family: 'Times New Roman', Times, serif;
    padding: 3rem;
}

.template-professional .resume-header {
    text-align: center;
    border-bottom: 2px solid #000;
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.template-professional .resume-photo img {
    width: 100px;
    height: 100px;
    border-radius: 4px;
    object-fit: cover;
    margin-bottom: 1rem;
}

.template-professional .r-name { font-size: 3rem; color: #000; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 0.5rem; }
.template-professional .r-title { font-size: 1.2rem; color: #333; font-style: italic; margin-bottom: 1rem;}

.template-professional .resume-contact {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: #444;
}

.template-professional .resume-contact i { display: none; } /* Hide icons for prof. look */
.template-professional .contact-item::after {
    content: '|';
    margin-left: 1.5rem;
    color: #ccc;
}
.template-professional .contact-item:last-child::after { content: ''; }

.template-professional .resume-layout {
    display: block; /* Single Column Wide */
}
.template-professional .layout-sidebar { margin-top: 2rem; }

.template-professional .section-title {
    font-size: 1.2rem;
    color: #000;
    text-transform: uppercase;
    border-bottom: 1px solid #aaa;
    margin-bottom: 1rem;
    padding-bottom: 0.2rem;
    letter-spacing: 1px;
}

.template-professional .r-item { margin-bottom: 1.2rem; }
.template-professional .r-item-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}
.template-professional .r-item-title { font-size: 1.1rem; color: #000; font-weight: bold; }
.template-professional .r-item-date { font-size: 0.95rem; color: #444; font-style: italic;}
.template-professional .r-item-subtitle {
    font-size: 1rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 0.4rem;
}
.template-professional .r-item-meta { font-size: 0.9rem; color: #555; }
.template-professional .r-body-text { font-size: 0.95rem; color: #333; line-height: 1.5; }

.template-professional .tag { background: none; border: 1px solid #aaa; border-radius: 0; padding: 0.1rem 0.5rem; margin-bottom: 0.4rem;}

.template-professional .cert-list { list-style: disc; padding-left: 1.2rem; }
.template-professional .cert-list li { margin-bottom: 0.5rem; font-size: 0.95rem;}


/* =========================================
   TEMPLATE 3: MINIMAL
   ========================================= */

.template-minimal {
    font-family: 'Inter', sans-serif;
    padding: 4rem;
    color: #111;
}

.template-minimal .resume-header {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 3rem;
}

.template-minimal .resume-photo img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    filter: grayscale(100%);
}

.template-minimal .r-name { font-size: 2.2rem; font-weight: 300; margin-bottom: 0.3rem;}
.template-minimal .r-title { font-size: 1rem; color: #777; font-weight: 400; text-transform: lowercase; margin-bottom: 1rem; letter-spacing: 1px;}
.template-minimal .resume-contact {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: #555;
}
.template-minimal .resume-contact i { display: none; }

.template-minimal .resume-layout {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 3rem;
}
.template-minimal .layout-sidebar { order: -1; } /* sidebar on left */

.template-minimal .section-title {
    font-size: 0.85rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.template-minimal .resume-section { margin-bottom: 3rem; }

.template-minimal .r-item { margin-bottom: 2rem; }
.template-minimal .r-item-head {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.2rem;
}
.template-minimal .r-item-title { font-size: 1rem; font-weight: 600;}
.template-minimal .r-item-date { font-size: 0.8rem; color: #888; }
.template-minimal .r-item-subtitle { font-size: 0.9rem; color: #555; margin-bottom: 0.5rem;}
.template-minimal .r-body-text { font-size: 0.85rem; color: #555; line-height: 1.6; }

.template-minimal .skills-tags { display: flex; flex-direction: column; gap: 0.3rem; }
.template-minimal .tag { background: none; padding: 0; color: #333; font-size: 0.85rem;}


/* =========================================
   TEMPLATE 4: CREATIVE
   ========================================= */

.template-creative {
    font-family: 'Inter', sans-serif;
    display: flex;
    flex-direction: column;
    background-color: #fafafa;
}

.template-creative .resume-header {
    display: flex;
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    color: white;
    padding: 3rem;
    align-items: center;
    gap: 3rem;
    border-radius: 0 0 40px 0;
}

.template-creative .resume-photo img {
    width: 140px;
    height: 140px;
    border-radius: 20px;
    border: 4px solid white;
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    object-fit: cover;
}

.template-creative .r-name { font-size: 3rem; font-weight: 800; margin-bottom: 0.2rem;}
.template-creative .r-title { font-size: 1.2rem; opacity: 0.9; margin-bottom: 1.5rem; }

.template-creative .resume-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.9rem;
}
.template-creative .resume-contact i { margin-right: 0.4rem; opacity: 0.8; }

.template-creative .resume-layout {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    padding: 3rem;
    gap: 3rem;
}

.template-creative .layout-main {
    background-color: #fff;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.template-creative .section-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.template-creative .section-title::before {
    content: '';
    width: 12px;
    height: 12px;
    background-color: #ec4899;
    border-radius: 50%;
    display: inline-block;
}

.template-creative .r-item { margin-bottom: 2rem; position: relative; padding-left: 1.5rem; border-left: 2px solid #e2e8f0;}
.template-creative .r-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 6px;
    width: 10px;
    height: 10px;
    background: #8b5cf6;
    border-radius: 50%;
}

.template-creative .r-item-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.3rem;}
.template-creative .r-item-title { font-size: 1.1rem; color: #1e293b; font-weight: 700;}
.template-creative .r-item-date { font-size: 0.85rem; background: #f1f5f9; padding: 0.2rem 0.6rem; border-radius: 12px; color: #64748b;}
.template-creative .r-item-subtitle { color: #ec4899; font-weight: 600; font-size: 0.95rem; margin-bottom: 0.5rem;}
.template-creative .r-body-text { color: #475569; font-size: 0.95rem; line-height: 1.6;}

.template-creative .layout-sidebar .section-title::before { background-color: #8b5cf6; }
.template-creative .layout-sidebar .tag { background-color: #fce7f3; color: #ec4899; border-radius: 6px; padding: 0.4rem 0.8rem;}
.template-creative .layout-sidebar .soft-tags .tag { background-color: #ede9fe; color: #8b5cf6; }

/* =========================================
   TEMPLATE 5: ELEGANT
   ========================================= */
.template-elegant {
    font-family: 'Georgia', serif;
    background-color: #fff;
    color: #2c3e50;
    padding: 3rem;
}
.template-elegant .resume-header {
    text-align: center;
    border-bottom: 1px solid #7f8c8d;
    padding-bottom: 2rem;
    margin-bottom: 2rem;
}
.template-elegant .resume-photo img {
    width: 110px; height: 110px; border-radius: 50%; border: 1px solid #bdc3c7; margin-bottom: 1rem; object-fit: cover;
}
.template-elegant .r-name { font-size: 3.2rem; color: #2c3e50; font-weight: normal; font-style: italic; margin-bottom: 0.5rem;}
.template-elegant .r-title { font-size: 1.3rem; color: #7f8c8d; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 1.2rem;}
.template-elegant .resume-contact { display: flex; justify-content: center; gap: 2rem; font-size: 0.9rem; font-family: 'Inter', sans-serif; flex-wrap: wrap;}
.template-elegant .resume-contact i { color: #2980b9; margin-right: 0.4rem;}

.template-elegant .resume-layout { display: flex; flex-direction: column; gap: 2rem; }
.template-elegant .section-title { font-size: 1.6rem; color: #2980b9; text-align: center; font-style: italic; margin-bottom: 1rem; position: relative;}
.template-elegant .section-title::after { content: ''; display: block; width: 50px; height: 2px; background: #2980b9; margin: 0.5rem auto 0;}
.template-elegant .r-item { margin-bottom: 1.5rem; text-align: center; }
.template-elegant .r-item-head { display: flex; flex-direction: column; align-items: center; margin-bottom: 0.4rem;}
.template-elegant .r-item-title { font-size: 1.25rem; font-weight: bold; color: #2c3e50;}
.template-elegant .r-item-date { font-size: 0.9rem; color: #7f8c8d; font-family: 'Inter', sans-serif;}
.template-elegant .r-item-subtitle { font-size: 1.1rem; color: #e74c3c; margin-bottom: 0.5rem; font-style: italic;}
.template-elegant .r-body-text { font-family: 'Inter', sans-serif; font-size: 0.95rem; line-height: 1.6; color: #34495e; max-width: 800px; margin: 0 auto;}
.template-elegant .tag { background: transparent; border: 1px solid #bdc3c7; color: #7f8c8d; font-family: 'Inter', sans-serif;}

/* =========================================
   TEMPLATE 6: CORPORATE
   ========================================= */
.template-corporate {
    font-family: 'Arial', sans-serif;
    color: #333;
    background: #fff;
    display: flex;
    flex-direction: column;
}
.template-corporate .resume-header {
    background-color: #2c3e50;
    color: #fff;
    padding: 3rem;
    display: flex;
    align-items: center;
    gap: 3rem;
}
.template-corporate .resume-photo img {
    width: 120px; height: 120px; border-radius: 4px; border: 3px solid #fff; object-fit: cover;
}
.template-corporate .r-name { font-size: 3rem; margin-bottom: 0.3rem;}
.template-corporate .r-title { font-size: 1.3rem; color: #3498db;}
.template-corporate .resume-contact { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: 1rem;}
.template-corporate .resume-contact i { margin-right: 0.5rem;}
.template-corporate .resume-layout { display: grid; grid-template-columns: 2fr 1fr; padding: 3rem; gap: 3rem;}
.template-corporate .section-title { font-size: 1.4rem; color: #2c3e50; text-transform: uppercase; border-bottom: 3px solid #2c3e50; padding-bottom: 0.3rem; margin-bottom: 1.5rem;}
.template-corporate .r-item { margin-bottom: 1.5rem; }
.template-corporate .r-item-head { display: flex; justify-content: space-between; align-items: baseline;}
.template-corporate .r-item-title { font-size: 1.15rem; color: #2c3e50; font-weight: bold;}
.template-corporate .r-item-date { font-size: 0.9rem; color: #7f8c8d; font-weight: bold;}
.template-corporate .r-item-subtitle { font-size: 1rem; color: #3498db; margin-bottom: 0.5rem;}
.template-corporate .layout-sidebar .section-title { border-bottom-color: #3498db;}
.template-corporate .tag { background: #ecf0f1; border-left: 3px solid #3498db; border-radius: 0;}

/* =========================================
   Media Queries
   ========================================= */
@media (max-width: 900px) {
    .app-container {
        flex-direction: column;
    }
    .form-panel {
        width: 100%;
        max-width: none;
        height: 50vh;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    .preview-panel {
        height: 50vh;
    }
    .top-nav {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    /* Transform preview to scale on small screens if desired */
    .preview-wrapper {
        transform: scale(0.8);
        transform-origin: top center;
    }
}
