:root {
  --accent: #940c1a;
  --accent-dark: #6d0913;

  --text: #fff;
  --text-muted: rgba(255, 255, 255, 0.82);
  --bg: transparent;
  --card: transparent;
  --border: rgba(255, 255, 255, 0.28);
  --sidebar-width: 280px;
  --heading-outline: #35312e;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Open Sans", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: url("../../images/background.jpg") center center / cover no-repeat fixed;
  min-height: 100vh;
  padding: 2rem 1rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
}

a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover { color: rgba(255, 255, 255, 0.85); }

.page {
  max-width: 1200px;
  margin: 0 auto;
  background: transparent;
}

/* Header */
.header {
  background: transparent;
  color: #fff;
  padding: 2rem 2rem 0;
}

.header__top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.5rem;
}

h1, h2, h3, h4 {
  color: var(--accent);
}

h1 {
  text-shadow:
    -1px -1px 0 var(--heading-outline),
     1px -1px 0 var(--heading-outline),
    -1px  1px 0 var(--heading-outline),
     1px  1px 0 var(--heading-outline),
     0   -1px 0 var(--heading-outline),
     0    1px 0 var(--heading-outline),
    -1px  0   0 var(--heading-outline),
     1px  0   0 var(--heading-outline),
    -2px -2px 0 var(--heading-outline),
     2px -2px 0 var(--heading-outline),
    -2px  2px 0 var(--heading-outline),
     2px  2px 0 var(--heading-outline),
     0   -2px 0 var(--heading-outline),
     0    2px 0 var(--heading-outline),
    -2px  0   0 var(--heading-outline),
     2px  0   0 var(--heading-outline);
}

h2, h3, h4 {
  text-shadow:
    -1px -1px 0 var(--heading-outline),
     1px -1px 0 var(--heading-outline),
    -1px  1px 0 var(--heading-outline),
     1px  1px 0 var(--heading-outline),
     0   -1px 0 var(--heading-outline),
     0    1px 0 var(--heading-outline),
    -1px  0   0 var(--heading-outline),
     1px  0   0 var(--heading-outline);
}

