/* ===========================
   EMR Digital — style.css
   =========================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0a0c10;
  --bg-2:      #0f1117;
  --bg-3:      #161b22;
  --border:    rgba(255,255,255,0.07);
  --accent:    #00d4ff;
  --accent-2:  #7c3aed;
  --green:     #22c55e;
  --red:       #ef4444;
  --text:      #e2e8f0;
  --text-muted:#64748b;
  --font:      'Inter', system-ui, sans-serif;
  --mono:      'JetBrains Mono', monospace;
  --radius:    12px;
  --radius-lg: 20px;
  --shadow:    0 4px 32px rgba(0,0,0,0.4);
}

html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.6; overflow-x: hidden; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--mono); }

.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* ---- BUTTONS ---- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 28px; border-radius: 8px; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; border: none; transition: all 0.2s ease; letter-spacing: 0.02em; }
.btn--primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }
.btn--primary:hover { opacity: 0.88; transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--outline { background: transparent; color: var(--accent); border: 1px solid var(--accent); font-size: 13px; padding: 8px 20px; }
.btn--outline:hover { background: var(--accent); color: #000; }
.btn--sm { padding: 8px 18px; font-size: 13px; }
.btn--full { width: 100%; justify-content: center; }

/* ===========================
   NAV
   =========================== */
.nav-wrapper { position: fixed; top: 0; left: 0; right: 0; z-index: 100; background: rgba(10,12,16,0.88); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.nav { display: flex; align-items: center; height: 64px; gap: 16px; }

.nav__logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.nav__logo-img { height: 32px; width: auto; border-radius: 6px; object-fit: contain; }
.nav__logo-text { font-family: var(--mono); font-size: 18px; font-weight: 700; color: var(--text); letter-spacing: -0.02em; }
.nav__logo-text span { color: var(--accent); }

.nav__links { display: flex; align-items: center; gap: 28px; list-style: none; margin-left: auto; }
.nav__links a { color: var(--text-muted); text-decoration: none; font-size: 14px; font-weight: 500; transition: color 0.2s; }
.nav__links a:hover { color: var(--text); }
.nav__links .btn--outline { color: var(--accent); }

.lang-toggle { display: flex; align-items: center; gap: 4px; background: var(--bg-3); border: 1px solid var(--border); border-radius: 100px; padding: 4px 10px; cursor: pointer; flex-shrink: 0; user-select: none; }
.lang-opt { font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--text-muted); padding: 2px 6px; border-radius: 100px; transition: all 0.2s; cursor: pointer; letter-spacing: 0.05em; }
.lang-opt:hover { color: var(--text); }
.lang-opt--active { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff !important; }
.lang-sep { font-family: var(--mono); font-size: 11px; color: var(--border); }

.nav__burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; flex-shrink: 0; }
.nav__burger span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: all 0.3s; }

/* ===========================
   HERO
   =========================== */
.hero { min-height: 100vh; display: flex; align-items: center; position: relative; overflow: hidden; padding-top: 64px; }
.hero__bg { position: absolute; inset: 0; background: radial-gradient(ellipse 60% 50% at 70% 40%, rgba(0,212,255,0.08) 0%, transparent 70%), radial-gradient(ellipse 40% 60% at 20% 70%, rgba(124,58,237,0.07) 0%, transparent 70%); pointer-events: none; }
.hero::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px); background-size: 60px 60px; pointer-events: none; }
.hero__content { position: relative; z-index: 1; padding: 80px 24px; }
.hero__badge { display: inline-block; font-size: 12px; color: var(--accent); border: 1px solid rgba(0,212,255,0.3); background: rgba(0,212,255,0.06); padding: 6px 14px; border-radius: 100px; margin-bottom: 28px; letter-spacing: 0.04em; }
.hero__title { font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.03em; margin-bottom: 24px; }
.hero__sub { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 40px; max-width: 480px; line-height: 1.7; }
.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero__scroll-hint { position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--text-muted); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.hero__scroll-line { width: 1px; height: 40px; background: linear-gradient(to bottom, var(--text-muted), transparent); animation: scrollLine 1.6s ease-in-out infinite; }
@keyframes scrollLine { 0%,100%{opacity:0.3} 50%{opacity:1} }

