/* ===============
   PORTFOLIO STYLE SHEET - Pavel Zouhar
   Structure:
   tokens -> base -> navigation -> sections -> footer -> responsiveness (phone + tablet)
/* ============================== */

/* Reset def browser spacing; border box creates coherence
   between declared and rendered sizes */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Design tokens - single source for colors and fonts */
:root {
  --bg:       #0D0D0D;   /* page background */
  --bg-card:  #161616;   /* card background */
  --border:   #2A2A2A;   /* dividers, card borderr */
  --text:     #EDEDED;   /* prim text */
  --muted:    #888888;   /* sec text */
  --dim:      #666666;   /* third text + quotes */
  --name-dim: #333333;   /* dimmed surname in hero */
  --radius:   8px;       /* shared corner radius */
}

/* ================ BASE ================ */

html {
  /* Anchor links glide to xyz section instead of jumping */
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
}

/* Links inherit text color by default; sections override if needed */
a {
  text-decoration: none;
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

/* Central container - 1440px frame w 64px side padding (1312px space) same as Figma */
.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 64px;
}

/* Section dividers - 1px lines */
hr {
  border: none;
  border-top: 1px solid var(--border);
}

/* Grey section label, eg. "About me" sec etc. */
.label {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
}

/* Shared italic quote style, used in x sections */
.quote {
  font-size: 13px;
  font-style: italic;
  color: var(--dim);
  line-height: 1.7;
  margin-top: 20px;
}

/* Offset anchor scroll position (to make up for sticky navbar) */
section {
  scroll-margin-top: 64px;
}

/* Shared pill tag, used for skills, tools and project techs */
.tag {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 14px;
  font-size: 13px;
  color: var(--muted);
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
}

/* Tag variant w small lead icon */
.tag-icon {
  gap: 6px;
  color: var(--text);
}

/* Horizontal row of tags; wraps to new line on smaller screens */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

/* Outlined button used in hero + contact sections */
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border: 1px solid var(--text);
  color: var(--text);
  font-size: 14px;
  transition: background-color .2s, color .2s;
}

/* Invert colors on hover for interactive nice feel */
.btn-outline:hover {
  background-color: var(--text);
  color: var(--bg);
}

/* Row of socials icons, shared by hero + contact sections */
.socials {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Slight lift on hover to signal icons are clickable */
.socials a {
  display: flex;
  transition: transform .2s, opacity .2s;
}

.socials a:hover {
  transform: translateY(-3px);
  opacity: .8;
}

/* ================ NAVIGATION ================ */

/* Sticky bar = stays visible when scrolling; blur keeps underlying content readable */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 64px;
  background-color: rgba(22, 22, 22, .9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-size: 18px;
  font-weight: 600;
}

.nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  transition: color .2s;
}

.nav-links a:hover {
  color: var(--muted);
}

/* Outlined contact shortcut on right side of navbar */
.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border: 1px solid var(--text);
  font-size: 13px;
  transition: background-color .2s, color .2s;
}

.nav-btn:hover {
  background-color: var(--text);
  color: var(--bg);
}

/* Hamburger button - hidden on desktop, shown on mobile etc */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  width: 22px;
  height: 2px;
  background-color: var(--text);
  transition: transform .25s, opacity .25s;
}

/* Animates the 3 bars/hamburger into a cross when the menu is open */
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile dropdown - hidden until opened by hamburger */
.mobile-menu {
  display: none;
  position: sticky;
  top: 64px;
  z-index: 99;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  font-size: 15px;
  color: var(--muted);
}

/* =============== HERO =============== */

/* 2 columns: text intro on left, portrait on right
   align-items: flex-end keeps photo on divider */
.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 60px;
}

/* Vertical style of left column matches design layout */
.hero-content {
  padding: 66px 0 48px;
}

.hero-label {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

/* clamp() scales heading between small & large screens while keeping 140px max. (as in design) */
.hero-name {
  font-size: clamp(64px, 10vw, 140px);
  font-weight: 600;
  line-height: .95;
  letter-spacing: -.02em;
  margin-bottom: 28px;
}

/* Surname is darker for nice visuals */
.hero-name span {
  color: var(--name-dim);
}

.hero-tagline {
  font-size: clamp(22px, 2.3vw, 32px);
  font-weight: 600;
  color: var(--dim);
  line-height: 1.3;
  margin-bottom: 48px;
}

.hero .btn-outline {
  margin-bottom: 48px;
}

/* Portrait size to match design */
.hero-photo {
  flex-shrink: 0;
  max-width: 581px;
  width: 45%;
}

.hero-photo img {
  width: 100%;
  height: auto;
}

/* =============== ABOUT ================ */

/* 2 equal text columns w decent spacing between the */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 110px;
  padding: 40px 0 64px;
}

