/* ============================================
   TIMOSAM.COM - Design System with Dark Mode
   ============================================ */

/* Local Fonts */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/Inter-Regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/Inter-SemiBold.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/Inter-Bold.woff2') format('woff2');
}

@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/IBMPlexSans-Regular.woff2') format('woff2');
}

@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('fonts/IBMPlexSans-Medium.woff2') format('woff2');
}

@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/IBMPlexSans-SemiBold.woff2') format('woff2');
}

@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/JetBrainsMono-Regular.woff2') format('woff2');
}

@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('fonts/JetBrainsMono-Medium.woff2') format('woff2');
}

/* ============================================
   CSS Reset & Base Styles
   ============================================ */

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

:root {
    /* Light Mode Colors (Default) */
    --color-primary: #0A0E14;
    --color-secondary: #8B9BB4;
    --color-accent: #4ECDC4;
    --color-background: #F8F9FA;
    --color-code-bg: #1E2127;
    --color-card-bg: #ffffff;
    --color-border: rgba(10, 14, 20, 0.1);
    --color-divider: rgba(139, 155, 180, 0.3);
    --color-shadow: rgba(0, 0, 0, 0.05);
    
    /* Typography */
    --font-heading: 'Inter', sans-serif;
    --font-body: 'IBM Plex Sans', sans-serif;
    --font-code: 'JetBrains Mono', monospace;
    
    /* Typography Scale */
    --font-size-h1: 48px;
    --font-size-h2: 32px;
    --font-size-h3: 24px;
    --font-size-h4: 20px;
    --font-size-body: 18px;
    --font-size-small: 16px;
    
    /* Spacing */
    --spacing-section: 80px;
    --spacing-item: 48px;
    --spacing-paragraph: 24px;
    --spacing-margin-desktop: 80px;
    --spacing-margin-mobile: 40px;
    
    /* Layout */
    --max-content-width: 800px;
    --line-height: 1.7;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    :root {
        --color-primary: #e0e0e0;
        --color-secondary: #9BA8BD;
        --color-accent: #4ECDC4;
        --color-background: #0A0E14;
        --color-code-bg: #1a1a1a;
        --color-card-bg: #1E2127;
        --color-border: rgba(255, 255, 255, 0.1);
        --color-divider: rgba(155, 168, 189, 0.2);
        --color-shadow: rgba(0, 0, 0, 0.3);
    }
}

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

body {
    font-family: var(--font-body);
    font-size: var(--font-size-body);
    line-height: var(--line-height);
    color: var(--color-primary);
    background-color: var(--color-background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ============================================
   Typography
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--spacing-paragraph);
    color: var(--color-primary);
}

h1 {
    font-size: var(--font-size-h1);
    font-weight: 700;
}

h2 {
    font-size: var(--font-size-h2);
}

h3 {
    font-size: var(--font-size-h3);
}

h4 {
    font-size: var(--font-size-h4);
}

p {
    margin-bottom: var(--spacing-paragraph);
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

code, pre {
    font-family: var(--font-code);
    background-color: var(--color-code-bg);
    color: var(--color-background);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: var(--font-size-small);
}

/* ============================================
   Layout & Container
   ============================================ */

.container {
    max-width: var(--max-content-width);
    margin: 0 auto;
    padding: 0 var(--spacing-margin-desktop);
}

/* ============================================
   Header & Navigation
   ============================================ */

header {
    background-color: var(--color-background);
    padding: var(--spacing-paragraph) 0;
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 9999;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 2px 8px var(--color-shadow);
}

.header-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-paragraph);
    position: relative;
}

/* Desktop: Title and button on same row */
.header-content > div:first-child {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.site-title {
    font-size: var(--font-size-h3);
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 0;
}

.site-subtitle {
    font-size: var(--font-size-small);
    color: var(--color-secondary);
    font-weight: 400;
    margin-bottom: 0;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

nav a {
    color: var(--color-secondary);
    font-size: var(--font-size-body);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* Mobile menu toggle button */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--color-text);
    cursor: pointer;
    padding: 8px;
    line-height: 1;
    transition: color 0.2s ease;
}

.mobile-menu-toggle:hover {
    color: var(--color-accent);
}

.mobile-menu-toggle:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 4px;
}

