@font-face {
    font-family: 'InstrumentSerif';
    src: url('Fonts/InstrumentSerif-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'InstrumentSans-Italic-VariableFont_wdth,wght';
    src: url('Fonts/InstrumentSans-Italic-VariableFont_wdth,wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: italic;
}

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

body {
    font-family: 'InstrumentSerif', serif;
    background: linear-gradient(to bottom, #F0F0F0 0%, #e5e7eb 100%);
    background-attachment: fixed;
    color: #000000;
    line-height: 1.2;
    padding: 100px 100px;
    min-height: 100vh;
    direction: ltr;
}

.container {
    max-width: 1200px;
    margin: 0;
    padding-left: 0;
    box-sizing: border-box;
}

@media (min-width: 769px) {
    .container {
        max-width: 600px;
    }
}

.header {
    margin-bottom: 20px;
    padding-bottom: 20px;
}

.name,
.title,
.section-title,
.nav-link,
.contact-info {
    font-size: 18px;
    font-weight: normal;
    color: #000000;
    letter-spacing: 0.5px;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

.name {
    margin-bottom: 4px;
}

.title {
    text-transform: lowercase;
}

.navigation {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.section-title {
    text-transform: lowercase;
    cursor: pointer;
    user-select: text;
    transition: opacity 0.3s ease;
    position: relative;
}

.section-title .icon-arrow {
    display: inline-block;
    transition: transform 0.3s ease;
    margin-right: 4px;
}

.section-title.active .icon-arrow {
    transform: rotate(45deg);
}

.section-title:hover {
    opacity: 0.7;
}

.section-title.clickable::before {
    content: '';
    display: none;
}


.section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 0;
    padding-left: 20px;
}

.section-content.open {
    max-height: 1000px;
    opacity: 1;
}

.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}


.nav-link {
    transition: opacity 0.3s ease;
    display: inline-block;
    position: relative;
    color: #000000;
}

.nav-link[data-link] {
    text-decoration: none;
    cursor: pointer;
}

.nav-link[data-link]:hover {
    text-decoration: underline;
    opacity: 1;
}

.nav-link:hover {
    opacity: 1;
}

.contact-link {
    text-decoration: underline;
    color: #000000;
    transition: opacity 0.3s ease;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

.contact-link:hover {
    opacity: 1;
}

.contact-info {
    margin-bottom: 4px;
}

.social-link {
    margin-top: 8px;
}

.clients-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Typing animation - smooth and clean, no cursor */
.typing-animation {
    overflow: hidden;
    white-space: nowrap;
}

/* Rotating cursor animation */
.typing-cursor {
    display: inline-block;
    animation: rotateCursor 0.5s linear infinite;
}

@keyframes rotateCursor {
    0% { content: '_'; }
    25% { content: '-'; }
    50% { content: '\\'; }
    75% { content: '/'; }
    100% { content: '_'; }
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 20px 15px;
    }

    .navigation {
        gap: 4px;
    }


    .section-content {
        padding-left: 15px;
    }
}


/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection color - 10% darker than background */
::selection {
    background-color: #d0d2d6;
    color: #000000;
}

::-moz-selection {
    background-color: #d0d2d6;
    color: #000000;
}

/* Split Screen Styles */
.split-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    z-index: 1000;
    background-color: #e5e7eb;
    transform: translateX(0);
    transition: transform 0.4s ease-out;
}

.split-screen.closing {
    transform: translateX(100%);
}

.split-screen.hidden {
    display: none;
}

.split-drag-handle {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    cursor: move;
    z-index: 1002;
    background: transparent;
    transition: background 0.2s ease;
}

.split-drag-handle:hover {
    background: rgba(0, 0, 0, 0.02);
}

.split-left {
    flex: 0 0 50%;
    overflow-y: auto;
    background-color: #e5e7eb;
}

.split-resizer {
    width: 4px;
    background-color: #9ca3af;
    cursor: col-resize;
    transition: background-color 0.2s ease;
    position: relative;
}

.split-resizer:hover {
    background-color: #6b7280;
}

.split-resizer::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 0;
    width: 8px;
    height: 100%;
    cursor: col-resize;
}

.split-right {
    flex: 0 0 50%;
    position: relative;
    background-color: #ffffff;
}

.split-close {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 30px;
    height: 30px;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1001;
    font-size: 20px;
    transition: background-color 0.3s ease;
}

.split-close:hover {
    background-color: rgba(0, 0, 0, 0.2);
}

#contentFrame {
    width: 100%;
    height: 100%;
    border: none;
}

/* Hover Card Styles */
.hover-card {
    position: fixed;
    width: min(600px, 40vw);
    max-width: 90vw;
    min-width: 320px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: none;
    overflow: hidden;
    z-index: 2000;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.95) rotate(0deg);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s 0.3s;
    will-change: transform, left, top;
    display: block !important;
}

.hover-card:not(.hidden) {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transition: opacity 0.3s ease, visibility 0s 0s !important;
    display: block !important;
    /* Transform is controlled by JavaScript for smooth rotation */
}

