/* ─────────────────────────────────────────────────────────────
   Dušan Đuriš — Portfolio
   style.css
   ─────────────────────────────────────────────────────────────
   Palette:
     --bg:        #0D1117
     --bg-sec:    #161B22
     --accent:    #58A6FF   (blue)
     --highlight: #7C3AED   (violet)
     --text:      #E6EDF3
     --muted:     #8B949E
     --border:    #21262D
   ──────────────────────────────────────────────────────────── */

/* ── Reset & base ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:        #0D1117;
  --bg-sec:    #161B22;
  --bg-card:   #13181F;
  --accent:    #58A6FF;
  --highlight: #7C3AED;
  --text:      #E6EDF3;
  --muted:     #8B949E;
  --border:    #21262D;
  --border-hi: #30363D;
  --radius:    8px;
  --radius-lg: 14px;
  --shadow:    0 4px 24px rgba(0,0,0,.45);
  --glow-accent:    rgba(88,166,255,.18);
  --glow-highlight: rgba(124,58,237,.15);
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --nav-h: 64px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

ul { list-style: none; }

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

/* ── Utilities ────────────────────────────────────────────── */
.mono     { font-family: var(--font-mono); }
.accent   { color: var(--accent); }
.highlight { color: var(--highlight); }
.container {
  width: min(1100px, 100% - 3rem);
  margin-inline: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1.6rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  border: none;
  transition: transform .2s, box-shadow .2s, background .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: #0D1117;
  box-shadow: 0 0 18px var(--glow-accent);
}
.btn-primary:hover {
  background: #79bbff;
  box-shadow: 0 0 28px var(--glow-accent);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn-ghost:hover {
  background: var(--glow-accent);
}

.btn-full { width: 100%; justify-content: center; }

/* ── Navigation ───────────────────────────────────────────── */
.nav-wrapper {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.nav-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(13,17,23,.8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: background .3s;
}
.nav-wrapper.scrolled {
  border-color: var(--border);
}
.nav-wrapper.scrolled::before {
  background: rgba(13,17,23,.95);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: min(1100px, 100% - 3rem);
  margin-inline: auto;
}

.nav-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--radius);
  border: 1.5px solid var(--accent);
  transition: box-shadow .2s, background .2s;
}
.nav-logo:hover {
  background: var(--glow-accent);
  box-shadow: 0 0 14px var(--glow-accent);
}

.logo-initials {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: .85rem;
  color: var(--accent);
  letter-spacing: .03em;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-link {
  font-size: .9rem;
  font-weight: 500;
  color: var(--muted);
  position: relative;
  transition: color .2s;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s;
}
.nav-link:hover,
.nav-link.active {
  color: var(--text);
}
.nav-link.active::after,
.nav-link:hover::after {
  transform: scaleX(1);
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.nav-hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr min(480px, 44%);
  align-items: center;
  gap: 3rem;
  padding: calc(var(--nav-h) + 4rem) 0 5rem;
  width: min(1100px, 100% - 3rem);
  margin-inline: auto;
  overflow: visible;
}

/* Grid background */
.hero-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(88,166,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88,166,255,.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: -2;
}

/* Floating code blobs */
.hero-code-blobs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}
.code-blob {
  position: absolute;
  font-family: var(--font-mono);
  font-size: .7rem;
  color: rgba(88,166,255,.12);
  white-space: nowrap;
  animation: floatBlob linear infinite;
  user-select: none;
}

@keyframes floatBlob {
  0%   { transform: translateY(0) rotate(var(--rot, 0deg)); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(-120vh) rotate(var(--rot, 0deg)); opacity: 0; }
}

/* Glow orbs */
.glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: -1;
}
.glow-1 {
  width: 500px; height: 500px;
  background: var(--glow-highlight);
  top: -100px; left: -150px;
}
.glow-2 {
  width: 400px; height: 400px;
  background: var(--glow-accent);
  bottom: 10%; right: -100px;
}

/* Hero content */
.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  z-index: 1;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .78rem;
  color: var(--muted);
}
.hero-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #3fb950;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(63,185,80,.5); }
  50%       { box-shadow: 0 0 0 6px rgba(63,185,80,0); }
}