.about-bio {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 54px;
}

.about-greeting {
  font-size: 22px;
  color: var(--muted);
  margin-bottom: 24px;
}

.about-text {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 40px;
}

/* ================ SKILLS ================ */

.skills {
  padding: 40px 0 56px;
}

/* "Tools" sub heading between the 2 tag groups */
.sublabel {
  font-size: 16px;
  color: var(--muted);
  margin: 20px 0 16px;
}

.skills-note {
  font-size: 14px;
  color: var(--text);
  margin-top: 28px;
}

/* ================ PROJECTS ================ */

.projects {
  padding: 40px 0 64px;
}

/* 3 equal cards; adequate gap like design */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 56px;
  align-items: stretch;
}

/* Card with image on top and text content below */
.project-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .25s, transform .25s;
  display: flex;
  flex-direction: column;
  height: 384px;
}

/* Subtle highlight invites interaction without being distracting */
.project-card:hover {
  border-color: var(--muted);
  transform: translateY(-4px);
}

/* Fixed preview height; object-fit crops instead of distorting */
.project-card > img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: top;
  flex-shrink: 0;
}

/* Fixes issue with cafe img preview position */
.project-card > img.img-cafe {
  object-position: 30% top
}

.project-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.project-body h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.project-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 12px;
  min-height: 39px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-link {
  display: inline-block;
  font-size: 13px;
  margin-top: 4px;
  transition: color .2s;
  flex-shrink: 0;
}

.project-link:hover {
  color: var(--muted);
}

/* ========== INTERESTS ========== */

.interests {
  padding: 40px 0 64px;
}

.interests h2 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 40px;
}

/* 4 cards per row on desktop, like design */
.interests-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.interest-card {
  min-height: 180px;
  padding: 20px;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* Card title with small leading icon */
.interest-card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
}

.interest-card p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
}

.interest-card .quote {
  margin-top: 14px;
}

/* ================ CONTACT ================ */

.contact {
  padding: 40px 0 40px;
}

.contact h2 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 28px;
}

.contact-sub {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 32px;
}

.btn-mail {
  margin-bottom: 36px;
}

/* ================ FOOTER ================ */

/* 3 areas: copyright, navigation, contact + logo */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 0;
}

.footer-copy {
  font-size: 13px;
  color: var(--muted);
}

.footer-nav {
  display: flex;
  gap: 40px;
  list-style: none;
}

.footer-nav a {
  font-size: 13px;
  color: var(--muted);
  transition: color .2s;
}

.footer-nav a:hover {
  color: var(--text);
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer-mail {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  transition: color .2s;
}

.footer-mail:hover {
  color: var(--text);
}

.footer-logo {
  font-size: 16px;
  font-weight: 600;
}

/* ================ RESPONSIVE — TABLET (ca 1024px) ================ */

@media (max-width: 1024px) {

  /* Reduce side padding to preserve content width */
  .container { padding: 0 40px; }
  .navbar    { padding: 0 40px; }

  /* Hero heading and photo scale down proportionally */
  .hero-content { padding: 90px 0 40px; }
  .hero-photo   { width: 42%; }

  /* Columns become narrower, gap is reduced */
  .about { gap: 56px; }

  /* 2 cards per row fit on tablet width */
  .projects-grid  { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .interests-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ================ RESPONSIVE — PHONE (ca 768px) ================ */

@media (max-width: 768px) {

  .container { padding: 0 24px; }
  .navbar    { padding: 0 24px; }

  /* Desktop navigation -> hamburger menu */
  .nav-links { display: none; }
  .nav-btn   { display: none; }
  .hamburger { display: flex; }

  /* Hero stacks vertically; portrait moves below text */
  .hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .hero-content { padding: 64px 0 40px; }

  .hero-photo {
    width: 100%;
    max-width: 420px;
    align-self: center;
  }

  /* All multi column layouts collapse to single column */
  .about          { grid-template-columns: 1fr; gap: 40px; padding-bottom: 48px; }
  .projects-grid  { grid-template-columns: 1fr; gap: 24px; }
  .interests-grid { grid-template-columns: 1fr; }

  .interests h2,
  .contact h2 { font-size: 28px; }

  /* Footer items stack and align to left */
  .footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }
}

