:root {
  --bg: #121212; --card: #1e1e1e; --text: #ededed; --muted: #a1a1aa;
  --accent: #60a5fa; --grid: rgba(255,255,255,0.03); --glass: rgba(30,30,30,0.8);
  --shadow: 0 10px 30px rgba(0,0,0,0.3); --success: #4ade80; --error: #f87171;
}

[data-theme="light"] {
  --bg: #f4f4f5; --card: #ffffff; --text: #18181b; --muted: #71717a;
  --accent: #2563eb; --grid: rgba(0,0,0,0.04); --glass: rgba(255,255,255,0.8);
  --shadow: 0 10px 30px rgba(0,0,0,0.05);
}

* { box-sizing: border-box; transition: all 0.3s ease; }
body { margin: 0; font-family: 'Plus Jakarta Sans', sans-serif; background: var(--bg); color: var(--text); overflow-x: hidden; }

/* Animations */
@keyframes fadeInUp { from {opacity:0;transform:translateY(20px);} to {opacity:1;transform:translateY(0);} }
@keyframes slideInRight { from {opacity:0;transform:translateX(30px);} to {opacity:1;transform:translateX(0);} }
@keyframes scaleIn { from {opacity:0;transform:scale(0.9);} to {opacity:1;transform:scale(1);} }
@keyframes move { from {transform:translate(0,0);} to {transform:translate(-50px,-50px);} }

.animate-fade-in-up { animation: fadeInUp 0.6s ease-out both; }
.animate-scale-in { animation: scaleIn 0.4s ease both; }
.stagger-child > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-child > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-child > *:nth-child(3) { animation-delay: 0.3s; }

/* Background */
.bg-elements { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.grid-move {
  position: absolute; width: 200%; height: 200%;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 50px 50px; animation: move 40s linear infinite;
}

/* Notification Center */
#notification-center {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  z-index: 9999; display: flex; flex-direction: column; gap: 10px; pointer-events: none;
  width: max-content;
}

.ios-notif {
  background: var(--text); color: var(--bg); padding: 12px 24px; border-radius: 50px;
  display: flex; align-items: center; gap: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  font-weight: 600; font-size: 14px; opacity: 0; transform: translateY(-20px) scale(0.9);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ios-notif.active { opacity: 1; transform: translateY(0) scale(1); }

/* Layout */
.container { max-width: 800px; margin: 0 auto; padding: 20px; }
header {
  position: sticky; top: 20px; z-index: 100; background: var(--glass);
  backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
  padding: 12px 20px; border-radius: 50px; display: flex; justify-content: space-between;
  box-shadow: var(--shadow); margin-bottom: 40px;
}

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; font-weight: 800; }
.brand img { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; }

nav { display: flex; gap: 5px; }
.nav-link {
  background: none; border: none; color: var(--muted); padding: 10px; border-radius: 50%;
  cursor: pointer; position: relative; display: flex;
}
.nav-link.active { color: var(--bg); background: var(--text); }
.nav-link svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; }

/* Components */
.pill { background: var(--card); padding: 5px 15px; border-radius: 20px; font-size: 13px; font-weight: 600; display: inline-block; margin: 3px; }
.social-links { display: flex; gap: 10px; flex-wrap: wrap; }
.social-link {
  background: var(--card); color: var(--text); padding: 10px 15px; border-radius: 12px;
  text-decoration: none; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px;
}

/* Timeline */
.timeline-item {
  display: flex; gap: 20px; margin-bottom: 20px; padding: 20px;
  background: var(--card); border-radius: 20px; opacity: 0; transform: translateX(-20px);
}
.timeline-item.animated { animation: slideInRight 0.5s forwards; }
.timeline-year { font-weight: 800; color: var(--accent); min-width: 50px; }

/* Cards */
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-top: 20px; }
.card {
  background: var(--card); border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 12px;
  box-shadow: var(--shadow); opacity: 0; transform: translateY(20px);
}
.card.animated { animation: fadeInUp 0.5s forwards; }
.card:hover { transform: translateY(-5px); }
.card-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.card-tag { font-size: 10px; background: rgba(125,125,125,0.1); padding: 3px 8px; border-radius: 6px; }

.card-actions { display: flex; gap: 10px; margin-top: auto; }
.card-btn {
  flex: 1; text-align: center; padding: 10px; border-radius: 10px; background: var(--bg);
  color: var(--text); text-decoration: none; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.card-btn.demo { background: var(--accent); color: white; }
.card-btn:hover { filter: brightness(1.1); }

/* Form & Direct Contact */
.contact-form { background: var(--card); padding: 25px; border-radius: 20px; }
input, textarea {
  width: 100%; padding: 15px; margin-bottom: 10px; border-radius: 12px;
  background: var(--bg); border: 2px solid transparent; color: var(--text); font-family: inherit;
}
input:focus, textarea:focus { outline: none; border-color: var(--accent); }

/* MAKE TEXTAREA VERTICAL-ONLY & WRAP */
textarea {
  resize: vertical;
  overflow-wrap: break-word;
  white-space: pre-wrap;
  word-break: break-word;
  max-width: 100%;
}

/* Buttons */
.btn {
  width: 100%; padding: 15px; border-radius: 12px; border: none; font-weight: 700;
  background: var(--text); color: var(--bg); cursor: pointer;
}
.btn:disabled { opacity: 0.5; cursor: wait; }

/* Direct Contact Grid */
.direct-contact-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 15px;
}
.direct-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: var(--card); padding: 20px; border-radius: 16px; text-decoration: none; color: var(--text);
  font-weight: 600; font-size: 13px; border: 1px solid transparent;
}
.direct-item:hover { border-color: var(--accent); transform: translateY(-3px); }
.direct-item svg { width: 24px; height: 24px; stroke: var(--accent); fill: none; stroke-width: 2; }

.shortcut-btn {
  transition: transform .15s ease, box-shadow .15s ease;
}
.shortcut-btn:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(0,0,0,0.12); }

@media (max-width: 600px) {
  .hero h1 { font-size: 32px; }
  .timeline-item { flex-direction: column; gap: 5px; }
}
