/* global reset */
*{
margin:0;
padding:0;
box-sizing:border-box;

/* Smooth transitions for UI interactions */
transition:
background-color 0.35s ease,
color 0.35s ease,
border-color 0.35s ease,
box-shadow 0.35s ease;
}

/* smooth scrolling when clicking navigation links */
html{
scroll-behavior:smooth;
}

/* body / page background */
body{
font-family:"Inter",sans-serif;

background:
radial-gradient(circle at 15% 20%, rgba(79,70,229,0.08), transparent 45%),
radial-gradient(circle at 85% 80%, rgba(99,102,241,0.08), transparent 50%),
linear-gradient(180deg,#ffffff,#f6f8ff);

color:#1f2937;
line-height:1.6;
padding-top:90px;

transition:
background 0.6s ease,
color 0.35s ease;
}

/* layout */
.container{
width:90%;
max-width:1100px;
margin:auto;
}

.section{
padding:100px 0;
}

.narrow{
max-width:700px;
margin:auto;
text-align:center;
}


/* fact box */
.fact-box{
background:linear-gradient(135deg,#ffffff,#f5f7ff);
padding:36px 32px;
border-radius:16px;
text-align:center;
margin-top:40px;

border:1px solid rgba(79,70,229,0.1);

box-shadow:
0 8px 20px rgba(0,0,0,0.06),
0 2px 6px rgba(0,0,0,0.04);

backdrop-filter:blur(6px);
position:relative;
overflow:hidden;
}

/* subtle top accent line */
.fact-box::before{
content:"";
position:absolute;
top:0; left:0; right:0;
height:3px;
background:linear-gradient(90deg,#4f46e5,#818cf8,#4f46e5);
}

.dark .fact-box{
background:rgba(255,255,255,0.04);
border:1px solid rgba(255,255,255,0.08);
}

/* fact text */
#api-data{
font-size:1rem;
color:#374151;
line-height:1.7;
min-height:48px;
font-style:italic;
transition:opacity 0.3s ease;
}

body.dark #api-data{
color:#cbd5e1;
}

/* loading spinner */
.fact-loader{
display:none;
width:28px;
height:28px;
border:2.5px solid rgba(99,102,241,0.2);
border-top-color:#4f46e5;
border-radius:50%;
animation:spin 0.75s linear infinite;
margin:12px auto;
}

.fact-loader.active{ display:block; }

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

/* button inside fact box */
.fact-box button{
margin-top:18px;
padding:11px 24px;
border:none;
border-radius:999px;
cursor:pointer;
font-weight:600;
font-size:0.9rem;
font-family:"Inter",sans-serif;
background:linear-gradient(135deg,#4f46e5,#6366f1);
color:white;
box-shadow:0 4px 14px rgba(79,70,229,0.3);
transition:transform 0.2s ease, box-shadow 0.2s ease;
}

.fact-box button:hover{
transform:translateY(-2px);
box-shadow:0 8px 20px rgba(79,70,229,0.4);
}

.fact-box button:disabled{
opacity:0.6;
cursor:not-allowed;
transform:none;
}

/* NAVBAR */
.navbar{
position:fixed;
top:0;
width:100%;

background:rgba(255,255,255,0.78);
backdrop-filter:blur(12px);
-webkit-backdrop-filter:blur(12px);

border-bottom:1px solid rgba(0,0,0,0.06);
box-shadow:0 4px 20px rgba(0,0,0,0.05);

z-index:1000;
transition:all 0.35s ease;
}

.nav-content{
display:flex;
justify-content:space-between;
align-items:center;
padding:18px 0;
}

.logo{
font-weight:700;
font-size:1.2rem;
color:#4f46e5;
letter-spacing:-0.3px;
}

.nav-links{
list-style:none;
display:flex;
gap:30px;
}

.nav-links a{
text-decoration:none;
color:#374151;
font-weight:500;
font-size:0.9rem;
position:relative;
padding-bottom:2px;
transition:color 0.2s ease;
}

/* underline slide-in on hover */
.nav-links a::after{
content:"";
position:absolute;
bottom:-2px; left:0;
width:0; height:1.5px;
background:#4f46e5;
transition:width 0.25s ease;
}

.nav-links a:hover{ color:#4f46e5; }
.nav-links a:hover::after{ width:100%; }

.theme-toggle{
background:none;
border:1.5px solid rgba(79,70,229,0.2);
border-radius:999px;
width:40px; height:40px;
font-size:1rem;
cursor:pointer;
display:flex;
align-items:center;
justify-content:center;
transition:border-color 0.25s ease, transform 0.2s ease;
}

.theme-toggle:hover{
border-color:#4f46e5;
transform:scale(1.08);
}

/*  HERO  */
.hero{
min-height:80vh;
display:flex;
align-items:center;
justify-content:center;
text-align:center;
}

.hero-content{
display:flex;
flex-direction:column;
align-items:center;
}

/* hero name (main title) */
/* Stack first and last name vertically */
.hero-name{
display:flex;
flex-direction:column;
align-items:center;

font-family:"Playfair Display", serif;
line-height:1.1;
letter-spacing:-0.5px;
}

/* first name  */
.first-name{
margin-top:150px;
font-size:6.5rem;  
font-weight:600;

/* Moving gradient effect inside text */
background:linear-gradient(270deg,#6366f1,#a5b4fc,#6366f1);
background-size:200% 200%;

-webkit-background-clip:text;
-webkit-text-fill-color:transparent;

animation:gradientMove 4s ease infinite;
}

/* Last name  */
.last-name{
font-size:5rem;
font-weight:700;

background:linear-gradient(270deg,#e5e7eb,#a5b4fc,#e5e7eb);
background-size:200% 200%;

-webkit-background-clip:text;
-webkit-text-fill-color:transparent;

animation:gradientMove 6s ease infinite;
}
/* Gradient animation movement */
@keyframes gradientMove{
0%{ background-position:0% 50%; }
50%{ background-position:100% 50%; }
100%{ background-position:0% 50%; }
}

.subtitle{
margin-top:12px;
color:#4f46e5;
font-weight:500;
font-size:1rem;
opacity:0;
transition:opacity 0.5s ease;
}

.description{
margin-top:14px;
color:#6b7280;
max-width:500px;
font-size:0.97rem;
}

/* visit timer badge */
.visit-badge{
display:inline-flex;
align-items:center;
gap:7px;
margin-top:24px;
padding:6px 16px;
border-radius:999px;
border:1px solid rgba(79,70,229,0.18);
background:rgba(79,70,229,0.05);
font-size:0.78rem;
font-weight:600;
color:#4f46e5;
letter-spacing:0.04em;
}

.badge-dot{
width:6px; height:6px;
border-radius:50%;
background:#4f46e5;
animation:blink 2s ease-in-out infinite;
}

@keyframes blink{
0%,100%{ opacity:1; }
50%{ opacity:0.25; }
}

/* hero CTA buttons */
.hero-cta{
display:flex;
gap:12px;
margin-top:28px;
justify-content:center;
flex-wrap:wrap;
}

.btn-primary{
padding:12px 26px;
border-radius:999px;
border:none;
background:linear-gradient(135deg,#4f46e5,#6366f1);
color:white;
font-weight:600;
font-size:0.9rem;
font-family:"Inter",sans-serif;
cursor:pointer;
box-shadow:0 6px 18px rgba(79,70,229,0.28);
transition:transform 0.2s ease, box-shadow 0.2s ease;
text-decoration:none;
display:inline-block;
}

.btn-primary:hover{
transform:translateY(-2px);
box-shadow:0 10px 28px rgba(79,70,229,0.38);
}

.btn-ghost{
padding:12px 26px;
border-radius:999px;
border:1.5px solid rgba(79,70,229,0.25);
background:transparent;
color:#4f46e5;
font-weight:600;
font-size:0.9rem;
font-family:"Inter",sans-serif;
cursor:pointer;
transition:all 0.2s ease;
text-decoration:none;
display:inline-block;
}

.btn-ghost:hover{
background:rgba(79,70,229,0.06);
border-color:#4f46e5;
transform:translateY(-2px);
}

/*  DIVIDER */
.section-divider{
width:60%;
height:1px;
margin:40px auto;
background:linear-gradient(to right,transparent,#4f46e5,transparent);
opacity:0.5;
}

/*  ABOUT  */
#about h2{
font-size:2rem;
font-weight:700;
color:#1f2937;
margin-bottom:14px;
}

#about p{
color:#6b7280;
font-size:0.97rem;
}

.tagline{
margin-top:10px;
color:#4f46e5 !important;
font-style:italic;
font-weight:500;
}

/* skill chips */
.skill-chips{
display:flex;
flex-wrap:wrap;
gap:8px;
justify-content:center;
margin-top:22px;
}

.chip{
padding:5px 14px;
border-radius:999px;
border:1px solid rgba(79,70,229,0.2);
background:rgba(79,70,229,0.05);
font-size:0.78rem;
font-weight:600;
color:#4f46e5;
letter-spacing:0.03em;
transition:background 0.2s ease, border-color 0.2s ease;
}

.chip:hover{
background:rgba(79,70,229,0.1);
border-color:rgba(79,70,229,0.4);
}

/*  PROJECT CONTROLS  */
.project-controls{
display:flex;
gap:15px;
margin:20px 0 30px;
}

.search-wrap{
flex:1;
position:relative;
}

.search-icon{
position:absolute;
left:12px;
top:50%;
transform:translateY(-50%);
color:#9ca3af;
pointer-events:none;
font-size:1rem;
}

.project-search{
width:100%;
padding:12px 12px 12px 36px;
border-radius:10px;
border:1px solid #e5e7eb;
background:white;
color:#1f2937;
font-family:"Inter",sans-serif;
font-size:0.9rem;
outline:none;
transition:border 0.25s ease, box-shadow 0.25s ease;
}

.project-search:focus{
border-color:#6366f1;
box-shadow:0 0 0 3px rgba(99,102,241,0.12);
}

.project-sort{
padding:12px 14px;
border-radius:10px;
border:1px solid #e5e7eb;
background:white;
color:#1f2937;
font-family:"Inter",sans-serif;
font-size:0.9rem;
cursor:pointer;
outline:none;
transition:border 0.25s ease;
}

.project-sort:focus{
border-color:#6366f1;
}

/*  PROJECT CARDS  */
.projects-wrapper{
display:flex;
flex-direction:column;
}

.project-card{
display:flex;
gap:25px;

background:white;
padding:30px;
border-radius:16px;

margin-bottom:20px;
align-items:center;

border:1px solid rgba(0,0,0,0.05);

box-shadow:
0 10px 25px rgba(0,0,0,0.06),
0 2px 8px rgba(0,0,0,0.04);

transition:
transform 0.25s ease,
box-shadow 0.25s ease,
border-color 0.25s ease;

position:relative;
overflow:hidden;
}

/* left accent bar on hover */
.project-card::before{
content:"";
position:absolute;
left:0; top:0; bottom:0;
width:3px;
background:linear-gradient(180deg,#4f46e5,#818cf8);
opacity:0;
transition:opacity 0.3s ease;
}

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

.project-card:hover{
transform:translateY(-5px);
border-color:rgba(99,102,241,0.12);
box-shadow:
0 20px 45px rgba(0,0,0,0.1),
0 10px 25px rgba(79,70,229,0.1);
}

.project-img{
width:150px;
height:auto;
max-height:110px;
object-fit:contain;
border-radius:12px;
flex-shrink:0;
transition:transform 0.3s ease;
}

.project-card:hover .project-img{
transform:scale(1.04);
}

.project-content{
flex:1;
}

.project-tags{
display:flex;
gap:6px;
flex-wrap:wrap;
margin-bottom:8px;
}

.project-tag{
font-size:0.7rem;
font-weight:700;
letter-spacing:0.08em;
text-transform:uppercase;
color:#6366f1;
background:rgba(99,102,241,0.08);
border:1px solid rgba(99,102,241,0.15);
padding:2px 9px;
border-radius:999px;
}

.project-title{
display:flex;
align-items:center;
justify-content:space-between;
width:100%;

cursor:pointer;
color:#4f46e5;
font-weight:600;
font-size:1.05rem;
transition:color 0.2s ease;
}

.project-title:hover{ color:#3730a3; }

.project-title::after{
content:"▾";
font-size:0.85rem;
transition:transform 0.35s ease;
opacity:0.7;
flex-shrink:0;
}

.project-card.open .project-title::after{
transform:rotate(180deg);
opacity:1;
}

.project-description{
max-height:0;
overflow:hidden;
transition:max-height 0.4s ease;
color:#6b7280;
font-size:0.93rem;
line-height:1.7;
}

.project-card.open .project-description{
margin-top:10px;
}

/* empty search state */
.empty-message{
text-align:center;
color:#9ca3af;
font-style:italic;
font-size:0.95rem;
padding:40px 0;
display:none;
}

/*  CONTACT  */
form{
display:flex;
flex-direction:column;
gap:15px;
margin-top:25px;
text-align:left;
}

.form-group{
display:flex;
flex-direction:column;
gap:5px;
}

.form-group label{
font-size:0.77rem;
font-weight:600;
letter-spacing:0.07em;
text-transform:uppercase;
color:#9ca3af;
}

input,textarea{
padding:13px;
border-radius:10px;
border:1px solid #e5e7eb;
background:white;
color:#1f2937;
font-family:"Inter",sans-serif;
font-size:0.93rem;
outline:none;
transition:
border 0.25s ease,
box-shadow 0.25s ease;
}

input:focus,
textarea:focus{
border-color:#6366f1;
box-shadow:0 0 0 3px rgba(99,102,241,0.15);
}

button[type="submit"]{
padding:14px 22px;
border-radius:999px;
border:none;
background:linear-gradient(135deg,#4f46e5,#6366f1);
color:white;
font-weight:600;
font-family:"Inter",sans-serif;
cursor:pointer;
align-self:flex-start;
box-shadow:0 6px 18px rgba(79,70,229,0.25);
transition:all 0.25s ease;
}

button[type="submit"]:hover{
transform:translateY(-2px);
box-shadow:0 10px 28px rgba(79,70,229,0.35);
}

.form-message{
margin-top:12px;
font-size:0.9rem;
font-weight:500;
min-height:20px;

opacity:0;
transition:opacity 0.6s ease;
}

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

.reveal.visible{
opacity:1;
transform:translateY(0);
}

/*  DARK MODE  */
body.dark{
background:
radial-gradient(circle at 15% 20%, rgba(99,102,241,0.18), transparent 45%),
radial-gradient(circle at 85% 75%, rgba(139,92,246,0.18), transparent 50%),
radial-gradient(circle at 50% 120%, rgba(59,130,246,0.15), transparent 55%),
linear-gradient(180deg,#0b1020,#020617);
background-attachment:fixed;
color:#e5e7eb;
}

body.dark .navbar{
background:rgba(15,23,42,0.7);
backdrop-filter:blur(14px);
border-bottom:1px solid rgba(148,163,184,0.12);
box-shadow:0 10px 30px rgba(0,0,0,0.5);
}

body.dark .logo{ color:#c7d2fe; }

body.dark .nav-links a{ color:#cbd5f5; }
body.dark .nav-links a:hover{ color:#818cf8; }
body.dark .nav-links a::after{ background:#818cf8; }

body.dark .theme-toggle{
border-color:rgba(165,180,252,0.2);
}

body.dark .hero h1{
background:linear-gradient(90deg,#a5b4fc,#818cf8);
-webkit-background-clip:text;
-webkit-text-fill-color:transparent;
color:transparent;
}

body.dark .subtitle{ color:#a5b4fc; }
body.dark .description{ color:#cbd5e1; }

body.dark .visit-badge{
border-color:rgba(165,180,252,0.2);
background:rgba(165,180,252,0.06);
color:#a5b4fc;
}
body.dark .badge-dot{ background:#a5b4fc; }

body.dark .btn-ghost{
color:#a5b4fc;
border-color:rgba(165,180,252,0.22);
}
body.dark .btn-ghost:hover{
background:rgba(165,180,252,0.06);
border-color:#a5b4fc;
}

body.dark #about h2{ color:#e5e7eb; }
body.dark #about p{ color:#94a3b8; }
body.dark .tagline{ color:#a5b4fc !important; }

body.dark .chip{
border-color:rgba(165,180,252,0.2);
background:rgba(165,180,252,0.06);
color:#a5b4fc;
}

body.dark .project-card{
background:rgba(30,41,59,0.7);
border:1px solid rgba(148,163,184,0.1);
box-shadow:0 20px 40px rgba(0,0,0,0.6);
}

body.dark .project-card:hover{
border-color:rgba(99,102,241,0.2);
box-shadow:
0 25px 50px rgba(0,0,0,0.7),
0 0 20px rgba(99,102,241,0.2);
}

body.dark .project-title{ color:#a5b4fc; }
body.dark .project-title:hover{ color:#c7d2fe; }
body.dark .project-description{ color:#94a3b8; }

body.dark .project-tag{
color:#818cf8;
background:rgba(129,140,248,0.08);
border-color:rgba(129,140,248,0.18);
}

body.dark .project-search,
body.dark .project-sort{
background:#0f172a;
border-color:rgba(148,163,184,0.18);
color:#e5e7eb;
}

body.dark .fact-box{
background:rgba(255,255,255,0.04);
border:1px solid rgba(255,255,255,0.08);
}

body.dark input,
body.dark textarea{
background:#020617;
border:1px solid rgba(148,163,184,0.2);
color:#e5e7eb;
}

body.dark input:focus,
body.dark textarea:focus{
border-color:#6366f1;
box-shadow:0 0 0 2px rgba(99,102,241,0.2);
}

body.dark .form-group label{ color:#64748b; }

body.dark .section-divider{
background:linear-gradient(to right,transparent,#818cf8,transparent);
}

/* RESPONSIVE  */
@media(max-width:768px){

    .logo{
        font-size:1rem;
    }

    .nav-links{
        gap:16px;
    }

    .nav-links a{
        font-size:0.78rem;
    }

    .theme-toggle{
        width:34px;
        height:34px;
        font-size:0.85rem;
        flex-shrink:0;
    }

    .hero h1{ font-size:2.4rem; }

    .hero-cta{ flex-direction:column; align-items:center; }

    .project-card{
        flex-direction:column;
        text-align:center;
    }

    .project-img{
        width:100%;
        max-width:160px;
        margin:0 auto;
    }

    .project-title{ justify-content:center; gap:8px; }
    .project-tags{ justify-content:center; }

    .project-controls{ flex-direction:column; }
    .search-wrap{ width:100%; }

    button[type="submit"]{ align-self:center; }

}

/* JOURNEY / TIMELINE */
#journey {
  padding: 80px 20px;
  position: relative;
}

.timeline {
  position: relative;
  max-width: 600px;
  margin: auto;
}

/* vertical line */
.timeline::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 0;
  width: 3px;
  height: 100%;
  background: #7c5cff;
}

body.dark .timeline::before {
  background: linear-gradient(to bottom, #7c5cff, rgba(124,92,255,0.2));
}

/* item */
.timeline-item {
  position: relative;
  margin: 40px 0;
  padding-left: 60px;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.5s ease;
}

.timeline-item.show {
  opacity: 1;
  transform: translateY(0);
}

/* circle */
.circle {
  position: absolute;
  left: 12px;
  top: 5px;
  width: 18px;
  height: 18px;
  background: #7c5cff;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(124,92,255,0.2),
              0 0 15px rgba(124,92,255,0.6);
  transition: 0.3s;
}

/* content */
.content {
  background: #ffffff;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

body.dark .content {
  background: rgba(255,255,255,0.05);
  box-shadow: none;
}

.content h3 {
  color: #5a4cff;
}

body.dark .content h3 {
  color: #9b7bff;
}

.content p {
  color: #444;
}

body.dark .content p {
  color: #ccc;
}