@layer base {
  :root {
    --background: #f5f5f5;
    --foreground: #1c1c1c;
    --divider: #c8c8c8;
    --button: #ff5216;
    --button-text: #ffffff;
    --link: #1C6EE3;
    /* ... other light theme variables ... */
  }

  /* Dark theme only applied when data-theme="dark" is set */
  [data-theme="dark"] {
    --background: #1c1c1c;
    --foreground: #ffffff;
    --divider: #c8c8c8;
    --button: #ff5216;
    --button-text: #ffffff;
    --link: #1C6EE3;
    /* ... other dark theme variables ... */
  }
}

/* Base styles */
body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: "Sohne Mono", Courier New, monospace;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: 0.02em;
  margin: 0;
  padding: 0;
}

.container {
  max-width: 1120px;
  margin: 0 0 0 2rem;
  padding: 0 2rem;
}

.container-narrow {
  max-width: 720px;
  margin: 0 0 0 2rem;
  padding: 0 2rem;
}

/* For nested usage */
.container .container-narrow {
  margin: 0;
  padding: 0;
}

/* Typography */
h1 {
  font-size: 3rem;
  font-weight: 500;  /* Using kraftig weight */
  margin-bottom: 1rem;
}

h2, h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.5rem;
  font-weight: normal;  /* Using buch weight (400) */
}

h3 {
  font-size: 1.25rem;
  font-weight: normal;
}

/* Layout */
section {
  padding: 4rem 0;
  border-top: 1px solid var(--divider);
}

section:first-child {
  border-top: none;
}

/* Navigation */
.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: 'Geograph', sans-serif;
    font-weight: 500;
    font-size: 1.5rem;
    letter-spacing: -0.04em;
    text-decoration: none;
    color: var(--foreground) !important;
}

.nav-logo:hover {
    text-decoration: none !important;
}

.nav-logo .dot {
    color: var(--button);
}

.nav-links {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 300;
}

/* Ghost generates a ul for navigation */
.nav-links ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1.5rem;
}

/* Add separators between items */
.nav-links ul li:not(:last-child):after {
    content: '/';
    margin-left: 1.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--foreground);
}

.nav-links a:hover {
    text-decoration: underline;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    z-index: 100;
    width: 32px;
    height: 32px;
    position: relative;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 1px;
    background-color: var(--foreground);
    position: absolute;
    left: 4px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle span:nth-child(1) {
    top: 8px;
}

.mobile-menu-toggle span:nth-child(2) {
    top: 16px;
}

.mobile-menu-toggle span:nth-child(3) {
    top: 24px;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: 50vw;
        height: 100vh;
        background: var(--background);
        padding: 5rem 1rem 2rem 1rem;
        transition: transform 0.3s ease;
        transform: translateX(100%);
        display: block;
        overflow-y: auto;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-links ul {
        flex-direction: column;
        gap: 2rem;
        width: 100%;
    }

    .nav-links ul li {
        width: 100%;
    }

    .nav-links ul li:not(:last-child):after {
        display: none;
    }

    /* Hamburger Animation */
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg);
        top: 16px;
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg);
        top: 16px;
    }
}