/* Book a meeting button container */
.book-meeting-button {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-shrink: 0;
}

/* Calendar embed styling */
.calendar-embed {
    margin-top: var(--spacing-paragraph);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 16px var(--color-shadow);
    background-color: var(--color-card-bg);
}

.calendar-embed iframe {
    display: block;
    width: 100%;
    min-height: 600px;
}

/* ============================================
   Profile Picture
   ============================================ */

.profile-picture-container {
    text-align: center;
    margin-bottom: var(--spacing-item);
}

.profile-picture {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 1.5px solid var(--color-accent);
    object-fit: cover;
    box-shadow: 0 4px 15px var(--color-shadow);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.profile-picture-placeholder {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-accent), var(--color-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--font-size-small);
    font-style: italic;
    border: 4px solid var(--color-accent);
    box-shadow: 0 4px 15px var(--color-shadow);
}

/* ============================================
   Main Content
   ============================================ */

main {
    padding: var(--spacing-section) 0;
    min-height: 60vh;
}

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

.intro {
    margin-bottom: var(--spacing-section);
}

.intro p {
    font-size: var(--font-size-body);
    line-height: 1.8;
}

/* ============================================
   Executive Summary Box
   ============================================ */

.executive-summary {
    background: var(--color-card-bg);
    padding: var(--spacing-item);
    margin-bottom: var(--spacing-section);
    border-left: 4px solid var(--color-accent);
    box-shadow: 0 2px 10px var(--color-shadow);
    border-radius: 4px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.executive-summary h2 {
    font-size: var(--font-size-h3);
    margin-bottom: 16px;
}

.executive-summary p {
    line-height: 1.8;
    margin-bottom: 16px;
}

.executive-summary .core-value {
    font-weight: 600;
    font-style: italic;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
    color: var(--color-accent);
}

/* ============================================
   Divider
   ============================================ */

.divider {
    height: 1px;
    background: linear-gradient(to right, transparent, var(--color-divider), transparent);
    margin: var(--spacing-item) 0;
}

/* ============================================
   Areas of Focus Badges
   ============================================ */

.focus-badges {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: var(--spacing-paragraph) 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: var(--font-size-small);
    font-weight: 500;
    box-shadow: 0 1px 3px var(--color-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.3s ease;
}

.badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--color-shadow);
}

.badge-icon {
    font-size: 18px;
    color: var(--color-accent);
}

/* ============================================
   Image Placeholders
   ============================================ */

.image-placeholder {
    background: linear-gradient(135deg, var(--color-accent), var(--color-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.image-placeholder:hover {
    transform: scale(1.02);
}

.project-image {
    width: 100%;
    height: 300px;
    margin: var(--spacing-paragraph) 0;
}

.article-thumbnail {
    width: 100%;
    height: 200px;
    margin-bottom: 16px;
}

.article-cover {
    width: 100%;
    max-width: 480px;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 14px;
    display: block;
    transition: opacity 0.3s ease;
}

.article-cover:hover {
    opacity: 0.85;
}

.small-placeholder {
    width: 60px;
    height: 60px;
    font-size: 12px;
}

/* ============================================
   Work/Writing/Research Items
   ============================================ */

.item {
    margin-bottom: var(--spacing-item);
    padding-bottom: var(--spacing-item);
    border-bottom: 1px solid var(--color-border);
}

.item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.item-header {
    margin-bottom: 12px;
}

.item-title {
    font-size: var(--font-size-h3);
    font-weight: 600;
    margin-bottom: 8px;
}

.item-meta {
    color: var(--color-secondary);
    font-size: var(--font-size-small);
    margin-bottom: 12px;
}

.item-description {
    margin-bottom: 16px;
    color: var(--color-primary);
    line-height: 1.8;
}

.item-list {
    list-style: none;
    margin-left: 0;
}

.item-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    color: var(--color-primary);
    line-height: 1.6;
}

.item-list li:before {
    content: "·";
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-weight: bold;
}

/* ============================================
   Job Subsections
   ============================================ */

.job-subsection {
    margin-top: 20px;
    margin-bottom: 20px;
}

.job-subsection h4 {
    font-size: var(--font-size-h4);
    margin-bottom: 12px;
    color: var(--color-accent);
}

/* ============================================
   Areas of Focus / Tech Stack Lists
   ============================================ */

.focus-list {
    list-style: none;
}

.focus-list li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 12px;
    font-size: var(--font-size-body);
}

.focus-list li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--color-accent);
}

