/* =============================================
   RESET & ROOT
   ============================================= */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg:          #09090f;
  --bg-2:        #0f0f1a;
  --bg-card:     #13131f;
  --border:      rgba(255,255,255,0.07);
  --border-hl:   rgba(59,130,246,0.35);
  --accent:      #3b82f6;
  --accent-dim:  rgba(59,130,246,0.15);
  --accent-2:    #818cf8;
  --text:        #e8eaf0;
  --text-muted:  #6b7280;
  --text-dim:    #3d4451;
  --font-head:   'Syne', sans-serif;
  --font-body:   'DM Sans', sans-serif;
  --radius:      14px;
  --ease:        cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

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

/* =============================================
   CUSTOM CURSOR — desktop only
   ============================================= */
@media (hover: hover) and (pointer: fine) {
  body { cursor: none; }

  .cursor {
    position: fixed;
    width: 8px; height: 8px;
    background: var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s;
  }

  .cursor-follower {
    position: fixed;
    width: 32px; height: 32px;
    border: 1.5px solid rgba(59,130,246,0.4);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: transform 0.25s var(--ease);
  }
}

/* =============================================
   BACKGROUND GRID
   ============================================= */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* =============================================
   CONTAINER
   ============================================= */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 1.25rem;
  position: relative;
  z-index: 1;
}

@media (min-width: 640px)  { .container { padding: 0 1.75rem; } }
@media (min-width: 1024px) { .container { padding: 0 2rem; } }

/* =============================================
   HEADER
   ============================================= */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1rem 0;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}

header.scrolled {
  background: rgba(9,9,15,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-color: var(--border);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
}

.logo {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.logo-bracket { color: var(--accent); }

/* Desktop nav */
.nav-links {
  display: none;
  list-style: none;
  gap: 0.25rem;
}

@media (min-width: 768px) {
  .nav-links { display: flex; }
}

/* Mobile dropdown */
.nav-links.open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: calc(100% + 0.75rem);
  left: 0; right: 0;
  background: rgba(9,9,15,0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.5rem;
  gap: 0;
}

.nav-links a {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  transition: color 0.3s, background 0.3s;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(255,255,255,0.05);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.lang-selector {
  display: flex;
  gap: 0.15rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.18rem;
}

.lang-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.28rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.25s;
  letter-spacing: 0.05em;
}

.lang-btn:hover  { color: var(--text); }
.lang-btn.active { background: var(--accent); color: #09090f; }

.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}

.menu-toggle span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

@media (min-width: 768px) { .menu-toggle { display: none; } }

/* =============================================
   PAGE LOAD ANIMATIONS
   ============================================= */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-up {
  opacity: 0;
  animation: fadeUp 0.65s var(--ease) forwards;
  animation-delay: var(--delay, 0s);
}

/* =============================================
   HERO
   ============================================= */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 5.5rem 0 3rem;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 30%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(700px, 100%);
  height: 400px;
  background: radial-gradient(ellipse, rgba(59,130,246,0.07) 0%, transparent 65%);
  pointer-events: none;
}

/* Mobile: stacked */
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2.5rem;
  width: 100%;
}

/* Desktop: side by side */
@media (min-width: 860px) {
  .hero-content {
    display: grid;
    grid-template-columns: auto 1fr;
    text-align: left;
    gap: 4rem;
    align-items: center;
  }
}

/* ---- Photo ---- */
.hero-photo-wrap {
  position: relative;
  flex-shrink: 0;
}

.photo-ring {
  position: absolute;
  inset: -9px;
  border-radius: 20px;
  background: conic-gradient(from 0deg, var(--accent), transparent 40%, var(--accent-2), transparent 80%, var(--accent));
  animation: ring-spin 8s linear infinite;
  opacity: 0.5;
}

@keyframes ring-spin { to { transform: rotate(360deg); } }

.profile-photo {
  position: relative;
  width: 190px; height: 230px;
  border-radius: 15px;
  overflow: hidden;
  background: var(--bg-card);
  z-index: 1;
}

@media (min-width: 480px)  { .profile-photo { width: 220px; height: 265px; } }
@media (min-width: 860px)  {
  .profile-photo { width: 265px; height: 325px; }
  .photo-ring    { inset: -12px; border-radius: 22px; }
}

.profile-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top;
  transition: filter 0.3s;
}

.photo-tag {
  position: absolute;
  bottom: -13px;
  left: 50%; transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.32rem 0.85rem;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  z-index: 2;
}

.status-dot {
  color: green;
  font-size: 0.42rem;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

/* ---- Text ---- */
.hero-text {
  display: flex;
  flex-direction: column;
  align-items: center;
}

@media (min-width: 860px) { .hero-text { align-items: flex-start; } }

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

.eyebrow-line {
  display: block;
  width: 28px; height: 1px;
  background: var(--accent);
  flex-shrink: 0;
}

.hero-name {
  font-family: var(--font-head);
  font-size: clamp(1.85rem, 7vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 1rem;
}

.hero-name em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: clamp(0.875rem, 2.5vw, 1rem);
  color: var(--text-muted);
  max-width: 480px;
  line-height: 1.8;
  margin-bottom: 1.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 1.75rem;
  width: 100%;
}

@media (min-width: 860px) { .hero-actions { justify-content: flex-start; } }
@media (max-width: 380px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: #09090f;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  border-radius: 10px;
  transition: all 0.3s var(--ease);
  white-space: nowrap;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(59,130,246,0.35);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.88rem;
  text-decoration: none;
  border-radius: 10px;
  border: 1px solid var(--border);
  transition: all 0.3s var(--ease);
  white-space: nowrap;
}

.btn-ghost:hover {
  border-color: rgba(255,255,255,0.2);
  color: var(--text);
  background: rgba(255,255,255,0.04);
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

@media (min-width: 860px) { .social-links { justify-content: flex-start; } }

.social-link {
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s var(--ease);
}

.social-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-3px);
}

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 1.25rem; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  opacity: 0.3;
  pointer-events: none;
  animation: bob 2.5s ease-in-out infinite;
}

