/* ==========================================================================
   Brutalist Portfolio - Modern Design
   Single-screen, monospace, modern aesthetic
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties
   -------------------------------------------------------------------------- */
:root {
  /* Colors */
  --bg-primary: #c8c8c8;
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-muted: #6a6a6a;
  --hover-bg: rgba(0, 102, 255, 0.15);

  /* Typography */
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  /* Spacing */
  --frame-padding: 2rem;
}

/* --------------------------------------------------------------------------
   Reset & Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font-mono);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-size: 11px;
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

a {
  color: inherit;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   Grid Layout
   -------------------------------------------------------------------------- */
.grid-container {
  height: 100vh;
  width: 100vw;
  padding: var(--frame-padding);
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  grid-template-rows: auto 1fr auto auto;
  gap: 1rem;
}

.cell {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Cell Positions */
.top-left {
  align-items: flex-start;
  justify-content: flex-start;
}

.top-center {
  align-items: center;
  justify-content: flex-start;
}

.top-right {
  align-items: flex-end;
  justify-content: flex-start;
}

.center-main {
  grid-column: 1 / 2;
  grid-row: 2 / 3;
  align-items: flex-start;
  justify-content: center;
}

.center-right {
  grid-column: 2 / 3;
  grid-row: 2 / 3;
  align-items: flex-end;
  justify-content: center;
  gap: 1.5rem;
}

.center-right-bottom {
  grid-column: 3 / 4;
  grid-row: 2 / 4;
  align-items: flex-end;
  justify-content: center;
}

.bottom-left {
  grid-column: 1 / 2;
  grid-row: 3 / 5;
  align-items: flex-start;
  justify-content: flex-end;
}

.bottom-center {
  grid-column: 2 / 3;
  grid-row: 3 / 5;
  align-items: flex-start;
  justify-content: flex-end;
}

.bottom-right {
  grid-column: 3 / 4;
  grid-row: 4 / 5;
  align-items: flex-end;
  justify-content: flex-end;
  text-align: right;
}

/* --------------------------------------------------------------------------
   Components
   -------------------------------------------------------------------------- */

/* Labels */
.label {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  letter-spacing: 0.1em;
}

/* Brand */
.brand {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Status Badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--text-muted);
  font-size: 9px;
  font-weight: 500;
}

.pulse {
  width: 6px;
  height: 6px;
  background: #00cc66;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(0, 204, 102, 0.5);
  }

  50% {
    opacity: 0.7;
    box-shadow: 0 0 0 4px rgba(0, 204, 102, 0);
  }
}

/* Navigation */
.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-link {
  font-size: 10px;
  font-weight: 500;
  padding: 0.3rem 0.6rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-link:hover {
  background-color: var(--hover-bg);
  color: var(--text-primary);
}

/* Main Title */
.title {
  display: flex;
  flex-direction: column;
  font-size: clamp(12rem, 10vw, 8rem);
  font-weight: 700;
  line-height: 0.85;
  letter-spacing: -0.03em;
}

.subtitle {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-weight: 600;
  margin-top: 1rem;
  letter-spacing: 0.1em;
}

.tagline {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-secondary);
  margin-top: 0.35rem;
  letter-spacing: 0.15em;
}

/* Info Blocks */
.info-block {
  text-align: left;
}

.center-right-bottom .info-block {
  text-align: right;
}

.info-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  font-size: 9px;
  font-weight: 500;
  max-width: 200px;
}

.center-right-bottom .info-list {
  justify-content: flex-end;
  max-width: 180px;
}

.info-value {
  font-size: 10px;
  font-weight: 600;
}

