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

/* ── VARIABLES ── */
:root {
  --bg: #f5f2ee;
  --ink: #0e0c0a;
  --muted: #4a4540;
  --accent: #c84b2f;
  --border: #d0cbc5;
  --card: #eeeae5;
  --serif: "DM Serif Display", Georgia, serif;
  --mono: "DM Mono", "Courier New", monospace;
}

/* ── BASE ── */
html,
body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── LAYOUT ── */
.page {
  width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr 1.35fr;
  grid-template-rows: 1fr 28px;
  grid-template-areas:
    "col-left col-mid col-right"
    "footer   footer  footer";
}

.col-left {
  grid-area: col-left;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  overflow: hidden;
}
.col-mid {
  grid-area: col-mid;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  overflow: hidden;
}
.col-right {
  grid-area: col-right;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cell {
  padding: 1.2rem 1.4rem;
  display: flex;
  flex-direction: column;
}

.cell-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
  flex-shrink: 0;
  font-weight: 600;
}

/* ── HERO ── */
.hero {
  flex: 1;
  background: var(--ink);
  color: var(--bg);
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid #333;
  min-height: 0;
}

.hero::before {
  content: "IS";
  position: absolute;
  bottom: -2rem;
  right: -0.8rem;
  font-family: var(--serif);
  font-size: 8rem;
  color: rgba(255, 255, 255, 0.04);
  line-height: 1;
  pointer-events: none;
}

.hero h1 {
  font-family: var(--serif);
  font-size: 2.6rem;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--bg);
  margin-bottom: 0.7rem;
}

.hero h1 em {
  font-style: italic;
  color: #a09890;
}

/* ── ACHIEVEMENTS (inside hero) ── */
.hero-ach {
  margin-bottom: 0.8rem;
}

.hero-ach-title {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.45rem;
  font-weight: 600;
}

.ach-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.ach-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #2e2c2a;
  padding: 0.28rem 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ach-pill-name {
  font-size: 11px;
  color: #ffffff;
  line-height: 1.3;
  font-weight: 500;
}
.ach-pill-meta {
  font-size: 10px;
  color: #dfd5cc;
}
.ach-pill-date {
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.06em;
  font-weight: 600;
}

