/* =============================================
   PORTFOLIO — style.css
   Two-color retro desktop OS aesthetic
   --blue (#1a1aff) + --paper (#eeecea)
   Fonts: IM Fell English + Space Mono
   ============================================= */

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

:root {
  --blue:  #1a1aff;
  --paper: #eeecea;
  --font-display: 'Instrument Serif', serif;
  --font-ui:      'Space Mono', monospace;
  --border:       2px solid var(--blue);
  --bar-h:        28px;
}

html, body {
  width: 100%; height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--paper);
  color: var(--blue);
  font-family: var(--font-ui);
  cursor: default;
  user-select: none;
}

/* ── GRID ── */
.grid-bg {
  position: absolute; inset: 0;
  min-height: 200vh;
  background-image:
    linear-gradient(var(--blue) 1px, transparent 1px),
    linear-gradient(90deg, var(--blue) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.09;
  pointer-events: none;
  z-index: 0;
}

/* ── DESKTOP ── */
.desktop {
  position: absolute;
  top: 32px;
  left: 0; right: 0;
  height: 200vh;
  overflow: visible;
}

/* ── WINDOW BASE ── */
.window {
  position: absolute;
  border: var(--border);
  background: var(--paper);
  box-shadow: 3px 3px 0 var(--blue);
  cursor: grab;
  z-index: 10;
  min-width: 120px;
}
.window:active  { cursor: grabbing; }
.window.dragging { box-shadow: 6px 6px 0 var(--blue); z-index: 999 !important; }

/* ── TITLEBAR ── */
.window-bar {
  height: var(--bar-h);
  background: var(--blue);
  color: var(--paper);
  display: flex;
  align-items: center;
  padding: 0 8px;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.win-close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px;
  border: 1.5px solid var(--paper);
  font-size: 12px; line-height: 1;
  cursor: pointer; flex-shrink: 0;
  transition: background .1s, color .1s;
}
.win-close:hover { background: var(--paper); color: var(--blue); }
.win-title { font-size: 10px; letter-spacing: .1em; opacity: .75; }

/* ── WINDOW BODY ── */
.window-body { padding: 16px; }

/* ── HELLO ── */
.hello-body {
  padding: 28px 36px 24px;
  position: relative;
}
/* bounding-box handle dots */
#win-hello .window-body::before {
  content: '';
  position: absolute; inset: 10px;
  pointer-events: none;
  background:
    radial-gradient(circle, var(--blue) 3px, transparent 3px) 0    0    / 6px 6px no-repeat,
    radial-gradient(circle, var(--blue) 3px, transparent 3px) 50%  0    / 6px 6px no-repeat,
    radial-gradient(circle, var(--blue) 3px, transparent 3px) 100% 0    / 6px 6px no-repeat,
    radial-gradient(circle, var(--blue) 3px, transparent 3px) 0    50%  / 6px 6px no-repeat,
    radial-gradient(circle, var(--blue) 3px, transparent 3px) 100% 50%  / 6px 6px no-repeat,
    radial-gradient(circle, var(--blue) 3px, transparent 3px) 0    100% / 6px 6px no-repeat,
    radial-gradient(circle, var(--blue) 3px, transparent 3px) 50%  100% / 6px 6px no-repeat,
    radial-gradient(circle, var(--blue) 3px, transparent 3px) 100% 100% / 6px 6px no-repeat;
}
.hello-text {
  font-family: var(--font-display);
  font-size: clamp(64px, 9vw, 120px);
  font-weight: 400; font-style: italic;
  color: var(--blue);
  letter-spacing: -.02em; line-height: 1;
  white-space: nowrap;
}
.cursor {
  display: inline-block; width: 3px;
  background: var(--blue); margin-left: 4px;
  vertical-align: baseline;
  animation: blink 1s step-end infinite;
  font-style: normal; font-size: .85em;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* ── ABOUT ── */
.about-body {
  width: 240px;
  display: flex; flex-direction: column; gap: 10px;
  font-size: 12px; line-height: 1.6;
}
.about-body strong { font-weight: 700; }

/* ── CONTACT WINDOW ── */
.contact-body {
  width: 240px;
  display: flex; flex-direction: column; gap: 4px;
  font-size: 12px;
}
.contact-label {
  font-size: 9px; letter-spacing: .12em;
  opacity: .5; margin-top: 10px;
}
.contact-label:first-child { margin-top: 0; }
.contact-value {
  color: var(--blue);
  text-decoration: none;
  font-size: 12px;
  border-bottom: 1px solid transparent;
  transition: border-color .1s;
  cursor: pointer;
}
.contact-value:hover { border-bottom-color: var(--blue); }

/* ── SHARED BUTTON ── */
.link-btn {
  display: inline-block;
  margin-top: 4px; padding: 6px 12px;
  border: var(--border);
  font-family: var(--font-ui); font-size: 11px;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--blue); text-decoration: none;
  background: transparent;
  transition: background .1s, color .1s;
  cursor: pointer; align-self: flex-start;
}
.link-btn:hover { background: var(--blue); color: var(--paper); }