/* ===========================
   SECTIONS
   =========================== */
.section { padding: 100px 0; }
.section__label { font-size: 12px; color: var(--accent); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 16px; }
.section__title { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; letter-spacing: -0.025em; line-height: 1.2; margin-bottom: 48px; }

/* ===========================
   ABOUT
   =========================== */
.about { background: var(--bg-2); }
.about__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.about__text p { color: var(--text-muted); font-size: 1.05rem; line-height: 1.8; margin-bottom: 40px; }
.about__stats { display: flex; gap: 40px; flex-wrap: wrap; }
.stat__num { display: block; font-size: 2rem; font-weight: 700; background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; line-height: 1; margin-bottom: 6px; }
.stat__label { font-size: 12px; color: var(--text-muted); font-weight: 500; }

/* Terminal */
.terminal { background: #0d1117; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow), 0 0 60px rgba(0,212,255,0.05); }
.terminal__bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: var(--bg-3); border-bottom: 1px solid var(--border); }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot--red{background:#ff5f57} .dot--yellow{background:#febc2e} .dot--green{background:#28c840}
.terminal__title { font-size: 12px; color: var(--text-muted); margin-left: auto; }
.terminal__body { padding: 20px 20px 24px; font-size: 13px; line-height: 2; }
.terminal__line { display: flex; gap: 8px; flex-wrap: wrap; }
.t-prompt{color:var(--accent);user-select:none} .t-cmd{color:#c9d1d9} .t-out{color:var(--text-muted);padding-left:16px} .t-green{color:var(--green)}
.t-cursor { display: inline-block; color: var(--accent); animation: blink 1s step-end infinite; }
@keyframes blink{0%,100%{opacity:1}50%{opacity:0}}

/* ===========================
   SERVICES
   =========================== */
.services { background: var(--bg); }
.services__grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 24px; }
.card--service { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s; }
.card--service:hover { border-color: rgba(0,212,255,0.3); transform: translateY(-4px); box-shadow: 0 16px 48px rgba(0,0,0,0.3); }
.card--featured { border-color: rgba(0,212,255,0.2); background: linear-gradient(135deg,rgba(0,212,255,0.04) 0%,rgba(124,58,237,0.04) 100%); }
.card--storage { grid-column: 1/-1; display: flex; align-items: flex-start; gap: 40px; border-color: rgba(34,197,94,0.2); background: linear-gradient(135deg,rgba(34,197,94,0.04) 0%,transparent 60%); }
.card--storage:hover { border-color: rgba(34,197,94,0.4); }
.card--storage__body { flex: 1; }
.card--storage__badges { display: flex; flex-direction: column; gap: 12px; flex-shrink: 0; padding-top: 4px; }
.storage-badge { display: flex; align-items: center; gap: 10px; background: var(--bg-3); border: 1px solid var(--border); border-radius: 8px; padding: 10px 16px; font-size: 13px; font-weight: 500; white-space: nowrap; color: var(--green); }
.card__icon { width: 48px; height: 48px; background: linear-gradient(135deg,rgba(0,212,255,0.15),rgba(124,58,237,0.15)); border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; color: var(--accent); font-size: 20px; flex-shrink: 0; }
.card__icon--storage { background: linear-gradient(135deg,rgba(34,197,94,0.15),rgba(16,185,129,0.1)); color: var(--green); margin-bottom: 0; }
.card--service h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 12px; letter-spacing: -0.01em; }
.card--service p { color: var(--text-muted); font-size: 0.92rem; line-height: 1.7; margin-bottom: 20px; }
.card__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { font-family: var(--mono); font-size: 11px; color: var(--accent); background: rgba(0,212,255,0.08); border: 1px solid rgba(0,212,255,0.2); padding: 3px 10px; border-radius: 100px; }
.card--storage .tag { color: var(--green); background: rgba(34,197,94,0.08); border-color: rgba(34,197,94,0.2); }

/* ===========================
   TECH STACK
   =========================== */