@media (max-width: 480px) { .scroll-hint { display: none; } }

.scroll-hint span {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-muted);
}

.scroll-line {
  width: 1px; height: 32px;
  background: linear-gradient(to bottom, var(--text-muted), transparent);
}

@keyframes bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* =============================================
   SECTIONS
   ============================================= */
.section {
  padding: 4rem 0;
  position: relative;
}

@media (min-width: 640px)  { .section { padding: 5.5rem 0; } }
@media (min-width: 1024px) { .section { padding: 7rem 0; } }

.section-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 640px) { .section-header { margin-bottom: 3.5rem; } }

.section-num {
  font-family: var(--font-head);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.15em;
  flex-shrink: 0;
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.55rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* =============================================
   ABOUT
   ============================================= */
.about-section { background: var(--bg-2); }

.about-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 50%, rgba(59,130,246,0.05) 0%, transparent 60%);
  pointer-events: none;
}

.about-grid {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

@media (min-width: 768px) {
  .about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
  }
}

.about-text p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.9;
}

.skills-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.skill-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.3s var(--ease);
}

.skill-item:hover {
  border-color: var(--border-hl);
  transform: translateX(4px);
}

.skill-icon {
  width: 40px; height: 40px;
  background: var(--accent-dim);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 0.95rem;
  flex-shrink: 0;
}

.skill-info h4 {
  font-family: var(--font-head);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.12rem;
}

.skill-info p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* =============================================
   PROJECTS
   ============================================= */
.projects-section { background: var(--bg); }

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}

@media (min-width: 560px)  { .projects-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .projects-grid { grid-template-columns: repeat(3, 1fr); } }

.project-card {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 1.35rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  opacity: 0;
  transform: translateY(26px);
  position: relative;
  overflow: hidden;
}

@media (min-width: 640px) { .project-card { padding: 1.75rem; } }

.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(59,130,246,0.05) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.35s;
}

.project-card.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease),
              border-color 0.3s, box-shadow 0.3s;
}

.project-card:hover {
  border-color: var(--border-hl);
  transform: translateY(-5px) !important;
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}

.project-card:hover::before { opacity: 1; }

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-icon {
  width: 44px; height: 44px;
  background: var(--accent-dim);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1rem;
}

.card-arrow {
  color: var(--text-dim);
  font-size: 0.78rem;
  transition: color 0.3s, transform 0.3s;
}

.project-card:hover .card-arrow {
  color: var(--accent);
  transform: translate(3px, -3px);
}

.project-card h3 {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.project-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.7;
  flex-grow: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
}

.project-tags span {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.26rem 0.65rem;
  border-radius: 100px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
  text-transform: uppercase;
}

/* =============================================
   CONTACT
   ============================================= */
.contact-section { background: var(--bg-2); }

.contact-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 20% 80%, rgba(59,130,246,0.05) 0%, transparent 60%);
  pointer-events: none;
}

.contact-grid {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

@media (min-width: 768px) {
  .contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 4rem;
    align-items: start;
  }
}

.contact-tagline {
  font-family: var(--font-head);
  font-size: clamp(1.25rem, 3.5vw, 1.75rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 0.65rem;
}

.contact-sub {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.contact-decoration {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.75rem;
}

.deco-line {
  width: 36px; height: 1.5px;
  background: var(--accent);
  opacity: 0.5;
}

.deco-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.3;
}

.deco-dot:first-of-type { opacity: 0.7; }

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

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 480px) {
  .form-row { grid-template-columns: 1fr 1fr; }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea {
  padding: 0.8rem 0.95rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: border-color 0.3s;
  outline: none;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}

.form-group input:focus,
.form-group textarea:focus { border-color: var(--border-hl); }

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-dim); }

.form-group textarea {
  min-height: 130px;
  resize: vertical;
}

.submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.88rem 2rem;
  background: var(--accent);
  color: #09090f;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s var(--ease);
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(59,130,246,0.35);
  filter: brightness(1.05);
}

.submit-btn:disabled { opacity: 0.6; pointer-events: none; }

/* =============================================
   FOOTER
   ============================================= */
footer {
  padding: 1.75rem 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.logo-small {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
}

footer p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* =============================================
   BACK TO TOP
   ============================================= */
.back-to-top {
  position: fixed;
  bottom: 1.25rem; right: 1.25rem;
  width: 40px; height: 40px;
  background: var(--accent);
  color: #09090f;
  border: none;
  border-radius: 10px;
  font-size: 0.78rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s, box-shadow 0.3s;
  z-index: 900;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  box-shadow: 0 8px 20px rgba(59,130,246,0.4);
  transform: translateY(-3px);
}

/* =============================================
   NOTIFICATION
   ============================================= */
.notification {
  position: fixed;
  bottom: 1.25rem; right: 1.25rem;
  padding: 0.9rem 1.3rem;
  border-radius: 12px;
  color: white;
  font-size: 0.86rem;
  font-weight: 500;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.4s, transform 0.4s;
  max-width: min(320px, calc(100vw - 2.5rem));
}

.notification.show   { opacity: 1; transform: translateY(0); }
.notification.success { background: #1a7a4a; border: 1px solid rgba(77,255,195,0.3); }
.notification.error   { background: #7a1a1a; border: 1px solid rgba(255,100,100,0.3); }
