
:root {
  --bg: #050505;
  --surface: #090909;
  --fg: #d0d0d0;
  --hi: #f5f5f5;
  --mute: #929292;
  --line: #292929;
  --line-hover: #555;
}

* {
  box-sizing: border-box;
  margin: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.75 'IBM Plex Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: #555;
  color: #fff;
}

:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

a {
  color: #e5e5e5;
  text-underline-offset: 4px;
  transition: color .2s ease;
}

a:hover {
  color: #fff;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--hi);
  font-family: 'Space Grotesk', system-ui, sans-serif;
}

h1, h2, h3, p, li, dd, dt {
  overflow-wrap: break-word;
}

h1 {
  font-size: clamp(64px, 11vw, 124px);
  font-weight: 700;
  line-height: .98;
  letter-spacing: -.055em;
}

h2 {
  margin-bottom: 26px;
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.035em;
}

h3 {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
}

p {
  max-width: 72ch;
}

.mute, .org, .meta, .status {
  color: var(--mute);
}

/* Navigation */

nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 5, 5, .94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 14px;
}

nav b {
  display:flex; align-items:center; gap:9px; margin-right:auto;
  color:var(--hi); font:600 21px 'Space Grotesk',sans-serif;
}

nav a {
  color: #aaa;
  text-decoration: none;
}

nav a:hover {
  color: #fff;
}

/* Main content and section dividers */

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px 72px;
}

main > section {
  margin-top: 72px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

/* Remove decorative squares and pseudo-element markers */

section::before,
section::after,
h1::before,
h1::after,
h2::before,
h2::after,
h3::before,
h3::after,
p::before,
p::after {
  content: none !important;
  display: none !important;
}

/* Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 440px);
  align-items: center;
  gap: 42px;
  min-height: 84vh;
  padding: 48px 0;
}

.hero > div {
  min-width: 0;
}

.hero h1 {
  margin-bottom: 16px;
  color: var(--hi);
  animation: title-arrive .65s ease-out both;
}

@keyframes title-arrive {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.role {
  margin-bottom: 20px;
  color: #aaa;
  font: 14px/1.7 'IBM Plex Mono', monospace;
}

.hero p {
  color: #c4c4c4;
}

.status {
  margin-top: 18px;
  font-size: 14px;
}

/* Projects */

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.card {
  position: relative;
  display: block;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface);
  text-decoration: none;
  transition: border-color .25s ease, transform .25s ease, background .25s ease;
}

.card:hover, .card:focus-within {
  border-color: var(--line-hover);
  background: #0c0c0c;
}

.card .th {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  padding: 22px;
  border-bottom: 1px solid #252525;
  background: radial-gradient(ellipse at center, #111, #080808 72%);
}

.card .th img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.08);
  transition: transform .35s ease, filter .35s ease;
}

.card:hover .th img {
  transform: scale(1.025);
  filter: grayscale(.65) contrast(1.08);
}

.ph {
  color: #888;
  font: 9px/1.15 'IBM Plex Mono', monospace;
  transition: color .25s;
}

.card:hover .ph {
  color: #c8c8c8;
}

.card > h3 {
  padding: 17px 18px 19px;
  color: var(--hi);
}

/* Project details overlay */

.ov {
  position: absolute;
  inset: 0;
  overflow: auto;
  padding: 22px;
  border-top: 1px solid #383838;
  background: rgba(5, 5, 5, .98);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .22s ease, transform .22s ease;
}

.card:hover .ov,
.card:focus-within .ov,
.card:focus .ov {
  opacity: 1;
  transform: none;
}

.ov p {
  margin-bottom: 12px;
  color: #c8c8c8;
  font-size: 14px;
  line-height: 1.7;
}

.ov a {
  display: inline-block;
  margin-top: 8px;
  color: #fff;
}

/* Background canvas */

#bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: .65;
  filter: blur(1.4px);
  -webkit-mask-image: radial-gradient(ellipse at center, transparent 30%, #000 90%);
  mask-image: radial-gradient(ellipse at center, transparent 30%, #000 90%);
}

/* Footer */

footer {
  max-width: 1100px;
  margin: auto;
  padding: 32px;
  border-top: 1px solid var(--line);
  color: var(--mute);
  font-size: 13px;
}

/* Admin — existing selectors retained */

.adm {
  max-width: 860px;
  margin: auto;
  padding: 30px 24px;
}

.adm input, .adm textarea, .adm select {
  width: 100%;
  margin: 4px 0 12px;
  padding: 9px;
  border: 1px solid #333;
  background: #080808;
  color: #eee;
  font: inherit;
}

.adm label {
  display: block;
  color: var(--mute);
  font-size: 13px;
}

.adm fieldset {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

#msg {
  min-height: 30px;
  margin: 10px 0;
}

/* Responsive */

@media (max-width: 760px) {
  nav {
    gap: 14px;
    padding: 13px 18px;
  }

  nav b {
    width: 100%;
  }

  main {
    padding-right: 20px;
    padding-left: 20px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 22px;
    padding: 38px 0;
  }

  main > section {
    margin-top: 54px;
    padding-top: 24px;
  }
}

@media (max-width: 520px) {
  .grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(52px, 16vw, 78px);
  }

  h2 {
    font-size: 28px;
  }

  footer {
    padding: 24px 20px;
  }
}