/* ── PROJECTS ── */
.project-window { width: 250px; }
.project-body   { padding: 0; position: relative; }

.project-link {
  display: block;
  text-decoration: none;
  cursor: pointer;
  position: relative;
}
/* Overlay arrow on hover */
.project-link::after {
  content: '↗';
  position: absolute; top: 10px; right: 10px;
  background: var(--blue); color: var(--paper);
  font-family: var(--font-ui); font-size: 14px;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity .2s;
}
.project-window:hover .project-link::after { opacity: 1; }

.project-img-wrap {
  width: 100%; aspect-ratio: 4/3; overflow: hidden; display: block;
}
.project-img-wrap img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: grayscale(20%);
  transition: filter .3s ease;
}
.project-window:hover .project-img-wrap img { filter: grayscale(0%); }

.project-tag {
  position: absolute; bottom: 12px; left: 12px;
  background: var(--blue); color: var(--paper);
  font-family: var(--font-ui); font-size: 11px; letter-spacing: .06em;
  padding: 4px 10px; border-radius: 999px;
  pointer-events: none;
}

/* ── MARQUEE / SKILLS TICKER ── */
.marquee-window { width: 300px; cursor: pointer; }
.marquee-window:hover .window-bar { opacity: .85; }
.marquee-body   { padding: 6px 0 2px; overflow: hidden; }
.marquee-track  {
  display: flex; white-space: nowrap;
  animation: marquee 14s linear infinite;
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
}
@keyframes marquee { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }
.marquee-hint {
  font-size: 9px; letter-spacing: .12em; text-align: center;
  opacity: .45; padding: 3px 0 2px;
  text-transform: uppercase;
}

/* ── SKILLS LIST WINDOW ── */
.skills-body { width: 200px; padding: 14px 16px; }
.skills-list {
  list-style: none;
  display: flex; flex-direction: column; gap: 0;
}
.skills-list li {
  font-size: 12px; line-height: 1;
  padding: 8px 0;
  border-bottom: 1px solid var(--blue);
  letter-spacing: .04em;
}
.skills-list li:last-child { border-bottom: none; }
.skills-list li::before {
  content: '→ ';
  opacity: .45;
}

/* ── DESKTOP ICONS ── */
.desktop-icon {
  position: absolute;
  display: flex; flex-direction: column;
  align-items: center; gap: 8px;
  cursor: pointer; width: 72px;
  z-index: 10;
}
.desktop-icon:hover .icon-graphic { background: var(--blue); color: var(--paper); }

.icon-graphic {
  width: 64px; height: 52px;
  border: var(--border); color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  padding: 6px;
  transition: background .15s, color .15s;
}
.icon-graphic svg { width: 100%; height: 100%; }
.icon-label {
  font-family: var(--font-ui); font-size: 9px;
  letter-spacing: .12em; text-transform: uppercase;
  text-align: center; color: var(--blue);
}

/* ── NAME BARS (top + bottom) ── */
.namebar {
  position: fixed;
  left: 0; right: 0;
  height: 32px;
  background: var(--blue);
  color: var(--paper);
  overflow: hidden;
  display: flex;
  align-items: center;
  z-index: 1000;
}
.namebar-top    { top: 0; }
.namebar-bottom { bottom: 0; }

.namebar-track {
  display: flex;
  white-space: nowrap;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: lowercase;
  animation: namebar-scroll 40s linear infinite;
  will-change: transform;
}
.namebar-bottom .namebar-track {
  animation-direction: reverse;
}

@keyframes namebar-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── GRAPHIC DESIGN GALLERY WINDOWS ── */
.gd-gallery-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 280px;
  max-height: 560px;
  overflow-y: auto;
}

.gd-cover {
  position: relative;
  width: 100%;
}

.gd-img {
  width: 100%;
  display: block;
  object-fit: contain;
}

/* Force white background so transparent PNGs show black lines clearly */
.white-bg {
  background: #ffffff;
}

.gd-label {
  display: block;
  font-family: var(--font-ui);
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--blue);
  padding: 4px 0 2px;
  opacity: .6;
}

/* ── CLOSED ── */
.window.is-closed { display: none !important; }

/* ── PDF IFRAME ── */
.pdf-frame {
  display: block;
  width: 420px;
  height: 520px;
  border: none;
}

/* ── TWINE GAME IFRAME ── */
.twine-frame {
  display: block;
  width: 520px;
  height: 380px;
  border: none;
  background: var(--paper);
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .cursor        { animation: none; opacity: 1; }
}