.coords {
  font-size: 8px;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* Projects List */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.project-item {
  display: grid;
  grid-template-columns: 1.5rem 1fr auto;
  gap: 0.5rem;
  padding: 0.25rem 0.4rem;
  font-size: 9px;
  font-weight: 500;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.project-item.link:hover {
  background-color: var(--hover-bg);
  color: var(--text-primary);
}

.project-num {
  color: var(--text-muted);
}

.project-year {
  color: var(--text-muted);
}

/* Contact Links */
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-align: right;
}

.contact-link {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.25rem 0.5rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.contact-link:hover {
  background-color: var(--hover-bg);
  color: var(--text-primary);
}

.contact-type {
  font-size: 8px;
  color: var(--text-muted);
}

.contact-value {
  font-size: 9px;
  font-weight: 500;
}

/* Meta Info */
.meta-info {
  margin-bottom: 1rem;
}

.meta-value {
  font-size: 9px;
  color: var(--text-muted);
}

.copyright {
  font-size: 9px;
  color: var(--text-muted);
}

/* Data Overlay */
.data-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

.data-point {
  position: absolute;
  font-size: 9px;
  color: var(--text-muted);
  opacity: 0.5;
}

.top-data {
  top: var(--frame-padding);
  left: 25%;
  transform: translateX(-50%);
}

.bottom-data {
  bottom: var(--frame-padding);
  left: 75%;
  transform: translateX(-50%);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
  .title {
    font-size: clamp(3.5rem, 9vw, 7rem);
  }
}

@media (max-width: 1024px) {
  :root {
    --frame-padding: 1.5rem;
  }

  .grid-container {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto auto auto;
    gap: 1.5rem;
  }

  .center-main {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .center-right {
    grid-column: 1 / 2;
    grid-row: auto;
    flex-direction: column;
    align-items: flex-start;
  }

  .center-right-bottom {
    grid-column: 2 / 3;
    grid-row: auto;
    align-items: flex-start;
  }

  .center-right-bottom .info-block {
    text-align: left;
  }

  .center-right-bottom .info-list {
    justify-content: flex-start;
  }

  .bottom-left {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .bottom-center {
    grid-column: 1 / 2;
    grid-row: auto;
  }

  .bottom-right {
    grid-column: 2 / 3;
    grid-row: auto;
  }

  .info-block {
    text-align: left;
  }

  .title {
    font-size: clamp(3rem, 10vw, 5rem);
  }
}

@media (max-width: 768px) {
  :root {
    --frame-padding: 1.25rem;
  }

  body {
    font-size: 10px;
    overflow-y: auto;
  }

  html,
  body {
    height: auto;
    overflow: auto;
  }

  .grid-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    min-height: 100vh;
    height: auto;
  }

  .cell {
    align-items: flex-start !important;
    justify-content: flex-start !important;
  }

  .top-left {
    order: 1;
  }

  .top-center {
    order: 2;
  }

  .top-right {
    order: 0;
  }

  .center-main {
    order: 3;
  }

  .center-right {
    order: 4;
    flex-direction: column;
    gap: 1.5rem;
  }

  .center-right-bottom {
    order: 5;
  }

  .center-right-bottom .info-block {
    text-align: left;
  }

  .center-right-bottom .info-list {
    justify-content: flex-start;
    max-width: 100%;
  }

  .bottom-left {
    order: 6;
  }

  .bottom-center {
    order: 7;
  }

  .bottom-right {
    order: 8;
    align-items: flex-start;
    text-align: left;
  }

  .nav-links {
    gap: 1rem;
    flex-wrap: wrap;
  }

  .info-block {
    text-align: left;
  }

  .info-list {
    max-width: 100%;
  }

  .title {
    font-size: clamp(2.5rem, 12vw, 4rem);
  }

  .subtitle {
    font-size: 1rem;
  }

  .project-item {
    grid-template-columns: 2rem 1fr auto;
    gap: 0.5rem;
  }

  .contact-links {
    align-items: flex-start;
    text-align: left;
  }

  .top-data,
  .bottom-data {
    display: none;
  }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .pulse {
    animation: none;
  }
}

/* Focus states */
a:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: 2px;
}