/* Touchscreens: show project descriptions without hover */

@media (hover: none) {
  .ov {
    position: static;
    padding: 0 18px 18px;
    border-top: 0;
    background: transparent;
    opacity: 1;
    transform: none;
  }
}

/* Accessibility */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  .card:hover, .btn:hover {
    transform: none;

    
  }
}

/* Align navbar branding with the hero's left edge */
nav {
  position: sticky;
  top: 0;
  justify-content: flex-start;
  padding-left: max(32px, calc((100% - 1100px) / 2 + 32px));
}

/* Keep the icon and Ivan together on the left */
nav b {
  position: static;
  transform: none;
  margin: 0;
  white-space: nowrap;
}

/* Push navigation links to the right */
nav a:first-of-type {
  margin-left: auto;
}

nav a + a {
  margin-left: 0;
}

@media (max-width: 760px) {
  nav {
    padding: 13px 20px;
  }

  nav b {
    width: 100%;
    margin-bottom: 2px;
  }

  nav a:first-of-type {
    margin-left: 0;
  }
}

/* Workshop-specific hero and admin additions */
.hero { min-height: 62vh; }
.hero-logo { display:grid; place-items:center; width:100%; max-width:440px; aspect-ratio:3/2; justify-self:center; }
.hero-logo img { width:64%; height:64%; object-fit:contain; filter:grayscale(1); }
#portfolio { margin-top:0; }
.card .th { padding:22px; }
.card .th img { object-fit:cover; }
.adm .row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:13px 0; border-bottom:1px solid var(--line); }
.adm label { display:block; margin:12px 0; color:var(--mute); font-size:13px; }
.adm input:not([type=checkbox]), .adm textarea, .adm select { display:block; width:100%; margin-top:5px; padding:10px; border:1px solid #333; background:#080808; color:#eee; font:inherit; }
.adm textarea { min-height:100px; }
.adm .preview { display:block; max-width:260px; max-height:150px; margin:12px 0; object-fit:cover; border:1px solid var(--line); }
.adm .message { margin:12px 0; color:#aaa; }
.adm .error { color:#ff8888; }
.adm .success { color:#a5d6a5; }
.adm .btn { margin:7px 7px 7px 0; }
@media (max-width:760px) { .hero { grid-template-columns:1fr; min-height:auto; } .hero-logo { order:-1; max-width:340px; } }

/* Admin controls */
.adm .btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:8px 16px;
  border:1px solid #393939;
  background:#eee;
  color:#080808;
  font:14px 'IBM Plex Sans',sans-serif;
  cursor:pointer;
  transition:background .2s,color .2s,border-color .2s,transform .2s;
}
.adm .btn.o {
  background:#101010;
  color:#eee;
  border-color:var(--line);
}
.adm .btn:hover {
  transform:translateY(-2px);
  background:#fff;
  color:#000;
  border-color:#fff;
}



/* Navbar links */
nav b a.brand-link {
  display: inline-block;
  color: var(--hi);
  text-decoration: none;
  white-space: nowrap;
}
nav b a.brand-link:hover {
  color: #bdbdbd;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Hero: heading on the left, one clean static BCUCompSoc vector on the right. */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 4vw, 56px);
  min-height: 72vh;
  padding: 48px 0;
}
.hero-copy { min-width: 0; }
.hero h1 {
  margin-bottom: 16px;
  font-size: clamp(42px, 6.2vw, 78px);
  line-height: 1.06;
  letter-spacing: -.055em;
}
.hero h1 span { display: block; white-space: nowrap; overflow-wrap: normal; }
.hero-logos {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  min-width: 0;
  margin: 0;
}
.hero-logos .bcu-compsoc-logo {
  display: block;
  width: 100%;
  max-width: 470px;
  height: auto;
  min-width: 0;
  margin-left: auto;
  object-fit: contain;
  object-position: center;
}
@media (max-width: 900px) {
  .hero { gap: 26px; }
  .hero h1 { font-size: clamp(38px, 5.8vw, 60px); }
  .hero-logos .bcu-compsoc-logo { max-width: 410px; }
}
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 26px; min-height: auto; padding: 40px 0; }
  .hero-logos { order: -1; justify-content: center; max-width: 500px; margin: 0 auto; }
  .hero-logos .bcu-compsoc-logo { max-width: 440px; margin: 0 auto; }
}
@media (max-width: 480px) {
  .hero h1 { font-size: clamp(32px, 9vw, 46px); }
  .hero-logos .bcu-compsoc-logo { max-width: 100%; }
}
