/* ========================================
   LARS HORNBECK - PERSONAL CV WEBSITE
   ======================================== */

:root {
    --color-bg: #FFFFFF;
    --shadow-light: rgba(255, 255, 255, 1);
    --shadow-dark: rgba(200, 200, 200, 0.5);
    --color-text: #000000;
    --color-text-on-dark: #FFFFFF;
    --color-indigo: #5865F2;
    --color-cyan: #00D9C0;
    --color-pink: #FF6B9D;
    --color-blue-light: #5DADE2;
    --radius-pill: 50px;
    --radius-medium: 20px;
    --radius-small: 12px;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', monospace;
    --text-display: clamp(2rem, 4.5vw, 3.5rem);
    --line-display: 1.12;
    --text-headline: clamp(1.5rem, 3vw, 2rem);
    --line-headline: 1.25;
    --text-title: 1.125rem;
    --line-title: 1.27;
    --text-body: 1rem;
    --line-body: 1.5;
    --text-label: 0.875rem;
    --line-label: 1.43;
    --neo-shadow-out: -6px -6px 14px var(--shadow-light), 6px 6px 14px var(--shadow-dark);
    --neo-shadow-in: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
    --section-gap: 80px;
    --section-gap-large: 100px;
    --content-max-width: 1100px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-main);
    font-size: var(--text-body);
    line-height: var(--line-body);
    background: var(--color-bg);
    color: var(--color-text);
    -webkit-font-smoothing: antialiased;
}

::selection { background: var(--color-indigo); color: var(--color-text-on-dark); }

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px clamp(20px, 5vw, 60px);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
}

.header-content { max-width: var(--content-max-width); margin: 0 auto; }

.name-logo {
    font-size: var(--text-body);
    font-weight: 700;
    color: var(--color-text);
    cursor: pointer;
}

main {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 clamp(20px, 5vw, 60px);
}

section { margin-bottom: var(--section-gap); }

/* HERO */
.hero {
    min-height: auto;
    display: flex;
    align-items: flex-start;
    padding-top: 120px;
    padding-bottom: 20px;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 48px;
    align-items: start;
    width: 100%;
}

.hero-text h1 {
    font-size: var(--text-display);
    font-weight: 700;
    line-height: var(--line-display);
    color: var(--color-text);
    animation: slideInLeft 0.8s ease-out;
}

.hero-text h1 code {
    font-family: var(--font-mono);
    font-weight: 500;
    color: var(--color-indigo);
}

.hero-text h1 code::after { content: "()"; }

.hero-text .contact-links {
    margin-top: 24px;
}

.profile-image-container { animation: slideInRight 0.8s ease-out; }

.profile-image {
    width: 100%;
    height: auto;
    filter: grayscale(100%);
    transition: filter 0.4s ease;
}

.profile-image:hover { filter: grayscale(0%); }

/* PROOF SECTION */
.proof {
    margin-top: -40px;
    margin-bottom: 48px;
}

.proof-text {
    font-size: var(--text-body);
    line-height: var(--line-body);
    color: var(--color-text);
    max-width: 700px;
}

/* HIGHLIGHT LINK - Cyan highlight hover effect */
.highlight-link {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    margin: 0 0.1em;
    isolation: isolate;
}

.highlight-link::after {
    content: '';
    position: absolute;
    left: -2px;
    right: -2px;
    top: 0;
    height: 100%;
    background: var(--color-cyan);
    z-index: -1;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.2s ease;
}

.highlight-link:hover::after { 
    transform: scaleX(1); 
    transform-origin: left; 
}

.contact-links { display: flex; gap: 24px; }

.rgb-link {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 600;
    font-size: var(--text-body);
    position: relative;
}

.rgb-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: currentColor;
    transition: transform 0.2s ease;
}

.rgb-link:hover::before { transform: scaleX(0); }
.rgb-link:hover { animation: rgbGlitch 0.3s ease; }

@keyframes rgbGlitch {
    25% { text-shadow: -2px 0 var(--color-cyan), 2px 0 var(--color-pink); }
    50% { text-shadow: 2px 0 var(--color-cyan), -2px 0 var(--color-pink); }
    75% { text-shadow: -1px 0 var(--color-pink), 1px 0 var(--color-cyan); }
}