/* Add more padding to the nav */
header {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

/* Buttons */
.button,
.kg-button-card .kg-btn,
.kg-button-card .kg-btn-accent {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 1px solid var(--button);
  text-decoration: none;
  color: var(--button-text);
  background: var(--button);
  font-weight: 400;
  font-family: "Sohne Mono", monospace;
}

.button:hover,
.kg-button-card .kg-btn:hover,
.kg-button-card .kg-btn-accent:hover {
  opacity: 0.9;
}

/* Case Study Listing Buttons */
.case-study .button,
.case-studies-grid .button {
  background: var(--divider);
  color: var(--foreground) !important;
  border: none;
  font-weight: 400;
}

.case-study .button:hover,
.case-studies-grid .button:hover {
  opacity: 0.9;
}

/* Grid */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.team-member {
  border: 1px solid var(--divider);
  padding: 1.5rem;
}

@media (max-width: 768px) {
  .team-grid {
    grid-template-columns: 1fr;
  }
}

/* Font faces */
@font-face {
  font-family: 'Sohne Mono';
  src: url('../fonts/soehne-mono-leicht.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
}

@font-face {
  font-family: 'Sohne Mono';
  src: url('../fonts/soehne-mono-buch.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Sohne Mono';
  src: url('../fonts/soehne-mono-kraftig.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: 'Geograph';
  src: url('../fonts/geograph-bold.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
}

/* Add other font weights as needed */

p {
  line-height: 1.5;
}

.nav-links {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 300;
}

/* Ghost generates a ul for navigation */
.nav-links ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1.5rem;
}

/* Add separators between items */
.nav-links ul li:not(:last-child):after {
    content: '/';
    margin-left: 1.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--foreground);
}

.nav-links a:hover {
    text-decoration: underline;
}

.nav-links span {
    color: var(--foreground);
}

nav .container {
    padding: 0 2rem;
}

.company-title {
  font-family: 'Geograph', sans-serif;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.company-title .dot {
  color: var(--button);
}

/* Footer */
footer {
    padding: 4rem 0 0; /* Increased top padding for more space above footer */
    border-top: none; /* Remove border top */
}

footer .container {
    max-width: 1120px;
    margin: 0 0 0 2rem;
    padding: 0 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;  /* Add padding top and bottom */
}

footer p {
    margin: 0;  /* Remove any margin from the paragraph */
}

.social-links {
    display: flex;
    align-items: center;
}

.social-links a {
    color: var(--foreground);
    text-decoration: none;
}

.social-links svg {
    width: 20px;
    height: 20px;
    filter: grayscale(100%);
    transition: filter 0.2s;
}

.social-links a:hover svg {
    filter: grayscale(0%);
}

/* Case Studies */
.case-studies-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);  /* 3 columns */
    gap: 2rem;
    padding: 2rem 0;
}

.case-study {
    border-top: 1px solid var(--divider);
    padding-top: 2rem;
    display: flex;
    flex-direction: column;
}

.case-study img {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
    margin-bottom: 1.5rem;
}

.case-study-content {
    max-width: 100%;  /* Allow content to fill tile */
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .case-studies-grid {
        grid-template-columns: repeat(2, 1fr);  /* 2 columns on tablet */
    }
}

@media (max-width: 640px) {
    .case-studies-grid {
        grid-template-columns: 1fr;  /* 1 column on mobile */
    }
}

.category {
    font-size: 0.7rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.case-study h2 {
    font-family: "Sohne Mono", monospace;
    font-weight: normal;
    margin-bottom: 1rem;
}

.case-study .button {
    margin-top: 1.5rem;
    display: inline-block;
}

/* Single Post/Case Study */
.feature-image {
    width: 100%;
    height: auto;
    margin: 2rem 0;
}

.post-content {
    max-width: 720px;
    position: relative;
    overflow: visible;
}

.post-content img {
    max-width: 100%;
    height: auto;
}

.post-title {
    font-size: 3rem;
    font-weight: 500;
    margin: 0.5rem 0 1rem;  /* Reduced top margin */
}

.post-category {
    margin-bottom: 0.5rem;  /* Consistent with other category spacing */
}

/* Company Info Card */
.company-info-card {
    float: right;
    width: 300px;
    margin: 0 -400px 2rem 2rem;
    padding: 2rem;
    font-family: "Sohne Mono", monospace;
    font-weight: 300;
    position: relative;
}

.company-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
}

.company-logo {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.company-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.company-info {
    padding-top: 0.25rem;
}

.company-info-card h3 {
    font-family: "Sohne Mono", monospace;
    font-weight: normal;
    font-size: 1rem;
    margin: 0 0 0.25rem 0;
}

.company-info-card a {
    font-family: "Sohne Mono", monospace;
    font-weight: 300;
    color: inherit;
    text-decoration: none;
    font-size: 0.875rem;
    display: block;
}

.company-info-card p {
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 2rem;
}

.company-info-card dl {
    border-top: 1px solid currentColor;
    padding-top: 1.5rem;
    margin: 1.5rem 0 0;
}

.company-info-card dt {
    font-family: "Sohne Mono", monospace;
    font-weight: 300;
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
    color: var(--foreground);
}

.company-info-card dd {
    font-family: "Sohne Mono", monospace;
    font-size: 0.875rem;
    margin: 0 0 1.5rem;
}

.company-info-card dd:last-child {
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 1200px) {
    .company-info-card {
        margin-right: -200px;
    }
}

@media (max-width: 1024px) {
    .company-info-card {
        float: none;
        width: auto;
        margin: 2rem 0;
        padding: 0;
    }

    .company-info-card dl {
        margin-top: 2rem;
    }
}

/* Typography Additions */
blockquote {
    border-left: 2px solid var(--foreground);
    margin: 2rem 0;
    padding-left: 2rem;
    font-size: 1.25rem;
    font-weight: normal;
}

figcaption {
    font-size: 0.875rem;
    color: var(--foreground);
    margin-top: 0.5rem;
}

/* Case Studies Custom Styles */
.case-study h2 {
    margin-top: 0;
}

/* Custom Button Spacing */
.hero-button {
    margin-top: 2rem;
}

/* Dark Mode */
[data-theme="dark"] .button,
[data-theme="dark"] .kg-button-card .kg-btn,
[data-theme="dark"] .kg-button-card .kg-btn-accent {
    border-color: var(--button);
    color: var(--button-text);
}

[data-theme="dark"] .button:hover,
[data-theme="dark"] .kg-button-card .kg-btn:hover,
[data-theme="dark"] .kg-button-card .kg-btn-accent:hover {
    background: var(--button);
    color: var(--button-text);
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    margin-right: 1rem;
    color: var(--foreground);
}

.theme-toggle:hover {
    color: var(--button);
}

/* When dark mode is manually enabled */
[data-theme="dark"] .theme-toggle-fill {
    transform: rotate(180deg);
    transform-origin: center;
}

.team-member h3 {
    margin-top: 0;
}

.theme-toggle svg {
    width: 16px;  /* Reduced from 20px */
    height: 16px;
}

/* Lab Projects - 2 column layout */
.lab-projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);  /* 2 columns */
    gap: 2rem;
    padding: 2rem 0;
}

/* Responsive adjustment */
@media (max-width: 640px) {
    .lab-projects-grid {
        grid-template-columns: 1fr;  /* 1 column on mobile */
    }
}

/* Footer */
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-logo {
    font-family: 'Geograph', sans-serif;
    font-weight: 500;
    letter-spacing: -0.04em;
    font-size: 1.25rem;
}

.footer-logo .dot {
    color: var(--button);
}

.footer-left .text-sm {
    font-size: 0.75rem;
    color: var(--foreground);
}

.post-date {
    font-family: "Sohne Mono", monospace;
    font-size: 0.875rem;
    color: var(--foreground);
    margin: 0.5rem 0 1rem;
}

/* Logo Wall */
.logo-wall {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 4rem;
    align-items: center;
    padding: 2rem 0;
    border-top: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
}

.logo-wall img {
    width: 100%;
    height: auto;
    filter: grayscale(100%) contrast(0.8);
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.logo-wall img:hover {
    opacity: 1;
}

@media (max-width: 768px) {
    .logo-wall {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

/* Two Column Content */
.two-column-content {
    column-count: 2;
    column-gap: 4rem;
}

.two-column-content p {
    margin-bottom: 1.5rem;
}

/* Prevent headings from breaking across columns */
.two-column-content h2,
.two-column-content h3 {
    break-inside: avoid;
}

@media (max-width: 768px) {
    .two-column-content {
        column-count: 1;
    }
}

/* Ghost Button Card */
.kg-button-card {
    margin: 2rem 0;
}

/* Override Ghost's default styles with more specific selectors */
.post-content .kg-button-card .kg-btn,
.post-content .kg-button-card .kg-btn-accent {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid currentColor;
    text-decoration: none;
    color: inherit;
    font-family: "Sohne Mono", monospace;
    font-weight: 300;
    font-size: 0.875rem;
    background: transparent;
    border-radius: 0;
}

.post-content .kg-button-card .kg-btn:hover,
.post-content .kg-button-card .kg-btn-accent:hover {
    background: var(--foreground);
    color: var(--background);
}

[data-theme="dark"] .post-content .kg-button-card .kg-btn:hover,
[data-theme="dark"] .post-content .kg-button-card .kg-btn-accent:hover {
    background: var(--foreground);
    color: var(--background);
}

/* Lists */
.post-content ul {
    margin: 1.5rem 0;
    list-style: none;  /* Remove default bullets */
    padding-left: 0;   /* Remove default padding */
}

.post-content ul li {
    margin-bottom: 0.75rem;
    padding-left: 1rem;
    position: relative;
}

.post-content ul li:before {
    content: ">";
    position: absolute;
    left: 0;
    font-weight: 500;
}

.post-content ul li:last-child {
    margin-bottom: 0;
}

/* Contact Form */
.contact-form {
    margin: 3rem 0;
    font-family: "Sohne Mono", monospace;
}

.contact-form label {
    display: block;
    margin-bottom: 2rem;
    font-size: 0.875rem;
    font-weight: 300;
}

.contact-form input[type="email"],
.contact-form textarea {
    display: block;
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.75rem;
    border: 1px solid currentColor;
    background: transparent;
    font-family: "Sohne Mono", monospace;
    font-size: 1rem;
    font-weight: 300;
    color: inherit;
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-form button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: 1px solid currentColor;
    background: transparent;
    color: inherit;
    font-family: "Sohne Mono", monospace;
    font-size: 0.875rem;
    font-weight: 300;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.contact-form button:hover {
    background: var(--foreground);
    color: var(--background);
}

[data-theme="dark"] .contact-form button:hover {
    background: var(--foreground);
    color: var(--background);
}

/* Focus states */
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--button);
}

/* Typography */
strong,
b {
    font-weight: 500;  /* Instead of bold/700 */
}

/* Update the Sohne Mono "bold" font face */
@font-face {
    font-family: 'Sohne Mono';
    src: url('../fonts/test-soehne-mono-kraftig.woff2') format('woff2');
    font-weight: 500;  /* Instead of bold */
    font-style: normal;
}

/* Horizontal Rule */
.post-content hr {
    margin: 3rem 0;
    border: none;
    height: 1px;
    background: currentColor;
}

/* Toggle Heading */
.h4-toggle-heading {
    font-weight: 500;
    font-size: 1rem;
    margin: 1.5rem 0 1rem;
}

/* Feature List */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.feature-list li {
    margin-bottom: 1rem;
}

.feature-list strong {
    display: block;
    margin-bottom: 0.25rem;
}

/* Link styling */
a:not(.button):not(.nav-links a) {
  color: var(--link);
  text-decoration: none;
}

a:not(.button):not(.nav-links a):hover {
  text-decoration: underline;
}

/* Post content links */
.post-content a {
  color: var(--link);
  text-decoration: none;
}

.post-content a:hover {
  text-decoration: underline;
}

/* Dark mode */
[data-theme="dark"] .post-content a {
  color: var(--link);  /* Keep same color in dark mode */
}

/* Adjust container margins and padding for mobile */
@media (max-width: 768px) {
    .container {
        margin: 0;
        padding: 0 1rem;  /* Reduced padding on mobile */
    }

    .container-narrow {
        margin: 0;
        padding: 0 1rem;  /* Match container padding */
    }
}

@media (max-width: 768px) {
    footer .container {
        margin: 0;
        padding: 0 1rem;  /* Match site padding */
    }
}

/* Update border colors */
.border-black {
  border-color: var(--divider);
}

/* Tag page */
.text-gray-600 {
  color: var(--foreground);
  opacity: 0.6;
}

/* Labs Grid */
.labs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);  /* 3 columns */
    gap: 2rem;
    padding: 2rem 0;
}

.lab-project {
    border-top: 1px solid var(--divider);
    padding-top: 2rem;
    display: flex;
    flex-direction: column;
}

.lab-project img {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
    margin-bottom: 1.5rem;
}

.lab-project-content {
    max-width: 100%;  /* Allow content to fill tile */
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .labs-grid {
        grid-template-columns: repeat(2, 1fr);  /* 2 columns on tablet */
    }
}

@media (max-width: 640px) {
    .labs-grid {
        grid-template-columns: 1fr;  /* 1 column on mobile */
    }
}

.lab-project h2 {
    font-family: "Sohne Mono", monospace;
    font-weight: normal;
    margin-bottom: 1rem;
}

.lab-project .button {
    margin-top: 1.5rem;
    display: inline-block;
}

/* Hero Container */
.hero-container {
    max-width: 900px !important; /* Override container-narrow for hero only */
}

/* Hero Title */
.hero-title {
    font-size: 4rem;
    font-weight: 500;
    font-family: "Sohne Mono", monospace;
    margin-bottom: 2rem;
    line-height: 1.2;
}

#typer {
    display: inline-block;
    min-width: 300px; /* Increased to accommodate longer words */
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    #typer {
        min-width: 200px;
        display: block; /* Force new line on mobile */
        margin-top: 0.5rem;
    }
    
    .hero-container {
        max-width: 100% !important;
    }
}

