/* ===================================================
   Young Choi — Portfolio (Blueprint Edition)
   =================================================== */

:root {
  --navy: #0a192f;
  --navy-deep: #020c1b;
  --navy-light: #112240;
  --navy-lighter: #233554;
  
  --cyan: #64ffda;
  --cyan-tint: rgba(100, 255, 218, 0.1);
  --orange: #ff7e33;
  
  --ink: #ccd6f6;
  --ink-soft: #8892b0;
  --rule: rgba(255, 255, 255, 0.1);

  --font-display: 'Barlow Condensed', sans-serif;
  --font-body: 'Source Sans 3', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* ---------------- Custom Cursor ---------------- */
body, a, button, [role="button"] { cursor: none; }

.cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 6px; height: 6px;
  background-color: var(--orange);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
}

.cursor-bloom {
  position: fixed;
  top: 0; left: 0;
  width: 40px; height: 40px;
  border: 1px solid var(--orange);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.2s ease, height 0.2s ease, background-color 0.2s ease;
}

.cursor-bloom.hovering {
  width: 60px; height: 60px;
  background-color: rgba(255, 126, 51, 0.1);
  border-color: rgba(255, 126, 51, 0.5);
  backdrop-filter: blur(2px);
}

body {
  margin: 0;
  background: var(--navy-deep);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0;
  color: #e6f1ff;
}

a { color: var(--cyan); text-decoration: none; transition: color 0.3s ease; }
a:hover { color: var(--orange); }

ul { margin: 0; padding: 0; }
li { list-style: none; }

/* ---------------- Grid overlay ---------------- */

.grid-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(100, 255, 218, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100, 255, 218, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: 0;
}

/* ---------------- Section nav ---------------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(2, 12, 27, 0.7);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}

.site-nav-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-mark {
  display: flex;
  align-items: center;
  padding: 12px 0;
  flex-shrink: 0;
  text-decoration: none;
}

.nav-avatar {
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: var(--navy-light);
  background-size: cover;
  background-position: center;
  border: 2px solid var(--cyan);
  transition: transform 0.3s ease;
}

.nav-mark:hover .nav-avatar {
  transform: scale(1.1);
  border-color: var(--orange);
}

.nav-links {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-links::-webkit-scrollbar { display: none; }

.nav-links a {
  display: block;
  padding: 16px 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}

.nav-links a:hover {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

/* ---------------- Nav clock ---------------- */

.nav-clock {
  position: relative;
  margin-left: auto;
  flex-shrink: 0;
}

.clock-trigger {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  padding: 10px 4px;
  background: transparent;
  border: none;
  color: var(--ink);
  text-align: right;
}

.clock-time {
  font-family: var(--font-mono);
  font-size: 17px;
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.clock-trigger:hover .clock-time {
  color: var(--orange);
}

.clock-zone {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.clock-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  min-width: 210px;
  max-height: 320px;
  overflow-y: auto;
  background: var(--navy-light);
  border: 1px solid var(--cyan-tint);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
}

.clock-dropdown[hidden] { display: none; }

.clock-dropdown li {
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-soft);
  border-top: 1px solid var(--rule);
  cursor: inherit;
}

.clock-dropdown li:first-child { border-top: none; }

.clock-dropdown li:hover {
  background: var(--navy-lighter);
  color: var(--cyan);
}

.clock-dropdown li.is-active {
  color: var(--orange);
}

/* ---------------- Hero / Title block ---------------- */

.hero {
  position: relative;
  color: var(--ink);
  padding: 120px 24px 80px;
  overflow: hidden;
}

.hero-inner {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
  z-index: 1;
}

.hero-name {
  font-size: clamp(56px, 10vw, 96px);
  line-height: 0.95;
  letter-spacing: 0.01em;
  color: #ccd6f6;
  text-shadow: 0 0 20px rgba(100, 255, 218, 0.1);
}

.hero-role {
  font-family: var(--font-mono);
  font-size: clamp(14px, 2vw, 16px);
  color: var(--cyan);
  margin: 14px 0 48px;
}

