/* === VARIABLES === */
:root {
  --primary-color: #333;
  --background-color: #f4f4f4;
  --hover-color: #555;
  --shadow: 0 2px 6px rgba(0,0,0,0.1);
  --transition-default: 0.3s ease;
}

/* === RESET & BASE STYLES === */
body {
  margin: 0;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--background-color);
  font-family: Arial, sans-serif;
  color: var(--primary-color);
}

/* — Three.js Car Container — */
#car-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 80px;
  z-index: 1000;
  pointer-events: none;
  transition: all 0.1s ease-out;
}

#car-container canvas {
  width: 100% !important;
  height: 100% !important;
  cursor: grab;
  pointer-events: all;
}

#car-container canvas:active {
  cursor: grabbing;
}

/* — Base & Layout — */
.container { text-align: center; }
h1 { font-size: 4rem; margin: 0; }
p { font-size: 1.2rem; margin-top: 0.5rem; }

/* — Title + Logo — */
.title-row {
  display: flex;
  flex-wrap: wrap;          /* ← add this */
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  position: relative;       /* for the spinner */
}
.title-row h1 {
  font-size: clamp(1.5rem, 6vw, 4rem);   /* scales between 1.5rem and 4rem */
  margin: 0;
  overflow-wrap: break-word;             /* allow breaks at underscores/anywhere */
}


.logo {
  width: 50px;
  cursor: pointer;
  transition: transform 0.3s ease;
}
.logo:hover { transform: scale(1.1); }

/* — Graphic Section — */
.graphic {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  transition: gap 0.5s ease;
}
/* — Graphic Section — */
.graphic img {
  width: clamp(80px, 20vw, 200px);
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.curly-img {
  cursor: pointer;
  transition: transform 0.5s ease;
}

/* — Middle Text & Button — */
.middle-text {
  max-width: 220px;
  opacity: 1;
  overflow: hidden;
  transition: opacity 0.5s ease, max-width 0.5s ease;
}
.middle-text p { margin: 0 0 0.75rem; }
.middle-text button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  background: #333;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease;
}
.middle-text button:hover { background: #555; }

/* — COLLAPSED STATE — */
.graphic.collapsed {
  gap: 0;
}
.graphic.collapsed .middle-text {
  opacity: 0;
}

/* — Compile Spinner — */
.compile-spinner {
  position: absolute;
  top: 0;                   /* move it to the top of the title-row */
  left: 50%;
  transform: translate(-50%, -100%);  /* shift it upward by 100% of its own height */
  pointer-events: none;
}
.compile-spinner span {
  display: inline-block;
  font-size: 1.5rem;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* — Construction Animation — */
.construction-animation {
    position: relative;
    margin: 2rem 0;
}

.construction-line {
    width: 0;
    height: 4px;
    background: #ffd700;
    animation: progress 2s ease-in-out infinite;
}

@keyframes progress {
    0% { width: 0; }
    50% { width: 100%; }
    100% { width: 0; }
}

.construction-icon {
    font-size: 2rem;
    animation: bounce 1s infinite;
}

.status-updates {
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.feature-list {
    list-style: none;
    padding: 0;
    text-align: left;
    display: inline-block;
}

.feature-list li {
    margin: 0.5rem 0;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.feature-list li:hover {
    opacity: 1;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* — Project Grid Skeleton — */
.projects-section {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
    padding: 0 1rem;
    flex-wrap: wrap;
}

.project-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 0.75rem;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    border: 2px solid transparent;
    overflow: hidden;
    width: 180px;
    height: 120px;
    flex-shrink: 0;
}

.project-card.skeleton {
    background: #e0e0e0;
    opacity: 0.5;
}

.project-card:hover,
.project-card.active {
    opacity: 1;
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: var(--primary-color);
}

.project-thumbnail {
    width: 100%;
    height: 60px;
    background: #d0d0d0;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    position: relative;
    overflow: hidden;
}

.project-card.skeleton .project-thumbnail {
    background: linear-gradient(90deg, #d0d0d0 25%, #e0e0e0 50%, #d0d0d0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.project-title-skeleton {
    width: 70%;
    height: 12px;
    background: #c0c0c0;
    border-radius: 3px;
    margin-bottom: 0.3rem;
}

.project-description-skeleton {
    width: 100%;
    height: 8px;
    background: #c0c0c0;
    border-radius: 3px;
    margin-bottom: 0.3rem;
}

.project-description-skeleton:last-child {
    width: 60%;
}

/* Services text styling */
.services-text {
    color: #00ff88 !important;
    font-weight: bold;
}


.project-card:hover .project-thumbnail::after {
    display: block;
    text-align: left;
    font-weight: 700;
    content: "Offering Web & mobile app development";
    position: absolute;
    top: 0;
    bottom: 0;
    padding: 10px 10px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #000000;
    letter-spacing: 0.01rem;
    background: transparent;
    width: calc(100% + 20px);
    box-sizing: border-box;
    display: flex;
    align-items: center;
}

.project-card:hover {
    background: #949494; /* Whole skeleton card background grey */
}

.project-card:hover .project-title-skeleton,
.project-card:hover .project-description-skeleton {
    background: transparent; /* Remove box behind services soon */
    display: flex;
    align-items: center;
    justify-content: flex-start;
    color: #00ff88 ;
    font-weight: bold;
    text-align: left;
    padding-left: 10px;
    font-size: 1rem;
}

.project-card:hover .project-title-skeleton::after {
    content: "Services soon";
    display: block;
    position: relative;
    z-index: 1;
    text-align: left;
    width: 100%;
}

/* Keep the description skeleton bars visible on hover */
.project-card:hover .project-description-skeleton {
    display: block;
}

/* Mini Terminal */
.mini-terminal {
    background: #1e1e1e;
    border-radius: 8px;
    width: 200px;
    height: 145px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    overflow: hidden;
}

.terminal-header {
    background: #2d2d2d;
    padding: 0.5rem;
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27ca3f; }

.terminal-body {
    padding: 0.75rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #00ff88;
    background: #1e1e1e;
    height: calc(100% - 50px);
    text-align: left;
}

.terminal-prompt {
    color: #ffffff;
    margin-right: 0.25rem;
}

.terminal-cursor {
    color: #00ff88;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}