.hover-card.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.hover-card-image-container {
    width: 100%;
    min-height: 200px;
    max-height: 60vh;
    overflow: hidden;
    background: #f5f5f5;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hover-card-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.hover-card-content {
    padding: 16px;
}

.hover-card-title {
    font-size: 16px;
    font-weight: normal;
    color: #000000;
    margin: 0 0 8px 0;
    font-family: 'InstrumentSans-Italic-VariableFont_wdth,wght', sans-serif;
    line-height: 1.3;
}

.hover-card-description {
    font-size: 14px;
    color: rgba(0, 0, 0, 1);
    margin: 0;
    font-family: 'InstrumentSans-Italic-VariableFont_wdth,wght', sans-serif;
    font-weight: 100;
    line-height: 1.3;
    padding-top: 8px;
}

.hover-card-link {
    display: block;
    color: #000000;
    text-decoration: none;
    font-family: 'InstrumentSerif', serif;
    transition: opacity 0.2s ease;
}

.hover-card-link:hover {
    opacity: 0.7;
}

.hover-card-link .hover-card-title {
    margin: 0;
}

.hover-card-arrow {
    margin-left: 4px;
    opacity: 0.8;
    font-size: 0.9em;
    font-family: inherit;
}

/* Ping Form Styles */
.ping-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.ping-input-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ping-input {
    flex: 1;
    padding: 8px 12px;
    border: none;
    font-family: 'InstrumentSerif', serif;
    font-size: 18px;
    color: #000000;
    background: transparent;
    outline: none;
    box-sizing: border-box;
}

.ping-input::placeholder {
    color: #999999;
}

.ping-emoji-display {
    display: none;
}

.ping-random-btn:hover {
    opacity: 0.6;
}

.ping-submit-btn {
    padding: 0;
    background: transparent;
    color: #000000;
    border: none;
    font-family: 'InstrumentSerif', serif;
    font-size: 18px;
    cursor: pointer;
    text-decoration: underline;
    text-transform: lowercase;
    align-self: flex-start;
    transition: opacity 0.2s ease;
}

.ping-submit-btn:hover {
    opacity: 0.6;
}

.ping-submit-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Dark Mode Toggle Button */
.dark-mode-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background-color: #000000;
    cursor: pointer;
    z-index: 3000;
    padding: 0;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.dark-mode-toggle:hover {
    transform: scale(1.2);
}

/* Pong Game Toggle Button */
.pong-game-toggle {
    position: fixed;
    bottom: 20px;
    right: 40px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid #000000;
    background-color: transparent;
    cursor: pointer;
    z-index: 3000;
    padding: 0;
    transition: all 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.pong-game-toggle::before {
    content: '89';
    font-size: 6px;
    font-family: 'InstrumentSerif', serif;
    color: #000000;
    font-weight: bold;
    line-height: 1;
}

.pong-game-toggle:hover {
    transform: scale(1.2);
    background-color: #000000;
}

.pong-game-toggle:hover::before {
    color: #ffffff;
}

@media (max-width: 768px) {
    .dark-mode-toggle {
        width: 24px;
        height: 24px;
        right: 20px;
    }
    .pong-game-toggle {
        width: 24px;
        height: 24px;
        right: 48px;
    }
    .pong-game-toggle::before {
        font-size: 12px;
    }
    .home-link-circle {
        right: 76px;
    }
}

/* Dark Mode Styles */
body.dark-mode {
    background: linear-gradient(to bottom, #1a1a1a 0%, #0f0f0f 100%);
    color: #ffffff;
}

body.dark-mode .name,
body.dark-mode .title,
body.dark-mode .section-title,
body.dark-mode .nav-link,
body.dark-mode .contact-info {
    color: #ffffff;
}

body.dark-mode .contact-link {
    color: #ffffff;
}

body.dark-mode .hover-card {
    background: #2a2a2a;
}

body.dark-mode .hover-card-title {
    color: #ffffff;
}

body.dark-mode .hover-card-description {
    color: rgba(255, 255, 255, 0.8);
}

body.dark-mode .hover-card-link {
    color: #ffffff;
}

body.dark-mode .hover-card-image-container {
    background: #1a1a1a;
}

body.dark-mode .ping-input {
    color: #ffffff;
}

body.dark-mode .ping-input::placeholder {
    color: #666666;
}

body.dark-mode .ping-submit-btn {
    color: #ffffff;
}

body.dark-mode .dark-mode-toggle {
    background-color: #ffffff;
}

body.dark-mode .pong-game-toggle {
    border-color: #ffffff;
}

body.dark-mode .pong-game-toggle::before {
    color: #ffffff;
}

body.dark-mode .pong-game-toggle:hover {
    background-color: #ffffff;
}

body.dark-mode .pong-game-toggle:hover::before {
    color: #000000;
}

/* Selection color for dark mode */
body.dark-mode ::selection {
    background-color: #404040;
    color: #ffffff;
}

body.dark-mode ::-moz-selection {
    background-color: #404040;
    color: #ffffff;
}