.hero-title {
  font-size: clamp(2.4rem, 5.5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -.03em;
  color: var(--text);
}
.hero-name {
  display: block;
  background: linear-gradient(135deg, var(--accent) 0%, var(--highlight) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 500;
  color: var(--muted);
  line-height: 1.5;
}

.hero-desc {
  font-size: .98rem;
  color: var(--muted);
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: .25rem;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .82rem;
  color: var(--muted);
  margin-top: .5rem;
}
.hero-divider {
  width: 1px; height: 14px;
  background: var(--border-hi);
}
.hero-location { display: flex; align-items: center; gap: .4rem; }
.hero-gh {
  display: flex; align-items: center; gap: .4rem;
  color: var(--muted);
  transition: color .2s;
}
.hero-gh:hover { color: var(--accent); }

.br-desktop { display: inline; }

/* Terminal widget */
.hero-terminal {
  background: var(--bg-sec);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow), 0 0 40px rgba(88,166,255,.06);
  z-index: 1;
  align-self: center;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .6rem 1rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
.t-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
}
.t-red    { background: #FF5F56; }
.t-yellow { background: #FFBD2E; }
.t-green  { background: #27C93F; }
.t-title {
  margin-left: .5rem;
  font-size: .72rem;
  color: var(--muted);
}

.terminal-body {
  padding: 1.25rem;
  font-size: .78rem;
  line-height: 1.9;
  min-height: 220px;
  color: #e6edf3;
}
.terminal-body .t-prompt { color: var(--accent); }
.terminal-body .t-output { color: var(--muted); }
.terminal-body .t-green  { color: #3fb950; }
.terminal-body .t-violet { color: #bc8cff; }
.terminal-body .t-cursor {
  display: inline-block;
  width: 8px; height: 1em;
  background: var(--accent);
  vertical-align: text-bottom;
  animation: blink .9s step-end infinite;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

/* ── Section base ─────────────────────────────────────────── */
.section {
  padding: 6rem 0;
}
.section-alt {
  background: var(--bg-sec);
}

.section-head {
  margin-bottom: 3.5rem;
}
.section-tag {
  display: block;
  font-size: .75rem;
  color: var(--accent);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: .6rem;
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -.025em;
  color: var(--text);
}
.section-sub {
  margin-top: .75rem;
  color: var(--muted);
  font-size: 1rem;
}

/* ── About ────────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-lead {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 1rem;
}
.about-body {
  color: var(--muted);
  font-size: .96rem;
  line-height: 1.8;
}

.about-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.stat { text-align: center; }
.stat-num {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.stat-label {
  display: block;
  font-size: .75rem;
  color: var(--muted);
  margin-top: .25rem;
}

.skills-heading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.skill-group {
  margin-bottom: 1.5rem;
}
.skill-group-label {
  display: block;
  font-size: .7rem;
  color: var(--muted);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: .6rem;
}
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.skill-tag {
  display: inline-block;
  padding: .25rem .7rem;
  border-radius: 4px;
  background: rgba(33,38,45,.9);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: .78rem;
  font-weight: 500;
  transition: border-color .2s, color .2s, background .2s;
}
.skill-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(88,166,255,.08);
}
.accent-tag {
  border-color: rgba(124,58,237,.4);
  color: #bc8cff;
  background: rgba(124,58,237,.08);
}
.accent-tag:hover {
  border-color: var(--highlight);
  color: #d8b4fe;
  background: rgba(124,58,237,.15);
}

/* ── Projects ─────────────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color .25s, transform .25s, box-shadow .25s;
  position: relative;
  overflow: hidden;
}
.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--glow-accent), transparent 60%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(0,0,0,.4), 0 0 20px var(--glow-accent);
}
.project-card:hover::before {
  opacity: 1;
}

.project-featured {
  grid-column: span 2;
  background: linear-gradient(135deg, rgba(124,58,237,.08), var(--bg-card) 50%);
  border-color: rgba(124,58,237,.35);
}
.project-featured:hover {
  border-color: var(--highlight);
  box-shadow: 0 12px 36px rgba(0,0,0,.4), 0 0 24px var(--glow-highlight);
}
.project-featured::before {
  background: linear-gradient(135deg, var(--glow-highlight), transparent 60%);
}

.project-card-inner {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: .9rem;
  height: 100%;
}

.project-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.project-icon {
  width: 42px; height: 42px;
  border-radius: var(--radius);
  background: rgba(88,166,255,.1);
  border: 1px solid rgba(88,166,255,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--accent);
}
.project-featured .project-icon {
  background: rgba(124,58,237,.15);
  border-color: rgba(124,58,237,.3);
  color: #bc8cff;
}

.project-badges {
  display: flex;
  gap: .4rem;
}
.badge {
  padding: .18rem .55rem;
  border-radius: 4px;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.badge-featured { background: rgba(124,58,237,.2); color: #bc8cff; }
.badge-ai       { background: rgba(88,166,255,.12); color: var(--accent); }
.badge-fullstack { background: rgba(63,185,80,.12); color: #3fb950; }
.badge-web      { background: rgba(255,166,0,.1);  color: #f0a500; }

.project-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.01em;
}

.project-desc {
  font-size: .88rem;
  color: var(--muted);
  line-height: 1.7;
  flex: 1;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}
.tech-tag {
  padding: .2rem .55rem;
  border-radius: 4px;
  background: rgba(33,38,45,.9);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: .72rem;
  font-family: var(--font-mono);
  font-weight: 500;
}

.project-footer {
  padding-top: .75rem;
  border-top: 1px solid var(--border);
}
.project-link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .83rem;
  color: var(--muted);
  font-weight: 500;
  transition: color .2s;
}
.project-link:hover { color: var(--accent); }

.projects-cta {
  margin-top: 2.5rem;
  display: flex;
  justify-content: center;
}

/* ── Contact ──────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: start;
}

.contact-intro {
  color: var(--muted);
  font-size: .98rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.contact-link {
  display: flex;
  align-items: center;
  gap: .9rem;
  font-size: .9rem;
  color: var(--muted);
  padding: .75rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: border-color .2s, color .2s, background .2s;
}
.contact-link i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
  color: var(--accent);
}
.contact-link:hover {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(88,166,255,.06);
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.form-label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.form-input {
  background: var(--bg-sec);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .75rem 1rem;
  color: var(--text);
  font-family: var(--font-body);
  font-size: .95rem;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  width: 100%;
}
.form-input::placeholder { color: var(--muted); opacity: .6; }
.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(88,166,255,.12);
}
.form-textarea { resize: vertical; min-height: 130px; }

.form-status {
  font-size: .85rem;
  padding: .6rem 1rem;
  border-radius: var(--radius);
  display: none;
}
.form-status.success {
  display: block;
  background: rgba(63,185,80,.1);
  border: 1px solid rgba(63,185,80,.3);
  color: #3fb950;
}
.form-status.error {
  display: block;
  background: rgba(248,81,73,.1);
  border: 1px solid rgba(248,81,73,.3);
  color: #f85149;
}

/* ── Footer ───────────────────────────────────────────────── */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 3.5rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.footer-tagline {
  font-size: .85rem;
  color: var(--muted);
  line-height: 1.6;
}

.footer-nav-head {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 1rem;
}
.footer-nav ul {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.footer-nav a {
  font-size: .85rem;
  color: var(--muted);
  transition: color .2s;
}
.footer-nav a:hover { color: var(--accent); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: .5rem;
}
.footer-copy,
.footer-made {
  font-size: .75rem;
  color: var(--muted);
}

/* ── Scroll-reveal animations ─────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: calc(var(--nav-h) + 3rem);
  }
  .hero-terminal { max-width: 520px; }
  .br-desktop { display: none; }

  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }

  .project-featured { grid-column: span 1; }

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

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .footer-brand { grid-column: span 2; }
}

@media (max-width: 640px) {
  .nav-links {
    position: fixed;
    inset: var(--nav-h) 0 0 0;
    z-index: 99;
    background: rgba(13,17,23,.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    transform: translateX(100%);
    transition: transform .3s ease;
  }
  .nav-links.open { transform: none; }
  .nav-link { font-size: 1.2rem; }
  .nav-hamburger { display: flex; }

  .hero-actions { flex-direction: column; align-items: flex-start; }
  .hero-actions .btn { width: auto; }

  .projects-grid { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: span 1; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: .5rem; }

  .about-stats { gap: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  .hero-grid, .hero-code-blobs, .glow { display: none; }
}

/* ── Experience section ──────────────────────────────────────── */
.experience-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.experience-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: border-color .25s ease, transform .25s ease;
}

.experience-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.experience-card-inner {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.75rem;
}

.experience-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(63,185,80,.12);
  color: #3fb950;
  font-size: 1.25rem;
}

.experience-body {
  flex: 1;
  min-width: 0;
}

.experience-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .5rem;
}

.experience-role {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.experience-period {
  font-size: .8rem;
  color: var(--accent);
  white-space: nowrap;
}

.experience-desc {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}

@media (max-width: 640px) {
  .experience-card-inner { flex-direction: column; gap: 1rem; }
  .experience-top { flex-direction: column; align-items: flex-start; }
}
