/* Window frame styling */
.window {
    position: absolute;
    pointer-events: auto;
    background: rgba(30, 40, 60, 0.75);
    backdrop-filter: blur(12px) saturate(120%) brightness(0.8);
    -webkit-backdrop-filter: blur(12px) saturate(120%) brightness(0.8);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.28),
        inset 0 -1px 0 rgba(255, 255, 255, 0.06);
    min-width: 320px;
    min-height: 220px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    z-index: 100;
    animation: windowOpen 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 2rem;
    overflow: hidden;
}

.window::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.6),
        transparent
    );
    pointer-events: none;
}

.window::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.6),
        transparent,
        rgba(255, 255, 255, 0.2)
    );
    pointer-events: none;
}



@keyframes windowOpen {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.window.minimized {
    display: none;
}

.window-title {
    background: linear-gradient(120deg, rgba(90, 100, 255, 0.25), rgba(30, 30, 40, 0.4));
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.95);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: move;
    user-select: none;
    min-height: 34px;
    gap: 8px;
}

.title-text {
    flex: 1;
    font-weight: 600;
    font-size: 13px;
    padding: 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 8px;
}

.title-text img {
    width: 14px;
    height: 14px;
    object-fit: contain;
}

.window-buttons {
    display: flex;
    gap: 6px;
    order: -1; /* Macintosh style: buttons left */
}

.window-buttons button {
    width: 16px;
    height: 16px;
    padding: 0;
    background: #3a3d49;
    border: 1px solid #00000040;
    color: transparent; /* hide text */
    cursor: pointer;
    display: inline-block;
    transition: all 0.2s;
    flex-shrink: 0;
    border-radius: 50%;
    position: relative;
}
.window-buttons .btn-close { background: #ef4444; border-color: #991b1b; }
.window-buttons .btn-maximize { background: #22c55e; border-color: #14532d; }
.window-buttons .btn-minimize { background: #f59e0b; border-color: #7c2d12; }

.window-buttons button:hover {
    filter: brightness(0.85);
}

.window-buttons button:active {
    filter: brightness(0.7);
}

.window-content {
    flex: 1;
    background: rgba(10, 10, 14, 0.35);
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.window-body {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    overflow-x: hidden;
    color: #e5e7eb;
    scrollbar-gutter: stable;
    display: flex;
    flex-direction: column;
}

.window-body h2 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: #f5f3ff;
}

.window-body h3 {
    font-size: 13px;
    font-weight: 600;
    margin: 12px 0 8px 0;
    color: #4f46e5;
}

.window-body p {
    font-size: 12px;
    line-height: 1.5;
    margin: 0 0 10px 0;
    color: #b0b9c3;
}

.window-body ul {
    font-size: 12px;
    list-style: none;
    margin: 0 0 10px 0;
    padding: 0;
}

.window-body li {
    padding-left: 20px;
    position: relative;
    margin: 0 0 6px 0;
    line-height: 1.4;
    color: #b0b9c3;
}

.window-body li:before {
    content: "•";
    position: absolute;
    left: 8px;
    color: #4f46e5;
    font-weight: bold;
}


/* Task Manager */
.task-list {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.task-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 10px 12px;
}

.task-row .meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: #e5e7eb;
    font-size: 13px;
}

.task-row .meta .name {
    font-weight: 600;
}

.task-row .meta .desc {
    color: #94a3b8;
    font-size: 12px;
}

/* Terminal */
.terminal-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    padding: 12px;
    min-height: 280px;
    font-family: "SF Mono", "Menlo", "Consolas", monospace;
    color: #e5e7eb;
}

.terminal-output {
    flex: 1;
    max-height: 260px;
    overflow-y: auto;
    padding: 6px;
    line-height: 1.5;
    color: #cbd5f5;
}

.terminal-output.hacker-mode {
    background: rgba(0, 35, 0, 0.6);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.35);
    border-radius: 8px;
}

.terminal-line {
    white-space: pre-wrap;
}

.terminal-output.hacker-mode .terminal-line {
    color: #22c55e;
}

.terminal-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 8px;
}