/* ============================================
   Skills Grid
   ============================================ */

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-paragraph);
    margin: var(--spacing-paragraph) 0;
}

.skill-category {
    background: var(--color-card-bg);
    padding: var(--spacing-paragraph);
    border-radius: 8px;
    border: 1px solid var(--color-border);
    box-shadow: 0 2px 8px var(--color-shadow);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.skill-category h4 {
    color: var(--color-accent);
    margin-bottom: 12px;
    font-size: var(--font-size-h4);
}

.skill-category p {
    font-size: var(--font-size-small);
    line-height: 1.7;
    margin-bottom: 0;
}

/* ============================================
   Certifications
   ============================================ */

.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: var(--spacing-paragraph) 0;
}

.cert-item {
    background: var(--color-card-bg);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--color-accent);
    box-shadow: 0 2px 8px var(--color-shadow);
    transition: transform 0.2s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.cert-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--color-shadow);
}

.cert-name {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-primary);
}

.cert-issuer {
    color: var(--color-secondary);
    font-size: var(--font-size-small);
}

/* ============================================
   Consulting Box
   ============================================ */

.consulting-box {
    background: var(--color-accent);
    color: var(--color-background);
    padding: var(--spacing-item);
    margin: var(--spacing-section) 0;
    border-radius: 8px;
    box-shadow: 0 4px 15px var(--color-shadow);
}

.consulting-box h3 {
    font-size: var(--font-size-h3);
    margin-bottom: 16px;
    color: var(--color-background);
}

.consulting-box p {
    line-height: 1.7;
    margin-bottom: 12px;
    color: var(--color-background);
}

.consulting-box p:last-child {
    margin-bottom: 0;
}

.consulting-box strong {
    color: var(--color-background);
}

/* ============================================
   Footer
   ============================================ */