.stack { background: var(--bg-2); }
.stack__grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 40px; }
.stack__cat-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.stack__items { display: flex; flex-direction: column; gap: 12px; }
.stack__item { display: flex; align-items: center; gap: 14px; background: var(--bg-3); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; font-size: 14px; font-weight: 500; transition: border-color 0.2s, background 0.2s; }
.stack__item:hover { border-color: rgba(0,212,255,0.25); background: rgba(0,212,255,0.04); }
.stack__item-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 15px; color: #fff; }

/* ===========================
   PROJECTS
   =========================== */
.projects { background: var(--bg); }
.projects__filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 40px; }
.filter-btn { font-family: var(--mono); font-size: 12px; font-weight: 500; padding: 7px 16px; border-radius: 100px; border: 1px solid var(--border); background: var(--bg-2); color: var(--text-muted); cursor: pointer; transition: all 0.2s; letter-spacing: 0.04em; }
.filter-btn:hover { border-color: rgba(0,212,255,0.3); color: var(--text); }
.filter-btn--active { background: linear-gradient(135deg,var(--accent),var(--accent-2)); border-color: transparent; color: #fff; }
.projects__grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }

/* Project card */
.project-card { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; transition: transform 0.2s, box-shadow 0.2s; display: flex; flex-direction: column; }
.project-card:hover { transform: translateY(-4px); box-shadow: 0 20px 56px rgba(0,0,0,0.4); }
.project-card.hidden { display: none; }
.project-card__thumb { height: 180px; position: relative; overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.project-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.project-card__thumb::before { content:''; position:absolute; inset:0; background-image:linear-gradient(rgba(255,255,255,0.04) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,0.04) 1px,transparent 1px); background-size:30px 30px; }
.project-card__thumb-icon { font-size: 36px; opacity: 0.35; position: relative; z-index: 1; }
.project-card__badge { position: absolute; bottom: 12px; left: 14px; z-index: 2; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; background: rgba(0,0,0,0.55); backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,0.1); padding: 3px 10px; border-radius: 100px; }
.project-card__body { padding: 20px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.project-card__body h3 { font-size: 1rem; font-weight: 600; margin-bottom: 8px; letter-spacing: -0.01em; }
.project-card__excerpt { color: var(--text-muted); font-size: 0.87rem; line-height: 1.65; margin-bottom: 16px; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.project-card__footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: auto; }
.project-card__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.projects__empty { text-align: center; padding: 80px 24px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.projects__empty i { font-size: 48px; color: var(--text-muted); opacity: 0.4; }
.projects__empty p { color: var(--text-muted); }

/* ===========================
   MODAL
   =========================== */
.modal-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,0.78); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; pointer-events: none; transition: opacity 0.25s; }
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-lg); width: 100%; max-width: 720px; max-height: 90vh; overflow-y: auto; position: relative; transform: translateY(20px); transition: transform 0.25s; box-shadow: 0 32px 80px rgba(0,0,0,0.6); }
.modal-overlay.open .modal { transform: translateY(0); }
.modal__close { position: absolute; top: 16px; right: 16px; z-index: 10; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); background: var(--bg-3); color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 16px; transition: all 0.2s; }
.modal__close:hover { background: var(--red); color: #fff; border-color: transparent; }
.modal__media { height: 320px; overflow: hidden; border-radius: var(--radius-lg) var(--radius-lg) 0 0; position: relative; display: flex; align-items: center; justify-content: center; }
.modal__media img { width: 100%; height: 100%; object-fit: cover; }
.modal__media iframe { width: 100%; height: 100%; border: none; }
.modal__media-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.modal__media-placeholder i { font-size: 56px; opacity: 0.3; }
.modal__body { padding: 28px 32px 36px; }
.modal__meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.modal__category-badge { font-family: var(--mono); font-size: 11px; padding: 4px 12px; border-radius: 100px; font-weight: 600; letter-spacing: 0.06em; }
.modal__tags-row { display: flex; flex-wrap: wrap; gap: 6px; }
.modal__title { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 14px; }
.modal__desc { color: var(--text-muted); font-size: 0.97rem; line-height: 1.8; margin-bottom: 24px; }

/* ===========================
   CONTACT
   =========================== */
.contact { background: var(--bg-2); }
.contact__sub { color: var(--text-muted); font-size: 1rem; margin-top: -32px; margin-bottom: 48px; }
.contact__form { max-width: 680px; display: flex; flex-direction: column; gap: 20px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form__group { display: flex; flex-direction: column; gap: 8px; }
.form__group label { font-size: 13px; font-weight: 500; color: var(--text-muted); }
.form__group input, .form__group select, .form__group textarea { background: var(--bg-3); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-family: var(--font); font-size: 14px; padding: 12px 16px; outline: none; transition: border-color 0.2s; resize: none; }
.form__group input::placeholder, .form__group textarea::placeholder { color: var(--text-muted); }
.form__group input:focus, .form__group select:focus, .form__group textarea:focus { border-color: var(--accent); }
.form__group select { cursor: pointer; }
.form__group select option { background: var(--bg-3); }

/* ===========================
   FOOTER — 3-column redesign
   =========================== */
.footer { background: var(--bg); border-top: 1px solid var(--border); padding: 56px 0 24px; }

.footer__grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 48px;
  align-items: center;
  padding-bottom: 40px;
}

/* Brand column */
.footer__brand { display: flex; flex-direction: column; gap: 10px; }
.footer__logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.footer__logo-img { height: 34px; width: auto; border-radius: 6px; object-fit: contain; }
.footer__logo-text { font-family: var(--mono); font-size: 19px; font-weight: 700; color: var(--text); letter-spacing: -0.02em; }
.footer__logo-text span { color: var(--accent); }
.footer__tagline { font-size: 12px; color: var(--text-muted); line-height: 1.6; max-width: 260px; }
.footer__contact-info { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.footer__contact-info a { font-size: 12px; color: var(--text-muted); text-decoration: none; transition: color 0.2s; font-family: var(--mono); }
.footer__contact-info a:hover { color: var(--accent); }

/* Social center column */
.footer__social { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; }
.social-link { width: 42px; height: 42px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 17px; text-decoration: none; transition: all 0.2s; }
.social-link:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,212,255,0.15); }
.footer__social--empty { color: var(--text-muted); font-size: 12px; font-family: var(--mono); opacity: 0.4; text-align: center; }