.glass-panel {
  background: rgba(17, 34, 64, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
}

.title-block {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.tb-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 20px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.tb-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  text-transform: uppercase;
}

.tb-value {
  font-size: 15px;
  color: var(--ink);
}

/* ---------------- Sheets (main sections) ---------------- */

main {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
}

.sheet {
  padding: 80px 0;
  border-bottom: 1px solid var(--rule);
  scroll-margin-top: 80px;
}

.sheet:last-child { border-bottom: none; }

.sheet-heading {
  margin-bottom: 28px;
}

.sheet-heading h2 {
  font-size: 32px;
  letter-spacing: 0.01em;
  color: var(--ink);
  position: relative;
  display: inline-block;
}

.sheet-heading h2::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--cyan);
}

.summary-body {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 40px;
  padding: 32px;
}

.summary-body .lede {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 56ch;
}

.summary-headshot {
  width: 200px;
  height: 200px;
  flex: 0 0 200px;
  border-radius: 50%;
  border: 2px solid var(--cyan);
  background-color: var(--navy-light);
  background-size: cover;
  background-position: center;
}

.lede {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 62ch;
}

/* ---------------- Scroll Animations ---------------- */

.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.215, 0.61, 0.355, 1), transform 0.8s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.scroll-reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ---------------- Experience / Project entries ---------------- */

.entry {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 32px;
  padding: 32px;
  background: rgba(17, 34, 64, 0.3);
  border-radius: 12px;
  border: 1px solid transparent;
  margin-bottom: 24px;
  transition: all 0.3s ease;
}

.entry:hover {
  background: rgba(17, 34, 64, 0.8);
  border-color: var(--cyan-tint);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px -15px rgba(0,0,0,0.5);
}

.entry-mark {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding-top: 4px;
}

.entry-icon {
  width: 100px;
  height: 100px;
  flex-shrink: 0;
  border-radius: 8px;
  border: 1px solid var(--cyan);
  background-color: var(--navy-light);
  background-size: cover;
  background-position: center;
}

.entry-date {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--cyan);
  line-height: 1.5;
}

.entry-main h3 {
  font-size: 24px;
  color: #ccd6f6;
  margin-bottom: 4px;
}

.entry-org {
  font-size: 15px;
  color: var(--ink-soft);
  margin: 0 0 14px;
}

.entry-main ul:not(.tag-list) {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.entry-main li {
  position: relative;
  padding-left: 20px;
  font-size: 16px;
  color: var(--ink);
}

.entry-main ul:not(.tag-list) li::before {
  content: "▹";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--cyan);
  font-size: 18px;
  line-height: 1.6;
}

/* Tag list chips */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.tag-list li {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 14px;
  background: var(--cyan-tint);
  color: var(--cyan);
  border-radius: 20px;
}

/* ---------------- Photo galleries ---------------- */

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.photo-frame {
  margin: 0;
}

.placeholder-art {
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  border: 1px solid var(--rule);
  background-color: var(--navy-light);
  background-size: cover;
  background-position: center;
  transition: all 0.3s ease;
}

.photo-frame:hover .placeholder-art {
  border-color: var(--cyan);
  transform: scale(1.02);
}

.photo-frame figcaption {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
  margin-top: 8px;
}

/* ---------------- Education & Awards ---------------- */

.edu-entry {
  padding: 24px 32px;
  margin-bottom: 20px;
}

.edu-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.edu-top h3 { font-size: 26px; }

.edu-line {
  font-size: 15px;
  color: var(--ink);
  margin: 8px 0 0;
}

.two-col {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
}

.sub-heading {
  font-size: 20px;
  margin-bottom: 14px;
  color: #ccd6f6;
}

.plain-list li {
  padding: 10px 0;
  border-top: 1px solid var(--rule);
  font-size: 15px;
}

.plain-list li:first-child { border-top: none; }

.award-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.award-list li {
  padding: 20px 24px;
}

.award-top {
  display: flex;
  gap: 20px;
  align-items: baseline;
}

.award-date {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--orange);
  min-width: 80px;
}

.award-name {
  font-size: 18px;
  color: #ccd6f6;
  font-weight: 600;
}

.award-detail {
  margin-top: 8px;
}

.award-org {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cyan);
  margin-bottom: 4px;
}

.award-desc {
  margin: 0;
  font-size: 14.5px;
  color: var(--ink-soft);
}