.terminal-prompt {
    color: #7dd3fc;
    font-weight: 600;
}

.terminal-input {
    flex: 1;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    padding: 8px 10px;
    color: #e5e7eb;
    font-family: inherit;
    font-size: 13px;
    outline: none;
}

.terminal-input:focus {
    border-color: #7dd3fc;
    box-shadow: 0 0 0 3px rgba(125,211,252,0.15);
}

/* Resize handle */
.resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 16px;
    height: 16px;
    cursor: se-resize;
    background: linear-gradient(135deg, transparent 50%, #4f46e5 50%);
    pointer-events: all;
}

.window.resizing {
    user-select: none;
}

/* Window focus shadow */
.window.focused {
    z-index: 200;
    box-shadow: 0 25px 50px -12px rgba(79, 70, 229, 0.3);
}

/* Grid layout for content */
.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 12px;
}

.skill-category {
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px;
    background: rgba(15, 23, 42, 0.55);
    border-radius: 10px;
}

.skill-category h3 {
    margin-top: 0;
    border-bottom: 1px solid #4f46e5;
    padding-bottom: 8px;
    color: #4f46e5;
}

.skill-category ul {
    margin: 8px 0 0 0;
}

.skill-category li {
    padding-left: 16px;
    font-size: 11px;
}

/* Form styling */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
    position: relative;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.form-group input,
.form-group textarea {
    width: 100%;
    font-size: 13px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(15, 23, 42, 0.75);
    font-family: inherit;
    color: #fff;
    border-radius: 8px;
    transition: all 0.2s;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #6366f1;
    background: rgba(15, 23, 42, 0.85);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.field-hint {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: -2px;
}

.form-group input:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
}

.form-group input:valid:not(:placeholder-shown) {
    border-color: #22c55e;
}

