/* =========================================================
   style.css — danieltuma.work
   ========================================================= */

@import url('https://fonts.cdnfonts.com/css/cascadia-code');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  --font-mono: 'Cascadia Code', 'JetBrains Mono', 'Cascadia Mono', Consolas, monospace;
  --bg:           #f9f9f8;
  --bg-alt:       #f2f2f0;
  --bg-card:      #ffffff;
  --fg:           #1c1c1a;
  --fg-muted:     #6b6b68;
  --accent:       #6d28d9;
  --accent-alpha: rgba(109, 40, 217, 0.10);
  --accent-bg:    #ede9fe;
  --border:       #e4e4e1;
  --border-focus: #6d28d9;
  --shadow:       0 2px 12px rgba(0,0,0,0.07);
  --shadow-card:  0 4px 24px rgba(0,0,0,0.08);
  --nav-h: 60px;
  --radius: 6px;
  --transition: 0.22s ease;
}

[data-theme="dark"] {
  --bg:           #111110;
  --bg-alt:       #1a1a18;
  --bg-card:      #1e1e1c;
  --fg:           #edede8;
  --fg-muted:     #8a8a84;
  --accent:       #a78bfa;
  --accent-alpha: rgba(167, 139, 250, 0.13);
  --accent-bg:    #1e1b2e;
  --border:       #2a2a28;
  --border-focus: #a78bfa;
  --shadow:       0 2px 12px rgba(0,0,0,0.28);
  --shadow-card:  0 4px 24px rgba(0,0,0,0.32);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-mono);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.7;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: var(--font-mono); }
.container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }
.section { padding: 100px 0; }
.accent { color: var(--accent); }

/* Reveal Animation */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* NAV */
#nav { position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h); z-index: 100; transition: background var(--transition); }
#nav.scrolled { background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 2rem; height: 100%; display: flex; align-items: center; gap: 2rem; }
.nav-brand { font-size: 1.15rem; font-weight: 600; }
.nav-links { display: flex; gap: 1.8rem; margin-left: auto; margin-right: 1.5rem; }
.nav-links a { font-size: 0.82rem; color: var(--fg-muted); transition: color var(--transition); }
.nav-links a.active, .nav-links a:hover { color: var(--fg); }
.nav-controls { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; }

/* Language Dropdown */
.lang-switcher-dropdown { position: relative; }
.lang-current { display: flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: var(--radius); padding: 4px 10px; height: 34px; color: var(--fg); font-size: 0.8rem; transition: border-color var(--transition); }
.lang-current:hover { border-color: var(--accent); }
.lang-current .chevron { transition: transform var(--transition); }
.lang-switcher-dropdown.open .chevron { transform: rotate(180deg); }

.lang-menu { position: absolute; top: calc(100% + 8px); right: 0; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); list-style: none; padding: 4px; display: none; flex-direction: column; min-width: 90px; box-shadow: var(--shadow-card); }
.lang-switcher-dropdown.open .lang-menu { display: flex; }
.lang-menu .lang-btn { width: 100%; display: flex; align-items: center; gap: 8px; padding: 6px 10px; font-size: 0.8rem; color: var(--fg-muted); border-radius: 4px; transition: 0.22s; }
.lang-menu .lang-btn:hover, .lang-menu .lang-btn.active { background: var(--bg-alt); color: var(--fg); }

.flag-icon { width: 16px; border-radius: 2px; }

.theme-toggle { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: var(--radius); color: var(--fg-muted); transition: color var(--transition), border-color var(--transition); }
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
[data-theme="light"] .icon-moon { display: block; } [data-theme="light"] .icon-sun { display: none; }
[data-theme="dark"] .icon-sun { display: block; } [data-theme="dark"] .icon-moon { display: none; }

.hamburger { display: none; flex-direction: column; gap: 4px; width: 28px; }
.hamburger span { display: block; height: 2px; background: var(--fg); transition: 0.22s; }

/* HERO */
#hero { 
  min-height: 100svh;
  height: auto;
  display: flex; 
  flex-direction: column; 
  justify-content: center; 
  position: relative; 
  overflow: hidden; 
  padding-top: calc(var(--nav-h) + 2rem);
  padding-bottom: 6rem;
}
#hero::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(circle, var(--border) 1px, transparent 1px); background-size: 28px 28px; opacity: 0.55; z-index: 0; }
.hero-grid { max-width: 1100px; margin: 0 auto; padding: 0 2rem; display: grid; grid-template-columns: 1fr 340px; align-items: center; gap: 4rem; z-index: 1; }
.hero-name { font-size: clamp(3.5rem, 8.5vw, 7rem); font-weight: 700; line-height: 0.95; }
.hero-roles { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0; }
.role-chip { font-size: 0.75rem; padding: 3px 10px; border: 1px solid var(--border); border-radius: 100px; color: var(--fg-muted); }
.hero-tag { font-size: 0.75rem; color: var(--accent); margin-bottom: 1rem; font-family: var(--font-mono); }
.hero-desc { max-width: 520px; font-size: 0.95rem; color: var(--fg-muted); margin-bottom: 1.5rem; line-height: 1.8; }

.hero-action-row {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.btn-primary { display: inline-block; padding: 10px 22px; border: 1.5px solid var(--accent); color: var(--accent); border-radius: var(--radius); transition: 0.22s; }
.btn-primary:hover { background: var(--accent); color: #fff; }

.hero-photo { display: flex; justify-content: center; }
.photo-frame { width: 280px; height: 280px; border-radius: 50%; border: 2px solid var(--accent); padding: 8px; display: flex; align-items: center; justify-content: center; transition: 0.22s; }
.photo-frame:hover { transform: scale(1.03); }
.portrait-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; background-color: var(--bg-alt); }

/* Scroll Hint */
.hero-scroll-hint { 
  position: absolute; 
  bottom: 2.5rem; 
  left: 50%; 
  transform: translateX(-50%); 
  z-index: 1; 
}
.scroll-icon-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 40px; position: relative; }
.scroll-arrow { color: var(--fg-muted); animation: bounce 2s infinite; transition: opacity 0.3s; }
.scroll-line { width: 1px; height: 0; background: var(--accent); transition: height 0.4s ease; }
.scrolled .scroll-arrow { opacity: 0; }
.scrolled .scroll-line { height: 36px; }