/* Sticky Navigation */
.sticky-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--background);
}

.nav-logo {
    display: flex;
    align-items: center;
    height: 32px;
    padding-left: 0;
}

.nav-logo-img {
    height: 32px;
    width: 32px;
    display: none;
    transition: opacity 0.2s;
}

.sticky-nav.scrolled .nav-logo-text {
    display: none;
}
.sticky-nav.scrolled .nav-logo-img {
    display: block;
}

.nav-logo-text {
    display: flex;
    align-items: center;
    font-family: 'Geograph', sans-serif;
    font-weight: 500;
    font-size: 1.5rem;
    letter-spacing: -0.04em;
    color: var(--foreground) !important;
    text-decoration: none !important;
    transition: opacity 0.2s;
}

.nav-logo-text .dot {
    color: var(--button);
}

.container {
    max-width: 1120px;
    margin: 0 0 0 2rem;
    padding: 0 2rem;
}

@media (max-width: 768px) {
    .container {
        margin: 0;
        padding: 0 1rem;
    }
    .nav-logo {
        padding-left: 0;
    }
}

/* Mobile Nav Fixes */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: 50vw;
        height: 100vh;
        background: var(--background);
        padding: 5rem 1rem 2rem 1rem;
        transition: transform 0.3s ease;
        transform: translateX(100%);
        display: block;
        overflow-y: auto;
    }
    .nav-links.active {
        transform: translateX(0);
    }
    .nav-links ul {
        flex-direction: column;
        gap: 2rem;
        width: 100%;
    }
    .nav-links ul li {
        width: 100%;
    }
    .nav-links ul li:not(:last-child):after {
        display: none;
    }
} 