.hp-field {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.contact-status {
    display: none;
    font-size: 12px;
    padding: 10px 12px;
    border-radius: 6px;
}

.contact-status.success,
.contact-status.error {
    display: block;
}

.contact-status.success {
    background: #064e3b;
    border: 1px solid #10b981;
    color: #d1fae5;
}

.contact-status.error {
    background: #7f1d1d;
    border: 1px solid #f87171;
    color: #fee2e2;
}

.cf-turnstile {
    max-width: 100%;
}

/* Browser toolbar */
.browser-toolbar {
    padding: 8px;
    background: rgba(51, 65, 85, 0.55);
    border-bottom: 1px solid rgba(79, 70, 229, 0.35);
    display: flex;
    gap: 6px;
    align-items: center;
}

.nav-btn {
    width: 32px;
    height: 28px;
    padding: 4px;
    background: rgba(30, 41, 59, 0.55);
    border: 1px solid rgba(79, 70, 229, 0.35);
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s;
    color: #e5e7eb;
    border-radius: 8px;
}

.nav-btn:hover {
    background: #4f46e5;
    color: white;
}

.address-bar {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 11px;
    background: rgba(15, 23, 42, 0.55);
    color: #e5e7eb;
    border-radius: 10px;
    transition: all 0.2s;
}

.address-bar:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Project list */
.projects-intro {
    font-size: 12px;
    line-height: 1.6;
    color: #cbd5e1;
    margin-bottom: 18px;
    padding: 12px;
    background: rgba(99, 102, 241, 0.08);
    border-left: 3px solid #818cf8;
    border-radius: 10px;
}

.project-groups {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.project-group {
    padding: 14px;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
}

.project-group h3 {
    margin: 0 0 6px 0;
    font-size: 14px;
    color: #a5b4fc;
}

.project-group-description {
    font-size: 11px;
    color: #94a3b8;
    margin: 0 0 12px 0;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.project-item {
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px;
    background: rgba(15, 23, 42, 0.65);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.project-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.project-item h4 {
    font-size: 12px;
    font-weight: 700;
    margin: 0;
    color: #e0e7ff;
}

.project-badge {
    font-size: 9px;
    padding: 4px 8px;
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.project-item p {
    font-size: 11px;
    line-height: 1.5;
    color: #cbd5e1;
    margin: 0;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.project-tag {
    background: rgba(79, 70, 229, 0.2);
    color: #c7d2fe;
    padding: 4px 8px;
    font-size: 10px;
    border-radius: 8px;
    font-weight: 600;
}

.project-link {
    font-size: 11px;
    color: #818cf8;
    text-decoration: none;
    font-weight: 600;
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.project-link::after {
    content: '\2197';
    font-size: 10px;
}

/* Links list */
.contact-links {
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px;
    background: rgba(15, 23, 42, 0.55);
    margin-top: 12px;
    border-radius: 12px;
}

.contact-links a {
    color: #6366f1;
    text-decoration: none;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.contact-links a:hover {
    color: #818cf8;
    text-decoration: underline;
}

/* Experience list */
.experience-intro {
    font-size: 12px;
    line-height: 1.6;
    color: #cbd5e1;
    margin-bottom: 20px;
    padding: 12px;
    background: rgba(79, 70, 229, 0.1);
    border-left: 3px solid #4f46e5;
    border-radius: 8px;
}

.company-block {
    margin-bottom: 24px;
    padding: 16px;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
}

.company-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(79, 70, 229, 0.3);
}

.company-header > div:first-child {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.company-header h3 {
    font-size: 14px;
    font-weight: 700;
    color: #818cf8;
    margin: 0;
}

.company-badge {
    font-size: 9px;
    padding: 4px 10px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(234, 88, 12, 0.2));
    color: #fbbf24;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(251, 191, 36, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: fit-content;
}

.company-location {
    font-size: 10px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 4px;
}

.company-location i {
    font-size: 9px;
}

.experience-item,
.education-item {
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px;
    margin-bottom: 12px;
    background: rgba(15, 23, 42, 0.55);
    border-radius: 12px;
}

.company-block .experience-item:last-child {
    margin-bottom: 0;
}

.position-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.position-type {
    font-size: 9px;
    padding: 2px 8px;
    background: rgba(129, 140, 248, 0.15);
    color: #a5b4fc;
    border-radius: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.experience-item h4,
.education-item h4 {
    font-size: 12px;
    font-weight: 600;
    margin: 0;
    color: #e0e7ff;
}

.experience-meta,
.education-meta {
    font-size: 11px;
    color: #b0b9c3;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.experience-meta i,
.education-meta i {
    font-size: 10px;
    opacity: 0.7;
}

.experience-item p,
.education-item p {
    font-size: 11px;
    line-height: 1.5;
    color: #cbd5e1;
    margin: 0;
}

.education-intro {
    font-size: 12px;
    line-height: 1.6;
    color: #cbd5e1;
    margin-bottom: 18px;
    padding: 12px;
    background: rgba(34, 197, 94, 0.08);
    border-left: 3px solid #22c55e;
    border-radius: 10px;
}

.education-highlights {
    margin: 8px 0 0 16px;
    padding: 0;
    color: #cbd5e1;
    font-size: 11px;
    line-height: 1.45;
}

.education-highlights li {
    margin-bottom: 6px;
}

/* Activities Section */
.activities-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}

.activity-item {
    padding: 12px;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 3px solid #10b981;
    border-radius: 12px;
}

.activity-item h4 {
    font-size: 11px;
    font-weight: 600;
    color: #34d399;
    margin: 0 0 6px 0;
}

.activity-organization {
    font-size: 10px;
    color: #94a3b8;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.activity-organization i {
    font-size: 9px;
}

.activity-item p {
    font-size: 10px;
    line-height: 1.4;
    color: #cbd5e1;
    margin: 0;
}

/* Settings */
.settings-group {
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #334155;
}

.settings-group:last-child {
    border-bottom: none;
}

.settings-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 12px;
    color: #e5e7eb;
}

.settings-group input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
}

/* CV Window Styling */
.cv-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    min-height: 400px;
}

.cv-header h2 {
    font-size: 24px;
    margin-bottom: 8px;
    color: #e5e7eb;
}

.cv-header p {
    font-size: 14px;
    color: #94a3b8;
}

.cv-preview {
    margin: 40px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cv-actions {
    margin-top: 20px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .window {
        min-width: 90vw;
        max-width: 95vw;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
}