/* CV SECTION */
.cv-toggle { margin-bottom: 32px; }

.toggle-container {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px;
    background: var(--color-bg);
    border-radius: var(--radius-pill);
    box-shadow: var(--neo-shadow-out);
    cursor: pointer;
}

.toggle-label {
    font-size: var(--text-label);
    font-weight: 600;
    color: var(--color-text);
    opacity: 0.4;
}

.toggle-container input:not(:checked) ~ .toggle-label:first-of-type,
.toggle-container input:checked ~ .toggle-label:last-of-type { opacity: 1; }

.toggle-switch {
    width: 44px;
    height: 24px;
    background: var(--color-bg);
    border-radius: 12px;
    position: relative;
    box-shadow: var(--neo-shadow-in);
    transition: background 0.3s ease;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: var(--color-indigo);
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.toggle-container input:checked ~ .toggle-switch::after {
    transform: translateX(20px);
}

.toggle-container input { display: none; }

/* CV TIMELINE - Streg mellem årstal og content */
.cv-timeline {
    list-style: none;
    position: relative;
}

.cv-timeline::before {
    content: '';
    position: absolute;
    left: 132px; /* Efter årstal kolonnen (120px) + lidt margin */
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(0,0,0,0.1);
}

.cv-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 36px; /* Øget gap for at give plads til streg */
    margin-bottom: 32px;
    position: relative;
}

.cv-date {
    text-align: left; /* Left align i stedet for right */
}

.cv-date .year {
    font-size: var(--text-label);
    font-weight: 600;
    color: var(--color-text);
    opacity: 0.5;
}

.cv-content { 
    position: relative;
    padding-left: 24px; /* Plads til bullet */
}

.cv-entry {
    position: relative;
}

/* Bullet placeret på stregen */
.cv-entry::before {
    content: '';
    position: absolute;
    left: -30px; /* Placeret på stregen */
    top: 6px;
    width: 12px;
    height: 12px;
    background: var(--color-bg);
    border: 2px solid var(--color-indigo);
    border-radius: 50%;
}

.cv-entry h3 {
    font-size: var(--text-title);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 4px;
}

.cv-entry .company {
    font-size: var(--text-label);
    color: var(--color-text);
    opacity: 0.6;
}

.cv-details {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.4s ease;
}

.cv-details.show {
    max-height: 1000px;
    opacity: 1;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.cv-details p {
    font-size: var(--text-label);
    line-height: var(--line-label);
    color: var(--color-text);
    margin-bottom: 12px;
}

.cv-details ul { list-style: none; margin: 12px 0; }

.cv-details ul li {
    font-size: var(--text-label);
    line-height: var(--line-label);
    color: var(--color-text);
    padding-left: 18px;
    position: relative;
    margin-bottom: 8px;
}

.cv-details ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 7px;
    width: 6px;
    height: 6px;
    background: var(--color-indigo);
    border-radius: 50%;
}

.bottom-line {
    background: rgba(88, 101, 242, 0.08);
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 3px solid var(--color-indigo);
    margin-top: 12px;
    font-size: var(--text-label);
    line-height: var(--line-label);
    color: var(--color-text);
}

.early-career { display: none; }
.early-career.hidden { display: none; }
.early-career:not(.hidden) { display: grid; }

.early-career-toggle { cursor: pointer; }

.early-career-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 24px;
    font-size: var(--text-label);
    font-weight: 600;
    color: var(--color-text);
}

.early-career-link:hover { opacity: 0.6; }
.early-career-link .arrow { transition: transform 0.3s ease; }
.early-career-toggle.active .early-career-link .arrow { transform: rotate(180deg); }

/* EDUCATION - with subtle dotted background */
.education-section {
    position: relative;
    margin-left: calc(-1 * clamp(20px, 5vw, 60px));
    margin-right: calc(-1 * clamp(20px, 5vw, 60px));
    padding-left: clamp(20px, 5vw, 60px);
    padding-right: clamp(20px, 5vw, 60px);
    padding-top: 48px;
    padding-bottom: 48px;
    background-color: var(--color-bg);
    background-image: radial-gradient(circle, rgba(0, 0, 0, 0.14) 1px, transparent 1px);
    background-size: 5px 5px;
}