/* ── BACK BUTTON — fixed top-left of viewport, matches × aesthetic ── */
.back-btn-fixed {
  position: fixed;
  top: 12px;
  left: 14px;
  z-index: 2000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 2px solid var(--blue);
  background: var(--paper);
  color: var(--blue);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background .1s, color .1s;
}
.back-btn-fixed:hover {
  background: var(--blue);
  color: var(--paper);
}

/* =============================================
   PROJECT PAGE — extra styles
   ============================================= */


.project-title-window .window-body {
  padding: 24px 32px 20px;
}
.project-title-text {
  font-family: var(--font-display);
  font-size: clamp(42px, 6vw, 84px);
  font-weight: 400; font-style: italic;
  color: var(--blue); line-height: 1;
  white-space: nowrap;
}

.sub-project-window { width: 260px; }
.sub-project-body   { padding: 0; position: relative; }
.sub-img-wrap       { width: 100%; aspect-ratio: 4/3; overflow: hidden; }
.sub-img-wrap img   {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: grayscale(15%); transition: filter .3s;
}
.sub-project-window:hover .sub-img-wrap img { filter: grayscale(0%); }
.sub-tag {
  position: absolute; bottom: 12px; left: 12px;
  background: var(--blue); color: var(--paper);
  font-family: var(--font-ui); font-size: 11px; letter-spacing: .06em;
  padding: 4px 10px; border-radius: 999px;
  pointer-events: none;
}

.project-desc-body {
  width: 220px;
  font-size: 12px; line-height: 1.65;
  display: flex; flex-direction: column; gap: 8px;
}
.project-year {
  font-size: 9px; letter-spacing: .14em; opacity: .5; text-transform: uppercase;
}

/* ── PHYSICAL WORK WINDOWS ── */
.pw-window {
  width: 300px;
  resize: none; /* no user resize */
}

.pw-body {
  padding: 0;
  display: flex;
  flex-direction: column;
}

/* Image grid at the top */
.pw-images {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2px;
  background: var(--blue);
  border-bottom: 2px solid var(--blue);
}

/* Single image — full width */
.pw-images img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

/* Two images side by side */
.pw-images--two {
  grid-template-columns: 1fr 1fr;
}

/* Single tall image — full width, taller */
.pw-images--tall {
  grid-template-columns: 1fr;
}
.pw-images--tall img {
  aspect-ratio: 3 / 4;
}

/* Three images in a row */
.pw-images--three {
  grid-template-columns: 1fr 1fr 1fr;
}

/* Description below images */
.pw-desc {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
  line-height: 1.55;
  color: var(--blue);
}
.pw-desc .project-year {
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .5;
}
.pw-desc em {
  font-style: italic;
  opacity: .7;
}

/* ── WIDER VARIANT for projects with more content ── */
.pw-window--wide {
  width: 360px;
}

/* 2-col grid that wraps to 2x2 */
.pw-images--two {
  grid-template-columns: 1fr 1fr;
}

/* ── SKILLS SECTION LABEL ── */
.skills-section-label {
  font-family: var(--font-ui);
  font-size: 9px;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .5;
  padding: 0 0 2px 0;
}

/* ── RESIZE HANDLE ── */
.resize-handle {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 3px;
  opacity: 0;
  transition: opacity .15s;
}

.window:hover .resize-handle {
  opacity: 1;
}

.resize-handle svg {
  width: 10px;
  height: 10px;
  color: var(--blue);
  pointer-events: none;
}

/* Make window position:relative so handle is anchored */
.window {
  overflow: visible;
}

/* When a window is resized smaller, let body scroll */
.window .window-body,
.window .pw-body,
.window .gd-gallery-body {
  overflow: auto;
}

/* ── HEADSHOT ICON ── */
.headshot-icon-frame {
  width: 144px;
  height: 144px;
  border-radius: 50%;
  border: 2px solid var(--blue);
  overflow: hidden;
  box-shadow: 3px 3px 0 var(--blue);
  flex-shrink: 0;
  transition: box-shadow .15s;
}

.headshot-icon-frame:hover {
  box-shadow: 4px 4px 0 var(--blue);
}

.headshot-icon-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

/* Override the default icon-graphic styles for headshot */
#icon-headshot .desktop-icon {
  width: auto;
}

/* ── HEADSHOT RESUME HOVER ── */
.headshot-link {
  display: block;
  text-decoration: none;
}

.headshot-icon-frame {
  position: relative;
}

.headshot-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--blue);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity .2s ease;
  cursor: pointer;
}

.headshot-icon-frame:hover .headshot-overlay {
  opacity: 1;
}

.headshot-icon-frame:hover .headshot-img {
  filter: brightness(0.3) saturate(0) hue-rotate(200deg);
}