@keyframes bounce { 0%, 20%, 50%, 80%, 100% { transform: translateY(0); } 40% { transform: translateY(-6px); } 60% { transform: translateY(-3px); } }

/* PROJECTS */
#projects { background: var(--bg-alt); }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1.5rem; }
.project-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.75rem; display: flex; flex-direction: column; gap: 1rem; transition: 0.22s; }
.project-card:hover { border-color: var(--accent); box-shadow: var(--shadow-card); transform: translateY(-4px); }
.tag { font-size: 0.68rem; padding: 2px 8px; border-radius: 100px; background: var(--accent-bg); color: var(--accent); }
.project-links { display: flex; gap: 0.6rem; }
.project-link { width: 28px; height: 28px; border: 1px solid var(--border); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; color: var(--fg-muted); transition: 0.22s; }
.project-link:hover { color: var(--accent); border-color: var(--accent); }
.project-placeholder { border-style: dashed; justify-content: center; min-height: 200px; }

/* SKILLS - ICON GRID */
.tech-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-top: 2rem; }
.tech-item { 
  background: var(--bg-card); 
  border: 1px solid var(--border); 
  border-radius: 100px; 
  padding: 0.6rem 1.2rem; 
  display: flex; 
  align-items: center; 
  gap: 0.6rem; 
  transition: transform 0.22s ease, border-color 0.22s ease; 
  flex: 0 1 auto; 
  cursor: default;
}

/* Zvětšení celé pilulky při najetí myší */
.tech-item:hover { 
  border-color: var(--accent); 
  transform: scale(1.05); 
}

/* 1. Stylování webových ikon přes masku */
.tech-icon {
  width: 24px;
  height: 24px;
  background-color: var(--accent); /* Trvale fialové */
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

/* 2. Stylování tvých inline SVG ikon */
.tech-svg-custom {
  width: 24px;
  height: 24px;
}
.tech-svg-custom .svg-bg {
  fill: var(--accent); /* Pozadí pilulky je trvale fialové */
}
.tech-svg-custom .svg-fg {
  fill: var(--bg-card); /* Barva samotného loga se vyřízne barvou pozadí */
}

.tech-item span { font-size: 0.85rem; font-weight: 500; color: var(--fg); }

/* ABOUT */
#about { background: var(--bg-alt); }
.about-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }

/* Terminal */
.terminal-widget { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--bg-card); }
.terminal-bar { border-bottom: 1px solid var(--border); padding: 10px 14px; display: flex; align-items: center; gap: 6px; background: var(--bg-alt); }
.terminal-dot { width: 12px; height: 12px; border-radius: 50%; }
.terminal-dot:nth-child(1) { background: #ff5f57; }
.terminal-dot:nth-child(2) { background: #febc2e; }
.terminal-dot:nth-child(3) { background: #28c840; }
.terminal-title { margin-left: auto; font-size: 0.75rem; color: var(--fg-muted); letter-spacing: 0.02em; }

.terminal-body { padding: 1.5rem; font-size: 0.85rem; }
.terminal-prompt { color: var(--accent); font-weight: bold; }
.terminal-entry { color: var(--fg-muted); margin: 4px 0; }
.about-text { display: flex; flex-direction: column; gap: 1.25rem; }
.about-meta { border-top: 1px solid var(--border); padding-top: 1rem; margin-top: 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.meta-item { font-size: 0.85rem; display: flex; gap: 1rem; }
.meta-label { color: var(--fg-muted); min-width: 80px; }
.status-open { color: var(--accent); }

/* FOOTER */
#footer { border-top: 1px solid var(--border); padding: 3rem 0; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.social-links { display: flex; gap: 1rem; justify-content: center; }
.social-links a { width: 40px; height: 40px; border: 1px solid var(--border); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; color: var(--fg-muted); transition: 0.22s; }
.social-links a:hover { color: var(--accent); border-color: var(--accent); }
.footer-copy { font-size: 0.75rem; color: var(--fg-muted); }

/* Responsive */
@media (max-width: 900px) {
  .hero-grid { 
    grid-template-columns: 1fr; 
    position: relative; 
  }
  .hero-text { 
    z-index: 2; 
    position: relative; 
  }
  
  .hero-action-row {
    justify-content: space-between;
  }
  .hero-scroll-hint {
    position: static;
    transform: none;
  }
  
  .hero-photo { 
    position: absolute; 
    inset: 0; 
    opacity: 0.08; 
    z-index: 0; 
    pointer-events: none; 
    display: block;
  }
  .photo-frame { 
    width: 100%; 
    height: 100%; 
    border: 0 !important; 
    padding: 0 !important; 
    border-radius: 0 !important;
    background: transparent;
    transform: none !important;
  }
  .portrait-img { 
    width: 100%;
    height: 100%;
    border-radius: 0; 
    object-fit: cover;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 90%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 90%);
  }
  
  .about-layout { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .nav-inner { justify-content: space-between; width: 100%; }
  .nav-brand { margin-right: auto; }
  .nav-links { position: fixed; top: var(--nav-h); left: 0; right: 0; background: var(--bg); flex-direction: column; display: none; padding: 2rem; border-bottom: 1px solid var(--border); }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; }
}