footer {
    background-color: var(--color-background);
    padding: var(--spacing-item) 0;
    border-top: 1px solid var(--color-border);
    margin-top: var(--spacing-section);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.footer-content {
    text-align: left;
    color: var(--color-secondary);
    font-size: var(--font-size-small);
}

.footer-content p {
    margin-bottom: 8px;
}

.footer-content a {
    color: var(--color-accent);
}

/* ============================================
   Contact Page Specific
   ============================================ */

.location-map {
    margin-top: var(--spacing-paragraph);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px var(--color-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.location-map:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px var(--color-shadow);
}

.map-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.status-box {
    background-color: var(--color-card-bg);
    border-left: 4px solid var(--color-accent);
    padding: var(--spacing-paragraph);
    margin: var(--spacing-paragraph) 0;
    border-radius: 4px;
    box-shadow: 0 2px 8px var(--color-shadow);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.status-box p {
    margin-bottom: 12px;
}

.status-box p:last-child {
    margin-bottom: 0;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
    :root {
        --font-size-h1: 36px;
        --font-size-h2: 28px;
        --font-size-h3: 22px;
        --font-size-h4: 18px;
        --font-size-body: 17px;
        --font-size-small: 15px;
        --spacing-section: 60px;
        --spacing-item: 36px;
    }
    
    header {
        padding: 16px 0;
        box-shadow: 0 4px 12px var(--color-shadow);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    
    .container {
        padding: 0 var(--spacing-margin-mobile);
    }
    
    .header-content {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: flex-start;
        gap: 16px;
    }
    
    /* On mobile: title section wraps */
    .header-content > div:first-child {
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
        gap: 8px;
    }
    
    /* Show hamburger button on mobile */
    .mobile-menu-toggle {
        display: block;
        position: absolute;
        top: 0;
        right: 0;
    }
    
    /* Adjust book meeting button position on mobile */
    .book-meeting-button {
        width: 100%;
        justify-content: center;
        margin-top: 8px;
        order: 2;
    }
    
    /* Hide nav by default on mobile */
    nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--color-background);
        box-shadow: 0 8px 16px var(--color-shadow);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-in-out, padding 0.3s ease-in-out;
        order: 4;
    }
    
    /* Show nav when menu is open */
    nav.mobile-menu-open {
        max-height: 500px;
        padding: 16px 0;
    }
    
    nav ul {
        flex-direction: column;
        gap: 0;
        padding: 0 var(--spacing-margin-mobile);
    }
    
    nav li {
        border-bottom: 1px solid var(--color-border);
    }
    
    nav li:last-child {
        border-bottom: none;
    }
    
    nav a {
        font-size: 16px;
        padding: 14px 0;
        display: block;
        color: var(--color-text);
    }
    
    nav a.active {
        color: var(--color-accent);
        font-weight: 600;
    }
    
    main {
        padding-top: 24px;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .calendar-embed iframe {
        min-height: 500px;
    }
    
    .cert-grid {
        grid-template-columns: 1fr;
    }
    
    .focus-badges {
        gap: 8px;
    }
    
    .badge {
        font-size: 14px;
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    :root {
        --font-size-h1: 32px;
        --font-size-h2: 24px;
        --font-size-h3: 20px;
        --spacing-margin-mobile: 24px;
    }
    
    .profile-picture,
    .profile-picture-placeholder {
        width: 120px;
        height: 120px;
    }
}

/* ============================================
   Cookie Consent Banner
   ============================================ */

#cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-card-bg);
    border-top: 2px solid var(--color-accent);
    box-shadow: 0 -4px 20px var(--color-shadow);
    z-index: 1000;
    padding: 24px;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-consent-fade-out {
    animation: slideDown 0.3s ease-out forwards;
}

@keyframes slideDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 32px;
    align-items: center;
    flex-wrap: wrap;
}

.cookie-consent-text {
    flex: 1;
    min-width: 300px;
}

.cookie-consent-text p {
    margin-bottom: 8px;
    font-size: var(--font-size-small);
    line-height: 1.6;
}

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

.cookie-consent-text a {
    color: var(--color-accent);
    text-decoration: underline;
}

.cookie-consent-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: var(--font-size-small);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cookie-accept {
    background: var(--color-accent);
    color: var(--color-background);
}

.cookie-accept:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.3);
}

.cookie-decline {
    background: transparent;
    color: var(--color-primary);
    border: 1px solid var(--color-border);
}

.cookie-decline:hover {
    background: var(--color-border);
}

/* Mobile responsive */
@media (max-width: 768px) {
    #cookie-consent-banner {
        padding: 20px;
    }
    
    .cookie-consent-content {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
    }
    
    .cookie-consent-text {
        min-width: auto;
    }
    
    .cookie-consent-buttons {
        justify-content: stretch;
    }
    
    .cookie-btn {
        flex: 1;
        min-width: 120px;
    }
}

/* ============================================
   Utilities
   ============================================ */

.text-secondary {
    color: var(--color-secondary);
}

.text-accent {
    color: var(--color-accent);
}

.mb-0 {
    margin-bottom: 0;
}

.mt-section {
    margin-top: var(--spacing-section);
}