/* ---------------- Lightbox ---------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.lightbox.is-open {
  visibility: visible;
  opacity: 1;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 12, 27, 0.85);
  backdrop-filter: blur(8px);
}

.lightbox-content {
  position: relative;
  z-index: 1;
  max-width: min(880px, 88vw);
  max-height: 84vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.lightbox-img {
  display: block;
  max-width: 100%;
  max-height: 68vh;
  border-radius: 8px;
  border: 1px solid var(--rule);
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.lightbox-caption {
  margin: 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink);
}

.lightbox-close, .lightbox-arrow {
  position: absolute;
  z-index: 2;
  border: 1px solid var(--rule);
  background: rgba(17, 34, 64, 0.8);
  color: var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.lightbox-close { top: 20px; right: 24px; width: 40px; height: 40px; font-size: 22px; }
.lightbox-arrow { top: 50%; transform: translateY(-50%); width: 48px; height: 48px; font-size: 26px; }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-arrow[hidden] { display: none; }
body.lightbox-open { overflow: hidden; }

/* ---------------- Footer ---------------- */

.site-footer {
  position: relative;
  background: var(--navy-deep);
  color: var(--ink-soft);
  padding: 48px 24px;
  text-align: center;
  border-top: 1px solid var(--rule);
}

.footer-name {
  font-family: var(--font-display);
  font-size: 24px;
  color: #ccd6f6;
  margin: 0 0 8px;
}

.footer-meta {
  font-family: var(--font-mono);
  font-size: 13px;
  margin: 0;
}

/* ---------------- Responsive ---------------- */

@media (max-width: 640px) {
  body, a, button, [role="button"] { cursor: auto; }
  .cursor-dot, .cursor-bloom { display: none; }
  .title-block { grid-template-columns: 1fr 1fr; }
  .entry { grid-template-columns: 1fr; padding: 20px; }
  .summary-body { flex-direction: column-reverse; text-align: center; padding: 20px; }
  .summary-headshot { width: 120px; height: 120px; flex: 0 0 120px; }
  .photo-gallery { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; gap: 32px; }
}

/* ---------------- Ambient Canvas Background ---------------- */
#ambient-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1; /* Keeps it behind the grid and all content */
  pointer-events: none;
}

/* ---------------- Sticky Side Widgets ---------------- */
.side-widget {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Left Widget (The Glass Pill) */
.left-widget {
  left: 32px;
  padding: 24px 20px;
  border-radius: 40px;
  width: auto;
  gap: 24px;
  z-index: 100; /* Forces it above canvas layers and background grids */
  pointer-events: auto; /* Ensures mouse clicks pass through to the links */
}

.left-widget a {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  transition: all 0.3s ease;
  letter-spacing: 1px;
  position: relative;
  z-index: 101; /* Guarantees the text links themselves are clickable */
}

.left-widget a:hover {
  color: var(--cyan);
  transform: scale(1.05);
}

/* Right Widget (Scroll Progress) */
.right-widget {
  right: 40px;
  gap: 24px;
  height: 60vh;
}

.scroll-track {
  width: 1px;
  flex-grow: 1;
  background: var(--rule);
  position: relative;
  overflow: hidden;
}

.scroll-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--cyan);
  transform-origin: top;
  transform: scaleY(0); /* Starts at 0, filled by JS */
  box-shadow: 0 0 10px var(--cyan);
}

.vertical-text {
  writing-mode: vertical-rl;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
  transform: rotate(180deg);
}

/* Hide sidebars on smaller screens */
@media (max-width: 1100px) {
  .side-widget {
    display: none;
  }
}

.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background-color: var(--cyan);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
}

.cursor-bloom {
  position: fixed;
  top: 0;
  left: 0;
  width: 50px;
  height: 50px;
  background: radial-gradient(circle, rgba(100,255,218,0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
}

/* ---------------- Degree Progress Bar ---------------- */
.degree-progress-container {
  width: 100%;
  max-width: 900px;
  margin: 20px auto 30px;
  background: var(--navy-deep);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

.progress-info-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
}

.progress-label {
  color: var(--ink-soft);
  letter-spacing: 1px;
}

.progress-percentage {
  color: var(--cyan);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.progress-track {
  width: 100%;
  height: 8px;
  background: var(--navy-light);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--rule);
}

.progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%; /* Updated dynamically by JavaScript */
  background: linear-gradient(90deg, var(--cyan), #64ffda);
  border-radius: 4px;
  box-shadow: 0 0 12px var(--cyan);
  transition: width 0.1s linear;
}

/* Progress Bar Date Labels */
.progress-dates {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 0.5px;
}