.header h1 {
  margin: 0;
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.header .title {
  margin: 0.25rem 0 0;
  font-size: 1.25rem;
  font-weight: 400;
  opacity: 0.95;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tag {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 3px;
  padding: 0.2rem 0.6rem;
  font-size: 0.8rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  background: rgba(0, 0, 0, 0.15);
  margin: 0 -2rem;
  padding: 0 2rem;
}

.nav a {
  color: #fff;
  text-decoration: none;
  padding: 0.85rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-bottom: 3px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}

.nav a:hover,
.nav a:focus,
.nav a.nav__item--active {
  background: rgba(0, 0, 0, 0.1);
  border-bottom-color: #fff;
  color: #fff;
}

/* Layout */
.layout {
  display: grid;
  gap: 0;
  align-items: start;
}

.layout--home {
  grid-template-columns: var(--sidebar-width) 1fr 300px;
}

.layout--section {
  grid-template-columns: var(--sidebar-width) 1fr;
}

.content-area--loading {
  opacity: 0.55;
  pointer-events: none;
}

.content-error {
  color: var(--text-muted);
  font-style: italic;
}

.sidebar {
  padding: 1.5rem;
  border-right: 1px solid var(--border);
  position: sticky;
  top: 0;
}

.main {
  padding: 1.5rem 2rem;
  min-width: 0;
}

.portfolio-col {
  padding: 1.5rem;
  border-left: 1px solid var(--border);
  background: transparent;
  position: sticky;
  top: 0;
}

/* Sidebar widgets */
.avatar {
  width: 100%;
  border-radius: 4px;
  display: block;
  margin-bottom: 1.25rem;
}

.sidebar-section {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.sidebar-section h2 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.info-item__icon {
  width: 1rem;
  height: 1rem;
  margin-top: 0.2rem;
  flex-shrink: 0;
  display: block;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.social-links {
  display: flex;
  gap: 0.75rem;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 4px;
  background: rgba(148, 12, 26, 0.75);
  text-decoration: none;
  transition: background 0.15s;
  border: 1px solid rgba(255, 255, 255, 0.35);
  text-shadow: none;
}

.social-links a:hover {
  background: rgba(109, 9, 19, 0.9);
}

.social-links img {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
  filter: brightness(0) invert(1);
}

.status-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  padding: 0.25rem 0.6rem;
  border-radius: 3px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.availability {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.availability strong { color: #fff; }

.about { font-size: 0.9rem; color: var(--text-muted); }

.contact-btn {
  display: block;
  text-align: center;
  background: rgba(148, 12, 26, 0.75);
  color: #fff !important;
  text-decoration: none;
  padding: 0.65rem 1rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.15s;
  border: 1px solid rgba(255, 255, 255, 0.35);
  text-shadow: none;
}

.contact-btn:hover { background: rgba(109, 9, 19, 0.9); }

button.contact-btn {
  width: 100%;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

button.contact-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

.sidebar-section--actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Section styles */
.section { margin-bottom: 2.5rem; }

.section > h2,
.section-heading {
  margin: 0 0 1.25rem;
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.4rem;
}

.entry { margin-bottom: 1.75rem; }

.entry:last-child { margin-bottom: 0; }

.entry h3 {
  margin: 0 0 0.25rem;
  font-size: 1.2rem;
}

.entry h3 a { color: inherit; text-decoration: none; }
.entry h3 a:hover { color: #fff; }

.entry .subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.entry .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.entry-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.company-logo {
  width: 120px;
  height: 48px;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
}

.entry-header a:has(.company-logo) {
  text-decoration: none;
}

.entry ul {
  margin: 0;
  padding-left: 1.25rem;
}

.entry li { margin-bottom: 0.5rem; }

.entry li:last-child { margin-bottom: 0; }

.entry-block {
  margin-top: 1rem;
}

.entry-block h4 {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.entry-block p {
  margin: 0 0 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.entry-block p:last-child {
  margin-bottom: 0;
}

.skill-group { margin-bottom: 1.25rem; }
.skill-group:last-child { margin-bottom: 0; }

.skill-group h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

/* Portfolio */
.portfolio-grid {
  display: block;
}

.layout--section .portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}

.portfolio-item {
  margin-bottom: 1.75rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
}

.portfolio-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.portfolio-item h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.portfolio-item h3 a {
  color: inherit;
  text-decoration: none;
}

.portfolio-item h3 a:hover { color: #fff; }

.portfolio-item img,
.portfolio-item .video-wrap {
  width: 100%;
  border-radius: 4px;
  display: block;
  margin-bottom: 0.5rem;
}

.portfolio-item .desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.portfolio-item .desc a { word-break: break-all; }

.section--highlights .portfolio-item {
  margin-bottom: 1rem;
  padding-bottom: 0;
  border-bottom: none;
}

.section--highlights .portfolio-item:last-child {
  margin-bottom: 0;
}

.section--highlights .portfolio-item img {
  margin-bottom: 0;
}

.video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

.video-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.video-fallback img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-play {
  position: absolute;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: rgba(148, 12, 26, 0.9);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  padding-left: 0.2rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.interest-img {
  max-width: 100%;
  border-radius: 4px;
  margin-top: 0.5rem;
  display: block;
}

/* Footer */
.footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 1024px) {
  .layout--home {
    grid-template-columns: var(--sidebar-width) 1fr;
  }
  .layout--home .portfolio-col {
    grid-column: 1 / -1;
    border-left: none;
    border-top: 1px solid var(--border);
    position: static;
  }
  .portfolio-col .portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
  }
  .portfolio-col .portfolio-item {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
  }
}

@media (max-width: 700px) {
  .layout--home,
  .layout--section {
    grid-template-columns: 1fr;
  }
  .sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
    position: static;
  }
  .main { padding: 1.25rem; }
  .header { padding: 1.5rem 1.25rem 0; }
  .header h1 { font-size: 2rem; }
  .nav { margin: 0 -1.25rem; padding: 0 1.25rem; }
  .nav a { padding: 0.7rem 0.8rem; font-size: 0.8rem; }
  .entry-header { flex-direction: column; }
}

@media print {
  body {
    background: #fff;
    padding: 0;
    color: #333;
    text-shadow: none;
  }
  h1, h2, h3, h4 { text-shadow: none; }
  body a { color: #940c1a; }
  .page { box-shadow: none; max-width: none; }
  .nav, .contact-btn, #pdf-download-btn, .footer { display: none; }
  .layout { display: block; }
  .sidebar, .portfolio-col { position: static; border: none; }
  .section { page-break-inside: avoid; }
}