/* Right column */
.footer__right { text-align: right; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.footer__copy { font-size: 12px; color: var(--text-muted); font-family: var(--mono); }
.footer__tech { font-size: 11px; color: var(--text-muted); opacity: 0.45; letter-spacing: 0.06em; }

/* Bottom bar */
.footer__divider { height: 1px; background: var(--border); margin: 0 0 20px; }
.footer__bottom { display: flex; justify-content: center; }
.footer__bottom-text { font-size: 11px; color: var(--text-muted); opacity: 0.4; letter-spacing: 0.06em; }

/* ===========================
   MOBILE NAV
   =========================== */
.nav__links.open { display: flex; flex-direction: column; position: fixed; top: 64px; left: 0; right: 0; background: rgba(10,12,16,0.97); backdrop-filter: blur(16px); padding: 32px 24px; border-bottom: 1px solid var(--border); gap: 24px; z-index: 99; }

/* ===========================
   SCROLL REVEAL
   =========================== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 1024px) {
  .stack__grid { grid-template-columns: repeat(2,1fr); }
  .projects__grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 900px) {
  .about__grid { grid-template-columns: 1fr; gap: 48px; }
  .services__grid { grid-template-columns: 1fr; }
  .card--storage { flex-direction: column; gap: 24px; }
  .card--storage__badges { flex-direction: row; flex-wrap: wrap; }
  .footer__grid { grid-template-columns: 1fr; gap: 36px; text-align: center; }
  .footer__brand { align-items: center; }
  .footer__tagline { text-align: center; }
  .footer__contact-info { align-items: center; }
  .footer__right { align-items: center; text-align: center; }
}
@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .hero__title { font-size: 2.2rem; }
  .about__stats { flex-wrap: wrap; gap: 24px; }
  .form__row { grid-template-columns: 1fr; }
  .section { padding: 72px 0; }
  .stack__grid { grid-template-columns: 1fr; }
  .projects__grid { grid-template-columns: 1fr; }
  .modal__body { padding: 20px 20px 28px; }
  .modal__media { height: 220px; }
}
