:root { --ink: #172b36; --muted: #526570; --accent: #146b64; --line: #dbe4e4; }
body { background: #f5f7f6; color: var(--ink); padding: 0; font-size: 17px; }
.consultancy-notice { background: #e8f3f0; border-bottom: 1px solid var(--line); text-align: center; }
.consultancy-notice a { display: block; padding: 6px 20px; color: var(--accent); font-size: 12px; font-weight: 500; line-height: 20px; letter-spacing: .01em; }
.consultancy-notice span { display: inline-block; margin-left: 6px; }
@media print { .consultancy-notice { display: none; } }
.container { width: min(100% - 40px, 880px); max-width: 880px; }
header { padding: 32px 0 42px; text-align: left; background: #fff; border-bottom: 1px solid var(--line); }
header nav { width: min(100% - 40px, 880px); margin: 0 auto 42px; display: flex; gap: 8px; }
nav a { font-size: 14px; border-radius: 8px; color: var(--accent); background: #fff; padding: 8px 16px; }
nav a.current { background: #e8f3f0; color: var(--accent); border-color: #b5d6ce; }
h1 { font-size: clamp(36px, 7vw, 56px); font-weight: 750; letter-spacing: -.04em; line-height: 1.12; margin-bottom: 18px; }
header .container > p { max-width: 690px; color: var(--muted); font-size: 18px; line-height: 1.7; }
a { color: var(--accent); }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 3px solid #c87723; outline-offset: 4px; }
.quick-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.quick-links a, .print-cv { border: 1px solid var(--line); background: #fff; padding: 10px 17px; border-radius: 8px; font: inherit; font-size: 15px; cursor: pointer; color: var(--accent); }
.quick-links a:first-child { background: var(--accent); color: #fff; border-color: var(--accent); }
main { margin: 44px 0; }
section { margin-bottom: 46px; scroll-margin-top: 20px; }
h2 { font-size: 22px; letter-spacing: -.02em; margin-bottom: 22px; }
h3 { font-size: 19px; line-height: 1.5; }
p, li { font-size: 17px; line-height: 1.75; }
article { padding: 26px; margin-bottom: 18px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
#experience > article:first-of-type { border-left: 4px solid var(--accent); }
.dates { font-size: 14px; font-style: normal; color: var(--muted); margin-bottom: 16px; }
article ul li { display: list-item; list-style: disc; padding-left: 3px; margin-bottom: 8px; }
article ul { padding-left: 20px; }
article ul li::before { content: none; }
article li::marker { color: var(--accent); }
#skills { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
#skills > h2 { grid-column: 1 / -1; margin-bottom: 0; }
.skills-category { padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.skills-category li { display: block; font-size: 15px; }
.skills-category li::before { content: none; }
.language-level { background: var(--accent); }
footer { padding: 38px 20px 24px; background: #fff; }
footer section { margin-bottom: 28px; }
.contact-info { font: inherit; padding: 8px 14px; border-color: var(--line); border-radius: 8px; margin: 6px; color: var(--accent); }
footer #downloads a { background: var(--accent); width: auto; margin: 6px; border-radius: 8px; }
footer > p, .archive-note { font-size: 13px; color: var(--muted); }
.info-icon { background: var(--accent); }
.popup-content { border-radius: 12px; width: min(90%, 600px); max-height: 80vh; overflow: auto; }
.skip-link { position: absolute; left: 20px; top: -80px; background: #fff; padding: 10px; z-index: 2000; }
.skip-link:focus { top: 10px; }
@media (max-width: 600px) { header { padding-top: 22px; } header nav { margin-bottom: 30px; } article { padding: 20px; } #skills { grid-template-columns: 1fr; } p, li { font-size: 16px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
@media print { body { background: #fff; } header nav, .quick-links, .info-icon, .popup, #downloads, .skip-link { display: none; } header { padding: 0 0 18px; } .container { width: 100%; } main { margin: 20px 0; } article, .skills-category { border: 0; padding: 0; break-inside: avoid; } section { margin-bottom: 24px; } p, li { font-size: 11pt; } h1 { font-size: 28pt; } h2 { font-size: 16pt; } h3 { font-size: 12pt; } footer { padding: 0; } }
footer { text-align: left; }
footer section, footer > p { width: min(100%, 880px); margin-left: auto; margin-right: auto; }
.contact-rows { display: grid; gap: 12px; max-width: 620px; }
.contact-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.contact-label { color: var(--muted); font-size: 15px; line-height: 1.5; }
.contact-row .contact-info { margin: 0; text-align: start; justify-self: start; max-width: 100%; overflow-wrap: anywhere; }
footer a.contact-info:hover { background: #e8f3f0; }
#downloads .print-cv, footer #downloads a { margin: 0 8px 10px 0; }

.profile-header { display: flex; align-items: center; gap: 32px; }
.profile-intro { flex: 1; min-width: 0; }
.profile-intro > p { color: var(--muted); font-size: 18px; line-height: 1.7; }
.profile-photo { width: 170px; height: 170px; flex: none; object-fit: cover; border-radius: 50%; border: 3px solid var(--line); }
@media (max-width: 600px) { .profile-header { flex-direction: column-reverse; align-items: flex-start; gap: 22px; } .profile-photo { width: 120px; height: 120px; } }
@media print { .profile-photo { width: 90px; height: 90px; } }

footer { background: #edf3f1; padding-top: 40px; }
.footer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; width: min(100%, 880px); margin: 0 auto 24px; }
footer .footer-card { width: auto; margin: 0; padding: 26px; border: 1px solid var(--line); border-radius: 14px; background: #fff; min-width: 0; }
.footer-card h2 { margin: 0 0 12px; }
footer .footer-description { color: var(--muted); font-size: 14px; line-height: 1.6; margin-bottom: 24px; }
footer button, footer a.contact-info, footer #downloads a { font-family: inherit; font-style: normal; font-size: 15px; font-weight: 500; line-height: 1.4; }
.contact-rows { font-style: normal; }
.contact-row .contact-info { padding: 10px 12px; min-height: 44px; width: 100%; background: #fff; color: var(--accent); font-size: 15px; line-height: 1.5; font-weight: 500; }
.footer-link { display: inline-block; font-size: 15px; margin-top: 8px; }
.download-actions { display: grid; gap: 10px; margin-bottom: 16px; }
footer #downloads .download-actions a { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; padding: 12px 16px; margin: 0; box-sizing: border-box; border: 1px solid var(--accent); text-decoration: none; }
.download-actions a span { font-size: 12px; opacity: .85; flex: none; white-space: nowrap; }
footer #downloads .download-actions a { text-align: start; overflow-wrap: anywhere; hyphens: auto; }
footer #downloads .download-actions a:nth-child(2) { background: #fff; color: var(--accent); }
footer #downloads .download-actions a:hover { background: #e8f3f0; color: var(--accent); }
footer #downloads .print-cv { border: 0; padding: 4px 0; margin: 0; min-height: 36px; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
@media print { .footer-grid { display: block; } footer .footer-card { border: 0; padding: 0; } }

.company-logo { display: inline-block; width: 48px; height: 28px; object-fit: contain; vertical-align: middle; margin-right: 8px; border-radius: 4px; background: #fff; }
article h3 a:has(.company-logo) { display: inline; }

article h3.role-title { display: flex; align-items: center; gap: 18px; }
.role-title .company-logo { width: 96px; height: 48px; flex: 0 0 96px; margin: 0; border-radius: 6px; }
.role-title-text { min-width: 0; }
@media (max-width: 600px) { article h3.role-title { gap: 12px; } .role-title .company-logo { width: 76px; height: 44px; flex-basis: 76px; } }

.role-title .company-logo[src*="weex-square"] { width: 54px; height: 54px; flex-basis: 54px; }

.role-title .company-logo[src*="ntnu-emblem"] { width: 54px; height: 54px; flex-basis: 54px; }

/* Give translated role titles the full card width on small screens. */
@media (max-width: 480px) {
  article h3.role-title { flex-direction: column; align-items: flex-start; }
  .role-title .company-logo { flex: none; }
}