/* ── BUTTONS ── */
.hero-links {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.btn {
  display: block;
  padding: 0.4rem 0.8rem;
  border: 1px solid;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  transition:
    background 0.15s,
    color 0.15s;
  font-weight: 600;
}

.btn-dark {
  border-color: #444;
  color: #aaa;
}
.btn-dark:hover {
  background: #2a2724;
  color: var(--bg);
}
.btn-accent {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-accent:hover {
  background: #a83a20;
}

/* ── HERO STATUS ── */
.hero-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: #6a6460;
  letter-spacing: 0.08em;
  margin-top: 0.7rem;
  font-weight: 500;
}

.status-dot {
  width: 5px;
  height: 5px;
  background: #4caf50;
  border-radius: 50%;
  animation: pulse 2.5s infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

/* ── CONTACT ── */
.contact-cell {
  flex-shrink: 0;
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 1rem 1.4rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem;
}

.contact-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.12rem;
  font-weight: 600;
}

.contact-val,
.contact-val a {
  color: var(--ink);
  font-size: 11px;
  text-decoration: none;
  word-break: break-all;
  font-weight: 500;
}

.contact-val a:hover {
  color: var(--accent);
}

.contact-loc {
  font-size: 11px;
  color: var(--muted);
  margin-top: 0.5rem;
  line-height: 1.5;
  font-weight: 500;
}

/* ── SKILLS ── */
.skills-cell {
  flex: 1;
  background: var(--bg);
  overflow: hidden;
}

.skill-row {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.skill-row:last-child {
  border-bottom: none;
}

.skill-label {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
  font-weight: 600;
}

.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.skill-pill {
  font-size: 11px;
  color: var(--ink);
  padding: 0.15rem 0.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  font-weight: 500;
}

/* ── PROJECTS ── */
.projects-col {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.projects-header {
  flex-shrink: 0;
  padding: 0.7rem 1.4rem 0;
}

.project-card {
  border-top: 1px solid var(--border);
  padding: 1rem 1.4rem;
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.project-card:nth-child(even) {
  background: var(--card);
}

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.2rem;
  flex-shrink: 0;
}

.project-name {
  font-family: var(--serif);
  font-size: 1.55rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
}

.project-meta {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  flex-shrink: 0;
  font-weight: 600;
}

.project-bullets {
  list-style: none;
  margin-bottom: 0.55rem;
  overflow: hidden;
  flex: 1;
  min-height: 0;
}

.project-bullets li {
  color: var(--ink);
  font-size: 12px;
  padding: 0.15rem 0 0.15rem 1.1rem;
  position: relative;
  line-height: 1.55;
  font-weight: 500;
}

.project-bullets li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.tech-tag {
  font-size: 10px;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--bg);
  font-weight: 500;
}

/* ── VIDEO BUTTON ── */
.card-btns {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.github-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border: 1px solid #444;
  color: #292828;
  background: transparent;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
  font-weight: 600;
  text-decoration: none;
}

.github-btn:hover {
  background: #2a2724;
  color: var(--bg);
  border-color: #666;
}

.github-btn svg {
  width: 10px;
  height: 10px;
  fill: currentColor;
}
.video-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
  font-weight: 600;
}

.video-btn:hover {
  background: var(--accent);
  color: #fff;
}
.video-btn svg {
  width: 10px;
  height: 10px;
  fill: currentColor;
}

/* ── MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(20, 16, 14, 0.85);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: var(--ink);
  border: 1px solid #333;
  width: min(680px, 92vw);
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  transform: translateY(12px);
  transition: transform 0.2s;
}

.modal-overlay.active .modal-box {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-title {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--bg);
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #666;
  font-size: 18px;
  font-family: var(--mono);
  padding: 0 4px;
  line-height: 1;
  transition: color 0.1s;
}

.modal-close:hover {
  color: var(--accent);
}

/* ── VIDEO AREA ── */
.video-area {
  background: #0d0b0a;
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  border: 1px solid #2a2724;
  overflow: hidden;
}

/* Native video player — hidden until a path is loaded */
.video-area video {
  width: 100%;
  height: 100%;
  display: none;
  object-fit: contain;
  background: #000;
}
.video-area.has-video video {
  display: block;
}
.video-area.has-video .video-placeholder {
  display: none;
}

.video-placeholder {
  text-align: center;
  padding: 0 1rem;
}
.video-placeholder-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  opacity: 0.3;
}
.video-placeholder p {
  font-size: 11px;
  color: #5a5450;
  margin-bottom: 0.6rem;
}

.video-input-row {
  display: flex;
  gap: 0.4rem;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
}

.video-input {
  flex: 1;
  background: #1a1714;
  border: 1px solid #333;
  color: #ccc;
  font-family: var(--mono);
  font-size: 11px;
  padding: 0.4rem 0.65rem;
  outline: none;
}

.video-input:focus {
  border-color: var(--accent);
}
.video-input::placeholder {
  color: #444;
}

.video-submit {
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4rem 0.9rem;
  transition: background 0.15s;
}

.video-submit:hover {
  background: #a83a20;
}

.video-hint {
  font-size: 10px;
  color: #3a3430;
  letter-spacing: 0.06em;
  margin-top: 0.4rem;
}

.video-error {
  font-size: 10px;
  color: #c84b2f;
  margin-top: 0.3rem;
}

.modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-footer-label {
  font-size: 9px;
  color: #5a5450;
  letter-spacing: 0.08em;
}

.modal-remove {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 9px;
  color: #444;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0;
  transition: color 0.1s;
  display: none;
}

.modal-remove:hover {
  color: var(--accent);
}
.modal-remove.visible {
  display: block;
}

/* ── FOOTER ── */
.footer-cell {
  grid-area: footer;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1.4rem;
  background: var(--bg);
}

.footer-cell p {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.08em;
  font-weight: 500;
}