.education-section h2 {
    font-size: var(--text-title);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 24px;
}

.education-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

.edu-item .edu-year {
    font-size: var(--text-label);
    font-weight: 600;
    color: var(--color-text);
    opacity: 0.5;
    display: block;
    margin-bottom: 6px;
}

.edu-item h3 {
    font-size: var(--text-title);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 4px;
}

.edu-item p {
    font-size: var(--text-label);
    color: var(--color-text);
    margin-bottom: 6px;
}

.edu-item .edu-school {
    font-size: var(--text-label);
    color: var(--color-text);
    opacity: 0.5;
}

/* CLIENTS */
.clients-section { margin-bottom: var(--section-gap-large); }

.clients-section h2 {
    font-size: var(--text-title);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 16px;
}

.clients-intro {
    font-size: var(--text-body);
    line-height: var(--line-body);
    color: var(--color-text);
    margin-bottom: 24px;
}

.clients-grid { display: flex; flex-wrap: wrap; gap: 16px; }

.client-tag {
    background: var(--color-bg);
    padding: 12px 24px;
    border-radius: var(--radius-pill);
    font-size: var(--text-label);
    font-weight: 500;
    color: var(--color-text);
    box-shadow: var(--neo-shadow-out);
    transition: box-shadow 0.3s ease;
}

.client-tag:hover { box-shadow: var(--neo-shadow-in); }

/* APPS / SIDE PROJECTS - Clean bento box layout */
.apps-section { margin-bottom: var(--section-gap-large); }

.apps-section h2 {
    font-size: var(--text-title);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 24px;
}

.apps-intro {
    font-size: var(--text-body);
    line-height: var(--line-body);
    color: var(--color-text);
    max-width: 800px;
    margin-bottom: 16px;
}

.apps-intro:last-of-type {
    margin-bottom: 32px;
}

.apps-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid var(--color-text);
    border-radius: var(--radius-medium);
    overflow: hidden;
}

.app-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 32px;
    background: var(--color-bg);
}

/* APP ICON - Full color, no hover effect, static image */
.app-icon {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    flex-shrink: 0;
}

.app-info h3 {
    font-size: var(--text-title);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 8px;
}

.app-info p {
    font-size: var(--text-label);
    line-height: var(--line-label);
    color: var(--color-text);
    margin-bottom: 12px;
}

/* THIS AND THAT */
.more-section { margin-bottom: var(--section-gap-large); }

.more-section h2 {
    font-size: var(--text-title);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 16px;
}

.more-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.about-text {
    font-size: var(--text-body);
    line-height: var(--line-body);
    color: var(--color-text);
    margin-bottom: 32px;
}

.article-link {
    font-size: var(--text-body);
    line-height: var(--line-body);
    color: var(--color-text);
}

.lightning-round {
    background: var(--color-text);
    border-radius: var(--radius-medium);
    padding: 28px;
}

.lightning-round h4 {
    font-size: var(--text-label);
    font-weight: 700;
    color: var(--color-text-on-dark);
    opacity: 0.5;
    margin-bottom: 20px;
}

.lightning-round ul { list-style: none; display: grid; gap: 12px; }
.lightning-round ul li {
    font-size: var(--text-label);
    line-height: var(--line-label);
    color: var(--color-text-on-dark);
}

/* SKILLS / CORE COMPETENCIES - Tiered with color-coded hover */
.skills-section { margin-bottom: var(--section-gap); }

.skills-section h2 {
    font-size: var(--text-title);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 24px;
}

.skills-grid { display: flex; flex-wrap: wrap; gap: 16px; }

.skill-tag {
    background: var(--color-bg);
    padding: 12px 24px;
    border-radius: var(--radius-pill);
    font-size: var(--text-label);
    font-weight: 600;
    color: var(--color-text);
    box-shadow: var(--neo-shadow-out);
    transition: all 0.3s ease;
}

/* TOP TIER - Indigo */
.skill-tag.tier-top:hover {
    box-shadow: var(--neo-shadow-in);
    background: rgba(88, 101, 242, 0.15);
}

/* HIGH PRIORITY - Cyan */
.skill-tag.tier-high:hover {
    box-shadow: var(--neo-shadow-in);
    background: rgba(0, 217, 192, 0.15);
}

/* SOLID FOUNDATION - Light Blue */
.skill-tag.tier-solid:hover {
    box-shadow: var(--neo-shadow-in);
    background: rgba(93, 173, 226, 0.15);
}

/* NICHE SPECIALIZATION - Pink */
.skill-tag.tier-niche:hover {
    box-shadow: var(--neo-shadow-in);
    background: rgba(255, 107, 157, 0.15);
}

/* FOOTER */
footer { padding: 40px clamp(20px, 5vw, 60px); }

.footer-content {
    max-width: var(--content-max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.copyright { font-size: var(--text-label); color: var(--color-text); }
.joke { font-size: var(--text-label); color: var(--color-text); text-align: center; }
.social-links { list-style: none; display: flex; gap: 20px; justify-content: flex-end; }
.social-links a { font-size: var(--text-label); color: var(--color-text); }
.wave { display: inline-block; transform: rotate(17deg); transform-origin: 70% 70%; }
.footer-content:hover .wave { animation: waveHello 1.3s ease-in-out; }
.laugh { display: inline-block; }
.footer-content:hover .laugh { animation: laughBounce 1s ease-in-out; }

@keyframes waveHello {
    0% { transform: rotate(17deg) scale(1); }
    15%, 35%, 55% { transform: rotate(30deg) scale(1.3); }
    25%, 45% { transform: rotate(5deg) scale(1.3); }
    65%, 100% { transform: rotate(17deg) scale(1); }
}

@keyframes laughBounce {
    0%, 100% { transform: scale(1) rotate(0deg); }
    15% { transform: scale(1.3) rotate(-8deg); }
    30% { transform: scale(1.3) rotate(8deg); }
    45% { transform: scale(1.3) rotate(-8deg); }
    60% { transform: scale(1) rotate(0deg); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .hero-content { 
        grid-template-columns: 1fr; 
        text-align: left;
    }
    .hero-text {
        text-align: left;
    }
    .hero-image { order: -1; max-width: 180px; margin: 0 auto; }
    .more-grid { grid-template-columns: 1fr; }
    .education-grid { grid-template-columns: 1fr; gap: 32px; }
    .apps-container { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    :root { --section-gap: 60px; --section-gap-large: 80px; }

    /* Timeline responsive - streg og layout tilpasset */
    .cv-timeline::before { left: 100px; }
    .cv-item { 
        grid-template-columns: 90px 1fr; 
        gap: 24px;
    }
    .cv-content { padding-left: 20px; }
    .cv-entry::before { left: -26px; }
    .early-career-link { padding-left: 20px; }

    .footer-content { grid-template-columns: 1fr; text-align: center; gap: 16px; }
    .social-links { justify-content: center; }
    .app-card { flex-direction: column; }
    .education-section { margin-left: -20px; margin-right: -20px; padding-left: 20px; padding-right: 20px; }
    .proof { margin-top: -20px; }
}

@media (max-width: 600px) {
    .hero-text h1 { 
        font-size: 1.75rem; 
        text-align: left;
    }
    .lightning-round ul { grid-template-columns: 1fr; }

    /* Mobil: Årstal over tekst, streg til venstre */
    .cv-timeline::before { left: 6px; }
    .cv-item { 
        grid-template-columns: 1fr; 
        gap: 8px;
        padding-left: 24px;
    }
    .cv-date { text-align: left; }
    .cv-content { padding-left: 0; }
    .cv-entry { padding-left: 0; }
    .cv-entry::before { 
        left: -18px;
        top: -24px; /* Flyttes op ved siden af årstal */
    }
    .early-career-link { padding-left: 0; }
}

a:focus, button:focus { outline: 3px solid var(--color-indigo); outline-offset: 3px; }

@media print {
    header { position: static; }
    .cv-details { max-height: none !important; opacity: 1 !important; }
    .early-career { display: grid !important; }
    .early-career-toggle, .cv-toggle { display: none; }
    .education-section { background-image: none; }
}
